./share/man/                                                                                           775       0      12            0  4425705411   5761                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man1/                                                                                      775       0      12            0  4425702155   6617                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man1/%.1                                                                                   755       0      12           67  4424740626   7062                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)%.1 1.9 89/03/26 SMI; 
5  @.1    @  6  Intro.1    P  7  List.1    `  8  Mail.1    p  9  adb.1       :  addbib.1 an7     ;   adjacentscreens.1 f     <  admin.1      =  
aedplot.1g s     >  alias.1      ?  align_equals.1 O     @  ar.1v  O    B  arch.1 O    C  as.1   O  ,  D  at.1   O  <  E  atq.1  O  L  F  atrm.1   \  G  awk.1    p  H  	banner.1v am    I  bar.1 am    J  
basename.1      K  ./share/man/man1/@.1                                                                                   755       0      12           67  4424740626   7115                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)@.1 1.9 89/03/26 SMI; 
5   `  8  Mail.1    p  9  adb.1       :  addbib.1 ail     ;   adjacentscreens.1 :     <  admin.1      =  
aedplot.1g .     >  alias.1      ?  align_equals.1 s     @  ar.1v 1     B  arch.1 q    C  as.1    ,  D  at.1    <  E  atq.1    L  F  atrm.1   \  G  awk.1    p  H  	banner.1v rm    I  bar.1 k.    J  
basename.1 1    K  batch.1     L  bc.1 ase    M  bg.1  ./share/man/man1/Intro.1                                                                               755       0      12         5061  4424740625  10067                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.1 1.27 89/04/11 SMI;
.TH INTRO 1 "4 March 1988"
.SH NAME
intro \- introduction to commands
.SH DESCRIPTION
.IX  introduction "commands"
.IX  "commands, introduction"
.IX  "programs, introduction"
.IX  "utilities, introduction"
.LP
This section describes publicly accessible commands in alphabetic order.
Commands of general utility, many with enhancements from 4.3
.SM BSD\s0.
Wherever possible, we have incorporated System V 
versions of commands and utilities into our standard 
.SM UNIX
release.  Where a command has both a System V and a
.SM BSD
version and it has been possible to merge them, we have done so.
In some cases, where the System V version is compatible with
.SM BSD
and offers significant added value, SunOS incorporates that
version as its standard.  
.LP
Pages of special interest have been categorized as follows:
.TP 10
1C
Commands for communicating with other systems.
.TP
1G
Commands used primarily for graphics and computer-aided design.
.TP
1V
Commands that only have System V versions, or that have separate
.SM BSD
and System V versions.
.IP
These commands either depend upon System V functionality, or
have incompatibilities with the corresponding
.SM BSD
version.
They are included in the System V Software installation option.
Once installed, they can be found in the directory
.BR /usr/5bin .
.SH SEE ALSO
.TP 3
\(bu 
Section 8 in this manual for system administration procedures, system
maintenance and operation commands, local daemons, and
network-services servers.
.TP
\(bu 
Section 7 in this manual for descriptions of publicly available files
and macro packages for document preparation.
.TP
\(bu 
Section 6 in this manual for computer games.
.TP
\(bu 
.TX GSBG
.TP
\(bu
.TX SUBG
.TP
\(bu
.TX SVBG
.TP
\(bu
.TX UNBG
.TP 3
\(bu 
.TX DMBG
.TP
\(bu
.TX PUL
.SH DIAGNOSTICS
.LP
Upon termination each command returns two bytes of status,
one supplied by the system giving the cause for
termination, and (in the case of \(lqnormal\(rq termination)
one supplied by the program, see
.B wait
and
.BR exit (2).
The former byte is 0 for normal termination, the latter
is customarily 0 for successful execution, nonzero
to indicate troubles such as erroneous parameters, bad or inaccessible 
data, or other inability to cope with the task at hand.
It is called variously \(lqexit code,\(rq \(lqexit status\(rq or
\(lqreturn code,\(rq and is described only where special conventions are 
involved.
.br
.ne 50
.SH "LIST OF COMMANDS"
.sp
.if t .ta 25n; +22n
.if n .ta 20n; +22n
.nf
\fBName	Appears on Page	Description\fR
.sp
.nr zZ 1
.so /usr/man/man1/List.1
.nr zZ 0
.fi
 eval.1       ex.1        exec.1       exit.1       expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1  	,  	@    fgrep.1v    	P    file.1 P  	d    filemerge.1   	t    find.1 t  	    finger.1    	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1   
     	foreach.1   
    from.1   
     ftp../share/man/man1/List.1                                                                                755       0      12        70761  4424740625   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.1 1.14 88/03/04 SMI
.if \n(zZ=1 .ig zZ
.TH LIST 1 "14 December 1987"
.SH LIST OF COMMANDS
.nf
.sp
.ta 20n; +20n
\fBName 	Appears on Page 	Description\fR
.sp
.zZ
\fB%\fR	\fBcsh\fR(1)	 C shell built-in commands
\fB@\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBMail\fR	\fBmail\fR(1)	 read or send mail messages
\fBadb\fR	\fBadb\fR(1)	 general-purpose debugger
\fBaddbib\fR	\fBaddbib\fR(1)	 create or extend a bibliographic database
\fBadjacentscreens\fR	\fBadjacentscreens\fR(1)	 connect multiple screens to SunView window driver
\fBadmin\fR	\fBadmin\fR(1)	 create and administer SCCS files
\fBaedplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBalias\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBalign_equals\fR	\fBtextedit_filters\fR(1)	 filters provided with \fBtextedit\fR(1)
\fBar\fR	\fBar\fR(1V)	 create library archives, and add or extract files
\fBarch\fR	\fBarch\fR(1)	 display the architecture of the current host
\fBas\fR	\fBas\fR(1)	 Sun-1, Sun-2 and Sun-3, Sun-4 and Sun386i assemblers
\fBat\fR	\fBat\fR(1)	 execute a command or script at a specified time
\fBatq\fR	\fBatq\fR(1)	 display the queue of jobs to be run at specified times
\fBatrm\fR	\fBatrm\fR(1)	 remove jobs spooled by at or batch
\fBawk\fR	\fBawk\fR(1)	 pattern scanning and processing language
\fBbanner\fR	\fBbanner\fR(1V)	 display a string in large letters
\fBbar\fR	\fBbar\fR(1)	 create tape archives, and add or extract files
\fBbasename\fR	\fBbasename\fR(1)	 display portions of pathnames and filenames
\fBbatch\fR	\fBat\fR(1)	 execute a command or script at a specified time
\fBbc\fR	\fBbc\fR(1)	 arbitrary-precision arithmetic language
\fBbg\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBbgplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBbiff\fR	\fBbiff\fR(1)	 give notice of incoming mail messages
\fBbinmail\fR	\fBbinmail\fR(1)	 an early program for processing mail messages
\fBbreak\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBbreaksw\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBcal\fR	\fBcal\fR(1)	 display a calendar
\fBcalendar\fR	\fBcalendar\fR(1)	 a simple reminder service
\fBcapitalize\fR	\fBtextedit_filters\fR(1)	 filters provided with \fBtextedit\fR(1)
\fBcase\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBcat\fR	\fBcat\fR(1V)	 concatenate and display
\fBcb\fR	\fBcb\fR(1)	 a simple C program beautifier
\fBcc\fR	\fBcc\fR(1V)	 C compiler
\fBcd\fR	\fBcd\fR(1)	 change working directory
\fBcdc\fR	\fBcdc\fR(1)	 change the delta commentary of an SCCS delta
\fBcflow\fR	\fBcflow\fR(1)	 generate a flow graph for a C program
\fBcheckeq\fR	\fBeqn\fR(1)	 typeset mathematics
\fBchecknr\fR	\fBchecknr\fR(1)	 check nroff and troff input files; report possible errors
\fBchfn\fR	\fBpasswd\fR(1)	 change password file information
\fBchgrp\fR	\fBchgrp\fR(1)	 change the group ownership of a file
\fBchkey\fR	\fBchkey\fR(1)	 change your encryption key
\fBchmod\fR	\fBchmod\fR(1V)	 change the permissions mode of a file
\fBchsh\fR	\fBpasswd\fR(1)	 change password file information
\fBclear\fR	\fBclear\fR(1)	 clear the terminal screen
\fBclear_colormap\fR	\fBclear_colormap\fR(1)	 clear the colormap to make console text visible
\fBclear_functions\fR	\fBclear_functions\fR(1)	 reset the selection service to clear stuck function keys
\fBclick\fR	\fBclick\fR(1)	 enable or disable the keyboard's keystroke click
\fBclock\fR	\fBclock\fR(1)	 display the time in an icon or window
\fBcluster\fR	\fBcluster\fR(1)	 find the Sun386i cluster containing a file
\fBcmdtool\fR	\fBcmdtool\fR(1)	 run a shell (or program) using the SunView text facility
\fBcmp\fR	\fBcmp\fR(1)	 perform a byte-by-byte comparison of two files
\fBcol\fR	\fBcol\fR(1V)	 filter reverse paper motions from nroff for display
\fBcolcrt\fR	\fBcolcrt\fR(1)	 filter nroff output for a terminal lacking overstrike
\fBcoloredit\fR	\fBcoloredit\fR(1)	 alter color map segment
\fBcolrm\fR	\fBcolrm\fR(1)	 remove characters from specified columns within each line
\fBcomb\fR	\fBcomb\fR(1)	 combine SCCS deltas
\fBcomm\fR	\fBcomm\fR(1)	 display lines in common between two sorted lists
\fBcompress\fR	\fBcompress\fR(1)	 compress or expand files, display expanded contents
\fBcontinue\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBcp\fR	\fBcp\fR(1)	 copy files
\fBcpio\fR	\fBcpio\fR(1)	 copy file archives in and out
\fBcpp\fR	\fBcpp\fR(1)	 the C language preprocessor
\fBcrontab\fR	\fBcrontab\fR(1)	 install, edit, remove or list a user's crontab file
\fBcrtplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBcrypt\fR	\fBcrypt\fR(1)	 encode or decode a file
\fBcsh\fR	\fBcsh\fR(1)	 a shell with a C-like syntax
\fBcsplit\fR	\fBcsplit\fR(1)	 split a file with respect to a given context
\fBctags\fR	\fBctags\fR(1)	 create a tags file for use with vi
\fBctrace\fR	\fBctrace\fR(1)	 generate a C program execution trace
\fBcu\fR	\fBtip\fR(1C)	 terminal emulator, telephone connection to a remote system
\fBcut\fR	\fBcut\fR(1)	 remove selected fields from each line of a file
\fBcxref\fR	\fBcxref\fR(1)	 generate a C program cross-reference
\fBdate\fR	\fBdate\fR(1V)	 display or set the date
\fBdbx\fR	\fBdbx\fR(1)	 source-level debugger
\fBdbxtool\fR	\fBdbxtool\fR(1)	 SunView interface for the dbx source-level debugger
\fBdc\fR	\fBdc\fR(1)	 desk calculator
\fBdd\fR	\fBdd\fR(1)	 convert and copy files with various data formats
\fBdefault\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBdefaults_from_input\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBdefaults_from_input\fR	\fBinput_from_defaults\fR(1)	 update the mouse and keyboard from defaults
\fBdefaults_to_indentpro\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBdefaults_to_mailrc\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBdefaultsedit\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBdelta\fR	\fBdelta\fR(1)	 make a delta (change) to an SCCS file
\fBderoff\fR	\fBderoff\fR(1)	 remove nroff, troff, tbl and eqn constructs
\fBdes\fR	\fBdes\fR(1)	 encrypt or decrypt data using Data Encryption Standard
\fBdf\fR	\fBdf\fR(1)	 report free disk space on file systems
\fBdiff3\fR	\fBdiff3\fR(1V)	 display line-by-line differences between 3 files
\fBdiff\fR	\fBdiff\fR(1)	 display line-by-line differences between pairs of text files
\fBdiffmk\fR	\fBdiffmk\fR(1)	 mark differences between versions of a troff input file
\fBdircmp\fR	\fBdircmp\fR(1V)	 compare directories
\fBdirname\fR	\fBbasename\fR(1)	 display portions of pathnames and filenames
\fBdirs\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBdis\fR	\fBdis\fR(1)	 object code disassembler for COFF
\fBdomainname\fR	\fBdomainname\fR(1)	 set or display name of the current YP domain
\fBdos2unix\fR	\fBdos2unix\fR(1)	 convert text file from DOS format to SunOS format
\fBdos\fR	\fBdos\fR(1)	 SunView window for IBM PC/AT applications
\fBdu\fR	\fBdu\fR(1V)	 display the number of disk blocks used per directory or file
\fBdumbplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBe\fR	\fBex\fR(1)	 line editor
\fBecho\fR	\fBecho\fR(1V)	 echo arguments to the standard output
\fBed\fR	\fBed\fR(1)	 basic line editor
\fBedit\fR	\fBex\fR(1)	 line editor
\fBegrep\fR	\fBgrep\fR(1V)	 search a file for a string or regular expression
\fBeject\fR	\fBeject\fR(1)	 eject floppy disk from an autoeject floppy drive
\fBelse\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBend\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBendif\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBendsw\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBenroll\fR	\fBxsend\fR(1)	 send or receive secret mail
\fBenv\fR	\fBenv\fR(1)	 obtain or alter environment variables
\fBeqn\fR	\fBeqn\fR(1)	 typeset mathematics
\fBerror\fR	\fBerror\fR(1)	 categorize compiler error messages
\fBeval\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBex\fR	\fBex\fR(1)	 line editor
\fBexec\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBexit\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBexpand\fR	\fBexpand\fR(1)	 expand TAB characters to SPACE characters
\fBexpr\fR	\fBexpr\fR(1V)	 evaluate arguments as an expression
\fBfalse\fR	\fBtrue\fR(1)	 provide truth values
\fBfdformat\fR	\fBfdformat\fR(1)	 format diskettes for use under SunOS
\fBfg\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBfgrep\fR	\fBgrep\fR(1V)	 search a file for a string or regular expression
\fBfile\fR	\fBfile\fR(1)	 determine the type of a file by examining its contents
\fBfind\fR	\fBfind\fR(1)	 find files by name, or by other characteristics
\fBfinger\fR	\fBfinger\fR(1)	 display information about users
\fBfmt\fR	\fBfmt\fR(1)	 simple text and mail-message formatters
\fBfmt_mail\fR	\fBfmt\fR(1)	 simple text and mail-message formatters
\fBfold\fR	\fBfold\fR(1)	 fold long lines for display
\fBfontedit\fR	\fBfontedit\fR(1)	 a vfont screen-font editor
\fBfoption\fR	\fBfoption\fR(1)	 determine available floating-point code generation options
\fBforeach\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBfrom\fR	\fBfrom\fR(1)	 display the sender and date of newly-arrived mail messages
\fBftp\fR	\fBftp\fR(1C)	 file transfer program
\fBgcore\fR	\fBgcore\fR(1)	 get core images of running processes
\fBget\fR	\fBget\fR(1)	 get a version of an SCCS file
\fBget_selection\fR	\fBget_selection\fR(1)	 copy contents of a selection to the standard output
\fBgetopt\fR	\fBgetopt\fR(1)	 parse command options in shell scripts
\fBgetoptcvt\fR	\fBgetopts\fR(1)	 parse command options in shell scripts
\fBgetopts\fR	\fBgetopts\fR(1)	 parse command options in shell scripts
\fBgfxtool\fR	\fBgfxtool\fR(1)	 run graphics programs in a SunView window
\fBgigiplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBglob\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBgoto\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBgprof\fR	\fBgprof\fR(1)	 display call-graph profile data
\fBgraph\fR	\fBgraph\fR(1G)	 draw a graph
\fBgrep\fR	\fBgrep\fR(1V)	 search a file for a string or regular expression
\fBgroups\fR	\fBgroups\fR(1)	 display a user's group memberships
\fBhashstat\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBhead\fR	\fBhead\fR(1)	 display first few lines of specified files
\fBhelp\fR	\fBhelp\fR(1)	 ask for help regarding SCCS errors or warnings
\fBhelp_viewer\fR	\fBhelp_viewer\fR(1)	 SunView help application
\fBhistory\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBhostid\fR	\fBhostid\fR(1)	 print the numeric identifier of the current host
\fBhostname\fR	\fBhostname\fR(1)	 set or print name of current host system
\fBhpplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBi386\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBiAPX286\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBiconedit\fR	\fBiconedit\fR(1)	 edit images for SunView icons, cursors and panels
\fBid\fR	\fBid\fR(1)	 print the user name and ID, and group name and ID
\fBif\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBimplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBindent\fR	\fBindent\fR(1)	 indent and format a C program source file
\fBindentpro_to_defaults\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBindxbib\fR	\fBindxbib\fR(1)	 create an inverted index to a bibliographic database
\fBinline\fR	\fBinline\fR(1)	 in-line procedure call expander
\fBinput_from_defaults\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBinput_from_defaults\fR	\fBinput_from_defaults\fR(1)	 update the mouse and keyboard from defaults
\fBinsert_brackets\fR	\fBtextedit_filters\fR(1)	 filters provided with \fBtextedit\fR(1)
\fBinstall\fR	\fBinstall\fR(1)	 install files
\fBipcrm\fR	\fBipcrm\fR(1)	 remove message queue, semaphore, shared memory ID
\fBipcs\fR	\fBipcs\fR(1)	 report interprocess communication facilities status
\fBjobs\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBjoin\fR	\fBjoin\fR(1)	 relational database operator
\fBkeylogin\fR	\fBkeylogin\fR(1)	 decrypt and store secret key
\fBkill\fR	\fBkill\fR(1)	 send a signal to a process, or terminate a process
\fBlabel\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBlast\fR	\fBlast\fR(1)	 indicate last logins by user or terminal
\fBlastcomm\fR	\fBlastcomm\fR(1)	 show the last commands executed, in reverse order
\fBld.so\fR	\fBld\fR(1)	 link editor, dynamic link editor
\fBld\fR	\fBld\fR(1)	 link editor, dynamic link editor
\fBldd\fR	\fBldd\fR(1)	 list dynamic dependencies
\fBleave\fR	\fBleave\fR(1)	 remind you when you have to leave
\fBlex\fR	\fBlex\fR(1)	 lexical analysis program generator
\fBlimit\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBline\fR	\fBline\fR(1)	 read one line
\fBlint\fR	\fBlint\fR(1V)	 a C program verifier
\fBln\fR	\fBln\fR(1)	 make hard or symbolic links to files
\fBload\fR	\fBload\fR(1)	 load Sun386i clusters
\fBloadc\fR	\fBload\fR(1)	 load Sun386i clusters
\fBlockscreen\fR	\fBlockscreen\fR(1)	 maintain SunView context and prevent unauthorized access
\fBlockscreen_default\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBlockscreen_default\fR	\fBlockscreen\fR(1)	 maintain SunView context and prevent unauthorized access
\fBlogger\fR	\fBlogger\fR(1)	 add entries to the system log
\fBlogin\fR	\fBlogin\fR(1)	 log in to the system
\fBlogname\fR	\fBlogname\fR(1)	 get the name by which you logged in
\fBlogout\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBlook\fR	\fBlook\fR(1)	 find words in the system dictionary or lines in a sorted list
\fBlookbib\fR	\fBlookbib\fR(1)	 find references in a bibliographic database
\fBlorder\fR	\fBlorder\fR(1)	 find an ordering relation for an object library
\fBlpq\fR	\fBlpq\fR(1)	 display the queue of printer jobs
\fBlpr\fR	\fBlpr\fR(1)	 send a job to the printer
\fBlprm\fR	\fBlprm\fR(1)	 remove jobs from the printer queue
\fBlptest\fR	\fBlptest\fR(1)	 generate lineprinter ripple pattern
\fBls\fR	\fBls\fR(1V)	 list the contents of a directory
\fBm4\fR	\fBm4\fR(1V)	 macro language processor
\fBm68k\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBmach\fR	\fBmach\fR(1)	 display the processor type of the current host
\fBmachid\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBmail\fR	\fBmail\fR(1)	 read or send mail messages
\fBmailrc_to_defaults\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBmailtool\fR	\fBmailtool\fR(1)	 SunView interface for the mail program
\fBmake\fR	\fBmake\fR(1)	 maintain, update, and regenerate related programs and files
\fBman\fR	\fBman\fR(1)	 display reference manual pages; find pages by keyword
\fBmesg\fR	\fBmesg\fR(1)	 permit or deny messages on the terminal
\fBmkdir\fR	\fBmkdir\fR(1)	 make a directory
\fBmkstr\fR	\fBmkstr\fR(1)	 create an error message file by massaging C source files
\fBmore\fR	\fBmore\fR(1)	 browse or page through a text file
\fBmt\fR	\fBmt\fR(1)	 magnetic tape control
\fBmv\fR	\fBmv\fR(1)	 move or rename files
\fBneqn\fR	\fBeqn\fR(1)	 typeset mathematics
\fBnewgrp\fR	\fBnewgrp\fR(1)	 log in to a new group
\fBnice\fR	\fBnice\fR(1)	 run a command at low priority
\fBnl\fR	\fBnl\fR(1)	 line numbering filter
\fBnm\fR	\fBnm\fR(1)	 print name list
\fBnohup\fR	\fBnohup\fR(1V)	 run a command immune to hangups and quits
\fBnotify\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBnroff\fR	\fBnroff\fR(1)	 format documents for display or line-printer
\fBobjdump\fR	\fBobjdump\fR(1)	 dump selected parts of a COFF object file
\fBod\fR	\fBod\fR(1V)	 octal, decimal, hex, and ascii dump
\fBoldccat\fR	\fBoldcompact\fR(1)	 compress and uncompress files, and cat them
\fBoldcompact\fR	\fBoldcompact\fR(1)	 compress and uncompress files, and cat them
\fBoldeyacc\fR	\fBoldeyacc\fR(1)	 modified yacc allowing much improved error recovery
\fBoldfilemerge\fR	\fBoldfilemerge\fR(1)	 window-based file comparison and merging program
\fBoldmake\fR	\fBoldmake\fR(1)	 maintain, update, and regenerate groups of programs
\fBoldprmail\fR	\fBoldprmail\fR(1)	 display waiting mail
\fBoldpti\fR	\fBoldpti\fR(1)	 phototypesetter interpreter
\fBoldsetkeys\fR	\fBoldsetkeys\fR(1)	 modify interpretation of the keyboard
\fBoldsun3cvt\fR	\fBoldsun3cvt\fR(1)	 convert Sun-2 executables for use on a Sun-3
\fBoldsyslog\fR	\fBoldsyslog\fR(1)	 make a system log entry
\fBoldtektool\fR	\fBoldtektool\fR(1)	 SunView Tektronix 4014 terminal-emulator window
\fBolduncompact\fR	\fBoldcompact\fR(1)	 compress and uncompress files, and cat them
\fBoldvc\fR	\fBoldvc\fR(1)	 version control
\fBon\fR	\fBon\fR(1C)	 execute on remote system with local environment
\fBonintr\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBorganizer\fR	\fBorganizer\fR(1)	 file and directory manager
\fBoverview\fR	\fBoverview\fR(1)	 run a program from SunView that takes over the screen
\fBpack\fR	\fBpack\fR(1)	 compress and expand files
\fBpage\fR	\fBmore\fR(1)	 browse or page through a text file
\fBpagesize\fR	\fBpagesize\fR(1)	 display the size of a page of memory
\fBpasswd\fR	\fBpasswd\fR(1)	 change password file information
\fBpaste\fR	\fBpaste\fR(1)	 join lines of several files
\fBpcat\fR	\fBpack\fR(1)	 compress and expand files
\fBpdp11\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBperfmeter\fR	\fBperfmeter\fR(1)	 display system performance values in a meter or strip chart
\fBpg\fR	\fBpg\fR(1V)	 page through a file on a soft-copy terminal
\fBplot\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBpopd\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBpr\fR	\fBpr\fR(1V)	 prepare file(s) for printing, perhaps in multiple columns
\fBprintenv\fR	\fBprintenv\fR(1)	 display environment variables currently set
\fBprof\fR	\fBprof\fR(1)	 display profile data
\fBprs\fR	\fBprs\fR(1)	 display selected portions an SCCS history
\fBprt\fR	\fBprt\fR(1)	 display the delta and commentary history of an SCCS file
\fBps\fR	\fBps\fR(1)	 display the status of current processes
\fBptx\fR	\fBptx\fR(1)	 generate a permuted index
\fBpushd\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBpwd\fR	\fBpwd\fR(1)	 display the pathname of the current working directory
\fBquota\fR	\fBquota\fR(1)	 display a user's disk quota and usage
\fBranlib\fR	\fBranlib\fR(1)	 convert archives to random libraries
\fBrasfilter8to1\fR	\fBrasfilter8to1\fR(1)	 convert an 8-bit deep rasterfile to a 1-bit deep rasterfile
\fBrastrepl\fR	\fBrastrepl\fR(1)	 magnify a raster image by a factor of two
\fBrcp\fR	\fBrcp\fR(1C)	 remote file copy
\fBrdist\fR	\fBrdist\fR(1)	 remote file distribution program
\fBrefer\fR	\fBrefer\fR(1)	 expand and insert references from a bibliographic database
\fBrehash\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBrepeat\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBreset\fR	\fBtset\fR(1)	 establish or restore terminal characteristics
\fBrev\fR	\fBrev\fR(1)	 reverse the order of characters in each line
\fBrlogin\fR	\fBrlogin\fR(1C)	 remote login
\fBrm\fR	\fBrm\fR(1)	 remove (unlink) files or directories
\fBrmdel\fR	\fBrmdel\fR(1)	 remove a delta from an SCCS file
\fBrmdir\fR	\fBrm\fR(1)	 remove (unlink) files or directories
\fBroffbib\fR	\fBroffbib\fR(1)	 format and print a bibliographic database
\fBrpcgen\fR	\fBrpcgen\fR(1)	 an RPC protocol compiler
\fBrsh\fR	\fBrsh\fR(1C)	 remote shell
\fBrup\fR	\fBrup\fR(1C)	 show host status of local machines (RPC version)
\fBruptime\fR	\fBruptime\fR(1C)	 show host status of local machines
\fBrusers\fR	\fBrusers\fR(1C)	 who's logged in on local machines (RPC version)
\fBrwall\fR	\fBrwall\fR(1C)	 write to all users over a network
\fBrwho\fR	\fBrwho\fR(1C)	 who's logged in on local machines
\fBsact\fR	\fBsact\fR(1)	 print current SCCS file editing activity
\fBsccs\fR	\fBsccs\fR(1)	 front end for the Source Code Control System (SCCS)
\fBsccsdiff\fR	\fBsccsdiff\fR(1)	 compare two versions of an SCCS file
\fBscreenblank\fR	\fBscreenblank\fR(1)	 turn off the screen when the mouse and keyboard are idle
\fBscreendump\fR	\fBscreendump\fR(1)	 dump a frame-buffer image to a file
\fBscreenload\fR	\fBscreenload\fR(1)	 load a frame-buffer image from a file
\fBscript\fR	\fBscript\fR(1)	 make typescript of a terminal session
\fBscrolldefaults\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBsdiff\fR	\fBsdiff\fR(1)	 contrast two text files by displaying them side-by-side
\fBsed\fR	\fBsed\fR(1V)	 stream editor
\fBselection_svc\fR	\fBselection_svc\fR(1)	 SunView selection service
\fBset\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBsetenv\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBsh\fR	\fBsh\fR(1)	 the standard UNIX system shell
\fBshelltool\fR	\fBshelltool\fR(1)	 run a shell (or command) in a SunView terminal window
\fBshift\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBshift_lines\fR	\fBtextedit_filters\fR(1)	 filters provided with \fBtextedit\fR(1)
\fBsize\fR	\fBsize\fR(1)	 display the size of an object file
\fBsleep\fR	\fBsleep\fR(1)	 suspend execution for a specified interval
\fBsnap\fR	\fBsnap\fR(1)	 SunView application for system and network administration
\fBsoelim\fR	\fBsoelim\fR(1)	 resolve and eliminate .so requests from nroff or troff input
\fBsort\fR	\fBsort\fR(1V)	 sort and collate lines
\fBsortbib\fR	\fBsortbib\fR(1)	 sort a bibliographic database
\fBsource\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBsparc\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBspell\fR	\fBspell\fR(1)	 report spelling errors
\fBspellin\fR	\fBspell\fR(1)	 report spelling errors
\fBspellout\fR	\fBspell\fR(1)	 report spelling errors
\fBspline\fR	\fBspline\fR(1G)	 interpolate smooth curve
\fBsplit\fR	\fBsplit\fR(1)	 split a file into pieces
\fBstop\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBstrings\fR	\fBstrings\fR(1)	 find printable strings in an object file or binary
\fBstrip\fR	\fBstrip\fR(1)	 remove symbols and relocation bits from an object file
\fBstty\fR	\fBstty\fR(1V)	 set or alter the options for a terminal
\fBstty_from_defaults\fR	\fBdefaultsedit\fR(1)	 create or edit default settings for SunView 1
\fBstty_from_defaults\fR	\fBstty_from_defaults\fR(1)	 set terminal editing characters from the defaults database
\fBsu\fR	\fBsu\fR(1)	 super-user, temporarily switch to a new user ID
\fBsum\fR	\fBsum\fR(1V)	 calculate a checksum for a file
\fBsun\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBsunview\fR	\fBsunview\fR(1)	 the SunView window environment
\fBsuspend\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBswin\fR	\fBswin\fR(1)	 set or get SunView user input options
\fBswitch\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBswitcher\fR	\fBswitcher\fR(1)	 switch between multiple SunView desktops
\fBsymorder\fR	\fBsymorder\fR(1)	 rearrange a list of symbols
\fBsync\fR	\fBsync\fR(1)	 update the super block; force changed blocks to the disk
\fBsysex\fR	\fBsysex\fR(1)	 invoke the system exerciser
\fBsyswait\fR	\fBsyswait\fR(1)	 execute a command, suspending termination until user input
\fBt300\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBt300s\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBt4013\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBt450\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBtabs\fR	\fBtabs\fR(1V)	 set tab stops on a terminal
\fBtail\fR	\fBtail\fR(1)	 display the last part of a file
\fBtalk\fR	\fBtalk\fR(1)	 talk to another user
\fBtar\fR	\fBtar\fR(1)	 create tape archives, and add or extract files
\fBtbl\fR	\fBtbl\fR(1)	 format tables for nroff or troff
\fBtcopy\fR	\fBtcopy\fR(1)	 copy a magnetic tape
\fBtcov\fR	\fBtcov\fR(1)	 construct test coverage analysis and statement profile
\fBtee\fR	\fBtee\fR(1)	 replicate the standard output
\fBtek\fR	\fBplot\fR(1G)	 graphics filters for various plotters
\fBtelnet\fR	\fBtelnet\fR(1C)	 interface to remote system using TELNET protocol
\fBtest\fR	\fBtest\fR(1V)	 return true or false according to a conditional expression
\fBtextedit\fR	\fBtextedit\fR(1)	 SunView window- and mouse-based text editor
\fBtextedit_filters\fR	\fBtextedit_filters\fR(1)	 filters provided with \fBtextedit\fR(1)
\fBtftp\fR	\fBtftp\fR(1C)	 trivial file transfer program
\fBthen\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBtime\fR	\fBtime\fR(1V)	 time a command
\fBtip\fR	\fBtip\fR(1C)	 terminal emulator, telephone connection to a remote system
\fBtoolplaces\fR	\fBtoolplaces\fR(1)	 display SunView window locations
\fBtouch\fR	\fBtouch\fR(1V)	 update the access and modification times of a file
\fBtput\fR	\fBtput\fR(1V)	 initialize a terminal or query the terminfo database
\fBtr\fR	\fBtr\fR(1V)	 translate characters
\fBtrace\fR	\fBtrace\fR(1)	 trace system calls and signals
\fBtraffic\fR	\fBtraffic\fR(1C)	 SunView program to display Ethernet traffic
\fBtroff\fR	\fBtroff\fR(1)	 typeset or format documents
\fBtrue\fR	\fBtrue\fR(1)	 provide truth values
\fBtset\fR	\fBtset\fR(1)	 establish or restore terminal characteristics
\fBtsort\fR	\fBtsort\&\fR(1)	 topological sort
\fBtty\fR	\fBtty\fR(1)	 display the name of the terminal
\fBu3b15\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBu3b2\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBu3b5\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBu3b\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBul\fR	\fBul\fR(1)	 do underlining
\fBumask\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBunalias\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBuname\fR	\fBuname\fR(1V)	 display the name of the current system
\fBuncompress\fR	\fBcompress\fR(1)	 compress or expand files, display expanded contents
\fBunexpand\fR	\fBexpand\fR(1)	 expand TAB characters to SPACE characters
\fBunget\fR	\fBunget\fR(1)	 undo a previous get of an SCCS file
\fBunhash\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBunifdef\fR	\fBunifdef\fR(1)	 resolve and remove ifdef'ed lines from cpp input
\fBuniq\fR	\fBuniq\fR(1)	 remove or report adjacent duplicate lines
\fBunits\fR	\fBunits\fR(1)	 conversion program
\fBunix2dos\fR	\fBunix2dos\fR(1)	 convert text file from SunOS format to DOS format
\fBunlimit\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBunload\fR	\fBunload\fR(1)	 unload Sun386i clusters
\fBunloadc\fR	\fBunload\fR(1)	 unload Sun386i clusters
\fBunpack\fR	\fBpack\fR(1)	 compress and expand files
\fBunset\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBunsetenv\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBuptime\fR	\fBuptime\fR(1)	 show how long the system has been up
\fBusers\fR	\fBusers\fR(1)	 display a compact list of users logged in
\fBuucp\fR	\fBuucp\fR(1C)	 system to system copy
\fBuudecode\fR	\fBuuencode\fR(1C)	 encode a binary file, or decode its ASCII representation
\fBuuencode\fR	\fBuuencode\fR(1C)	 encode a binary file, or decode its ASCII representation
\fBuulog\fR	\fBuucp\fR(1C)	 system to system copy
\fBuuname\fR	\fBuucp\fR(1C)	 system to system copy
\fBuusend\fR	\fBuusend\fR(1C)	 send a file to a remote host
\fBuustat\fR	\fBuustat\fR(1C)	 uucp status inquiry and job control
\fBuux\fR	\fBuux\fR(1C)	 remote system command execution
\fBvacation\fR	\fBvacation\fR(1)	 reply to mail automatically
\fBval\fR	\fBval\fR(1)	 validate an SCCS file
\fBvax\fR	\fBmachid\fR(1)	 return true if processor is of a given type
\fBvfontinfo\fR	\fBvfontinfo\fR(1)	 inspect and print out information about fonts
\fBvgrind\fR	\fBvgrind\fR(1)	 grind nice program listings
\fBvi\fR	\fBvi\fR(1)	 visual display editor based on \fBex\fR(1)
\fBview\fR	\fBvi\fR(1)	 visual display editor based on \fBex\fR(1)
\fBvplot\fR	\fBvplot\fR(1)	 plot graphics for a Versatec printer
\fBvswap\fR	\fBvswap\fR(1)	 convert a foreign font file
\fBvtroff\fR	\fBvtroff\fR(1)	 troff to a raster plotter
\fBvwidth\fR	\fBvwidth\fR(1)	 make a troff width table for a font
\fBw\fR	\fBw\fR(1)	 who is logged in, and what are they doing
\fBwait\fR	\fBwait\fR(1)	 wait for a process to finish
\fBwall\fR	\fBwall\fR(1)	 write to all users logged in
\fBwc\fR	\fBwc\fR(1)	 display a count of lines, words and characters
\fBwhat\fR	\fBwhat\fR(1)	 identify the version of files under SCCS
\fBwhatis\fR	\fBwhatis\fR(1)	 display a one-line summary about a keyword
\fBwhereis\fR	\fBwhereis\fR(1)	 locate binary, source, and manual page for a command
\fBwhich\fR	\fBwhich\fR(1)	 locate a command; display its pathname or alias
\fBwhile\fR	\fBcsh\fR(1)	 C shell built-in commands
\fBwho\fR	\fBwho\fR(1)	 who is logged in on the system
\fBwhoami\fR	\fBwhoami\fR(1)	 display the effective current username
\fBwhois\fR	\fBwhois\fR(1)	 DARPA Internet user name directory service
\fBwrite\fR	\fBwrite\fR(1)	 write a message to another user
\fBxargs\fR	\fBxargs\fR(1)	 construct the arguments list(s) and execute a command
\fBxget\fR	\fBxsend\fR(1)	 send or receive secret mail
\fBxsend\fR	\fBxsend\fR(1)	 send or receive secret mail
\fBxstr\fR	\fBxstr\fR(1)	 extract strings from C programs to implement shared strings
\fByacc\fR	\fByacc\fR(1)	 yet another compiler-compiler: parsing program generator
\fByes\fR	\fByes\fR(1)	 be repetitively affirmative
\fBypcat\fR	\fBypcat\fR(1)	 print values in a YP data base
\fBypmatch\fR	\fBypmatch\fR(1)	 print the value of one or more keys from a YP map
\fByppasswd\fR	\fByppasswd\fR(1)	 change your network password in the Yellow Pages
\fBypwhich\fR	\fBypwhich\fR(1)	 which host is the YP server or map master?
\fBzcat\fR	\fBcompress\fR(1)	 compress or expand files, display expanded contents
.fi
fbib\fR	\fBroff./share/man/man1/Mail.1                                                                                755       0      12           61  4424740626   7612                                                                                                                                                                                                                                                                                                                                                                      .so man1/mail.1
.\" @(#)Mail.1 1.4 89/03/26 SMI;
 addbib.1        ;   adjacentscreens.1       <  admin.1      =  
aedplot.1g      >  alias.1      ?  align_equals.1 ?     @  ar.1v  ?    B  arch.1     C  as.1 1   ,  D  at.1 1   <  E  atq.1   L  F  atrm.1 ,  \  G  awk.1  <  p  H  	banner.1v p    I  bar.1 p    J  
basename.1     K  batch.1     L  bc.1 .1     M  bg.1 .1     N  	bgplot.1g     O  biff.1      P  
./share/man/man1/adb.1                                                                                 755       0      12        36500  4424740626   7545                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adb.1 1.43 89/03/26 SMI; from UCB 4.2
.TH ADB 1 "22 March 1989"
.SH NAME
adb \- general-purpose debugger
.SH SYNOPSIS
.B adb
[ 
.B \-w
] 
[ 
.B \-k
] 
[ 
.B \-I
.I dir 
] 
[ 
.I objectfile
[ 
.I corefile
] 
]
.SH AVAILABILITY
.LP
.B adb
is available with the
.I Debugging
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  adb  ""  "\fLadb\fP \(em debugger"
.IX  "debug tools"  "adb command"  ""  "\fLadb\fP \(em debugger"
.IX  "programming tools" "adb debugger" "" "\fLadb\fP \(em debug tool"
.LP
.B adb
is an interactive, general-purpose debugger.  It can be used to
examine files and provides
a controlled environment for the execution of 
programs.
.LP
.I objectfile
is normally an executable program file, preferably
containing a symbol table. If the file does not contain a symbol table,
it can still be examined, but the symbolic features of
.B adb
cannot be used.
The default for
.I objectfile
is
.BR a.out .
.I corefile
is assumed to be a core image file produced after executing
.IR objectfile .
The default for
.I corefile
is
.BR core .
.SH OPTIONS
.TP
.B \-k
Perform kernel memory mapping; should be used when
.I corefile
is a system crash dump or
.BR /dev/mem .
.TP
.B \-w
Create both
.I objectfile
and
.IR corefile ,
if necessary, and open them for reading and writing
so that they can be modified using
.BR adb .
.TP
.BI \-I " dir"
specifies a directory where files to be read
with
.B $<
or
.B $<<
(see below) will be sought; the default is
.BR /usr/lib/adb .
.SH USAGE
Refer to 
.B adb
in 
.TX DEBUG
for more complete information on how to use
.BR adb .
Note:  Some commands require that you compile progams to be debugged 
with the
.B \-go
compiler flag; see
.BR cc (1V)
for details.
These commands are not currently available on Sun-4 systems;
they are marked
.RB ` \-go
only' below.
.PD
.SS Commands
.B adb
reads commands from the standard input and displays responses on the
standard output.  It does not supply a prompt.  It ignores the
.SM QUIT
signal.  
.SM INTERRUPT
invokes the next
.B adb
command.
.B adb
generally recognizes command input of the form:
.IP
[ \fIaddress\fR ] [\fB,\fI count\fR ] \fIcommand\fR [ \fB;\fR ]
.LP
.I address 
and 
.I count
(if supplied) are expressions that result, respectively, in a new
current address, and a repetition count. 
.I command 
is composed of a verb followed by a modifier or list of modifiers.
.LP
The symbol
.RB ` \&. '
represents the current location. 
It is initially zero.  The default
.I count
is
.RB ` 1 '.
.PD
.SS \fIVerbs\fR
.PD 0
.TP 15
.B ?
Print locations starting at
.I address
in
.IR objectfile .
.TP
.B /
Print locations starting at
.I address
in
.IR corefile .
.TP
.B =
Print the value of
.I address
itself.
.TP
.B @
Interpret
.I address
as a source address. Print locations in
.I objectfile
or lines of source, as appropriate.
.B \-go
only.
.TP
.B :
Manage a subprocess.
.TP
.B $r 
Print names and contents of
.SM CPU
registers.
.TP
.B $R 
Print names and contents of
.SM MC\s068881
registers, if any.
.TP
.B $x
Print the names and contents of
.SM FPA
registers 0 through 15, if any.
.TP
.B $X
Print the names and contents of
.SM FPA
registers 16 through 31, if any.
.TP
.B >
Assign a value to a variable or register.
.TP
.SM RETURN
Repeat the previous command with a
.I count
of 1.  Increment
.RB ` . '.
.TP
.B !
Shell escape.
.PD
.br
.ne 7
.SS Modifiers
.LP
Modifiers specify the format of command output.  
Each modifier consists of a letter, preceded by an integer 
repeat count.  
.SS "\fIFormat Modifiers\fR"
.LP
The following format modifiers apply to the commands
.BR ? ,
.BR / ,
.BR @ ,
and
.BR = .
To specify a format, follow the command with an optional repeat count,
and the desired format letter or letters:
.IP
[ \fIv\fR ] [ [ \fIr\fR ] \fIf .\|.\|.\fR ]
.LP
where 
.I v
is one of these four command verbs,
.I r
is a repeat count, and
.I f
is one of the format letters listed below:
.PD 0
.TP 15
.B o
.RB (` \&. '
increment:  2)
Print 2 bytes in octal.
.TP
.B O
(4)
Print 4 bytes in octal.
.TP
.B q
(2)
Print in signed octal.
.TP
.B Q 
(4)
Print long signed octal.
.TP
.B d 
(2)
Print in decimal.
.TP
.B D 
(4)
Print long decimal.
.TP
.B x 
(2)
Print 2 bytes in hexadecimal.
.TP
.B X 
(4)
Print 4 bytes in hexadecimal.
.TP
.B h
(2)
Print 2 bytes in hexadecimal in reverse order. Sun386i systems only.
.TP
.B H
(4)
Print 4 bytes in hexadecimal in reverse order. Sun386i systems only.
.TP
.B u 
(2)
Print as an unsigned decimal number.
.TP
.B U 
(4) 
Print long unsigned decimal.
.TP
.B f 
(4)
Print a single-precision floating-point number.
.TP
.B F 
(8)
Print a double-precision floating-point number.
.TP
.BR e " or " E
(12)
Print a 96-bit
.SM MC\s068881
extended-precision floating-point number.
Sun-2 or Sun-3 systems only.
.TP
.B b 
(1)
Print the addressed byte in octal.
.TP
.B B
(1)
Print the addressed byte in hexadecimal. Sun386i systems only. 
.TP
.B c 
(1)
Print the addressed character.
.TP
.B C 
(1)
Print the addressed character using
.B ^  
escape convention.
.TP
.B s 
.RI ( n )
Print the addressed string.
.TP
.B S 
.RI ( n )
Print a string using the
.B ^  
escape convention.
.TP
.B Y 
(4)
Print 4 bytes in date format.
.TP
.B i 
.RI ( n )
Print as machine instructions.
.TP
.B M
.RI ( n )
Print as machine instructions along with machine code. Sun386i systems
only.
.TP
.B z 
.RI ( n )
Print with
.SM MC\s068010
machine instruction timings.
Sun-2 or Sun-3 system only.
.TP
.B I 
(0)
Print the source text line specified by
.RB ` . ' .
.B \-go
only.
.TP
.B a 
(0)
Print the value of
.RB ` . '   
in symbolic form.
.TP
.B p 
(4)
Print the addressed value in symbolic form.
.TP
.B A 
(0)
Print the value of
.RB ` . '
in source-symbol form.
.TP
.B P 
(4) 
Print the addressed value in source-symbol form.
.TP
.B t 
(0) 
Tab to the next appropriate
.SM TAB
stop.
.TP
.B r 
(0) 
Print a
.SM SPACE\s0.
.TP
.B n 
(0) 
Print a
.SM NEWLINE\s0.
.TP
.BR ' .\|.\|. '
(0) 
Print the enclosed string.
.TP
.B \s+2^\s0
(0) 
Decrement
.RB ` . '.
.TP
.B +
(0) 
Increment
.RB ` . '.
.TP
.B \-
(0) 
Decrement
.RB ` . '
by 1.
.PD
.SS "\fIModifiers for \fB?\fP and \fB/\fP Only\fR"
.PD 0
.TP 15
.BI l " value mask"
Apply
.I mask
and compare for
.IR value ;
move
.RB ` . '
to matching location.
.TP
.BI L " value mask"
Apply
.I mask
and compare for 4-byte
.IR value ;
move
.RB ` . '
to matching location.
.TP
.BI w " value"
Write the 2-byte
.I value  
to address.
.TP
.BI W " value"
Write the 4-byte
.I value  
to address.
.TP
.BI m " b1 e1 f1\fR[ ?\fR] 
Map new values for
.IR "b1, e1, f1" .
If the
.B ?
or
.B /
is followed by 
.B * 
then the second segment
.RI ( b2 \|,\| e2 \|,\| f2\fR)
of the address mapping is changed.
.PD
.SS ": \fIModifiers\fR"
.PD 0
.TP 15
.BI b " commands"
Set breakpoint, execute
.I commands  
when reached.
.TP
.BI B " commands"
Set breakpoint using source address, execute
.I commands  
when reached.
.B \-go
only.
.TP
.BI w " commands"
Set a data write breakpoint at
.I address .
Like 
.B b
except that the breakpoint is hit when the program writes to 
.I address .
Sun386i systems only. 
.TP
.B D
Delete breakpoint at source address.
.B \-go
only.
.TP
.B r
Run
.I objectfile  
as a subprocess.
.TP
.BI c s
The subprocess is continued with signal
.IR s .
.TP
.BI s s
Single-step the subprocess with signal
.IR s .
.TP
.BI S s
Single-step the subprocess with signal
.I s  
using source lines.
.B \-go
only.
.TP
.B i
Add the signal specified by
.I address  
to the list of signals passed directly to the subprocess.
.TP
.B t
Remove the signal specified by
.I address  
from the list implicitly passed to the subprocess.
.TP
.B k
Single-step the subprocess with signal
.I s
using source lines.
.B \-go
only.
.TP
.BI e s
Like 
.IR s ,
but steps over subroutine calls instead of into them. Sun386i systems
only. 
.TP
.B u
Continue uplevel, stopping after the current
routine has returned. Should only be given after the frame pointer
has been pushed on the stack. Sun386i systems only. 
.TP
.B i
Add the signal specified by
.I address
to the list of signals passed directly to the subprocess 
.TP
.B t
Remove the signal specified by
.I address
from the list implicitly passed to the subprocess.
.TP
.B k
Terminate the current subprocess, if any.
.TP
.B A
Attach the process whose process
.SM ID
is given by
.IR address .
The
.SM PID
is generally preceded by 
.B  0t
so that it will be interpreted in decimal. Sun386i systems only. 
.TP
.B R
Release (detach) the current process. Sun386i systems only. 
.PD
.SS "$ \fIModifiers\fR"
.PD 0
.TP 15
.BI < filename
Read commands from the file
.IR filename .
.TP 
.BI << filename
Similar to
.BR < ,
but can be used in a file of commands without
closing the file.  
.TP 
.BI > filename
Append output to
.IR filename ,
which is created if it does not exist.  
.TP 
.B ?
Print process
.SM ID\s0,
the signal which stopped the subprocess, and
the registers.  
.TP 
.B r
Print the names and contents of the general
.SM CPU
registers,
and the instruction addressed by
.BR pc .
.TP 
.B R
On Sun-3 systems with an
.SM MC\s068881
floating-point coprocessor,
print the names and contents of the coprocessor's registers.
.TP
.B x
On Sun-3 systems with a Floating Point Accelerator
(\s-1FPA\s0), print the names and contents of
.SM FPA
floating-point registers 0 through 15.
On Sun-4 systems,
print the names and contents of the floating-point registers 
0 through 15.
.TP 
.B X
On Sun-3 systems with an
.SM FPA\s0,
print the names and contents of
.SM FPA
registers 16 through 31.
On Sun-4 systems,
print the names and contents of floating-point registers 16 through 31.
.TP
.B b
Print all breakpoints and their associated counts and commands.
.TP 
.B c
C stack backtrace.  
On Sun-4 systems, it is impossible for
.B adb
to determine how many parameters were passed to a function.
The default that
.B adb
chooses in a
.B $c
command is to show the six parameter registers.
This can be overridden by appending a hexadecimal
number to the
.B $c
command, specifying how many parameters to display.
For example, the
.B $cf
command will print 15 parameters for each function in the
stack trace.
.TP 
.B C 
C stack backtrace with
names and (32 bit) values of all automatic
and static variables for each active function.
.RB ( \-go
only).
.TP 
.B d
Set the default radix to
.I address
and report the new value.  Note: 
.I address
is interpreted in the (old) current radix.
Thus
.RB ` 10$d '
never changes the default radix.
.TP 
.B e
Print the names and values of external variables.
.TP 
.B w
Set the page width for output to
.I address
(default 80).
.TP 
.B s
Set the limit for symbol matches to
.I address
(default 255).
.TP 
.B o
All integers input are regarded as octal.
.TP 
.B q
Exit from
.BR adb .
.TP 
.B v
Print all non zero variables in octal.
.TP 
.B m
Print the address map.
.TP 
.B f
Print a list of known source filenames.
.RB ( \-go
only).
.TP 
.B p
Print a list of known procedure names.
.RB ( \-go
only).
.TP 
.B p
.RI ( "Kernel debugging" )
Change the current kernel memory mapping to map the designated 
.B "user structure"
to the address given by 
.IR _u 
(
.IR u
on Sun386i systems); this is 
the address of the user's 
.B proc
structure. 
.TP 
.B i
Show which signals are passed to the subprocess with the minimum of 
.B adb
interference.  
.TP 
.B W
Reopen 
.I objectfile
and
.I corefile
for writing, as though the 
.B \-w
command-line argument had been given.
.TP
.B l
Set the length in bytes (1, 2, or 4) of the object
referenced by 
.I :a
and
.I :w
to 
.IR address .
Default is 1. Sun386i systems only. 
.PD
.br
.ne 5
.SS Variables
.LP
Named variables are set initially by
.B adb
but are not used subsequently.
.PD 0
.TP 15
.B 0
The last value printed.
.TP
.B 1
The last offset part of an instruction source.
.TP
.B 2
The previous value of variable 1.
.TP
.B 9
The count on the last 
.B $< 
or 
.B $<< 
command.
.PD
.LP
On entry the following are set from the system header in the
.I corefile
or 
.I objectfile
as appropriate.
.PD 0
.TP 15
.B b
The base address of the data segment.
.TP
.B B
The number of an address register that points to the
.SM FPA
page. Sun-3 systems only.
.TP
.B d
The data segment size.
.TP
.B e
The entry point.
.TP
.B F
On Sun-3 systems, a value of `1' indicates
.SM FPA
disassembly.
.TP
.B m
The `magic' number (0407, 0410 or 0413).
.TP
.B s
The stack segment size.
.TP
.B t
The text segment size.
.PD
.SS Expressions
.PD 0
.TP 15
.B .
The value of
.IR dot .
.TP 
.B +
The value of
.I dot
incremented by the current increment.
.TP 
.B ^
The value of
.I dot
decremented by the current increment.
.TP 
.B &
The last
.I address
typed.  (In older versions of
.BR adb ,
`\fB"\fR' was used.)
.TP 15
.I integer
A number.  The prefixes
.B 0o
and
.B 0O
indicate octal;
.B 0t
and
.BR 0T ,
decimal; 
.B 0x
and
.BR 0X ,
hexadecimal (the default).
.TP 
.IB int . frac
A floating-point number.
.TP 
.BI ' cccc '
.SM ASCII
value of up to 4 characters.
.TP 
.BI < name
The value of
.IR name ,
which is either a variable name or a register name.
.TP 
.I symbol
A symbol in the symbol table.
An initial
.RB ` \_ '
will be prepended to
.I symbol
if needed.
Sun-2, Sun-3, and Sun-4 systems but not Sun386i systems.
.TP
.BI _ symbol
An external symbol.
Sun-2, Sun-3, and Sun-4 systems but not Sun386i systems.
.TP 
.IB routine . name
The address of the variable
.I name
in the specified routine in the symbol table.
If
.I name
is omitted, the address of the most recent stack frame for
.IR routine .
.TP 
.BI ( exp )
The value of 
.IR exp .
.PD
.SS  "\fIUnary Operators"
.PD 0
.TP 15
.BI * exp
The contents of location 
.I exp
in 
.IR corefile .
.TP 
.BI % exp
The contents of location 
.I exp
in
.I objectfile
(In older versions of
.BR adb ,
.RB ` @ '
was used).
.TP 
.RI \- exp
Integer negation.
.TP 
.BI \s+2~\s0 exp
Bitwise complement.
.TP 
.BI # exp
Logical negation.
.TP 
.BI ^F exp
(\s-1CTRL\-F\s0) Translate program address to source address.
.RB ( \-go
only).
.TP 
.BI ^A exp
(\s-1CTRL\-A\s0) Translates source address to program address.
.RB ( \-go
only).
.TP 
.BI ` name
(Backquote) Translates procedure name to sourcefile address.
.RB ( \-go
only).
.TP 
.tr '"
.I 'file'
The sourcefile address for the zero-th line of 
.IR file .
.RB ( \-go
only).
.tr ''
.PD
.SS  "\fIBinary Operators"
.LP
Binary operators are left associative and have lower precedence
than unary operators.
.PD 0
.TP 15
.B + 
Integer addition.
.TP 
.B \- 
Integer subtraction.
.TP 
.B *
Integer multiplication.
.TP 
.B % 
Integer division.
.TP 
.B & 
Bitwise conjunction (\(lq\s-1AND\s0\(rq).
.TP 
.B |
Bitwise disjunction (\(lq\s-1OR\s0\(rq).
.TP 
.I # 
.I lhs
rounded up to the next multiple of
.IR rhs .
.br
.ne 10
.SH FILES
.PD 0
.TP 20
.B /usr/lib/adb
.TP
.B a.out
.TP
.B core
.PD
.SH SEE ALSO
.BR cc (1V),
.BR dbx (1),
.BR ptrace (2),
.BR a.out (5),
.BR core (5),
.BR kadb (8S)
.LP
.TX DEBUG
.SH DIAGNOSTICS
.LP
.BR adb ,
when there is no current command or format,
comments about inaccessible files, syntax errors,
abnormal termination of commands, etc.
Exit status is 0, unless last command failed or returned nonzero status.
.PD
.br
.ne 5
.SH BUGS
.LP
There does not seem to be any way to clear all breakpoints.
.LP
.B adb
uses the symbolic information in an old and now obsolete
format generated by the
.B \-go
flag of
.BR cc (1V);
it should be changed to use the new
format generated by
.BR  \-g .
.LP
Since no shell is invoked to interpret the arguments of the
.B :r
command, the customary wild-card and variable expansions cannot occur.
.LP
Since there is little type-checking on addresses, using
a sourcefile address in an inappropriate context
may lead to unexpected results.
.LP
The
.BI $c parameter-count
command is a kluge.
.
Sun-2 or Sun-3 system only.
.TP
.B I 
(0)
Print the source text line specified by
.RB ` . ' .
.B \-go
only.
.TP
.B a 
(0)
Print the value of
.RB ` . '   
in symbolic form.
.TP
.B p 
(4)
Prin./share/man/man1/addbib.1                                                                              755       0      12         6453  4424740626  10210                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)addbib.1 1.23 89/03/26 SMI; 
.TH ADDBIB 1 "22 March 1989"
.SH NAME
addbib \- create or extend a bibliographic database
.SH SYNOPSIS
.B addbib
[
.B \-a
]
[
.B \-p
.I promptfile
]
.I database
.SH AVAILABILITY
.B addbib
is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  addbib  ""  "\fLaddbib\fR \(em create bibliography"
.IX  "document production" addbib "" "\fLaddbib\fR \(em create bibliography"
.IX  "bibliography"  "\fLaddbib\fR \(em create or extend"
.IX  create  "bibliography addbib"  ""  "bibliography \(em \fLaddbib"
.IX  "extend bibliography \(em \fLaddbib\fR"
.LP
When
.B addbib
starts up, answering
.B y
to the initial
.B Instructions?
prompt yields directions; typing
.B n
or
.SM RETURN
skips them.
.B addbib
then prompts for various bibliographic fields, reads responses
from the terminal, and sends output records to
.I database.
A null response (just
.SM RETURN\s0)
means to leave out that field.  A
.RB ` \- ' 
(minus sign)
means to go back to the previous field.  A trailing
backslash allows a field to be continued on the next line.  The
repeating
.B Continue?
prompt allows the user either to resume by
typing
.B y
or 
.SM RETURN\s0, 
to quit the current session by typing
.B n
or
.BR q ,
or to edit 
.I database
with any system editor 
.RB ( vi (1),
.BR ex (1),
.BR ed (1)).
.SH OPTIONS
.TP 
.B \-a
Suppress prompting for an abstract; asking for an
abstract is the default.
Abstracts are ended with a 
.SM CTRL\s0\-D.
.TP
.BI \-p " promptfile"
Use a new prompting skeleton, defined in
.IR promptfile .
This file should contain prompt strings, a 
.SM TAB\s0,
and the key-letters to be written to the
.IR database .
.SH USAGE
.SS Bibliography Key Letters
.LP
The most common key-letters and their meanings are given below.
.B addbib
insulates you from these key-letters,
since it gives you prompts in English,
but if you edit the bibliography file later on,
you will need to know this information.
.RS
.TP 
.B %A
Author's name
.TP
.B %B
Book containing article referenced
.TP
.B %C
City (place of publication)
.TP
.B %D
Date of publication
.TP
.B %E
Editor of book containing article referenced
.TP
.B %F
Footnote number or label (supplied by  
.BR refer )
.TP
.B %G
Government order number
.TP
.B %H
Header commentary, printed before reference
.TP
.B %I
Issuer (publisher)
.TP
.B %J
Journal containing article
.TP
.B %K
Keywords to use in locating reference
.TP
.B %L
Label field used by
.B \-k
option of 
.B refer
.TP
.B %M
Bell Labs Memorandum (undefined)
.TP
.B %N
Number within volume
.TP
.B %O
Other commentary, printed at end of reference
.TP
.B %P
Page number(s)
.TP
.B %Q
Corporate or Foreign Author (unreversed)
.TP
.B %R
Report, paper, or thesis (unpublished)
.TP
.B %S
Series title
.TP
.B %T
Title of article or book
.TP
.B %V
Volume number
.TP
.B %X
Abstract \(em used by
.BR roffbib ,
not by
.B refer
.TP
.B %Y,Z
Ignored by
.B refer
.RE
.SH EXAMPLE
Except for
.RB A ,
each field should be given just once.
Only relevant fields should be supplied.
.RS
.nf
.ft B
%A	Mark Twain
%T	Life on the Mississippi
%I	Penguin Books
%C	New York
%D	1978
.fi
.ft R
.RE
.SH SEE ALSO
.BR ed (1),
.BR ex (1),
.BR indxbib (1),
.BR lookbib (1),
.BR refer (1),
.BR roffbib (1),
.BR sortbib (1),
.BR vi (1)
.LP
.B refer
in
.TX DOCS
  head.1 P  p    help.1 P      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g       i386.1        	iAPX286.1        	./share/man/man1/adjacentscreens.1                                                                     755       0      12         5636  4424740626  12141                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adjacentscreens.1 1.20 89/03/26 SMI;.
.TH ADJACENTSCREENS 1 "18 February 1988"
.SH NAME
adjacentscreens \- connect multiple screens to SunView window driver
.SH SYNOPSIS
.B adjacentscreens 
[
.BR \-c \||\|\c
.B \-m
] 
.I center-screen
.if n .br
[
.BR \-l \||\|\c
.BR \-r \||\|\c
.BR \-t \||\|\c
.B \-b
.IR " side-screen " "] .\|.\|."
.B \-x
.SH AVAILABILITY
This command is available for Sun-2,
Sun-3 and Sun-4 systems with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  adjacentscreens  ""  "\fLadjacentscreens\fP"
.IX  "window management"  "adjacentscreens command"  ""  "\fLadjacentscreens\fP command"
.B adjacentscreens
tells the window-driver's mouse-pointer tracking mechanism 
how to move between screens that contain windows.  Note that
.BR sunview (1)
must be running on all screens before 
.B adjacentscreens
is used.  Once properly notified using
.BR adjacentscreens\| ,
the mouse pointer slides from one screen to another
as you move the pointer past the appropriate edge of a screen.
.LP
.SH OPTIONS
.TP
.BI \-c center-screen
.PD 0
.TP
.BI \-m center-screen
.PD
.I center-screen
is the name of a frame buffer device, such as 
.BR /dev/fb ;
all other physical screen-positions are given relative to this
reference point.
The 
.B \-c
or \-m
flag  is optional.  If omitted, the first argument is taken
as
.IR center-screen .
If no further arguments are given,
.I center-screen
has no neighbors.
.TP
.BI \-l " side-screen"
.PD 0
.TP
.BI \-r " side-screen"
.TP
.BI \-t " side-screen"
.TP
.BI \-b " side-screen"
.TP
.BI \-l " side-screen"
.PD
.I side-screen
is also a frame buffer device name,
such as 
.BR /dev/cgone .
The 
.B \-l
flag indicates that
.I side-screen
is to the left of
.IR " center-screen" ;
.B \-r
indicates that it is to the right.
.B \-t
Indicates that 
.I side-screen
is on top of (above)
.IR  center-screen ;
.B \-b
indicates that it is below.  Each neighboring screen can be
specified as an option on the command line.
.TP
.B \-x
Suppress the normal notification to a 
.I side-screen
pointer tracker that
.I center-screen
is its only neighbor.
This option is useful if you have a large number of screens or
want exotic inter-window pointer movements.
.LP
.SH EXAMPLE
.LP
The following command:
.RS
.LP
.B
example% adjacentscreens /dev/fb \-r /dev/cgone
.RE
.LP
sets up pointer tracking so that the pointer slides from 
a monochrome screen 
.RB ( /dev/fb )
to a color screen
.RB ( /dev/cgone )
when the pointer moves off the right hand edge of the monochrome
display.
Similarly, the pointer slides from the color screen to the monochrome
screen when the pointer moves off the color screen's left edge.
.SH FILES
.PD 0
.TP 20
.B /usr/bin/adjacentscreens
.TP
.B /dev/fb
.TP
.B /dev/cgone
.PD
.SH "SEE ALSO"
.BR sunview (1),
.BR switcher (1)
.SH BUGS
Window systems on all screens must be initialized before running
.BR adjacentscreens .

0    gcore.1   
H    generic_args.1 H  
X    get.1 gs  
p    get_selection.1   
./share/man/man1/admin.1                                                                               755       0      12           70  4424740626  10020                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-admin.1
.\" @(#)admin.1 1.3 89/03/26 SMI;
alias.1      ?  align_equals.1 a     @  ar.1v ig    B  arch.1 @    C  as.1  B  ,  D  at.1  C  <  E  atq.1 D  L  F  atrm.1 E  \  G  awk.1 F  p  H  	banner.1v      I  bar.1  	    J  
basename.1     K  batch.1     L  bc.1  K    M  bg.1  L    N  	bgplot.1g      O  biff.1 	     P  
bin-mail.1     Q  break.1   $  R  	breaksw.1    4  S  cal.1  	  H  T  
calendar./share/man/man1/aedplot.1g                                                                            755       0      12           66  4424740627  10535                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)aedplot.1g 1.5 89/03/26 SMI;
 align_equals.1 ?     @  ar.1v  a    B  arch.1 g    C  as.1 1 @  ,  D  at.1  B  <  E  atq.1 C  L  F  atrm.1 D  \  G  awk.1  E  p  H  	banner.1v p    I  bar.1      J  
basename.1     K  batch.1     L  bc.1 .1     M  bg.1  K    N  	bgplot.1g     O  biff.1      P  
bin-mail.1      Q  break.1   $  R  	breaksw.1 $  4  S  cal.1    H  T  
calendar.1 H  `  U  capi./share/man/man1/alias.1                                                                               755       0      12           73  4424740627  10025                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)alias.1 1.9 89/03/26 SMI; 
ar.1v ls    B  arch.1 1    C  as.1 rch  ,  D  at.1 s.1  <  E  atq.1 .1  L  F  atrm.1 .  \  G  awk.1 rm  p  H  	banner.1v  E    I  bar.1 .1    J  
basename.1     K  batch.1     L  bc.1 atc    M  bg.1 c.1    N  	bgplot.1g K    O  biff.1 1     P  
bin-mail.1     Q  break.1   $  R  	breaksw.1 1   4  S  cal.1 w.  H  T  
calendar.1   `  U  capitalize.1  `  p  V  ./share/man/man1/align_equals.1                                                                        755       0      12          105  4424740627  11414                                                                                                                                                                                                                                                                                                                                                                      .so man1/textedit_filters.1
.\" @(#)align_equals.1 1.5 89/03/26 SMI;
   C  as.1 1 1  ,  D  at.1 rch  <  E  atq.1 .1  L  F  atrm.1 1  \  G  awk.1  .  p  H  	banner.1v p    I  bar.1  E    J  
basename.1     K  batch.1     L  bc.1 .1     M  bg.1 atc    N  	bgplot.1g     O  biff.1 K     P  
bin-mail.1      Q  break.1   $  R  	breaksw.1 $  4  S  cal.1 1   H  T  
calendar.1 H  `  U  capitalize.1  U  p  V  case.1 `    W  ./share/man/man1/ar.1v                                                                                 755       0      12        13117  4424740627   7607                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ar.1v 1.28 89/03/26 SMI; from UCB 24 Feb 1979
.TH AR 1V "22 March 1989"
.SH NAME
ar \- create library archives, and add or extract files
.SH SYNOPSIS
.B ar
.BR d " | " m " | "
.BR p " | " q " | "
.BR r " | " t " | " x
[ [
.B clouv
]
[
.BR abi
.I position-name
] ]
.I archive
[
.IR member-file .\|.\|.
]
.SH SYSTEM V SYNOPSIS
.B ar
.RB [ \- ]
.BR d " | " m " | "
.BR p " | " q " | "
.BR r " | " t " | " x
[ [
.B clouvs
]
[
.BR abi
.I position-name
] ]
.I archive
[
.IR member-file .\|.\|.
]
.SH DESCRIPTION
.IX  ar  ""  "\fLar\fP \(em library maintenance"
.IX  archive  "ar command"  ""  "\fLar\fP \(em library maintenance"
.IX  "library management"  "ar command"  ""  "\fLar\fP \(em library maintenance"
.IX  "object code management"  "ar command"  ""  "\fLar\fP \(em library maintenance"
.IX  "programming tools"  "maintain object libraries"
.LP
.B ar
maintains groups of files combined into a single archive file.
An archive file comprises a set of
member files and header information for each file.
The archive header and the headers for the file consist of printable
characters
(assuming that the names of the files in the archive contain printable
characters),
and are in a format portable across all machines.
This format is described in detail in
.BR ar (5)).
If an archive is composed of printable files, with printable file names,
the entire archive is printable.
.LP
.B ar
is normally used to create and update library files used by the
link editor
.BR ld (1),
but can be used for any similar purpose.
.LP
.I archive
is the name of the archive file.
.I member-file
is a member file contained in the archive. 
If this argument is omitted, the command applies to all entries
in the archive.  Member names have a maximum of 15 characters,
except on Sun386i systems, where they have a
maximum of 14 characters, longer names are truncated.
.SH SYSTEM V DESCRIPTION
.B ar
runs
.B ranlib
after modifying an archive, so that the symbol table member of the
archive is kept up-to-date.
.SH OPTIONS
You must indicate only one of:
.BR d ,
.BR m ,
.BR p ,
.BR q ,
.BR r ,
.BR t ,
or
.BR x ,
which may be followed by one or more
.BR Modifiers .
.TP
.B d
Delete the named files from the archive file.
.TP
.B m
Move the named files to the end of the archive.
.TP
.B p
Print. If no names are given, all files in the archive are written to the
standard output; if no names are given, only those files are written, and they
are written in the order that they appear in the archive.
.TP
.B q
Quick append. Append the named files to the end of the archive file
without searching the archive for duplicate names.
Useful only to avoid
quadratic behavior when creating a large archive piece-by-piece.
If this option is used to add a member to an archive, and a member with the
same name as that member already exists in the archive, the old member will
not be removed; two members with the same name will exist in the archive.
.TP
.B r
Replace the named files in the archive.
.TP
.B t
Table of contents.
If no names are given, all files in the archive are listed;
if names are given, only those files are listed.
.TP
.B x
Extract. If no names are given, all files in the archive
are extracted into the current directory; if names are given,
only those files are extracted. In neither case does
.B x
alter the archive file.
.LP
.SS Modifiers
.TP
.B c
Create.
Suppress the message that is produced by default when
.I archive
is created.
.TP
.B l
Local.
Place temporary files in the current working directory rather than
in the default temporary directory,
.BR /tmp .
.TP
.B o
Old date.
When files are extracted with the
.B x
option, set the ``last modified'' date to the date recorded in the archive.
.TP
.B u
Update.
Replace only those files that have changed since they were put in the
archive.  Used with the
.B r
option.
.TP
.B v
Verbose.
When used with the
.BR r ,
.BR d ,
.BR m ,
or
.B q
option, give a file-by-file description of the creation of a
new archive file from the old archive and the constituent files.
When used with
.BR x ,
give a file-by-file description of the extraction of archive files.
When used with
.BR t ,
give a long listing of information about the
files.  When used with
.BR p ,
write each member's name to the standard output before writing the member
to the standard output.
.TP
.BI a " position-name"
Place new files after
.I position-name
.RI ( position-name
argument must be present).
Applies only to the
.B r
and
.B m
options.
.TP
.BI b " position-name"
Place new files before
.I position-name
.RI ( position-name
argument must be present).
Applies only to the
.B r
and
.B m
options.
.TP
.BI i " position-name"
Identical to the
.B b
modifier.
.SH SYSTEM V OPTIONS
.LP
The options may be preceded by
.RB ` \- '.
.SS Modifiers
.TP
.B s
Force the regeneration of the archive symbol table even if
.B ar
is not invoked with a command that will modify the archive contents.
.SH EXAMPLES
.LP
Creating a new archive:
.RS
.nf
.ft B
example% ar rcv archive file.o
a \- file.o
.ft R
.RE
.br
.ne 4
Adding to an archive:
.RS
.ft B
example% ar rav file.o archive next.c
a \- next.c
.ft R
.RE
Extracting from an archive:
.RS
.ft B
example% ar xv archive file.o
x \- file.o
example% ls file.o
file.o
.ft R
.RE
Seeing the table of contents:
.RS
.ft B
example% ar t archive
file.o
next.c
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.BR /tmp/v* .
temporary files
.TP
.B /tmp
.PD
.SH "SEE ALSO"
.BR ld (1),
.BR lorder (1),
.BR ranlib (1),
.BR ar (5)
.SH BUGS
.LP
If the same file is mentioned twice in an argument list,
it is put in the archive twice.
.LP
The ``last-modified'' date of a file will not be altered by the
.B o
option unless the user is either the owner of the extracted file or the
super-user.

.SH NAME
ar \- create library archives, and add or extract files
.SH SYNOPSIS
.B ar
.BR d " | " m " | "
.BR p " | " q " | "
.BR r " | " t " | " x
[ [
.B clouv
]
[
.BR abi
.I position-name
] ]
.I archive
[
.IR member-file .\|.\|.
]
.SH SYSTEM V SYNOPSIS
.B ar
.RB [ \- ]
.BR d " | " m " | "
.BR p " | " q " | "
.BR r " | " t " | " x
[ [
.B clouvs
]
[
.BR abi
.I position-name
] ]
.I archive
[
.IR member-file .\|.\|.
]
.SH DESCRIPTIO./share/man/man1/arch.1                                                                                755       0      12         4711  4424740627   7714                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)arch.1 1.9 89/03/27 SMI; from UCB 4.1
.TH ARCH 1 "22 March 1989"
.SH NAME
arch \- display the architecture of the current host 
.SH SYNOPSIS
.B arch
.br
.B arch \-k
.br
.BI arch " archname"
.SH DESCRIPTION
.IX "arch command"  ""  "\fLarch\fP \(em display Sun architecture"
.IX display  "architecture of current Sun host"
.LP
.B arch
displays the application architecture of the
current host system.
.LP
Sun systems can be broadly classified by their
.IR architectures ,
which define what executables will run
on which machines.
A distinction can be made between
.I kernel architecture
and 
.I application architecture
(or, commonly, just \(lqarchitecture\(rq).
Machines which run different kernels due to underlying
hardware differences may yet be able to run the same
application programs. 
For example, the MC68020-based
Sun-3/160 system
and the MC68030-based Sun-3/80 system run different
Sun\s-1OS\s+1 
kernels, but can execute the same applications.
One could describe these machines as having \(lqthe
same application architecture\(rq but \(lqdifferent kernel architectures.\(rq
.LP
Executing
.B arch
will display the application architecture of the machine, such as
.BR sun3 ,
.BR sun4 ,
etc.
All machines of the same application architecture will
execute the same application programs, or
user
binaries.
.SS Current Architectures
.sp 2
.TS
tab (^), center, box;
cB | cB | cb
c  | c  | c.
Application architecture^Kernel architecture^Current Sun System Models
_
sun2^sun2^2/50, 2/120
_
sun3^sun3^3/50, 3/60, 3/75, 3/110, 3/140, 3/160, 3/180, 3/260, 3/280
_
sun3^sun3x^3/80, 3/460, 3/470, 3/480
_
sun4^sun4^4/110, 4/260, 4/280, SPARCsystem 330
_
sun386^sun386^386\fIi\fP/150, 386\fIi\fP/250
.TE
.SH OPTIONS
.TP 10
.B \-k
Display the kernel architecture,
such as
.BR Sun3 ,
.BR Sun3x ,
etc.
This defines which specific
Sun\s-1OS\s+1
kernel will run on the machine,
and has implications only for programs
that depend on the kernel explicitly (for example,
.BR ps (1),
.BR vmstat (1),
etc.).
.TP
.I archname
Return \(lqtrue\(rq (exit status 0) if 
user
binaries for
.I archname
can run on the current host system,
otherwise, return \(lqfalse\(rq (exit status 1).
This is the preferred method for installation
scripts to determine the environment
of the host machine; that is, which architecture of a multi-architecture
release to install on this machine.
.I archname
must be a valid application architecture.
.SH SEE ALSO
.BR mach (1),
.BR machid (1)
.LP
.I "Installing the SunOS 4.0.3"

 
fdformat.1   	,    fg.1 1 s  	@    fgrep.1v./share/man/man1/as.1                                                                                  755       0      12        13240  4424740627   7417                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)as.1 1.35 89/03/26 SMI; from UCB 4.2
.TH AS 1 "18 February 1988"
.SH NAME
as \- Sun-1, Sun-2 and Sun-3, Sun-4 and Sun386i assemblers
.SH "SUN-1, SUN-2 and SUN-3 SYNOPSIS"
.B as
[
.B \-L
] [ 
.B \-R
] [ 
.BI \-o " objfile"
] [ 
.B \-d2
] 
.\"[
.\".B \-e
.\"]
[ 
.B \-h
] [ 
.B \-j
] [ 
.B \-J
] [
.B \-O
]
[
.B \-mc68010
]
.if n .ti +.5i
[
.B \-mc68020
]
.I filename
.SH "SUN-4 SYNOPSIS"
.\" The Sun-4 assembler also supports these flags, which are not intended for
.\" appearance in user documentation:
.\"	-d			turn on assembler/optimizer debugging output
.\"	-da			turn on storage allocation statistics output
.\"	-V			display version# and quit
.\"	-F[O][if]\fIn\fP	select which fab of chips to generate code for
.\"	-Os			report optimizer statistics
.\"	-O[~][A-Z]		selectively turn on/off individual optimizations
.\"	-S[~][lrs]		select inclusion of line#s, register live/dead/
.\"					use info, and node-sequence#s in
.\"					disassembly.
.\" Some of the above may only be available when the assembler is compiled with
.\" the -DDEBUG flag.
.B as
[
.B \-L
] [ 
.B \-R
] [ 
.BI \-o " objfile"
] [
.BI \-O\fR[ n\fR]\|]
[
.B \-P
[\|[
.BI \-I path
] [
.BI \-D name
] [
.BI \-D name=def
]
.if n .ti +.5i
[
.BI \-U name
]\|]\|.\|.\|.\|]
.if t .ti +.5i
[
.BR \-S [ C ]\|]
.\"[
.\".B \-V
.\"]  
.I filename
\&.\|.\|.
.SH Sun386i SYNOPSIS
.B as
[
.B \-k
]
[ 
.B \-o
.I objfile
] 
[ 
.B \-R
] 
[
.B \-V
]
[
.B \-i386
]
.SH DESCRIPTION
.IX  as  ""  "\fLas\fP \(em assembler"
.IX  "programming languages"  "assembler"
.LP
.B as
translates the assembly source file,
.I filename  
into an executable object file,
.IR objfile .
The Sun-4 assembler recognizes the filename argument
.RB ` \- '
as the standard input.
.LP
All undefined symbols in the assembly are treated as global.
.LP
The output of the assembly is left in the file
.IR objfile .
.SH OPTIONS
.LP
The following options are common to all Sun architectures.  Options
for specific Sun architectures are listed below.
.TP
.B \-L
Save defined labels beginning with an
.BR L ,
which are normally discarded
to save space in the resultant symbol table.
The compilers generate many such temporary labels.
.TP
.B \-R
Make the initialized data segment read-only by concatenating 
it to the text segment.
This eliminates the need to run editor scripts on assembly
code to make initialized data read-only and shared.
.TP
.BI \-o " objfile"
The next argument is taken as the name of the object file to
be produced.  If the 
.B \-o
flag is not used, the object file is named
.BR a.out .
.SS Sun-1, Sun-2 and Sun-3 Options
.TP
.B \-d2
Instruction offsets that involve forward or external
references, and with unspecified size, are two bytes long.
(See also the 
.B \-j
option.)
.\".TP
.\".B \-e
.\"Allow control sections to begin on any two-byte boundary,
.\"rather than only on four-byte boundaries.
.TP
.B \-h
Suppress span-dependent instruction calculations.  Restrict branches
to medium length.  Force calls to take the most general form.  
This option is used when the assembly must be minimized, even at
the expense of program size and run-time performance.  It
results in a smaller and faster program than one produced by the
.B \-J
option, but some very large programs may be unable to use it due
to the limits of medium-length branches.
.TP
.B \-j
Use short (pc-relative) branches to resolve jump and jump-to-subroutine
instructions to external routines.  This is for compact programs for
which the
.B -d2
option is inappropriate due to large-program relocation.
.TP
.B \-J
Suppress span-dependent instruction calculations and force branches 
and calls to take the most general form.  This is useful when assembly
time must be minimized, even at the expense of program size and
run-time performance.
.TP
.B \-O
Perform span-dependent instruction resolution over entire files
rather than just individual procedures.
.SS Sun-4 Options
.TP
.BI \-O\fR[ n\fR]
Enable peephole optimization corresponding to optimization level
.I n
(1 if
.I n
not specified)
of the Sun high-level language compilers.
This option can be used safely only when assembling code produced
by a Sun compiler.
.TP
.B \-P
Run
.BR cpp (1),
the C preprocessor, on the files being assembled.
The preprocessor is run separately on each input file,
not on their concatenation.
The preprocessor output is passed to the assembler.
.br
.ne 8
.PD 0
.TP
.BI \-I path
.TP
.BI \-D name
.TP
.BI \-D name=def
.TP
.BI \-U name
.PD 
When 
.B \-P
is in effect, these
.BR cpp (1)
options are passed to the C
preprocessor, without interpretation by
.BR as .
Otherwise, they are ignored.
.TP
.BR \-S [ C ]
Produce a disassembly of the emitted code to the standard output.
This is most useful in combination with the
.B \-O
option, to review optimized code.  Adding the character C
to the option prevents comment lines from appearing in the output.
.\".TP
.\".B \-V
.\"Report assembler version information and exit without
.\"assembling.
.SS Sun386i Options
.TP
.B \-k
Create position independent code. Called by
.BR "cc \-pic" .
.TP
.B \-V
Write the version number of the assembler being run
on the standard error output.
.TP
.B \-i386
Confirm that this output is intended for an 80386 processor.
.SH FILES
.PD 0
.TP 20
.B /tmp/as\(**
default temporary file
.PD
.SH "SEE ALSO"
.BR adb (1),
.BR cpp (1),
.BR dbx (1),
.BR ld (1),
.BR a.out (5)
.BR coff (5)
.LP
.TX 4ASSY
.br
.TX ASSY
.SH BUGS
.LP
The Sun Pascal compiler qualifies a nested procedure name by
chaining the names of the enclosing procedures.  This sometimes results in
names long enough to abort the Sun-1/2/3 assembler, which 
currently limits identifiers to 512 characters
(the Sun-4 assembler does not have this restriction).
.SH Sun386i CAVEATS
There can be only one forward-reference to a symbol per arithmetic
expression.
  D  
printenv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1 1   0  H  ps.1    @  I  ptx.1    P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1 ./share/man/man1/at.1                                                                                  755       0      12        13575  4424740630   7425                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)at.1 1.22 89/03/26 SMI; from UCB 4.3 and S5R3
.tr ~
.TH AT 1 "26 March 1989"
.SH NAME
at, batch \- execute a command or script at a specified time
.SH SYNOPSIS
.B at
.RB [ " \-csm " ]
.I time
[
.I date
]
[
.B +
.I increment
]
.if n .in +0.5i
.RI [ " script " ]
.br
.in
.B at
.B \-r
.IR jobs ...
.br
.B at
.B \-l
[
.IR jobs ...
]
.LP
.B batch
.RB [ " \-csm " ] 
.RI [ " script " ]
.SH DESCRIPTION
.IX  at  ""  "\fLat\fP \(em do job at specified time"
.IX  "timed event services"  "at command"  ""  "\fLat\fP \(em do job at specified time"
.IX "delayed execution" "add job to queue \(em \fLat\fR"
.B at
and
.B batch
read commands from standard input to be
executed at a later time.
.B at
allows you to specify when the commands should be executed,
while jobs queued with
.B batch
will execute as soon as the
system load level permits.
.I script
is the name of a file to be used as command input for the 
Bourne shell, 
.BR sh (1),
the C shell,
.BR csh (1),
or an arbitrary shell specified by the
.SM SHELL
environment variable.
If
.I script
is omitted, command input is accepted from the standard input.
.LP
Standard output and standard error output are
mailed to the user unless they are redirected elsewhere.
The shell environment variables, current directory,
and
.BR umask (2)
are retained when the commands are executed.
Open file descriptors, traps, and priority are lost.
.LP
Users are permitted to use
.B at
if their name appears in the file
.BR /var/spool/cron/at.allow .
If that file does not exist, the file
.B /var/spool/cron/at.deny
is checked to determine if the user
should be denied access to
.BR at .
If neither file exists, only the super-user is allowed to
submit a job.
If
.B at.deny
is empty, global usage is permitted.
The allow/deny files consist of one user name
per line.
.LP
The
.I time
may be specified as 1, 2, or 4 digits.
One and two digit numbers are taken to be hours,
four digits to be hours and minutes.
The time may alternately be specified as two numbers
separated by a colon, meaning
.IB hour : minute.
A suffix
.B am
or
.B pm
may be appended;
otherwise a 24-hour clock time is understood.
The suffix
.B zulu
may be used to indicate
.SM GMT.
The special names
.BR noon ,
.BR midnight ,
.BR now ,
and
.B next
are also recognized.
.LP
An optional
.I date
may be specified as either
a month name followed by a day number
(and possibly year number preceded by an optional comma) or
a day of the week (fully spelled or abbreviated to three characters).
Two special ``days'',
.B today
and
.B tomorrow
are recognized.
If no
.I date
is given,
.B today
is assumed if the given hour is greater than the current hour
and
.B tomorrow
is assumed if it is less.
If the given month is less than the current month (and no year is
given), next year is assumed.
.LP
The optional
.I increment
is simply
a number
suffixed by one of the following:
.BR minutes ,
.BR hours ,
.BR days ,
.BR weeks ,
.BR months ,
or
.BR years .
(The singular form is also accepted.)
.LP
Thus legitimate commands include:
.LP
.RS
.ft B
at 0815am Jan 24
.br
at 8:15am Jan 24
.br
at now + 1 day
.br
at 5 pm Friday
.ft R
.RE
.LP
.B at
and
.B batch
write the job number and schedule time to standard
error.
.LP
.B batch
submits a batch job.
It is almost equivalent to
.RB ` "at now" ',
but not quite.  For one, it goes into a different queue.
For another,
.RB ` "at now" '
will respond with the
error message
.RB ` "too late" '.
.SH OPTIONS
.TP 10
.B \-c
C shell.  
.BR csh 
is used to execute
.I script.
.TP
.B \-s
Standard (Bourne) shell.
.BR sh 
is used to execute the job.
By default,
the
.SM SHELL
environment variable determines which shell to use.
.TP 10
.B \-m
Mail.  Send mail after the job has been run, even if the job
completes successfully.
.TP
\fB\-r\fI jobs\fR .\|.\|.
Remove the specified
.I jobs
previously scheduled by
.B at
or
.BR batch .
The job numbers are the numbers of the jobs
given to you previously by the
.B at
or
.B batch
commands.
You can only remove your own jobs unless you are the super-user.
.TP
\fB\-l\fR [\fI\|jobs\fR .\|.\|.\|]
If
.I jobs
is specified, print the queue entry for those
.IR jobs ;
if
.I jobs
is not specified, print the queue entries for all jobs for the user.
.SH ENVIRONMENT
If neither
.B at.allow
nor
.B at.deny
exists, only the super-user is allowed to
submit a job.
If
.B at.deny
is present, but empty, global usage is permitted.
The allow/deny files consist of one user name
per line.
.SH EXAMPLES
Unless a
.I script
is specified, the
.B at
and
.B batch
commands read
from standard input the commands to be executed
at a later time.
.B sh
and
.B csh
provide different ways of specifying standard input.
Within your commands, it may be useful to redirect standard output.
.LP
This sequence can be used at a terminal:
.LP
.RS
.nf
.B batch
.BI nroff " filename " > " outfile "
\s-1CTRL-D\s0 (hold down `control' and depress `D')
.RE
.fi
.LP
This sequence, which demonstrates redirecting standard
error to a pipe, is useful in a shell procedure (the sequence of
output redirection specifications is significant):
.LP
.RS
.B batch <<!
.br
.BI "nroff " filename " 2>&1 > " outfile
.BI " |  mail " loginid
.br
.B !
.RE
.LP
To have a job reschedule itself, invoke
.B at
from within the
shell procedure, by including code similar
to the following within the shell file:
.IP
.BI "at 1900 thursday next week " shellfile
.LP
.SH FILES
.PD 0
.TP 25
.B /var/spool/cron
main cron directory
.TP
.B /var/spool/cron/at.allow
list of allowed users 
.TP
.B /var/spool/cron/at.deny
list of denied users 
.TP
.B /var/spool/cron/atjobs
spool area
.PD
.SH SEE ALSO
.BR atq (1),
.BR atrm (1),
.BR csh (1),
.BR kill (1),
.BR mail (1),
.BR nice (1),
.BR ps (1),
.BR sh (1),
.BR umask (2),
.BR cron (8)
.SH DIAGNOSTICS
Complaints about various syntax errors and times out of range.
.SH BUGS
If the system crashes, mail stating that
the job was not completed is not sent to the user.
.LP
Shell interpreter specifiers (such as,
.BR !/bin/csh ) 
in the beginning of
.I script
are ignored.
8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1./share/man/man1/atq.1                                                                                 755       0      12         2547  4424740630   7563                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)atq.1 1.14 89/03/26 SMI; from UCB 6.2 5/10/86
.TH ATQ 1 "22 March 1989"
.SH NAME
atq \- display the queue of jobs to be run at specified times
.SH SYNOPSIS
.B atq
.RB [ " \-c " ] 
.RB [ " \-n " ] 
.IR username  .\|.\|. 
.SH DESCRIPTION
.B atq 
.IX  "atq command"  ""  "\fLatq\fP \(em display delayed execution queue"
.IX  "delayed execution"  "display queue \(em \fLatq\fP"
.IX  "display" "delayed execution queue \(em \fLatq\fP"
.IX  queue  "display delayed execution"  ""  "\fLatq\fP \(em display delayed execution"
prints the queue of jobs, created with the
.BR at (1)
command, that are waiting to be run at later date.  
.LP
With no flags, the queue is sorted in chronological 
order of execution.
.PP
If no usernames are specified, the entire queue is 
displayed; otherwise,
only those jobs belonging to the named users are displayed.
.SH OPTIONS
.TP
.B \-c
Creation time.  Sorted the queue by the time that the 
.BR at
command was given, the most recently created job first. 
.TP
.B \-n
Number of jobs.  Print the total number of jobs currently
in the queue.  Do not list them.
.SH FILES
.TP 15
.B /var/spool/cron
spool area
.SH "SEE ALSO"
.BR at(1),
.BR atrm(1),
.BR cron(8)
  dbx.1 v       	dbxtool.1       dc.1        dd.1        	default.1        delta.1       $ defaults_from_input../share/man/man1/atrm.1                                                                                755       0      12         3235  4424740630   7734                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)atrm.1 1.15 89/03/26 SMI; from UCB 6.2 5/10/86
.TH ATRM 1 "22 March 1989"
.SH NAME
atrm \- remove jobs spooled by at or batch
.SH SYNOPSIS
.B atrm
.RB [ " \-f\|i " ] 
.RB [ " \- " ] 
.RI [ " job-number " "] .\|.\|." 
.RI [ " username " "] .\|.\|."
.SH DESCRIPTION
.IX  "atrm command"  ""  "\fLatrm\fP \(em remove delayed execution jobs"
.IX  remove "delayed execution jobs \(em \fLatrm\fP"
.IX  "delete delayed execution jobs"  ""  "delete delayed execution jobs \(em \fLatrm\fP"
.IX  "delayed execution" "remove jobs from queue"  ""  "remove jobs from queue \(em \fLatrm\fP"
.IX  queue  "remove jobs from delayed execution"  ""  "remove jobs from delayed execution \(em \fLatrm\fP"
.B atrm
removes delayed-execution jobs that were created with the
.BR at (1)
command.  The list of jobs can be displayed by
.BR atq (1).
.LP
.B atrm
removes each 
.I job-number
you specify, and/or all jobs belonging to 
.IR username ,
provided that you own the indicated jobs.
.PP
Jobs belonging to other users can only be removed
by the super-user.
.SH OPTIONS
.TP
.B \-f 
Force.  All information regarding the 
removal of the specified jobs is suppressed.
.TP
.B \-i
Interactive.
.B atrm
asks if a job should be removed; 
a response of
.B  y
verifies that the job is to be removed.
.TP
.B \- 
Remove jobs that were queued by the current user.
If invoked by the super-user, the entire queue will be flushed.
.SH FILES
.TP 15
.B /var/spool/cron
spool area
.SH "SEE ALSO"
.BR at (1),
.BR atq (1),
.BR cron (8)
\fLatrm\fP"
.IX  "delayed execution" "remove jobs from queue"  ""  "remove jobs from queue \(em \fLatrm\fP"
.IX  queue  "remove jobs from delayed execution"  ""  "remove jobs from delayed execution \(em \fLatrm\fP"
.B atrm
removes delayed-execution jobs that were created with the
.BR at (1)
command.  The list of jobs can be displayed by
.BR atq (1).
.LP./share/man/man1/awk.1                                                                                 755       0      12        20127  4424740630   7572                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)awk.1 1.25 89/03/26 SMI; from UCB 4.3 BSD
.TH AWK 1 "22 March 1989"
.SH NAME
awk \- pattern scanning and processing language
.SH SYNOPSIS
.B awk
[
.BI \-f " program-file"
] 
[
.BI \-F c
] 
[ 
.I program
] 
[ 
.I variable
.BI = "value\fR \.\|.\|. ]"
[
.IR filename \.\|.\|.\|]
.SH DESCRIPTION
.IX  awk  ""  "\fLawk\fP \(em scan and process patterns"
.IX  "text processing utilities"  "awk command"  ""  "\fLawk\fP \(em scan and process patterns"
.LP
.B awk
scans each of its input
.IR filename s
for lines that match any of a set of patterns specified in
.IR program .
The input
.IR filename s
are read in order; the standard input is read if there are no
.IR filename s.
The filename
.RB ` \- '
means the standard input.
.LP
The set of patterns may either appear literally on 
the command line as
.IR program ,
or, by using the
.RB ` "\-f \fIprogram-file\fP" '
option, the set of patterns may be in a 
.IR program-file ;
a
.I program-file
of
.RB ` \- '
means the standard input.
If the
.I program
is specified on the command line,
it should be enclosed in single quotes
.RB (\| \(fm \|)
to protect it from the shell.
.LP
.B awk
variables may be set
on the command line using arguments of the form
.I variable
.BI = "value\fR."
This sets the
.B awk
variable
.I variable
to
.I value
before the first record of the next
.I filename
argument is read.
.LP
With each pattern in 
.I program
there can be an associated action
that will be performed when a line of a 
.I filename
matches the pattern.
See the discussion below for the format of input lines and the 
.B awk
language.  Each line in each input
.I filename
is matched against the pattern portion of every pattern-action statement;
the associated action is performed for each matched pattern.
.SH OPTIONS
.LP
.TP
.BI \-f " program-file"
Use the contents of 
.I program-file
as the source for the 
.IR program .
.TP
.BI \-F c
Use the character 
.I c
as the field separator (\s-1FS\s0) character.  See
the discussion of 
.SM FS
below.
.SH USAGE
.SS Input Lines
.LP
An input line is made up of fields separated by white space.
The field separator can be changed by using
.SM FS
\(em see
.B Special Variable Names
below.
Fields are denoted
.BR $1 ,
.BR $2 ,
and so forth.
.B $0
refers to the entire line.
.SS Pattern-action Statements
.LP
A pattern-action statement has the form
.RS
.IB pattern " { " action " }"
.RE
A missing 
.I action
means copy the line to the output; a missing 
.I pattern
always matches.
.SS Action Statements
.LP
An 
.I action
is a sequence of 
.IR statement s.
A 
.I statement
can be one of the following:
.RS
.TP 20
.PD 0
\fBif (\fR \fIconditional\fR \fB)\fR \fIstatement\fR [ \fBelse\fR \fIstatement\fR ]
.TP
\fBwhile (\fR \fIconditional\fR \fB)\fR \fIstatement\fR
.TP
\fBfor (\fR \fIexpression\fR \fB;\fR \fIconditional\fR \fB;\fR \fIexpression\fR \fB)\fR \fIstatement\fR
.TP
.B break 
.TP
.B continue
.TP
\fB{\fR [ \fIstatement\fR ] .\|.\|.\fB}\fR
.TP
.IB variable " = " expression
.TP
\fBprint\fR [ \fIexpression-list\fR ] [ \fB> \fIexpression\fR ]
.TP
\fBprintf\fR \fIformat\fR [ \fB,\fR \fIexpression-list\fR ] [ \fB> \fIexpression\fR ]
.TP
.B next
skip remaining patterns on this input line 
.TP
.B exit
skip the rest of the input
.PD
.RE
.SS Format of the awk Language
.LP
.IR statement s
are terminated by semicolons, 
.SM NEWLINE
characters or right braces.
An empty 
.I expression-list
stands for the whole line.
.LP
.I expressions
take on string or numeric values as appropriate,
and are built using the operators
.BR + ,
.BR \- ,
.BR \(** ,
.BR / ,
.BR % ,
and concatenation (indicated by a blank).
The C operators
.B ++ ,
.B \-\|\- ,
.B += ,
.B \-\|= ,
.B \(**= ,
.B /= ,
and
.B %=
are also available in expressions.
.LP
.I variable
may be scalars, array elements (denoted 
.IB x " [ " i
.BR ] )
or fields.  Variables are initialized to the null string.
Array subscripts may be any string, not necessarily numeric,
providing a form of associative memory.
String constants are quoted \fB"\fR.\|.\|. \fB"\fR.
.LP
The 
.B print
statement prints its arguments on the standard output
(or on a file if 
.BI > filename
is present), separated by the current output field separator,
and terminated by the output record separator.
The 
.B printf
statement formats its expression list according to the
format template 
.I format
(see
.BR printf (3S)
for a description of the formatting control characters).
.SS Built In Functions
.LP
The built-in function 
.B length
returns the length of its argument
taken as a string, or of the whole line if no argument.
There are also built-in functions 
.BR exp ,
.BR log ,
.BR sqrt ,
and
.BR int ,
where 
.B int
truncates its argument to an integer.
.RB ` substr(
.IB s ,
.IB m ,
.I n
.BR ) '
returns the 
.IR n -character
substring of 
.I s
that begins at position
.IR m .
.RB ` sprintf
.BI ( format ,
.IB expression ,
.IB expression ,
.RB \|.\|.\|. ) '
formats the expressions according to the
.BR printf
format given by 
.IR format ,
and returns the resulting string.
.SS Patterns
.LP
Patterns are arbitrary Boolean combinations
.RB ( ! ,
\(bv\(bv,
.BR && ,
and parentheses) of regular expressions and relational expressions.
Regular expressions must be surrounded by slashes and are as in
.B egrep
(see
.BR grep (1)),
Isolated regular expressions in a pattern apply to the entire line.
Regular expressions may also occur in relational expressions.
.LP
A pattern may consist of two patterns separated by a comma;
in this case, the action is performed for all lines between an
occurrence of the first pattern and the next occurrence of the second.
.LP
A relational expression is one of the following:
.RS
.sp .5
.nf
.ft I
expression matchop regular-expression
expression relop expression
.ft R
.fi 
.RE
.LP
where a 
.I relop
is any of the six relational operators in C,
and a 
.I matchop
is either
.B ~
(contains) or
.B !~
(does not contain).
A conditional is an arithmetic expression, a relational expression,
or a Boolean combination of these.
.LP
The special pattern
.SB BEGIN
may be used to capture control before the
first input line is read, in which case
.SB BEGIN
must be the first pattern. The special pattern
.SB END
may be used to capture control after the last
input line is read, in which case
.SB END
must be the last pattern.
.SS Special Variable Names
.LP
A single character 
.I c
may be used to separate the fields by starting
the program with
.LP
	\fB\s-1BEGIN\s0 {\s-1FS\s0 = "\fIc\fB" }\fP
.LP
or by using the
.BI \-F c
option.
.LP
Other variable names with special meanings
include 
.BR \s-1NF\s0 ,
the number of fields in the current record;
.BR \s-1NR\s0 ,
the ordinal number of the current record;
.BR \s-1FILENAME\s0 ,
the name of the current input file;
.BR \s-1OFS\s0 ,
the output field separator (default blank);
.BR \s-1ORS\s0 ,
the output record separator (default 
.SM NEWLINE\s0);
and
.BR \s-1OFMT\s0 ,
the output format for numbers (default
.BR %.6g ).
.LP
.SH EXAMPLES
.LP
Print lines longer than 72 characters:
.RS
.sp .5
.nf
.B length > 72
.fi
.RE
.LP
Print first two fields in opposite order:
.RS
.sp .5
.nf
.B { print $2, $1 }
.fi
.RE
.LP
Add up first column, print sum and average:
.RS
.sp .5
.nf
.ft B
{ s += $1 }
\s-1END\s0	{ print "sum is", s, " average is", s/\s-1NR\s0 }
.ft R
.fi
.RE
.LP
Print fields in reverse order:
.RS
.sp .5
.nf
.B
{ for (i = \s-1NF\s0; i > 0; \-\|\-i) print $i }
.fi
.RE
.LP
Print all lines between start/stop pairs:
.RS
.sp .5
.nf
.B /start/, /stop/
.fi
.RE
.LP
Print all lines whose first field is different from previous one:
.RS
.sp .5
.nf
.B
$1 != prev { print; prev = $1 }
.fi
.RE
.SH SEE ALSO
.BR grep (1V),
.BR lex (1),
.BR sed (1V),
.BR printf (3S)
.LP
.TX TEXT
.SH BUGS
Input white space is not preserved on output if fields are involved.
.LP
There are no explicit conversions between numbers and strings.
To force an expression to be treated as a number add 0 to it;
to force it to be treated as a string concatenate the null string
(\fB"\^"\fP) to it.
.LP
There is no escape sequence that prints a double-quote.  A
workaround is to use the
.B sprintf
(see
.BR printf (3S))
function to store the character
into a variable by its 
.SM ASCII
sequence.
.IP
.ft B 
dq = sprintf("%c", 34)
.LP
Syntax errors result in the cryptic message
.RB ` "awk:  bailing out near line 1" '.
 though the 
.B \-w
command-line argument had been given.
.TP
.B l
Set the length in bytes (1, 2, or 4) of the object
referenced by 
.I :a
and
.I :w
to 
.IR address .
Default is 1. Sun386i systems only. 
.PD
.br
.ne 5
.SS Variables
.LP
Named variables are set initially by
.B adb
but are not used subsequently.
.PD 0
.TP 15
.B 0
The last value printed.
.TP
.B 1
The last offset part of an instruction source.
.TP
.B 2
The pre./share/man/man1/banner.1v                                                                             755       0      12         1040  4424740630  10414                                                                                                                                                                                                                                                                                                                                                                      .\"	@(#)banner.1v 1.12 89/03/26 SMI; from S5R2 6.2 9/2/83
.TH BANNER 1 "24 September 1987"
.SH NAME
banner \- display a string in large letters
.SH SYNOPSIS
.B /usr/5bin/banner
.I strings
.SH DESCRIPTION
.IX  banner  ""  "\fLbanner\fR \(em make posters"
.IX "System V commands" "\fLbanner\fR"
.LP
Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
.B banner
prints its arguments (each up to 10 characters long)
in large letters on the standard output.
.SH SEE ALSO
.BR echo (1V)
  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1 L  l  e  clear.1     f   clear_colormap.1       g   clear_functions.1      h  click.1     i  clock.1     j  	cluster.1     k  	cmdtool.1      l  cmp.1     m  col.1v   $  n  colcrt.1  $  8  o  coloredit.1   H  p  colrm.1   X  q  comb.1    h  r  comm.1    |  s  
compress.1 |    t  
continue.1     u  cp.1 1     v  ./share/man/man1/bar.1                                                                                 755       0      12        34713  4424740630   7562                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bar.1	1.15 89/03/26 SMI;
.TH BAR 1 "22 March 1989"
.SH NAME
bar \- create tape archives, and add or extract files
.SH SYNOPSIS
.B bar
[
.B \-
]
.B crxtu
[
.B 014578feovwbXlFmhpBisHSUZRTIN
] [
.I bar-file
] [
.I blocksize
]
.if n .ti +.5i
[
.I exclude-file
]
.if n .ti +.5i
.if t .ti +0.5i
[
.I string
]
[
.I target_directory
]
[
.I user_id
]
[
.I include-file
]
.I filename1
\&.\|.\|.
.if t .ti +.5i
[
.B \-C
.I dir filename
\&.\|.\|.
]\|.\|.\|.
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "bar command" "" "\fLbar\fP command\fP"
.IX "tape archives" "bar" "" "\fLbar\fP command"
.IX  "archive tapes" tar "" "\fLtar\fP"
.LP
.B bar
archives and extracts multiple files onto a single
.BR bar ,
file archive, called a
.IR bar-file .
It is quite similar to
.BR tar (5),
but it has additional function modifiers, can
read and write multiple volumes, and writes and reads a format
that is incompatible with
.BR tar
(see
.BR bar (5)).
A bar-file is usually a magnetic tape, but it can be any file.
.BR bar 's
actions are controlled by the first argument, the
.IR key ,
a string
of characters containing exactly one function letter from the set
.BR rxtuc ,
and one or more of the optional function
modifiers
listed below.  Other
arguments to
.B bar
are file or directory names that specify which
files to archive or extract.  In all cases, the appearance of a
directory name refers recursively to the files and subdirectories
of that directory.
.SH "FUNCTION LETTERS"
.TP 3
.B c
Create a new
.I bar-file
and write the named files onto it.
.TP 3
.B r
Write the named files on the end of the
.IR bar-file .
Note: this option
.I "does not work"
with quarter-inch archive tapes.
.TP 3
.B x
Extract the named files from the
.IR bar-file .
If a named file
matches a directory with contents written onto the tape, this
directory is (recursively) extracted.
The owner, modification time, and mode
are restored (if possible).  If no
.I filename
arguments are given, all files in the archive are extracted.  Note:
if multiple entries specifying the same file are on the tape, the
last one overwrites all earlier versions.
.TP 3
.B t
List the table of contents of the
.IR bar-file .
.TP 3
.B u
Add the named files to the
.I bar-file
if they are not there or if they have been modified since they
were last archived.  Note: this option
.I "does not work"
with quarter-inch archive tapes.
.SH "FUNCTION MODIFIERS"
.TP 3
.B 014578
Select an alternate drive on which the tape is mounted.  The numbers
.BR 2 ,
.BR 3 ,
.BR 6 ,
and
.B 9
do not specify valid drives.  The default is
.BR /dev/rmt8 .
.TP 3
.B f
Use the next argument as the name of the
.IR bar-file .
If
.B f
is omitted, use the device indicated by the
.SB TAPE
environment variable, if set.  Otherwise, use
.B /dev/rmt8
by default.
If
.I bar-file
is given as
.RB ` \- ',
.B bar
writes to the standard output or reads from
the standard input, whichever is appropriate.  Thus,
.B bar
can be used as the head or tail of a filter chain.
.B bar
can also be used
to copy hierarchies with the command:
.RS
.IP
.B
example% cd fromdir; bar cf \- . | (cd todir; bar xfBp \-)
.RE
.LP
.TP 3
.B e
If any unexpected errors occur
.B bar
will exit immediately with a
positive exit status.
.TP 3
.B o
Suppress information specifying owner and modes of
directories which
.B bar
normally places in the archive.
Such information makes former versions of
.B bar
generate an
error message like:
.RS
.IP
.BI < filename ">: cannot create"
.RE
.IP
when they encounter it.
.TP 3
.B v
Verbose.
Normally
.B bar
does its work silently; the
.B v
option displays the name of each file
.B bar
treats, preceded by the function
letter.  When used with the
.B t
function,
.B v
displays the
.I bar-file
entries in a form similar to
.RB ` "ls \-l '.
.TP 3
.B w
Wait for user confirmation before taking
the specified action.  If you use
.BR w ,
.B bar
displays the action to be taken followed by the
file name, and then waits for a
.B y
response to proceed.  No action is
taken on the named file if you type
anything other than a line beginning with
.BR y .
.TP 3
.B b
Use the next argument as the blocking factor for tape records.
The default blocking factor is 20 blocks.  The block size is determined
automatically when reading tapes (key letters
.B x
and
.BR t ).
This determination of the blocking factor
may be fooled when reading from a
pipe or a socket (see the
.B B
key letter below).  The maximum
blocking factor is determined only by the amount of memory available to
.B bar
when it is run.  Larger blocking factors result in
better throughput, longer blocks on nine-track
tapes, and better media utilization.
.TP 3
.B X
Use the next argument as a file containing a list of named files
(or directories) to be excluded from the
.I bar-file
when using the key letters
.RB ` c ',
.RB ` x ',
or
.RB ` t '.
Multiple
.B X
arguments may be used, with one
.I exclude-file
per argument.
.TP 3
.B l
Display error messages if all links to
archived files cannot be resolved.  If
.B l
is not used, no error messages are printed.
.TP 3
.B F
With one
.B F
argument specified, exclude
all directories named
.SM SCCS
from
.IR bar-file .
With two arguments
.BR \s-1FF\s0 ,
exclude all directories named
.SM SCCS\s0,
all files with
.B .o
as as their suffix,
and all files named
.BR errs ,
.BR core ,
and
.BR a.out .
.TP 3
.B m
Do not extract modification times of extracted files.
The modification time
will be the time of extraction.
.TP 3
.B h
Follow symbolic links as if they were
normal files or directories.  Normally,
.B bar
does not follow symbolic links.
.TP 3
.B p
Restore the named files to their original modes, ignoring the present
.BR umask (2).
Setuid and sticky information are also extracted if you are
the super-user.  This option is only useful with the
.B x
key letter.
.TP 3
.B B
Force
.B bar
to perform multiple reads (if necessary) so as to read exactly enough
bytes to fill a block.  This option exists so that
.B bar
can work across the Ethernet, since pipes and sockets return partial
blocks even when more data is coming.
.TP 3
.B i
Ignore directory checksum errors.
.TP 3
.B s
Force the ownership of extracted files to match the
.B bar
process's effective user
.SM ID
and group
.SM ID\s0.
.TP 3
.B H
The string of up to 128 characters is to be used as a volume
header
.SM ID\s0.
A volume header is written to each volume of the archive when
the
.B c
function letter is specified.  See
.BR bar (5)
for the volume header's format.
.IP
Use of the
.B H
function modifier when creating an archive allows
.B bar
to read volumes out of sequence.  When extracting a file that spans volumes,
.B bar
will identify the tape(s) it needs to extract the entire file.
If the wrong volume is inserted,
.B bar
issues a warning and prompts again
for the correct volume.
.TP 3
.B S
Place files specified for extraction in this target directory when used
with the
.B x
function letter.
.TP 3
.B U
Specify the user
.SM ID 
in the volume header when creating archive,
when the
.B H
function modifier is
used.  If the
.B c
function letter is specified and
a volume header exists,
.B bar
will verify that the user ids match before overwriting
.I bar-file
if the
.B N
modifier is specified.
.TP 3
.B Z
Specify compression.
.B bar
will compress files when used with the
.B c
function letter and will decompress files when used with the
.B x
function letter.
.B bar
will neither compress a compressed file, nor
decompress a decompressed file.
.TP 3
.B R
Read the volume header and print the information to stdout.
.TP 3
.B N
See if the user owns the media (uid matches that in the bar header) before
overwriting bar-file with the C key word.
.TP 3
.B T
When using the
.B x
or
.B t
function letters, terminate the search of the media after
all the files specified are extracted (for
.BR x )
or listed (for
.BR t ).
.br
.ne 7
.TP 3
.B I
Use the next argument as a file containing a list of named files, one
per line, to be included in the
.B bar
archive.
The include file expects filenames to be followed by a semicolon and newline
character.
.sp
In the case where excluded files (see
.B X
flag) also exist, excluded files take
precedence over all included files.
So, if a file is specified in both the
include and exclude files (or on the command line),
it will be excluded.
.SH OPTIONS
.TP 3
.BR \-C " dir filename"
In a
.B c
.RB ( create )
or
.B r
.RB ( replace )
operation,
.B bar
performs a
.B chdir
(see
.BR csh (1))
to that directory before interpreting filename.
This allows multiple directories not
related by a close common parent to be archived using short
relative path names.  For example, to archive files from
.B /usr/include
and from
.BR /etc ,
one might use:
.IP
.B
example% bar c \-C /usr  include \-C /etc  .
.LP
If you get a table of contents from the resulting
.BR bar-file ,
you will see something like:
.RS
.nf
.B include/
.B include/a.out.h
.IB "and all the other files in " "/usr/include .\|.\|./chown"
.IB "and all the other files in " /etc
.fi
.RE
.LP
Note: the
.B \-C
option only applies to
.I one
following directory name and
.I one
following file name.
.SH EXAMPLES
.LP
Here is a simple example using
.B bar
to create an archive of your
home directory on a tape mounted on drive
.BR /dev/rmt0 :
.RS
.LP
.nf
.B example% cd
.B example% bar cvf /dev/rmt0 .
.I messages
.fi
.RE
.LP
The
.B c
option means create the archive; the
.B v
option makes
.B bar
tell you what it's doing as it works;  the
.B f
option
means that you are specifically naming the file onto which the archive
should be placed 
.RB ( /dev/rmt0
in this example).
.LP
Here is another example:
.BR /dev/rmt0 :
.RS
.LP
.nf
.ft B
example% cd
example% bar cvfH /dev/rmt0 "\s-1THIS IS MY HEADER\s0"  .
.I "messages"
.ft R
.fi
.RE
.LP
As in the first example, the
.B c
option means create the archive; the
.B v
option makes
.B bar
tell you what it's doing as it works;  the
.B f
option
means that you are specifically naming the file onto which the archive
should be placed 
.RB ( /dev/rmt0
in this example).  The
.B H
option says to use the string
\fB"\s-1THIS IS MY HEADER\s0"\fR as the
.SM ID
field in the volume header.
.LP
Now you can read the table of contents from the archive like this:
.RS
.sp .5
.nf
.ft B
example%	bar  tvf  /dev/rmt0
.ta 28n +8n +12
(access  user-id/group-id	size 	mod. date 	filename)
.ft B
rw-r--r-- 1677/40 	2123	Nov  7 18:15:1985	./archive/test.c
\&.\|.\|.
example%
.ft
.fi
.RE
.LP
You can extract files from the archive like this:
.RS
.sp .5
.nf
.ft B
example% bar xvf /dev/rmt0
.I "messages"
.ft
.fi
.RE
.LP
If there are multiple archive files on a tape, each is separated
from the following one by an
.SM EOF
marker.
.B bar
does not read the
.SM EOF
mark on the tape after it finishes reading an
archive file because
.B bar
looks for a special header to decide
when it has reached the end of the archive.  Now if you try to use
.B bar
to read the next archive file from the tape,
.B bar
does not know enough to skip over the
.SM EOF
mark and tries to read the
.SM EOF
mark as an archive instead.  The result of this is an
error message from
.B bar
to the effect:
.IP
.B bar: blocksize=0
.LP
This means that to read another archive from the tape, you must
skip over the
.SM EOF
marker before sbarting another
.B bar
command.  You can accomplish this using the
.I mt
command, as shown
in the example below.  Assume that you are reading from
.BR /dev/nrmt0 .
.RS
.sp .5
.nf
.BI "example% bar xvfp /dev/nrmt0" " 	read first archive from tape"
.I messages
.BI "example% mt fsf 1" "	skip over the end-of-file marker"
.BI "example% bar xvfp /dev/nrmt0" " 	read second archive from tape"
.I messages
.B example%
.fi
.RE
.LP
Finally, here is an example using
.B bar
to transfer files across the Ethernet.
First, here is how to archive files
from the local machine
.RB ( example )
to a tape on a remote system
.RB ( host ):
.RS
.sp .5
.nf
.BI "example% bar cvfb  \-  20" " filenames " | rsh  host  dd of=/dev/rmt0  obs=20b"
.I messages
.B example%
.fi
.RE
.LP
In the example above, we are
.I creating
a
.I bar-file
with the
.B c
key letter, asking for
.I verbose
output from
.B bar
with the
.B v
option, specifying the name of the output
.I bar-file
using the
.B f
option (the standard output is where the
.I bar-file
appears, as indicated
by the
.B \-
sign), and specifying the blocksize (20) with the
.B b
option.
If you want to change the blocksize, you must change the blocksize
arguments both on the
.B bar
command
.I and
on the
.B dd
command.
.LP
Now, here is how to use
.B bar
to get files from a tape on the remote system back to the
local system:
.RS
.B example% rsh  \-n host  dd
.B "if=/dev/rmt0  bs=20b | bar xvBfb  \- 20"
.I filenames
.br
.I messages
.br
.B example%
.RE
.LP
In the example above, we are
.I extracting
from the
.I bar-file
with the
.B x
key letter, asking for
.I verbose output from
.B bar
with the
.B v
option, telling
.B bar
it is reading from a pipe with the
.B B
option, specifying the name of the input
.I bar-file
using the
.B f
option (the standard input is where the
.I bar-file
appears, as indicated
by the
.RB ` \- '
sign), and specifying the blocksize (20) with the
.B b
option.
.SH FILES
.PD 0
.TP 20
.B /dev/rmt?
half-inch magnetic tape interface
.TP
.B /dev/rar?
quarter-inch magnetic tape interface
.TP
.B /dev/rst?
.SM SCSI
tape interface
.TP
.B /tmp/bar*
.PD
.SH ENVIRONMENT
.TP 10
.SB TAPE
If specified, in the environment, the value of
.SB TAPE
indicates the default tape device.
.\" Sun386i
.SH NOTES
.B bar
will handle multiple volumes gracefully.  If a tape error is
encountered,
.B bar
issues a message on the standard error
requesting a new volume.
The presence of a new volume is confirmed when
.B bar
reads a line beginning with
.B Y
or
.B y
on the standard input; a line beginning with
.B N
or
.B n
aborts the archive; with any other character
.B bar
reissues the prompt.
.\" Sun386i
.SH "SEE ALSO"
.BR cpio (1),
.BR umask (2),
.BR bar (5),
.BR tar (5),
.BR dump (8),
.BR restore (8)
.SH BUGS
.LP
Neither the
.B r
option nor the
.B u
option can be used with quarter-inch archive tapes, since these tape
drives cannot backspace.
.LP
There is no way to ask for the
.IR n th
occurrence of a file.
.LP
The
.B u
option can be slow.
.LP
There is no way selectively to follow symbolic links.
.LP
When extracting tapes created with the
.B r
or
.B u
options, directory modification times may not be set correctly.
.LP
Files with names longer than 100 characters cannot be processed.
.LP
Filename substitution wildcards do not work for extracting
files from the archive.  To get around this, use a command of
the form:
.IP
.BI "bar xvf.\|.\|. /dev/rst0 `bar tf.\|.\|. /dev/rst0 | grep '" pattern \|'`
.LP
If you specify
.RB ` \- '
as the target file and the archive spans
volumes, the request for a new volume may get lost.
e that spans volumes,
.B bar
will identify the tape(s./share/man/man1/basename.1                                                                            755       0      12         2601  4424740630  10540                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)basename.1 1.13 89/03/26 SMI; 
.TH BASENAME 1 "22 March 1989"
.SH NAME
basename, dirname \- display portions of pathnames and filenames
.SH SYNOPSIS
.B basename
.I string
[
.I suffix
]
.br
.B dirname
.I string
.SH AVAILABILITY
.LP
The
.B dirname
command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  basename  ""  "\fLbasename\fP \(em deliver portions of path names"
.IX  files  "basename command"  ""  "\fLbasename\fP \(em strip affixes"
.IX  delete  "filename affixes \(em \fLbasename\fR"
.IX  remove  "filename affixes \(em \fLbasename\fR"
.IX  "strip filename affixes \(em \fLbasename\fR"
.B basename
deletes any prefix ending in
.B /
and the
.IR suffix ,
if present in
.IR string .
It directs the result to the standard output, and
is normally used inside substitution marks
.RB ( "\`\ \`" )
within shell procedures.
.LP
.B dirname
delivers all but the last level of the path name in
.IR string .
.SH EXAMPLES
.LP
This shell procedure invoked with the argument
.B /usr/src/bin/cat.c
compiles the named file and moves the output to
.B cat
in the current directory:
.RS
.B cc $1
.br
.B mv a.out \`basename $1 .c\`
.RE
.LP
The following example will set the shell variable
.B
.SM NAME
to
.BR /usr/src/cmd :
.RS
.B
.SM NAME\s0=`dirname /usr/src/cmd/cat.c`
.RE
.SH "SEE ALSO"
.BR sh (1)
$ defaults_from_input.1 fa  <     defaults_merge.1     \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1./share/man/man1/batch.1                                                                               755       0      12           60  4424740631  10004                                                                                                                                                                                                                                                                                                                                                                      .so man1/at.1
.\" @(#)batch.1 1.4 89/03/26 SMI;
  bg.1 c.1    N  	bgplot.1g tc    O  biff.1 1     P  
bin-mail.1      Q  break.1   $  R  	breaksw.1 1   4  S  cal.1 w.  H  T  
calendar.1    `  U  capitalize.1  `  p  V  case.1 1    W  cat.1v e    X  cb.1 at.    Y  cc.1v .1    Z  cd.1 c.1    [  cdc.1 .1    \  cflow.1     ]  chdir.1     ^  	checkeq.1 1     _  	checknr.1     `  chfn.1 .  (  a  chgrp.1   8  b  chkey.1 ./share/man/man1/bc.1                                                                                  755       0      12         7657  4424740631   7372                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bc.1 1.19 89/03/26 SMI; 
.TH BC 1 "22 March 1989"
.SH NAME
bc \- arbitrary-precision arithmetic language
.SH SYNOPSIS
.B bc
[
.B \-c
] [
.B \-l
] [
.IR filename .\|.\|.\
]
.SH DESCRIPTION
.IX  bc  ""  "\fLbc\fP \(em calculator language"
.IX  "programming tools"  "bc command"  ""  "\fLbc\fP \(em calculator language"
.LP
.B bc
is an interactive processor for a language which resembles C but provides
unlimited precision arithmetic.
.B bc
takes input from any files given, then reads the standard input.
.SH OPTIONS
.TP
.B \-c
Compile only.
.B bc
is actually a preprocessor for
.BR dc (1),
which it invokes automatically, unless the
.B \-c
(compile only) option is present.  In this case the
.B dc
input is sent to the standard output instead.
.TP
.B \-l
Is the name of an arbitrary precision math library.
.SH USAGE
.SS Comments
.LP
Enclosed in
.BR /\|* " and " *\|/ .
.SS Names
.LP
Simple variables:
.IR l ,
where,
.I l
is a lower-case letter.
.br
Array elements:
.IR l [ expression ],
where,
.I expression
is a legal
.B bc
expression.
.br
The words
.BR ibase ,
.BR obase ,
and 
.BR scale.
.SS Other Operands
Arbitrarily long numbers with optional sign and decimal point.
.PD 0
.RS
.TP 20
.BI ( expression )
.TP
.BI "sqrt (" expression )
.TP
.BI "length (" expression )
Number of significant decimal digits
.TP
.BI "scale ("  expression )
Number of digits right of decimal point
.TP
.IB l ( expression ,
.RB \|.\|.\|. ,
.IB expression ) 
.PD
.RE
.SS Operators
.RS
.PD 0
.TP 20
.B
+  \-  *  /  %  ^
.RB ( %
is remainder; 
.B ^
is exponent)
.TP
.B
++   \-\-
(prefix and postfix; apply to names)
.TP
.B
==  <=  >=  !=  <  >
.TP
.B
=  +=  \-=  *=  /=  %=  ^=
.PD
.RE
.SS Statements
.RS
.PD 0
.TP
.I expression
.HP 20
.BI { statement \|;
.RB \|.\|.\|. \|;
.IB statement }
.br
where,
.I statement
is a legal
.B bc
statement.
.TP
.BI "if (" expression ) statement
.TP
.BI while " ( " expression " ) " statement
.TP
\fBfor (\fI expression \fB\|; \fI expression \fB\|; \fIexpression \fB)\fI statement\fR
.TP
.B "null statement"
.TP
.B break
.TP
.B quit
.PD
.RE
.SS Function Definitions
.RS
.PD 0
.TP
.B define
.IB l " ( " l \|,\|.\|.\|.\|, \|l " ) {"
.br
.BI "auto " l " ,\|.\|.\|.\|, " l
.br
.IB "statement" " ;\|.\|.\|. " statement
.br
.BI "return ( " expression " ) }"
.PD
.RE
.SS "Functions in -l Math Library"
.RS
.PD 0
.TP "\w'The words ibase,obase, and scale.\ \ \ \ \  'u"
.BI s( \|x\| )
sine
.TP
.BI c( \|x\| )
cosine
.TP
.BI e( \|x\| )
exponential
.TP
.BI l( \|x\| )
log
.TP
.BI a( \|x\| )
arctangent
.TP
.BI j( \|n , \|x )
Bessel function
.PD
.RE
.LP
All function arguments are passed by value.
.LP
The value of a statement that is an expression is printed
unless the main operator is an assignment.
Either semicolons or newlines may separate statements.  Assignment to
.B scale
influences the number of digits to be retained on arithmetic
operations in the manner of
.BR dc (1).
Assignments to
.B ibase
or
.B obase
set the input and output number radix respectively.
.LP
The same letter may be used as an array, a function,
and a simple variable simultaneously.
All variables are global to the program.
`Auto' variables are pushed down during function calls.
When using arrays as function arguments
or defining them as automatic variables
empty square brackets must follow the array name.
.SH EXAMPLES
.LP
Define a function to compute an approximate value of the exponential function:
.nf
.ft B
scale = 20
define
e(x){
	auto a, b, c, i, s
	a = 1
	b = 1
	s = 1
	for(i=1; 1==1; i++){
		a = a*x
		b = b*i
		c = a/b
		if(c == 0) return(s)
		s = s+c
	}
}
.ft R
.fi
.LP
Print approximate values of the exponential
function of the first ten integers:
.LP
.nf
.ft B
	for(i=1; i<=10; i++) e(i)
.fi
.ft R
.LP
.SH FILES
.TP 20
.B /usr/lib/lib.b
mathematical library
.TP
.BR dc (1)
desk calculator proper
.SH "SEE ALSO"
.BR dc (1)
.\".LP
.\".TX GDBG
.SH BUGS
.\"No &&, \(or\|\(or, or ! operators.
.br
.B for
statement must have all three
.IR expression 's.
.br
.B quit
is interpreted when read, not when executed.
ger.1        login.1        	logname.1       logout.1    ./share/man/man1/bg.1                                                                                  755       0      12           70  4424740631   7314                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)bg.1 1.9 89/03/26 SMI; 
biff.1      P  
bin-mail.1      Q  break.1   $  R  	breaksw.1 $  4  S  cal.1 $  H  T  
calendar.1 H  `  U  capitalize.1  U  p  V  case.1 U    W  cat.1v `    X  cb.1 v 1    Y  cc.1v  e    Z  cd.1  t.    [  cdc.1 .1    \  cflow.1     ]  chdir.1     ^  	checkeq.1     _  	checknr.1     `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh./share/man/man1/bgplot.1g                                                                             755       0      12           65  4424740631  10366                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)bgplot.1g 1.5 89/03/26 SMI;
 
bin-mail.1      Q  break.1   $  R  	breaksw.1 $  4  S  cal.1 $  H  T  
calendar.1 H  `  U  capitalize.1  U  p  V  case.1 U    W  cat.1v U    X  cb.1 v `    Y  cc.1v  1    Z  cd.1   e    [  cdc.1 t.    \  cflow.1     ]  chdir.1     ^  	checkeq.1     _  	checknr.1     `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1 L  l  e  clea./share/man/man1/biff.1                                                                                755       0      12         3151  4424740631   7675                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)biff.1 1.19 89/03/26 SMI;
.TH BIFF 1 "22 March 1989"
.SH NAME
biff \- give notice of incoming mail messages
.SH SYNOPSIS
.B biff
[
.BR y \||\| n
]
.SH DESCRIPTION
.IX  biff  ""  "\fLbiff\fP \(em mail notifier"
.IX  "mail services"  "biff command"  ""  "\fLbiff\fP \(em mail notifier"
.IX  "reminder services"  "biff command"  ""  "\fLbiff\fP \(em mail notifier"
.LP
.B biff
turns mail notification on or off for the terminal session.
With no arguments,
.B biff
displays the current notification status for the terminal.
.LP
If notification is allowed, the terminal rings the bell and
displays the header and the first few lines of each arriving mail
message.
.B biff
operates asynchronously.  For synchronized notices, use the
.SB MAIL
variable of
.BR sh (1)
or the
.B mail
variable of
.BR csh (1).
.LP
A
.RB ` "biff y" '
command can be included in your
.B \&.login
or
.B \&.profile
file for execution when you log in.
.SH OPTIONS
.TP
.B y
Allow mail notification for the terminal.
.TP
.B n
Disable notification for the terminal.
.SH FILES
.PD 0
.TP 20
.B \&.login
.TP
.B \&.profile
.PD
.SH SEE ALSO
.LP
.BR cmdtool (1),
.BR csh (1),
.BR mail (1),
.BR sh (1),
.BR shelltool (1),
.BR sunview (1),
.BR comsat (8C)
.SH BUGS
You must have ownership the terminal to change its mail-notification
status with
.BR biff ,
but windows running under
.BR sunview (1)
are owned by the super-user.  If you enable mail notification
for the workstation console (in your 
.B \&.login
or 
.BR \&.profile 
file), incoming mail notices also appear on console windows running
under 
.BR sunview (1).
See
.BR shelltool (1)
or
.BR cmdtool (1)
for details.
 8    dirs.1 .  H    dis.1 rs  `    domainname.1  `  p    dos.1 .1      
dos2unix.1       du.1v ix      dumbplot.1g       e.1       echo.1v       ed.1 cho      edit.1 1       egrep.1v 1        eject.1        else.1 c  0    end.1 se  @    endif.1   P    endsw.1   d    enroll.1 .1   t    env.1 .1    ./share/man/man1/bin-mail.1                                                                            755       0      12        11024  4424740631  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bin-mail.1 1.29 89/03/26 SMI;
.TH BIN-MAIL 1 "25 March 1989"
.SH NAME
bin-mail, binmail \- an early program for processing mail messages
.SH SYNOPSIS
.B /usr/bin/mail
[
.B \-ipq
]
[
.B \-f 
.I filename
] 
.I address
.br
.B /usr/bin/mail
.\"[
.\".B \-d
.\"]
.\"[
.\".B \-i
.\"]
.\"[
.\".B \-r
.\".I name
.\"]
.I recipient
\&.\|.\|.
.SH DESCRIPTION
.IX  binmail  ""  "\fLbinmail\fP \(em version 7 mail"
.IX  "mail services"  "binmail command"  ""  "\fLbinmail\fP \(em version 7 mail"
.LP
Note: This is the old version 7
.SM UNIX
system mail program.  The default
.B mail
command,
.B /usr/ucb/mail
is described in
.BR mail (1).
.LP
.B /usr/bin/mail
with no
.I address
prints a user's mail, message-by-message
in last-in, first-out order.
.B /usr/bin/mail
accepts commands from the standard input to direct
disposition messages.
.LP
When
.IR address es
are named,
.B /usr/bin/mail
takes the standard input up to an
.SM EOF
(or a line with just
.RB ` . ')
and routes it through the mailer daemon to each
.IR recipient .
See
.BR sendmail (8)
for details.
The message is preceded by
the sender's name and a postmark.
Lines that look like postmarks are prepended with 
.RB ` > '.
A
.I recipient
is a user name recognized by
.BR login (1),
a network address or local mail alias, or a filename
(see
.BR aliases (5)
for details).
.LP
If there is any pending mail,
.B login
tells you there is mail when you log in.  It is also
possible to have the C shell,
or the daemon
.B biff
tell you about mail that arrives while you are logged in.
.LP
To forward mail automatically, add the addresses of additional 
recipients to the 
.B .forward
file in your home directory.  Note: forwarding addresses
must be valid, or the messages will bounce.  (You cannot, for
instance, reroute your mail to a new host by forwarding it to
your
new address if it is not yet listed in the 
.SM YP 
aliases domain.)
.\".SH OPTIONS
.\".LP
.\".SS Printing Mail
.\".TP "\w'm [ person ] . . . \ \ \ \ \ 'u"
.\".B \-r
.\"print in reverse order.
.\".TP
.\".BI \-h count\fR
.\"print in reverse order.
.SH OPTIONS
.TP 15
.B \-i
Ignore interrupts.
.TP
.B \-p
Print messages without prompting for commands.  Exit 
immediately upon receiving an interrupt.
.TP
.B \-q
Quit immediately upon interrupt.
.TP
.BI \-f " filename"
Use
.I filename
as if it were the mail file.
.\".TP
.\".B \-d
.\"deliver mail directly, don't route the message through
.\".BR sendmail .
.\"This option is often used by programs that send mail.
.\".TP
.\".B \-i
.\"continue after interrupts \(em an interrupt normally terminates the
.\".I /usr/bin/mail
.\"command and leaves the mail file unchanged.
.\".TP
.\"\fB\-r \fIname\fR
.\"specify a string to appear as the name of the sender.
.SH USAGE
.TP "\w'm [ person ] . . . \ \ \ \ \ 'u"
.B ?
Print a command summary.
.TP
.SM CTRL-D
Put unexamined mail back in the mail file and quit.
.TP
.BI ! command
Escape to the shell to do
.IR command .
.TP
.B \-
Go back to previous message.
.TP
.B +
Go on to next message.
.TP
.SB RETURN
Go on to next message.
.TP
.B d
Delete message and go on to the next.
.TP
.B dq
Delete message and quit.
.TP
.BI "m [" " recipient " ]
\&.\|.\|.
Mail the message to the named
.IR recipient s
(yourself is default).
.TP
.B n
Go on to next message.
.TP
.B p
Print message (again).
.TP
.B q
Same as
.SM EOT\s0 .
.br
.ne 8
.TP
.BI "s [" " filename" "]"
\&.\|.\|.
Save the message in the named
.IR filename s
.RB (` mbox '
default).  If saved successfully, remove it from
the list and go on to the next message.
.TP
.BI "w [" " filename " "] \fR.\|.\|.
Save the message, without a header, in the named
.IR filename s
.RB (` mbox '
default).  If saved successfully, remove it from
the list and go on to the next message.
.TP
.B x
Exit without changing the mail file.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
to identify sender and locate address
.TP
.B /var/spool/mail/*
incoming mail for user *
.TP
.B /usr/ucb/mail
routes input through daemon to 
.IR recipient s
.TP 
.B mbox
saved mail
.TP
.B /tmp/ma*
temp file
.TP
.B /var/spool/mail/*.lock
lock for mail directory
.TP
.B dead.letter
unmailable text is saved here
.TP
.B $\s-1HOME\s0/.forward
list of forwarding recipients
.PD
.SH "SEE ALSO"
.LP
.BR biff (1), 
.BR csh (1),
.BR des (1),
.BR login (1),
.BR mail (1),
.BR uucp (1C),
.BR uux (1C),
.BR write (1),
.BR xsend (1),
.BR crypt (3),
.BR aliases (5),
.BR sendmail (8)
.SH BUGS
.LP
Race conditions sometimes result in a failure to remove a lock file.
.LP
The super-user can read your mail, unless it is encrypted by
.BR des (1),
.BR xsend (1),  
or
.BR crypt (3).
Even if you encrypt it, the super-user can delete it.
.1    
    
lastcomm.1   
    ld.1 1    
    ldd.1 mm  
    leave.1   
    lex.1 1        limit.1       line.1         lint.1v   0    list.1    @    ln.1 1 t  P    load.1 t  `    loadc.1   x    lockscreen.1       $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,    lpq.1 ./share/man/man1/break.1                                                                               755       0      12           73  4424740632  10014                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)break.1 1.9 89/03/26 SMI; 
.1 w.  H  T  
calendar.1    `  U  capitalize.1  `  p  V  case.1 1    W  cat.1v e    X  cb.1 at.    Y  cc.1v .1    Z  cd.1 c.1    [  cdc.1 .1    \  cflow.1     ]  chdir.1     ^  	checkeq.1 1     _  	checknr.1     `  chfn.1 .  (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v .1   \  d  chsh.1 v  l  e  clear.1     f   clear_colormap.1  f    g   clear_functions.1 g./share/man/man1/breaksw.1                                                                             755       0      12           75  4424740632  10370                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)breaksw.1 1.8 89/03/26 SMI; 
dar.1 H  `  U  capitalize.1  U  p  V  case.1 `    W  cat.1v 1    X  cb.1 v e    Y  cc.1v t.    Z  cd.1  .1    [  cdc.1 .1    \  cflow.1     ]  chdir.1     ^  	checkeq.1     _  	checknr.1     `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1    l  e  clear.1     f   clear_colormap.1       g   clear_functions.1      h  click.1 ./share/man/man1/cal.1                                                                                 755       0      12         1422  4424740632   7526                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cal.1 1.11 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH CAL 1 "9 September 1987"
.SH NAME
cal \- display a calendar
.SH SYNOPSIS
.B cal
[ 
[ 
.I month 
] 
.I year 
]
.SH DESCRIPTION
.IX  cal  ""  "\fLcal\fP \(em display calendar"
.B cal
displays a calendar for the specified year.
If a month is also specified, a calendar for that month
only is displayed.
If neither is specified, a calendar for the present month is printed.
.LP
.I year
can be between 1 and 9999.  Be aware that
.RB ` "cal 78" '
refers to the early Christian era, not the 20th century.
Also, the year is always considered to start in January,
even though this is historically naive.
.LP
.I month
is a number between 1 and 12.
.LP
The calendar produced is that for England and her colonies.
.LP
Try September 1752.
io.1 1    w  cpp.1 io    x  	crontab.1  1    y  
crtplot.1g     z  crypt.1     {  csh.1 yp     |  csh_builtins.1    4  }  csplit.1 1 |  D  ~  ctags.1   X    ctrace.1 .1   h    cu.1c .1  x  ./share/man/man1/calendar.1                                                                            755       0      12         5055  4424740632  10546                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)calendar.1 1.15 89/03/26 SMI; from UCB 6.1 85/04/29
.TH CALENDAR 1  "22 March 1989"
.SH NAME
calendar \- a simple reminder service
.SH SYNOPSIS
.B calendar
[ 
.B \- 
]
.SH DESCRIPTION
.IX  calendar  ""  "\fLcalendar\fP \(em reminder service"
.IX  "timed event services"  "calendar command"  ""  "\fLcalendar\fP \(em reminder service"
.IX  "reminder services"  "calendar command"  ""  "\fLcalendar\fP \(em reminder service"
.LP
.B calendar 
consults the file
.B calendar
in the current directory and displays lines
that contain today's or tomorrow's date anywhere in the line.
Most reasonable month-day dates \(em such as `Dec. 7,' `december 7,' and
`12/7' \(em are recognized, but `7 December' or `7/12' are not.
If you give the month as
.RB ` * '
with a date \(em for example,
.RB `` "*\ \ 1" ''
\(em that day in any month will do.
On weekends \(lqtomorrow\(rq extends through Monday.
.LP
When the optional
.RB ` \- '
argument is present,
.B calendar
does its job for every user
who has a file
.B calendar
in his login directory
and sends him any positive results by
.BR  mail (1).
Normally this is done daily in the wee hours under control of
.BR cron (8).
.LP
The file
.B calendar
is first run through the C preprocessor,
.BR /lib/cpp ,
to include any other calendar files
specified with the usual
.B #include
syntax.
Included calendars are usually shared by all users,
and maintained by the system administrator.
.SH FILES
.PD 0
.TP 20
.B ~/calendar
.TP
.B /usr/lib/calendar
to figure out today's and tomorrow's dates
.TP
.B /etc/passwd
.TP
.B /tmp/cal*
.TP
.B /lib/cpp
.TP
.B /usr/bin/egrep
.TP
.B /usr/bin/sed
.TP
.B /usr/bin/mail
.PD
.SH "SEE ALSO"
.BR at (1),
.BR mail (1),
.BR aliases (5),
.BR cron (8)
.SH NOTES
.B calendar 
is no longer in the default root crontab. You have to edit
the crontab file to add it back if you want cron to schedule
.B calendar 
as before.
.SH BUGS
.LP
.BR calendar \|'s
extended idea of \(lqtomorrow\(rq does not account for holidays.
.\" Sun386i
.LP
Problems may occur when there is no
.B /etc/passwd 
file on the local host.
.\" Sun386i
.LP
The 
.RB ` \- '
argument works only on calendar files that are local to the machine,
and does not work on calendar files that are mounted remotely with
.BR \s-1NFS\s0.
Thus, 
.RB ` "calendar \-" '
should be run only on diskful machines where home
directories exist;  running it on a diskless client has no effect.  
The calendar mail will be sent to the user at the machine on which 
.RB ` "calendar \-" '
is run.  If the user wants the mail to be sent to another 
machine, mail aliases should be set up properly.
date anywhere in the line.
Most reasonable month-day dates \(em such as `Dec. 7,' `december 7,' and
`12/7' \(em are recognized, but `7 December' or `7/12' are not.
If you give the month as
.RB ` * '
with a date \(em for example,
.RB `` "*\ \ 1" ''
\(em that day in any month will do.
On weekends \(lqtomorrow\(rq extends through Monday.
.LP
When the optional
.RB ` \- '
argument is present,
.B calendar
does its job for every user
who has a file
.B calendar
in his lo./share/man/man1/capitalize.1                                                                          755       0      12          103  4424740632  11067                                                                                                                                                                                                                                                                                                                                                                      .so man1/textedit_filters.1
.\" @(#)capitalize.1 1.5 89/03/26 SMI;
e    X  cb.1 at.    Y  cc.1v .1    Z  cd.1 c.1    [  cdc.1 .1    \  cflow.1     ]  chdir.1     ^  	checkeq.1 1     _  	checknr.1     `  chfn.1 .  (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v .1   \  d  chsh.1 v  l  e  clear.1     f   clear_colormap.1  f    g   clear_functions.1 g    h  click.1     i  clock.1     j  	cluster.1 1     k  	cmdtool.1 ./share/man/man1/case.1                                                                                755       0      12           72  4424740632   7642                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)case.1 1.8 89/03/26 SMI; 
     Y  cc.1v      Z  cd.1      [  cdc.1      \  cflow.1     ]  chdir.1     ^  	checkeq.1 di    _  	checknr.1 q.    `  chfn.1 c  (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v hke  \  d  chsh.1 o  l  e  clear.1     f   clear_colormap.1      g   clear_functions.1     h  click.1     i  clock.1     j  	cluster.1 oc    k  	cmdtool.1 r.     l  cmp.1 dt    m./share/man/man1/cat.1v                                                                                755       0      12         5435  4424740632   7734                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cat.1v 1.19 89/03/26 SMI; from UCB 4.2 BSD and S5r2
.TH CAT 1V "22 March 1989"
.SH NAME
cat \- concatenate and display 
.SH SYNOPSIS
.B cat
[
.B \-
] 
[
.B \-benstuv
] 
[ 
.IR filename .\|.\|.
]
.SH SYSTEM V SYNOPSIS
.B cat
[
.B \-
] 
[
.B \-estuv
]
[
.IR filename .\|.\|.
]
.SH DESCRIPTION
.IX "System V commands" "\fLcat\fR"
.IX  cat  ""  "\fLcat\fP \(em concatenate files"
.IX  "concatenate files \(em \fLcat\fP"
.IX  "text processing utilities"  "cat command"  ""  "\fLcat\fP \(em concatenate files"
.IX  files  "cat command"  ""  "\fLcat\fP \(em concatenate"
.LP
.B cat
reads each
.I filename
in sequence and displays it on the standard output.  Thus:
.IP
.B
example% cat goodies
.LP
displays the contents of
.B goodies
on the standard output, and
.IP
.B example%  cat  goodies1  goodies2  >  goodies3
.LP
concatenates the first two files and places the result on the third.
.LP
If no filename argument is given, or if the argument
.RB ` \- '
is given,
.B cat
reads from the standard input.  If the standard input is
a terminal, input is terminated by an 
.SM EOF
signal, usually
.SM CTRL-D\s0.
.SH OPTIONS
.TP
.B \-b
Number the lines, as
.BR \-n ,
but omit the line numbers from blank lines.
.TP
.B \-e
Display non-printing characters, as
.BR \-v ,
and in addition display a
.B $
character at the end of each line.
.TP
.B \-n
Precede each line output with its line number.
.TP
.B \-s
Substitute a single blank line for multiple adjacent blank lines.
.TP
.B \-t
Display non-printing characters, as
.BR \-v ,
and in addition display
.SM TAB
characters as 
.B ^\|I 
(\s-1CTRL-I\s0).
.TP
\-u
Unbuffered.
If
.B \-u
is not used, output is buffered in blocks, or
line-buffered if standard output is a terminal.
.TP
.B \-v
Display non-printing characters (with the exception of
.SM TAB
and
.SM NEWLINE
characters)
so that they are visible.  Control characters print like 
.B ^\|X
for
.SM CTRL-X\s0;
the
.SM DEL
character (octal 0177) print as
.RB ` ^\|? '.
Non-\s-1ASCII\s0 characters (with the high bit set) are displayed as 
.BI M\- x
where
.B M\-
stands for
.RB ` meta '
and
.I x
is the character specified by the seven low order bits.
.SH SYSTEM V OPTIONS
.TP
.B \-e
If the
.B \-v
option is specified, display a 
.B $
character at the end of each line.
.TP
.B \-s
Suppress messages about files which cannot be opened.
.TP
.B \-t
If the
.B \-v
option is specified, display
.SM TAB
characters as 
.B ^\|I
(\s-1CTRL-I\s0) and
.SM FORMFEED
characters as
.B ^\|L
(\s-1CTRL-L\s0).
.TP
.B \-v
Display non-printing character (with the exception of
.SM TAB\s0,
.SM NEWLINE,
and
.SM FORMFEED
characters) so that they are visible.
.SH "SEE ALSO"
.BR cp (1),
.BR ex (1),
.BR more (1),
.BR pg (1V),
.BR pr (1V),
.BR tail (1)
.SH BUGS
.LP
Beware of
.RB ` "cat a b > a" '
and
.RB ` "cat a b > b" ',
which destroy the input files before reading them.
 hostid.1        
hostname.1       	hpplot.1g       i386.1 e       	iAPX286.1        	iapx286.1   (    
iconedit.1 (  8    id.1 1 .  H    if.1 con  \    	implot.1g \  p  ./share/man/man1/cb.1                                                                                  755       0      12         2221  4424740633   7352                                                                                                                                                                                                                                                                                                                                                                      .\"	@(#)cb.1 1.20 89/03/26 SMI; from 4.2 BSD and S5R2 6.2 9/2/83
.TH CB 1 "22 March 1989"
.SH NAME
cb \- a simple C program beautifier
.SH SYNOPSIS
.B cb
[
.B \-js
]
[
.B \-l
.I leng
]
[
.IR filename .\|.\|.
]
.SH DESCRIPTION
.IX "code formatter" "\fLcb\fR \(em C source format filter"
.IX  cb  ""  "\fLcb\fP \(em format filter for C source files"
.IX  "languages"  "cb"  ""  "\fLcb\fP \(em format filter for C sources"
.LP
.B cb
reads C programs either from its arguments or from the standard input
and writes them on the standard output with spacing and indentation
that displays the structure of the code.  
.LP
.BR indent (1)
is preferred.
.SH OPTIONS
With no options, 
.B cb
preserves all user 
.SM NEWLINE
characters.  
.TP
.B \-j
Join.
Split lines are put back together.
.TP
.B \-s
Standard C style.  Formats the code to the style of
Kernighan and Ritchie in
.IR "The C Programming Language" .
.TP
.BI \-l " leng"
Split lines longer than
.IR leng .
.SH "SEE ALSO"
.BR indent (1)
.LP
B.W. Kernighan and D.M. Ritchie,
.IR "The C Programming Language" ,
Prentice-Hall, 1978
.SH BUGS
.LP
Punctuation hidden in preprocessor statements can cause indentation 
errors. 
$ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 efa      defaultsedit.1       deroff.1        des.1       df.1  it      diff.1 o      diff3.1v         diffmk.1         	dircmp.1v   (    	dirname.1 (  8    dirs.1 (  H    dis.1  1  `    domainname.1    p    dos.1     ./share/man/man1/cc.1v                                                                                 755       0      12        44102  4424740633   7565                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cc.1v 1.67 89/03/26 SMI;
.TH CC 1V "26 March 1989"
.SH NAME
cc \- C compiler
.SH SYNOPSIS
.B cc
[
.B \-a
]
.\"[
.\".BI \-A opt
.\"]
[
.B \-align
.BI _ block
]
[
.BI \-B binding
]
.\"[
.\".B \-B
.\"]
.\"[
.\".B \-bigsharedlib
.\"]
[
.B \-c
]
[
.B \-C
]
.if n .ti +5
[
.B \-dryrun
]
[
.BI \-D name
.RB [ =\fIdef\fR
] ]
.\"[
.\".B \-dl
.\"]
[
.B \-E
]
.if t .ti +.5i
[
.I float_option
]
.if n .ti +5
[
.B \-fsingle
]
.\"[
.\".B \-fsingle2
.\"]
[
.B \-g
]
[
.B \-go
]
[
.B \-help
]
.if n .ti +5
[
.BI \-I pathname
]
[
.B \-J
]
.if t .ti +.5i 
[
.BI \-L directory
]
.if n .ti +5
[
.B \-M
]
.\"[
.\".B \-mc68010
.\"]
.\"[
.\".B \-mc68020
.\"]
[
.B \-misalign
]
[
.B \-o 
.I outputfile
]
[
.BR \-O [\c
.IR level ]
]
.if n .ti +5
[
.B \-p
]
[
.B \-P
]
[
.B \-pg
]
[
.B \-pic
]
.if t .ti +.5i 
[
.B \-PIC
]
[
.B \-pipe 
]
.if n .ti +5
[
.B \-Qoption
.I prog opt
]
[
.B \-Qpath 
.I pathname
]
.if n .ti +5
[
.B \-Qproduce
.I sourcetype 
]
[
.B \-R
]
.if t .ti +.5i
[
.B \-S
]
.\"[
.\".B \-sharedlib
.\"]
.\"[
.\".BI \-sl library
.\"]
.\"[
.\".B \-sparc
.\"]
[
.I target_arch
]
.if n .ti +5
[
.BI \-temp= directory
]
[
.B \-time
]
[
.BI \-U name
]
[
.B \-w
]
.if n .ti +5
.I sourcefile
\&.\|.\|.
[
.BI \-l library
]
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/cc
.I arguments
.LP
Note:
.I arguments
to 
.B /usr/5bin/cc
are identical to those listed above.
.SH DESCRIPTION
.IX "System V commands" "\fLcc\fR"
.IX  cc  ""  "\fLcc\fP \(em C compiler"
.IX  "C compiler"
.IX  "programming languages"  "cc command"  ""  "\fLcc\fP \(em C compiler"
.IX  "languages"  "cc command"  ""  "\fLcc\fP \(em C compiler"
.IX  "compilers"  "cc command"  ""  "\fLcc\fP \(em C compiler"
.LP
.B cc
is the C compiler. 
It translates programs written in the C
programming language into executable load modules, or into relocatable
binary programs for subsequent loading with the
.BR ld (1)
link editor.
.LP
In addition to the many options,
.B cc
accepts several types of filename arguments.  For instance, files with 
names ending in
.B \&.c
are taken to be C source programs. 
They are compiled, and each 
resulting object program is placed in the current directory.  The 
object file is named after its source file \(em the suffix
.B \&.o
replacing 
.BR \&.c 
in the name of the object.
In the same way, files whose names end with
.B \&.s
are taken to be assembly source programs.
They are assembled, and produce
.B \&.o
files.  
Filenames ending in
.B \&.il
are taken to be inline expansion code template files; these are
used to expand calls to selected routines in-line when code
optimization is enabled.
See 
.SM FILES\s0,
below for a complete list of compiler-related filename suffixes.
.LP
Other arguments refer to assembler or loader options,
object programs, or object libraries.  Unless
.BR \-c ,
.BR \-S , 
.B \-E
.B \-P
or
.B \-Qproduce
is specified, these programs and libraries, together with the results of any
specified compilations or assemblies, are loaded
(in the order given) to produce an output file named
.BR a.out .
You can specify a name for the executable by using the
.B \-o 
option.
.LP
If a single C 
program is compiled and loaded all at once, the intermediate
file is deleted.
.SH OPTIONS
When debugging or profiling 
objects are compiled using the
.B \-g
or
.B \-pg
options, respectively, the
.B ld
command for linking them should also contain the appropriate option.
.LP
See
.BR ld (1)
for link-time options.
.TP 1i
.B \-a
Insert code to count how many times each basic block is executed.
Invokes a run-time recording mechanism that creates a
.B \&.d
file for every
.B \&.c
file (at normal termination).
The
.B \&.d
file accumulates execution data for the corresponding source file.  The
.BR tcov (1)
utility can then be run on the source file to generate statistics about
the program.  Since this option entails some optimization, it is
incompatible with
.BR \-g .
.\".TP
.\".BI \-A opt
.\"Pass option 
.\".I opt
.\"to 
.\".BR as (1).
.TP
.BI \-align " " _ block
Force the global uninitialized data symbol 
.IR block 
to be page-aligned by
increasing its size to a whole number of pages, and placing its first
byte at the beginning of a page.
.\".TP
.\".B \-B
.\"Obsolete option.
.\".TP
.\".B \-bigsharedlib
.\"Compile and link shared library with big data segment.
.TP
.BI \-B binding
Specify whether bindings of libraries for linking are
.B static
or
.BR dynamic ,
indicating whether libraries are non-shared or shared, respectively.
.TP
.B \-c
Suppress linking with
.BR ld (1)
and produce a
.B \&.o
file for each source file.
A single object file can be named explicitly using the
.B \-o
option.
.TP
.B \-C
Prevent the C preprocessor,
.BR cpp (1),
from removing comments.
.TP
.B \-dryrun
Show but do not execute the commands constructed
by the compilation driver.
.TP
.BI \-D name\fR[\fP = def\fR]
Define a symbol
.I name
to the C preprocessor 
.RB ( cpp (1)). 
Equivalent to a
.B #define
directive in the source.  If no
.I def
is given,
.I name
is defined as
.RB ` 1 '.
.\".TP
.\".B \-dl
.\"Generate 
.\".B something or other 
.\"for SunRise.
.PD
.\".TP
.\".B \-ds
.\"Generate 
.\".B something or other 
.\"for SunRise.
.TP
.B \-E
Run the source file through
.BR cpp (1),
the C preprocessor, only.
Sends the output to the standard output, or to
a file named with the
.B \-o
option.  Includes the 
.B cpp
line numbering information.  (See also, the 
.B \-P
option.)
.br
.ne 24
.TP 
.I float_option
Floating-point code generation option.  Can be one of:
.RS
.TP 10
.B \-f68881
Generate in-line code for Motorola
.SM MC\s068881
floating-point processor
(supported only on Sun-3 systems).
.TP
.B \-ffpa
Generate in-line code for Sun Floating Point Accelerator
(supported only on Sun-3 systems).
.TP
.B \-fsky
Generate in-line code for Sky floating-point processor
(supported only on Sun-2 systems).
.TP
.B \-fsoft
Generate software floating-point calls.  Supported
only on Sun-2 and Sun-3 systems, for which it is the
default.
.TP
.B \-fstore
Insure that expressions allocated to extended precision registers
are rounded to storage precision whenever an assignment occurs
in the source code.
Only has effect when
.B \-f68881
is specified
(Sun-3 systems only).
.TP
.B \-fswitch
Run-time-switched floating-point calls.
The compiled object code is linked at runtime
to routines that support one of the above types of floating
point code.  This was the default in previous releases.
Only for use with programs that are floating-point intensive,
and must be portable to machines with various floating-point
hardware options (supported only on Sun-2 and Sun-3 systems).
.RE
.TP
.BR \-fsingle "		(Sun-2, Sun-3 and Sun-4 systems)"
Use single-precision arithmetic in computations involving only
.B float
expressions.  Do not convert everything to
.BR double ,
which is the default.  Note: floating-point 
.I parameters 
are still converted to double precision, and 
.I functions 
returning values still return double-precision values.  
.IP
Although not standard C,
certain programs run much faster using this option.  
Be aware that some significance can be lost due
to lower-precision intermediate values.
.\".TP
.\".\" Added for Sun386i, Should be part of SunOS4.0
.\".B \-fsingle2
.\"Pass
.\".B float
.\"values as float, not
.\".BR double .
.\"Often used in conjuction with
.\".BR \-fsingle .
.TP
.B \-g
Produce additional symbol table information for 
.BR dbx (1)
and 
.BR dbxtool (1)
and pass the
.B \-lg
option to 
.BR ld (1)
(so as to include the
.B g
library, that is:
.BR /usr/lib/libg.a )
When this option is given, the
.B \-O
and
.B \-R
options are suppressed.
.TP
.B \-go
Produce additional symbol table information for 
.BR adb (1).
When this option is given, the
.B \-O
and
.B \-R
options are suppressed.
.TP
.B \-help
Display helpful information about 
.BR cc .
.TP
.BI \-I pathname
Add
.I pathname
to the list of directories in which to search for
.B #include
files with relative filenames (not beginning with slash
.BR  / ).
The preprocessor first searches for
.B #include
files in the directory containing
.IR sourcefile ,
then in directories named with
.B \-I
options (if any), and finally, in
.BR /usr/include .
.TP
.B \-J
Generate 32-bit offsets in 
.B switch
statement labels (supported only on Sun-2 and Sun-3 systems).
.TP
.BI \-l library
Link with object library 
.I library
(for 
.BR ld (1)).
This option must follow
the
.I sourcefile
arguments.
.TP
.BI \-L directory
Add 
.I directory
to the list of directories containing object-library routines (for linking
using
.BR ld (1).
.TP
.B \-M
Run only the macro preprocessor
on the named C programs,
requesting that it generate makefile dependencies
and send the result to the standard output (see
.BR make (1)
for details about makefiles and dependencies).
.TP
.B \-misalign
Generate code to allow loading and storage of misaligned data
(Sun-4 systems only).
.\".TP
.\".B \-mc68010
.\"Generate relocatable object 
.\".RB ( \&.o )
.\"files for the
.\".SM MC\s068010
.\"microprocessor (which, when linked, can
.\"also run on the
.\".SM MC\s068020).
.\".TP
.\".B \-mc68020
.\"Generate relocatable object 
.\".RB ( \&.o )
.\"files for the
.\".SM MC\s068020
.\"microprocessor.
.TP
.BI \-o " outputfile"
Name the output file
.IR outputfile .
.I outputfile 
must have the appropriate suffix for the type of file to be produced
by the compilation (see
.SM FILES\s0,
below).  
.I outputfile
cannot be the same as 
.I sourcefile 
(the compiler will not overwrite the source file).
.br
.ne 5
.TP
.BI \-O\fR[\fP level\fR]
Optimize the object code.  Ignored when either 
.BR \-g ,
.BR \-go ,
or
.B \-a
is used.  On Sun-2 and Sun-3 systems,
.B \-O 
with the
.I level
omitted is equivalent to
.BR \-O1 ;
on Sun-4 systems, it is equivalent to
.BR \-O2 .
On Sun386i systems, any level supplied is treated as level 1.
.I level
is one of:
.RS
.RS
.TP
.B 1
Do postpass assembly-level optimization only.
.TP
.B 2
Do global optimization prior to code generation,
including loop optimizations, common subexpression
elimination, copy propagation, and automatic register allocation.  
.BR \-O2
does not optimize references to or definitions of external or
indirect variables.
.TP
.B 3
Same as
.BR \-O2 ,
but optimize uses and definitions of external variables.
.BR \-O3
does not trace the effects of pointer assignments.
Neither
.BR \-O3
nor
.BR \-O4
should be used when compiling either device drivers, or programs that
modify external variables from within signal handlers.
.TP
.B 4
Same as
.BR \-O3 ,
but trace the effects of pointer assignments.
.RE
.RE
.
.TP
.B \-p
Prepare the object code to collect data for profiling with
.BR prof (1).
Invokes a run-time recording mechanism that produces a
.B mon.out
file (at normal termination).
.TP
.B \-P
Run the source file through
.BR cpp (1),
the C preprocessor, only.  Puts the output in a file with a
.B \&.i
suffix.  Does not include
.BR cpp -type
line number information in the output.
.TP
.B \-pg
Prepare the object code to collect data for profiling with
.BR gprof (1).
Invokes a run-time recording mechanism that produces a
.B gmon.out
file (at normal termination).  
.TP
.B \-pic
Produce position-independent code.  Each reference to a global datum is
generated as a dereference of a pointer in the global offset table.
Each function call is generated in pc-relative addressing mode through
a procedure linkage table.  The size of the global offset table is
limited to 64K on MC68000-family processors, or to 8K on
.SM SPARC
processors.
.TP
.B \-PIC
Like
.BR \-pic ,
but allows the global offset table to span the range of 32-bit
addresses in those rare cases where there are too many global data
objects for
.BR \-pic .
.TP
.B \-pipe
Use pipes, rather than intermediate files, between
.BR cpp (1)
and
.BR ccom
compilation stages.  (Very cpu-intensive.)
.br
.ne 3
.TP
.BI "\-Qoption " "prog opt"
.\".ta +1.5i
Pass the option
.I opt
to the program
.IR prog .
The option must be appropriate to that program and may begin with a
minus sign.
.I prog
can be one of:
.BR as ,
.\".BR bb_count ,
.\".BR c2 ,
.\".BR c_plus ,
.\".BR ccom ,
.BR cpp ,
.BR inline ,
or
.BR ld .
.TP
.BI \-Qpath " pathname"
Insert  directory
.I pathname
into the compilation search path.
.I pathname will be searched for alternate versions of the
compilation programs, such as
.BR cpp (1),
and
.BR ld (1).
This path will also be searched first for certain relocatable
object files that are implicitly referenced by the
compiler driver, for example
.B *crt*.o
and
.BR  bb_link.o .
.TP
.BI \-Qproduce " sourcetype"
Produce source code of the type
.IR sourcetype .
.I sourcetype
can be one of:
.RS
.RS
.PD 0
.TP
.B \&.c
C source (from
.BR bb_count ).
.TP
.B \&.i
Preprocessed C source from
.BR cpp (1).
.\".TP
.\".B \&.c++
.\"C++ source.
.TP
.B \&.o
Object file from
.BR as (1).
.TP
.B \&.s
Assembler source (from
.BR ccom ,
.BR inline (1)
or
.BR c2 ).
.PD
.RE
.RE
.\".TP
.\".BI \-Qtarget " arch"
.\"Produce object and executable files for another machine architecture.
.\".I arch
.\"is the name of a directory in
.\".B /usr/bin/arch
.\"that contains the proper compilers and object libraries to produce
.\"code for the designated architecture (other than Sun-2 or Sun-3
.\"systems).
.\".\" or sparc).
.\".I arch
.\"is either a link to a directory with a name of the form
.\".IR host.target ,
.\"or the latter may be mounted (see
.\".BR mount (8)
.\"for details) as
.\".IR arch .
.\".TP
.\".I host
.\"is a string, such as
.\".RB ` M68020 ',
.\"that indicates the architecture of the machine
.\"performing the compilation.
.\".I target
.\"is a string indicating the architecture of the machine on which the
.\"executables will run.
.TP
.B \-R
Merge data segment with text segment for
.BR as (1).
Data initialized in the object file produced by this compilation is
read-only, and (unless linked with
.BR "ld \-N" )
is shared between processes.  Ignored when either
.B \-g
or
.B \-go
is used.
.TP
.B \-S
Do not assemble the program but produce an assembly source file.
.\".TP
.\".B \-sharedlib
.\"Compile and link a shared library.
.\".TP
.\".BI \-sl library
.\"Read a shared object library for
.\".BR ld (1).
.\".TP
.\".B \-sparc
.\".B Use
.\".SB SPARC
.\".B compiler parts
.br
.ne 10
.TP
.I target_arch
Compile object files for the specified processor architecture.  Unless
used in conjunction with one of the Sun Cross-Compilers, correct
programs can be generated only for the architecture of the host on
which the compilation is performed.
.I target_arch
can be one of:
.RS
.RS
.PD 0
.TP 10
.B \-sun2
Produce object files for a Sun-2 system.
.TP
.B \-sun3
Produce object files for a Sun-3 system.
.TP
.B \-sun4
Produce object files for a Sun-4 system.
.PD
.RE
.RE
.TP
.BI \-temp= directory
Set directory for temporary files to be
.IR directory .
.TP
.B \-time
Report execution times for the various compilation passes.
.TP
.BI \-U name
Remove any initial definition of the
.BR cpp (1)
symbol
.IR name .
(Inverse of the
.B \-D
option.)
.TP
.B \-w
Do not print warnings.
.SH ENVIRONMENT
.TP 20
.SB FLOAT_OPTION
.\" Sun386i 
(Sun-2, Sun-3, Sun-4 systems only.)
When no floating-point option is specified, the compiler uses the value
of this environment variable (if set).  Recognized values are:
.BR f68881 ,
.BR ffpa ,
.BR fsky ,
.BR fswitch 
and
.BR fsoft .
.br
.ne 20
.SH FILES
.PD 0
.TP 20
.B a.out
executable output file
.TP
.IB file .a
library of object files
.TP
.IB file .c
C source file
.TP
.IB file .d
.BR tcov (1)
.\" Sun386i 
test coverage input file (Sun-2, Sun-3, Sun-4 systems only)
.TP
.IB file .i
C source file after preprocessing with
.BR cpp (1)
.TP
.IB file .il
.I inline 
expansion file
.TP
.IB file .o
object file
.TP
.IB file .s
assembler source file
.TP
.IB file .S
assembler source for
.BR cpp (1)
.TP
.IB file .tcov
output from 
.BR tcov (1)
.\" Sun386i 
(Sun-2, Sun-3, Sun-4 systems only)
.TP
.B /usr/lib/c2
object code optimizer
.TP
.B /usr/lib/ccom
compiler
.TP
.B /usr/lib/compile
compiler command-line processing driver
.TP
.B /usr/lib/cpp
macro preprocessor
.TP
.B /usr/lib/crt0.o
runtime startup code
.TP
.B /usr/lib/Fcrt1.o
startup code for
.B \-fsoft
option
.\" Sun386i 
(Sun-2, Sun-3, Sun-4 systems only)
.TP
.B /usr/lib/gcrt0.o
startup for profiling with
.BR gprof (1)
.TP
.B /usr/lib/libc.a
standard library, see
.BR intro (3)
.TP
.B /usr/lib/mcrt0.o
startup for profiling with
.BR prof (1)
.BR intro (3)
.TP
.B /usr/lib/Mcrt1.o
startup code for
.B \-f68881
option (for Sun-3 systems)
.TP
.B /usr/lib/Scrt1.o
startup code for
.B \-fsky
option (for Sun-2 systems)
.TP
.B /usr/lib/Wcrt1.o
startup code for
.B \-ffpa
option (for Sun-3 systems)
.TP
.B /usr/include
standard directory for 
.B #include 
files
.TP
.B /usr/lib/bb_link.o
basic block counting routine
.TP
.B /usr/lib/cg
code generator used with 
.B /usr/lib/iropt
.TP
.B /usr/lib/libc_p.a
profiling library, see 
.BR gprof (1)
or 
.BR prof (1)
.TP
.B /usr/lib/inline
inline expander of library calls
.TP
.B /usr/lib/iropt
intermediate representation optimizer
.TP
.B /usr/lib/libm.a
math library
.TP
.B /usr/5lib/libc.a
System V standard compatibility library, see
.BR intro (3V)
.TP
.B /usr/5lib/libc_p.a
System V profiling library, see 
.BR gprof (1)
or 
.BR prof (1)
.br
.ne 5
.TP
.B /tmp/*
compiler temporary files
.TP
.B mon.out
file produced for analysis by
.BR prof (1)
.TP
.B gmon.out
file produced for analysis by
.BR gprof (1)
.PD
.SH "SEE ALSO"
.BR adb (1),
.BR ar (1V),
.BR as (1),
.BR cpp (1),
.BR dbx (1),
.BR dbxtool (1),
.BR gprof (1),
.BR inline (1),
.BR ld (1),
.BR lint (1V),
.BR make (1),
.BR prof (1),
.BR tcov (1),
.BR intro (3),
.BR intro (3V),
.BR monitor (3)
.LP
.TX FPOINT
.br
.TX PUL
.br
B. W. Kernighan and D. M. Ritchie,
.IR "The C Programming Language" ,
Prentice-Hall, 1978
.\".br
.\".I "\s-1UNIX\s0 Interface Overview"
.SH DIAGNOSTICS
The diagnostics produced by the C compiler 
are intended to be self-explanatory.
Occasional obscure messages may be produced by
the preprocessor, assembler, or loader.
.br
.ne 10
.SH BUGS
.LP
The program context given in syntax error messages
is taken from the input text
.I after 
the C preprocessor has performed substitutions.
Therefore, error messages
involving syntax errors in or near macro references or manifest 
constants may be misleading.
.LP
Compiling with optimization level 2 or greater may produce
incorrect object code if tail-recursion
elimination is applied to functions called with fewer actual
parameters (arguments) than the number of formal parameters in
the function's definition. 
Such parameter-count mismatches can be detected using
.BR lint (1V).
 with object library 
.I library
(for 
.BR ld (1)).
This option must follow
the
.I sourcefile
arguments.
.TP
.BI \-L directory
Add 
.I directory
to the list of directories containing object-library routines (for linking
using
.BR ld (1).
.TP
.B \-M
Run only the macro preprocessor
on the named C programs,
requesting that it generate makefile dependencies
and send the result to the standard output (see
.BR make (1)
for details about makefiles a./share/man/man1/cd.1                                                                                  755       0      12         2142  4424740633   7356                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cd.1 1.9 89/03/26 SMI; from UCB 4.1
.TH CD 1 "9 September 1987"
.SH NAME
cd \- change working directory
.SH SYNOPSIS
.B cd
[
.I directory
]
.SH DESCRIPTION
.IX  cd  ""  "\fLcd\fP \(em change directory"
.IX  "file system"  "cd command"  ""  "\fLcd\fP \(em change directory"
.IX  "working directory"  "cd command"  ""  "\fLcd\fP \(em change directory"
.IX  change  "working directory"
.IX  change  "directory"
.IX  directory  "change working"
.I directory
becomes the new working directory.  The process must
have execute (search) permission in
.IR directory . 
If
.B cd
is used without arguments, it returns you
to your login directory.
.\".LP
.\"Because a new process is created to execute each command,
.\".B cd
.\"would be ineffective if it were written as a normal command.  It is therefore
.\"recognized and executed by the shells. 
In
.BR csh (1)
you may specify a list of directories in which
.I directory
is to be sought as a subdirectory if it is not a subdirectory of the
current directory; see the description of the
.B cdpath
variable in
.BR csh (1).
.SH "SEE ALSO"
.BR csh (1),
.BR pwd (1),
.BR sh (1)
\   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 efa      defaultsedit.1       deroff.1        des.1       df.1        diff.1       diff3.1v         diffmk.1         	dircmp.1v   (    	dirname.1 (  8    dirs.1 (  H    dis.1  (  `    domainname.1    p    dos.1       
dos2unix.1       du.1v    ./share/man/man1/cdc.1                                                                                 755       0      12           64  4424740633   7462                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-cdc.1
.\" @(#)cdc.1 1.3 89/03/26 SMI;
chdir.1     ^  	checkeq.1     _  	checknr.1     `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1 L  l  e  clear.1     f   clear_colormap.1       g   clear_functions.1      h  click.1     i  clock.1     j  	cluster.1     k  	cmdtool.1      l  cmp.1     m  col.1v   $  n  colcrt.1  $  8  o  coloredit.1   H  p  colrm.1   X  q  comb.1  ./share/man/man1/cflow.1                                                                               755       0      12        11106  4424740633  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cflow.1 1.14 89/04/21 SMI; from S5R2 5.2 5/18/82
.TH CFLOW 1 "26 March 1989"
.SH NAME
cflow \- generate a flow graph for a C program
.SH SYNOPSIS
.B cflow
.RB [ \-r ]
.RB [ \-ix ]
[
.B \-i_
]
[
.B \-d\fInum
]
.IR filename s
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "cflow command"  ""  "\fLcflow\fP \(em generate C flow graph"
.IX  "code flow graph"  ""  "code flow graph \(em \fLcflow\fP"
.IX  "programming tools"  cflow  ""  "\fLcflow\fP \(em code flow graph"
.IX  "C programming language"  cflow  ""  "\fLcflow\fP \(em code flow graph"
.IX  languages  cflow  ""  "\fLtcflow\fP \(em code flow graph"
.B cflow
analyzes a collection of C, 
.BR yacc , 
.BR lex ,
assembler, and object files
and attempts to build a graph charting the external references.
Files suffixed in
.B .\|y
and
.B .\|l
are run through
.B yacc
and
.BR lex ,
respectively; the output of
.B yacc
and
.B lex
for those files, and files suffixed in
.BR .\|c ,
are first run through the C preprocessor
and then run through the first pass of
.BR lint (1V).
(The
.BR \-I \*S,
.BR \-D \*S,
and
.BR \-U
options of the C preprocessor are also understood.)
Files suffixed in
.BR .\|i
are passed directly to the first pass of
.BR lint .
Files suffixed with
.B .\|s
are assembled.  Information is extracted from the symbol tables of the
output of the assembler and from files suffixed with
.BR .\|o .
The output of all this non-trivial processing
is collected and turned into a graph of external references
which is displayed upon the standard output.
.LP
Each line of output begins with a reference
(that is, line)
number, followed by a suitable number of tabs
indicating the level.
Then the name of the global
(normally only a function not defined as an external or
beginning with an underscore; see below for the
.B \-i
inclusion option)
a colon
and its definition.
For information extracted from C source,
the definition consists of an abstract type declaration
(for example,
.BR "char \(**" ),
and, delimited by angle brackets,
the name of the source file
and the line number
where the definition was found.
Definitions extracted from object files
indicate the file name and location
counter under which the symbol appeared
(for example,
.IR text ).
Leading underscores in C-style external names are deleted.
.LP
Once a definition of a name has been printed,
subsequent references to that name contain
only the reference number of the line
where the definition may be found.
For undefined references, only
.B <\|>
is printed.
.LP
.SH SYSTEM V DESCRIPTION
The System V version of
.B cflow
in
.B /usr/5bin/cflow
makes the 
.B C 
preprocessor,
.BR cpp (1)
search in
.B /usr/5include
for include files before it searches in
.BR /usr/include .
.SH OPTIONS
The following options are interpreted by
.B cflow :
.TP \w'\fB\-d\fPnum\ \ 'u
.B \-r
Reverse the ``caller:callee'' relationship producing an inverted listing
showing the callers of each function.
The listing is also sorted in
lexicographical order by callee.
.TP
.B \-ix
Include external and static data symbols. The default is to include
only functions in the flowgraph.
.TP
.B \-i_
Include names that begin with an underscore.
The default is to exclude
these functions (and data if
.B \-ix
is used).
.TP
.BI \-d num
The
.I num
decimal integer indicates the depth at which the flowgraph
is cut off.
By default this is a very large number.
Attempts to set
the cutoff depth to a nonpositive integer will be met with contempt.
.SH EXAMPLE
As an example, given the following in
.BR file.c :
.ft B
.nf
	int  i;
	main()
	{
		f();
		g();
		f();
	}
.br	
.ne 6	
	f()
	{
		i = h();
	}
.ft R
.fi
the command:
.ft B
.nf
	cflow \-ix file.c
.ft R
.fi
produces the output
.ft B
.nf
	1	main: int(), <file.c 4>
	2		f: int(), <file.c 11>
	3			h: <>
	4			i: int, <file.c 1>
	5		g: <>
.ft R
.fi
When the nesting level becomes too deep, the
.BR \-e
option of
.BR pr (1V)
can be used to compress the tab expansion to something
less than every eight spaces.
.SH FILES
.PD 0
.TP 20
.B /usr/5bin/cflow
.TP
.B /usr/include
.PD
.SH "SEE ALSO"
.BR as (1),
.BR cc (1V),
.BR cpp (1),
.BR lex (1),
.BR lint (1V),
.BR nm (1),
.BR pr (1V),
.BR yacc (1)
.SH DIAGNOSTICS
Complains about bad options.
Complains about multiple definitions
and only believes the first.
Other messages may come from the various
programs used, such as the C preprocessor.
.SH BUGS
Files produced by
.B lex
and
.B yacc
cause the reordering of line number declarations which can
confuse
.BR cflow .
To get proper results, feed
.B cflow
the
.B yacc
or
.B lex
input.
 old-prmail.1  +    ,  	old-pti.1   ,  -  
old-setkeys.1 -  D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /  t  0  
old-ttytool.1 0    1  old-uncompact.1     2  old-vc.1      3  on.1c     4  onintr.1      5  organizer.1     6  othertools.1  6    7  
overview.1     8  pack.1   $  9  page.1   8  :  
pagesize.1 8  L  ;  passwd.1  L  \  <  paste.1   l  =./share/man/man1/chdir.1                                                                               755       0      12           72  4424740633  10021                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)chdir.1 1.3 89/03/26 SMI;
ecknr.1     `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1 L  l  e  clear.1     f   clear_colormap.1       g   clear_functions.1      h  click.1     i  clock.1     j  	cluster.1     k  	cmdtool.1      l  cmp.1     m  col.1v   $  n  colcrt.1  $  8  o  coloredit.1   H  p  colrm.1   X  q  comb.1    h  r  comm.1    |  s  
compress./share/man/man1/checkeq.1                                                                             755       0      12           65  4424740634  10336                                                                                                                                                                                                                                                                                                                                                                      .so man1/eqn.1
.\" @(#)checkeq.1 1.13 89/03/26 SMI; 
 `  chfn.1   (  a  chgrp.1   8  b  chkey.1   L  c  chmod.1v  L  \  d  chsh.1 L  l  e  clear.1     f   clear_colormap.1       g   clear_functions.1      h  click.1     i  clock.1     j  	cluster.1     k  	cmdtool.1      l  cmp.1     m  col.1v   $  n  colcrt.1  $  8  o  coloredit.1   H  p  colrm.1   X  q  comb.1    h  r  comm.1    |  s  
compress.1 |    t  
cont./share/man/man1/checknr.1                                                                             755       0      12         6022  4424740634  10407                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)checknr.1 1.16 89/03/26 SMI; from UCB 4.1
.TH CHECKNR 1 "22 December 1987"
.SH NAME
checknr \- check nroff and troff input files; report possible errors
.SH SYNOPSIS
.B checknr
[
.B \-fs
]
[
.B \-a
.BI \&. \|x1
.BI \&. \|y1
.BI \&. \|x2
.BI \&. \|y2
\&.\|.\|.
.BI \&. \|xn
.BI \&. \|yn
] 
.if n .ti +0.5i
[
.B \-c
.BI \&. \|x1
.BI \&. \|x2
.BI \&. \|x3
\&.\|.\|.
.BI \&. \|xn
] 
[
.I filename
\&.\|.\|.
]
.SH AVAILABILITY
.LP
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  checknr  ""  "\fLchecknr\fP \(em check nroff/troff files"
.IX  "document production"  "checknr command"  ""  "\fLchecknr\fP \(em check nroff/troff files"
.IX  "nroff utilities"  "checknr"  "\fLnroff\fP utilities" "\fLchecknr\fP \(em check nroff/troff files"
.IX  "troff utilities"  "checknr"  "\fLtroff\fP utilities" "\fLchecknr\fP \(em check nroff/troff files"
.LP
.B checknr
checks a list of
.BR nroff (1)
or
.BR troff (1)
input files for certain kinds of errors
involving mismatched opening and closing delimiters and
unknown commands. If no files are specified,
.B checknr
checks the standard input.
Delimiters checked are:
.RS
.TP 3
\(bu
Font changes using \fB\ef\fIx \fR.\|.\|. \fB\efP\fR.
.TP
\(bu
Size changes using \fB\es\fIx \fR.\|.\|. \fB\es0\fR.
.TP
\(bu
Macros that come in open .\|.\|. 
close forms, for example, the
.SB \&.TS
and
.SB \&.TE
macros which must always come in pairs.
.RE
.LP
.B checknr
knows about the
.BR ms (7)
and
.BR me (7)
macro packages.
.LP
.B checknr
is intended to be used on documents that are prepared with
.B checknr
in mind.  It expects a certain
document writing style for
.B \ef
and
.B \es
commands, in that each
.BI \ef x
must be terminated with
.B \efP
and each
.BI \es x
must be terminated with
.BR \es0 .
While it will work to directly go into the next font
or explicitly specify the
original font or point size, and many existing
documents actually do this,
such a practice will produce complaints from
.BR checknr .
Since it is probably better to use the
.B \efP
and
.B \es0
forms anyway, you
should think of this as a contribution to your
document preparation style.
.SH OPTIONS
.TP
.B \-f
Ignore
.B \ef
font changes.
.TP
.B \-s
Ignore
.B \es
size changes.
.TP
.BI "\-a ." "x1 " . y1\fR.\|.\|. 
Add pairs of macros to the list.
The pairs of macros are assumed
to be those (such as
.SB \&.DS
and
.BR \s-1.DE\s0 )
that should be checked for
balance.  The
.B \-a
option must be followed by groups of six characters,
each group defining a pair of macros. 
The six characters are a period, the
first macro name, another period, and the second macro name.
For example, to define a pair
.SB \&.BS
and
.BR \s-1.ES\s0 ,
use
.RB ` "\-a.\s-1BS.ES\s0" '
.TP
.BI "\-c ." x1\fR\|.\|.\|.
Define commands which
.B checknr
would otherwise complain about
as undefined.
.SH SEE\ ALSO
.BR eqn (1),
.BR nroff (1),
.BR troff (1),
.BR me (7), 
.BR ms (7)
.SH BUGS
There is no way to define a one-character macro name using the
.B \-a 
option.
    eject.1        else.1 c  0    end.1 se  @    endif.1   P    endsw.1   d    enroll.1 .1   t    env.1 .1      eqn.1 v.      error.1       eval.1 o      ex.1 val      exec.1 1      exit.1 c      expand.1 1        expr.1v   	    false.1   	    
fdformat.1    	,    fg.1 mat  	@    fgrep.1v 1   	P    file.1 v  	d    filemerge.1   	t    find.1 g  	    finger.1 1    	    ./share/man/man1/chfn.1                                                                                755       0      12           63  4424740634   7647                                                                                                                                                                                                                                                                                                                                                                      .so man1/passwd.1
.\" @(#)chfn.1 1.4 89/03/26 SMI;
chkey.1   L  c  chmod.1v .1   \  d  chsh.1 v  l  e  clear.1     f   clear_colormap.1  f    g   clear_functions.1 g    h  click.1     i  clock.1     j  	cluster.1 1     k  	cmdtool.1 1      l  cmp.1 l.    m  col.1v .  $  n  colcrt.1 v .  8  o  coloredit.1   H  p  colrm.1   X  q  comb.1 r  h  r  comm.1 b  |  s  
compress.1 b    t  
continue.1      u  cp.1 nue    v  cpio.1 1./share/man/man1/chgrp.1                                                                               755       0      12         2354  4424740634  10101                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)chgrp.1 1.18 89/03/26 SMI; from UCB 6.2 5/22/86
.TH CHGRP 1 "22 March 1989"
.SH NAME
chgrp \- change the group ownership of a file
.SH SYNOPSIS
.B chgrp
[
.B \-f
] [
.B \-R
] 
.IR "group-filename" .\|.\|.
.SH DESCRIPTION
.IX  chgrp  ""  "\fLchgrp\fP \(em change group ID of file"
.IX  change "group ownership of file \(em \fLchgrp\fR"
.IX  "group ID"  "\fLchgrp\fR \(em change group ID of file"
.B chgrp
changes the group
.SM ID
(\s-1GID\s0)
of the
.IR filename s
given as arguments to
.IR group .
The group may be either a decimal 
.SM GID 
or a group name found in the
.SM GID
file, 
.BR /etc/group .
.LP
You must belong to the specified group and be the owner of the
file,
or be the super-user.
.SH OPTIONS
.TP
.B \-f
Force.  Do not report errors. 
.TP
.B \-R
Recursive.
.B chgrp
descends through
the directory, and any subdirectories,
setting the specified 
.SM GID
as it proceeds.
When symbolic links are encountered, their group is changed,
but they are not traversed.
.SH FILES
.B /etc/group
.SH "SEE ALSO"
.BR chown (2),
.BR group (5),
.BR passwd (5)
  dirs.1    H    dis.1  .  `    domainname.1    p    dos.1 `      
dos2unix.1       du.1v  1      dumbplot.1g       e.1       echo.1v       ed.1 1v       edit.1 o       egrep.1v         eject.1      ./share/man/man1/chkey.1                                                                               755       0      12          752  4424740634  10061                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chkey.1 1.7 89/03/26 SMI;
.TH CHKEY 1 "9 September 1987"
.SH NAME
chkey \- change your encryption key
.SH SYNOPSIS
.B chkey
.SH DESCRIPTION
.IX  "chkey command"  ""  "\fLchkey\fP command"
.IX  "encryption key, change, \fLchkey\fR commmand"
.B chkey
prompts the user for their login password, and uses it to encrypt
a new encryption key for the user to be stored in the
.BR publickey (5)
database.
.SH "SEE ALSO"
.BR keylogin (1),
.BR publickey (5),
.BR keyserv (8C),
.BR newkey (8)
 e    x  	crontab../share/man/man1/chmod.1v                                                                              755       0      12         7420  4424740634  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chmod.1v 1.11 89/03/26 SMI; from UCB 4.3 BSD and S5
.TH CHMOD 1V "22 March 1989"
.SH NAME
chmod \- change the permissions mode of a file
.SH SYNOPSIS
.B chmod
[
.B \-fR
] 
.I mode 
.I filename
.\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLchmod\fR"
.IX  chmod  ""  "\fLchmod\fP \(em change mode"
.IX  files   "chmod command"  files   "\fLchmod\fP \(em change mode"
.IX  change  "mode of file"
.IX  change  "permissions of file"
.IX  "modes,  change permission  \(em \fLchmod\fP"
.IX  "permissions, change mode \(em \fLchmod\fP"
.LP
Change the permissions (mode) of a file or files.
Only the owner of a file (or the super-user) may change its mode.
.LP
The mode of each named file is changed according to
.IR mode ,
which may be absolute or symbolic, as follows.  
.SS Absolute Modes
.LP
An absolute
.I mode
is an octal number constructed from the 
.SM OR 
of the following modes:
.TP 8
.PD 0
.B \0400
Read by owner.
.TP
.B \0200
Write by owner.
.TP
.B \0100
Execute (search in directory) by owner.
.sp .25v
.TP
.B \0040
Read by group.
.TP
.B \0020
Write by group.
.TP
.B \0010
Execute (search) by group.
.sp .25v
.TP
.B \0004
Read by others.
.TP
.B \0002
Write by others.
.TP
.B \0001
Execute (search) by others.
.sp .25v
.TP
.B 4000
Set user
.SM ID
on execution.
.TP
.B 2000
Set group
.SM ID
on execution
(this bit is ignored if the file is a directory;
it may be set or cleared only using symbolic mode).
.TP
.B 1000
Sticky bit, (see
.BR chmod (2)
for more information).

.PD
.SS Symbolic Modes
.LP
A symbolic
.I mode
has the form:
.IP
[
.I who
]
.I "op permission"
[
.I "op permission"
] .\|.\|.
.LP
.I who
is a combination of: 
.RS
.TP 8
.PD 0
.B u
User's permissions.
.TP
.B g
Group permissions.
.TP
.B o
Others.
.TP
.B a
All, or
.BR ugo .
.PD
.RE
.IP
If
.I who
is omitted, the default is
.BR a ,
but the setting of the file creation mask (see
.B umask
in
.BR sh (1)
or
.BR csh (1) 
for more information) is taken into account.  When 
.I who
is omitted,
.B chmod
will not override the restrictions of your user mask.
.LP
.I op
is one of:
.RS
.TP 8
.PD 0
.B +
To add the
.IR permission .
.TP
.B \-
To remove the
.IR permission .
.TP
.B =
To assign the permission explicitly
(all other bits for that category, owner, group, or
others, will be reset).
.PD
.RE
.LP
.I permission
is any combination of:
.RS
.TP 8
.B r
Read.
.PD 0
.TP
.B w
Write.
.TP
.B x
Execute.
.TP
.B X
Give execute permission if the file is a directory
or if there is execute permission for one of the other user classes.
.TP
.B s
Set owner or group
.SM ID\s0.
This is only useful with
.B u
or
.BR g .
Also, the set group 
.SM ID
bit of a directory may only be
modified with
.RB ` + '
or
.RB ` \- '.
.TP
.B t
Set the sticky bit to save program text between processes.
.RE
.PD
.IP
The letters
.BR u ,
.BR g ,
or
.B o
indicate that
.I permission
is to be taken from the current mode for the user-class.
.IP
Omitting
.I permission
is only useful with
.RB ` = ',
to take away all permissions.
.LP
Multiple symbolic modes, separated by commas, may be given.
Operations are performed in the order specified.  
.SH SYSTEM V DESCRIPTION
.LP
If
.I who
is omitted in a symbolic mode, it does not take the file
creation mask into account, but acts as if
.I who
were
.BR a .
.SH OPTIONS
.TP
.B \-f
Force.
.B chmod
will not complain if it fails to change the mode of a file.
.TP
.B \-R
Recursively descend through directory arguments,
setting the mode for each file as described above.
When symbolic links are encountered, their mode is not changed
and they are not traversed.
.SH EXAMPLES
.LP
The first example denies write permission to others,
the second makes a file executable by all if it
is executable by anyone:
.LP
.RS
.ft B
.nf
example% chmod o\-w file
example% chmod +X file
.fi
.ft R
.RE
.LP
.SH SEE ALSO
.BR csh (1),
.BR ls (1V),
.BR sh (1),
.BR chmod (2),
.BR chown (8)
d  ""  "\fLchmod\fP \(em change mode"
.IX  files   "chmod command"  files   "\fLchmod\fP \(em change mode"
.IX  change  "mode of file"
.IX  change  "permissions of file"
.IX  "modes,  change permission  \(em \fLchmod\fP"
.IX  "permissions, ./share/man/man1/chsh.1                                                                                755       0      12          101  4424740635   7670                                                                                                                                                                                                                                                                                                                                                                      .so man1/passwd.1
.\" @(#)chsh.1 1.10 89/03/26 SMI; from UCB 4.1
p.1  f    g   clear_functions.1 g    h  click.1     i  clock.1     j  	cluster.1 1     k  	cmdtool.1      l  cmp.1 l.    m  col.1v .  $  n  colcrt.1 v   8  o  coloredit.1   H  p  colrm.1   X  q  comb.1 r  h  r  comm.1 b  |  s  
compress.1      t  
continue.1 |    u  cp.1 nue    v  cpio.1 1    w  cpp.1 io    x  	crontab.1       y  
crtplot.1g     z  cryp./share/man/man1/clear.1                                                                               755       0      12          731  4424740635  10042                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clear.1 1.13 89/03/26 SMI; from UCB 4.1
.TH CLEAR 1 "9 September 1987"
.SH NAME
clear \- clear the terminal screen
.SH SYNOPSIS
.B clear
.SH DESCRIPTION
.IX  clear  ""  "\fLclear\fP \(em clear screen"
.LP
.B clear
clears your screen if this is possible.
It looks in the environment for the terminal type and then in
.B /etc/termcap
to figure out how to clear the screen.
.SH FILES
.TP "\w'/etc/termcap\ \ \ \ \ \ \ 'u"
.B /etc/termcap
terminal capability data base
g     z  crypt.1     {  csh../share/man/man1/clear_colormap.1                                                                      755       0      12         1770  4424740635  11762                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clear_colormap.1 1.10 89/03/26 SMI;
.TH CLEAR_COLORMAP 1 "9 September 1987"
.SH NAME
clear_colormap \- clear the colormap to make console text visible
.SH SYNOPSIS
.B clear_colormap
.RB [ " \-no " ]
.RB [ " \-f "
.IR framebuffer " ]"
.SH DESCRIPTION
.IX  clear_colormap  ""  "\fLclear_colormap\fP \(em make console text visible"
.LP
.B clear_colormap
ensures that text displayed on the console is visible.  If no options
are specified it clears the frame buffer and initializes
the first two
colormap entries.  If the frame buffer has an
overlay plane it is also
cleared, its colormap is initialized, and the overlay enable plane is
set so that the entire overlay plane is displayed.
.SH OPTIONS
.TP
.B \-n
Do not clear the frame buffer or overlay plane.
.TP
.B \-o
Do not clear the overlay plane, initialize its colormap,
or modify the
overlay enable plane.
.TP
.BI \-f " framebuffer"
Operate on frame buffer device
.I framebuffer
instead of the default,
.BR /dev/fb .
.SH FILES
.PD 0
.TP 20
.B /dev/fb
.PD
    ./share/man/man1/clear_functions.1                                                                     755       0      12         1335  4424740635  12153                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clear_functions.1 1.15 89/03/26 SMI;
.TH CLEAR_FUNCTIONS 1 "24 September 1987"
.SH NAME
clear_functions \- reset the selection service to clear stuck function keys
.SH SYNOPSIS
.B clear_functions
.SH DESCRIPTION
.IX clear_functions "" "\fLclear_functions\fR \(em reset SunView selection service"
.LP
.B clear_functions 
instructs the selection service that no function keys are
currently depressed.  It is useful in cases where erroneous
programs have
reported a key press but not the corresponding release.
The usual symptom
for this situation is that all selections are secondary
(underscored rather
than inverted), even though no function keys are down.
.SH FILES
.LP
.B /usr/bin/selection_svc
.SH "SEE ALSO"
.LP
.TX SVBG
 	default.1         delta.1       $ defaults_from_input.1    <     defaults_merge.1  fa  \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1  |      defaultsedit.1 1      deroff.1 lts      des.1        df.1        diff.1   ./share/man/man1/click.1                                                                               755       0      12         2470  4424740635  10063                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)click.1 1.14 89/03/26 SMI; 
.TH CLICK 1 "18 February 1988"
.SH NAME
click \- enable or disable the keyboard's keystroke click
.SH SYNOPSIS
.B click
[
.B \-y
] 
[
.B \-n
]
[
.BI \-d " keyboard-device"
]
.SH DESCRIPTION
.IX click "" "\fLclick\fR \(em control keyboard click"
.IX "keyboard click, control with \(em \fLclick\fR"
.LP
Change the setting of the audible keyboard click.  The default
is no keyboard click.  If you want to turn clicking on then a good
place to do it is in 
.BR /etc/rc.local .
.LP
Only keyboards that support a clicker respond to this command.
.\" Sun386i
At the time of this writing, the only keyboards known to have
a clicker are the Sun-3 and Sun386i systems keyboards.
.\" Sun386i
.SH OPTIONS
.TP 
.B \-y
Yes, enable clicking.
.TP
.B \-n
No, disable clicking.
.TP
.BI \-d " keyboard-device"
Specify the keyboard device being set.  The default is
.BR /dev/kbd .
.SH FILES
.PD 0
.TP 20
.B /etc/rc.local
.TP
.B /dev/kbd
.PD
.SH "SEE ALSO"
.LP
.BR kbd (4S)
.SH DIAGNOSTICS
.LP
A short help message is printed if an unknown flag is specified or
if the
.B \-d
switch is used and the keyboard device name is not supplied.
A diagnostic is printed
if the keyboard device name can't be opened or is not a keyboard
type device.
.SH BUGS
.LP
There is no way to determine the state of the keyboard click setting.
        eject.1        else.1   0    end.1   @    endif.1   P    endsw.1   d    enroll.1    t    env.1        eqn.1       error.1       ./share/man/man1/clock.1                                                                               755       0      12         4712  4424740635  10072                                                                                                                                                                                                                                                                                                                                                                      .\"  @(#)clock.1 1.18 89/03/26 SMI;
.TH CLOCK 1 "22 March 1989"
.SH NAME
clock \- display the time in an icon or window
.SH SYNOPSIS
.B clock
[
.B \-frst
]
[
.B \-d mdyaw
]
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  clock  ""  "\fLclock\fP \(em display time in window"
.IX  display  "time in window"
.IX  time  "display in window"
.LP
.B clock 
is a SunView utility that displays the current time in a window.
When open,
.B clock
shows the date and time in text format.
When closed,
.B clock
displays a clock face.
.LP
Note:  In previous releases
.B clock
was known as
.BR clocktool .
In the current release,
.B /usr/old/clocktool
is a symbolic link to
.BR clock .
.SH OPTIONS
.TP
.B \-f
Display the date and day of week on the clock face.
.TP
.B \-r
Use a square
face with roman numerals in the iconic state.
This replaces the default round clock face.
.TP
.B \-s
Start
.B clock
with the seconds turned on.
By default, the clock starts with seconds turned
off, and updates every minute.
With seconds turned on, it updates
every second, and, if iconic, displays a second hand.
.TP
.B \-t
Test mode \(em ignore the real time, and instead run in a loop
continuously incrementing the time by one minute and displaying it.
.TP
.B \-d
Display date information in a small area just below the clock face.
The date information to be displayed may include:
.RS 10
.PD 0
.TP 5
.B m
the month,
.TP
.B d
the day of the month (1-31),
.TP
.B y
the year,
.TP
.B a
the string
.SB AM
or
.BR \s-1PM\s0 ,
as appropriate,
.TP
.B w
the day of the week (Sun-Sat).
.PD
.RE
.IP
There is only room for 3 of these, but any 3 may be
displayed in any sequence.
.LP
.B clock
also accepts all of the generic tool arguments discussed in
.BR sunview (1).
.SH USAGE
.LP
.B clock
listens for keyboard input while open.  It recognizes the
following characters:
.TP
.BR s " or " S
Enable or disable the display of seconds.
.TP
.BR t " or " T
Enable or disable ``test'' mode.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/fonts/fixedwidthfonts/sail.r.6
font for day-of-month clock-face display
.PD
.SH SEE ALSO
.BR date (1V),
.BR sunview (1)
.SH BUGS
.LP
If you reset the system time,
.B clock
will not reflect the new time
until you change its state from open to icon, or vice versa.
To reset the system time, see
.BR date (1V).
.LP
The date display does not go well with the round clock face.

.IX  time  "display in window"
.LP
.B clock 
is a Sun./share/man/man1/cluster.1                                                                             755       0      12         3705  4424740636  10462                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cluster.1 1.15 89/03/26 SMI;
.TH CLUSTER 1 "19 February 1988"
.SH NAME
cluster \- find the Application SunOS or Developer's Toolkit optional cluster containing a file
.SH SYNOPSIS
.B cluster
[
.I filename
] 
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "cluster command" "" "\fLcluster\fP command"
.LP
.B cluster
finds the optional software cluster that contains a specified file.  If
the specified file is contained in one of the clusters in Application
Sun\s-1OS\s0 or Developer's Toolkit, the name of the cluster will be
printed on standard output.
.LP
Without arguments,
.B cluster
displays a summary of the clusters in Application Sun\s-1OS\s0 and Developers
Toolkit, including the load state and size of each cluster.
.SH EXAMPLES
.LP
To find the name of the cluster that contains the 
.B spell 
command:
.RS
.sp .5
.nf
.ft B
example% cluster spell
spellcheck
example%
.ft R
.fi
.RE
.LP
To display a summary of the clusters in Application Sun\s-1OS\s0 and
Developer's Toolkit:
.LP
.RS
.nf
.ta \w'    available 'u +\w'advanced_admin   'u +\w'diskette  'u
.ft B
.nf
% cluster
Application SunOS Clusters:
\&      available	cluster	size (bytes)
\&      ---------	-------	----
\&      yes	accounting	265K
\&      no	advanced_admin	501K
\&      \&.\|.\|.
.sp
Developer's Toolkit Clusters:
\&    available	cluster	size (bytes)
\&    ---------	-------	----
\&      no	base_devel	6907K
\&      \&.\|.\|.
.sp
space used by clusters: 6021K bytes
total space remaining: 20432K bytes
.RE
.fi
.fi
.LP
A cluster is available if it has been \(lqloaded\(rq using 
.BR load (1)
or if it has been \(lqmounted\(rq across the network.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/load/*
data files
.PD
.SH "SEE ALSO"
.BR load (1),
.BR unload (1),
.BR toc (5)
.LP
.I "Sun386i System Setup and Maintenance"
.SH DIAGNOSTICS
.TP
.BI "The file " filename "is not in any of the optional software clusters."
The specified file is not part of the Application Sun\s-1OS\s0
or Developer's Toolkit.
 generic_args.1   
X    get.1    
p    get_sele./share/man/man1/cmdtool.1                                                                             755       0      12        21335  4424740636  10461                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cmdtool.1 1.22 89/03/26 SMI; 
.TH CMDTOOL 1  "22 March 1989"
.SH NAME
cmdtool \- run a shell (or program) using the SunView text facility
.SH SYNOPSIS
.B cmdtool
[
.B \-C
]
[
.B \-M
.I bytes
]
[
.B \-P
.I count
]
[
.I generic-tool-arguments
]
[
.I program
[ 
.I program-arguments
]
]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX cmdtool "" "\fLcmdtool\fR \(em shell or program with SunView text facility"
.IX "shell window" "\fLcmdtool\fR"
.LP
.B cmdtool
is the standard
.I SunView
support facility for shells and other programs.
When invoked,
.B cmdtool
runs a program (usually a shell) in a text-based command subwindow.
Characters typed on the keyboard are inserted at the caret.  If the
program is a shell, that shell accepts and runs commands in the
usual manner.  
.B cmdtool
also supports programs that perform cursor motions directly, such
as
.BR vi (1).
.LP
The text of the current command line can be edited using normal
.BR textedit (1)
functions.
The command subwindow displays a log of the
session, which can be scrolled through using the scrollbar
(unless the command does cursor motion).
This log can be edited, and saved by choosing the
.RB ` "Store as New File" '
item in the text facility's pop-up menu. The
.RB  ` "Split View" '
command, also in the pop-up menu, can be used to create two or more
independent views of the log.
.SH OPTIONS
.TP 15
.B \-C
Console 
.BR cmdtool .
Display console messages in this
.BR cmdtool ,
which might otherwise appear in unexpected places on the 
workstation screen.  Since a
.B cmdtool
window can be scrolled, console error messages can be recorded for
later examination.
.TP
.BI \-M " bytes"
Set the log to wrap-around after the indicated
number of
.IR bytes .
.TP
.BI \-P " count"
Checkpoint the log after every set of
.I count
editing operations.
.TP
.I generic-tool-arguments
.B cmdtool
accepts the generic tool arguments
listed in
.BR sunview (1).
.HP
.I program
[
.I program-arguments
]
.br
If a
.I program
argument is present,
.B cmdtool
runs it and passes any remaining arguments to that
.IR program .
If no
.I program
is given,
.B cmdtool
runs the program indicated by the
.SB SHELL
environment variable, or
.B /usr/bin/sh
by default.
.SH USAGE
Refer to
.TX SVBG
for details on how to use 
.BR cmdtool .
.SS Defaults Options
.LP
The following options can be configured as default settings
using
.BR defaultsedit (1).
.TP
.B /Tty/Append_only_log
When set to
.SB TRUE
(the standard default) only command lines can be edited.
.SB FALSE
allows the entire log to be edited.
(See also the description of 
.B Enable Edit
below.)
.TP
.B /Tty/Insert_makes_caret_visible
This entry allows you to specify the method for displaying the
editing caret.
.RS
.PD 0
.TP 18
.B Same_as_for_text
Use the setting specified in the defaults for the 
.B Text
category (the standard default).
.TP
.B If_auto_scroll
If the caret is showing, and an inserted
.SM NEWLINE
would position it below the bottom of the screen 
(as determined by 
.BR /Text/Lower_context ),
the text is scrolled to keep the caret showing.
The number of lines scrolled is determined by the
.BR /Text/Auto_scroll_by
default.
(See
.BR textedit (1)
for more information.)
.br
.ne 3
.TP
.B Always
Scroll the caret back into view whenever input would position it
off the screen.
.PD
.RE
.TP
.B /Tty/Checkpoint_frequency
If set to
.B 0
(the standard default) no checkpointing is done.
For any value greater than zero,
a checkpoint is made each time the indicated number
editing operations has been performed since the last checkpoint.
Each character typed, each
.BR Paste ,
and each
.B Cut
counts as an editing operation.
At each checkpoint, an updated copy of the log is saved in a
file with a name that is constructed by appending two percent signs
.RB ( %%  )
to the name of the log file. 
By default, the log file has a name of the form
.BI /tmp/tty.txt. pid
.RI ( pid
is the process
.SM ID
number of
.BR cmdtool );
the corresponding checkpoint file has a name of the form
.BI /tmp/tty.txt. nnnnnn %% .
.TP
.B /Tty/Text_wraparound_size
If set to
.B 0
(the standard default) no wrap-around takes place; the log file
grows without a specified limit. 
For values greater than zero,
wrap-around occurs whenever the indicated number of characters have
been written to the log since the last wrap-around.
Characters that are pushed over the top are replaced by the
message:
.RS
.IP
.B 
*** Text is lost because the maximum edit log size has been exceeded. ***
.RE
.TP
.B /Text/Edit_back_char
Set the character for erasing to the left of the caret.
Note:
in
.BR cmdtool ,
the
.RB ` "stty erase" '
command has no effect.
Text-based tools refer only to the defaults database key settings.
The default is 
.SM DELETE\s0.
.TP
.B /Text/Edit_back_word
Set the character for erasing the word to the left of the caret.
The standard default is 
.SM CTRL-W\s0.
.TP
.B /Text/Edit_back_line
Set the character for erasing all characters to the left of
the caret.  Note:
.RB ` "stty kill" '
has no effect in
.BR cmdtool .
The standard default is 
.SM CTRL-U\s0.
.SS The Command Subwindow
.LP
The command subwindow is based on the text facility,
which is described in
.TX SVBG .
It uses the same pop-up menu as the text facility, but
with an additional pull-right
.RB ` "Cmd Modes" '
menu, which contains the 
.RB ` "Enable Editing" '
and
.RB ` "Disable Scrolling" '
items.
.LP
Command subwindows support cursor motions, using a new
.B /etc/termcap
entry called
.BR sun-cmd .
Command subwindows automatically set the
.SB TERM
environment variable to
.BR sun-cmd .
So, if you
.BR rlogin (1C)
to a machine that does not have an entry for
.B sun-cmd
in its
.B /etc/termcap
file, the error message
.RB ` "Type sun-cmd unknown" '
results.
To rectify this, type the command
.RB ` "set \s-1TERM\s0=sun" '.
Programs written using the
.BR curses (3X)
or 
.BR curses (3V)
library packages will work in a command subwindow, but programs
hard-coded for
.BR sun -type
terminals may not. 
When supporting a program that performs
cursor motions, the command subwindow automatically takes on the
characteristics of a tty subwindow (as with
.BR shelltool (1)).
When that program terminates or sleeps, the full command subwindow
functionality is restored.
.LP
.B cmdtool
supports programs that use
.SM CBREAK
and
.SM NO ECHO
terminal modes. 
This support is normally invisible to the user.
However, programs that use
.SM RAW
mode, such as
.BR rlogin (1C)
and
.BR script (1),
inhibit command-line editing with the mouse.
In this case, however, tty-style
.SM ERASE,
word-kill and line-kill characters can still be used to edit the
current command line.
.SS The Command Subwindow Menu
.LP
.TP 18
.B Copy, then Paste
When there is a current selection, the entire menu item is active.
The selection is copied both to the clipboard and to the location pointed
to by the caret.  When there is no selection, but there is text on the
clipboard, only
.B Paste
is active.  In this case, the contents
of the clipboard are copied to the caret.
When there is no selection and the clipboard is empty,
this item is inactive.
.RB ` "Copy then Paste" '
is a generic text menu item.  Refer to
.BR textedit (1)
for information about other generic text menu items.
.br
.ne 3
.TP
.PD 0
.B Enable Edit
.TP
.B Disable Edit
.PD
Toggle to allow or disallow editing on the log.
.br
.ne 5
.TP
.B Disable Scrolling
.PD 0
.TP
.B Enable Scrolling
.PD
Toggle between a scrollable, editable window, or a display that
supports cursor motions.  Note: for well-behaved programs (such as 
.BR vi (1))
this switching is performed automatically (so this menu item is
seldom needed).
.SS Accelerators
.LP
Text facility accelerators that are especially useful in
command subwindows are described here.  See 
.br
.BR textedit (1)
for more information.
.TP 18
.SM CTRL-RETURN
Position the caret at the bottom, and scroll it into view
as determined by 
.BR /Text/Lower_context .
.TP 
.SM META-P
Choose the
.RB ` "Copy, then Paste" '
menu item.
.TP
.PD 0
\s-1CAPS\s0-lock
.TP
F1
Toggle between all-upper-case keyboard input, and mixed-case.
.PD
.SH FILES
.PD 0
.TP 20
.BI /tmp/tty.txt. pid
log file
.TP
.B ~/.textswrc
.TP
.B ~/.ttyswrc
.TP
.B usr/lib/.text_extras_menu
.TP
.B /etc/termcap
.TP
.B /usr/bin/sh
.PD
.SH "SEE ALSO"
.BR defaultsedit (1),
.BR rlogin (1C),
.BR script (1),
.BR shelltool (1),
.BR sunview (1),
.BR textedit (1),
.BR vi (1),
.BR curses (3V),
.BR curses (3X)
.LP
.TX INSTALL
.br
.TX SVBG
.SH BUGS
.LP
Typing ahead while
.B cmdtool 
changes between its scrollable and cursor motion modes
will sometimes freeze
.B cmdtool .
.LP
Full terminal emulation is not complete.
Some manifestations of this deficiency are:
.TP 3
\(bu
File completion in the C shell does not work.
.TP
\(bu
Enhanced display of text is not supported.
e program indicated by the
.SB SHELL
environment variable, or
.B /usr/bin/sh
by default.
.SH USAGE
Refer to
.TX SVBG
for details on how to use 
.BR cmdtool .
.SS Defaults Options
.LP
The following options can be configured as default settings
using
.BR defaultsedit (1).
.TP
.B /Tty/Append_o./share/man/man1/cmp.1                                                                                 755       0      12         2711  4424740636   7554                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cmp.1 1.13 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1987 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH CMP 1 "23 November 1987"
.SH NAME
cmp \- perform a byte-by-byte comparison of two files
.SH SYNOPSIS
.B cmp
[
.B \-ls
]
.I filename1
.I filename2
[
.I skip1
] [
.I skip2
]
.SH DESCRIPTION
.IX  cmp  ""  "\fLcmp\fP \(em compare files"
.IX  files  "cmp command"  files  "\fLcmp\fP \(em compare files"
.IX  compare  files
.IX  files  compare
.LP
.B cmp
compares
.I filename1
and
.IR filename2 .
If
.I filename1
is
.RB ` \- ',
the standard input is used.  With no options,
.B cmp
makes no comment if the
files are the same; if they differ, it reports the byte and line
number at which the difference occurred, or, that one file is an
initial subsequence of the other.
.I skip1
and
.I skip2
are initial byte offsets into
.I filename1
and
.I filename2
respectively,
and may be either octal or decimal; a leading
.B 0 
denotes octal.
.SH OPTIONS
.TP
.B \-l
Print the byte number (in decimal) and the differing bytes (in octal)
for all differences between the two files.
.TP
.B \-s
Silent. Print nothing for differing files; set exit codes only.
.SH "SEE ALSO"
.BR comm (1),
.BR diff (1)
.SH DIAGNOSTICS
Exit code
.B 0
is returned for identical files,
.B 1
for different files, and
.B 2
for an inaccessible or missing argument, or a system error.
   exec.1 1      exit.1 c      expand.1./share/man/man1/col.1v                                                                                755       0      12         6571  4424740636   7750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)col.1v 1.16 89/03/26 SMI; from UCB 4.3 and S5R6
.TH COL 1V "9 September 1987"
.SH NAME
col \- filter reverse paper motions from nroff output for display on a terminal
.SH SYNOPSIS
.B col
[
.B \-bfhp
]
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/col
[
.B \-bfpx
]
.SH DESCRIPTION
.IX "System V commands" "\fLcol\fR"
.IX  col  ""  "\fLcol\fP \(em filter reverse paper motions"
.IX  "document production"  "col command"  ""  "\fLcol\fP \(em filter reverse paper motions"
.IX  "nroff utilities"  "col command"  "\fLnroff\fP utilities"  "\fLcol\fP \(em filter reverse paper motions"
.IX  "troff utilities"  "col command"  "\fLtroff\fP utilities"  "\fLcol\fP \(em filter reverse paper motions"
.IX  "filter reverse paper motions \(em \fLcol\fR"
.LP
.B col
copies the standard input to the standard output and performs
line overlays implied by reverse
.SM LINEFEED
characters (\s-1ESC\s0\-7 in 
.SM ASCII\s0)
and by forward and reverse half
.SM LINEFEED
characters (\s-1ESC\s0\-9 and 
.SM ESC\s0\-8).  
.B col
is particularly
useful for filtering multicolumn output made with the
.B \&.rt
command of
.BR nroff (1),
and output resulting from use of the
.BR tbl (1)
preprocessor.
.LP
The control characters 
.SM SO 
(\s-1ASCII
code 017), and 
.SM SI 
(016) 
are assumed to start and end text in an alternate character set.
The character set (primary or alternate) associated with each
printing character read is remembered; on output, 
.SM SO 
and 
.SM SI 
characters are generated
where necessary to maintain the correct treatment of each character.
.LP
All control characters are removed from the input except
.SM SPACE\s0,
.SM BACKSPACE\s0,
.SM TAB\s0,
.SM RETURN\s0,
.SM NEWLINE\s0, 
.SM ESC 
(033) followed by one of 7, 8, 9, 
.SM SI , 
.SM SO , 
and 
.SM VT
(013).  This last character is an alternate form of
full reverse
.SM LINEFEED\s0,
for compatibility with some other hardware conventions.
All other non-printing characters are ignored.
.SH SYSTEM V DESCRIPTION
.LP
The System V version of
.B col
converts
.SM SPACE
to
.SM TAB
characters by default.
.SH OPTIONS
.TP
.B \-b
The output device in use is not capable of
backspacing.  In this case, if several characters
are to appear in the
same place, only the last one read will be taken.
.TP
.B \-f
Fine.  Although
.B col
accepts half line motions in its input,
it normally does not produce them on output.
Instead, text that would appear
between lines is moved to the next lower full-line boundary.  The
.B \-f
option suppresses this treatment. In this case the output from
.B col
may contain forward half
.SM LINEFEED
characters (\s-1ESC\s0\-9),
but will still never contain either kind of reverse line motion.
.TP
.B \-h
Convert strings of blanks to
.SM TAB
characters to decrease the printing time.
.TP
.B \-p
Pass escape-sequences that
.B col
does not know about to the output,
rather than stripping them out.
This option is highly discouraged unless 
you are fully aware of the position of the escape
sequences within the text.
.SH SYSTEM V OPTIONS 
.TP
.B \-x
Suppress converting
.SM SPACE
characters to
.SM TAB
characters.  
.SH "SEE ALSO"
.BR nroff (1),
.BR tbl (1),
.BR troff (1)
.SH BUGS
.B col
cannot back up more than 128 lines.
.LP
At most 1600 characters, including
.SM BACKSPACE
characters, are allowed on a line.
.LP
Local vertical motions that would result in backing up over the first
line of the document are ignored.
As a result, the first line must not have any superscripts.
    <    lpr.1 .1  L    lprm.1 .  `    lptest.1  `  p  	  ls.1v  .    
  m4.1v .1      m68k.1 1    ./share/man/man1/colcrt.1                                                                              755       0      12         4166  4424740636  10271                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)colcrt.1 1.15 89/03/26 SMI; from UCB 4.1
.TH COLCRT 1 "22 March 1989"
.SH NAME
colcrt \- filter nroff output for a terminal lacking overstrike capability
.SH SYNOPSIS
.B colcrt
.RB [ " \- " ] 
.RB [ " \-2 " ] 
.RI [ " filename " ".\|.\|. ]"
.SH DESCRIPTION
.IX  colcrt  ""  "\fLcolcrt\fP \(em document previewer"
.IX  "document production"  "colcrt command"  ""  "\fLcolcrt\fP command"
.IX  "preview documents, colcrt command"  ""  "\fLcolcrt\fP command"
.IX  "nroff utilities" colcrt "" "\fLcolcrt\fP \(em filter nroff output for CRT"
.LP
.B colcrt
provides virtual half and reverse
.SM LINEFEED
sequences for terminals without such capability, and on which overstriking
is destructive.  Half
.SM LINEFEED
characters and underlining
(changed to dashing
.RB ` \- ')
are placed on new lines in between the normal output lines.
.SH OPTIONS
.TP
.B \-
Suppress all underlining \(em especially useful for previewing
.I allboxed
tables from
.BR tbl (1).
.TP
.B \-2
Print all half
.SM LINEFEED
characters, effectively double spacing
the output.  Normally, a
minimal space output format is used which suppresses empty lines.
.B colcrt
never suppresses two consecutive empty lines, however.  The
.B \-2
option is useful for sending output to the line printer when the
output contains superscripts and subscripts
which would otherwise be invisible.
.SH EXAMPLE
.LP
A typical use of
.B colcrt
would be
.IP
.ft B
example% tbl exum2.n | nroff \-ms | colcrt \- | more
.ft R
.SH "SEE ALSO"
.BR col (1V),
.BR more (1),
.BR nroff (1),
.BR tbl (1),
.BR troff (1),
.BR ul (1)
.SH BUGS
.\".LP
.\"Should fold underlines onto
.\".SM SPACE
.\"characters even with the
.\".RB ` \- '
.\"option so that
.\"a true underline character would show; if we did this, however,
.\".B colcrt
.\"would not get rid of
.\".IR cu 'd
.\"underlining completely.
.LP
Cannot back up more than 102 lines.
.LP
General overstriking is lost;
as a special case
.RB ` \||\| '
overstruck with
.RB ` \|\-\| '
or underline becomes
.RB ` \|+\| '.
.LP
Lines are trimmed to 132 characters.
.LP
Some provision should be made for processing
superscripts and subscripts
in documents which are already double-spaced.
ho.1v       ed.1 1v       edit.1         egrep.1v         eject.1        else.1    0    end.1     @    endif.1   P    endsw.1   d    enroll.1  d  t    env.1 d      eqn.1 1       error.1       eval.1        ex.1 1        exec.1 o      exit.1 l      expand.1        expr.1v   	    fals./share/man/man1/coloredit.1                                                                           755       0      12         4647  4424740636  10773                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)coloredit.1	1.9 89/03/26 SMI;
.TH COLOREDIT 1 "19 February 1988"
.SH NAME
coloredit \- alter color map segment
.SH SYNOPSIS
.B coloredit 
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "SunView" "coloredit" "" "\fLcoloredit\fR"
.IX "coloredit" "" "\fLcoloredit\fR \(em edit icons"
.IX edit "icons \(em \fLcoloredit\fR"
.LP
.B coloredit
is a SunView application for altering the colors of objects (windows)
selected with the cursor.  These colors may be manipulated in three
ways:
.IP \(bu 3
select color name from a list
.IP \(bu
specify the hue/saturation/value for a color
.IP \(bu
specify the red/green/blue levels for a color
.SH USAGE
.SS Window
The
.B coloredit 
window consists of four sections.
.TP 12
colorlist
An interactive window that lists the available colors for selection.
This list can be scrolled up and down with a scrollbar, and
comprises the contents of the
.B .rgb
file.  Select a color and the corresponding
.SM RGB
and
.SM HSV
value appears in the colorbar section.
.B coloredit
first searches the working directory for
.BR .rgb ,
your home directory, and finally,
.B /usr/lib
this file. 
.IP colorbars
An interactive window with two sets of three sliding bars.
One set is for defining the hue saturation value of the color desired.
The second set is for defining the red-green-blue ratios.
The color can be specified using either set of sliding bars.
.IP palette
A display subwindow divided horizontally into two equal parts.
The top part shows the background color;
the bottom, the foreground color.
If the object has more than 2 colors, all the colors are shown.
The background color is color Index #0.  The color with the highest
Index Number is the foreground color.
.IP logo
A display subwindow containing the
Sun logo in the currently-selected color.
.SS Command Buttons
.LP
The set of command buttons in the colorbars subwindow is as follows.
.TP
.B
Grab
The next object selected will have its color map segment
colors displayed in the \fIcoloredit\fP window.  These colors
may then be manipulated.
.TP
.B
Release
Disassociates the colormap segment and the last object with which those
colors were associated.  The window returns to its default state.
.TP
.B
Undo
Returns the colormap segment to the original colors that the object
being colored had when coloring began.  Returns the object to its 
original colors.
.SH FILES
.PD 0
.TP 20
.B \&./.rgb
.TP
.B ~/.rgb
.TP
.B /usr/lib/.rgb
.PD
.SH SEE ALSO
.BR sunview (1)
  8    id.1 dit  H    if.1 d.1  \    	implot.1g     p    indent.1  \./share/man/man1/colrm.1                                                                               755       0      12         1672  4424740637  10117                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)colrm.1 1.8 89/03/26 SMI; from UCB 4.1
.TH COLRM 1 "9 September 1987"
.SH NAME
colrm \- remove characters from specified columns within each line
.SH SYNOPSIS
.B colrm
[
.I startcol
[
.I endcol
] ]
.SH DESCRIPTION
.IX  colrm  ""  "\fLcolrm\fP \(em remove columns from file"
.IX  files  "colrm command"  files  "\fLcolrm\fP \(em remove columns from"
.IX  columns  "remove from file"
.IX  remove  "columns from file"
.IX  delete  "columns from file"
.B colrm
removes selected columns from a text file.  The text is is
taken from standard input and copied to the standard output with the
specified columns removed.
.LP
If only
.I startcol
is specified, the columns of each line are removed
starting with
.I startcol
and extending to the end of the line.
If both
.I startcol
and
.I endcol
are specified, all columns between
.I startcol
and
.IR endcol ,
inclusive, are removed.
.LP
Column numbering starts with column 1.
.SH "SEE ALSO"
.BR expand (1)
  domainname.1  `  p    dos.1 .1      
dos2unix.1 1  ./share/man/man1/comb.1                                                                                755       0      12           66  4424740637   7657                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-comb.1
.\" @(#)comb.1 1.3 89/03/26 SMI;
mpress.1 |    t  
continue.1     u  cp.1 1      v  cpio.1 e    w  cpp.1  1    x  	crontab.1     y  
crtplot.1g     z  crypt.1     {  csh.1 1      |  csh_builtins.1 |  4  }  csplit.1  4  D  ~  ctags.1   X    ctrace.1  X  h    cu.1c 1   x    cut.1 .1      cxref.1       date.1v       dbx.1 v       	dbxtool.1       dc.1  te      dd.1 ol.      	defa./share/man/man1/comm.1                                                                                755       0      12         3140  4424740637   7726                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)comm.1 1.15 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH COMM 1  "25 March 1989"
.SH NAME
comm \- display lines in common, and lines not in common, between two sorted lists
.SH SYNOPSIS
.B comm
.RB "[ " \-1 \||
.BR \-2 \||
.BR \-3 \||
.BR \-12 \||
.BR \-13 \||
.BR \-23 " ]"
.I filename1
.I filename2
.SH DESCRIPTION
.IX  comm  ""  "\fLcomm\fP \(em display common lines"
.IX  commands  "comm command"  files  "\fLcomm\fP \(em display common lines"
.LP
.B comm
reads
.I filename1
and 
.IR filename2 ,
which should be ordered in
.SM ASCII
collating sequence (see
.BR sort (1V)),
and produces three-column output when no options are specified:
.RS
.TP 3
\(bu
Column 1 contains lines that occur only in
.IR filename1 .
.TP
\(bu
Column 2 contains lines only in
.IR filename2 .
.TP
\(bu
Column 3 contains lines common to both files.
.RE
.LP
The filename
.RB ` \- '
means the standard input.
.SH OPTIONS
.LP
The following options can be used to suppress the indicated columns
from display.  You can specify 
.RB ` \-123 ',
but doing so suppresses all output.
.TP
.B \-1
Suppress column 1; omit lines only in
.IR filename1 .
.TP
.B \-2
Suppress column 2; omit lines only in
.IR filename2 .
.TP
.B \-3
Suppress column 3; omit lines common to both files.
.TP
.B \-12
Suppress columns 1 and 2; only show lines common to both files.
.TP
.B \-13
Suppress columns 1 and 3; only show lines in 
.IR filename2 .
.TP
.B \-23
Suppress columns 2 and 3; only show lines in 
.IR filename1 .
.SH "SEE ALSO"
.BR cmp (1),
.BR diff (1), 
.BR sort (1V),
.BR uniq (1)
.SH BUGS
.LP
The options
.IR suppress ,
rather than
.I select
the columns you indicate.
    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1    
     ftp.1c   
0    gcore.1   
H    generic_args.1   
X    get.1    
p    get_selection.1   
    getopt.1  
  
    getoptcvt.1   
    	getopts.1 
  
    	gfxtool.1 
  
    gigiplot.1g   
    glob.1    
    goto.1      ./share/man/man1/compress.1                                                                            755       0      12        11514  4424740637  10652                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)compress.1 1.12 89/03/26 SMI; from UCB 6.5 5/11/86
.TH COMPRESS 1 "9 September 1987"
.SH NAME
compress, uncompress, zcat \- compress or expand files, display expanded contents
.SH SYNOPSIS
.B compress
.RB [ " \-cfv " ]
[
.B \-b
.I bits
] 
[
.IR filename \&.\|.\|.
]
.LP
.B uncompress
.RB [ " \-cv " ]
[
.IR filename \&.\|.\|.
]
.LP
.B zcat
[
.IR filename .\|.\|.
]
.SH DESCRIPTION
.IX  compress  ""  "\fLcompress\fP \(em compress files"
.IX  uncompress  ""  "\fLuncompress\fP \(em uncompress files"
.IX  zcat  ""  "\fLzcat\fP \(em extract compressed files"
.IX  files  "compress command"  files  "\fLcompress\fP \(em compress files"
.IX  files  "uncompress command"  files "\fLuncompress\fP \(em uncompress files"
.IX  files  "zcat command"  files  "\fLzcat\fP \(em extract compress files"
.LP
.B compress
reduces the size of the named files using
adaptive Lempel-Ziv coding.
Whenever possible, each file is replaced by one with the extension
.BR "\&.\|Z" ,
while keeping the same ownership modes,  as well as access and
modification times.
If no files are specified, the standard input is compressed to the
standard output.
.LP
The amount of compression obtained depends on the size of the
input, the number of
.I bits
per code, and the distribution of common substrings.
Typically, text such as source code or English
is reduced by 50\-60%.
Compression is generally much better than that achieved by
Huffman coding (as used in
.BR pack (1)),
or adaptive Huffman coding
.RB ( oldcompact (1)),
and takes less time to compute.
The 
.I bits 
parameter specified during compression is encoded within
the compressed
file, along with a magic number to ensure that neither
decompression of 
random data nor recompression of compressed data is subsequently
allowed. 
.LP
Compressed files can be restored to their original form using
.BR uncompress .
.LP
.B zcat 
produces uncompressed output on the standard output, but leaves
the compressed 
.B \&.\|Z
file intact.
.SH OPTIONS
.TP
.B \-c
Write to the standard output; no files are changed.
The nondestructive behavior of
.B zcat
is identical to that of
.RB ` "uncompress \-c" '.
.TP
.B \-f
Force compression,
even if the file does not actually shrink,
or the corresponding
.B .\|Z
file already exists.
Except when running in the background (under
.BR /usr/bin/sh ),
if
.B \-f
is not given,
prompt to verify whether an existing
.B .\|Z
file should be overwritten.
.TP
.B \-v
Verbose.
Display the percentage reduction for each file compressed.
.TP
.BI \-b " bits"
Set the upper limit (in bits) for common substring codes.
.I bits
must be between 9 and 16 (16 is the default).
.SH FILES
.TP 20
.B /usr/bin/sh
.SH SEE ALSO
.BR ln (1),
.BR oldcompact (1),
.BR pack (1)
.LP
.IR "A Technique for High Performance Data Compression" ,
Terry A. Welch,
.IR "IEEE Computer" ,
vol. 17, no. 6 (June 1984), pp. 8-19.
.SH DIAGNOSTICS
.LP
Exit status is normally 0.
If the last file was not compressed because it became
larger, the status
is 2.
If an error occurs, exit status is 1.
.TP 10
.BI "Usage: compress [\-fvc] [\-b maxbits] [" filename \fR.\|.\|.\fB]
Invalid options were specified on the command line.
.TP
.B Missing maxbits
Maxbits must follow
.BR \-b \ .
.TP
.IB filename ": not in compressed format"
The file specified to
.B uncompress
has not been compressed.
.br
.ne 3
.TP
.IB filename ": compressed with " xx "bits, can only handle " yy bits
.I filename
was compressed by a program that could deal with
more
.I bits
than the compress code on this machine.
Recompress the file with smaller
.IR bits .
.br
.ne 5
.TP
.IB filename ": already has .\|Z suffix -- no change"
The file is assumed to be already compressed.
Rename the file and try again.
.\".TP
.\".IR filename ": filename too long to tack on .\|Z"
.\"The file cannot be compressed because its name is longer than
.\"12 characters.
.\"Rename and try again.
.\"This message does not occur on BSD systems.
.TP
.IB filename ": already exists; do you wish to overwrite (y or n)?"
Respond
.B y
if you want the output file to be replaced;
.B n
if not.
.TP
.B uncompress: corrupt input
A
.SM SIGSEGV
violation was detected, which usually means that the input
file is corrupted.
.TP
.BI Compression: "  xx.xx" %
Percentage of the input saved by compression.
(Relevant only for
.BR \-v \.)
.TP
.B \-\|\- not a regular file: unchanged
When the input file is not a regular file, (such as a
directory), it is left unaltered.
.TP
.BI "\-\|\- has " xx " other links: unchanged"
The input file has links; it is left unchanged.  See
.BR ln (1)
for more information.
.TP
.B \-\|\- file unchanged
No savings are achieved by compression.
The input remains uncompressed.
.SH "BUGS"
Although compressed files are compatible between
machines with large memory,
.BR \-b 12
should be used for file transfer to architectures with 
a small process data space (64KB or less).
.LP
.B compress
should be more flexible about the existence of the
.B .\|Z
suffix.
a.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1./share/man/man1/continue.1                                                                            755       0      12           76  4424740637  10564                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)continue.1 1.8 89/03/26 SMI; 
 1    w  cpp.1 io    x  	crontab.1       y  
crtplot.1g     z  crypt.1     {  csh.1 yp     |  csh_builtins.1    4  }  csplit.1 1 |  D  ~  ctags.1   X    ctrace.1 .1   h    cu.1c .1  x    cut.1 .1      cxref.1       date.1v       dbx.1 te      	dbxtool.1 v       dc.1 ol.      dd.1 c.1      	default.1        delta.1       $ defaults_from_input.1  ./share/man/man1/cp.1                                                                                  755       0      12         6441  4424740637   7404                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cp.1 1.19 89/03/26 SMI; from UCB 4.1
.TH CP 1 "22 March 1989"
.SH NAME
cp \- copy files
.SH SYNOPSIS
.B cp
[
.B \-ip
]
.I filename1
.I filename2
.br
.B cp
.B \-rR
[
.B \-ip
] 
.I directory1 directory2
.br
.B cp
[
.B \-iprR
]
.I filename
\&.\|.\|.
.I directory
.SH DESCRIPTION
.IX  cp  ""  "\fLcp\fP \(em copy files"
.IX  files  "cp command"  files  "\fLcp\fP \(em copy files"
.IX  files  copy
.IX  copy  files
.LP
.B cp
copies the contents of
.I filename1
onto
.IR filename2 .
The mode and owner of
.I filename2
are preserved if it already existed;
the mode of the source file is used otherwise.  If 
.I filename1
is a symbolic link, or a duplicate hard link,
the contents of the file that the link refers to
are copied; links are not preserved.
.LP
In the second form,
.B cp
recursively copies
.IR directory1 ,
along with its contents and subdirectories, to 
.IR directory2 .
If 
.I directory2
does 
.I not
exist,
.B cp
creates it and duplicates the files and subdirectories of 
.I directory1
within it.  If
.I directory2
does exist, 
.B cp 
makes a copy of the
.I directory1
directory within 
.I directory2
(as a subdirectory), along with its files and subdirectories.
.LP
In the third form, each
.I filename
is copied to the indicated
.IR directory ;
the basename of the copy corresponds to that of
the original.  The destination
.I directory
must already exist for the copy to succeed.
.LP
.B cp
refuses to copy a file onto itself.
.SH OPTIONS
.TP
.B \-i
Interactive.  Prompt for confirmation whenever
the copy would overwrite an existing file.  A
.B y
in answer confirms that the copy should proceed.
Any other answer prevents
.B cp
from overwriting the file.
.TP
.B \-p
Preserve.  Duplicate not only the contents of the original file
or directory, but also the modification time and permission modes.
.TP
.B \-r
.PD 0
.TP
.B \-R
Recursive.  If any of the source files are directories,
copy the directory along with its files (including any
subdirectories and their files); the destination
must be a directory.
.PD
.SH EXAMPLES
To copy a file:
.RS
.nf
.ft B
example% cp goodies goodies.old
example% ls goodies*
goodies goodies.old
.ft R
.fi
.RE
.br
.ne 10
.LP
To copy a directory, first to a new, and then to an
existing destination directory:
.LP
.RS
.ft B
.nf
example% ls ~/bkup
/usr/example/fred/bkup not found
example% cp \-r ~/src ~/bkup
example% ls \-R ~/bkup
x.c y.c z.sh
example% cp \-r ~/src ~/bkup
example% ls \-R ~/bkup
src x.c y.c z.sh
.sp .5
src:
x.c y.c z.sh
.fi
.ft R
.RE
.LP
To copy a list of files to a destination directory:
.RS
.ft B
example% cp ~/src/* \ \ /tmp
.ft R
.RE
.SH "SEE ALSO"
.BR cat (1V),
.BR ln (1),
.BR mv (1),
.BR pr (1V),
.BR rcp (1C),
.BR tar (1)
.SH WARNINGS
.LP
.I Beware
of a recursive copy like this:
.IP
.B "example% cp \-r ~/src ~/src/bkup"
.LP
which keeps copying files until it fills the entire file system.
.SH BUGS
.B cp
copies the contents of files pointed to by symbolic links.  It does 
.I not
copy the symbolic link itself.  This can lead to inconsistencies
when directory hierarchies are replicated.  Filenames that were
linked in the original hierarchy are no longer linked in the
replica.  This is also true for files with multiple hard links.
See
.BR ln (1)
for details about symbolic links and hard links.  You can 
preserve links in replicated hierarchies by using
.BR tar (1)
to copy them.
   
  m4.1v .1      m68k.1 1      mach.1 k    
  machid.1 1 k      mail.1 1     $ mailrc_to_defaults.1 $        
mailtool.1       make.1 l       man.1 ke  4    	mc68010../share/man/man1/cpio.1                                                                                755       0      12        10343  4424740637   7750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cpio.1 1.21 89/03/26 SMI; from S5R2 6.3 83/09/02
.TH CPIO 1 "25 March 1989"
.SH NAME
cpio \- copy file archives in and out
.SH SYNOPSIS
.B "cpio \-o"
[ 
.B aBcv 
]
.br
.B "cpio \-i"
[ 
.B bBcdfmrsStuv6 
]  
[ 
.I patterns
]
.br
.B "cpio \-p"
[ 
.B adlmuv
]  
.I directory
.SH DESCRIPTION
.IX  cpio  ""  "\fLcpio\fP \(em copy archives"
.IX  files  "cpio command"  files  "\fLcpio\fP \(em copy archives"
.IX  archive  "cpio command"  "" "\fLcpio\fP \(em copy archive"
.IX  copy  archives
.B cpio
copies files in to and out from a 
.B cpio 
copy archive.  The archive (built by
.RB ` "cpio \-o" ')
contains pathname and status information, along with the
contents of one or more archived files.
.SH OPTIONS
.TP
.B \-o
Copy out an archive.  Read the standard input for a list of 
pathnames, then copy the named files to the standard
output in archive form \(em including pathname and status
information.
.RS
.TP
.B a
Reset the access times of input files after they have been copied.
.TP
.B B
Output is to be blocked at 5120 bytes to the record.  This does
not apply to the 
.I pass
option.  This option is only meaningful with data directed to
raw magnetic devices, such as
.RB ` "/dev/rmt\fI?" '.
.TP
.B c
Write
.I header
information in
.SM ASCII
character form for portability.
.TP
.B v
Verbose. A list of filenames is displayed.  When used with the 
.B t
option, the table of contents looks like the output of an 
.RB ` "ls \-l" '
command (see
.BR ls (1V)).
.RE
.TP
.B \-i
Copy in an archive.  Read in an archive from the standard input
and extract files with names matching filename substitution
.IR patterns ,
supplied as arguments.
.IP
.I patterns
are similar to those in
.BR sh (1)
or
.BR csh (1),
save that
within
.BR cpio , 
the metacharacters 
.RB ` ? ', 
.RB ` * '
and
.RB ` "[ " .\|.\|.\| " ]" ' 
also match the
.RB ` / '
(slash) 
character.  If no
.I patterns
are specified, the default is 
.B * 
(select all files).
.RS
.TP
.B b
Swap both bytes and half-words after reading in data.
.TP
.B B
Input is to be blocked at 5120 bytes to the record.  This does
not apply to the 
.I pass
option.  This option is only meaningful with data received from
raw magnetic devices, such as
.RB ` "/dev/rmt\fI?" '.
.TP
.B d
Create directories as needed.
.TP
.B f
Copy in all files except those matching
.IR patterns .
.TP
.B m
Retain previous file modification time.
This option is ineffective on
directories that are being copied.
.TP
.B r
Interactively
rename files.  If the user types a null line, the file is skipped.
May not be used with the
.B \-p
option.
.TP
.B s
Swap bytes after reading in data.
.TP
.B S
Swap halfwords after reading in data.
.TP
.B t
Print a table of contents
of the input archive.  No files are created.
.TP
.B u
Copy unconditionally.
Normally, an older file will not replace a newer file with the same 
name.
.TP
.B 6
Process
.SM UNIX 
Version-6 files.  
.RE
.TP
.B \-p
One pass.  Copy in and out in a single operation.  Destination 
pathnames are interpreted relative to the named
.IR directory .
.RS
.TP
.B l
Whenever possible, link files rather than copying them.  
.RE
.SH EXAMPLES
.LP
To copy the contents of a directory into an archive:
.IP
.B "example% ls | cpio \-o > /dev/mt0"
.LP
To read a cpio archive from a tape drive:
.IP
.B "example% cpio -icdB < /dev/rmt0"
.LP
To duplicate the 
.B olddir
directory hierarchy in the
.B newdir
directory:
.RS
.nf
.ft B
example% cd olddir
example% find . \-depth \-print | cpio \-pdl newdir
.fi
.ft R
.RE
.LP
The trivial case
.RS
.nf
.ft B
example% find \|.\| \-depth \-print \|\(bv \|cpio \|\-oB \|>/dev/rmt0
.fi
.ft R
.RE
.LP
can be handled more efficiently by:
.IP
.B "example% find \|.\| \-cpio \|/dev/rmt/0m"
.LP
.B cpio
archive tapes from other sites may have bytes swapped
within the archive.  Although the
.B \-is
option only 
swaps the data bytes and not those in the header
.B cpio
recognizes tapes like this and swaps the bytes in the header
automatically.
.SH "SEE ALSO"
.BR ar (1V),
.BR csh (1),
.BR find (1),
.BR ls (1V),
.BR sh (1),
.BR tar (1),
.BR cpio (5)
.SH BUGS
.LP
.B cpio
does not support multiple volume tapes.
.LP
Pathnames are restricted to 128 characters.  If there are too many
unique linked files, 
.B cpio
runs out of memory and linking information is lost
thereafter.  Only the super-user can copy special files.
     4  onintr.1      5  organizer.1     6  othertools.1  6    7  
overview.1     8  pack.1   $  9  page.1 w  8  :  
pagesize.1 8  L  ;  passwd.1  L  \  <  paste.1   l  =  pcat.1    |  >  pdp11.1     ?  perfmeter.1     @  ./share/man/man1/cpp.1                                                                                 755       0      12        34112  4424740640   7572                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cpp.1 1.35 89/03/26 SMI; from S5R3
.TH CPP 1 "25 March 1989"
.SH NAME
cpp \- the C language preprocessor
.SH SYNOPSIS
.B /usr/lib/cpp 
[
.B \-BCHMpPRT
] [
.B \-undef
] [
.BI \-D name
]
.if n .ti +5
[
.BI \-D name = def
] [
.BI \-I directory
] [
.BI \-U name
]
.if n .ti +5
.if t .ti +.5i
[
.BI \-Y directory
] [
.I input-file
[
.I output-file
] ]
.SH DESCRIPTION
.IX "compiler preprocessors" cpp "" "\fLcpp\fR \(em C preprocessor"
.IX  cpp  ""  "\fLcpp\fP \(em C preprocessor"
.IX  "programming languages"  "cpp command"  ""  "\fLcpp\fP \(em C preprocessor"
.IX  "languages"  "cpp command"  ""  "\fLcpp\fP \(em C preprocessor"
.IX  "C programming language"  "cpp command"  ""  "\fLcpp\fP \(em C preprocessor"
.LP
.B cpp
is the C language preprocessor.
It is invoked as the first pass of
any C compilation started with the
.BR cc (1V)
command, and
may also used as a first-pass preprocessor for other Sun compilers.
.LP
Although 
.B cpp
can be used as a macro processor, this is not normally
recommended, as its output is geared toward that which would be
acceptable as input to a compiler's second pass.
Thus, the preferred way to invoke
.B cpp
is through the 
.BR cc (1V),
or another compilation command.
For general-purpose macro-processing, see
.BR m4 (1V),
and the
.TX PUL .
.LP
.B cpp
optionally accepts two filenames as arguments.
.I input-file
and
.I output-file
are, respectively, the input and output files for the preprocessor.
They default to the standard input and the standard output.
.SH OPTIONS
.TP 13
.B \-B
Support the C++ comment indicator
.RB ` /\|/ '.
With this indicator everything on the line after the
.B /\|/
is treated as a comment.
.TP
.B \-C
Pass all comments (except those that appear on 
.B cpp
directive lines) through the preprocessor.
By default,
.B cpp
strips out C-style comments.
.TP
.B \-H
Print the pathnames of included files, one per line on the standard
error.
.TP
.B \-M
Generate a list of makefile dependencies and write them to the
standard output.
This list indicates that the object file which would be generated from the
input file depends on the input file as well as the include files
referenced.
.TP
.B \-p
Use only the first eight characters to distinguish preprocessor
symbols, and issue a warning if extra tokens appear at the end of a
line containing a directive.
.TP
.B \-P
Preprocess the input without producing the line control
information used by the next pass of the C compiler.
.TP
.B \-R
Allow recursive macros.
.TP
.B \-T
Use only the first eight characters for distinguishing
different preprocessor names.
This option is included for backward
compatibility with systems which always use only the first eight characters.
.TP
.B \-undef
Remove initial definitions for all predefined symbols.
.TP
.BI \-D name
Define
.I name
as 1 (one). 
This is the same as if a
.BI \-D name =1
option appeared on the 
.B cpp
command line, or as if a
.RS
.IP
.BI #define " name " 1
.RE
.IP
line appeared in the source file that 
.B cpp
is processing.
.TP
.BI \-D name = def
Define
.I name
as if by a
.B #define
directive.
This is the same as if a
.RS
.IP
.BI #define " name " def
.RE
.IP
line appeared in the source file that 
.B cpp
is processing.
The
.B \-D
option has lower precedence than the
.B \-U
option.
That is, if the same name is used in both a
.B \-U
option and a
.B \-D
option, the name will be undefined regardless of the order of the options.
.PD
.br
.ne 8
.TP
.BI \-I directory
Insert 
.I directory
into the search path for
.B #include
files with names beginning with
.RB  ` / '.
.I directory
is inserted ahead of the
standard list of ``include'' directories.
Thus,
.B #include
files with names enclosed in
double-quotes (\fB"\fR)
are searched for first in the directory of the file with the
.B #include
line, then in directories named with
.B \-I
options, and lastly, in directories from the standard list.
For
.B #include
files with names enclosed in angle-brackets
.RB  ( <\|> ),
the directory of the file with the
.B #include
line is not searched.
See
.B Details
below for exact details of this search order.
.TP
.BI \-U name
Remove any initial definition of
.IR name ,
where
.I name
is a symbol that is predefined by a particular preprocessor.
Here is a partial list of symbols that may be predefined, depending upon 
the application architecture of the system:
.RS
.RS
.TP 20
Operating System:
.PD 0
.BR ibm , 
.BR gcos ,
.BR os ,
.BR tss 
and
.BR unix
.TP 20
Hardware:
.BR interdata ,
.BR pdp11 ,
.BR u370 ,
.BR u3b ,
.BR u3b2 ,
.BR u3b5 ,
.BR u3b15 ,
.BR u3b20d ,
.BR vax ,
.BR mc68000 ,
.BR mc68010 ,
.BR mc68020 ,
.BR ns32000 ,
.BR i\s-1APX\s0286 ,
.BR i386 ,
.BR sparc ,
and
.BR sun
.TP 20
.SM UNIX\s0 system variant:
.BR \s-1RES\s0 ,
and
.B RT
.TP 20
.RB The " lint" "(1V) command:"
.B lint
.PD
.RE
.RE
.IP
The symbols 
.B sun
and
.B unix
are defined for all Sun systems, as is the value returned by the
.B mach
command.
For Sun-4 systems, this value would be
.BR sparc .
In addition,
.B mc68000
is defined for Sun-2, Sun-3, and Sun-3x systems.
.TP
.BI \-Y directory
Use directory
.I directory
in place of the standard list of directories when searching for
.B #include
files.
.SH USAGE
.SS Directives
.LP
All
.B cpp
directives start with a hash symbol
.RB ( # )
as the first character on a line.
White space 
(\s-1SPACE\s0
or
.SM TAB
characters) can appear after the initial
.B #
for proper indentation.
.
.TP
.BI #define " name token-string"
Replace subsequent instances of
.I name
with
.IR token-string .
.
.HP
.B #define
.IB name ( argument
.RB [ , 
.IR argument "] .\|.\|."
.BI ) " token-string"
.br
There can be no space between
.I name
and the 
.RB ` ( '.
Replace subsequent instances of
.IR name ,
followed by a parenthesized list of arguments, with
.IR token-string ,
where each occurrence of an
.I argument
in the
.I token-string
is replaced by the corresponding token in the comma-separated list.
When a macro with arguments is expanded, the arguments are placed
into the expanded
.I token-string
unchanged.
After the entire
.I token-string
has been expanded,
.B cpp
re-starts its scan for names to expand at the beginning of the newly
created
.IR token-string .
.TP
.BI #undef " name"
Remove any definition for the symbol
.IR name .
No additional tokens are permitted on the directive line after
.IR name .
.TP
\fB#include "\fIfilename\|\fB"\fR
.PD 0
.TP
.BI #include " " < filename >
.PD
Read in the contents of
.I filename 
at this location.
This data is processed by
.BR cpp 
as if it were part of the current file.
When the
.BI < filename >
notation is used,
.I filename
is only searched for in the standard \(lqinclude\(rq directories.
See the
.B \-I
and
.B \-Y
options above for more detail.
No additional tokens are permitted on the directive line after the final
`\fB"\fR' or
.RB ` > '.
.
.br
.ne 8
.TP
\fB#line\fI integer-constant\fB "\fIfilename\fB"\fR
Generate line control information for the next pass of the C compiler.
.I integer-constant
is interpreted as the line number of the next line and
.I filename
is interpreted as the file from where it comes.
If \fB"\fIfilename\fB"\fR is not given, the current filename is unchanged.
No additional tokens are permitted on the directive line after
the optional
.IR filename .
.br
.ne 8
.TP
.BI #if " constant-expression"
Subsequent lines up to the matching
.BR #else ,
.B #elif ,
or
.B #endif
directive, appear in the output only if
.I constant-expression
yields a nonzero value.
All binary non-assignment C operators, including 
.RB ` && ',
.RB ` |\|| ',
and
.RB ` , ',
are legal in
.IR constant-expression .
The
.RB ` ?: '
operator, and the unary
.RB ` \- ',
.RB ` ! ',
and
.RB ` \s+2~\s0 '
operators, are also legal in
.IR constant-expression .
.IP
The precedence of these operators is the same as that for C.
In addition, the unary operator
.BR defined ,
can be used in
.I constant-expression
in these two forms:
.RB ` "defined"
.BI ( " name " )\fR'
or
.RB ` defined
.IR name '.
This allows the effect of
.BR #ifdef " and " #ifndef
directives (described below) in the
.B #if
directive.
Only these operators, integer constants, and names that
are known by
.B cpp
should be used within
.IR constant-expression .
In particular, the
.B sizeof
operator is not available.
.
.TP
.BI #ifdef " name"
Subsequent lines up to the matching
.BR #else ,
.BR #elif ,
or
.B #endif
appear in the output only if
.I name
has been defined, either with a
.B #define
directive or a
.B \-D
option, and in the absence of an intervening
.BR #undef 
directive.
No additional tokens are permitted on the directive line after
.IR name .
.
.TP
.BI #ifndef " name"
Subsequent lines up to the matching
.BR #else ,
.BR #elif ,
or
.BR #endif
appear in the output only if
.I name
has
.I not
been defined, or if its definition has been removed with an
.B #undef
directive.
No additional tokens are permitted on the directive line after
.I name .
.
.TP
.BI #elif " constant-expression"
Any number of
.B #elif
directives may appear between an
.BR #if ,
.BR #ifdef ,
or
.B #ifndef
directive and a matching
.B #else
or
.B #endif
directive.  The lines following the
.B #elif
directive appear in the output only if all of the
following conditions hold:
.RS
.RS
.TP 3
\(bu
.PD 0
The
.I constant-expression
in the preceding
.B #if
directive evaluated to zero, the
.I name
in the preceding
.B #ifdef
is not defined, or the
.I name
in the preceding
.B #ifndef
directive
.I was
defined.
.TP
\(bu
The
.I constant-expression
in all intervening
.B #elif
directives evaluated to zero.
.TP
\(bu
The current
.I constant-expression
evaluates to non-zero.
.PD
.RE
.RE
.IP
If the
.I constant-expression
evaluates to non-zero, subsequent
.B #elif
and
.B #else
directives are ignored up to the matching
.BR #endif .
Any
.I constant-expression
allowed in an
.B #if
directive is allowed in an
.B #elif
directive.
.
.TP
.BI #else
This inverts the sense of the conditional directive
otherwise in effect.  If the preceding conditional
would indicate that lines are to be included, then lines between the 
.B #else
and the matching
.B #endif
are ignored.  If the preceding conditional indicates that lines
would be ignored, subsequent lines are included in the output.
Conditional directives and corresponding
.B #else
directives can be nested.
.TP
.B #endif
End a section of lines begun by one of the conditional directives
.BR  #if ,
.BR #ifdef ,
or
.BR #ifndef .
Each such directive must have a matching
.BR #endif .
.SS Macros
.LP
Formal parameters for macros are recognized in 
.B #define 
directive bodies,
even when they occur inside character constants and quoted strings.
For instance, the output from:
.RS
.sp .5v
.nf
.B #define abc(a) |\|\ea|
.B abc(xyz)
.fi
.RE
.LP
is the seven characters
.RB `` \ |\|`xyz\|| ''
(\s-1SPACE\s0,
vertical-bar, backquote, x, y, z, vertical-bar).  Macro names are not
recognized within character constants or quoted strings during the
regular scan.  Thus:
.RS
.sp .5v
.nf
.B #define abc xyz
\fBprintf("abc");\fR
.fi
.RE
.LP
does not expand
.B abc
in the second line, since it is inside
a quoted string that is not part of a 
.B #define 
macro definition.
.LP
Macros are not expanded while processing a 
.B #define 
or
.BR #undef .  
Thus:
.RS
.sp .5v
.nf
.B #define abc zingo
.B #define xyz abc
.B #undef abc
.B xyz
.fi
.RE
.LP
produces 
.BR abc .
The token appearing immediately after an
.B #ifdef
or 
.B #ifndef
is not expanded.
.LP
Macros are not expanded during the scan which determines
the actual parameters to another macro call.  Thus:
.RS
.sp .5v
.nf
.B #define reverse(first,second)second first
.B #define greeting hello
.B reverse(greeting,
.B #define greeting goodbye
.B )
.fi
.RE
.LP
produces 
.RB `` " #define hello goodbye  hello" ''.
.SS Output
.LP
Output consists of a copy of the input file, with modifications, plus
lines of the form:
.IP
\fB#\fIlineno\ \fB"\ \fIfilename\|\fB"\ \fB"\fIlevel\fB\|" \fR
.LP
indicating the original source line number and filename of the following
output line and whether this is the first such line after an include file
has been entered
.RB (\fIlevel\fP= 1 ),
the first such line after an include
file has been exited
.RB (\fIlevel\fP= 2 ),
or any other such line
.RI ( level
is empty).
.SS Details
.SS "\fIDirectory Search Order\fP"
.LP
.B #include 
files is:
.RS
.TP 4
1.
The directory of the file that contains the 
.B #include 
request (that is, 
.B #include 
is relative to the file being scanned when the request is made).
.TP
2.
The directories specified by
.B \-I
options, in left-to-right order.
.TP
3.
The standard directory(s)
.RB ( /usr/include
on
Sun\s-1OS\s+1
systems).
.RE
.SS "\fISpecial Names\fR"
.LP
Two special names are understood by
.BR cpp .
The name
.B _\|\|_\s-1LINE\s+1_\|\|_
is defined as the current line number (a decimal integer) as known by
.BR cpp ,
and
.B _\|\|_\s-1FILE\s+1_\|\|_
is defined as the current filename (a C string) as known by
.BR cpp .
They can be used anywhere (including in macros) just as any other defined name.
.SS "\fINewline Characters\fR"
.LP
A 
.SM NEWLINE
character terminates a character constant or quoted string.
An escaped
.SM NEWLINE
(that is, a backslash immediately
followed by a 
.SM NEWLINE\s0)
may be used in the body of a 
.B #define 
statement to continue
the definition onto the next line.  The escaped
.SM NEWLINE
is not included in the macro value.
.SS \fIComments\fR
.LP
Comments are removed (unless the
.B \-C
option is used on the command line).
Comments are also ignored, except that a comment terminates a token.
.SH FILES
.PD 0
.TP 20
.B /usr/include
standard directory for
.B #include
files
.PD
.SH SEE ALSO
.BR cc (1V),
.BR m4 (1V)
.LP
.TX PUL
.br
.ne 5
.SH DIAGNOSTICS
.LP
The error messages produced by
.B cpp
are intended to be self-explanatory.  The line number and filename
where the error occurred are printed along with the diagnostic.
.SH NOTES
.LP
When
.SM NEWLINE
characters were found in argument lists for macros
to be expanded, some previous versions of
.B cpp
put out the
.SM NEWLINE
characters as they were found and expanded.
The current version of
.B cpp
replaces them with 
.SM SPACE
characters.
.br
.ne 5
.LP
Because the standard directory for included files
may be different in different environments,
this form of
.B #include
directive:
.IP
.B #include <file.h>
.LP
should be used, rather than one with an absolute path,
like:
.IP
\fB#include "/usr/include/file.h"\fR
.LP
.B cpp
warns about the use of the absolute pathname.
.BR cpp -type
line number information in the output.
.TP
.B \-pg
Prepare the object code to collect data for profiling with
.BR gprof (1).
Invokes a run-time recording mechanism that produces a
.B gmon.out
file (at normal termination).  
.TP
.B \-pic
Produce position-independent code.  Each reference to a global datum is
generated as a dereference of a pointer in the global offset table.
Each function call is generated in pc-relative ./share/man/man1/crontab.1                                                                             755       0      12         5000  4424740640  10412                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)crontab.1 1.13 89/03/26 SMI; from S5R3
.TH CRONTAB 1 "22 March 1989"
.SH NAME
crontab \- install, edit, remove or list a user's crontab file
.SH SYNOPSIS
.B crontab
[
.I filename
]
.br
.B crontab
.B \-e
[
.I username
]
.br
.B crontab
.B \-l
[
.I username
]
.br
.B crontab
.B \-r
[
.I username
]
.SH DESCRIPTION
.IX "crontab command" "" "\fLcrontab\fR command"
.LP
.B crontab
copies the specified file,
or the standard input if no file is specified,
into a directory that holds all users'
.B crontab
files.  A user's
.B crontab
file lists commands that are to be executed on behalf of that user at
specified times on specified dates; the format of these files is
described in
.BR crontab (5).
.LP
If the file
.BR /var/spool/cron/at.allow
exists, only users whose username appears in it can use 
.BR crontab .
If that file does
.I not
exist, however, 
.B crontab 
checks the
.B /var/spool/cron/at.deny
file to determine if the user
should be denied the use of
.BR crontab .
If neither file exists, only the super-user is allowed to
submit a
.B crontab
job.  If
.B at.allow
does not exist and
.B at.deny
exists and is empty, global usage is permitted.
The allow/deny files consist of one user name
per line.
.SH OPTIONS
.TP
.B \-e
Make a copy of the current user's
.B crontab
file, or create an empty file if it does not exist, and edit
that file.  The
.BR vi (1)
editor will be used unless the environment variable
.SB VISUAL
or
.SB EDITOR
indicates an alternate editor.
When editing is complete, install the file as the user's
.B crontab
file if it was modified.
If a
.I username
is given, the specified user's
.B crontab
file is edited, rather than the current user's
.B crontab
file; this may only be done by the super-user.
.TP
.B \-l
List the user's
.B crontab
file.
.TP
.B \-r
Remove the current user's
.B crontab
file from the
.B crontab
directory.
If a
.I username
is given, the specified user's
.B crontab
file is removed, rather than the current user's
.B crontab
file; this may only be done by the super-user.
.SH FILES
.PD 0
.TP 25
.B /var/spool/cron
main cron directory
.TP
.B /var/spool/cron/crontabs
spool area
.TP
.B /var/spool/cron/at.allow
list of allowed users
.TP
.B /var/spool/cron/at.deny
list of denied users
.PD
.SH SEE ALSO
.BR sh (1),
.BR crontab (5),
.BR cron (8)
.SH WARNINGS
.LP
If you inadvertently enter the
.B crontab
command with no argument, do not attempt to get out by typing
\s-1CTRL-D\s0.
This removes all entries in your
.B crontab
file.  Instead, exit by typing your interrupt character
(normally 
\s-1CTRL-C\s0).
./share/man/man1/crtplot.1g                                                                            755       0      12           66  4424740640  10567                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)crtplot.1g 1.4 89/03/26 SMI;
 csh.1 yp     |  csh_builtins.1    4  }  csplit.1 1 |  D  ~  ctags.1   X    ctrace.1 .1   h    cu.1c .1  x    cut.1 .1      cxref.1       date.1v       dbx.1 te      	dbxtool.1 v       dc.1 ol.      dd.1 c.1      	default.1        delta.1       $ defaults_from_input.1    <     defaults_merge.1    \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 $   ./share/man/man1/crypt.1                                                                               755       0      12         5723  4424740640  10137                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)crypt.1 1.21 89/03/26 SMI;
.TH CRYPT 1 "9 September 1987"
.SH NAME
crypt \- encode or decode a file
.SH SYNOPSIS
.B crypt
[
.I password
]
.SH DESCRIPTION
.IX  crypt  ""  "\fLcrypt\fP \(em encrypt"
.IX  decrypt  ""  "\fLcrypt\fP \(em decrypt"
.IX  files  "crypt command"  files  "\fLcrypt\fP \(em encrypt/decrypt"
.IX  "encode files" crypt "" \fLcrypt\fR
.IX  "decode files" crypt "" \fLcrypt\fR
.B crypt
encrypts and decrypts the contents of a file.
.B crypt
reads from the standard input and writes on the standard output.  The
.I password
is a key that selects a particular transformation.  If no
.I password
is given,
.B crypt
demands a key from the terminal and turns off printing while the key is
being typed in.
.B crypt
encrypts and decrypts with the same key:
.LP
.RS
.nf
.ft B
example% crypt key <\fIclear.\|file\fP >\fIencrypted.\|file\fP
example% crypt key <\fIencrypted.\|file\fP | pr
.ft R
.fi
.RE
will print the contents of 
.IR clear . \|file .
.LP
Files encrypted by
.B crypt
are compatible with those treated by the editors
.BR ed (1), 
.BR ex (1)
and
.BR vi (1)
in encryption mode.
.LP
The security of encrypted files depends on three factors:  the
fundamental method must be hard to solve; direct search of the key
space must be infeasible; \(lqsneak paths\(rq by which keys or
cleartext can
become visible must be minimized.
.LP
.B crypt
implements a one-rotor machine designed along the lines of the German
Enigma, but with a 256-element rotor.  Methods of attack on such
machines are widely known, thus
.B crypt
provides minimal security.
.LP
The transformation of a key into the internal
settings of the machine is deliberately designed
to be expensive, that is, to take a substantial
fraction of a second to compute.  However, if
keys are restricted to (say) three lower-case letters, then encrypted
files can be read by expending only a substantial fraction of five
minutes of machine time.
.LP
Since the key is an argument to the
.B crypt
command, it is potentially visible to users executing
.BR ps (1)
or a derivative command.  To minimize this possibility,
.B crypt
takes care to destroy any record of the key
immediately upon entry.  No
doubt the choice of keys
and key security are the most vulnerable aspect of
.B crypt.
.SH FILES
.TP 20
.B /dev/tty
for typed key
.SH "SEE ALSO"
.BR des (1),
.BR ed (1),
.BR ex (1),
.BR ps (1),
.BR vi (1),
.BR makekey (8)
.\".SH BUGS
.\"There is no warranty of merchantability nor any warranty
.\"of fitness for a particular purpose nor any other warranty,
.\"either express or implied, as to the accuracy of the
.\"enclosed materials or as to their suitability for any
.\"particular purpose.  Accordingly, Bell Telephone
.\"Laboratories assumes no responsibility for their use by the
.\"recipient.   Further, Bell Laboratories assumes no obligation
.\"to furnish any assistance of any kind whatsoever, or to
.\"furnish any additional information or documentation.
.SH RESTRICTIONS
.LP
This program is not available on software shipped outside the U.S.
in.1        	logname.1 1       logo./share/man/man1/csh.1                                                                                 755       0      12       223337  4424740641   7617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)csh.1 1.69 89/03/26 SMI; from UCB 4.3
.ds ~ \u\(ap\d
.ds ^ \d\s+2^\s0\u
.ds ' \s+2\(fm\s0
.if n .ds _ _
.if t .ds _ __
.\"	csh_built-ins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.TH CSH 1 "22 March 1989"
.SH NAME
csh \- a shell (command interpreter) with a C-like syntax and advanced interactive features
.SH SYNOPSIS
.B csh
[
.B \-bcefinstvVxX
]
[
.IR argument .\|.\|.
]
.SH DESCRIPTION
.IX csh  ""  "\fLcsh\fR, C shell"  ""
.LP
.BR csh ,
the C shell, is a command interpreter with a syntax reminiscent of C.
It provides a number of convenient features for interactive use
that are not available with the standard (Bourne) shell, including
filename completion, command aliasing, history substitution, job
control, and a number of built-in commands.
As with the standard shell, the C shell provides variable, command and
filename substitution.
.SS Initialization and Termination
.IX "files" "cshrc" "" "\fL.cshrc\fR and the C shell"
.IX "files" "login" "" "\fL.login\fR and the C shell"
.IX "files" "logout" "" "\fL.logout\fR and the C shell"
.IX "C shell" "cshrc file" "" "\fL.cshrc\fR file"
.IX "C shell" "login file" "" "\fL.login\fR file"
.IX "C shell" "logout file" "" "\fL.logout\fR file"
.IX "cshrc file" "" "\fL.cshrc\fR file"
.IX "login file" "" "\fL.login\fR file"
.IX "logout file" "" "\fL.logout\fR file"
.LP
When first started, the C shell normally performs commands from the
.B \&.cshrc
file in your home directory,
provided that it is readable and you either own it or your real
group
.SM ID
matches its group
.SM ID\s0.
If the shell is invoked with a name that starts with
.RB  ` \-  ',
as when started by
.BR login (1),
the shell runs as a
.I login
shell.  In this case,
after executing commands from the
.B \&.cshrc
file, the shell executes commands from the
.B \&.login
file in your home directory;
the same permission checks as those for
.B \&.cshrc
are applied to this file.
Typically, the
.B \&.login
file contains commands to specify the terminal type and
environment.
.LP
As a login shell terminates, it performs commands from the
.B \&.logout
file in your home directory;
the same permission checks as those for
.B \&.cshrc
are applied to this file.
.SS Interactive Operation
.LP
After startup processing is complete, an interactive C shell
begins reading commands from the terminal, prompting with
.IB hostname %
(or
.IB hostname #
for the super-user).
The shell then repeatedly performs the following actions:
a line of command input is read and broken into
.IR words .
This sequence of words is placed on the history list and
then parsed, as described under
.SM USAGE\s0,
below.  Finally, the shell executes each command in the current line.
.SS Noninteractive Operation
.LP
When running noninteractively, the shell does not prompt for
input from the terminal.  A noninteractive C shell can
execute a command supplied as an
.I argument
on its command line, or interpret commands from a script.
.SH OPTIONS
.IX  "argument list processing \(em in C shell"
.IX  "C shell" "argument list processing"
.TP
.B \-b
Force a \(lqbreak\(rq from option processing. 
Subsequent command-line arguments are not interpreted as C shell options.
This allows the passing of options to a script without confusion.
The shell does not run a set-user-\s-1ID\s0 script unless this option
is present.
.TP
.B \-c
Read commands from the first filename
.I argument
(which must be present).  Remaining arguments are placed in
.BR argv ,
the argument-list variable.
.TP
.B \-e
Exit if a command terminates abnormally or yields a nonzero exit
status.
.TP
.B \-f
Fast start. 
Read neither the
.B \&.cshrc
file, nor the
.B \&.login
file (if a login shell) upon startup.
.TP
.B \-i
Forced interactive. 
Prompt for command-line input, even if the standard
input does not appear to be a terminal (character-special device).
.TP
.B \-n
Parse (interpret), but do not execute commands.
This option can be used to check C shell scripts for syntax errors.
.TP
.B \-s
Take commands from the standard input.
.TP
.B \-t
Read and execute a single command line. 
A 
.RB ` \e '
(backslash) can be used to escape each
.SM NEWLINE
for continuation of the command line onto subsequent input lines.
.TP
.B \-v
Verbose. 
Set the
.B verbose
predefined variable; command input is
echoed after history substitution (but before other substitutions) and
before execution.
.TP
.B \-V
Set
.B verbose
before reading
.BR \&.cshrc .
.br
.ne 5
.TP
.B \-x
Echo.  Set the
.B echo
variable; echo commands after all substitutions and just before
execution.
.TP
.B \-X
Set
.B echo
before reading
.BR \&.cshrc .
.LP
Except with the options
.BR \-c ,
.BR \-i ,
.BR \-s
or
.BR \-t,
the first nonoption
.I argument
is taken to be the name of a command or script.
It is passed as argument zero, and subsequent arguments are added to the
argument list for that command or script.
.SH USAGE
Refer to
.TX DMBG
for tutorial information on how to use the various features of the
C shell.
.SS "Filename Completion"
.IX "C shell" "filename completion"
.IX "filename completion, C shell"
.LP
When enabled by setting the variable
.BR filec ,
an interactive
C shell can complete a partially typed filename or user name.
When an unambiguous partial filename is followed by an
.SM ESC
character on the terminal input line, the shell fills in the remaining
characters of a matching filename from the working directory.
.LP
If a partial filename is followed by the
.SM EOF
character (usually typed as
\s-1CTRL-D\s0),
the shell lists all filenames that match.  It then prompts once again,
supplying the incomplete command line typed in so far.
.LP
When the last (partial) word begins with a tilde
.RB ( \(ap ),
the shell attempts completion with a user name, rather than
a file in the working directory.
.LP
The terminal bell signals errors or multiple matches;
this can be inhibited by setting the variable
.BR nobeep .
You can exclude files with certain suffixes by listing those
suffixes in the variable
.BR fignore .
If, however, the only possible completion includes a suffix in
the list, it is not ignored. 
.B fignore
does not affect the
listing of filenames by the
.SM EOF
character.
.SS Lexical Structure
.IX "C shell" "lexical structure"
.IX "lexical analysis, C shell"
.IX "C shell" "escape character, quotes and comments"
.IX "escape character, quotes and comments, C shell"
.IX \e "" "\fL\e\fR escape character"
.IX \(rq "" "\fL\s+2\(rq\s0\fR quote character"
.IX ' "" "\fL\s+2'\s0\fR quote character"
.IX "C shell metacharacters"
.IX "metacharacters in C shell"
.LP
The shell splits input lines into words at
.SM SPACE
and
.SM TAB
characters, except as noted below.
The characters
.BR & ,
.BR | ,
.BR ; ,
.BR < ,
.BR > ,
.BR ( ,
and
.B )
form separate words; if paired, the pairs form single words.
These shell metacharacters can be made part of other words, and
their special meaning can be suppressed by preceding them with a
.RB ` \e '
(backslash).
A
.SM NEWLINE
preceded by a
.B \e
is equivalent to a
.SM SPACE
character.
.LP
In addition, a string enclosed in matched pairs of single-quotes
.RB (\| \' \|),
double-quotes
(\|\fB"\fR\|),
or backquotes
.RB (\| \` \|),
forms a partial word; metacharacters in such a string, including any
.SM SPACE
or
.SM TAB
characters, do not form separate words.
Within pairs of backquote
.RB (\|\` \|)
or double-quote
(\|\fB"\fR\|) characters, a
.SM NEWLINE
preceded by a
.RB ` \e '
(backslash) gives a true
.SM NEWLINE
character.
Additional functions of each type of quote are
described, below, under
.BR "Variable Substitution" ,
.BR "Command Substitution" ,
and
.BR "Filename Substitution" .
.LP
When the shell's input is not a terminal, the character
.B #
introduces a comment that continues to the end of the input line.
Its special meaning is suppressed when preceded by a
.B \e
or enclosed in matching quotes.
.SS Command Line Parsing
.IX & "run command in background" "\fL&\fR"
.IX | "pipe standard output" "\fL|\fR"
.IX |& "" "\fL|&\fR\ \ \ \(em pipe standard output and standard error \(em \fLcsh\fR"
.IX "pipeline, C shell"
.IX "C shell" pipeline
.IX "C shell" "parentheses \(em command grouping"
.IX "(  )" "command grouping \(em \fLcsh\fR" "\fL(  )\fR"
.IX command "grouping in the C shell \(em \fL(  )\fR"
.IX "parentheses, C shell command grouping"
.IX "grouping commands in the C shell"
.IX "C shell" "conditional execution \(em \fL&&\fR"
.IX "C shell" "conditional execution \(em \fL||\fR"
.IX && "execute on success \(em \fLcsh\fR" "\fL&&\fR"
.IX || "execute on failure \(em \fLcsh\fR" "\fL||\fR"
.IX ; "" "\fL;\fR\ \ \ \(em command separation"
.LP
A
.I simple command
is composed of a sequence of words.  The first word
(that is not part of an I/O redirection) specifies the command to be
executed.  A simple command, or a set of simple commands separated by
.B |
or
.B |&
characters, forms a
.IR pipeline .
With
.BR | ,
the standard output of the preceding command is redirected to the
standard input of the command that follows.   With
.BR |\|& ,
both the standard error and the standard output are redirected through
the pipeline.
.LP
Pipelines can be separated by semicolons
.RB (\| ; \|),
in which case they are executed sequentially. 
Pipelines that are separated by
.B &&
or
.B |\||
form conditional sequences in which the execution of pipelines
on the right depends upon the success or failure, respectively,
of the pipeline on the left.
.LP
A pipeline or sequence can be enclosed within parentheses
.RB ` "( )" '
to form a simple command that can be a component in a pipeline or
sequence.
.LP
A sequence of pipelines can be executed asynchronously, or
\(lqin the background\(rq by appending an
.RB ` & ';
rather than waiting for the sequence to finish before issuing
a prompt, the shell displays the job number (see
.BR "Job Control" ,
below) and associated process
.SM ID\s0s,
and prompts immediately.
.SS History Substitution
.IX "history substitution \(em in C shell"
.IX "C shell" "history substitution"
.IX ! "history substitution \(em \fLcsh\fR" "\fL!\fR"
.LP
History substitution allows you to use words from previous command
lines in the command line you are typing.  This simplifies spelling
corrections and the repetition of complicated commands or arguments.
Command lines are saved in the history list, the size of which
is controlled by the
.B history
variable.  The most recent command is retained in any case.
A history substitution begins with a
.B !
(although you can change this with the
.B histchars
variable) and may occur anywhere on the command line; history
substitutions do not nest.  The
.B !
can be escaped with
.B \e
to suppress its special meaning.
.LP
Input lines containing history substitutions are echoed on the
terminal after being expanded, but before any other
substitutions take place or the command gets executed.
.SS \fIEvent Designators\fP
.LP
An event designator is a reference to a command-line entry in
the history list.
.RS
.PD 0
.TP
.B !
Start a history substitution, except when followed by a
.SM SPACE
character,
.SM TAB\s0,
.SM NEWLINE\s0,
.B =
or
.BR ( .
.TP
.B !!
Refer to the previous command. 
By itself, this substitution
repeats the previous command.
.TP
.BI ! n
Refer to command-line
.IR n .
.TP
.BI ! \-n
Refer to the current command-line minus
.IR n .
.TP
.BI  ! str
Refer to the most recent command starting with
.IR str .
.TP
.BI  !? str\fR[\fP ? \fR]\fP
Refer to the most recent command containing
.IR str .
.TP
.BR !{ .\|.\|. }
Insulate a history reference from adjacent characters (if necessary).
.PD
.RE
.SS \fIWord Designators\fR
.LP
A
.RB ` : '
(colon)
separates the event specification from the word designator. 
It can be omitted if the word designator begins with a
.BR \*^ ,
.BR $ ,
.BR * ,
.B \-
or
.BR % .
If the word is to be selected from the previous command, the second
.B !
character can be omitted from the event specification.  For instance,
.B !!:1
and
.B !:1
both refer to the first word of the previous command, while
.B !!$
and
.B !$
both refer to the last word in the previous command. 
Word designators include:
.RS
.TP
.B #
The entire command line typed so far.
.PD 0
.TP
.B 0
The first input word (command).
.TP
.I n
The
.IR n 'th
argument.
.TP
.B \*^
The first argument, that is,
.BR 1 .
.TP
.B $
The last argument.
.TP
.B %
The word matched by (the most recent)
.BI ? s
search.
.TP
.IB x \- y
A range of words;
.BI \- y
abbreviates
.BI 0\- y\fR.
.TP
.B *
All the arguments, or a null value if there is just
one word in the event.
.TP
.IB x *
Abbreviates
.IB x \-$ .
.TP
.IB x \-
Like
.I x*
but omitting word
.BR $ .
.PD
.RE
.SS \fIModifiers\fR
.IX "history substitution modifiers"
.IX ": modifiers" "" "\fL:\fR modifiers \(em history substitution \(em \fLcsh\fR"
.LP
After the optional word designator, you can add
a sequence of one or more of the following modifiers,
each preceded by a
.BR : .
.RS
.TP
.B h
Remove a trailing pathname component, leaving the head.
.PD 0
.TP
.B r
Remove a trailing suffix of the form
.RB ` "\&.\fIxxx" ',
leaving the basename.
.TP
.B e
Remove all but the suffix.
.TP
.BI s/ l / r\fR[\fP / \fR]\fP
Substitute
.I r
for
.IR l .
.TP
.B t
Remove all leading pathname components, leaving the tail.
.TP
.B &
Repeat the previous substitution.
.TP
.B g
Apply the change to the first occurrence of a match in each word,
by prefixing the above (for example,
.BR g& ).
.TP
.B p
Print the new command but do not execute it.
.TP
.B q
Quote the substituted words, escaping further substitutions.
.TP
.B x
Like
.BR q ,
but break into words at each
.SM SPACE
character,
.SM TAB
or
.SM NEWLINE\s0.
.PD
.RE
.LP
Unless preceded by a
.BR g ,
the modification is applied only to the
first string that matches
.IR l ;
an error results if no string matches.
.LP
The left-hand side of substitutions are not regular expressions,
but character strings.
Any character can be used as the delimiter in place of
.BR / .
A backslash quotes the delimiter character.
The character
.BR & ,
in the right hand side, is replaced by the text
from the left-hand-side. 
The
.B &
can be quoted with a backslash. 
A null
.I l
uses the previous string either from a
.I l
or from a contextual scan string
.I s
from
.BI !? s\fR.
You can omit the rightmost delimiter if a
.SM NEWLINE
immediately follows
.IR r ;
the rightmost
.B ?
in a context scan can similarly be omitted.
.LP
Without an event specification, a history reference refers either to the
previous command, or to a previous history reference on the command line
(if any).
.SS \fIQuick Substitution\fR
.IX "quick substitution \(em in C shell"
.IX ^ "quick substitution \(em \fLcsh\fR" "\fL\s+2^\s0\fR"
.IX "C shell" "quick substitution"
.LP
.TP
.BI \*^ l \*^ r\fR[\fP \*^ \fR]\fP
This is equivalent to the history substitution:
.BI !:s\*^ l \*^ r\c
.RB [ \*^ ].
.SS Aliases
.IX  "alias substitution \(em in C shell"
.IX "C shell" "alias substitution"
.LP
The C shell maintains a list of aliases that you can create, display,
and modify using the
.B alias
and
.B unalias
commands.
The shell checks the first word in each command to see if it matches
the name of an existing alias.
If it does, the command is reprocessed
with the alias definition replacing its name; the history
substitution mechanism is made available as though that command
were the previous input line.
This allows history substitutions,
escaped with a backslash in the definition, to be replaced with
actual command-line arguments when the alias is used.
If no
history substitution is called for, the arguments remain unchanged.
.LP
Aliases can be nested. 
That is, an alias definition can contain
the name of another alias.
Nested aliases are expanded before any
history substitutions is applied. 
This is useful in pipelines such as
.IX \e!* "" "\fL\e!*\fR\ \ \ \(em alias substitution, include command-line arguments \(em \fLcsh\fR"
.IP
.ft B
alias \ lm \'ls \ \-l \ \e!* \ | \ more\'
.ft R
.LP
which when called, pipes the output of
.BR ls (1V)
through
.BR more (1).
.LP
Except for the first word, the name of the alias may not appear in its
definition, nor in any alias referred to by its definition. 
Such loops are detected, and cause an error message.
.SS I/O Redirection
.IX "I/O redirection in the C shell"
.IX "C shell" "I/O redirection"
.IX < "redirect standard input" "\fL<\fR"
.IX > "redirect standard output" "\fL>\fR"
.IX >& "" "\fL>&\fR\ \ \ \(em redirect standard output and standard error \(em \fLcsh\fR"
.IX >> "append standard output" "\fL>>\fR"
.IX >>& "" "\fL>>&\fR\ \ \ \(em append standard output and standard error \(em \fLcsh\fR"
.IX << "parse and pass input to command" "\fL<<\fR"
The following metacharacters indicate that the subsequent word
is the name of a file to which the command's standard input, standard
output, or standard error is redirected; this word is variable,
command, and filename expanded separately from the rest of the command.
.TP 15
.B <
Redirect the standard input.
.TP
.BI <\|< \|word
Read the standard input, up to a line that is identical
with
.IR word ,
and place the resulting lines in a temporary file.
Unless
.I word
is escaped or quoted, variable and command substitutions are performed
on these lines.
Then, invoke the pipeline with the temporary file as
its standard input.
.I word
is not subjected to variable, filename or command substitution,
and each line is compared to it before any substitutions are
performed by the shell.
.TP
\fB>\fR\ \ \ \fB>!\fR\ \ \ \fB>&\fR\ \ \ \fB>&!\fR
Redirect the standard output to a file.
If the file does not exist, it is created.  If it does
exist, it is overwritten; its previous contents are lost.
.IP
When set, the variable
.B noclobber
prevents destruction of existing
files.  It also prevents redirection to terminals and
.BR /dev/null ,
unless one of the
.B !
forms is used.
The
.B &
forms redirect both standard output and the the standard
error (diagnostic output) to the file.
.TP
\fB>\|>\fR\ \ \ \fB>\|>&\fR\ \ \ \fB>\|>!\fR\ \ \ \fB>\|>&!\fR
Append the standard output.
Like
.BR > ,
but places output at the end of the file rather
than overwriting it.  If
.B noclobber
is set, it is an error for the file not to exist, unless
one of the
.B !
forms is used.
The
.B &
forms append both the standard error and standard output to the
file.
.SS "Variable Substitution"
.IX  "variable substitution, in C shell"
.IX "C shell" "variable substitution"
.IX $ "" "\fL$\fR\ \ \ \(em variable substitution"
.LP
The C shell maintains a set of
.IR variables ,
each of which is composed of a
.I name
and a
.IR value .
A variable name consists of up to 20 letters and digits,
and starts with a letter (the underscore is considered a letter).
A variable's value is a space-separated list of zero or more words.
.LP
To refer to a variable's value, precede its name with a
.RB ` $ '.
Certain references (described below) can be used to select specific
words from the
value, or to display other information about the variable.  Braces can
be used to insulate the reference from other characters in an input-line
word.
.LP
Variable substitution takes place after
the input line is analyzed, aliases are resolved, and I/O
redirections are applied.
Exceptions to this are variable references in I/O redirections
(substituted at the time the redirection is made), and backquoted
strings (see
.BR "Command Substitution" ).
.LP
Variable substitution can be suppressed by preceding the
.B $
with a
.BR \e ,
except within double-quotes where it always occurs. 
Variable substitution is suppressed inside of single-quotes.
A
.B $
is escaped if followed by a
.SM SPACE
character,
.SM TAB
or
.SM NEWLINE\s0.
.LP
Variables can be created, displayed, or destroyed using the
.B set
and
.B unset
commands. 
Some variables are maintained or used by the shell.
For instance, the
.B argv
variable contains an image of the shell's argument list.
Of the variables used by the shell, a number are toggles;
the shell does not care what their value is,
only whether they are set or not.
.LP
Numerical values can be operated on as numbers (as with the
.B @
built-in).  With numeric operations, an empty value
is considered to be zero; the second and subsequent words of
multiword values are ignored.  For instance, when the
.B verbose
variable is set to any value (including an empty value), command
input is echoed on the terminal.
.LP
Command and filename substitution is subsequently applied to the words
that result from the variable substitution, except when suppressed by
double-quotes, when
.B noglob
is set (suppressing filename substitution), or when the reference is
quoted with the
.BR :q
modifier.
Within double-quotes, a reference is expanded to form (a portion
of) a quoted string; multiword values are expanded to a string with
embedded
.SM SPACE
characters.
When the
.B :q
modifier is applied to the reference, it is expanded to a list
of space-separated words, each of which is quoted
to prevent subsequent command or filename substitutions.
.LP
Except as noted below, it is an error to refer to a variable that is
not set.
.TP 15
.BI $ var
.PD 0
.TP
.BI ${ var }
.PD
These are replaced by words from the value of
.IR var ,
each separated by a
.SM SPACE
character.
If
.I var
is an environment variable, its
value is returned (but
.RB ` : '
modifiers and the other forms
given below are not available).
.TP
.BI $ var \fR[\fI index \fR]\fP
.PD 0
.TP
.BI ${ var [ index ]}
.PD
These select only the indicated words from the value of
.IR var .
Variable substitution is applied to
.IR index \|,
which may
consist of (or result in) a either single number, two numbers
separated by a
.RB ` \- ',
or an asterisk.
Words are indexed starting from 1; a
.RB ` * '
selects all words.
If the first number of a range is omitted (as with
.BR $argv[\-2] ),
it defaults to 1.  If the last number of a range is omitted
(as with
.BR $argv[1\-] ),
it defaults to
.BI $# var
(the word count).
.IX $# "" "\fL$#\fR\ \ \ \(em word count for variable"
It is not an error for a range to be empty if the second argument is
omitted (or within range).
.TP
.BI $# name
.PD 0
.TP
.BI ${# name }
.PD
These give the number of words in the variable.
.TP
.B $0
This substitutes the name of the file from which command input is
being read.  An error occurs if the name is not known.
.br
.ne 5
.TP
.BI $ n
.PD 0
.TP
.BI ${ n }
.PD
Equivalent to
.BI $argv[ n ] .
.TP
.B $*
Equivalent to
.BR $argv[*] .
.LP
The modifiers
.BR :e ,
.BR :h ,
.BR :q ,
.BR :r ,
.B :t
and
.B :x
can be applied (see
.BR "History Substitution" ),
as can
.BR :gh ,
.B :gt
and
.BR :gr .
If
.B   {\|}
(braces) are used, then the modifiers must appear within the braces.
The current implementation allows only one such modifier per
expansion.
.LP
The following references may not be modified with
.B :
modifiers.
.TP
.BI $? var
.PD 0
.TP
.BI ${? var }
.PD
.IX $? "" "\fL$?\fR\ \ \ \(em variable set inquiry \(em \fLcsh\fR"
Substitutes the string 1 if
.I var
is set or 0 if it is not set.
.TP
.B $?0
Substitutes 1 if the current input filename is known, or 0 if it is not.
.TP
.B $$
.IX $$ "" "\fL$$\fR\ \ \ \(em process number of shell"
Substitute the process number of the (parent) shell.
.TP
.B $<
.IX $< "" "\fL$<\fR\ \ \ \(em read value from terminal \(em \fLcsh\fR"
Substitutes a line from the standard
input, with no further interpretation thereafter.  It can be used
to read from the keyboard in a C shell script.
.SS "Command and Filename Substitutions"
.LP
Command and filename substitutions are applied selectively to
the arguments of built-in commands.  Portions of expressions that are
not evaluated are not expanded.
For non-built-in commands, filename expansion of the command name is
done separately from that of the argument list; expansion occurs
in a subshell, after I/O redirection is performed.
.SS Command Substitution
.IX  command substitution
.IX  "C shell" "command substitution"
.IX ` "" "\fL`\fR\ \ \ \(em command substitution"
.IX "backquote substitution"
.LP
A command enclosed by backquotes
.RB (\| \` \|.\|.\|.\| \` \|)
is performed by a subshell. 
Its standard output is broken into separate words at each
.SM SPACE
character,
.SM TAB
and
.SM NEWLINE\s0;
null words are discarded.
This text replaces the backquoted
string on the current command line. 
Within double-quotes, only
.SM NEWLINE
characters force new words;
.SM SPACE
and
.SM TAB
characters are preserved.  However, a final
.SM NEWLINE
is ignored.
It is therefore possible for a command substitution
to yield a partial word.
.SS "Filename Substitution"
.IX  "filename substitution"
.IX  "C shell" "filename substitution"
.IX * "filename wild card, zero or more of any characters" "\fL*\fR"
.IX ? "" "\fL?\fR\ \ \ \(em filename wild card, any single characters"
.IX "[ ]" "" "\fL[ ]\fR\ \ \ \(em filename substitution, any character in list or range"
.IX "{ }" "" "\fL{ }\fR\ \ \ \(em filename substitution, successive strings in enclosed list"
.IX ~ "filename substitution, home directory" "\fL\(ap\fR"
.LP
Unquoted words containing any of the characters
.BR * ,
.BR ? ,
.B [
or
.BR { ,
or that begin with
.BR \*~ ,
are expanded (also known as
.IR globbing )
to an alphabetically sorted list of filenames, as follows:
.TP 15
.B *
Match any (zero or more) characters.
.TP
.B ?
Match any single character.
.TP
.BR [ " .\|.\|. " ]
Match any single character in the enclosed list(s) or range(s).
A list is a string of characters. 
A range is two characters separated by a minus-sign
.RB ( \- ),
and includes all the characters in between in the
.SM ASCII
collating sequence (see
.BR ascii (7)).
.HP
.B {
.IB str ,
.IB str ,
\&.\|.\|.
.B }
.br
Expand to each string (or filename-matching pattern) in the
comma-separated list.
Unlike the pattern-matching expressions above, the expansion of this
construct is not sorted.
For instance,
.B {b,a}
expands to
.RB ` b '
.RB ` a ',
(not
.RB ` a '
.RB ` b ').
As special cases, the characters
.BR {
and
.BR } ,
along with the string
.BR {\|} ,
are passed undisturbed.
.TP
.BR \*~ [
.I user
]
Your home directory, as indicated by the value of the variable
.BR home ,
or that of
.IR user ,
as indicated by the password entry for
.IR user .
.LP
Only the patterns
.BR * , " ?"
and
.BR [ .\|.\|. ]
imply pattern matching; an error results if
no filename matches a pattern that contains them.
The
.RB ` . '
(dot character),
when it is the first character in a filename or pathname
component, must be matched explicitly.
The
.B /
(slash)
must also be matched explicitly.
.SS Expressions and Operators
.IX "C shell" "expressions"
.IX "C shell" "operators"
.IX "expressions \(em in C shell"
.IX "(  )" "group operators \(em \fLcsh\fR" "\fL(  )\fR"
.IX ~ "one's complement operator \(em \fLcsh\fR" "\fL\(ap\fR"
.IX ! "logical negation operator \(em \fLcsh\fR" "\fL!\fR"
.IX * "integer multiplication operator \(em \fLcsh\fR" "\fL*\fR"
.IX / "" "\fL/\fR\ \ \ \(em integer division operator \(em \fLcsh\fR"
.IX % "modular division operator \(em \fLcsh\fR" "\fL%\fR"
.IX + "" "\fL+\fR\ \ \ \(em integer addition operator \(em \fLcsh\fR"
.IX - "" "\fL-\fR\ \ \ \(em integer subtraction operator \(em \fLcsh\fR"
.IX >> "bitwise shift right \(em \fLcsh\fR" "\fL>>\fR"
.IX << "bitwise shift left \(em \fLcsh\fR" "\fL<<\fR"
.IX < "less than operator \(em \fLcsh\fR" "\fL<\fR"
.IX > "greater than operator \(em \fLcsh\fR" "\fL>\fR"
.IX <= "" "\fL<=\fR\ \ \ \(em less than or equal to operator \(em \fLcsh\fR"
.IX >= "" "\fL>=\fR\ \ \ \(em greater than or equal to operator \(em \fLcsh\fR"
.IX == "" "\fL==\fR\ \ \ \(em is equal to operator \(em \fLcsh\fR"
.IX != "" "\fL!=\fR\ \ \ \(em not equal to operator \(em \fLcsh\fR"
.IX =~ "" "\fL=\(ap\fR\ \ \ \(em globbing pattern match operator \(em \fLcsh\fR"
.IX !~ "" "\fL!\(ap\fR\ \ \  globbing pattern mismatch operator \(em \fLcsh\fR"
.IX & "bitwise \s-1AND\s0 operator \(em \fLcsh\fR" "\fL&\fR"
.IX ^ "bitwise \s-1XOR\s0 operator \(em \fLcsh\fR" "\fL\s+2^\s0\fR"
.IX | "bitwise \s-1OR\s0 operator \(em \fLcsh\fR" "\fL|\fR"
.IX && "logical \s-1AND\s0 operator \(em \fLcsh\fR" "\fL&&\fR"
.IX || "logical \s-1OR\s0 operator \(em \fLcsh\fR" "\fL||\fR"
.LP
A number of C shell built-in commands accept expressions, in which the
operators are similar to those of C
and have the same precedence.
These expressions typically appear in the
.BR @ ,
.BR exit ,
.BR if  ,
.B set
and
.B while
commands, and are often used to regulate the flow of control for
executing commands.
Components of an expression are separated by white space.
.LP
Null or missing values are considered 0.  The result of all
expressions are strings, which may represent decimal numbers.
.LP
The following C shell operators are grouped in order of precedence:
.RS
.TP 20
.BR (\| .\|.\|.\| \|)
grouping
.PD  0
.TP
.B \(ap
one's complement
.TP
.B !
logical negation
.TP
.B "*   /   %"
multiplication, division, remainder (These are right associative,
which can lead to unexpected results.  Group combinations
explicitly with parentheses.)
.TP
.B "+   \-"
addition, subtraction (also right associative)
.TP
.B "<<   >>"
bitwise shift left, bitwise shift right
.TP
.B "<   >   <=   >="
less than, greater than, less than or equal to, greater than or equal to
.TP
.B "==   !=   =\(ap   !\(ap"
equal to, not equal to, filename-substitution pattern match
(described below),
filename-substitution pattern mismatch
.TP
.B &
bitwise
.SM AND
.TP
.B \*^
bitwise
.SM XOR
(exclusive or)
.TP
.B |
bitwise inclusive
.SM OR
.TP
.B &&
logical
.SM AND
.TP
.B |\|\||
logical
.SM OR
.PD
.RE
.LP
The operators:
.BR == ,
.BR != ,
.BR =\(ap ,
and
.B !\(ap
compare their arguments as strings; other operators use numbers.
The oprators
.B =\(ap
and
.B !\(ap
each check whether or not a string to the left matches a filename
substitution pattern on the right.  This reduces the need for
.B switch
statements when pattern-matching between strings is all that is
required.
.LP
Also available are file inquiries:
.IX "C shell" "file inquries"
.IX "file inquries \(em in C shell"
.IX -r "" "\fL\-r\fR\ \ \ C shell file inquiry \(em read accessible"
.IX -w "" "\fL\-w\fR\ \ \ C shell file inquiry \(em write accessible"
.IX -x "" "\fL\-x\fR\ \ \ C shell file inquiry \(em execute accessible"
.IX -o "" "\fL\-o\fR\ \ \ C shell file inquiry \(em ownership"
.IX -e "" "\fL\-e\fR\ \ \ C shell file inquiry \(em file exists"
.IX -z "" "\fL\-z\fR\ \ \ C shell file inquiry \(em zero length"
.IX -d "" "\fL\-d\fR\ \ \ C shell file inquiry \(em directory"
.IX -f "" "\fL\-f\fR\ \ \ C shell file inquiry \(em plain file"
.RS
.PD 0
.TP 10
.BI \-r " filename"
Return true, or 1 if the user has read access. 
Otherwise it returns false, or 0.
.TP
.BI \-w " filename"
True if the user has write access.
.TP
.BI \-x " filename"
True if the user has execute permission (or search permission on
a directory).
.TP
.BI \-e " filename"
True if
.I file
exists.
.TP
.BI \-o " filename"
True if the user owns
.IR file .
.TP
.BI \-z " filename"
True if
.I file
is of zero length (empty).
.TP
.BI \-f " filename"
True if
.I file
is a plain file.
.TP
.BI \-d " filename"
True if
.I file
is a directory.
.PD
.RE
.LP
If
.I file
does not exist or is inaccessible, then all inquiries return false.
.LP
An inquiry as to the success of a command is also available:
.IX "C shell" "command inquiry"
.IX command "inquiry, in C shell"
.IX "{ }" "" "\fL{ }\fR\ \ \ C shell command inquiry"
.RS
.TP 10
.BI "{ " command " }"
If
.I command
runs successfully, the expression evaluates to true, 1.
Otherwise it evaluates to false 0.  (Note that, conversely,
.I command
itself typically returns 0 when it runs successfully,
or some other value if it encounters a problem.  If you want to get at
the status directly, use the value of the
.B status
variable rather than this expression).
.RE
.SS Control Flow
.IX "control flow \(em in C shell"
.IX "C shell" "branch"
.IX "C shell" "loop"
.IX "branch, C shell control flow"
.IX "loop, C shell control flow"
.LP
The shell contains a number of commands to regulate the flow of
control in scripts, and within limits, from the terminal.
These commands operate by forcing the shell either to reread
input (to
.IR loop ),
or to skip input under certain conditions (to
.IR branch ).
.LP
Each occurrence of a
.BR foreach ,
.BR switch ,
.BR while ,
.BR if ".\|.\|." then
and
.B else
built-in must appear as the first word on its own input line.
.LP
If the shell's input is not seekable and a loop is being read, that
input is buffered.  The shell performs seeks within the internal
buffer to accomplish the rereading implied by the loop.  (To the
extent that this allows, backward
.B goto
commands will succeed on nonseekable inputs.)
.SS Command Execution
.IX "C shell" "command execution"
.IX "C shell" "and Bourne shell scripts"
.IX  command "execution in C shell"
.IX  "executing commands in C shell"
.IX #! "" "\fL#!\fR\ \ \ invoke shell to process script"
.LP
If the command is a C shell built-in, the shell executes it directly.
Otherwise, the shell searches for a file by that name with
execute access.
If the command-name contains a
.BR / ,
the shell takes it as a pathname, and searches for it.
If the command-name does not contain a
.BR / ,
the shell attempts to resolve it to a pathname, searching each
directory in the
.B path
variable for the command.  To speed the search, the shell uses its
hash table (see the
.B rehash
built-in) to eliminate directories that have no applicable files.
This hashing can be disabled with the
.B \-c
or
.BR \-t ,
options, or the
.B unhash
built-in.
.LP
As a special case, if there is no
.BR /
in the name of the script and there is an alias for the word
.BR shell ,
the expansion of the
.B shell
alias is prepended (without modification), to the command line. 
The system attempts to execute the first word of this special
(late-occurring) alias, which should be a full pathname.
Remaining words of the alias's definition, along with the text of the
input line, are treated as arguments.
.LP
When a pathname is found that has proper execute permissions,
the shell forks a new process and passes it, along with its
arguments to the kernel (using the
.BR execve (2)
system call).  The kernel then attempts to overlay the new process
with the desired program.  If the file is an executable binary (in
.BR a.out (5)
format)
the kernel succeeds, and begins executing the new process.  If the file
is a text file, and the first line begins with
.BR #! ,
the next word is taken to be the pathname of a shell (or command) to
interpret that script.  Subsequent words on the first line are taken as
options for that shell.  The kernel invokes (overlays) the indicated
shell, using the name of the script as an argument.
.LP
If neither of the above conditions holds, the kernel cannot overlay
the file (the
.BR execve (2)
call fails); the C shell then attempts to execute the file by spawning
a new shell, as follows:
.TP 3
\(bu
If the first character of the file is a
.BR  # ,
a C shell is invoked.
.TP
\(bu
Otherwise, a standard (Bourne) shell is invoked.
.SS Signal Handling
.IX  "signal handling, in C shell"
.IX  "C shell" "signal handling"
.LP
The shell normally ignores
.SM QUIT
signals.
Background jobs are immune to signals generated from the
keyboard, including
hangups
(\s-1HUP\s0).
Other signals have the values that the
C shell inherited from its environment.
The shell's handling of interrupt and terminate signals
within scripts can be controlled by the
.B onintr
built-in.
Login shells catch the
.SM TERM
signal; otherwise this signal is passed on to child processes.
In no case are interrupts allowed when a login shell is reading the
.B \&.logout
file.
.SS "Job Control"
.IX "C shell" "job control"
.IX "job control \em \fLcsh\fR"
.IX % "job control, reference to current job \(em \fLcsh\fR" "\fL%\fR"
.LP
The shell associates a numbered
.I job
with each command sequence, to keep track of those commands that are
running in the background or have been stopped with
.SM TSTP
signals (typically
\s-1CTRL-Z\s0).
When a command, or command sequence (semicolon separated list), is
started in the background using the
.B &
metacharacter, the shell displays a line with the job number in
brackets, and a list of associated process numbers:
.IP
.B "[1] 1234"
.LP
To see the current list of jobs, use the
.B jobs
built-in command.
The job most recently stopped (or put into the
background if none are stopped) is referred to as the
.I current
job, and is indicated with a
.RB ` + '.
The previous job is indicated with a
.RB ` \- ';
when the current job is terminated or moved to the foreground,
this job takes its place (becomes the new current job).
.LP
To manipulate jobs, refer to the
.BR bg ,
.BR fg ,
.BR kill ,
.BR stop
and
.BR %
built-ins.
.LP
A reference to a job begins with a
.RB ` % '.
By itself, the percent-sign refers to the current job.
.TP 15
.BR % "\ \ \ " %+ "\ \ \ " %%
The current job.
.PD 0
.TP
.B %\-
The previous job.
.TP
.BI % j
Refer to job
.I j
as in:
.RB ` "kill \-9 %\fIj" '.
.I  j
can be a job number, or a string that
uniquely specifies the command-line by which it was started;
.RB ` "fg %vi" '
might bring a stopped
.B vi
job to the foreground, for instance.
.TP
.BI %? string
Specify the job for which the command-line uniquely contains
.IR string .
.PD
.LP
A job running in the background stops when it attempts to read
from the terminal.  Background jobs can normally produce output,
but this can be suppressed using the
.RB ` "stty tostop" '
command.
.SS Status Reporting
.LP
While running interactively, the shell tracks the status of each job
and reports whenever a finishes or becomes blocked.  It normally
displays a message to this effect as it issues a prompt, so as to avoid
disturbing the appearance of your input.  When set, the
.B notify
variable indicates that the shell is to report status changes
immediately.  By default, the
.B notify
command marks the current process; after starting a background job, type
.B notify
to mark it.
.SS "Built-In Commands"
.\" start of csh_built-ins
.zZ
.IX "C shell" "commands" "" "" PAGE START
.LP
Built-in commands are executed within the C shell.
If a built-in command occurs as any component of a pipeline
except the last, it is executed in a subshell.
.TP 10
.B :
.IX   "C shell commands"  ":"  ""  "\fL:\fR\ \ \ \(em null command"
.IX ": command" "" "\fL:\fR command"
Null command.  This command is interpreted, but performs no action.
.HP
.B alias
[
.I name
[
.I def
] ]
.br
.IX   "C shell commands"  "alias"  ""  "\fLalias\fR \(em shell macros"
.IX "alias command" "" "\fLalias\fR command"
Assign
.I def
to the alias
.IR name .
.I def
is a list of words that may contain escaped history-substitution
metasyntax.
.I name
is not allowed to be
.B alias
or
.BR unalias .
If
.I def
is omitted, the alias
.I name
is displayed along with its current definition.  If both
.I name
and
.I def
are omitted, all aliases are displayed.
.HP
.B bg
.RB [ %\c
.IR job "] .\|.\|."
.br
.IX   "C shell commands"  "bg"  ""  "\fLbg\fR \(em job to background"
.IX "bg command" "" "\fLbg\fR command"
Run the current or specified jobs in the background.
.TP
.B break
.IX   "C shell commands"  "break"  ""  "\fLbreak\fR \(em exit loop"
.IX "break command" "" "\fLbreak\fR command"
Resume execution after the
.B end
of the nearest enclosing
.B foreach
or
.B while
loop.
The remaining commands on the current line
are executed.  This allows multilevel breaks to be written as a
list of
.B break
commands, all on one line.
.TP
.B breaksw
.IX   "C shell commands"  "breaksw"  ""  "\fLbreaksw\fR \(em exit switch"
.IX "breaksw command" "" "\fLbreaksw\fR command"
Break from a
.BR switch ,
resuming after the
.BR endsw .
.TP
.BI case " label" :
.IX   "C shell commands"  "case"  ""  "\fLcase\fR \(em selector in switch"
.IX "case command" "" "\fLcase\fR command"
A label in a
.B switch
statement.
.HP
.B cd
[
.I dir
]
.br
.PD 0
.HP
.B chdir
[
.I dir
]
.br
.IX   "C shell commands"  "cd"  ""  "\fLcd\fR \(em change directory"
.IX "cd command" "" "\fLcd\fR command"
.IX   "C shell commands"  "chdir"  ""  "\fLchdir\fR \(em change directory"
.IX "chdir command" "" "\fLchdir\fR command"
Change the shell's working directory to directory
.IR dir .
If no argument is given, change to the home directory of the user.
If
.I dir
is a relative pathname not found in the current directory, check for
it in those directories listed in the
.B cdpath
variable.  If
.I dir
is the name of a shell variable whose value starts with a
.BR / ,
change to the directory named by that value.
.PD
.TP
.B continue
.IX   "C shell commands"  "continue"  ""  "\fLcontinue\fR \(em cycle loop"
.IX "continue command" "" "\fLcontinue\fR command"
Continue execution of the nearest enclosing
.B while
or
.BR foreach .
.TP
.B default:
.IX   "C shell commands"  "default"  ""  "\fLdefault\fR \(em catchall in switch"
.IX "default command" "" "\fLdefault\fR command"
Labels the default case in a
.B switch
statement.
The default should come after all
.B case
labels.
Any remaining commands on the command line are first executed.
.HP
.B dirs
[
.B \-l
]
.br
.IX   "C shell commands"  "dirs"  ""  "\fLdirs\fR \(em print directory stack"
.IX "dirs command" "" "\fLdirs\fR command"
Print the directory stack, most recent to the left;
the first directory shown is the current directory.
With the
.B \-l
argument, produce an unabbreviated printout; use of the
.B \*~
notation is suppressed.
.HP
.B echo
[
.B \-n
]
.I list
.br
.IX   "C shell commands"  "echo"  ""  "\fLecho\fR \(em echo arguments"
.IX "echo command" "" "\fLecho\fR command"
The words in
.I list
are written to the shell's standard output, separated by
.SM SPACE
characters.
The output is terminated with a
.SM NEWLINE
unless the
.B \-n
option is used.
.TP
\fBeval \fI argument\fR .\|.\|.
.IX   "C shell commands"  "eval"  ""  "\fLeval\fR \(em re-evaluate shell data"
.IX "eval command" "" "\fLeval\fR command"
Reads the arguments as input to the shell, and executes the resulting
command(s).  This is usually used to execute commands
generated as the result of command or variable substitution, since
parsing occurs before these substitutions.  See
.BR tset (1)
for an example of how to use
.BR eval .
.TP
.BI exec " command"
.IX   "C shell commands"  "exec"  ""  "\fLexec\fR \(em execute command"
.IX "exec command" "" "\fLexec\fR command"
Execute
.I command
in place of the current shell, which terminates.
.HP
.B exit
[
.BI ( expr )
]
.br
.IX   "C shell commands"  "exit"  ""  "\fLexit\fR \(em exit shell"
.IX "exit command" "" "\fLexit\fR command"
The shell exits, either with the value of the \fBstatus\fP
variable, or with the value of the specified by the expression
.IR expr .
.HP
.B "fg %"
[
.I job
]
.br
.IX   "C shell commands"  "fg"  ""  "\fLfg\fR \(em job to foreground"
.IX "fg command" "" "\fLfg\fR command"
Bring the current or specified
.I job
into the foreground.
.TP
.BI foreach " var " ( wordlist )
.PD 0
.TP
\ \ \ \&.\|.\|.
.TP
.B end
.IX   "C shell commands"  "foreach"  ""  "\fLforeach\fR \(em loop on list of names"
.IX "foreach command" "" "\fLforeach\fR command"
.IX   "C shell commands"  "end"  ""  "\fLend\fR \(em end loop"
.IX "end command" "" "\fLend\fR command"
The variable
.I var
is successively set to each member of
.IR wordlist .
The sequence of commands between this command and the matching
.B end
is executed for each new value of
.IR var .
(Both
.B foreach
and
.B end
must appear alone on separate lines.)
.PD
.IP
The built-in command
.B continue
may be used to continue the loop prematurely and the built-in command
.B break
to terminate it prematurely.
When this command is read from the terminal, the loop is read up once
prompting with
.B ?
before any statements in the loop are executed.
.TP
.BI glob " wordlist"
.IX   "C shell commands"  "glob"  ""  "\fLglob\fR \(em filename expand wordlist"
.IX "glob command" "" "\fLglob\fR command"
Perform filename expansion on
.IR wordlist .
Like
.BR echo ,
but no
.B \e
escapes are recognized. Words are delimited by
.SM NULL
characters in the output.
.TP
.BI goto " label"
.IX   "C shell commands"  "goto"  ""  "\fLgoto\fR \(em command transfer"
.IX "goto command" "" "\fLgoto\fR command"
The specified
.I label
is filename and command expanded to yield a label.
The shell rewinds its input as much as possible
and searches for a line of the form
.IB label :
possibly preceded by
.SM SPACE
or
.SM TAB
characters.
Execution continues after the indicated line.
It is an error to jump to a label that occurs between a
.B while
or
.B for
built-in, and its corresponding
.BR end .
.TP
.BR hashstat
.IX   "C shell commands"  "hashstat"  ""  "\fLhashstat\fR \(em display hashing statistics"
.IX "hashstat command" "" "\fLhashstat\fR command"
Print a statistics line indicating how effective the internal hash
table has been at locating commands (and avoiding
.BR exec s).
An
.B exec
is attempted for each component of the
.I path
where the hash function indicates a possible hit, and in each component
that does not begin with a
.RB ` / '.
.HP
.B history
[
.B \-hr
] [
.I n
]
.br
.IX   "C shell commands"  "history"  ""  "\fLhistory\fR \(em display history list"
.IX "history command" "" "\fLhistory\fR command"
Display the history list; if
.I n
is given, display only the
.I n
most recent events.
.RS
.TP
.B \-r
Reverse the order of printout to be most recent first rather than oldest first.
.PD 0
.TP
.B \-h
Display the history list without leading numbers.
This is used to produce files suitable for sourcing using the
.B \-h
option to
.IR source .
.PD
.RE
.TP
.BI "if (" expr ") " command
.IX   "C shell commands"  "if"  ""  "\fLif\fR \(em conditional statement"
.IX "if command" "" "\fLif\fR command"
If the specified expression evaluates to true, the single
.I command
with arguments is executed.
Variable substitution on
.IR command ""
happens early, at the same time it does for the rest of the
.I if
command.
.I command
must be a simple command, not a pipeline, a command list, or a
parenthesized command list.  Note: I/O redirection occurs even
if
.I expr
is false, when
.I command
is
.I not
executed (this is a bug).
.TP
.BI "if (" expr ") then"
.PD 0
.TP
\&.\|.\|.
.TP
.BI "else if (" expr2 ") then"
.TP
\&.\|.\|.
.TP
.B else
.TP
\&.\|.\|.
.TP
.B endif
.IX   "C shell commands"  "else"  ""  "\fLelse\fR \(em alternative commands"
.IX "else command" "" "\fLelse\fR command"
.IX   "C shell commands"  "endif"  ""  "\fLendif\fR \(em end conditional"
.IX "endif command" "" "\fLendif\fR command"
If
.IR expr ""
is true, commands up to the first
.B else
are executed.  Otherwise, if
.I expr2
is true, the commands between the
.B else if
and the second
.B else
are executed.  Otherwise, commands between the
.B else
and the
.B endif
are executed.
Any number of
.B else if
pairs are allowed, but only one
.BR else .
Only one
.B endif
is needed, but it is required.
The words
.B else
and
.B endif
must be the first nonwhite characters on a line.
The
.B if
must appear alone on its input line or after an
.BR else .)
.PD
.TP
.BR jobs [ " \-l " ]
.IX   "C shell commands"  "jobs"  ""  "\fLjobs\fR \(em display job list"
.IX "jobs command" "" "\fLjobs\fR command"
List the active jobs under job control.
.RS
.TP
.B \-l
List process
.SM ID\s0s,
in addition to the normal information.
.RE
.HP
.B kill
[
.BI \- sig
] [
.I pid
] [
.BI % job
] .\|.\|.
.PD 0
.br
.TP
.B kill \-l
.PD
.IX   "C shell commands"  "kill"  ""  "\fLkill\fR \(em kill jobs and processes"
.IX "kill command" "" "\fLkill\fR command"
Send the
.SM TERM
(terminate) signal, by default, or the signal specified, to the
specified process
.SM ID\s0,
the
.I job
indicated, or the current
.IR job .
Signals are either given by number or by name.
There is no default.  Typing
.B kill
does not send a signal to the current job.
If the signal being sent is
.SM TERM
(terminate) or
.SM HUP
(hangup), then the job or process is sent a
.SM CONT
(continue) signal as well.
.RS
.TP
.B \-l
List the signal names that can be sent.
.RE
.HP
.B limit
[
.B \-h
] [
.I resource
[
.I max-use
] ]
.br
.IX   "C shell commands"  "limit"  ""  "\fLlimit\fR \(em alter resource limitations"
.IX "limit command" "" "\fLlimit\fR command"
Limit the consumption by the current process or any process it spawns,
each not to exceed
.I max-use
on the specified
.IR resource .
If
.I max-use
is omitted, print the current limit; if
.I resource
is omitted, display all limits.
.RS
.TP
.B \-h
Use hard limits instead of the current limits.  Hard limits impose a
ceiling on the values of the current limits.  Only the super-user may
raise the hard limits.
.LP
.I resource
is one of:
.RS
.TP 15
.B cputime
Maximum
.SM CPU
seconds per process.
.PD 0
.TP
.B filesize
Largest single file allowed.
.TP
.B datasize
Maximum data size (including stack) for the process.
.TP
.B stacksize
Maximum stack size for the process.
.TP
.B coredumpsize
Maximum size of a core dump (file).
.PD
.RE
.LP
.I max-use
is a number, with an optional scaling factor, as follows:
.RS
.TP 15
.IB n h
Hours (for
.BR cputime ).
.PD 0
.TP
.IB n k
.I n
kilobytes. 
This is the default for all but
.BR cputime .
.TP
.IB n m
.I n
megabytes or minutes (for
.BR cputime ).
.TP
.IB mm : ss
Minutes and seconds (for
.BR cputime ).
.PD
.RE
.RE
.HP
.B login
[
.IR username \||\c
.B \-p
]
.br
.IX   "C shell commands"  "login"  ""  "\fLlogin\fR \(em login new user"
.IX "login command" "" "\fLlogin\fR command"
Terminate a login shell and invoke
.BR login (1).
The
.B \&.logout
file is not processed.  If
.I username
is omitted,
.I login
prompts for the name of a user.
.RS
.TP
.B \-p
Preserve the current environment (variables).
.RE
.TP
.B logout
.IX   "C shell commands"  "logout"  ""  "\fLlogout\fR \(em end session"
.IX "logout command" "" "\fLlogout\fR command"
Terminate a login shell.
.HP
.B nice
[
.B +\c
.IR n \||\c
.B \-\c
.I n
] [
.I command
]
.br
.IX   "C shell commands"  "nice"  ""  "\fLnice\fR \(em run low priority process"
.IX "nice command" "" "\fLnice\fR command"
Increment the process priority value for the shell or for
.I command
by
.IR n .
The higher the priority value, the lower the priority of a process, and
the slower it runs.
When given,
.I command
is always run in a subshell, and the restrictions placed on
commands in simple
.B if
commands apply.
If
.I command
is omitted,
.B nice
increments the value for the current shell.
If no increment is specified,
.B nice
sets the process priority value to 4.  The range of process priority values is
from \-20 to 20.  Values of
.I n
outside this range set the value to the lower, or to the higher
boundary, respectively.
.RS
.TP 10
.BI + n
Increment the process priority value by
.IR n .
.PD 0
.TP
.BI \- n
Decrement by
.IR n .
This argument can be used only by the super-user.
.PD
.RE
.HP
.B nohup
[
.I command
]
.br
.IX   "C shell commands"  "nohup"  ""  "\fLnohup\fR \(em run command immune to hangups"
.IX "nohup command" "" "\fLnohup\fR command"
Run
.I command
with
.SM HUP\s0s
ignored.  With no arguments, ignore
.SM HUP\s0s
throughout the remainder of a script.
When given,
.I command
is always run in a subshell, and the restrictions placed on
commands in simple
.B if
commands apply.
All processes detached with
.B &
are effectively
.BR nohup 'd.
.HP
.B notify
[
.BI % job
] .\|.\|.
.br
.IX   "C shell commands"  "notify"  ""  "\fLnotify\fR \(em request immediate notification"
.IX "notify command" "" "\fLnotify\fR command"
Notify the user asynchronously when the status of the current, or of specified
jobs, changes.
.HP
.B onintr
.RB [ " \- " |
.IR label ]
.br
.IX   "C shell commands"  "onintr"  ""  "\fLonintr\fR \(em handle interrupts in scripts"
.IX "onintr command" "" "\fLonintr\fR command"
Control the action of the shell on interrupts.
With no arguments,
.B onintr
restores the default action of the shell on interrupts.
(The shell terminates shell scripts and returns to the
terminal command input level).
With the
.B \-
argument, the shell ignores all interrupts.
With a
.I label
argument, the shell executes a
.BI goto " label"
when an interrupt is received or a child process terminates because
it was interrupted.
.HP
.B popd
.RB [ +\c
.IR n ]
.br
.IX   "C shell commands"  "popd"  ""  "\fLpopd\fR \(em pop shell directory stack"
.IX "popd command" "" "\fLpopd\fR command"
Pop the directory stack, and
.BR cd s
to the new top directory.
The elements of the directory stack are numbered from 0 starting at the top.
.RS
.TP 8
.BI + n
Discard the
.IR n 'th
entry in the stack.
.RE
.HP
.B pushd
.RB [ +\c
.IR n " |"
.IR dir ]
.br
.IX   "C shell commands"  "pushd"  ""  "\fLpushd\fR \(em push shell directory stack"
.IX "pushd command" "" "\fLpushd\fR command"
Push a directory onto the directory stack.
With no arguments, exchange the top two elements.
.RS
.TP
.BI + n
Rotate the
.IR n 'th
entry to the top of the stack and
.B cd
to it.
.PD 0
.TP
.I dir
Push the current working directory onto the stack and change to
.IR dir .
.PD
.RE
.TP
.B rehash
.IX   "C shell commands"  "rehash"  ""  "\fLrehash\fR \(em recompute command hash table"
.IX "rehash command" "" "\fLrehash\fR command"
Recompute the internal hash table of the contents of directories listed
in the
.I path
variable to account for new commands added.
.TP
.BI repeat " count command"
.IX   "C shell commands"  "repeat"  ""  "\fLrepeat\fR \(em execute command repeatedly"
.IX "repeat command" "" "\fLrepeat\fR command"
Repeat
.I command
.I count
times
.I command
is subject to the same restrictions as with the one-line
.B if
statement.
.HP
.B set
.RI [ var
[
.BI = " value"
] ]
.br
.PD 0
.HP
.BI set " var" [ n "] =" " word"
.br
.PD
.IX   "C shell commands"  "set"  ""  "\fLset\fR \(em change value of shell variable"
.IX "set command" "" "\fLset\fR command"
With no arguments,
.B set
displays the values of all shell variables.  Multiword values
are displayed as a parenthesized list.  With the
.I var
argument alone,
.B set
assigns an empty (null) value to the variable
.IR var .
With arguments of the form
.IB var " = " value
.B set
assigns
.I value
to
.IR var ,
where
.I value
is one of:
.RS
.RS
.TP 12
.I word
A single word (or quoted string).
.PD 0
.TP
.BI ( wordlist )
A space-separated list of words enclosed in parentheses.
.PD
.RE
.LP
Values are command and filename expanded before being assigned.
The form
.BI set " var" [ n "] =" " word"
replaces the
.IR n 'th
word in a multiword value with
.IR word .
.RE
.HP
.B setenv
[
.SM
.I VAR
[
.I word
] ]
.br
.IX   "C shell commands"  "setenv"  ""  "\fLsetenv\fR \(em set or display variables in environment"
.IX "setenv command" "" "\fLsetenv\fR command"
With no arguments,
.B setenv
displays all environment variables.
With the
.SM
.I VAR
argument sets the environment variable
.SM
.I VAR
to have an empty (null) value.  (By convention, environment
variables are normally given upper-case names.)
With both
.SM
.I VAR
and
.I word
arguments
.B setenv
sets the environment variable
.SB NAME
to the value
.IR word ,
which must be either a single word or a quoted string.
The most commonly used environment variables,
.BR \s-1USER\s0 ,
.BR \s-1TERM\s0 ,
and
.BR \s-1PATH\s0 ,
are automatically imported to and exported from the
.B csh
variables
.BR user ,
.BR term ,
and
.BR path ;
there is no need to use
.B setenv
for these.
In addition,
the shell sets the
.SB PWD
environment variable from the
.B csh
variable
.B cwd
whenever the latter changes.
.HP
.B shift
[
.I variable
]
.br
.IX   "C shell commands"  "shift"  ""  "\fLshift\fR \(em shift argument list"
.IX "shift command" "" "\fLshift\fR command"
The components of
.BR argv ,
or
.IR variable ,
if supplied, are shifted to the left, discarding
the first component.
It is an error for the variable not to be set, or to have a null value.
.HP
.B source
[
.B \-h
]
.I name
.br
.IX   "C shell commands"  "source"  ""  "\fLsource\fR \(em read commands from file"
.IX "source command" "" "\fLsource\fR command"
Reads commands from
.IR name .
.B source
commands may be nested, but if they are nested too deeply the shell may
run out of file descriptors.
An error in a sourced file at any level terminates all nested
.B source
commands.
.RS
.TP  8
.B \-h
Place commands from the the file
.I name
on the history list without executing them.
.RE
.HP
.B stop
.RB [ %\c
.IR job "] .\|.\|."
.br
.IX   "C shell commands"  "stop"  ""  "\fLstop\fR \(em halt job or process"
.IX "stop command" "" "\fLstop\fR command"
Stop the current or specified background job.
.TP
.B suspend
.IX   "C shell commands"  "suspend"  ""  "\fLsuspend\fR \(em suspend shell"
.IX "suspend command" "" "\fLsuspend\fR command"
Stop the shell in its tracks, much as if it had been sent a stop
signal with
.BR ^Z .
This is most often used to stop shells started by
.BR su .
.TP
.BI "switch (" string )
.PD 0
.TP
.BI case " label" :
.TP
\&.\|.\|.
.TP
.B breaksw
.TP
\&.\|.\|.
.TP
.B default:
.TP
\&.\|.\|.
.TP
.B breaksw
.TP
.B endsw
.PD
.IX   "C shell commands"  "switch"  ""  "\fLswitch\fR \(em multi-way branch"
.IX "switch command" "" "\fLswitch\fR command"
.IX   "C shell commands"  "endsw"  ""  "\fLendsw\fR \(em end switch"
.IX "endsw command" "" "\fLendsw\fR command"
Each
.I label
is successively matched, against the specified
.IR string ,
which is first command and filename expanded.
The file metacharacters
.BR * ,
.B ?
and
.BR [ .\|.\|. ]
may be used in the case labels, which are variable expanded.
If none of the labels match before a \(lqdefault\(rq label is found,
execution begins after the default label.
Each
.B case
statement and the
.B default
statement must appear at the beginning of a line.
The command
.B breaksw
continues execution after the
.BR endsw .
Otherwise control falls through subsequent
.B case
and
.B default
statements as with C.
If no label matches and there is no default, execution continues after
the
.BR endsw .
.PD
.HP
.B time
[
.I command
]
.br
.IX   "C shell commands"  "time"  ""  "\fLtime\fR \(em time command"
.IX "time command" "" "\fLtime\fR command"
With no argument, print a summary of time used by
this C shell and its children.
With an optional
.IR command ,
execute
.I command
and print a summary of the time it uses.
.HP
.B umask
[
.I value
]
.br
.IX   "C shell commands"  "umask"  ""  "\fLumask\fR \(em change/display file creation mask"
.IX "umask command" "" "\fLumask\fR command"
Display the file creation mask.
With
.I value
set the file creation mask.
.I value
is given in octal, and is
.SM XOR\*Sed
with the permissions of 666 for files and 777 for directories to arrive
at the permissions for new files.
Common values include 002, giving complete access to the group, and
read (and directory search) access to others, or 022, giving read
(and directory search) but not write permission to the group and others.
.TP
.BI unalias " pattern"
.IX   "C shell commands"  "unalias"  ""  "\fLunalias\fR \(em remove aliases"
.IX "unalias command" "" "\fLunalias\fR command"
Discard aliases that match (filename substitution)
.IR pattern .
All aliases are removed by
.BR "unalias\ *" .
.TP
.BR unhash
.IX   "C shell commands"  "unhash"  ""  "\fLunhash\fR \(em discard hash table"
.IX "unhash command" "" "\fLunhash\fR command"
Disable the internal hash table.
.HP
.B unlimit
[
.B \-h
] [
.I resource
]
.br
.IX   "C shell commands"  "unlimit"  ""  "\fLunlimit\fR \(em remove resource limitations"
.IX "unlimit command" "" "\fLunlimit\fR command"
Remove a limitation on
.IR resource .
If no
.I resource
is specified, then all
.I resource
limitations are removed.
See the description of the
.B limit
command for the list of
.I resource
names.
.RS
.TP 8
.B \-h
Remove corresponding hard limits.  Only the super-user may do this.
.RE
.TP
.BI unset " pattern"
.IX   "C shell commands"  "unset"  ""  "\fLunset\fR \(em discard shell variables"
.IX "unset command" "" "\fLunset\fR command"
Remove variables whose names match (filename substitution)
.IR pattern .
All variables are removed by
.RB ` "unset *" ';
this has noticeably distasteful side-effects.
.TP
.BI unsetenv " variable"
.IX   "C shell commands"  "unsetenv"  ""  "\fLunsetenv\fR \(em remove environment variables"
.IX "unsetenv command" "" "\fLunsetenv\fR command"
Remove
.I variable
from the environment.
Pattern matching, as with
.B unset
is not performed.
.TP
.B wait
.IX   "C shell commands"  "wait"  ""  "\fLwait\fR \(em wait for background process"
.IX "wait command" "" "\fLwait\fR command"
Wait for background jobs to finish (or for an interrupt) before
prompting.
.TP
.BI "while (" expr )
.PD 0
.TP
\&.\|.\|.
.TP
.B end
.PD
.IX   "while shell command"  ""  "\fLwhile\fP \(em repeat commands \(em \fLcsh\fR"
.IX "while command" "" "\fLwhile\fR command"
While
.I expr
is true (evaluates to non-zero), repeat commands between the
.B while
and the matching
.B end
statement.
.B break
and
.B continue
may be used to terminate or continue the loop prematurely.
The
.B while
and
.B end
must appear alone on their input lines.
If the shell's input is a terminal, it prompts for commands
with a question-mark until the
.B end
command is entered and then performs the commands in the loop.
.HP
.B %\c
[
.I job
] [
.B &
]
.br
.IX % "job to foreground/background \(em \fLcsh\fR" "\fL%\fR"
.IX   "C shell commands"  "%"  ""  "\fL%\fR\ \ \ \(em job to foreground/background"
Bring the current or indicated
.I job
to the foreground.
With the ampersand, continue running
.I job
in the background.
.HP
.B @
[
.I var
.BI = expr
]
.PD 0
.HP
.B @
[
.I var\c
.BI [ n ]
.BI = expr
]
.br
.PD
With no arguments, display the values for all shell variables.
With arguments,
the variable
.IR var ,
or the
.IR n 'th
word in the value of
.IR var ,
to the value that
.I expr
evaluates to.
.IX @ ""  "\fL@\fP\ \ \ \(em arithmetic on variables \(em \fLcsh\fR"
.IX "C shell commands" "@"  ""  "\fL@\fR\ \ \ \(em arithmetic on variables"
(If
.BI [ n ]
is supplied, both
.I var
and its
.IR n 'th
component must already exist.)
.IP
If the expression contains the characters
.BR > ,
.BR < ,
.B &
or
.BR | ,
then at least this part of
.I expr
must be placed within parentheses.
.IP
The operators
.BR *= ,
.BR += ,
etc., are available as in C.
The space separating the name from the assignment operator is optional.
Spaces are, however, mandatory in separating components of
.I expr
that would otherwise be single words.
.IP
Special postfix operators,
.B +\|+
and
.B \-\|\-
increment or decrement
.IR name ,
respectively.
.PD
.IX "C shell" "commands" "" "" PAGE END
.\"	end of csh_built-ins
.if \n(zZ=1 .ig zZ
.SS "Environment Variables and Predefined Shell Variables"
.IX  "C shell variables"  ""  ""  ""  PAGE START
.IX  "predefined variables, in C shell"
.IX  "environment variables \(em in C shell"
.IX  variables "in C shell"
.LP
Unlike the standard shell, the C shell maintains a distinction between
environment variables,
which are automatically exported to processes it invokes, and
shell variables, which are not.
Both types of variables are treated similarly under variable substitution.
The shell sets the variables
.BR argv ,
.BR cwd ,
.BR home ,
.BR path ,
.BR prompt ,
.BR shell ,
and
.BR status
upon initialization.
The shell copies the environment variable
.SB USER
into the shell variable
.BR user ,
.SB TERM
into
.BR term ,
and
.SB HOME
into
.BR home ,
and copies each back into the respective environment variable whenever
the shell variables are reset.
.SB PATH
and
.B path
are similarly handled.  You need only set
.B path
once in the
.B \&.cshrc
or
.B \&.login
file. 
The environment variable
.SB PWD
is set from
.B cwd
whenever the latter changes. 
The following shell variables have predefined meanings:
.TP 18
.B argv
.IX   "C shell variables"  "argv"  ""  "\fLargv\fR"
.IX   "C shell" "arguments list \(em \fLargv\fR variable"
.IX  "argv variable" "" "\fLargv\fR variable"
Argument list.
Contains the list of command line arguments
supplied to the current invocation of the shell.
This variable
determines the value of the positional parameters
.BR $1 ,
.BR $2 ,
and so on.
.TP
.B cdpath
.IX   "C shell variables"  "cdpath"  ""  "\fLcdpath\fR"
.IX  "cdpath variable" "" "\fLcdpath\fR variable"
Contains a list of directories to be searched by the
.BR cd ,
.BR chdir ,
and
.BR popd
commands, if the directory argument each accepts is not a subdirectory
of the current directory.
.TP
.B cwd
.IX   "C shell variables"  "cwd"  ""  "\fLcwd\fR"
.IX  "cwd variable" "" "\fLcwd\fR variable"
The full pathname of the current directory.
.TP
.B echo
.IX   "C shell variables"  "echo"  ""  "\fLecho\fR"
.IX  "echo variable" "" "\fLecho\fR variable"
Echo commands (after substitutions), just before execution.
.TP
.B fignore
.IX   "C shell variables"  "fignore" "" "\fLfignore\fR"
.IX  "fignore variable" "" "\fLfignore\fR variable"
A list of filename suffixes to ignore when attempting filename
completion.  Typically the single word
.RB ` \&.o '.
.TP
.B filec
.IX   "C shell variables"  "filec" "" "\fLfilec\fR"
.IX  "filec variable" "" "\fLfilec\fR variable"
Enable filename completion, in which case the
\s-1CTRL-D\s0
character
\s-1CTRL-D\s0)
and the
.SM ESC
character have special significance when typed in at the end of
a terminal input line:
.RS
.TP
.SM EOT
Print a list of all filenames that start with the preceding string.
.PD 0
.TP
.SM ESC
Replace the preceding string with the
longest unambiguous extension.
.PD
.RE
.TP
.B hardpaths
.IX   "C shell variables"  "hardpaths"  ""  "\fLhardpaths\fR"
.IX  "hardpaths variable" "" "\fLhardpaths\fR variable"
If set, pathnames in the directory stack are resolved to contain
no symbolic-link components.
.TP
.B histchars
.IX   "C shell variables"  "histchars"  ""  "\fLhistchars\fR"
.IX  "histchars variable" "" "\fLhistchars\fR variable"
A two-character string.  The first character replaces
.B !
as the history-substitution character.  The second replaces
the carat
.RB ( \*^ )
for quick substitutions.
.TP
.B history
.IX   "C shell variables"  "history"  ""  "\fLhistory\fR"
.IX  "history variable" "" "\fLhistory\fR variable"
The number of lines saved in the history list.
A very large number may use up all of the C shell's memory.
If not set, the C shell saves only the most recent command.
.TP
.B home
.IX   "C shell variables"  "home"  ""  "\fLhome\fR"
.IX  "home variable" "" "\fLhome\fR variable"
The user's home directory.
The filename expansion of
.B \*~
refers to the value of this variable.
.TP
.B ignoreeof
.IX   "C shell variables"  "ignoreeof"  ""  "\fLignoreeof\fR"
.IX  "ignoreeof variable" "" "\fLignoreeof\fR variable"
If set, the shell ignores
.SM EOF
from terminals.
This protects
against accidentally killing a C shell by typing a
\s-1CTRL-D\s0.
.TP
.B mail
.IX   "C shell variables"  "mail"  ""  "\fLmail\fR"
.IX  "mail variable" "" "\fLmail\fR variable"
A list of files where the C shell checks for mail.
If the first word of the value is a number, it specifies a mail checking
interval in seconds (default 5 minutes).
.TP
.B nobeep
.IX   "C shell variables"  "nobeep"  ""  "\fLnobeep\fR"
.IX  "nobeep variable" "" "\fLnobeep\fR variable"
Suppress the bell during command completion when asking the C shell to
extend an ambiguous filename.
.TP
.B noclobber
.IX   "C shell variables"  "noclobber"  ""  "\fLnoclobber\fR"
.IX  "noclobber variable" "" "\fLnoclobber\fR variable"
Restrict output redirection so that existing files are not destroyed by
accident.
.B >
redirections can only be made to new files.
.B >>
redirections can only be made to existing files.
.TP
.B noglob
.IX   "C shell variables"  "noglob"  ""  "\fLnoglob\fR"
.IX  "noglob variable" "" "\fLnoglob\fR variable"
Inhibit filename substitution.
This is most useful in shell scripts once filenames (if any) are
obtained and no further expansion is desired.
.TP
.B nonomatch
.IX   "C shell variables"  "nonomatch"  ""  "\fLnonomatch\fR"
.IX  "nonomatch variable" "" "\fLnonomatch\fR variable"
Returns the filename substitution pattern, rather than an error, if the
pattern is not matched.
Malformed patterns still result in errors.
.IX   "C shell variables"  "notify"  ""  "\fLnotify\fR"
.IX  "notify variable" "" "\fLnotify\fR variable"
.TP
.B notify
If set, the shell notifies you immediately as jobs are completed,
rather than waiting until just before issuing a prompt.
.TP
.B path
.IX   "C shell variables"  "path"  ""  "\fLpath\fR"
.IX  "path variable" "" "\fLpath\fR variable"
The list of directories in which to search for commands.
.B path
is initialized from the environment variable
.BR \s-1PATH\s0 ,
which the C shell updates whenever
.B path
changes.
A null word specifies the current directory. 
The default is typically:
.BR "(. /usr/ucb /usr/bin)" .
If
.B path
becomes unset only full pathnames will execute.
An interactive C shell will normally hash the contents of the
directories
listed after reading
.BR \&.cshrc ,
and whenever
.B path
is reset.
If new commands are added, use the
.B rehash
command to update the table.
.TP
.B prompt
.IX   "C shell variables"  "prompt"  ""  "\fLprompt\fR"
.IX  "prompt variable" "" "\fLprompt\fR variable"
The string an interactive C shell prompts with.
Noninteractive shells leave the
.B prompt
variable unset.
Aliases and other commands in the
.B \&.cshrc
file that are only useful interactively, can be placed after the
following test:
.RB ` "if ($?prompt == 0) exit" ',
to reduce startup time for noninteractive shells.
A
.B !
in the
.B prompt
string is replaced by the current event number.
The default prompt is
.IB hostname %
for mere mortals, or
.IB hostname #
for the super-user.
.TP
.B savehist
.IX   "C shell variables"  "savehist"  ""  "\fLsavehist\fR"
.IX  "savehist variable" "" "\fLsavehist\fR variable"
The number of lines from the history list that are saved in
.B \*~/.history
when the user logs out.
Large values for
.B savehist
slow down the C shell during startup.
.TP
.B shell
.IX   "C shell variables"  "shell"  ""  "\fLshell\fR"
.IX  "shell variable" "" "\fLshell\fR variable"
The file in which the C shell resides.
This is used in forking shells to interpret files that have execute
bits set, but that are not executable by the system.
.TP
.B status
.IX   "C shell variables"  "status"  ""  "\fLstatus\fR"
.IX  "status variable" "" "\fLstatus\fR variable"
The status returned by the most recent command.
If that command terminated abnormally, 0200 is added to the status.
Built-in commands that fail return exit status 1,
all other built-in commands set status to 0.
.TP
.B time
.IX   "C shell variables"  "time"  ""  "\fLtime\fR"
.IX  "time variable" "" "\fLtime\fR variable"
Control automatic timing of commands.  Can be supplied with one or two
values.  The first is the reporting threshold in
.SM CPU
seconds. 
The second is a string of tags and text indicating which resources
to report on.
A tag is a percent sign
.RB ( \^%\^ )
followed by a single
.I upper-case
letter (unrecognized tags print as text):
.RS
.RS
.TP
.B %D
Average amount of unshared data space used in Kilobytes.
.PD 0
.TP
.B %E
Elapsed (wallclock) time for the command.
.TP
.B %F
Page faults.
.TP
.B %I
Number of block input operations.
.TP
.B %K
Average amount of unshared stack space used in Kilobytes.
.TP
.B %M
Maximum real memory used during execution of the process.
.TP
.B %O
Number of block output operations.
.TP
.B %P
Total
.SM CPU
time \(em U (user) plus S (system) \(em as a percentage of
E (elapsed) time.
.TP
.B %S
Number of seconds of
.SM CPU 
time consumed by the kernel on behalf of the
user's process.
.TP
.B %U
Number of seconds of
.SM CPU
time devoted to the user's process.
.TP
.B %W
Number of swaps.
.TP
.B %X
Average amount of shared memory used in Kilobytes.
.RE
.RE
.PD
.IP
The default summary display outputs from the
.BR %U ,
.BR %S ,
.BR %E ,
.BR %P ,
.BR %X ,
.BR %D ,
.BR %I ,
.BR %O ,
.BR %F
and
.BR %W
tags, in that order.
.TP
.B verbose
.IX   "C shell variables"  "verbose"  ""  "\fLverbose\fR"
.IX  "verbose variable" "" "\fLverbose\fR variable"
Display each command after history substitution takes place.
.br
.ne 7
.SH FILES
.PD 0
.TP 20
.B \*~/.cshrc
Read at beginning of execution by each shell.
.TP
.B \*~/.login
Read by login shells after
.B \&.cshrc
at login.
.TP
.B \*~/.logout
Read by login shells at logout.
.TP
.B \*~/.history
Saved history for use at next login.
.TP
.B /usr/bin/sh
Standard shell, for shell scripts not starting with a
.RB ` # '.
.TP
.B /tmp/sh*
Temporary file for
.RB ` << '.
.TP
.B /etc/passwd
Source of home directories for
.IR `\*~name' .
.PD
.SH "SEE ALSO"
.BR login (1),
.BR printenv (1),
.BR sh (1),
.BR tset (1),
.BR access (2),
.BR execve (2),
.BR fork (2),
.BR pipe (2),
.BR termio (4),
.BR a.out (5),
.BR environ (5V),
.BR ascii (7)
.LP
.TX DMBG
.br
.TX GSBG
.SH DIAGNOSTICS
.TP
.B "You have stopped jobs."
You attempted to exit the C shell with stopped jobs under job control.
An immediate second attempt to exit will succeed, terminating
the stopped jobs.
.SH LIMITATIONS
Words can be no longer than 1024 characters.
The system limits argument lists to 1,048,576 characters.  However,
the maximum number of arguments to a command for which filename
expansion applies is 1706.
Command substitutions may expand to no more characters than are
allowed in the argument list.
To detect looping, the shell restricts the number of
.B alias
substitutions on a single line to 20.
.SH BUGS
.LP
When a command is restarted from a stop,
the shell prints the directory it started in if this is different
from the current directory; this can be misleading (that is, wrong)
as the job may have changed directories internally.
.LP
Shell built-in functions are not stoppable/restartable.
Command sequences of the form
.IB a " ; " b " ; " c
are also not handled gracefully
when stopping is attempted.
If you suspend
.IR b ,
the shell never executes
.IR c .
This is especially noticeable if the
expansion results from an alias.
It can be avoided by
placing the sequence in parentheses to force it into a subshell.
.LP
Control over terminal output after processes are started is primitive;
use the Sun Window system if you need better output control.
.LP
Multiline shell procedures should be provided, as they are with the
standard (Bourne) shell.
.LP
Commands within loops, prompted for by
.BR ? ,
are not placed in the
.I history
list.
.LP
Control structures should be parsed rather than being recognized as
built-in commands.
This would allow control commands to be placed
anywhere, to be combined with
.BR | ,
and to be used with
.B &
and
.B ;
metasyntax.
.br
.ne 5
.LP
It should be possible to use the
.B :
modifiers on the output of command substitutions.
There are two problems with
.B :
modifier usage on variable substitutions:
not all of the modifiers are available, and only one modifier per
substitution is allowed.
.LP
The
.B g
(global) flag in history substitutions applies only to the first
match in each word, rather than all matches in all words. 
The the standard text editors consistently do the latter when given the
.B g
flag in a substitution command.
.LP
Quoting conventions are confusing.  Overriding the
escape character to force variable substitutions within double
quotes is counterintutive and inconsistent with the Bourne shell.
.LP
Symbolic links can fool the shell. 
Setting the
.B hardpaths
variable alleviates this.
.LP
.RB ` "set path" '
should remove duplicate pathnames from the pathname list.
These often occur because a shell script or a
.B \&.cshrc
file does something like
.RB ` "set path=(/usr/local\ \ /usr/hosts\ \ $path)" '
to ensure that the named directories are in the pathname list.
.br
.ne 3
.LP
The only way to direct the standard output and standard error
separately is by invoking a subshell, as follows:
.IP
.ft B
example% (\|\fIcommand\fP > \fIoutfile\fP\|) >& \fIerrorfile\fP
.ft R
.LP
Although robust enough for general use, adventures into the esoteric
periphery of the C shell may reveal unexpected quirks.
.zZ
C shell variables"  "histchars"  ""  "\fLhistchars\fR"
.IX  "histchars variable" "" "\fLhistchars\fR variable"
A two-character string.  The first character replaces
.B !
as the history-substitution character.  The second replaces
the carat
.RB ( \*^ )
for quick substitutions.
.TP
.B histo./share/man/man1/csh_builtins.1                                                                        755       0      12         1260  4424740641  11455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)csh_builtins.1 1.15 89/03/26 SMI; 
.\" This is a hack to force csh builtins into the whatis database
.\" and to get the list of builtins to come up with the man command.
.TH CSH_BUILTINS 1
.SH NAME
csh, %, @, alias, bg, break, breaksw, case, continue, default,
dirs, else, end, endif, endsw, eval, exec, exit, fg, foreach, glob,
goto, hashstat, history, if, jobs, label, limit, logout, notify,
onintr, popd, pushd, rehash, repeat, set, setenv, shift, source, stop,
suspend, switch, then, umask, unalias, unhash, unlimit, unset,
unsetenv, while \- C shell built-in commands, see \fBcsh\fR(1)
.SH C-SHELL BUILTIN COMMANDS
.nr zZ 1
.so /usr/man/man1/csh.1
.SH SEE ALSO
csh(1), sh(1)
1     `    domainname.1    p    dos.1       
dos2unix.1       du.1v        dumbplot.1g       e.1       echo.1v       ed.1 1v       edit.1         egrep.1v         eject.1        else.1    0    end.1     @    endif.1   P    endsw.1   d    enro./share/man/man1/csplit.1                                                                              755       0      12         6744  4424740641  10301                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)csplit.1 1.14 89/03/26 SMI; from S5R2 6.2
.TH CSPLIT 1 "21 December 1987"
.SH NAME
csplit \- split a file with respect to a given context
.SH SYNOPSIS
.B csplit
[
.B \-f 
.I prefix 
] [
.B \-k 
] [
.B \-s
]
.I filename 
.I argument1 
[
.RI .\|.\|. argumentn
]
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX csplit "" "\fLcsplit\fR \(em split file into sections"
.IX files "\fLcsplit\fR \(em split file into sections"
.B csplit
reads the file whose name is
.I filename
and separates it into
\fIn\fR+1 sections,
defined by the arguments
.I argument1
through
.IR argumentn .
If the
.I filename
argument is a
.RB ` \- ',
the standard input is used.
By default the sections are placed in files named
.B xx00
through
.BR xx\fIn .
.I n
may not be greater than 99.
These sections receive the following portions of the 
file:
.TP .85i 
.BR xx00
From the start of
.I filename
up to (but not including) the line indicated by
.I argument1  
(see 
.SM OPTIONS
below for an explanation of these arguments.)
.PD 0
.TP
.BR xx01 :
From the line indicated by
.I argument1
up to the line indicated by
.IR argument2 .
.TP 
.BR xx\fIn :
From the line referenced by
.I argumentn
to the end of
.IR filename .
.PD
.LP
.B csplit
prints the character counts for each file created,
and removes any files
it creates if an error occurs.
.SH OPTIONS
.TP .85i
.BI \-f \ prefix
name the created files 
.IB prefix 00
through
.IR prefixn .
.TP .85i
.B \-k
Suppress removal of created files when an error occurs.
.TP .85i 
.B \-s
Suppress printing of character counts.
.LP
The arguments
.I argument1
through
.I argumentn 
can be a combination of the following selection operators:
.TP .85i 
.BI / rexp /
A file is to be created for the section from the current line
up to (but not including) the line containing the regular expression
.IR rexp .
The current line then becomes the line containing
.IR rexp .
This argument may be followed by an optional
.RB ` + "' or"
.RB ` \- '
some number of lines
(for example,
.BR /Page/\-5 ).
.TP .85i 
.RI % rexp %
This argument is the same as
.RI / rexp /,
except that no file is created for the selected section.
.TP .85i 
.I lineno
A file is to be created from the current line up to (but not including)
.IR lineno .
The current line becomes
.IR lineno .
.TP .85i 
.RI { num }
Repeat argument.
This argument may follow any of the above arguments.
If it follows a
.I rexp
type argument, that argument is applied
.I num
more times.
If it follows
.IR lineno ,
the file will be split every
.I lineno
lines
.RI ( num
times) from that point.
.LP
Enclose all
.I rexp
type arguments that contain blanks or other characters meaningful to
the shell in the appropriate quotes.
Regular expressions may not contain embedded new-lines.
.SH EXAMPLES
This example splits the file at every 100 lines, up to 10,000 lines.
.IP
.B csplit \-k file\ \ 100\ \ {99}
.LP
Assuming that
.B prog.c
follows the normal
.B C
coding convention of ending routines with a
.B }
at the beginning of the line,
this example will create a file containing each separate
.B C
routine (up to 21) in
.BR prog.c .
.IP
.B
csplit \-k prog.\|c\ \ \(fm%main\|(%\(fm\ \ \(fm/^\|}\|/+1\(fm\ \ {20}
.SH SEE ALSO
.BR ed (1),
.BR sh (1),
.BR regexp (3)
.br
.ne 8
.SH DIAGNOSTICS
.LP
Self-explanatory except for:
.IP 
.B arg \- out of range
.LP
which means that the given argument did not refer to a line
between the current position and the
.SM EOF\s0.
      neqn.1     ./share/man/man1/ctags.1                                                                               755       0      12        11500  4424740641  10106                                                                                                                                                                                                                                                                                                                                                                      .\"Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)ctags.1 1.18 89/03/26 SMI; from UCB 6.2 5/30/85
.TH CTAGS 1 "22 March 1989"
.SH NAME
ctags \- create a tags file for use with ex and vi
.SH SYNOPSIS
.B ctags
[ 
.B \-aBFtuvwx
] 
[
.B \-f 
.I tagsfile
]
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  ctags  ""  "\fLctags\fP \(em create tags file"
.IX  "programming tools"  "ctags command"  ""  "\fLctags\fP \(em create tags file"
.IX  "C programming language"  "ctags command"  ""  "\fLctags\fP \(em create tags file"
.IX  "yacc" "" "\fLyacc\fP language tags file \(em \fLctags\fP"
.IX  "lex" "" "\fLlex\fP language tags file \(em \fLctags\fP"
.IX  create  "tags file"
.B ctags
makes a tags file for
.BR ex (1)
from the specified C, Pascal,
.SM FORTRAN\s0,
.BR yacc (1),
and 
.BR lex (1)
sources.
A tags file gives the locations of specified objects (in this case
functions and type definitions) in a group of files.  Each entry in the
tags is composed of three fields separated by white space, the object
name, the the file in which it is defined, and an address specification.
Function definitions are located using regular expression patterns,
type definitions, using a line number.
.LP
.BR ex
and
.BR vi (1)
use entries in the tags file to locate and display a definition.
.LP
Normally 
.B ctags
places the tag descriptions in a file called
.BR tags ;
this may be overridden with the
.B \-f
option.
By default, the tags file is sorted in lexicographic
(\s-1ASCII\s0)
order, and
.B ex
expects its entries to be so sorted.
.LP
Files with names ending in 
.B \&.c
or
.B \&.h
are assumed to be C 
source files and are searched for C 
routine and macro definitions.
Files with names ending in
.B \&.y
are assumed to be 
.B yacc
source files.
Files with names ending in
.B \&.l
are assumed to be 
.B lex
files.  Others are first examined to see if
they contain any Pascal or
.SM FORTRAN
routine definitions; if not, they are processed again looking for C 
definitions.
.LP
The tag for the
.B main(\|)
function is treated specially in C 
programs.  The tag formed is created by prepending
.B M
to
.IR filename ,
with a trailing 
.B \&.c 
removed, if any, and leading pathname components also removed.  
This makes use of
.B ctags
practical in directories with more than one program.
.SH OPTIONS
.TP
.B \-a
Append output to an existing tags file.  The resulting file is
not sorted.  To preserve the order, use
.BR \-u
instead.
.TP
.B \-B
Use backward searching patterns
.RB ( ? .\|.\|.\| ? ).
.TP
.B \-F
Use forward searching patterns
.RB ( / .\|.\|.\| / )
(default).
.TP
.B \-t
Create tags for typedefs.
.TP
.B \-u
Update the specified files
in the tags file.   Entries that refer to them are deleted
and then replaced in lexicographic order.
Beware: this option is implemented in a way which is rather slow;
it may be faster simply to rebuild the tags file.
.TP
.B \-v
Produce
an index of the form expected by
.BR vgrind (1)
on the standard output.
This listing contains the function name,
file name, and page number
(assuming 64 line pages).
Since the output will be sorted into lexicographic order,
it may be desired to run the output through
.RB ` "sort \-f" '.
See
.SM EXAMPLES\s0.
.TP
.B \-w
Suppress warning diagnostics.
.TP
.B \-x
Produce a list of object names, the line number and file
name on which each is defined, as well as the text of that line
and prints this on the standard output.  This is a simple index
which can be printed out as an off-line readable function index.
.SH EXAMPLES
Using
.B ctags
with the 
.B \-v 
option produces entries in an order which may not always be appropriate
for
.BR vgrind .
To produce results in alphabetical order, you may want to run the
output through
.RB ` "sort \-f" '.
.sp .5
.RS
.nf
.ft B
example% ctags \-v filename.c filename.h | sort \-f \|>\| index"
example% vgrind \-x index
.ft
.fi
.RE
.LP
To build a tags file for C sources in a directory hierarchy,
first create an empty tags file, and then run the following
.BR find (1)
command:
.LP
.RS
.ft B
.nf
example% cd ~/src ; rm \-f tags ; touch tags
example% find ~/src \e( -name '*.c' -o -name '*.h' \e) -exec ctags -u -f /usr/src/tags {} \e;
.fi
.ft
.RE
.SH FILES
.PD 0
.TP 20
.B tags
output tags file
.PD
.SH SEE ALSO
.BR ex (1),
.BR find (1),
.BR vgrind (1),
.BR vi (1)
.SH BUGS
Recognition of
.BR functions ,
.B subroutines
and
.B procedures
for
.SM FORTRAN
and Pascal is done is a very simpleminded way.
No attempt is made to deal with block structure; if you have two
Pascal procedures in different blocks with the same name,
.B ctags
will only make an entry for one.
.LP
.B ctags
does not know about
.BR #ifdefs .
.LP
.B ctags
should know about Pascal types.
Relies on the input being well formed to detect typedefs.
Use of
.B \-tx
shows only the last line of typedefs.
en_default.1 $       logger.1        login.1        	logname.1 1       logout.1  gi      look.1 1      	lookbib.1  o      lorder.1  ok  ,    lpq../share/man/man1/ctrace.1                                                                              755       0      12        26517  4424740641  10264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ctrace.1 1.20 89/03/26 SMI; from S5
.TH CTRACE 1 "21 December 1987"
.SH NAME
ctrace \- generate a C program execution trace
.SH SYNOPSIS
.B ctrace
[
.B \-f 
.I functions
] [
.B \-v
.I functions
] [
.B \-o x u e
] [
.B \-s P b
] [
.B \-l
.I n
] [
.B \-t
.I n
] [
] [
.B \-b
] [
.BI "\-p '" \|s \|'
]
.if t .ti +.5i
[
.B \-r
.I f
] [
\fIfilename\fR
]
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ctrace command"  ""  "\fLctrace\fP \(em display program trace"
.IX  display "program trace \(em \fLctrace\fP"
.IX  "programming tools"  ctrace  ""  "\fLctrace\fP \(em display program trace"
.IX  "debug tools"  ctrace  ""  "\fLctrace\fP \(em display program trace"
.LP
.B ctrace
allows you to follow the execution of a 
.B C 
program, statement by statement.
The effect is similar to executing a shell procedure with the
.B \-x
option.
.B ctrace
reads the 
.B C 
program in
.I filename
(or from standard
input if you do not specify
\fIfilename\fR),
inserts statements to print
the text of each executable statement and the values of all
variables referenced or modified,
and writes the modified program to the standard output.
You must put the output of
.B ctrace
into a temporary file because the 
.BR cc (1V) 
command does not allow the use of a pipe.
You then compile and execute this file.
.LP
As each statement in the program executes it will be listed at the
terminal, followed by the name and value of
any variables referenced or
modified in the statement, followed by any output from the statement.
Loops in the trace output are detected
and tracing is stopped until the
loop is exited or a different sequence of statements
within the loop is executed.
.LP
A warning message is printed every 1000 times through the loop to
help you detect infinite loops.
The trace output goes to the standard output so you 
can put it into a file for examination with an editor or the
.BR tail (1)
command.
.SH OPTIONS
.TP  .85i
.BI \-f " functions"
Trace only these
.I functions.
.TP
.BI \-v " functions"
Trace all but these
.I functions.
.LP
You may want to add to the default formats for printing variables.
.B long
and pointer variables are always printed as signed integers.
Pointers to character arrays are printed as
strings if appropriate.
.BR char ,
.BR short ,
and 
.B int
variables are printed as signed integers and, if
appropriate, as characters.
.B double
variables are printed as floating-point numbers
in scientific notation.
You can request that variables be printed in additional formats, if
appropriate, with these options:
.LP
.TP .85i
.B \-o
Octal.
.TP
.B \-x
Hexadecimal.
.TP
.B \-u
Unsigned.
.TP
.B \-e
Floating point.
.LP
These options are used only in special circumstances:
.LP
.TP .85i
.BI \-l " n"
Check
.I n
consecutively executed statements for looping
trace output, instead of the
default of 20.  Use 0 to get all the trace output from loops.
.TP
.B \-s
Suppress redundant trace output from simple assignment statements and
string copy function calls.
This option can hide a bug caused by use of the 
.B = 
operator in place of the
.B =\|= 
operator.
.TP
.BI \-t " n"
Trace
.I n
variables per statement instead of the default of 10
(the maximum number is 20).  The 
.SM DIAGNOSTICS 
section explains when to use this option.
.TP
.B \-P
Run the 
.B C 
preprocessor on the input before tracing it.  You can also use the
.BR \-D ,
.BR \-I ,
and
.B \-U
.BR cc (1V)
options.
.PD
.LP
These options are used to tailor the run-time trace package when the
traced program will run in a non-\s-1UNIX\s0 system environment:
.LP
.PD 0
.TP .85i
.B \-b
Use only basic functions in the trace code, that is, those in
.BR ctype (3),
.BR printf (3S),
and
.BR string (3).
These are often available even in cross-compilers
for microprocessors.  In particular, this option is
needed when the traced program runs under an
operating system that does not have
.BR signal (3),
.BR fflush ,
.B longjmp
or
.BR setjmp (3)
(see
.BR fclose (3S)
and
.BR setjmp (3)).
.TP
.BI \-p " 's'"
Change the trace print function from the default of
.RB ' printf( '.
For example,
.RB ' fprintf(stderr '
would send the trace to the standard error output.
.TP
.BI \-r \|f
Use file
.I f
in place of the
.B runtime.\|c
trace function package.
This lets you change the entire print function, instead of just the
name and leading arguments (see the
.B \-p
option).
.PD
.SH USAGE
.SS Execution-Time Trace Control
The default operation for
.B ctrace
is to trace the entire program file, unless you use the
.B \-f
or
.B \-v
options to trace specific functions.
This does not give you statement by statement
control of the tracing, nor
does it let you turn the tracing off and on when executing
the
tracedprogram.
.LP
You can do both of these by adding
.BR ctroff ()
and
.BR ctron ()
function calls to your program to turn the tracing off and
on,
respectively, at execution time.
Thus, you can code arbitrarily complex criteria
for trace control with
.B if
statements, and you can even conditionally include this code
because
.B ctrace
defines the
.B
.SM CTRACE
preprocessor variable.
For example:
.RS
.nf
.ft B
#ifdef
.SM CTRACE
.ft B
.br
.RS
if (c == '!' && i > 1000)
.br
.RS
ctron();
.br
#endif
.br
.ft R
.fi
.RE
.RE
.RE
You can also call these functions from
.BR dbx (1)
if you compile with the
.B \-g
option.
For example, to trace all but lines 7 to 10
in the primary source file,
enter:
.nf
.ft B
dbx a.\|out
.br
when at 7 { call ctroff(); cont; }
.br
when at 11 { call ctron(); cont; }
.br
run
.ft R
.fi
You can also turn the trace off and on by
setting the static variable.B tr_ct_
to 0 and 1, respectively.
This is useful if you are using a debugger that
cannot call these
functions directly, such as
.BR adb (1).
.SH EXAMPLE
If the file
.B lc.\|c
contains this 
.B C 
program:
.RS
.ft B
.nf
#include <stdio.\|h>
main()	/* count lines in input */
{
	int c, nl;
	nl = 0;
	while ((c = getchar()) != \s-1EOF\s0)
		if (c = '\\n')
			++nl;
	printf("%d\\n", nl);
}
.fi
.ft R
.RE
and you enter these commands and test data:
.RS
.nf
.B cc lc.\|c
.B a.\|out
.B 1
.SM CTRL-\fBD\fP\s0,
.fi
.RE
the program will be compiled and executed.
The output of the program will be the number
.BR 2 ,
which is not
correct because there is only one line in the test data.
The error in this program is common, but subtle.
If you invoke
.B ctrace
with these commands:
.RS
.nf
.ft B
ctrace lc.\|c >temp.c
cc temp.\|c
a.\|out
.fi
.ft R
.RE
.br
.ne6
the output will be:
.RS
.nf
.ft B
main()
	nl = 0;
	/* nl == 0 */
	while ((c = getchar()) != \s-1EOF\s0)
.fi
.ft R
.RE
The program is now waiting for input.
If you enter the same test data as before, the output will be:
.RS
.ft B
.nf
	/* c == 49 or '1' */
		if (c = '\\n')
		/* c == 10 or '\\n' */
			++nl;
			/* nl == 1 */
	while ((c = getchar()) != \s-1EOF\s0)
	/* c == 10 or '\\n' */
		if (c = '\\n')
		/* c == 10 or '\\n' */
			++nl;
			/* nl == 2 */
\0 /* repeating */
.ft R
.fi
.RE
If you now enter an end of file character (\s-1CTRL-D\s0)
the final output
will be:
.RS
.ft B
.nf
\0 /* repeated <1 time */
	while ((c = getchar()) != \s-1EOF\s0)
	/* c == -1 */
	printf("%d\\n", nl);
	/* nl == 2 */2
\0 /* return */
.fi
.ft B
.RE
.br
Program output is printed at the end of the trace line
for the
.B nl
variable.
Also note the
.B return
comment added by
.B ctrace
at the end of the 
trace output.
This shows the implicit return at the
terminating brace in the function.
.LP
The trace output shows that variable
.B c
is assigned the value '1' in
line 7, but in line 8 it has the value '\\n'.
Once your attention is drawn to this
.B if
statement,
you will probably realize that you used the assignment operator 
.B =
in place of the equal operator 
.BR =\|= .
You can easily miss this error during code reading.
.SH FILES
.TP 20
.B /usr/lib/ctrace/runtime.c
run-time trace package
.SH SEE ALSO
.BR adb (1),
.BR cc (1V),
.BR dbx (1),
.BR tail (1),
.BR ctype (3),
.BR fclose (3S),
.BR printf (3S),
.BR setjmp (3),
.BR signal (3),
.BR string (3)
.SH DIAGNOSTICS
This section contains diagnostic messages from both
.B ctrace
and
.BR cc (1V),
since the traced code often gets some
.BR cc
warning messages.
You can get
.BR cc
error messages in some rare cases, all of which can be avoided.
.LP
.SS From ctrace 
.B "warning: some variables are not traced in this statement"
.RS
Only 10 variables are traced in a statement to prevent the 
.B C 
compiler
.RB ` "out of tree space; simplify expression" '
error.  Use the
.B \-t
option to increase this number.
.RE
.LP
.B "warning: statement too long to trace"
.RS
This statement is over 400 characters long.
Make sure that you are using tabs to indent your code, not spaces.
.RE
.LP
.B "cannot handle preprocessor code, use \-P option"
.RS
This is usually caused by
.B #ifdef/#endif
preprocessor statements in the middle of a 
.B C 
statement, or by a semicolon at the end of a #define
preprocessor statement.
.RE
.LP
.B "'\|if .\|.\|. else if\|' sequence too long"
.RS
Split the sequence by removing an
.B else
from the middle.
.RE
.LP
.B "possible syntax error, try \-P option"
.RS
Use the
.B \-P
option to preprocess the
.B ctrace
input, along with any appropriate
.BR \-D ,
.BR \-I ,
and
.B \-U
preprocessor options.
If you still get the error message, check the
.SM WARNINGS
section below.
.RE
.LP
.SS From cc
.B "warning: floating-point not implemented"
.br
.B "warning: illegal combination of pointer and integer"
.br
.B "warning: statement not reached"
.br
.B "warning: sizeof returns 0"
.RS
Ignore these messages.
.RE
.LP
.B "compiler takes size of function"
.RS
See the
.B ctrace
.RB ` "possible syntax error" '
message above.
.RE
.LP
.B "yacc stack overflow"
.RS
See the
.B ctrace
.RB ` "'if .\|.\|. else if' sequence too long" '
message above.
.RE
.LP
.B "out of tree space; simplify expression"
.RS
Use the
.B \-t
option to reduce the number of
traced variables per statement from the default of 10.
Ignore the
.RB ` "ctrace: too many variables to trace" '
warnings you will now get.
.RE
.LP
.B "redeclaration of signal"
.RS
Either correct this declaration of
.BR signal (3),
or remove it and
.BR "#include <signal.h>" .
.RE
.SS Warnings
You will get a
.B ctrace
syntax error if you omit the semicolon at the end of the last element
declaration in a structure or union, just before the right brace
.RB ( \|} ).
This is optional in some 
.B C 
compilers.
.LP	
Defining a function with the same name as a system function
may cause a syntax error if the number of arguments is
changed.  Just use a different name.
.LP
.B ctrace
assumes that 
.SM BADMAG 
is a preprocessor macro, and that
.SM EOF
and
.SM NULL
are 
.B #defined 
constants.
Declaring any of these to be variables, for example,
.RB ` "int \s-1EOF\s0;" ',
will cause a syntax error.
.SH BUGS
.B ctrace
does not know about the components of aggregates like structures,
unions, and arrays.  It cannot choose a format to print all the
components of an aggregate when an assignment is made to the entire
aggregate. 
.B ctrace
may choose to print the address of an aggregate
or use the wrong format (for example,
.B %e
for a structure with two integer
members) when printing the value of an aggregate.
.LP
Pointer values are always treated as pointers to character strings.
.LP
The loop trace output elimination is done separately
for each file of a
multi-file program.  This can result in functions called from a
loop still being traced, or the elimination of trace output from one
function in a file until another in the same file is called.
tracing off and
on,
respectively, at execution time.
Thus, you can code arbitrarily complex criteria
for trace control with
.B if
statements, and you can even conditionally incl./share/man/man1/cu.1c                                                                                 755       0      12           61  4424740641   7477                                                                                                                                                                                                                                                                                                                                                                      .so man1/tip.1c
.\" @(#)cu.1c 1.5 89/03/26 SMI; 
 cxref.1       date.1v       dbx.1 te      	dbxtool.1 v       dc.1 ol.      dd.1 c.1      	default.1 l.       delta.1       $ defaults_from_input.1    <     defaults_merge.1    \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 $       defaultsedit.1       deroff.1 1       des.1 .1      df.1 es.      diff.1 1      diff3.1v 1 .       diffmk.1    ./share/man/man1/cut.1                                                                                 755       0      12         6323  4424740642   7570                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cut.1 1.15 89/03/26 SMI; from S5R3
.TH CUT 1 "22 March 1989"
.SH NAME
cut \- remove selected fields from each line of a file
.SH SYNOPSIS
.B cut 
.BI \-c \|list 
[
.I filename
\&.\|.\|.
]
.LP
.B cut 
.BI \-f \|list 
[
.BI \-d c
] 
[
.B \-s
] 
[
.I filename
\&.\|.\|.
]
.SH AVAILABILITY
.LP
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  cut  ""  "\fLcut\fP \(em remove columns from file"
.IX  files  "cut command"  files  "\fLcut\fP \(em remove columns from"
.IX  columns  "remove from file"
.IX  remove  "columns from file"
.IX  delete  "columns from file"
.LP
Use
.B cut
to cut out columns from a table or 
fields from each line of a file; in data base parlance, it implements
the projection of a relation.
The fields as specified by
.I list
can be of fixed length,
(such as on a punched card),
or of variable length between lines.  They can
be marked with a field delimiter character, such as
.SM TAB
(as specified with the
.B \-d
option).
.B cut
can be used as a filter;
if no files are given, the standard input is used.
In addition,
a file name of
.RB ` \- '
explicitly refers to the standard input.
.SH OPTIONS
.TP 
.BI \-c \|list
By character position.
.I list
is a comma-separated list of integer field numbers (in increasing order),
with an optional
.RB ` \- '
to indicate ranges:
.RS
.TP
.PD 0
.B 1,4,7 
characters 1, 4 and 7
.TP
.BR 1\-3,8 
characters 1 through 3, and 8
.TP
.B \-5,10
characters (1) through 5, and 10
.TP
.B 3\-
characters 3 through (last)
.PD
.RE
.TP
.BI \-f \|list
By field position.
Instead of character positions,
.I list 
specifies fields that are separated a delimiter (normally a
.SM TAB\s0):
.RS
.TP
.B 1,4,7 
fields 1, 4 and 7
.RE
.IP
Lines with no field delimiters are normally passed through intact (to
allow for subheadings).
.TP
.BI \-d c
Set the field delimiter to
.IR c  .
The default is a
.SM TAB\s0.
Characters with special meaning to the shell such as a
.SM TAB
or
.SM SPACE
characters,
must be quoted.
.TP
.B \-s
Suppress lines with no delimiter characters.
.SH EXAMPLES
.TP 12
.B " cut \-d: \-f1,5 /etc/passwd"
Mapping of user
.SM ID\s0s
to names.
.TP
\fBname=\*`who am i | cut \-f1 \-d" "\*`\fP
Set 
.B name
to the current login name.
.SH SEE ALSO
.BR grep (1V),
.BR paste (1)
.SH DIAGNOSTICS
.PD 0
.TP 12
.B "\s-1ERROR\s0:  line too long"
A line can have no more than 1023 characters or fields.
.TP
.B "\s-1ERROR\s0:  bad list for c\|/\|f option"
Missing 
.B \-c
or 
.B \-f
option or incorrectly specified
.IR list .
No error occurs if a line has fewer fields than the
.I list
calls for.
.TP
.B "\s-1ERROR\s0:  no fields"
The
.I list
is empty.
.TP
.B "\s-1ERROR\s0:  no delimiter"
Missing
.I char
on
.B \-d
option.
.TP
.B "\s-1ERROR\s0:  cannot handle multiple adjacent backspaces"
Adjacent backspaces cannot be processed correctly.
.br
.ne 3
.TP
.BI "\s-1WARNING\s0:  cannot open <" filename ">: <" reason >
Either
.I filename
cannot be read or does not exist.
If multiple filenames are present, processing continues.
.TP
.BI "\s-1WARNING\s0:  I/O error reading <" filename ">: <" reason >
An I/O error occurred when reading
.IR filename .
If multiple filenames are present, processing continues.
     man.1  l  4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 4  h    mkdir.1   x    mkstr.1       more.1        mt.1 1 t      mv.1 ore      neqn.1 1      newgrp.1        nice.1 1      nl.1 1 1      nm.1 ice       ./share/man/man1/cxref.1                                                                               755       0      12         4733  4424740642  10107                                                                                                                                                                                                                                                                                                                                                                      .\"	@(#)cxref.1 1.12 89/03/26 SMI; from S5R2 6.2 9/2/83
.TH CXREF 1 "7 February 1988"
.SH NAME
cxref \- generate a C program cross-reference
.SH SYNOPSIS
.B cxref
[
.B \-c
]
[
.B \-w
[
.I num
] ]
[
.B \-o
.I filename
]
[
.B \-t
]
.I filenames
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "cxref command"  ""  "\fLcxref\fP \(em cross reference C program"
.IX  "cross reference C program"  ""  "cross reference C program \(em \fLcxref\fP"
.IX  "programming languages"  cxref  ""  "\fLcxref\fP \(em cross reference C program"
.IX  "C programming language"  cxref  ""  "\fLcxref\fP \(em cross reference C program"
.IX  languages  cxref  ""  "\fLcxref\fP \(em cross reference C program"
.LP
.B cxref
analyzes a collection of C files
and attempts to build a cross-reference table.
.B cxref
utilizes a special option of
.BR cpp (1)
to include
.BR #define 'd
information in its symbol table.
It produces a listing on standard output
of all symbols (auto, static,
and global) in each file separately, or with the
.B \-c
option, in combination.
Each symbol 
contains an asterisk
.B (\(**)
before the declaring reference.
.SH SYSTEM V DESCRIPTION
The System V version of
.BR cxref ,
run as
.BR /usr/5bin/cxref ,
makes the 
.B C 
preprocessor search for include files in
.B /usr/5include
before searching for them in
.BR /usr/include .
.SH OPTIONS
In addition to the
.BR \-D ,
.B \-I
and
.B \-U
options (which are identical to their interpretation by
.BR cc (1V)),
the following options are interpreted by
.BR cxref :
.TP  "\w'-w [ num ]\ \ \ \ \ \ 'u"
.B \-c
Print a combined cross-reference of all input files.
.TP
\fB\-w\fR[\fI num \fR]
Width option which formats output no wider than
.I num
(decimal) columns.
This option will default to 80 if
.I num
is not specified or is less than 51.
.TP
.BI \-o " filename"
Direct output to named
.IR file .
.TP
.B \-s
Operate silently; does not print input file names.
.TP
.BR \-t
Format listing for 80-column width.
.SH FILES
.TP
.B /usr/tmp/xr*
temporary files
.SH SEE ALSO
.BR cc (1V),
.BR cpp (1)
.SH DIAGNOSTICS
Error messages are unusually cryptic, but usually mean
that you cannot compile these files, anyway.
.SH BUGS
.B cxref
considers a formal argument in a
.BR #define
macro definition to be a declaration of that symbol. For example,
a program that
.BR #include s
.BR ctype.\|h ,
will contain many declarations of the variable
.BR c .
m.1   
    ld.1 1   
    ./share/man/man1/date.1v                                                                               755       0      12         7436  4424740642  10106                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)date.1v 1.13 89/03/26 SMI;
.TH DATE 1V "22 March 1989"
.SH NAME
date \- display or set the date
.SH SYNOPSIS
.B date
[ 
.B \-u
]
[ 
.B \-a
[
.B \-
]
.IB sss . \|fff
]
[
.I yy\|mm\|dd\|hh\|mm
[
.BI . \|ss
] ]
[
.BI + format
]
.SH SYSTEM V SYNOPSIS
.B date
[ 
.B \-u
]
[
.B \-a
[
.B \-
]
.IB sss .fff
]
[
.I mm\|dd\|hh\|mm
[
.I yy
] ]
[
.BI + format
]
.SH DESCRIPTION
.IX "System V commands" "\fLdate\fR"
.IX "date command"  ""  "\fLdate\fP \(em date and time"
.IX display  date
.IX display  "date and time"
.IX display  "time and date"
.IX time  "display date and"
.LP
If no argument is given, or if the argument begins with 
.BR + ,
.B date
displays the current date and time.
Otherwise, the current date is set.
Only the super-user may
.B set
the date.
.LP
.I yy
is the last two digits of the year; the first
.I mm
is the month number;
.I dd
is the day number in the month;
.I hh
is the hour number (24 hour system);
the second
.I mm
is the minute number;
.BI . ss
(optional) specifies seconds.
The year, month and day may be omitted; the
current values are supplied as defaults.
.LP
If the argument begins with
.BR + ,
the output of
.B date
is under the control of the user.
The format for the output is similar to that of
the first argument to
.BR printf (3S).
All output fields are of fixed size (zero padded
if necessary).
Each field descriptor is preceded by
.B %
and will be replaced in the output by
its corresponding value.
A single
.B %
is encoded by
.BR %% .
All other
characters are copied to the output without change.
The string is always terminated with a new-line character.
.LP
Field Descriptors:
.RS
.PD 0
.TP 5
.B  n
insert a new-line character
.TP 5
.B  t
insert a tab character
.TP 5
.B  m
month of year \- 01 to 12
.TP 5
.B  d
day of month \- 01 to 31
.TP 5
.B  y
last 2 digits of year \- 00 to 99
.TP 5
.B D
date as mm/dd/yy
.TP 5
.B  H
hour \- 00 to 23
.TP 5
.B  M
minute \- 00 to 59
.TP 5
.B  S
second \- 00 to 59
.TP 5
.B T
time as \s-1HH:MM:SS\s+1
.TP 5
.B  j
day of year \- 001 to 366
.TP 5
.B  w
day of week \- Sunday = 0
.TP 5
.B  a
abbreviated weekday \- Sun to Sat
.TP 5
.B  h
abbreviated month \- Jan to Dec
.TP 5
.B  r
time in
.SM AM/PM 
notation
.PD
.RE
.LP
.SH SYSTEM V SYNOPSIS
When setting the date, the first
.I mm
is the month number;
.I dd
is the day number in the month;
.I hh
is the hour number (24 hour system);
the second
.I mm
is the minute number;
.I yy
is the last 2 digits of the year number and is optional.
The current year is the default if no year is mentioned.
.SH OPTIONS
.nr xx (\w'\fB\-a\fR [\fB\-\fR]\fIsss\fB.\fIfff\fR'u+4n/1n
.IP \fB\-u\fP \n(xx
Display the date in \s-1GMT\s0 (universal time).
The system operates in
.SM GMT;
.B date
normally takes care of the
conversion to and from local standard and daylight time. 
.B \-u
may also be used to set
.SM GMT
time.
.IP "\fB\-a\fR [\fB\-\fR]\fIsss\fB.\fI\|fff\fR"
Using the
.BR adjtime (2)
system call, tell the system to slowly adjust the time by
.IB sss . \|f\|f\|f
seconds
.RI ( \|f\|f\|f
represents fractions of a second).
This adjustment can be positive or
negative.  The system's clock will be sped
up or slowed down until it has
drifted by the number of seconds specified.
.SH EXAMPLES
.RS
.B date\| 10080045
.RE
.LP
Would set the date to Oct 8, 12:45 \s-1AM\s+1.
.LP
.ne 8
If the year were 1986, and the date were so set,
.RS
.B date\| \(fm+\s-1DATE\s0: %m/%d/%y%n\s-1TIME\s0: %H:%M:%S\(fm
.RE
.LP
would generate as output:
.LP
.RS
.B DATE: 08/01/86
.br
.B TIME: 14:45:05
.RE
.SH FILES
.TP 20
.B /var/adm/wtmp
to record time-setting
.TP
.B /usr/share/lib/zoneinfo
timezone definitions
.SH SEE ALSO
.BR adjtime (2),
.BR printf (3S),
.BR utmp (5)
.SH DIAGNOSTICS
.TP
.B "date: Failed to set date: Not owner"
If you try to change the date but are not the super-user.
.TP
.B "date: bad format character"
If the field descriptor is not recognizable.
d-setkeys.1 -  D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /  t  0  
old-ttytool.1 0    1  old-uncompact.1     2  old-vc.1      3  on.1c     4  onintr.1      5  organizer.1     6./share/man/man1/dbx.1                                                                                 755       0      12        57350  4424740642   7600                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dbx.1 1.48 89/03/26 SMI; from UCB 4.2 BSD
.TH DBX 1 "22 March 1989"
.SH NAME
dbx \- source-level debugger
.SH SYNOPSIS
.B dbx
.\"[
.\".B \-b
.\"]
.\"[
.\".B \-d
.\"]
.\"[
.\".B \-D
.\"]
.\"[
.\".B \-e
.\"]
[
.BI \-f " fcount"
]
[
.B \-i
]
[
.BI \-I \|dir
]
[
.B \-k
]
[
.B \-kbd
]
.\"[
.\".B \-l
.\"]
.if n .ti +0.5i
[
.BI \-P " fd"
]
[
.B \-r
]
[
.BI \-s " startup"
]
[
.BI \-sr " tstartup"
]
.ti +.5i
[
.I objfile
[
.I corefile
|
.I process-id
] ]
.SH AVAILABILITY
This command is available with the
.I Debugging
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  dbx  ""  "\fLdbx\fP \(em source debugger"
.IX  "debug tools"  "dbx command"  ""  "\fLdbx\fP \(em source debugger"
.IX  "programming tools" "dbx debugger" "" "\fLdbx\fP \(em source debugger"
.LP
.B dbx
is a utility for source-level debugging and execution of
programs written in C, or other supported languages such as
Pascal and
.SM FORTRAN
77.
.B dbx
accepts the same commands as
.BR dbxtool (1),
but uses a standard terminal (tty) interface.
.LP
.I objfile
is an object file, produced by
.BR cc (1V)
or another compiler, with the
.B \-g
option to include a symbol
table.  This symbol table contains the names of all the source files
used to create it, and these files are available for perusal while
using the debugger.
.LP
If no
.I objfile
is specified, you can use
.BR dbx 's
.B debug
command to specify the program to debug.
.LP
If there is a file named
.B core
in the current directory, or a
.I corefile
argument is specified, you can use
.BR dbx
to examine the state of the program when the core file was produced.
.LP
.B dbx
commands in the file
.B .\|dbxinit
are executed immediately after the symbol table is read, if that
file exists in the current directory, or in the user's home
directory if
.B .\|dbxinit
doesn't exist in the current directory.
.SH OPTIONS
.\".TP
.\".B \-b
.\"Trace breakpoints.  Produce debugging output whenever
.\"the state of a breakpoint changes.
.\".TP
.\".B \-d
.\"Produce debugging information.
.\".TP
.\".B \-D
.\"Allow
.\".B dbx
.\"itself to dump core in the event of a serious error.  If used, this
.\"option must be the very first argument.
.\".TP
.\".B \-e
.\"Trace execution. Produce debugging output whenver the state of
.\"a breakpoint changes.
.TP 12
.BI \-f " fcount"
Alter the initial estimate of the number functions in the
program being debugged.  The initial setting is 500.
.TP
.B \-i
Force
.B dbx
to act as though the standard input were a terminal
or terminal emulator.
.TP
.BI \-I " dir"
Add
.I dir
to the list of directories in which to search
for a source file.
.B dbx
normally searches the current directory, and the directory where
.I objfile
is located.  The directory search path can be reset with the
.B use
command.
.TP
.B \-k
Kernel debugging.
.TP
.B \-kbd
Debug a program that sets the keyboard into up-down translation
mode.  This flag is necessary if a program uses up-down decoding.
.\".TP
.\".B \-l
.\"When the 
.\".B dbx
.\"program is compiled with the
.\".SB LEXDEBUG
.\"symbol, this option produces debuggin output for each token in the
.\"command input.
.TP
.BI \-P " fd"
Create a pipeline to a
.BR dbxtool (1)
process.
.I fd
is the file descriptor through which to pipe output to the
front-end process.  This option is passed automatically to
.B dbx
by
.BR dbxtool .
.TP
.B \-r
Execute
.I objfile
immediately.  Parameters follow the object file name
(redirection is handled properly).  If the program terminates
successfully,
.B dbx
exits.  Otherwise,
.B dbx
reports the reason for termination
and waits for a response.
.B dbx
reads from the terminal
.RB ( /dev/tty )
when
.B \-r
is specified and standard input is a file or pipe.
.TP
.BI \-s " startup"
Read initialization commands from the file named
.IR startup .
.TP
.BI \-sr " tstartup"
Read initialization commands from the temporary file named
.IR startup ,
and then remove that file.
.br
.ne 4
.SH USAGE
.LP
Refer to
.B dbx
in
.TX DEBUG
.LP
The most useful basic commands to know about are
.BR run ,
to run the program being debugged,
.BR where ,
to obtain a stack trace with line numbers,
.BR print ,
to display variables, and
.BR stop ,
to
set breakpoints.
.SS Filenames
Filenames in
.B dbx
may include shell metacharacters.  The shell used
for pattern matching is determined by the
.SM SHELL
environment variable.
.SS Expressions
.B dbx expressions
are combinations of variables, constants,
procedure calls, and operators.  Variables are either variables in the program
being debugged or special
.B dbx
variables whose names begin with
.BR $ .
Hexadecimal constants must be preceded by a
`0x' and octal constants by a `0'.  Character constants must be enclosed in
single quotes.  Expressions cannot involve strings, structures, or
arrays, although elements of structures or arrays may be used.
.SS Operators
.LP
.TP 25n
.B "+\ \ \ \-\ \ \ *\ \ \ /\ \ \ div\ \ \ %"
Add, subtract, multiply, divide, integer division, and remainder,
respectively.
.TP
.B  "<\^<\ \ \ >\^>\ \ \  &\ \ \ |\ \ \ ~"
Left-shift, right-shift, bitwise
.SM AND,
bitwise
.SM OR,
and bitwise complement.
.TP
.B &\ \ \ *
Address of operator, and contents of operator.
.br
.ne 5
.TP
.B <\ \ \ >\ \ \ <\^=\ \ \ >\^=\ \ \ =\^=\ \ \ !\^=\ \ \ !
Less than, greater than, less than or equal to, greater than or equal
to, equal, not equal, and negation.
.TP
.B &\^&\ \ \ |\||
Logical
.SM AND,
and logical
.SM OR
.TP
.BI "sizeof (" cast )
Size of variable or type and type cast.
.TP
.B \s+2.\s0\ \ \ \->
Field reference, and pointed-to-field reference (however, dot works for
both in
.BR dbx ).
.LP
Precedence and associativity of operators are the same as for
.BR C ;
parentheses can be used for grouping.
.LP
If there is no
.IR corefile ,
only expressions containing constants
are available.  Procedure calls require an active child process.
.SS "Scope Rules"
.LP
.B dbx
uses the current file and function to resolve scope conflicts.
Their values are updated as files and functions are entered and exited
during execution.  You can also change them explicitly by using the
.B file
and
.B func
commands.  When the current function is changed, the current file
is updated along with it, but not vice versa.
.SS "Execution and Tracing Commands"
.TP
.B \s+2^\s0C
Interrupt.  Stop the program being debugged and enter
.BR dbx .
.HP
.B run
.RI [ " args " ]
.RB [ " < "
.IR infile " ]"
.RB [ " >" \||\| " >> "
.IR outfile " ]"
.br
Start executing
.IR objfile ,
reading in any new information from it.
With no
.IR args ,
use the argument list from the previous
.B run
command.
.RS
.RS
.TP 12
.I args
.PD 0
Pass
.I args
as command-line arguments to the program.
.TP
.BR < \||\| > \||\| ">>"
Redirect input or output, or append output to a file.
.PD
.RE
.RE
.HP
.B rerun
.RI [ " args " ]
.RB [ " < "
.IR infile " ]"
.RB [ " >" \||\| " >> "
.IR outfile " ]"
.br
Like the
.B run
command, except that when
.I args
are omitted, none are passed to the program.
.HP
.B cont
.RB [ " at "
.IR sourceline " ]"
.RB [ " sig "
.IR signal " ]"
.br
Continue execution from where it stopped.
.RS
.RS
.TP 12
.BI at " sourceline"
.PD 0
Start from
.I sourceline
.TP
.BI sig " signal"
Continue as if
.I signal
had occurred.
.I signal
may be a number or a name as with
.BR catch .
.PD
.RE
.RE
.br
.ne 5
.HP
.B trace
.RB [ " in "
.IR function " ]"
.RB [ " if "
.IR condition " ]"
.br
.PD 0
.HP
.B trace
.I sourceline
.RB [ " if "
.IR condition " ]"
.br
.HP
.B trace
.I function
.RB [ " if "
.IR condition " ]"
.br
.HP
.B trace
.I expression
.BI at " sourceline"
.RB [ " if "
.IR condition " ]"
.br
.HP
.B trace
.I variable
.RB [ " in
.IR function " ]"
.RB [ " if "
.IR condition " ]"
.br
Display tracing information.
If no argument is specified, each source line is displayed before
execution.  Tracing is turned off when the function or procedure
is exited.
.PD
.RS
.RS
.TP 12
.BI in " function"
.PD 0
Display tracing information only while executing the function or
procedure
.IR function .
.TP
.BI if " condition"
Display tracing information only if
.I condition
is true.
.TP
.I sourceline
Display the line immediately prior to executing it.
Source line-numbers from another file are written
as
.BI "\fIfilename\fB": n.
.TP
.I function
Display the routine and source line called from,
parameters passed in, and return value.
.TP
.IB expression " at " sourceline
Display the value of
.I expression
whenever
.I sourceline
is reached.
.TP
.I variable
Display the name and value whenever
.I variable
changes.
.PD
.RE
.RE
.br
.ne 10
.HP
.B stop
.BI at " sourceline"
.RB [ " if "
.IR condition " ]"
.br
.PD 0
.HP
.B stop
.BI in " function"
.RB [ " if "
.IR condition " ]"
.br
.HP
.B stop
.I variable
.RB [ " if "
.IR condition " ]"
.br
.HP
.B stop
.BI if " condition"
.br
.PD
Stop execution when the
.I sourceline
is reached,
.I function
is called,
.I variable
is changed, or
.I condition
becomes true.
.HP
.B when
.BI in " function "
.BI { " command " ;
.RI [ " command "
.BR ; " ] .\|.\|. " }
.br
.PD 0
.HP
.B when
.BI at " sourceline"
.BI { " command " ;
.RI [ " command "
.BR ; " ] .\|.\|. " }
.br
.HP
.B when
.I condition
.BI { " command " ;
.RI [ " command "
.BR ; " ] .\|.\|. " }
.br
Execute the
.B dbx
.IR command (s)
when
.I function
is called,
.I sourceline
is reached, or
.I condition
is true.
.PD
.HP
.B status
.RB [ " > "
.IR filename " ]"
.br
Display active
.BR trace ,
.B stop
and
.B when
commands, and associated command numbers.
.TP
.B delete all
.PD 0
.HP
.BI delete " cmd-no"
.RB  [ " , "
.IR  cmd-no " ] .\|.\|.
.br
.PD
Remove all
\fBtrace\fPs,
.BR stop s
and
\fBwhen\fPs,
or those corresponding to each
.B dbx
.I cmd-no
(as displayed by
.BR status ).
.HP
.BI clear
.RI [ " sourceline" ]
.br
Clear all breakpoints at the current stopping point, or at
.IR sourceline .
.HP
.B catch
.RI [ " signal "
.RB [ " , "
.IR signal " ] .\|.\|. ]"
.br
Display all signals currently being caught, or
catch
.I signal
before it is sent to the program being debugged.
A signal can be specified either by name (with the
.SM SIG
prefix omitted, as with
.BR kill (1))
or number.  Initially all signals are caught except
.SM SIGHUP,
.SM SIGEMT,
.SM SIGFPE,
.SM SIGKILL,
.SM SIGALRM,
.SM SIGTSTP,
.SM SIGCONT,
.SM SIGCHLD,
and
.SM SIGWINCH\s0.
.HP
.B ignore
.RI [ " signal "
.RB [ " , "
.IR signal " ]  .\|.\|. ]"
.br
Display all signals currently being ignored, or
stop catching
.IR signal ,
which may be specified by name or number as with
.BR catch .
.TP
\fBstep \fR[\fIn\|\fR]
Execute the next
.I n
source lines.
If omitted,
.I n
is taken to be 1.
Steps into functions.
.TP
\fBnext \fR[\fIn\|\fR]
Execute the next
.I n
source lines.
If omitted,
.I n
is taken to be 1.
.B next
steps past functions.
.br
.ne 10
.SS "Naming, Printing and Displaying Data"
.LP
Variables from another function or procedure  with the same name as
one in the current block must be qualified as follows:
.IP
.RB [ \|\`\c
.I sourcefile\c
.BR \` ]\c
.IB function \`\c
.I variable
.LP
For Pascal variables there may be more than one
.I function
or procedure name, each separated by a backquote.
.HP
.B print
.I expression
.RB [ " , "
.IR expression " ] .\|.\|."
.br
Print the value of each
.IR expression ,
which may involve function calls.
Program execution halts when a breakpoint is reached, and
.B dbx
resumes.
.HP
.B display
.RI [ " expression "
.RB [ " , "
.IR expression " ] .\|.\|. ]"
.br
Print a list of the expressions currently being displayed, or
display the value of each
.I expression
whenever execution stops.
.HP
.B undisplay
.RI [ " expression "
.RB [ " , "
.IR expression " ] .\|.\|. ]"
.br
Stop displaying the value of each
.I expression
whenever execution stops.  If
.I expression
is a constant, it refers to a display-number as shown by the
.B display
command with no arguments.
.TP
.BI whatis " identifier"
.PD 0
.TP
.BI whatis " type"
.PD
Print the declaration of the given identifier or type.
.IR type s
are useful to print all the members of a structure, union,
or enumerated type.
.TP
.BI which " identifier"
Print the fully-qualified name of the given identifier.
.TP
.BI whereis " identifier"
Print the fully qualified name of all symbols matching
.IR identifier .
.HP
.BI assign " variable"
.BI = " expression\fP"
.br
.PD 0
.HP
.BI set " variable"
.BI = " expression\fP"
.br
.PD
Assign the value of
.I expression
to
.I variable.
There is no type conversion for operands of differing type.
.TP
.BI set81 " fpreg" = "word1 word2 word3"
Treat the concatenation of
.I word1 word2 word3
as a 96-bit,
.SM IEEE
floating-point value and assign it to the
.SM MC68881
floating-point register
.IR fpreg .
(Supported only on Sun-3).
.TP
.BI call " function" ( \|parameters )
Execute the named function.  Arguments are passed according to
the rules for the source-language of
.I function.
.TP
\fBwhere\fR[\fI n\fR]
List all, or the top
.IR n ,
active functions on the stack.
.HP
.B dump
.RI [ " function " ]
.br
Display the names and values of local variables and parameters
in the current or specified
.IR function .
.HP
.B up
.RI [ n ]
.br
.PD 0
.HP
.B down
.RI [ n ]
.br
.PD
Move up (towards ``main'') or down the call stack, one or
.I n
levels.
.SS "File Access Commands"
.HP
.B edit
.RI [ " filename " | " function " ]
.br
Edit the current source file, or the given
.I filename
or the file that contains
.IR function .
.HP
.B file
.RI [ " filename " ]
.br
Print the name of the current source file, or
change the current source file to
.IR filename .
.br
.ne 10
.HP
.B func
.RI [ " function" | " program "
.RI | " objfile " ]
.br
Print the name of the current function, or
change to the given
.IR function ,
.IR program ,
or
.IR objfile .
Also changes the current scope.
.HP
.B list
.RI [ " startline "
.RB [ " , "
.IR endline " ] ]"
.br
.PD 0
.HP
.BI list " function"
.br
.PD
List the next ten lines from current source file, list from
.I startline
through
.IR endline ,
or
and list from five lines above, to five lines below
the first line of
.IR function .
.HP
.B use
.RI [ " directory-list " ]
.br
Print or set the list of directories in which to search for source files.
.HP
.B cd
.RI [ " directory " ]
.br
Change the current working directory for
.B dbx
to
.I directory
(or to the value of the
.SM HOME
environment variable).
.TP
.B pwd
Print the current working directory for
.BR dbx .
.HP
\fB/\fIreg-exp\fR[\fB\|/\|\fR]
.br
.PD 0
.HP
.BI ? reg-exp
.RB [ \|?\| ]
.br
.PD
Search the current file for the
regular expression
.IR reg-exp ,
from the next (previous) line to the
end (top).  The matching line becomes the new current line.
.SS "Miscellaneous Commands"
.TP
.BI sh  " command-line"
Pass the command line to the shell for execution.  The
.SM SHELL
environment variable determines which shell is used.
.HP
.B alias
.I new-command-name character-sequence
.br
Respond to
.I new-command-name
as though it were
.I character-sequence.
Special characters occurring in
.I character-sequence
must be enclosed in quotation marks.
Alias substitution as with the C shell
.RB ( csh (1))
also
occurs.
.HP
.B help
.RI [ " command " ]
.br
Display a synopsis of
.B dbx
commands, or print a
short message explaining
\fIcommand\fP.
.TP
.B make
Invoke
.BR make (1)
with the name of the program as its argument.  Any arguments
set using
.B dbxenv makeargs
are also passed as arguments.
.HP
.BI source " filename"
.br
Read and execute
.B dbx
commands from
\fIfilename\fP.
Useful when the
.I filename
has been created by redirecting an
earlier
.B status
command.
.TP
.B quit
Exit
.BR dbx .
.HP
.B dbxenv
.PD 0
.br
.HP
.B dbxenv case \0\0sensitive
.RB | " insensitive"
.br
.HP
.B dbxenv fpaasm \0\0on
.RB | " off"
.br
.HP
.B dbxenv fpabase
.BR \0\0a [ 0 - 7 ]
.RB | " off"
.HP
.B dbxenv makeargs
.I string
.br
.HP
.BI "dbxenv  stringlen" " num "
.HP
.BI "dbxenv  speed" " seconds "
.br
.PD
Display
.B dbx
attributes or set the named attribute:
.RS
.RS
.TP 10
.B case
.PD 0
Controls whether upper- and lower-case characters are treated as different
values.  The default is
.BR sensitive .
.TP
.B fpaasm
Controls
.SM FPA
instruction disassembly.  The default is
.BR on .
(Supported only on Sun-3).
.TP
.B fpabase
Sets the base register for
.SM FPA
instruction disassembly.  The default is
.BR off .
(Supported only on Sun-3 systems).
.TP
.B makeargs
Sets arguments to pass to
.BR make .
The default is
.BR "CC=cc \-g" .
.TP
.B speed
Set the interval between execution during tracing.  The default is
0.5 seconds.
.TP
.B stringlen
Controls the maximum number of characters printed for a ``char *''
variable in a C program.  The default is 512.
.PD
.RE
.RE
.br
.ne 15
.HP
.B debug
.RB [ " \-k " ]
.RI [ " objfile "
.RI [ " corefile "
.RI | " pid " "] ]"
.br
With no arguments, print the name of the current program.
With arguments, stop debugging the current program and begin debugging
.I objfile
having either
.I corefile
or the current process
.SM ID
.IR pid .
The
.B \-k
option indicates kernel debugging.
.TP
.B kill
Stop debugging of the current program, but be ready to debug another.
.TP
.B detach
Detach the current program (process) from
.BR dbx .
.B dbx
will be unable to access or modify its state.
.HP
.B proc
[
.I pid
]
.br
For kernel debugging.  Display which process is mapped into
the user area, or map
.I pid
to the user area.
.br
.ne 5
.SS "Machine-Level Commands"
.HP
.B tracei
.RI [ " address " ]
.RB [ " if
.IR condition " ]"
.br
.PD 0
.HP
.B tracei
.RI [ " variable " ]
.RB [ "at
.IR address " ]"
.RB [ " if
.IR condition " ]"
.br
.PD
Trace execution of a specific machine-instruction address.
.HP
.B stopi
.RI [ " variable " ]
.RB [ " if
.IR condition " ]"
.br
.PD 0
.HP
.B stopi
.RB [ "at
.IR address " ]"
.RB [ " if
.IR condition " ]"
.br
.PD
Set a breakpoint at a machine instruction address.
.TP
.B stepi
.PD 0
.TP
.B nexti
.PD
Single step as in
.B step
or
.BR next ,
but do a single
machine instruction rather than a source line.
.HP
.IB address , \|address
.B /
.RI [ " mode " ]
.br
.PD 0
.HP
.I address
.B /
.RI [ "count " ]
.RI [ " mode " ]
.br
.PD
Display the contents of memory starting at the first (or
current)
.I address
up to the second
.IR address ,
or
until
.I count
items have been displayed.
The initial display
.I mode
is
.BR X .
The following modes are supported:
.RS
.RS
.TP 12
.B i
.PD 0
the machine instruction
.TP
.B d
word in decimal
.TP
.B D
longword in decimal
.TP
.B o
word in octal
.TP
.B O
longword in octal
.TP
.B x
word in hexadecimal
.TP
.B X
longword in hexadecimal
.TP
.B b
byte in octal
.TP
.B c
byte as a character
.TP
.B s
strings as characters terminated by a null
.TP
.B f
single precision real number
.TP
.B F
double-precision real number
.TP
.B E
extended-precision real number
(not supported on Sun-4)
.PD
.RE
.RE
.IP
An
.I address
can be specified as an item from the following list, as
an expression made up of other addresses and the
operators
.RB ` + ',
.RB ` \- ',
.RB ` * ',
and indirection (unary
.RB ` * '),
or as an arbitrary expression enclosed in parentheses.
.RS
.RS
.TP 12
.BI & name
symbolic address
.PD 0
.TP
.I integer
numeric address
.PD
.RE
.RE
.HP
.I address
.B =
.RI [ " mode " ]
.br
Display the value of the
.IR address .
.br
.ne 10
.SS "Machine Registers"
The machine registers for the current machine type are represented as special
.B dbx
variables.  They can be used in expressions as any other
.B dbx
variable can.  The registers and their variable names are:
.SS "\fISun-2 and Sun-3 Registers\fP"
.RS
.TP 12
.BR $d [ 0 - 7 ]
data registers
.PD 0
.TP
.BR $a [ 0 - 7 ]
address registers
.TP
.B $fp
frame pointer, equivalent to register a6
.TP
.B $sp
stack pointer, equivalent to register a7
.TP
.B $pc
program counter
.TP
.B $ps
program status
.PD
.RE
.SS "\fISun-3-Only Registers\fP"
.RS
.TP 12
.BR $fp [ 0 - 7 ]
.SM MC68881
data registers
.PD 0
.TP
.B $fpc
.SM MC68881
control register
.TP
.B $fps
.SM MC68881
status register
.TP
.B $fpi
.SM MC68881
instruction address register
.TP
.B $fpf
.SM MC68881
flags register (unused, idle, busy)
.TP
.BR $fpa [ 0 - 31 ]
double-precision interpretation of
.SM FPA
registers.
.TP
.BR $sfpa [ 0 - 31 ]
single-precision interpretation of
.SM FPA
registers.
.PD
.RE
.SS "\fISun-4 Registers\fP
.RS
.TP 12
.BR $g [ 0 - 7 ]
global registers
.PD 0
.TP
.BR $o [ 0 - 7 ]
``out'' registers
.TP
.BR $i [ 0 - 7 ]
``in'' registers
.TP
.BR $l [ 0 - 7 ]
``local'' registers
.TP
.B $fp
frame pointer, equivalent to register i6
.TP
.B $sp
stack pointer, equivalent to register o6
.TP
.B $y
Y register
.TP
.B $psr
processor state register
.TP
.B $wim
window invalid mask register
.TP
.B $tbr
trap base register
.TP
.B $pc
program counter
.TP
.B $npc
next program counter
.TP
.BR $f [ 0 - 31 ]
.SM FPU
``f'' registers
.TP
.B $fsr
.SM FPU
status register
.TP
.B $fq
.SM FPU
queue
.PD
.RE
.SS "\fISun386i Registers\fP"
.RS
.TP 12
.B $ss
stack segment register
.PD 0
.TP
.B $eflags
flags
.TP
.B $cs
code segment register
.TP
.B $eip
instruction pointer
.TP
.B $eax
general register
.TP
.B $ecx
general register
.TP
.B $edx
general register
.TP
.B $ebx
general register
.TP
.B $esp
stack pointer
.TP
.B $ebp
frame pointer
.TP
.B $esi
source index register
.TP
.B $edi
destination index register
.TP
.B $ds
data segment register
.TP
.B $es
alternate data segment register
.TP
.B $fs
alternate data segment register
.TP
.B $gs
alternate data segment register
.PD
.RE
.br
.ne 10
.LP
Registers for the 80386 lower halves (16 bits) are:
.LP
.RS
.TP 12
.B $ax
general register
.PD 0
.TP
.B $cx
general register
.TP
.B $dx
general register
.TP
.B $bx
general register
.TP
.B $sp
stack pointer
.TP
.B $bp
frame pointer
.TP 
.B $si
source index register
.TP
.B $di
destination index register
.TP
.B $ip
instruction pointer, lower 16 bits
.TP
.B $flags
flags, lower 16 bits
.PD
.RE
.LP
The first four Sun386i 16-bit registers can be split into 8-bit
parts:
.RS
.TP
.B $al
lower (right) half of register
.B $ax
.PD 0
.TP
.B $ah
higher (left) half of register
.B $ax
.TP
.B $cl
lower (right) half of register
.B $cx
.TP 
.B $ch
higher (left) half of register
.B $cx
.TP
.B $dl
lower (right) half of register
.B $dx
.TP
.B $dh
higher (left) half of register
.B $dx
.TP
.B $bl
lower (right) half of register
.B $bx
.TP
.B $bh
higher (left) half of register
.B $bx
.PD 0
.RE
.LP
Registers for the 80387 are:
.RS
.TP
.B $fctrl
control register
.PD 0
.TP
.B $fstat
status register
.TP
.B $ftag
tag register
.TP
.B $fip
instruction pointer offset
.TP
.B $fcs
code segment selector
.TP
.B $fopoff
operand pointer offset
.TP
.B $fopsel
operand pointer selector
.TP
.B $st0 - $st7
data registers
.PD
.RE
.SH ENVIRONMENT
.B dbx
checks the environment variable
.SM EDITOR
for the name of the text editor to use with the
.B edit
command.
.SH FILES
.PD 0
.TP 20
.B core
default core file
.TP
.B .\|dbxinit
local
.B dbx
initialization file
.TP
.B ~/.\|dbxinit
user's
.B dbx
initialization file
.PD
.SH SEE ALSO
.BR cc (1V),
.BR csh (1),
.BR dbxtool (1),
.BR kill (1),
.BR lex (1),
.BR make (1),
.BR yacc (1)
.LP
.TX DEBUG
.SH BUGS
.LP
.B dbx
does not correctly handle
.B C
variables that are local to compound statements.
When printing these variables it often gives incorrect results.
.LP
.B dbx
does not handle
.SM FORTRAN
entry points well \(em it treats them as if they were independent
routines.
.LP
.B dbx
does not handle
.I assigning
to
.SM FORTRAN
complex types correctly (see the
.BR assign / set
command).
.br
.ne 10
.LP
Some operations behave differently in
.B dbx
than in
.BR C :
.RS
.IP \(bu 3
.B dbx
has two division operators \(em
.B /
always yields
a floating-point result and
.B div
always yields an integral
result.
.IP \(bu
An array or function name does not signify the address of the array
or function in
.BR dbx .
An array name signifies the entire array, and a function name
signifies a call to the function with no arguments.
The address of an array can be obtained by taking the address
of its first element, and the address of a function can
be obtained by taking the address of its name.
.RE
.LP
Casts do not work with
.SM FORTRAN
77 or Pascal.
.LP
Executable code incorporated into a source file using an
.B #include
preprocessor directive confuses
.BR dbx .
.LP
.B dbx
is confused by the output of program generators such as
.BR yacc (1)
and
.BR lex (1).
.LP
You cannot use
.B dbx
to debug a shared library directly.  You can, however, debug a
program that
.I uses
a shared library.
ich to search for source files.
.HP
.B cd
.RI [ " directory " ]
.br
Change the current working directory for
.B dbx
to
.I directory
(or to the value of the
.SM HOME
environment variable).
.TP
.B pwd
Print the current working directory for
.BR dbx .
.HP
\fB/\fIreg-exp\fR[\fB\|/\|\./share/man/man1/dbxtool.1                                                                             755       0      12         6722  4424740642  10453                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dbxtool.1 1.25 89/03/26 SMI;
.TH DBXTOOL 1 "11 January 1988"
.SH NAME
dbxtool \- SunView interface for the dbx source-level debugger
.SH SYNOPSIS
.B dbxtool
[
.B \-d
] [
.B \-i
] [
.B \-k
] [
.B \-kbd
] [
.B \-I
.I directory
] [
.I objectfile
[
.I corefile
] ]
.SH AVAILABILITY
.LP
This command is available with the
.I Debugging
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "dbxtool command"  ""  "\fLdbxtool\fP \(em debugger"
.IX "debug tools"  "dbxtool command"  ""  "\fLdbxtool\fP \(em debugger"
.IX "programming tools"  "dbxtool command"  ""  "\fLdbxtool\fP \(em debugger"
.LP
.BR dbxtool ,
a source-level debugger for C, Pascal and \s-1FORTRAN\s0 77
programs, is a standard tool that runs within the
.I SunView
environment.
It accepts the same commands as
.BR "dbx" ","
but provides a more convenient user interface.
.LP
You can use the mouse to set breakpoints, examine
the values of variables, control execution, peruse
source files, and so on.
.B dbxtool
has separate subwindows for viewing source code,
entering commands and other uses.
.LP
.I objectfile
is an object file produced by
.BR cc (1V),
any other Sun compiler, (or a combination of them) with the appropriate
flag
.RB ( \-g )
specified to produce symbol information in the object file.
.SB IMPORTANT:
every stage of the compilation process, including the linking phase, must
include the
.B \-g
option.
If no
.I objectfile
is specified, you can use the
.B debug
command to specify the program to be debugged.
The object file contains
a symbol table which includes the names of all the
source files translated by the compiler to create it.
These files are available for perusal while
using the debugger.
.LP
If a file named
.B core
exists in the current directory or a
.I corefile
is specified,
.B dbxtool
can be used to examine the
state of the program when it faulted.
.LP
Debugger commands in the file
.B .\|dbxinit
are executed
immediately after the symbolic information is read, if that
file exists in the current directory, or in the user's home
directory if
.B .\|dbxinit
does not exist in the current directory.
.SH OPTIONS
.TP
.B \-d
Produce debugging information for the pipeline from which it reads
.BR dbx (1)
output.
.TP
.B \-i
Force
.B dbxtool
to act as though standard input were a terminal.
.TP
.B \-k
Kernel debugging.
.TP
.B \-kbd
Debugs a program that sets the keyboard into up/down translation
mode.  This flag is necessary if you are debugging a program
that uses up/down encoding.
.TP
.BI \-I " directory"
Add
.I directory
to the list of directories that are searched when looking
for a source file.  Normally
.B dbxtool
looks for source files in the
current directory and then in the directory where
.I objectfile
is located.
The directory search path can also be set with the
.B use
command.
Multiple
.B \-I
options may be given.
.SH USAGE
.LP
Refer to
.BR dbx (1)
for a summary of
.B dbx
commands, or
.TX DEBUG
for more complete information on using
.BR dbxtool .
.SH FILES
.PD 0
.TP 20
.B core
default core file
.TP
.B .\|dbxinit
local
.B dbx
initialization file
.TP
.B ~/.\|dbxinit
user's
.B dbx
initialization file
.SH SEE ALSO
.BR cc (1V),
.BR dbx (1)
.LP
.TX DEBUG
.br
.TX SVPG
.br
.ne 6
.SH BUGS
.LP
The bugs for
.BR dbx (1)
apply to
.B dbxtool
as well.
.LP
The interaction between scrolling in the
.I source
subwindow and
.BR dbx 's
regular expression search commands is wrong.
Scrolling should affect where the next search begins,
but it does not.
$  4  "  nroff.1   H  #  	objdump.1 H./share/man/man1/dc.1                                                                                  755       0      12        10630  4424740643   7400                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dc.1 1.10 89/03/26 SMI; 
.TH DC 1  "23 September 1987"
.SH NAME
dc \- desk calculator
.SH SYNOPSIS
.B dc
.RI [ " filename " ]
.SH DESCRIPTION
.IX "dc command"  ""  "\fLdc\fP \(em desk calculator"
.IX "desk calculator"
.IX calculator
.B dc
is an arbitrary precision arithmetic package.
Ordinarily it operates on decimal integers,
but an input base, output base,
and a number of fractional digits to be maintained may
be specified. The overall structure of
.B dc
is a stacking (reverse Polish) calculator.
If an argument is given,
input is taken from that file until its end, and
then from the standard input.
.LP
Note:
.BR bc (1)
is a preprocessor for
.B dc
that provides infix (normal arithmetic) notation, a C-like syntax
for functions, and reasonable control structures for programs.
.LP
The following input constructs are recognized:
.LP
.SS Commands
.TP 10
.I number
Push a number onto the stack.
A number is an unbroken string of the digits 0-9.
It may be preceded by an underscore 
.RB ` _ '
to input a negative number, and may contain decimal points.
.HP 10
+  \- /  *  %  ^
.br
The
top two values on the stack are: added
.RB ( + ),
subtracted
.RB ( \- ),
multiplied
.RB ( * ),
divided
.RB ( / ),
remaindered
.RB ( % ),
or exponentiated
.RB ( ^ ).
The two entries are popped off the stack and
the result is pushed in their place.
Any fractional part of an exponent is ignored.
.TP 10
.BI s \|x
Pop the top of the stack and store into
a register named
.I x,
where
.I x
is any character.
.TP
.BI S \|x
Treat
.I x
as a stack and push the value onto it.
.TP
.BI l \|x
Push the value in register
.I x
onto the stack.
The register
.I x
is not altered.
All registers start with zero value.
.TP
.BI L x
Treat register
.I x
as a stack, and pop its top value onto the main stack.
.TP
.B  d
Duplicate the top value on the stack.
.TP
.B  p
Print the top value on the stack.
The top value remains unchanged.
With
.TP
.B P 
Interpret the top of the stack as an
.SM ASCII
string, remove and print it.
.TP
.B  f
Print all values on the stack and in registers.
.TP
.B  q
Exit the program.
If executing a string, pop the recursion level by two.
.TP
.B Q
Pop the top value on the stack, and pop the
string execution level by that value.
.TP
.B  x
Treat the top element of the stack as a character string
and execute it as a string of
.B dc
commands.
.TP
.B  X
Replace the number on the top of the stack with its scale factor.
.TP
.BR  [ \|.\|.\|. \|]
Put the bracketed 
.SM ASCII
string onto the top of the stack.
.TP 
.BI < x "  >" x "  =" \|x
Pop and compare top two elements of the stack.
Execute register
.I x
if they obey the stated relation.
.TP
.B  v
Replace the top element on the stack by its square root.
Any existing fractional part of the argument is taken
into account, but otherwise the scale factor is ignored.
.TP
.B  !
Interpret the rest of the line as a
command.
.TP
.B  c
Clear all values on the stack.
.TP
.B  i
Pop the top value on the stack and use that value as the
input radix.
.TP
.B I
Push the input base on the top of the stack.
.TP
.B  o
Pop the top value on the stack and use as the
output radix.
.TP
.B O
Push the output base on the top of the stack.
.TP
.B  k
The top of the stack is popped, and that value is used as
a non-negative scale factor:
the appropriate number of places
are printed on output,
and maintained during multiplication, division, and exponentiation.
The interaction of scale factor,
input base, and output base will be reasonable if all are changed
together.
.TP
.B  z
Push the stack level onto the stack.
.TP
.B  Z
Replace the number on the top of the stack with its length.
.TP
.B  ?
Take a line of input from the input source (usually the terminal)
and execute it.
.TP
.B "; :"
Used by 
.BR bc
for array operations.
.SH EXAMPLE
.LP
Print the first ten values of n!
.RS
.nf
.ft B
[\|la1\|+\|dsa\|*\|pla10\|>\|y\|]sy
.br
0sa1
.br
lyx
.fi
.ft B
.RE
.SH "SEE ALSO"
.BR bc (1)
.SH DIAGNOSTICS
.PD 0
.TP "\w'x is unimplemented +4n 'u"
.B x is unimplemented
Where x is an octal number.
.TP
.B stack empty
For not enough elements on the stack to do what was asked.
.TP
.B Out of space
When the free list is exhausted (too many digits).
.TP
.B Out of headers
For too many numbers being kept around.
.TP
.B Out of pushdown
For too many items on the stack.
.TP
.B Nesting Depth
For too many levels of nested execution.
.PD
.SH BUGS
.LP
Base conversions on fractions are truncated
to the number of fractional
digits of the input value.  The values are not rounded.
 an unbroken string of the digits 0-9.
It may be preceded by an underscore 
.RB ` _ '
to input a negativ./share/man/man1/dd.1                                                                                  755       0      12        11024  4424740643   7377                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dd.1 1.17 89/03/26 SMI;
.TH DD 1  "28 January 1988"
.SH NAME
dd \- convert and copy files with various data formats
.SH SYNOPSIS
.B dd
[
.IB option = value
] .\|.\|.
.SH DESCRIPTION
.IX "dd command"  ""  "\fLdd\fP \(em convert and copy"
.IX files  "convert and copy"
.IX "convert and copy files"
.B dd
copies a specified input file to a specified output with possible
conversions.  The standard input and output are used by default.  The
input and output block size may be specified to take advantage of raw
physical I/O.
.SH OPTIONS
.TP 15
.BI if= name
Input file is taken from
.IR name ;
standard input is default.
.TP 
.BI of= name
Output file is taken from
.IR name ;
standard output is default.  Note: 
.B dd
creates an explicit output file; therefore the
.B seek
option is usually useless with explicit
output except in special cases such as
using magnetic tape or raw disk files.
.TP 
.BI ibs= n
Input block size
.I n
bytes (default 512).
.TP 
.BI obs= n
Output block size
.I n
bytes (default 512).
.TP 
.BI bs= n
Set both input and output block size, superseding
.B ibs
and
.BR obs ;
also, if no conversion is specified,
it is particularly efficient since
no copy need be done
.TP 
.BI cbs= n
Conversion buffer size.
.TP 
.BI skip= n
Skip
.IR n ""
input records before starting copy
.TP
.BI files= n
Copy
.I n
input files before terminating (makes sense only
when input is a magtape or similar device).
.TP 
.BI seek= n
Seek
.I n
records from beginning of output file before copying.  This option
generally only works with magnetic tapes and raw disk files and is
otherwise usually useless if the explicit output file
was named with the
.B of
option.
.TP 
.BI count= n
Copy only
.IR n ""
input records.
.TP 
.PD 0
.B conv=ascii
.ds h \h'\w'\fBconv='u'
Convert
.SM EBCDIC
to
.SM ASCII\s0.
.TP
.B \*hebcdic
Convert
.SM ASCII
to
.SM EBCDIC\s0.
.TP
.B \*hibm
Slightly different map of
.SM ASCII
to
.SM EBCDIC\s0.
.TP
.B \*hblock
Convert variable length records to fixed length.
.TP
.B \*hunblock
Convert fixed length records to variable length.
.TP
.B \*hlcase
Map alphabetics to lower case.
.TP
.B \*hucase
Map alphabetics to upper case.
.TP
.B \*hswab
Swap every pair of bytes.
.TP
.B \*hnoerror
Do not stop processing on an error.
.TP
.B \*hsync
Pad every input record to
.BR  ibs .
.TP
.IB \*harg , " arg\|\fR[" ,\fR.\|.\|.]
Several comma-separated conversions, for a combination of
effects.  For instance,
.B conv=sync,block
is useful for reading variable-length output from a pipe.
.PD
.LP
Where sizes are specified, a number of bytes is expected.
A number may end with
.B k
(kilobytes) to specify multiplication by 1024,
.B b
(blocks of 512 bytes) to specify multiplication by 512,
or
.B w
(words) to specify multiplication by 4;
a pair of numbers may be separated by
.B x
to indicate a product.
.LP
.B cbs
is used only if
.BR ascii ,
.BR unblock ,
.BR ebcdic ,
.BR ibm ,
or
.B block
conversion is specified.  In the first two cases,
.B cbs
characters are placed into the conversion buffer, any specified
character mapping is done, trailing blanks trimmed and
.SM NEWLINE
added before sending the line to the output.
In the latter three cases, characters are read into the
conversion buffer, and blanks added to make up an
output record of size
.BR cbs .
.LP
After completion,
.B dd
reports the number of whole and partial input and output blocks.
.br
.if t .ne 4
.SH EXAMPLE
.LP
To read an
.SM EBCDIC
tape blocked ten 80-byte
.SM EBCDIC
card images per record into the
.SM ASCII
file
.I x:
.IP
.ft B
example% dd if\|=\|/dev/rmt0 of\|=\|x ibs\|=\|800 cbs\|=\|80 conv\|=\|ascii,lcase
.ft R
.LP
Note: the use of raw magtape:
.B dd
is especially suited to
.SM I/O
on the raw physical devices because it
allows reading and writing in arbitrary record sizes.
.SH "SEE ALSO"
.BR cp (1),
.BR tr (1V)
.SH DIAGNOSTICS
.TP
.IB f \|+\| p " records in(out):"
Numbers of full and partial records read(written).
.SH BUGS
The
.SM ASCII/EBCDIC
conversion tables are taken from the 256 character standard in the
.SM CACM
Nov, 1968.  The
.B ibm
conversion, while less blessed as a standard,
corresponds better to certain
.SM IBM
print train conventions.  There is no universal solution.
.LP
The 
.B block
and 
.B unblock
options cannot be combined with the
.BR ascii ,
.B ebcdic
or
.BR ibm .
Invalid combinations 
silently ignore all but the last mutually-exclusive keyword.
.\"Not all combinations of \fBconv={\fIarg\fP\|,\fR .\|.\|.\|\fB}\fR
.\"work.  Some are silently ignored; for example:
.\".TP 15
.\".B conv={ibm,block} 
.\"ignores the \fBibm\fP option.
.\".TP 15
.\".B conv={ibm,ebcdic,ascii},{block,unblock}
.\"fails.
  R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  1   l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c 1    `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h./share/man/man1/default.1                                                                             755       0      12           75  4424740643  10360                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)default.1 1.8 89/03/26 SMI; 
lts_from_input.1 fa  <     defaults_merge.1     \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 efa      defaultsedit.1       deroff.1        des.1       df.1         diff.1 1      diff3.1v         diffmk.1         	dircmp.1v   (    	dirname.1 (  8    dirs.1 (  H    dis.1    `    domainname.1    p    dos.1       
dos2unix.1     ./share/man/man1/delta.1                                                                               755       0      12           70  4424740644  10021                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-delta.1
.\" @(#)delta.1 1.3 89/03/26 SMI;
  <     defaults_merge.1    \   $ defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 $       defaultsedit.1       deroff.1 1       des.1 .1      df.1 es.      diff.1 1      diff3.1v 1 1       diffmk.1        	dircmp.1v    (    	dirname.1   8    dirs.1 .  H    dis.1 rs  `    domainname.1  `  p    dos.1 .1      
dos2unix.1       du.1v ix      ./share/man/man1/defaults_from_input.1                                                                 755       0      12          117  4424740643  13022                                                                                                                                                                                                                                                                                                                                                                      .so man1/input_from_defaults.1
.\" @(#)defaults_from_input.1 1.6 89/03/26 SMI;
defaults_to_indentpro.1   |   $ defaults_to_mailrc.1 efa      defaultsedit.1       deroff.1        des.1        df.1  .1      diff.1 .      diff3.1v         diffmk.1         	dircmp.1v   (    	dirname.1 (  8    dirs.1   H    dis.1  .  `    domainname.1    p    dos.1 `      
dos2unix.1       du.1v        dumbplot.1g     ./share/man/man1/defaults_merge.1                                                                      755       0      12          103  4424740643  11732                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)defaults_merge.1 1.4 89/03/26 SMI;
   |   $ defaults_to_mailrc.1 .1       defaultsedit.1 l      deroff.1 efa      des.1       df.1        diff.1       diff3.1v         diffmk.1        	dircmp.1v    (    	dirname.1  	  8    dirs.1   H    dis.1 8  `    domainname.1    p    dos.1        
dos2unix.1       du.1v       dumbplot.1g       e.1       echo.1v     ./share/man/man1/defaults_to_indentpro.1                                                               755       0      12          112  4424740643  13337                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)defaults_to_indentpro.1 1.4 89/03/26 SMI;
    defaultsedit.1 1      deroff.1 lts      des.1        df.1        diff.1       diff3.1v         diffmk.1 iff      	dircmp.1v ff  (    	dirname.1 rc  8    dirs.1 	  H    dis.1   `    domainname.1 is.  p    dos.1 ma      
dos2unix.1       du.1v  
      dumbplot.1g       e.1       echo.1v       ed.1        edit.1 ./share/man/man1/defaults_to_mailrc.1                                                                  755       0      12          107  4424740644  12611                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)defaults_to_mailrc.1 1.4 89/03/26 SMI;
  deroff.1 efa      des.1       df.1        diff.1       diff3.1v         diffmk.1        	dircmp.1v    (    	dirname.1  	  8    dirs.1   H    dis.1 8  `    domainname.1    p    dos.1        
dos2unix.1       du.1v       dumbplot.1g       e.1       echo.1v       ed.1        edit.1        egrep.1v        ./share/man/man1/defaultsedit.1                                                                        755       0      12        15464  4424740644  11502                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)defaultsedit.1 1.36 89/03/26 SMI;
.TH DEFAULTSEDIT 1 "15 February 1988"
.SH NAME
defaultsedit, defaults_from_input, defaults_to_indentpro, defaults_to_mailrc, indentpro_to_defaults, input_from_defaults, lockscreen_default, mailrc_to_defaults, scrolldefaults, stty_from_defaults \- create or edit default settings for SunView 1 and SunView utilities
.SH SYNOPSIS
.B defaultsedit
[
.I generic-tool-arguments
]
.LP
.B defaults_from_input
.LP
.B defaults_to_indentpro
.LP
.B defaults_to_mailrc
.LP
.B indentpro_to_defaults
.LP
.B input_from_defaults
.LP
.B lockscreen_default
.LP
.B mailrc_to_defaults
.LP
.B scrolldefaults
.LP
.B stty_from_defaults
.SH AVAILABILITY
.LP
These commands are available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "SunView environment, changing default settings \(em \fLdefaultsedit\fR"
.IX defaultsedit "" "\fLdefaultsedit\fR \(em changing SunView default settings"
.IX edit sunview "" "SunView defaults \(em \fLdefaultsedit\fR"
.LP
.B  defaultsedit
is a SunView application that
provides a convenient means for
inspecting and setting default
parameters.  It can be viewed as an alternative to
the traditional
.SM UNIX
operating system
.BI . \|*rc
files that contain initialization options for various commands.
Currently, you can use
.B defaultsedit
to manipulate options to the programs
.BR indent (1),
.BR mail (1)
and
.BR mailtool (1),
.BR stty (1V),
and
.BR defaultsedit ,
as well as the
.IR menu ,
.IR scrollbar ,
.I text subwindow
and
.I tty subwindow
packages, and the
SunView
environment itself. 
.LP
The remaining commands are used by
.B defaultsedit
to perform conversions and other functions; they can also be
invoked directly from the shell:
.RS
.TP 20
.PD 0
.B defaults_from_input
update window-system I/O defaults from current system values
.TP
.B defaults_to_indentpro
update 
.BR indent (1)
defaults in the database from the
.B \&.indent.pro
file
.TP
.B defaults_to_mailrc
update the
.B \&.mailrc
file from the defaults database
.TP
.B indentpro_to_defaults
update
.B indent
defaults from the
.B \&.indent.pro
file
.TP
.B input_from_defaults
update current system values for window-system I/O from
defaults database
.TP
.B lockscreen_default
apply current default for 
.BR lockscreen (1)
display program
.TP
.B mailrc_to_defaults
update
.BR mail (1)
and/or
.BR mailtool (1)
defaults from the
.B \&.mailrc
file
.TP
.B scrolldefaults
a SunView application that lets you try out different
settings from the
.B Scrollbar
category interactively
.TP
.B stty_from_defaults
set terminal (\s-1TTY\s0) options from defaults database
.PD
.RE
.LP
Any program or package
that a user can customize by setting or
changing a parameter could be
written so as to get its initialization options
from the defaults database.
For further information, see
.TX SVSPG .
.br
.ne 8
.SH OPTIONS
.LP
.B defaultsedit
accepts all of the generic tool arguments discussed in
.BR sunview (1).
.if t .ne 10
.SH USAGE
.LP
This only applies to
.BR defaultsedit .
.SS Subwindows
.LP
.B defaultsedit
consists of four subwindows.
From top to bottom they are:
.TP 15
control
Contains the name of the category currently
displayed, and buttons labeled
.SM SAVE\s0, 
.SM QUIT\s0, 
.SM RESET\s0,
and 
.SM EDIT 
.SM ITEM\s0. 
To change the category,
click the
.SM LEFT
mouse button on the word 
.SM CATEGORY\s0,
or use the menu that pops up when you click the
.SM RIGHT
mouse button.
.TP
message
A small text subwindow where messages from
.B defaultsedit
are displayed.
.TP
parameters
Shows all current default parameter
names with corresponding values. Clicking the
.SM LEFT
mouse button over a parameter
displays a help string 
in the message subwindow. 
.TP
edit
A small text subwindow which enables text editing
of parameter values. 
This is useful for very long text values,
such as a long mailing list.
.SS Control Panel
.TP 15
.SM SAVE
Save the current values that differ from the standard defaults
in your private database \(em that is, the
.B .\|defaults
file in your home directory.
.TP
.SM QUIT
Exit without saving any changes.
.TP
.SM RESET
Reset the default parameters of the current category to
the values in your private database.
This is useful if you
change some values, then change your mind and want to
restore the original values.
.TP
.SM EDIT ITEM
Clicking the
.SM RIGHT
mouse button over the
.SM EDIT
.SM ITEM
button brings up a menu with three choices: 
.SM COPY 
.SM ITEM\s0, 
.SM DELETE 
.SM ITEM
and
.SM EDIT 
.SM LABEL\s0.
Only text or numeric items can be edited.
Note: edits made using this menu will appear
only in your private
defaults database, not in the master database. 
The three editing operations are described below.
.TP
.SM COPY ITEM
Choosing
.SM COPY
.SM ITEM
will duplicate the current item.
You can then edit both the label and the value of the
newly created item.  Only items with text or
numeric values can be copied in this way.
.SM COPY 
.SM ITEM
is useful when you want to change the number of
instances of a certain type of item \(em
for example, to insert
a new mail alias into your defaults database.
.TP
.SM DELETE ITEM
Choosing
.SM DELETE 
.SM ITEM
will delete the current 
item from your private database.
It cannot be permanently deleted if
the corresponding node is present in the
master database. However, you can make it behave like
an undefined node by giving it the special value
.IR \\255Undefined\\255 .
.TP
.SM EDIT LABEL
Choosing
.SM EDIT
.SM LABEL
allows you to edit the label of the current item.  
When you choose
.SM EDIT
.SM LABEL\s0,
the label of the current item changes from 
bold to normal face.  Then you can select the
label and edit it as a normal panel text item.
.LP
Note: SunView starts up faster when you
set the
.B Private_only
parameter in the
.B Defaults
category to
.SM
.BR TRUE ,
in which case only your private
.B \&.defaults
file is read.
.SH ENVIRONMENT
.TP 20
.SM DEFAULTS_FILE
The value of this environment variable
indicates the file from which private
SunView
defaults are read.  When it is undefined,
defaults are read from the 
.B .\|defaults
file in your home directory.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/defaults/*.d
System-wide parameters and their standard settings.
Each file is a category in
.BR defaultsedit .
.TP
.B ~/.defaults
.PD
.SH SEE ALSO
.BR indent (1),
.BR lockscreen (1),
.BR mail (1),
.BR mailtool (1),
.BR stty (1V),
.BR sunview (1)
.LP
.TX SVBG
.LP
.TX SVSPG
.SH BUGS
Editing of choice items or categories is not supported by
.BR defaultsedit .
Neither is editing of the master defaults
database \(em to add a new
program to the master defaults database, you have to
edit a master defaults textfile.
.LP
.BR defaultsedit
reorders mail aliases that appear in the
.B .mailrc
file.  This can adversely affect recursive mail aliases.  To
avoid this, use the
.BR source
command for
.BR mail (1)
to include a file containing such aliases.
  tty.1   ,    u370.1   <    u3b.1 ,  L    u3b15.1   \    u3b2.1 L  l    u3b5.1 \  |    ul.1  l      umask.1       	unalias.1       uname.1v  	  ./share/man/man1/deroff.1                                                                              755       0      12         4176  4424740644  10250                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)deroff.1 1.15 89/03/26 SMI; 
.TH DEROFF 1  "22 March 1989"
.SH NAME
deroff \- remove nroff, troff, tbl and eqn constructs
.SH SYNOPSIS
.B deroff
[
.B \-w
]
.I filename
.B .\|.\|.
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "deroff command"  ""  "\fLderoff\fP \(em remove \fLtroff\fR constructs"
.IX delete n ""  "\fLnroff\fR, \fLtroff\fR, \fLtbl\fR and \fLeqn\fR constructs \(em \fLderoff\fR"
.IX remove n ""  "\fLnroff\fR, \fLtroff\fR, \fLtbl\fR and \fLeqn\fR constructs \(em \fLderoff\fR"
.IX "nroff utilities"  deroff "\fLderoff\fR \(em remove constructs"  "\fLnroff\fP utilities"
.IX "troff utilities"  deroff "\fLderoff\fR \(em remove constructs"  "\fLtroff\fP utilities"
.IX tbl  "" "\fLtbl\fR \(em remove constructs \(em \fLderoff\fR"
.IX eqn "" "\fLeqn\fP \(em remove constructs \(em \fLderoff\fR"
.IX "document production" deroff "" "\fLderoff\fR \(em delete \fLtroff\fR, \fLtbl\fR and \fLeqn\fR constructs"
.B deroff
reads each file in sequence and removes all
.B nroff
and
.B troff
command lines, backslash constructions, macro definitions,
.B eqn
constructs (between
.SB \&.EQ
and
.SB \&.EN
lines or between
delimiters), and table descriptions and writes
the remainder on the standard
output.
.B deroff
follows chains of included files
.RB ( \&.so
and
.B \&.nx
commands); if a file has already been included, a
.B \&.so
is ignored and a
.B \&.nx
terminates execution.  If no input file is
given,
.B deroff
reads from the standard input file.
.SH OPTIONS
.TP
.B \-w
Generate a word list, one word per line. A `word'
is a string of letters,
digits, and apostrophes, beginning with a letter;
apostrophes are removed.
All other characters are ignored.
.SH "SEE ALSO"
.BR eqn (1),
.BR nroff (1),
.BR tbl (1),
.BR troff (1)
.SH BUGS
.LP
.B deroff
is not a complete
.B troff
interpreter, so it can be confused by subtle constructs.
Most errors result in too much rather than too little output.
.LP
.B deroff
does not work well with files that use
.B \&.so
to source in the standard macro package files.
  
lastcomm.1 t  
    ld.1 ast  
    ldd.1    
    leave.1   
    lex.1         limit.1       line.1        lint.1v   0    list.1   @    ln.1    P    load.1   `    loadc.1   x    lockscreen.1 .1      $ lockscreen_default.1        logger.1 t.1      login.1        	logname.1 gi      logo./share/man/man1/des.1                                                                                 755       0      12        10636  4424740644   7574                                                                                                                                                                                                                                                                                                                                                                      .TH DES 1 "22 March 1989"
.\" @(#)des.1 1.16 89/03/26 SMI;
.SH NAME
des \- encrypt or decrypt data using Data Encryption Standard
.SH SYNOPSIS
.B des
.B \-e
|
.B \-d
[ 
.B \-bfs
] [ 
.B \-k
.I key
] [ 
.I input-file
[ 
.I output-file
] ]
.SH DESCRIPTION
.IX "des command"  ""  "\fLdes\fP \(em data encryption"
.IX  files  "des command"  files  "\fLdes\fP \(em encrypt/decrypt, data encryption standard"
.IX  "encode files" des "" "\fLdes\fR \(em Data Encryption Standard"
.IX  "decode files" des "" "\fLdes\fR \(em Data Encryption Standard"
.IX "Data Encryption Standard \(em \fLdes\fR"
.LP
.B des
encrypts and decrypts data using the
.SM NBS
Data Encryption Standard algorithm.
One of 
.B \-e
(for encrypt) or
.B \-d
(for decrypt) must be specified.
.LP
The 
.B des
command is provided to promote secure
exchange of data in a standard fashion.
.SH OPTIONS
.TP
.B \-b
Select
.SM ECB
(eight bytes at a time) encryption mode.
.TP
.B \-f
Suppress warning message when software implementation is used.
.TP
.B \-s
Select software implementation for the encryption algorithm.
.TP
.BI \-k " key"
Use the encryption 
.I key
specified.
.LP
Two standard encryption modes are supported by the
.B des
program, Cipher Block Chaining (
.SM CBC
\(em the default) and Electronic Code Book
(
.SM ECB
\(em specified with
.BR \-b ).
.SM CBC
mode treats an entire file as a unit of encryption, that is,
if insertions or deletions are made to the encrypted file then
decryption will not succeed.
.SM CBC
mode also ensures that regularities
in clear data do not appear in the encrypted data.
.SM ECB
mode treats each 8 bytes as units of encryptions, so if parts
of the encrypted file are modified then other parts may still be
decrypted.  Identical values of clear text
encrypt to identical values of cipher text.
.LP
The key used for the
.SM DES
algorithm is obtained by prompting the user
unless the
.RB ` \-k
.IR key '
option is given.
If the key is an argument to the
.B des
command, it is potentially visible to users executing
.BR ps (1)
or a derivative.  To minimize this possibility,
.B des
takes care to destroy the key argument immediately upon entry.
.LP
The
.B des
command attempts to use
.SM DES
hardware for its job, but will use
a software implementation of the
.SM DES
algorithm if the hardware is unavailable. 
Normally, a warning message is printed if the
.SM DES
hardware is unavailable since the software is only about 1/50th
as fast.  However, the 
.B \-f
option will suppress the warning.
The
.B \-s
option may be used to force use of software instead of hardware
.SM DES\s0.
.LP
The
.B des
command reads from standard input unless
.I input-file
is specified and writes to standard output unless
.I output-file
is given.
.LP
The following sections give information required to implement compatible
facilities in other environments.
.LP
Since the
.SM CBC
and
.SM ECB
modes of
.SM DES
require units of 8 bytes to be
encrypted, files being encrypted by the
.B des
command have 1 to 8 bytes appended to them
to cause them to be a multiple
of 8 bytes.
The last byte, when decrypted, gives
the number of bytes (0 to 7) which
are to be saved of the last 8 bytes.
The other bytes of those appended to the
input are randomized before encryption.
If, when decrypting, the last byte is not
in the range of 0 to 7 then
either the encrypted file has been corrupted
or an incorrect key was
provided for decryption and an error message is printed.
.LP
The
.SM DES
algorithm requires an 8 byte key whose low order bits are
assumed to be odd-parity bits.  The
.SM ASCII
key supplied by the user
is zero padded to 8 bytes and the high order
bits are set to be odd-parity
bits.  The
.SM DES
algorithm then ignores the low bit of each
.SM ASCII
character, but that bit's information has been
preserved in the high bit due to the parity.
.LP
The
.SM CBC
mode of operation always uses an initial value of all zeros for
the initialization vector, so the first 8 bytes of a file are
encrypted the same whether in
.SM CBC
or
.SM ECB
mode.
.SH FILES
.PD 0
.TP
.B /dev/des? 
.PD
.SH SEE ALSO
.BR ps (1)
.SH BUGS
.LP
It would be better to use a real 56-bit key rather than an
\s-1ASCII\s0-based
56-bit pattern.  Knowing that the key was derived from
.SM ASCII
radically reduces
the time necessary for a brute-force crytographic attack.
.SH RESTRICTIONS
.LP
Software encryption is disabled for programs shipped outside of the U.S.
The program will still be able to encrypt files if one can obtain an
encryption chip, legally or otherwise.
ogin.1c    \  Y  rm.1 n.1  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1 1   ./share/man/man1/df.1                                                                                  755       0      12         4260  4424740645   7367                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)df.1 1.20 89/03/26 SMI;
.TH DF 1 "25 March 1989"
.SH NAME
df \- report free disk space on file systems
.SH SYNOPSIS
.B df
[
.B \-a
]
[
.B \-i
]
[
.B \-t
.I type
] [
.IR filesystem .\|.\|.
] [
.IR filename .\|.\|.
]
.SH DESCRIPTION
.IX "df command"  ""  "\fLdf\fP \(em display free space"
.IX "file system"  "free space display"
.IX "file system"  "display free space"
.IX display  "free space in file system"
.B df
displays the amount of disk space occupied by currently mounted file systems,
the amount of used and available space,
and how much of the file system's total capacity has been used.
Used without arguments,
.B df
reports on all mounted file systems, 
producing something like:
.LP
.RS
.nf
.ft B
tutorial% df
.ta \w'Filesystem'u+2n +\w'kbytes'u+2n +\w'used'u+2n +\w'avail'u+2n +\w'capacity'u+2n
Filesystem	kbytes	used	avail	capacity	Mounted on
/dev/ip0a	 7445	 4714	1986	70%		/
/dev/ip0g	42277	35291	2758	93%		/usr
.ft R
.fi
.RE
.LP
Note that used+avail is less than the
amount of space in the file system
(kbytes); this is because the system
reserves a fraction of the space
in the file system to allow its file
system allocation routines to work well.
The amount reserved is typically about 10%;
this may be adjusted using
.BR tunefs (8).
When all the space on a file system except for this reserve is
in use, only the super-user can allocate new files and data blocks
to existing files.  When a file system is overallocated in this way,
.B df
may report that the file system is more than 100% utilized.
.LP
If arguments to
.B df
are disk partitions (for example,
.BR /dev/ip0a s
or
path names,
.B df
produces a report on the
file system containing the named file. Thus
.B df .
shows the amount of space on the file system containing the current
directory.
.SH OPTIONS
.TP
.B \-a
Reports on all filesystems including the uninteresting
ones which have zero total blocks. (e.g. 
.I automounter
)
.TP 15
.B \-i
Report the number of used and free inodes.
.TP
.B \-t \ \fItype\fR
Report on filesystems of a given
.I type
(for example,
.B nfs
or
.BR 4.2 ).
.SH FILES
.PD 0
.TP 20
.B /etc/mtab
List of filesystems currently mounted.
.PD
.SH "SEE ALSO"
.BR du (1V),
.BR mtab (5),
.BR quot (8),
.BR tunefs (8)
hing like:
.LP
.RS
.nf
.ft B
tutorial% df
.ta \w'Filesystem'u+2n +\w'kbytes'u+2n +\w'used'u+2n +\w'avail'u+2n +\w'capacity'u+2n
Filesystem	kbytes	used	avail	capacity	Mounted on
/dev/ip0a	 7445	 4714	1986	70%		/
/dev/ip0g	42277	35291	2758	93%		/usr
.ft R
.fi
.RE
.LP
Note that used+avail is less than the
amount of space in the file syst./share/man/man1/diff.1                                                                                755       0      12        16543  4424740645   7735                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)diff.1 1.21 89/03/26 SMI; from UCB 4.3 BSD and S5R2 6.2
.TH DIFF 1 "22 March 1989"
.SH NAME
diff \- display line-by-line differences between pairs of text files
.SH SYNOPSIS
.B diff
[
.B \-bitw
]
[
.B \-c
[
.I #
] |
.B \-e
|
.B \-f
|
.B \-n
|
.B \-h
] 
.I "\0filename1 filename2"
.br
.B diff
[
.B \-bitw
] [
.BI \-D string
] 
.I "\0filename1 filename2"
.br
.B diff
[
.B \-bitw
] [
.B \-c
[
.I #
] | 
.B \-e
| 
.B \-f
|
.B \-n
|
.B \-h
] [
.B \-l
] [
.B \-r
] [
.B \-s
] [
.BI \-S name
] 
.I "\0directory1 directory2"
.SH DESCRIPTION
.IX "diff command"  ""  "\fLdiff\fP \(em differential compare"
.IX files  "differential compare"
.IX files  "find differences"
.IX directory  "differential compare"
.IX compare  "files differentially"
.LP
.B diff
is a
.I differential
file comparator.  When run
on regular files, and when
comparing text files that differ during directory comparison (see the
notes below on comparing directories),
.B diff
tells what lines must be changed in the
files to bring them into agreement.
Except in rare circumstances,
.B diff
finds a smallest sufficient set of differences.  If neither
.I filename1
nor
.I filename2
is a directory, either may be given as 
.RB ` \- ',
in which case the standard input is used.  If
.I filename1
is a directory,
a file in that directory whose filename is
the same as the filename of
.I filename2
is used (and vice versa).
.LP
There are several options for output format;
the default output format contains lines of these forms:
.IP "" 5
.I n\|1
.B a
.IR n\|3 , \|n\|4
.br
.IR n\|1 , \|n\|2
.B d
.I n\|3
.br
.IR n\|1 , \|n\|2
.B c
.IR n\|3 , \|n\|4
.LP
These lines resemble
.BR ed (1)
commands to convert
.I filename1
into
.IR filename2 .
The numbers after the letters pertain to
.IR filename2 .
In fact, by exchanging
.B a
for
.B d
and reading backward
one may ascertain equally how to convert 
.I filename2
into
.IR filename1 .
As in 
.BR ed (1),
identical pairs, where
.I n\|1
=
.I n\|2
or
.I n\|3
=
.IR n\|4 ,
are abbreviated as a single number.
.LP
Following each of these lines come all the lines that are
affected in the first file flagged by
.RB ` < ', 
then all the lines that are affected in the second file
flagged by
.RB ` > '.
.LP
If both arguments are directories,
.B diff
sorts the contents of the directories
by name, and then runs the regular file
.B diff
program as described above on text files which are different.
Binary files which differ, common
subdirectories, and files which appear
in only one directory are listed.
.SH OPTIONS
.TP
.B \-b
Ignore trailing blanks (\s-1SPACE\s0 and
.SM TAB
characters)
and treat all other strings of blanks as equivalent.
.TP
.B \-i
Ignore the case of letters; for example,
.RB ` A '
will compare equal to
.RB ` a '.
.TP
.B \-t
Expand
.SM TAB
characters in output lines.  Normal or
.B \-c
output adds character(s) to the front of each line which may alter
the indentation of the original source
lines and make the output listing
difficult to interpret.  This option will
preserve the original source's indentation.
.TP
.B \-w
Ignore all blanks (\s-1SPACE\s0 and
.SM TAB
characters); for example,
.RB ` "if\ (\ a\ =\|=\ b\ )" '
will compare equal to
.RB ` if(a=\|=b) '.
.LP
The following four options are mutually exclusive:
.TP
.BR \-c [\fI#\fP]
Produce a listing of differences with lines of context.
The default is to present 3 lines of context
and may be changed, (to 10, for example), by
.BR \-c10 \&.
With
.B \-c
the output format is modified slightly:  output begins with
identification of the files involved and their creation dates, then
each change is separated by a line with a dozen
.BR * \|s.
The lines removed from
.I filename1
are marked with
.RB ` "\(mi " ';
those added to
.I filename2
are marked
.RB ` "+ " '.
Lines which are changed from one
file to the other are marked in both files with
.RB ` "! " '.
.IP
Changes which lie within <context> lines of each other are grouped
together on output.  This is a change from the previous 
.RB ` "diff \-c" '
but the resulting output is usually much easier to interpret.
.TP
.B \-e
Produce a script of
.BR a ,
.BR c ,
and 
.B d
commands for the editor
.BR ed ,
which will recreate
.I filename2
from
.IR filename1 .
.br
.ne 5
.IP
In connection with
.BR \-e ,
the following shell program may help
maintain multiple versions of a file.
Only an ancestral file ($1) and a chain of version-to-version
.B ed
scripts ($2,\|$3,\|.\|.\|.) made by
.B diff
need be on hand.
A `latest version' appears on the standard output.
.sp .5
.RS
.RS
.B "(shift; cat $*; echo \'1,$p\') \(bv ed \- $1"
.RE
.RE
.IP
Extra commands are added to the output
when comparing directories with
.BR \-e ,
so that the result is a
.BR sh
script for converting text files
which are common to the two directories
from their state in
.I directory1
to their state in
.IR directory2 .
.TP
.B \-f
Produce a script similar to that of
.B \-e,
not useful with
.BR ed ,
which is in the opposite order.
.TP
.B \-n
Produce a script similar to that of
.BR \-e ,
but in the opposite order and with a count of changed lines on each
insert or delete command.
.TP
.B \-h
Do a fast, half-hearted job.
It works only when changed stretches are short and well separated,
but does work on files of unlimited length.
.LP
Options for the second form of 
.B diff
are as follows:
.TP
.BI \-D string
Create a merged version of
.I filename1
and
.I filename2
on the standard output, with C preprocessor controls included so that
a compilation of the result without defining 
.I string
is equivalent
to compiling
.IR filename1 ,
while defining
.I string
will yield
.IR filename2 .
.LP
Options when comparing directories are:
.TP
.B \-l
Long output format; each text file
.B diff
is piped through
.BR pr (1V)
to paginate it, other differences are remembered and summarized
after all text file differences are reported.
.TP
.B \-r
Apply
.B diff
recursively to common subdirectories encountered.
.TP
.B \-s
Report files which are the same, which are otherwise not mentioned.
.TP
.BI \-S name
Start a directory
.B diff
in the middle, beginning with file
.IR name .
.SH FILES
.PD 0
.TP 20
.B /tmp/d?????
.TP
.B /usr/lib/diffh
for 
.B \-h
.TP
.B /usr/bin/diff
for directory diffs
.TP
.B /usr/bin/pr
.PD
.SH "SEE ALSO"
.BR cc (1V),
.BR cmp(1),
.BR comm(1),
.BR cpp(1),
.BR diff3(1V),
.BR ed(1),
.BR pr (1V)
.SH DIAGNOSTICS
.LP
Exit status is 0 for no differences,
1 for some differences, 2 for trouble.
.TP 5
.BI "Missing newline at end of file" X
Indicates that the last line of file
.I X
did not have a
.SM NEWLINE\s0.
If the lines are different, they will be flagged and output,
although the output will seem to indicate they are the same.
.SH BUGS
Editing scripts produced under the
.BR \-e " or"
.BR \-f " option are naive about"
creating lines consisting of a single 
.RB ` . '.
.LP
When comparing directories with the
.BR \-b ,
.BR \-w ,
or
.B \-i
options specified,
.B diff
first compares the files (as in 
.BR cmp (1),
and then runs the regular
.B diff
algorithm if they are not equal.
This may cause a small amount of spurious output if the files
then turn out to be identical because the only differences are
insignificant blank string or case differences.
.LP
The 
.B \-D
option ignores existing preprocessor controls in the source
files, and can generate 
.BR #ifdefs 's
with overlapping scope.  The output should be checked by hand,
or run through
.RB ` "cc \-E" '
(see
.BR cc (1V))
and then 
.BR diff ed
with the original source files.  Discrepancies revealed should be
corrected before compilation.
gister
.TP
.B $fpi
.SM MC68881
instruction address register
.TP
.B $fpf
.SM MC68881
flags register (unused, idle, busy)
.TP
.BR $fpa [ 0 - 31 ]
double-precis./share/man/man1/diff3.1v                                                                              755       0      12         7635  4424740645  10170                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)diff3.1v 1.11 89/03/26 SMI; from UCB 6.2 8/20/85
.TH DIFF3 1V  "9 September 1987"
.SH NAME
diff3 \- display line-by-line differences between 3 files
.SH SYNOPSIS
.B diff3
[
.B \-exEX3
]
.I filename1
.I filename2
.I filename3
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/diff3
[
.B \-ex3
]
.I filename1
.I filename2
.I filename3
.SH DESCRIPTION
.IX "System V commands" "\fLdiff3\fR"
.IX "diff3 command"  ""  "\fLdiff3\fP \(em three-way differential compare"
.IX files  "compare, three-way differential \(em \fLdiff3\fR"
.IX compare  "three-way differential \(em \fLdiff3\fR"
.B diff3
compares three versions of a file,
and publishes disagreeing ranges of text
flagged with these codes:
.RS
.TP 11
.B ====
All three files differ
.TP 
.B ====1
.IR filename1 " is different"
.TP
.B ====2
.IR filename2 " is different"
.TP
.B ====3
.IR filename3 " is different"
.RE
.LP
The types of differences between a given range within
the given files are indicated in one of these ways:
.RS
.TP 11
.IB f : \|n1 a
Text is to be appended after line number
.I n1
in file
.I f,
where
.I f
= 1, 2, or 3.
.TP 
.IB f : \|n1 , \|n2 c
Text is to be
changed in the range line
.I n1
to line
.IR n2 .
If 
.I n1
=
.IR n2 ,
the range may be abbreviated to
.IR n1 .
.RE
.LP
The original contents of the range follows immediately
after a
.B c
indication.
When the contents of two
files are identical, the contents of the lower-numbered
file is suppressed.
.SH OPTIONS
The options to
.B diff3
instruct it to produce a script for the editor
.BR ed ,
rather than a list of differences.  This script will incorporate some or
all of the differences between
.I filename2
and
.I filename3
into
.IR filename1 .
This script will not include a
.B w
or
.B q
command at the end, so that it will not write out the changed file.
.TP
.B \-e
Produce a script that will incorporate all changes between
.I filename2
and
.IR filename3 ,
that is, the changes that normally would be flagged 
.RB ` ==== '
and 
.RB ` ====3 '.
.TP
.B \-x
Produce a script that will incorporate only changes flagged
.RB ` ==== '.
.TP
.B \-3
Produce a script that will incorporate only changes flagged
.RB ` ====3 '.
.TP
.B \-E
Produce a script that will incorporate all changes between
.I filename2
and
.IR filename3 ,
but treat overlapping changes (that is, changes that would
be flagged with
.B ====
in the normal listing) differently.  The overlapping
lines from both files will be inserted by
the edit script, bracketed by 
.B <<<<<<
and 
.B >>>>>>
lines.
.TP
.B \-X
Produce a script that will incorporate only changes flagged 
.BR ==== ,
but treat these changes in the manner of the
.B \-E
option.
.PP
For example, suppose lines 7-8 are changed in both
.I filename1
and
.IR filename2 .
Applying the edit script generated by the command
.sp .5
.RS
.nf
.BI "diff3 \-E " "filename1 filename2 filename3"
.fi
.RE
.LP
to
.I filename1
results in the following file.
.br
.ne 11
.RS
.sp .5
.nf
.B lines 1-6
.BI "of " filename1
.BI "<<<<<<< " filename1
.B lines 7-8
.B "of " filename1
.B =======
.B lines 7-8
.BI "of " filename3
.BI ">>>>>>> " filename3
.BI "rest of " filename1
.fi
.RE
.SH SYSTEM V OPTIONS
The System V version of
.B diff3
does not support the
.B \-E
and
.B \-X
options.  The script produced by the
.BR \-e ,
.BR \-x ,
and
.B \-3
options 
.I does
include a
.B w
and
.B q
command at the end, so that 
it
.I will
write out the changed file.
.SH EXAMPLES
The following command will incorporate all the changes between
.I filename2
and
.I filename3
into
.IR filename1 ,
and print the resulting file to
the standard output.  If the System V
version of
.BR diff3 ,
is used,
.I filename1
will be replaced with the resulting file.
.sp .5
.RS
.nf
.BI "(diff3 \-e " "filename1 filename2 filename3" "; echo \'1,\|$p\'\|) \(bv ed \- " filename1
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /tmp/d3?????
.TP
.B /usr/lib/diff3
.TP
.B /usr/5lib/diff3prog
.PD
.SH "SEE ALSO"
.BR diff (1),
.BR ed (1)
.SH BUGS
Text lines that consist of a single 
.RB ` . '
will defeat a
.B \-e 
option.
 D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /  t  0  
old-ttytool.1 0    1  old-./share/man/man1/diffmk.1                                                                              755       0      12         4151  4424740645  10235                                                                                                                                                                                                                                                                                                                                                                      .\"	@(#)diffmk.1 1.11 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH DIFFMK 1 "18 January 1988"
.SH NAME
diffmk \- mark differences between versions of a troff input file
.SH SYNOPSIS
.B diffmk
.I oldfile newfile markedfile
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "diffmk command"  ""  "\fLdiffmk\fP \(em add change marks to documents"
.IX  "document production"  diffmk  ""  "\fLdiffmk\fP \(em add change marks"
.B diffmk
compares two versions of a file and creates a
third version that includes ``change mark''
.RB ( .mc )
commands for
.BR nroff (1)
and 
.BR troff (1).
.I oldfile
and
.I newfile
are the old and new versions of the file.
.B diffmk
generates
.IR markedfile ,
which, contains the text from
.I newfile
with 
.BR troff (1)
``change mark'' requests
.RB ( .\|mc )
inserted where 
.I newfile
differs from 
.IR oldfile .
When
.I markedfile
is formatted,
changed or inserted text is shown by 
.B |
at the right margin of each line.
The position of deleted text is shown by a single
.BR * .
.LP
.B diffmk
can also be used in conjunction with the proper 
.B troff
requests to produce program listings with marked changes.
In the following command line:
.IP
.B diffmk old.c new.c marked.c ; nroff reqs marked.c | pr
.LP 
the file
.B reqs
contains the following
.B troff
requests:
.RS
.ft B
.nf
\&.\|pl \|1
\&.\|ll \|77
\&.\|nf
\&.\|eo
\&.\|nh
.ft R
.fi
.RE
.LP
which eliminate page breaks, adjust the line length, set no-fill
mode, ignore escape characters, and turn off hyphenation,
respectively.
.LP
If the characters 
.B | 
and
.B *
are inappropriate, you might run 
.I markedfile 
through 
.BR sed (1V)
to globally change them.
.SH SEE ALSO
.BR diff (1),
.BR nroff (1),
.BR sed (1V),
.BR troff (1)
.SH BUGS
Aesthetic considerations may dictate
manual adjustment of some output.
File differences involving only formatting
requests may produce undesirable
output, that is, replacing
.B \&.\|sp
by
.B \&.\|sp 2
will
produce a ``change mark'' on the preceding
or following line of output.
 lex.1 av       limit.1       line.1 i       lint.1v   0    list.1 t  @    ln.1 ist  P    load.1 1  `    loadc.1   x    lockscreen.1  x     $ lockscreen_default.1 $       logger.1 ock      login.1        	logname.1 1       logout.1        look.1 1      	lookbib.1        lorder.1    ,    lpq.1 .1  <    ./share/man/man1/dircmp.1v                                                                             755       0      12         2275  4424740645  10446                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dircmp.1v 1.9 89/03/26 SMI; from S5R2 6.2 9/2/83
.TH DIRCMP 1V "24 September 1987"
.SH NAME
dircmp \- compare directories
.SH SYNOPSIS
.B /usr/5bin/dircmp
[
.B \-d
] [
.B \-s
] [
.BI \-w "n"
]
.I dir1
.I dir2
.SH DESCRIPTION
.IX "System V commands" "\fLdircmp\fR"
.IX dircmp "" "\fLdircmp\fR \(em compare directories"
.LP
Note:
Optional Software (System V Option).  Refer to
.TX INSTALL
for information on how to install this command.
.B dircmp
examines
.I dir1
and
.I dir2
and generates various tabulated information
about the contents of the directories. Listings
of files that are unique to each directory are generated
for all the options.
If no option is entered,
a list is output indicating whether the
filenames common to both directories
have the same contents.
.SH OPTIONS
.TP
.B \-d
Compare the contents of files with the same name in
both directories and output a list telling what must
be changed in the two files to bring them into agreement.
The list format is described in
.BR diff (1).
.TP
.B \-s
Suppress messages about identical files.
.TP
.B \-w\fIn
Change the width of the output line to
.I n
characters.
The default width is 72.
.SH SEE ALSO
.BR cmp (1),
.BR diff (1)
.LP
.TX INSTALL
oto.1 b      gprof.1       graph.1g .1   (    grep.1v   <    groups.1 1v   P    
hashstat.1    `    head.1 t  p    help.1 d      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g        i386.1 1       	iAPX286../share/man/man1/dirname.1                                                                             755       0      12           71  4424740645  10351                                                                                                                                                                                                                                                                                                                                                                      .so man1/basename.1
.\" @(#)dirname.1 1.7 89/03/26 SMI; 
is.1 rs  `    domainname.1  `  p    dos.1 .1      
dos2unix.1 1      du.1v ix      dumbplot.1g       e.1       echo.1v       ed.1 cho      edit.1 1       egrep.1v 1 1      eject.1        else.1 c  0    end.1 se  @    endif.1   P    endsw.1   d    enroll.1 .1   t    env.1 .1      eqn.1 v.      error.1       eval.1 o      ex.1 val    ./share/man/man1/dirs.1                                                                                755       0      12           72  4424740646   7675                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)dirs.1 1.8 89/03/26 SMI; 
name.1  `  p    dos.1 .1      
dos2unix.1 1      du.1v ix      dumbplot.1g       e.1       echo.1v       ed.1 cho      edit.1 1       egrep.1v 1 1      eject.1        else.1 c  0    end.1 se  @    endif.1   P    endsw.1   d    enroll.1 .1   t    env.1 .1      eqn.1 v.      error.1       eval.1 o      ex.1 val      exec.1 1      ./share/man/man1/dis.1                                                                                 755       0      12         5227  4424740646   7562                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dis.1	1.10 89/03/26 SMI; from System V
.TH DIS 1 "19 February 1988"
.SH NAME
dis \- object code disassembler for COFF
.SH SYNOPSIS
.B dis
.RB [ " \-o " ]
.RB [ " \-V " ]
.RB [ " \-L " ]
.RB [ " \-d "
.IR sec " ]"
.RB [ " \-da "
.IR sec " ]"
.RB [ " \-F "
.IR function " ]"
.RB [ " \-t "
.IR sec " ]"
.RB [ " \-l "
.IR string " ]"
.I coff-file .\|.\|.
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "dis command" "" "\fLdis\fR command"
.LP
The 
.B dis
command
produces an assembly-language listing
of
.IR coff-file ,
which may be any object file in
.SM COFF
format, or an archive of
.SM COFF
object files.
.PP
The listing includes assembly statements and
an octal or hexadecimal representation of the binary
that produced those statements.
.SH OPTIONS
.TP
.B \-o
Print numbers in octal.  The default is hexadecimal.
.PP
.TP
.B \-V
Print, on standard error, the version number of the disassembler
being executed.
.TP
.B \-L
Lookup source labels in the symbol table for
subsequent printing.
This option works only if the file was compiled with
additional debugging information (e.g., the 
.B \-g
option of
.BR cc (1V)).
.TP
.BI \-d " sec"
Disassemble the named section as data,
printing the offset of the data from the
beginning of the section.
.TP
.BI \-da " sec"
Disassemble the named section as data,
printing the actual address of the data.
.TP
.BI \-F " function"
Disassemble only the named function in each object file
specified on the command line.
The
.B \-F
option may be specified multiple times on the command line.
.TP
.BI \-t " sec"
Disassemble the named section as text.
.TP
.BI \-l " string"
Disassemble the library file specified by
.IR string .
For example,
.B "dis \-l x \-l z"
disassembles
.B libx.a
and
.BR libz.a .
All libraries are
assumed to be in
.BR /usr/lib .
.DT
.br
.PP
If the
.BR \-d ,
.B \-da
or
.BR \-t
options are specified,
only those named
sections from each
user-supplied file name
will be disassembled.
Otherwise, all sections
containing text will
be disassembled.
.PP
On output, a number enclosed in brackets
at the beginning of a line,
such as 
.BR [5] ,
represents that the break-pointable line number
starts with the following instruction.
These line numbers will be printed only if the file was compiled with
additional debugging information (e.g., the
.B \-g
option of
.BR cc (1V)).
An expression such as
.B <40>
in the operand field or in the symbolic disassembly,
following a relative displacement
for control transfer instructions,
is the computed address
within the section to which
control will be transferred.
A function name
will appear in the first column,
followed by
.BR (\|) .
.SH "FILES"
.B /usr/lib
.SH "SEE ALSO"
.BR cc (1V)
.BR coff (5)
  make.1        man.1  l  4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 e  h    mkdir.1   x    mkstr.1       more.1        mt.1 1 t      mv.1 ore      neqn.1 1      newgrp.1        nice.1 1      nl.1 1 1      nm.1 ice       nohup.1v    $  !  notify.1  $  4  "./share/man/man1/domainname.1                                                                          755       0      12         1761  4424740646  11112                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)domainname.1 1.18 89/03/26 SMI;
.TH DOMAINNAME 1 "16 November 1987"
.SH NAME
domainname \- set or display name of the current YP domain
.SH SYNOPSIS
.B domainname
[ 
.I name-of-domain
]
.SH DESCRIPTION
.IX "domainname command"  ""  "\fLdomainname\fP \(em set/display domain name"
.IX "current domain, set or display name \(em \fLdomainname\fR"
.IX display  "current domain name \(em \fLdomainname\fR"
.IX set  "current domain name \(em \fLdomainname\fR"
Without an argument,
.B domainname
displays the name of the current domain, which typically
encompasses a group of hosts under the same administration.  As
such, the name of a YP domain is normally also a valid Internet
domain name, and can be used in conjunction with the 
.BR sendmail (8)
and the name server
.BR named (8C).
.LP
Only the super-user can set the name of the domain, by giving
.B domainname
an argument; this is usually done in the startup script
.BR /etc/rc.local .
.SH SEE ALSO
.BR ypinit (8), 
.BR named (8C), 
.BR sendmail (8)
etoptcvt.1   
./share/man/man1/dos.1                                                                                 755       0      12        24444  4424740646   7612                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dos.1	1.10 89/03/26 SMI;
.TH DOS 1 "19 February 1988"
.SH NAME
dos \- SunView window for IBM PC/AT applications
.SH SYNOPSIS
.B dos
[
.B \-b
]
[
.B \-s
]
[
.BI \-p " config"
]
[
.BI \-w 
]
[
.BI \-c " command"
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX dos "" "\fLdos\fR \(em window for IBM PC/AT applications"
.LP
A window created by
.B dos
looks and acts like the screen of an
.SM IBM PC/AT
or compatible computer running
.SM MS-DOS
3.3, except that it has expanded features. It allows
sharing of files with SunOS, copying and pasting data between 
windows, and piping and redirection.  You may run any reasonable number of 
.SM DOS
windows simultaneously.
.LP
Shrinking or expanding the 
window will not change the contents to accomodate the new size.
.SH USAGE
.SS Menu
The menu available in the window by pressing the right mouse button
allows various controls over the work in the window. 
.B Edit
allows you to copy and paste between windows.  The 
.B Show Screen
menu item selects the display type emulation (either Hercules, CGA, 
or Monochrome).  The 
.B Mouse
menu item allows you to control whether the mouse operates like a Microsoft
or compatible mouse or in normal SunView fashion.  The
.B Send to printer
menu item allows you to send queued jobs to the print spooler.
.B Device
allows you to select which disks and other devices will be used and which 
are to be considered write only.
The 
.B Reboot \s-1DOS\s0 Window
item is equivalent to restarting the window.
This can also be accomplished by pressing the
.SM CONTROL,
.SM ALT,
and
.SM DELETE 
keys simultaneously.
.LP
.SS Printer Assignments
.SM DOS
uses three printer designations: 
.SM
.BR LPT1 ,
.SM
.BR LPT2 ,
and
.SM
.BR LPT3 .
The default settings are: files sent to
.SB LPT1
go to the default system printer. Files sent to
.SB LPT2
are appended to the file 
.B ~/pc/lpt2 
in your home directory.
Epson-compatible print jobs can be sent to
.SB LPT3
to yield Epson FX-80 quality output on a Postscript printer.
.SS Drives
.TP 18
Drive A 
The Sun386i 3-1/2" diskette drive, used for reading PC
format diskettes onto the hard disk and writing data to be stored on floppy.
Drive A is not accessible across a network.
.TP 18
Drive C 
A virtual disk stored in a file in 
.IR /home/yourname/pc .
Files written to drive C cannot be accessed from SunOS.  Drive C is generally intended
for storage of applications and copy protected software but not data.
.TP 18
Drives D through S 
Equivalents of SunOS directories.  They can be
accessed from either
.SM DOS
or SunOS, and can contain any number of files and
other directories.  The SunOS directories referenced by
.SM DOS
drives other 
than D, H, and R (described below) are user-defined 
(using the
.SB DOS EXTEND
command).
.TP 18 
Drive D 
The current SunOS directory when the
.SM DOS
window was opened.  May subsequently be changed to any other directory.
.TP 18
Drive H 
The home directory of the user who opened the window.  May subsequently be changed to any directory in the user's home directory tree.
.TP 18
Drive R 
Initially equivalent to the root directory of SunOS
.LP
.SS File Sharing between SunOS and DOS
File names under
.SM DOS
consist of 8 characters, a period, and a 3 
character extension.  When a SunOS filename does not comply with 
these rules, its
name is modified by placing a tilde (~) in an appropriate location 
so that the
file name conforms to
.SM DOS
specifications while remaining unique.
It is recommended that filenames conform to
.SM DOS
requirements for files to be used in both SunOS and
.SM DOS.
.LP
Because SunOS and
.SM DOS
use different conventions for carriage returns, 
.B dos2unix
and
.BR unix2dos 
are provided to convert text files between the two formats.  
.SS Command Sharing between SunOS and DOS
The 
.B /etc/dos/unix
directory contains a list of SunOS commands accessible from
.SM DOS.
Other SunOS commands not in this list can be executed from
.SM DOS
with the command
.RB ` unix 
.IR command '.
SunOS commands always use SunOS filename conventions and
.SM DOS
commands always use
.SM DOS
filename conventions, regardless of whether either type of command is executed from 
SunOS or
.SM DOS.
Only
.SM DOS
commands can use drives A and C.
.LP
.SH OPTIONS
.TP
.B \-b
Boots (loads)
.SM DOS
and opens a window using the
.SB AUTOEXEC.BAT
and
.SB CONFIG.SYS
files instead of
.BR ~/pc/.quickpc .
A
.SM DOS
sign-on message is displayed in the window.
.TP 
.B \-s
Boot
.SM DOS
and save a new
.B .quickpc
file under the name specified on the
.SB SAVE
line in 
.BR ~/pc/.setup.pc .
Use this option after making changes to drive C
.SB AUTOEXEC.BAT
or
.SM
.BR CONFIG.SYS .
Exits
.SM DOS
after saving the 
.B .quickpc
file.
.TP
.BI \-p " config"
Loads an alternate file instead of
.BR setup.pc .
.TP
.BI \-c " command"
Executes the given
.SM DOS
command in the newly created window.
.TP
.BI \-w 
Runs
.SM DOS
text-only commands and applications in the current SunView Commands window.
.SH ENVIRONMENT
.TP 15
.SB DOS_PRINTER
The value of this environment variable indicates the timeout (in seconds) for printing.
A value of 20 (the default) indicates that jobs will be sent to the UNIX
print spooler after
20 seconds of no printing activity from
.SM DOS
to that printer.
A value of 0 indicates that the spooler must be flushed manually from the menu
in the window.
.TP 15
.SM DOSLOOKUP
.br
If on, this environment variable indicates that a command
should be tried as a
.SM DOS
command if not recognized by SunOS. 
If
.SM DOS
supports the command, a
.SM DOS
window is created and the command executed in that window.
If the command does not exist, the normal SunOS error message results. 
.SH FILES
.PD 0
.TP 25
.B /etc/dos/unix
Files in this directory indicate which SunOS commands are accessible from DOS.
.TP
.B /etc/dos/defaults/.quickpc
Default .quickpc file copied into user's home PC directory (~/pc) 
the first time a DOS window is started.  Not used by DOS
in this location.
.TP
.B /etc/dos/defaults/setup.pc
Default setup.pc file copied into user's home DOS directory (~/pc) the first 
time a DOS window is started.  Not used by DOS
in this location.
.TP
.B /etc/dos/defaults/boards.pc
Stores information about
.SM IBM
.SM PC/XT/AT\c
-compatible boards installed in your system.
.TP
.B /etc/dos/defaults/C:
Default drive C file copied into a user's home PC directory 
the first time a
.SM DOS
window is started.
.TP
.B ~/pc/autoexec.bat
Contains drive assignments, search paths, and other startup commands.
Searched after
.SB C:AUTOEXEC.BAT
and
.SM
.BR D:AUTOEXEC.BAT .
.TP
.SB C:AUTOEXEC.BAT
Contains commands to access system printers and special drives.
You should not need to change the
.SB AUTOEXEC.BAT
on drive C.
Put your changes in the
.SB AUTOEXEC.BAT
on drive H (in your home directory).
.SB C:AUTOEXEC.BAT
is not accessible from SunOS.
.TP
.SB D:AUTOEXEC.BAT
If an
.SB AUTOEXEC.BAT
file exists in the current directory,
.SM DOS
tries execute faster running
.SM
.BR C:AUTOEXEC.BAT .
.TP
.SB C:CONFIG.SYS
Specifies device drivers and other system parameters.
C:CONFIG.SYS is not accessible from SunOS.
.TP
.B ~/pc/setup.pc
Defines printers, standard PC devices, and drive C.
One or more of these files may exist, under various names which you assign.
.TP
.B ~/pc/.quickpc
An image of DOS as last saved with
.B dos 
.BR -s ,
including all DOS environment variables and drivers that were in effect at that time.  DOS normally reads this file at startup.
.TP
.B ~/pc/C:
A user's personal copy of drive C.
.PD
.SH DIAGNOSTICS
.TP
.B "Cannot save \fIfilename\fP quick-start file."
The 
.B dos 
command was unable to save the specified quick-start file.
Check the SAVE setting in your PC setup file (normally ~/pc/setup.pc)
Also check file access permissions on the specified quick-start file.
.TP 10
.B Cannot load \fIfilename\|\fP quick-start file.
.B dos 
was unable to read the specified quick-start file.
Check the SAVE setting in your setup.pc file.  Also check
file access permissions on the specified quick-start file.
.TP
.B "Possible software incompatibility. Unsupported 286 instruction \fIinstruction\fP at \fIaddress\|\fP."
.PD 0
.
.TP
.B Possible software incompatibility. Unsupported 386 instruction
.PD 0
.
.TP
.B Possible software incompatibility. Segment wrap.
.PD 0
.
.TP
.B Possible software incompatibility. Two-byte opcode not supported.
The application you are running was written specifically
for 80286 or 80386 machines.  Software run from a
.SM DOS
window must be compatible with 8086 systems.
.TP
.B Copying default configuration files into your home directory.
This is the first time you have run the dos command.  A
.B ~/pc
directory is being set up, and
.SM DOS\c
-related files are being copied into it.
.TP
.B "Another \s-1DOS\s0 window already has access to \fIdevice\fP\|
Your PC configuration file (normally
.BR ~/pc/setup.pc )
is requesting access to a physical device that another
.SM DOS
window is using.
.TP
.B "Port number \fInumber\fP out of range for \fIboard\fP board.
The port number specified in the
.B /etc/dos/defaults/boards.pc
is invalid.
.TP
.B "Second port number \fInumber\fP out of range for \fIboard\fP board.
The port number specified in the
.B /etc/dos/defaults/boards.pc
is invalid.
.TP
.B "\s-1IRQ\s0 value \fInumber\fP out of range for \fIboard\fP board.
The interrupt level specified in the
.B /etc/dos/defaults/boards.pc
is invalid.
.TP
.B "Interrupt level \fInumber\fP is used by DOS to support the \fIdevice\fP\|
The interrupt level specified in the
.B /etc/dos/defaults/boards.pc
conflicts with an interrupt value currently being used by either
a physical or emulated
.SM DOS
device.
.TP
.B "I/O address range \fIaddress\fP - \fIaddress\fP requested for \fIboard\fI already in use by \fIdevice\fP\|.
The address range specified in the
.B /etc/dos/defaults/boards.pc
conflicts with range currently being used by either a physical or 
emulated DOS device.
.TP
.B "Cannot share \fIdevice\fP with a hardware interrupt.
A shared device specified in the
.B /etc/dos/defaults/boards.pc
was also assigned an interrupt level in this file.  Shared
devices cannot be assigned interrupt levels.
.TP
.B "Couldn't find \fIboard\|\fP in boards.pc.
A file specified in the PC setup file (normally
.BR ~/pc/setup.pc )
is not listed in the
.B /etc/dos/defaults/boards.pc
file. Check the
.B setup.pc
file, or add an entry for the board in
.BR boards.pc .
.SH "SEE ALSO"
.BR dos2unix (1),
.BR unix2dos (1)
.LP
.I Sun386i User's Guide
.br
.I Sun386i Advanced Skills
.br
.I DOS Reference Manual
time.1v   \    tip.1c   t    toolplaces.1 c        touch.1v s.1      tput.1v       tr.1v        trace.1       
traffic.1c c      troff.1       true.1       tset./share/man/man1/dos2unix.1                                                                            755       0      12         4330  4424740646  10550                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dos2unix.1	1.9 89/03/26 SMI;
.TH DOS2UNIX 1 "19 February 1988"
.SH NAME
dos2unix \- convert text file from DOS format to SunOS format
.SH SYNOPSIS
.B dos2unix
[
.B \-iso
]
[
.B \-7
]
.I originalfile 
.I convertedfile
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX dos2unix "" "\fLdos2unix\fR \(em convert text file from DOS format to SunOS format"
.LP
.B dos2unix
removes extra carriage returns and converts end of file  characters in
.SM DOS
format text files to conform to SunOS requirements.
.LP
This command can be invoked from either
.SM DOS
or SunOS.
However, the filenames must conform to
the conventions of the environment in which the command is invoked.  
.LP
If the original file and the converted file are the same, 
.B dos2unix
will rewrite the original file after converting it.
.SH OPTIONS
.TP 
.B \-iso
Convert characters in the
.SM DOS
extended character set to the corresponding 
.SM ISO
standard characters.
.TP 
.B \-7
Convert 8 bit
.SM DOS
graphics characters to 7 bit space characters so that 
SunOS can read the file.
.SH DIAGNOSTICS
.TP
.B "File \fIfilename\fP not found, or no read permission
The input file you specified does not
exist, or you do not have read permission (check with the SunOS
.B ls \-l
command).
.TP
.B "Bad output filename \fIfilename\fP, or no write permission
The output file you specified
is either invalid, or you do not have write permission for that
file or the directory that contains it.  Check also that the drive or diskette 
is not write-protected.
.TP
.B Error while writing to temporary file
An error occurred while converting your file, possibly because 
there is not enough space on the current drive.  Check the amount of
space on the current drive using the DIR command.  Also be certain that
the default diskette or drive is write-enabled (not write-protected).
Note that when this error occurs, the original file remains intact.
.TP
.B Could not rename temporary file to \fIfilename\fP.
.PD 0
.
.TP
.B Translated temporary file name = \fIfilename\fP.
The program could not perform the final step in converting your
file. Your converted file is stored under the name indicated on the
second line of this message.
.SH SEE ALSO
.I Sun386i Advanced Skills
.br
.I DOS Reference Manual
logname.1       logout.1        look.1 .      	lookbib.1       lorder.1    ,    lpq.1 b.  <    lpr.1 rd  L    lprm.1   `    lptest.1  `  p  	  ls.1v rm    
  m4.1v te      m68k.1       mach.1     
  machid.1    ./share/man/man1/du.1v                                                                                 755       0      12         4035  4424740647   7576                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)du.1v 1.7 89/03/26 SMI; from UCB 4.3 BSD and S5
.TH DU 1V "9 September 1987"
.SH NAME
du \- display the number of disk blocks used per directory or file
.SH SYNOPSIS
.B du
[
.B \-s
]
[
.B \-a
]
[
.I filename
.B .\|.\|.
]
.SH SYSTEM V SYNOPSIS
.B du
[
.B \-s
]
[
.B \-a
]
[
.B \-r
]
[
.I filename
.B .\|.\|.
]
.SH DESCRIPTION
.IX "System V commands" "\fLdu\fR"
.IX "du command"  ""  "\fLdu\fP \(em display disk usage"
.IX display  "disk usage"
.B du
gives the number of kilobytes contained in all files and, recursively,
directories within each specified directory or file
.IR filename .
If
.I filename
is missing, 
.RB ` . '
(the current directory) is used.
.LP
A file which has multiple links to it is only counted once.
.SH SYSTEM V DESCRIPTION
The System V version of
.B du
gives the number of 512-byte blocks rather than the number of kilobytes.
.SH OPTIONS
.TP
.B \-s
Only display the grand total for each of the specified
.IR filename s.
.TP
.B \-a
Generate an entry for each file.
.LP
Entries are generated only for each directory in the absence of options.
.SH SYSTEM V OPTIONS
.TP
.B \-r
The System V version of
.B du
is normally silent about directories that cannot be read,
files that cannot be opened, etc.
The
.B \-r
option will cause
.B du
to generate messages in such instances.
.SH EXAMPLE
.LP
Here is an example of using 
.B du
in a directory.  We used the
.BR pwd (1)
command to identify the directory, then used 
.B du
to show
the usage of all the subdirectories in that directory.  The grand total
for the directory is the last entry in the display:
.RS
.ft B
.nf
% pwd
/usr/ralph/misc
% du
5	.\|/jokes
33	.\|/squash
44	.\|/tech.papers/lpr.document
217	.\|/tech.papers/new.manager
401	.\|/tech.papers
144	.\|/memos
80	.\|/letters
388	.\|/window
93	.\|/messages
15	.\|/useful.news
1211	.
%
.fi
.ft R
.RE
.SH "SEE ALSO"
.BR df (1),
.BR pwd (1),
.BR quot (8)
.SH BUGS
Filename arguments that are not directory names
are ignored, unless you use
.B \-a .
.br
If there are too many distinct linked files,
.B du
will count the excess files more than once.
ist  P    load.1 1  `    loadc.1   x    lockscreen.1  x     $ lockscreen_default.1 $       logger.1 ock      login.1        	logname.1 1       logout.1        look.1 1      	lookbib.1  .      lorder.1    ,    lpq.1 .1  <    lpr.1 q.  L    lprm.1 .  `    lptest.1 1   p  	  ls.1v .1    
  m4.1v .1      m68k.1 1      mach.1 k    
  machid.1 1       mail.1 1    ./share/man/man1/dumbplot.1g                                                                           755       0      12           67  4424740647  10736                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)dumbplot.1g 1.4 89/03/26 SMI;
o.1v       ed.1 1v       edit.1 o       egrep.1v         eject.1        else.1    0    end.1  c  @    endif.1   P    endsw.1   d    enroll.1  d  t    env.1 1       eqn.1 .1      error.1       eval.1        ex.1 1 o      exec.1 l      exit.1 1      expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1    	@    fgre./share/man/man1/e.1                                                                                   755       0      12           54  4424740647   7161                                                                                                                                                                                                                                                                                                                                                                      .so man1/ex.1
.\" @(#)e.1 1.4 89/03/26 SMI;
  ed.1 cho      edit.1 1       egrep.1v 1 o      eject.1        else.1 c  0    end.1 se  @    endif.1   P    endsw.1   d    enroll.1 .1   t    env.1 .1      eqn.1 v.      error.1       eval.1 o      ex.1 val      exec.1 1      exit.1 c      expand.1 1 1      expr.1v   	    false.1   	    
fdformat.1    	,    fg.1 mat  	@    fgrep.1v 1    	P    file./share/man/man1/echo.1v                                                                               755       0      12         3121  4424740647  10077                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)echo.1v 1.11 89/03/26 SMI; from 4.3 BSD and S5R2 6.2 9/2/83
.TH ECHO 1V "9 September 1987"
.SH NAME
echo \- echo arguments to the standard output
.SH SYNOPSIS
.B echo
[
.B \-n
]
[ 
.I argument 
.B .\|.\|.
]
.SH SYSTEM V SYNOPSIS
.B echo
.I argument 
.B .\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLecho\fR"
.IX "echo command"  ""  "\fLecho\fP \(em echo arguments"
.LP
.B echo
writes its arguments on the standard output.  Arguments must be separated by 
.SM SPACE
characters or 
.SM TAB
characters, and terminated by a
.SM NEWLINE.
.LP
.B echo
is useful for producing diagnostics in shell programs and for writing constant
data on pipes.  If you are using the Bourne shell (
.BR sh (1)),
you
can send diagnostics to the standard error file by typing: 
.RS
.B
echo .\|.\|.  1>&
.RE
.SH SYSTEM V DESCRIPTION
.LP
Note: 
If 
.B /usr/5bin
is ahead of
.B /usr/bin
in the Bourne shell's search path, its built-in 
.B echo 
command mimics the System V version of 
.B echo
as described here.
.LP
.B echo
also
understands C \-like 
escape conventions; beware of conflicts with the shell's use of 
.RB ` \e ' :
.RS
.PD 0
.TP
.B \eb
.SM BACKSPACE
.TP
.B \ec
Print line without
.SM NEWLINE
.TP
.B \ef
.SM FORMFEED
.TP
.B \en
.SM NEWLINE
.TP
.B \er
.SM RETURN
.TP
.B \et
.SM TAB
.TP
.B \ev
vertical 
.SM TAB
.TP
.B \e\e
backslash
.TP
.BI \e n
the 8-bit character whose 
.SM ASCII
code is
the 1-, 2- or 3-digit octal number
.IR n ,
which must start with a zero.
.RE
.SH OPTIONS
.TP 
.B \-n
Do not add the 
.SM NEWLINE
to the output.
.SH FILES
.PD 0
.TP 20
.B /usr/5bin
.TP
.B /usr/bin
.PD
.SH SEE ALSO
.LP
.BR sh (1)
 	install.1   
    intro.1   
(    ipcrm.1   
8    ipcs.1 8  
H    jobs.1 H  
X    join.1 X  
l    
keylogin.1   
|    kill.1 |  
    label.1   
    last.1   
    
lastcomm.1   
    ld.1  
  
    ldd.1 
  
    leave.1   
    lex.1 
       limit.1       line.1        lint.1v   0    list.1 0  @    ln.1  @  P    load.1 P  `  ./share/man/man1/ed.1                                                                                  755       0      12        72225  4424740647   7416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ed.1 1.30 89/03/26 SMI; from S5R3
.TH ED 1 "22 March 1989"
.SH NAME
ed \- basic line editor
.SH SYNOPSIS
.B ed
[
.B \-
]
[
.B \-sx
]
[
.BI \-p " string"
]
[ 
.I filename
]
.SH DESCRIPTION
.IX "ed command"  ""  "\fLed\fP \(em line editor"
.IX "text editing"  "ed command"  ""  "\fLed\fP \(em line editor"
.IX "editing text"  "ed command"  ""  "\fLed\fP \(em line editor"
.LP
.B ed
is the most basic line editor of the
.SM UNIX
system.  Although superseded by
.BR ex (1)
and
.BR vi (1)
for most purposes, 
.B ed
is still used by various system utilities.
.LP
.B ed
operates on a copy of
.IR filename ,
called a buffer, and overwrites a file only when you issue the
.B w
(write) command.
.B ed
provides line oriented editing commands to display or change lines,
to insert and delete lines from the buffer, to move or copy lines
within the buffer, or to substitute character strings within lines.
.SH OPTIONS
.TP 10
.PD 0
.B \-
.TP
.B \-s
.PD
Suppress printing of character counts (by
.BR e ,
.BR r ,
and
.B w
commands), diagnostics (by
.B e
and
.B q
commands), and the
.B !
prompt (after a
.B !
command).  Also, suppress printing the
.B ?
diagnostic before overwriting unsaved changes in the buffer.
.TP
.B \-x
Edit an encrypted file (see 
.BR crypt (1)
for details).
.TP
.BI \-p " string"
Use
.I string
as the editing prompt in command mode.
.SH USAGE
.SS Command Structure
.LP
.B ed
commands have a simple and regular structure. 
They consist of an optional
.IR address ,
or two optional
.IR address es
separated by a comma or semicolon, then a single-character
.IR command ,
which may be followed by a
.I parameter
for that 
.IR command :
.RS
.HP
.RI [ address [
.BI \|,\| address
.RI ]] \|command
.RI [ \|parameter\| ]
.br
.RE
.LP
If only one
.I address
is specified, operations are performed on that line.  If two
.IR address es
are specified,
.B ed
performs the operation on the inclusive range of lines.
Commands that requires an
.I address
use certain addresses by default, typically the address of the current
line.
.LP
For example,
.B 1,10p
means \(lqprint (display) lines 1 through 10\(rq
(two addresses),
.B 5a
means \(lqappend text after line 5\(rq (one address), and
.B d
means \(lqdelete the current line\(rq (no
address with the current line used as default).  The meaning of
.I parameter
varies for each operation \(em for the move
.RB ( m )
and transfer
.RB ( t)
operations, for instance, it is the line that the
addressed lines are to be moved to or transferred after.
For reading
.RB ( r )
and
writing
.RB ( w )
a file,
.I parameter
specifies the name of the file that is to be read or written.
.LP
.B ed
is extremely terse in its interaction with the user.
Its normal response to most problems is simply a question mark
.RB ( ? ).
This may happen when
.B ed
cannot find a specified line in the buffer,
or if a search for a regular expression fails in a substitute
.RB ( s )
command. The
.B h
command prints a somewhat more complete diagnostic for the most
recent error encountered; the
.B H
command requests that the diagnostic be printed for all errors.
.SS Addresses
.LP
Lines can be addressed in several ways:
.TP
.I nnn
By line number.
Lines in the buffer are numbered relative to
the start of the buffer.  When displayed, line numbers are not
physically present with the text of the file or buffer.
.TP
.B $
The last line of the buffer.
.TP
.B \&.
The current line.
.B ed
keeps track of the line on which you last performed an operation.
This line is called the 
.IR "current line" .
You can address this line by typing a \(lqdot\(rq character.
.TP
.BI \(+- n
By relative line number.
Address the line number that is
.I n
lines higher, or 
.I n
lines lower than the current line.
.TP
.I \(fmc
Address the line marked with the mark character
.IR c ,
which must be a lower-case letter.  Lines are marked with the
.B k
command, described below.
.TP
.BI / \s-1RE\s0 /
An
.I \s-1RE\s0
is a Regular Expression, described under
.B "Regular Expressions"
below.  When enclosed by slashes, 
.I \s-1RE\s0
addresses the first line found by searching for a matching string.
The search proceeds forward from the line following the 
current line, and wraps through the beginning of the buffer to
include all preceding lines, as well as the current line.
.TP
.BI ? \s-1RE\s0 ?
An
.I \s-1RE\s0
enclosed in question marks addresses the first line containing 
a match found by searching backward from the line preceding the current
line.  The search wraps through the end of the buffer to include
all lines following the current line (in reverse order), as well as
the current line.
.TP
.IB address \(+- n
An address followed by a plus sign
.RB (\^ + \^)
or a minus sign
.RB ( \- ),
followed by a decimal number, specifies 
that address plus or minus the indicated number of lines.
(The plus sign may be omitted.)  If the address
is omitted, the current line is used as the base.  For
example,
.RB ` 31\-3 '
addresses line 28 in the buffer.
.TP
.IB address \(+-
If an address ends with
.RB ` + '
or
.RB ` \- ',
then 1 is added to or subtracted from the address, respectively.
As a consequence of this rule and the previous rule, the address
.RB ` \- '
refers to the line preceding the current line.
(To maintain compatibility with earlier versions of
.BR ed ,
the character 
.RB ` \s+2^\s0 '
is equivalent to
.RB ` \- '.)
Trailing
.RB ` + '
and
.RB ` \- '
characters
have a cumulative effect, so
.RB ` \-\|\- '
refers to the current line, less 2.
.TP
.B ,
By itself, a comma stands for the address pair
.RB ` 1,\^$ '.
.TP
.B ;
A semicolon by itself stands for the pair
.RB ` \&.\^,\^$ '.
.IP
By default for a given command.  If you do not specify an address for a
command to operate on, a command that requires an address
supplies one by default.  This is typically the current line.
.LP
A pair of addresses separated by a comma signifies an inclusive
range of lines, and the current line is not changed unless the command
changes it.
When addresses are separated by a semicolon, however,
the current line is set to the address preceding the semicolon
before any subsequent addresses are interpreted.  This
feature can be used to determine the starting line for forward and
backward searches using
.RB ` / ',
and
.RB ` ? '.
.LP
The second address of any two-address sequence
must correspond to a line that occurs later in the buffer than
that of the first address.
.SS Regular Expressions
.LP
.B ed
supports a limited form of regular-expression notation, which
can be used in a line address to specify lines by content. 
A regular expression (\s-1RE\s0) specifies a set of character strings to
match against \(em such as \(lqany string containing
digits 5 through 9\(rq or \(lqonly lines containing uppercase letters.\(rq
A member of this set of strings is said to be
.I matched
by the regular expression.  Regular expressions or
.I patterns
are used to address lines
in the buffer (see
.B Addresses ,
above), and also for
selecting strings to be replaced using the
.B s
(substitute) command.
.LP
Where multiple matches are present in a line, a regular expression
matches the the
.I longest
of the
.I leftmost
matching strings.
.LP
Regular expressions can be built up from the following
\(lqsingle-character\(rq
.SM RE\s0's:
.TP
.I c
Any ordinary character not listed below.
An ordinary character matches itself.
.TP
.B \e
Backslash.
When followed by a special character, the
.SM RE
matches the \(lqquoted\(rq character.  A backslash followed by one of
.BR < ,
.BR > ,
.BR ( ,
.BR ) ,
.BR { ,
or
.BR } ,
represents an 
.I operator
in a regular expression, as described below.
.TP
.B \&.
Dot.
Matches any single character except
.SM NEWLINE\s0.
.TP
.B \s+2^\s0
As the leftmost character, a caret (or circumflex) constrains the
.SM RE
to match the leftmost portion of a line.  A match of this type
is called an \(lqanchored match\(rq because it is \(lqanchored\(rq
to a specific place in the line.  The
.B \s+2^\s0
character loses its special meaning if
it appears in any position other than the start of the
.SM RE\s0.
.TP
.B $
As the rightmost character, a dollar sign constrains the
.SM RE
to match the rightmost portion of a line.
The
.B $
character loses its special meaning if it appears in
any position other than at the end of the
.SM RE\s0.
.TP
.BI \s+2^\s0 \s-1RE\s0 $
The construction
.BI \s+2^\s0 \s-1RE\s0 \|$
constrains the
.SM RE
to match the entire line.
.TP
.B \e<
The sequence
.B \e<
in an
.SM RE
constrains the one-character
.SM RE
immediately following it only to match something at the
beginning of a \(lqword\(rq; that is, either at the beginning of a line,
or just before a letter, digit, or underline and after a character not
one of these.
.TP
.B \e>
The sequence
.B \e>
in an
.SM RE
constrains the one-character
.SM RE
immediately following it only to match something at the
end of a \(lqword.\(rq
.TP
.BI [ \|c\|.\|.\|.\| ]
A nonempty string of characters, enclosed in square brackets
matches any single character in the string.  For example,
.B [abcxyz]
matches any single character from the set 
.RB ` abcxyz '.
When the first character of the string is a caret 
.RB ( \s+2^\s0 ),
then the
.SM RE
matches any character
.I except
.SM NEWLINE
and those in the remainder of the string.  For example,
.RB ` [\s+2^\s045678] '
matches any character except 
.RB ` 45678 '.
A caret in any other position 
is interpreted as an ordinary character.
.TP
.BI [\|] \|c\|.\|.\|.\| ]
The right square bracket does not
terminate the enclosed string if it is the first character
(after an initial 
.RB ` \s+2^\s0 ',
if any), in the bracketed string.  In this position it is
treated as an ordinary character.
.TP
.BI [ \|l \- r\| ]
The minus sign, between two characters, indicates a range of consecutive
.SM ASCII
characters to match.  For example, the range
.RB ` [0\-9] '
is equivalent to the string
.RB ` [0123456789] '.
Such a bracketed string of characters is known as a
.IR "character class" .
The
.RB ` \- '
is treated as an ordinary character if it occurs first (or first
after an initial
.BR \s+2^\s0 )
or last in the string.  
.TP
.I d
Delimiter character.
The character used to delimit an
.SM RE
within a command is special for that command (for example, see how 
.B / 
is used in the
.B g
command, below).
.LP
The following rules and special characters allow for constructing
.SM RE\s0's
from single-character
.SM RE\s0's:
.IP
A concatenation of
.SM RE\s0's
matches a concatenation of text strings, each of which
is a match for a successive
.SM RE
in the search pattern.
.TP 
.B *
A single-character
.SM RE\s0,
followed by an asterisk
.RB ( \(** )
matches
.I zero
or more occurrences of the single-character
.SM RE\s0.
Such a pattern is called a
.IR closure .
For example,
.B [a\-z][a\-z]*
matches any string of one or more lower case letters.
.TP
.PD 0
.BR \e{ m \e}
.TP
.BR \e{ m ,\e}
.TP
.BR \e{ m , n \e}
.PD
A one-character
.SM RE
followed by
.BI \^\e{\^ m \^\e}\fR,
.BI \^\e{\^ m, \^\e}\fR,
or
.BI \^\e{\^ m,n \^\e}
is an
.SM RE
that matches a
.I range
of occurrences of the one-character
.SM RE\s0.
The values of
.I m
and
.I n
must be nonnegative integers less than 256;
.BI \^\e{\^ m \^\e}
matches
.I exactly
.I m
occurrences;
.BI \^\e{\^ m, \^\e}
matches
.I "at least"
.I m
occurrences;
.BI \^\e{\^ m,n \^\e}
matches
.I "any number"
of occurrences
.I between
.I m
and
.IR n ,
inclusively.  Whenever a choice exists, the
.SM RE
matches as many occurrences as possible.
.TP
.BR \e( .\|.\|. \e)
An
.SM RE
enclosed between the character sequences
.B \e\^(
and
.B \e\^)
matches whatever the unadorned
.SM RE
matches, but saves the
string matched by the enclosed 
.SM RE
in a numbered substring register.
There can be up to nine such substrings in an 
.SM RE\s0,
and
parenthesis operators can be nested.
.TP
.BI \e n
Match the contents of the
.IR n th
substring register from the current 
.SM RE\s0.
This provides a mechanism for extracting matched substrings.
For example, the expression
.B ^\e(..\(**\e)\e1$
matches a line consisting entirely of two adjacent non-null
appearances of the same string.
When nested parenthesized substrings are present,
.I n
is determined by counting occurrences of 
.B \e(
starting from the left.
.TP
.B /\|/
The null 
.SM RE
.RB ( /\|/ )
is equivalent to the last 
.SM RE encountered.
.SS Commands
.LP
The commands
.B a
for
.IR append ,
.B c
for
.IR change ,
and
.B i
for
.IR insert ,
allow you to add new text to the buffer.  While accepting
new text, 
.B ed
is said to be in
.IR "input mode" .
While in input mode,
.I no
commands are recognized; all character input is inserted into
the buffer.
To exit from input mode, enter a dot
.RB (\| . \|)
on a line by itself;
.B ed
then reverts to command mode.  Or,
you can interrupt
.B ed
(typically with
.SM CTRL-C\s0),
in which case it displays a
.B ?
and returns to command mode.
.LP
Commands may accept zero, one, or two addresses.
Commands that accept no addresses regard the presence
of an address as an error.  Commands that accept one or two addresses
assume default addresses when too few addresses are given;
if more addresses are given than such a command requires,
only the last ones are used.
.LP
In the following list of
.B ed
commands, the default addresses are shown in parentheses;
the parenthesized addresses are
.I not
part of the command.
.LP
It is generally illegal for more than one
command to appear on a line.  However, any command (except
.BR e ,
.BR f ,
.BR r ,
or
.BR w )
may be followed by
.BR l ,
.BR n ,
or
.B p
in which case the current line is either
listed, numbered or printed, respectively.
.TP
.RB \u\s-2( \|.\| )\s0\d\| a
.PD 0
.LP
.I text
.TP
.B \&.
.PD
Append text.
Add lines of
.I text
into the buffer after the addressed line.  The resulting current line is
the last line of input, or the addressed line if no text is entered.
Address
.B 0
is legal for this command, in which case the 
.I text
is placed at the beginning of the buffer.
The maximum number of characters per input line (from a
terminal) is 256, including the final
.SM NEWLINE\s0.
.TP
.PD 0
.RB \u\s-2( \|.\| )\s0\d\| c
.TP
.I text
.TP
.B \&.
.PD
Change lines.
Delete the addressed lines, and then accept lines of
.I text
to replace them. 
.B c
accepts one or two addresses;
the default is the current line.  The resulting current line is the last
line of input, or the line preceding the deleted lines if no text is
entered.
.TP
.RB \u\s-2( \|. \|, \|.\| )\s0\d\| d
Delete the addressed lines from the buffer. 
.B d
accepts one or two addresses;
the default is the current line.  The resulting current line is
the line following the last one deleted; if the deleted lines were
at the end of the buffer, the new last line is the resulting current
line.
.TP
.BI e " filename"
Edit a file.
Delete the entire contents of the buffer, and then read in the named
file.  The resulting current line is the last line of the buffer. 
.B e
reports the number of characters read into the buffer, and sets
.I filename
to be the current file (for use as a
default filename in subsequent commands).
If no
.I filename
is given, the current filename, if any, is used
(see the
.B f
command, below).  If
.I filename
is replaced by a shell 
.RB ( sh (1))
command prefaced with a 
.RB ` ! ',
the shell command is executed and its output is read into the
buffer after the current line.
Such a shell command is
.I not
used as the current filename. 
.B e
displays a
.B ?
if the buffer has not been written out since the last change
made \(em another
.B e
command in response to the
.B ?
forces the command to take effect.
.TP
.BI E " filename"
The
.B E
command is like
.BR e ,
except that the editor does not check for
changes to the buffer since the last
.B w
command was performed.
.TP
.BI f " filename"
Display or set the current filename.
If
.I filename
is given as an argument, the file
.RB ( f )
command changes the current filename to
.IR filename ;
otherwise, it prints the current filename.
.HP
.RB \u\s-2( \|1 \|, \|$\| )\s0\d\|
.BI g/ \s-1RE\s0 / command-list
.br
The global
.RB ( g )
command performs
.I command-list
on all lines in the range of addresses that match
.IR \s-1RE\s0 .
.B ed
executes
.I command-list
for each matching line in succession,
setting the current line to each in turn.
.I command-list
can contain a single command, or it can be continued across
input lines, with one 
.B ed
command per line, by escaping all but the last
.SM NEWLINE
with a 
.B \e
character.  Operations that place
.B ed
into input mode
.RB ( a ,
.BR i ,
and
.BR c ),
.I are
permitted in
.IR command-list ;
the final
.RB ` . '
terminating text input may be omitted if it is the
last line of the
.IR command-list . 
.BR g ,
.BR G ,
.BR v ,
and
.B V
commands, however, are
.I not
permitted.  An empty
.I command-list
is equivalent to the
.B p
command.
.HP 
.RB \u\s-2( \|1 \|, \|$\|)\s0\d\|
.BI G/ \s-1RE\s0 /
.br
The interactive
.B G
(Global) command, selects all lines that match the given
.IR \s-1RE\s0 .
Then, each selected line is made current, and any
.I one
command (other than one of the
.BR a ,
.BR c ,
.BR i ,
.BR g ,
.BR G ,
.BR v ,
and
.B V
commands) can be performed upon that line.  A 
.SM NEWLINE
acts as a null command; an
.B &
reexecutes the most recent command.
Commands entered during execution of the
.B G
command can address and affect lines other than the current line.
The
.B G
command can be terminated by an interrupt (typically 
.SM CTRL-D\s0).
.TP
.B h
Help. 
Display a short error message that explains
the reason for the most recent
.B ?
diagnostic.
.TP
.B H
Automatic printing of help diagnostics.
Toggle between printing the
.B ?
diagnostic, or automatically printing diagnostic messages as well.
.TP
.PD 0
.RB \u\s-2( \|.\| )\s0\d\| i
.TP
.I text
.TP
.B \&.
Insert Text.
.PD
Insert the given 
.I text
into the buffer, above the addressed line. 
.B i
accepts one
.IR address ;
the default is the current line.  The resulting current line is the
last line of input; if no text is input, it is the line just
before the addressed line.  This command differs from the
.I a
command only in the placement of the input text;
Address 0 is not allowed for this command.
The maximum number of characters that may be entered from a
terminal is 256 per line (including the 
.SM NEWLINE
character).
.TP
.RB \u\s-2( \|. \|, \|.+1 \|)\s0\d\| j
Join Lines. 
Remove the
.SM NEWLINE
character from between the two addressed lines.
The defaults are the current line and the line following.
If exactly one address is given, this command does nothing.
The joined line is the resulting current line.
.TP
.RB \u\s-2( \|.\| )\s0\d\| k\fIc\fR
Mark the addressed line with the name
.IR c ,
a lower-case letter.
The address-form,
.BI \(fm c\fR,
addresses the line marked by 
.IR c . 
.B k
accepts one
.IR address ;
the default is the current line.
The current line is left unchanged.
.TP
.RB \u\s-2( \|. \|, \|.\| )\s0\d\| l
List nonprinting characters.
Print the addressed lines in an unambiguous way: a few nonprinting
characters, such as
.SM TAB
and
.SM BACKSPACE
are represented by visually mnemonic overstrikes.
All other nonprinting characters are
shown in octal, with long lines folded. 
.B l
accepts one or two addresses;
the default is the current line.
The resulting current line is
the last line printed.  An
.B l
command may be appended to any command other than
.BR e ,
.BR f ,
.BR r ,
or
.BR w .
.HP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\|
.BI m address
.br
Move addressed lines to just after
.IR address .
Address 0 is legal, and moves the addressed line(s) to
the beginning of the file.  An error results if
.I address
falls within the range of lines to move. 
.B m
accepts two addresses
to specify a range of lines to move; the default
is the current line.  The resulting current line is the last of the
moved lines.
.TP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\| n
Number the displayed lines.
Print the addressed lines, preceding each with its line number and a 
.SM TAB 
character. 
.B n
accepts one or two addresses;
the default is the current line.  The resulting current line is
the last line printed.  The
.B n
command can be appended to any command other than
.BR e ,
.BR f ,
.BR r ,
or
.BR w .
.TP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\| p
Print the addressed lines. 
.B p
accepts one or two addresses;
the default is the current line.  The resulting current line is
the last line printed.  The
.B p
command may be appended to any command other than
.BR e ,
.BR f ,
.BR r ,
or
.BR w .
For example,
.B dp
deletes the current line and prints the new 
current line.
.TP
.B P
Toggle prompting on or off.  When prompting is
in effect, the editor prompts with a
.B \(**
for commands.  A subsequent
.B P
command turns prompting off.
.TP
.B q
Quit.
Exit from
.BR ed .
Note, however, that the buffer is
.I not
automatically written out; you must write any changes to be saved
with the
.B w
command;
.B ed
warns you once if you have not saved your
changes (unless the
.RB ` \- '
option is in effect).  A second
.B q
forces
.B ed
to exit regardless, destroying the buffer's contents.
.TP
.B Q
Force quit.  This is the same as
.BR q ,
but you do not get any
warning if you have not previously written out the buffer.
.B ed
simply exits.
.HP
.RB \u\s-2( \|$\| )\s0\d\|
.BI r " filename"
.br
Read in the contents of
.IR filename ,
after the addressed line.  If
.I filename
is not given, the current filename, if any, is used (see the
.B e
and
.B f
commands).  The current filename is
.I not
altered; if there is no current filename,
.I filename
becomes the current filename. 
.B r
accepts one
.IR address ;
the default is
.BR $ .
Address 0 is legal for
.BR r ,
in which case the file is read in at the beginning of the buffer.
If the read is successful, the number of characters read is typed.
The resulting current line is the last line read in from the file.
If
.I filename
is replaced by a shell 
.RB ( sh (1))
command prefaced with a 
.BR ! ,
the shell command is executed and its output is read in.
Such a shell command is
.I not
remembered as the current filename.
.HP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\|
.BI s/ \s-1RE\s0 / rs /
.PD 0
.HP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\|
.BI s/ \s-1RE\s0 / rs /g
.HP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\|
.BI s/ \s-1RE\s0 / rs / n
.br
Substitute.
.PD
Search each addressed line for the first occurrence of a string matching
the specified
.IR \s-1RE\s0 ,
and replace it with 
.IR rs ,
the replacement string.  If
.B g
(global suffix) is appended to the command, replace
.I all
(non-overlapped) matching strings in each addressed line with the
replacement string
.IR rs .
Note: the
.B g
.I suffix
is distinct from the
.B g
.IR command .
If a number
.I n
is appended, replace only the
.IR n 'th
occurrence of the matched string on each addressed line. 
.B s
accepts one or two addresses;
the default is the current line.  The resulting current line is the
last line on which a substitution is made.  An error results if
.I \s-1RE\s0
matches no strings in the addressed line or range.
Any character (other than 
.SM SPACE
or 
.SM NEWLINE
can be used instead of
.B /
to delimit
.I \s-1RE\s0
and
.IR rs .
As with
.SM RE\s0's
in addresses, you can refer to the entire string matched by
.I \s-1RE\s0
with an 
.RB ` & ';
you can refer to parenthesized substrings within 
.I \s-1RE\s0
using
.BR \e1 \|.\|.\|.\| \e\fIn.
When
.B %
is the only character in
.IR rs ,
the
.I rs
from in the most recent substitute command is used as the current
.IR rs .
The
.B %
loses its special meaning when it is
in a replacement string of more than one
character, or if it is preceded by a backslash.
.IP
A line may be split by substituting a 
.SM NEWLINE
character into it.
The 
.SM NEWLINE
in the
.I replacement
must be escaped by preceding with an
.RB ` \e '.
Such substitutions cannot be done as part of a
.B g
or
.B v
command list.
.HP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\|
.BI t address
.br
Transfer.
Transpose a copy of the addressed range of lines to
just after the given
.IR address .
.B t
(transfer) is like
.B m
(move), except that it copies of the lines,
rather than moving them. 
.B t
accepts two addresses preceding the operation letter, the current
address is the default.  The resulting current line is the last
line copied.  Address 0 is allowed.
.TP
.B u
Undo.
Reverse the effect of the most recent
command that modified the buffer.  A second
.B u
undoes the undo operation.
.HP
.RB \u\s-2( \|1 \|, \|$ \|)\s0\d\|
.BI v/ \s-1RE\s0 / command-list
.br
This command is the same as the global command
.B g
except that the
.I "command-list"
is executed
with
.RB ` . '
initially set to every line that does
.I not
match the
.SM RE\s0.
.HP 
.RB \u\s-2( \|1 \|, \|$ \|)\s0\d\|
.BI V/ \s-1RE\s0
.br
Similar to the
.B G
command, except that the lines selected are those that do
.I not
match the
.IR \s-1RE\s0 .
.HP 
.RB \u\s-2( \|1 \|, \|$ \|)\s0\d\|
.BI w " filename"
.br
Write the addressed lines to
.IR filename .
If the file does not exist,
.B ed
creates it.
The current filename is
.I not
altered; if there is no current filename, then
.I filename
becomes current.  If no
.I filename
is given, the current filename, if any, is used. 
.B w
accepts one or two addresses;
the default is all lines in the file.  The current line is unchanged.
If the command is successful, the number of characters written is
displayed.
If
.I filename
is replaced by a shell 
.RB ( sh (1))
command prefaced with a 
.RB ` ! ',
the shell command is executed with standard input taken from
the addressed lines.  Such a shell command is
.I not
remembered as the current filename.
.HP
.RB \u\s-2( \|1 \|, \|$ \|)\s0\d\|
.BI W " filename"
.br
Like
.BR w ,
but append the addressed lines onto the named file.
.TP
.B x
Encrypt the file.
.B ed
prompts for an encryption key from the standard input.
Subsequent
.BR e ,
.BR r ,
and
.B w 
commands encrypt and decrypt the text with this key (see
.BR crypt (1)).
An empty key turns off encryption.  Encryption can also be
specified on the command line with the
.B \-x
option.
.TP
.RB \u\s-2( \|$ \|)\s0\d\| =
Display the line number of the addressed line; the current line
remains unchanged.
.TP
.BI ! shell-command
Run a shell command.
.I shell-command
is a (Bourne shell) command line.
.B ed
replaces the unescaped character
.B %
with the current filename; if a
.B !
appears as the first character of the shell command,
it is replaced with the text of the previous shell command.
.RB ( !!
repeats the last shell command.)
If any such expansion is performed, the expanded line is echoed.
The current line is unchanged.
.TP
.PD 0
.I address
.TP
.SB NEWLINE
.PD
An address, alone on a line, prints the addressed line.  A 
.SM NEWLINE
alone is equivalent to
.RB ` \&.+1p ',
which is useful for stepping forward through the buffer.
.LP
If an interrupt signal (\s-1ASCII\s0
.SM DEL
or
.SM BREAK\s0)
is sent,
.B ed
prints a
.B ?
and returns to
.I its
command level.
.SS File Format Specification Support
.LP
.B ed
supports the 
.BR fspec (5)
formatting capability for displaying lines.  When the first line of a
file is a format specification of the form:
.IP
.BI <: ts\c
.RB [ \|,\|\c
.IR ts ]\|.\|.\|.\|
.BI s max :>
.LP
where
.I ts
is the column number of a tab stop and 
.I max
is the maximum line length for display purposes, and with the
terminal in
.RB ` "stty \-tabs" '
or
.RB ` "stty tab3" '
mode (see
.BR stty (1V)
for details), the indicated tab stops are used in displayed lines.
While inserting text, however, tab stops are set to every eighth
column.
.SH ENVIRONMENT
.TP 10
.SB TMPDIR
If this environment variable is set and is not null, its value is
used in place of
.B /usr/tmp
as the directory in which the temporary file is placed.
.SH FILES
.PD 0
.TP 20
.BI /usr/tmp/e #
temporary;
.I #
is the process number
.TP
.B ed.hup
file for saved work if the terminal is hung up
.PD
.SH "SEE ALSO"
.BR crypt (1),
.BR ex (1),
.BR grep (1V),
.BR sed (1V),
.BR sh (1),
.BR stty (1V),
.BR vi(1),
.BR regexp(3),
.BR fspec (5)
.LP
.TX TEXT
.SH LIMITATIONS
.LP
The following limitations apply:
.LP
.RS
.nf
512 characters per line.
256 characters per global command-list.
1024 characters per filename.
The limit on the number of lines depends on the amount of user memory:
each line takes 1 word.
.fi
.RE
.LP
When reading a file,
.B ed
discards
.SM ASCII
.SM NUL
characters and all characters after the last 
.SM NEWLINE\s0.
Files (such as executable images)
that contain characters not in the
.SM ASCII
set (bit 8 on) cannot be edited using
.BR ed .
.LP
If a file is not terminated by a
.SM NEWLINE
character,
.B ed
adds one and prints a message saying that it has done so.
.LP
If the closing delimiter of an
.SM RE
or of a
replacement string (such as
.BR / )
would be the last character before a 
.SM NEWLINE\s0,
that delimiter can be omitted, in which case the addressed line
is printed.  The following pairs of commands are equivalent:
.RS
.TP 10
.PD 0
.B s/s1/s2
.B s/s1/s2/p
.TP
.B g/s1
.B g/s1/p
.TP
.B ?s1
.B ?s1?
.PD
.RE
.SH DIAGNOSTICS
.TP
.B ?
For command errors.
.TP
.BI ? file : error
For an inaccessible file (use the
.B h
(help) and
.B H
(Help) commands for detailed explanations).
.LP
If changes have been made in the buffer since the last
.B w
command,
.B ed
issues a warning 
.B ?
when a command is given that would destroy the buffers contents.
A second
.B e
or
.B q
command at this point will take effect.
The
.RB ` \- '
and
.B \-s
command-line options inhibit this feature.
.SH CAVEATS AND BUGS
.LP
A
.B !
command cannot be subject to a
.B g
or a
.B v
command.
.LP
The sequence
.B \en
in an
.SM RE
does not match a 
.SM NEWLINE
character.
.LP
Files encrypted directly with the
.BR crypt (1)
command with the null key cannot be edited.
.LP
The encryption facilities of
.B ed
are not available on software
shipped outside the U.S.
.LP
Characters are masked to 7 bits on input.
.LP
If the editor input is coming from a command file, the editor exits at 
the first failure of a command in that file.
pecify a range of lines to move; the default
is the current line.  The resulting current line is the last of the
moved lines.
.TP
.RB \u\s-2( \|. \|, \|. \|)\s0\d\| n
Number the displayed lines.
Print the addressed lines, preceding each with its line number and a 
.SM TAB 
character. 
.B n
accepts one or two addresses;
the default is the current line.  The resu./share/man/man1/edit.1                                                                                755       0      12           60  4424740650   7651                                                                                                                                                                                                                                                                                                                                                                      .so man1/ex.1
.\" @(#)edit.1 1.7 89/03/26 SMI; 
    eject.1        else.1    0    end.1     @    endif.1   P    endsw.1   d    enroll.1  d  t    env.1 d      eqn.1       error.1       eval.1        ex.1 1        exec.1       exit.1       expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	  ./share/man/man1/egrep.1v                                                                              755       0      12           65  4424740650  10221                                                                                                                                                                                                                                                                                                                                                                      .so man1/grep.1v
.\" @(#)egrep.1v 1.7 89/03/26 SMI; 
 else.1    0    end.1     @    endif.1   P    endsw.1   d    enroll.1  d  t    env.1 d      eqn.1 d      error.1       eval.1        ex.1 1        exec.1        exit.1       expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	./share/man/man1/eject.1                                                                               755       0      12         3053  4424740650  10063                                                                                                                                                                                                                                                                                                                                                                      .\" %\&Z%%\&M% %\&I% %\&E% SMI;
.TH EJECT 1 "9 March 1989"
.SH NAME
eject \- eject floppy disk from an autoeject floppy drive
.SH SYNOPSIS
.B eject
[
.B \-d
|
.B \-f
|
.B \-n
|
.I device
|
.I nickname
]
.SH AVAILABILITY
.LP
Sun-3/80 systems only.
.SH DESCRIPTION
.IX eject "" "\fLeject\fR \(em eject floppy diskette"
.IX "floppy diskette, eject with \(em \fLeject\fR"
.IX "diskette, eject with \(em \fLeject\fR"
.LP
.B eject
is used for those removable media devices that do not have
a manual eject button.
The device may be specified by its name or by a nickname; 
if no device is specified the default device is used.
.LP
Only devices that support
.B eject
under program control respond to this command.
.LP
.B eject
can also display its default device and a list of nicknames.
.SH OPTIONS
.TP 
.B \-d
Display the name of the default device to be ejected.
.TP
.B \-f
Force the device to eject even if it is busy.
.TP
.B \-n
Display the nickname to device name translation table.
.TP
.I device
Specify which device to
.BR eject ,
by the name it appears in the directory
.BR /dev .
.TP
.I nickname
Specify which device to
.BR eject ,
by its nickname as known to this command.
.SH FILES
.PD 0
.TP 20
.B /dev/rfd0a
.PD
.SH "SEE ALSO"
.LP
.BR fd (4S)
.SH DIAGNOSTICS
.LP
A short help message is printed if an unknown flag is specified.
A diagnostic is printed
if the device name cannot be opened or does not support
.BR eject .
.SH BUGS
.LP
There ought to be a way to change the default on a per-user basis.
.\"
.\" FUTURES - add whatever devices, ie certain SCSI tapes, CDROMs
.\"
d      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g        i386.1 1       	iAPX286.1        	iapx286.1    (    
iconedit.1   8    id.1 dit  H    if.1 d.1  \    	implot.1g  (  p    indent.1  \     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1       $ input_from_defaults.1         insert_brackets.1   
    	./share/man/man1/else.1                                                                                755       0      12           72  4424740650   7657                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)else.1 1.8 89/03/26 SMI; 
1   P    endsw.1   d    enroll.1  d  t    env.1 1       eqn.1 .1      error.1       eval.1        ex.1 1 o      exec.1 l      exit.1 1      expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1    	@    fgrep.1v  	@  	P    file.1   	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1     	    
fmt_mail.1   	./share/man/man1/end.1                                                                                 755       0      12           71  4424740650   7474                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)end.1 1.8 89/03/26 SMI; 
.1   d    enroll.1  d  t    env.1 d      eqn.1 1       error.1       eval.1        ex.1 1        exec.1 o      exit.1 l      expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	./share/man/man1/endif.1                                                                               755       0      12           73  4424740650  10015                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)endif.1 1.8 89/03/26 SMI; 
1  d  t    env.1 d      eqn.1 d      error.1       eval.1        ex.1 1        exec.1        exit.1 o      expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1 ./share/man/man1/endsw.1                                                                               755       0      12           73  4424740651  10051                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)endsw.1 1.8 89/03/26 SMI; 
.1 d      eqn.1 d      error.1       eval.1        ex.1 1        exec.1        exit.1        expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption../share/man/man1/enroll.1                                                                              755       0      12           65  4424740651  10225                                                                                                                                                                                                                                                                                                                                                                      .so man1/xsend.1
.\" @(#)enroll.1 1.5 89/03/26 SMI; 
 eqn.1 d      error.1       eval.1        ex.1 1        exec.1        exit.1        expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	fore./share/man/man1/env.1                                                                                 755       0      12         1620  4424740651   7560                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)env.1 1.11 89/03/26 SMI; from S5R2 6.2
.TH ENV 1 "9 September 1987"
.SH NAME
env \- obtain or alter environment variables for command execution
.SH SYNOPSIS
.B env
[ 
.B \- 
]
[ 
.IB name = value 
\&.\|.\|.
]
[ 
.I command 
]
.SH DESCRIPTION
.IX env "" "\fLenv\fR \(em obtain or alter environment variables"
.B env
obtains the current
.BR environment ,
modifies it according to its arguments, and
executes the command with the modified environment that results.
.LP
If no 
.I command 
is specified, the resulting environment is displayed.
.SH OPTIONS
.TP 20
.B \-
Ignore the environment that would otherwise be inherited from the
current shell.  Restricts the environment for 
.I command
to that specified by the arguments.
.TP 
.IB name = value
Set the environment variable
.I filename
to
.I value
and add it to the environment.
.SH SEE ALSO
.BR sh (1),
.BR execve (2),
.BR profil (2),
.BR environ (5V)
  head.1 t  p    help.1 d      
help_viewer.1       	history.1       hostid.1    ./share/man/man1/eqn.1                                                                                 755       0      12        15174  4424740651   7604                                                                                                                                                                                                                                                                                                                                                                      '\" et
.\" @(#)eqn.1 1.26 89/03/26 SMI; 
.EQ
delim $$
.EN
.TH EQN 1 "22 March 1989"
.SH NAME
eqn, neqn, checkeq \- typeset mathematics
.SH SYNOPSIS
.B eqn
[
.BI \-d xy
] 
[
.BI \-f n
] 
[
.BI \-p n
] 
[
.BI \-s n
] 
[
.I filename
] .\|.\|.
.LP
.B neqn
[
.I filename
] .\|.\|.
.LP
.B checkeq
[
.I filename
] .\|.\|.
.SH AVAILABILITY
.LP
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "eqn command"  ""  "\fLeqn\fP \(em mathematical typesetting"
.IX "neqn command"  ""  "\fLneqn\fP \(em mathematical typesetting"
.IX "checkeq command"  ""  "\fLcheckeq\fP \(em check \fLeqn\fP constructs"
.IX "document production" eqn "" "\fLeqn\fR \(em set mathematical equations"
.LP
.B eqn
(and
.BR neqn )
are language processors to assist in
describing equations.
.B eqn
is a preprocessor for
.BR troff (1)
and is intended for devices that can print 
.BR troff 's
output.
.B neqn
is a preprocessor for
.BR nroff (1)
and is intended for use with terminals.  Usage is almost always:
.RS
.sp .5
.nf
.ft B
example% eqn \fIfilename\fP .\|.\|. | troff
example% neqn \fIfilename\fP .\|.\|. | nroff
.RE
.ft R
.fi
.LP
If no
.IR filename s
are specified, 
.B eqn
and
.B neqn
read from the standard input.
A line beginning with
.SB \&.EQ
marks the start of an equation;
the end of an equation is marked by a line beginning with
.BR \&.\s-1EN\s0 .
Neither of these lines is altered, so they may be defined in macro packages
to get centering, numbering, etc.  It is also possible to set two characters
as ``delimiters''; subsequent text between delimiters is also treated as
.B eqn
input.
.LP
.B checkeq
reports missing or unbalanced delimiters and
.SB \&.EQ/.EN
pairs.
.SH OPTIONS
.TP
.BI \-d "xy"
Set equation delimiters set to characters
.I x
and
.I y
with the command-line argument.  The more common way to do this is with
.BI delim xy
between
.SB \&.EQ
and
.BR \&.\s-1EN\s0 .
The left and right delimiters may be identical.
Delimiters are turned off by
.B delim off
appearing in the text.  All text
that is neither between delimiters nor between
.SB \&.EQ
and
.SB \&.EN
is passed through untouched.
.TP
.BI \-f "n"
Change font to
.I n
globally in the document.
The font can also be changed globally in the body of the document
by using the
.B gfont
directive.
.TP
.BI \-p "n"
Reduce subscripts and superscripts by
.I n
point sizes from the
previous size.  In the absence of the
.B \-p
option, subscripts and
superscripts are reduced by 3 point sizes from the previous size.
.TP
.BI \-s "n"
Change point size to
.I n
globally in the document.
The point size can also be changed globally in the body of the document
by using the
.B gsize
directive.
.SH "EQN LANGUAGE"
.LP
Tokens within
.B eqn
are separated by
braces, double quotes, tildes, circumflexes,
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE\s0
characters.  Braces {\|} are used for grouping;
generally speaking, anywhere a single character like
.I x
could appear, a
complicated construction enclosed in braces may be used instead. 
Tilde (\s+2\^~\^\s0) represents a full
.SM SPACE
in the output, circumflex (\s+2\^^\^\s0) half as much.
.LP
Subscripts and superscripts are produced with the keywords
.B sub
and
.BR sup .
Thus
.RB ` "x sub i" '
makes  $x sub i$ ,
.RB ` "a sub i sup 2" '
produces
$a sub i sup 2$,
and
.RB ` "e sup {x sup 2 + y sup 2}" '
gives
$e sup {x sup 2 + y sup 2}$.
.LP
Fractions are made with
.BR over :
.RB ` "a over b" '
yields
$a over b$.
.LP
.B sqrt
makes square roots:
.RB ` "1 over sqrt {ax sup 2 +bx+c}" '
results in
$1 over sqrt {ax sup 2 +bx+c}$ .
.LP
The keywords
.B from
and
.B to
introduce lower and upper
limits on arbitrary things:
$lim from {n-> inf} sum from 0 to n x sub i$
is made with
.RB ` "lim from {n\-> inf } sum from 0 to n x sub i" '.
.LP
Left and right brackets, braces, etc., of the right height are made with
.B left
and
.BR right :
.RB ` "left [ x sup 2 + y sup 2 over alpha right ] ~=~1" '
produces
$left [ x sup 2 + y sup 2 over alpha right ] ~=~1$.
The
.B right
clause is optional.  Legal characters after
.B left
and
.B right
are braces, brackets, bars,
.B c
and
.B f
for ceiling and floor,
and \fB""\fR for nothing at all (useful for a right-side-only bracket).
.LP
Vertical piles of things are made with 
.BR pile ,
.BR lpile ,
.BR cpile ,
and
.BR rpile :
.RB ` "pile {a above b above c}" '
produces
$pile {a above b above c}$.
There can be an arbitrary number of elements in a pile. 
.B lpile
left-justifies,
.B pile
and
.B cpile
center, with different vertical spacing, and
.B rpile
right justifies.
.LP
Matrices are made with
.BR matrix :
.RB ` "matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }" '
produces
$matrix { lcol { x sub i above y sub 2 } ccol { 1 above 2 } }$.
In addition, there is
.B rcol
for a right-justified column.
.LP
Diacritical marks are made with
.BR dot ,
.BR dotdot ,
.BR hat ,
.BR tilde ,
.BR bar ,
.BR vec ,
.BR dyad ,
and
.BR under :
.RB ` "x dot = f(t) bar" '
is
$x dot = f(t) bar$,
.RB ` "y dotdot bar ~=~ n under" '
is
$y dotdot bar ~=~ n under$,
and
.RB ` "x vec ~=~ y dyad" '
is
$x vec ~=~ y dyad$.
.LP
Sizes and font can be changed with
.B size
.I n
or
.B size
.BI \(+- n,
.BR roman ,
.BR italic ,
.BR bold ,
and
.BR font
.IR n .
Size and fonts can be changed globally in a document by
.B gsize
.I n
and
.B gfont
.IR n ,
or by the command-line arguments
.BI \-s n
and
.BI \-f n\fR.
.LP
Successive display arguments can be lined up.  Place
.B mark
before the desired lineup point in the first equation; place
.B lineup
at the place that is to line up vertically in subsequent equations.
.LP
Shorthands may be defined or existing keywords redefined with
.BI define :
.IP
.BI define " thing " % " replacement " %
.LP
defines a new token called
.I thing
which will be replaced by
.I replacement
whenever it appears thereafter.
The
.B %
may be any character that does not occur in
.IR replacement .
.LP
Keywords like
.B sum
.EQ
( sum ),
.EN
.B int
.EQ
( int ),
.EN
.B inf
.EQ
( inf ),
.EN
and shorthands like
.B >=
.EQ
(>=),
.EN
.B \->
.EQ
(->),
.EN
and
.B !=
.EQ
( != )
.EN
are recognized.
Greek letters are spelled out in the desired case, as in
.B alpha
or
.BR \s-1GAMMA\s0 .
Mathematical words like sin, cos,
and log are made Roman automatically.
.BR troff (1)
four-character escapes like \e(bu (\^\(bu\^) can be used anywhere.
Strings enclosed in double quotes
\fB"\fP.\|.\|.\fB"\fP
are passed through untouched;
this permits keywords to be entered as text, and can be used to communicate
with
.B troff
when all else fails.
.SH "SEE ALSO"
.BR tbl (1),
.BR troff (1),
.BR eqnchar (7),
.BR ms (7)
.LP
.TX DOCS
.SH BUGS
To embolden digits, parens, etc., it is necessary to quote them,
as in `\fBbold "12.3"\fP'.
split.1       stop.1        	strings.1       strip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 $       sum.1v 1       sun.1  1  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 H      switch.1        
switcher.1       
symorder.1       sync.1       syse./share/man/man1/error.1                                                                               755       0      12        16154  4424740651  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)error.1 1.16 89/03/26 SMI; from UCB 4.1
.TH ERROR 1 "9 September 1987"
.SH NAME
error \- categorize compiler error messages, insert at responsible source file lines
.SH SYNOPSIS
.B error
[
.B \-n
] 
[
.B \-s
] 
[
.B \-q
] 
[
.B \-v
] 
[
.B \-t
.I suffixlist
] 
.if n .ti 0.5i
[
.B \-I
.I ignorefile
] 
[
.I filename
]
.SH DESCRIPTION
.IX "error command"  ""  " \fLerror\fP \(em analyze error messages"
.IX "programming languages"  "analyze and disperse compiler error messages"
.B error
analyzes error messages produced
by a number of compilers and language
processors.  It replaces the painful,
traditional methods of scribbling
abbreviations of errors on paper,
and permits error messages and source
code to be viewed simultaneously.
.LP
.B error
looks at error messages, either from the specified file 
.I filename
or from the standard input, and:
.IP \(bu 2
Determines which language processor produced each error message.
.IP \(bu 2
Determines the file name and line number of the erroneous line.
.IP \(bu 2
Inserts the error message into the
source file immediately preceding the
erroneous line.
.LP
Error messages that can't be
categorized by language processor or content
are not inserted into any file,
but are sent to the standard output.
.B error
touches source files only after all input has been read.
.LP
.B error
is intended to be run with its standard
input connected with a pipe to the
error message source.  Some language
processors put error messages on their
standard error file; others put their
messages on the standard output.
Hence, both error sources should be piped together into
.B error.
For example, when using the 
.B csh
syntax,
.IP
.B tutorial% make \-s lint |\|& error \-q \-v
.LP
will analyze all the error messages produced by whatever programs
.BR make (1)
runs when making lint.
.LP
.B error
knows about the error messages produced by:
.BR make (1),
.BR cc (1V),
.BR cpp (1),
.BR as (1),
.BR ld (1),
.BR lint (1V),
and other compilers.
For all languages except Pascal,
error messages are restricted to one
line.  Some error messages refer to
more than one line in more than one file, in which case
.B error
duplicates the error message and inserts
it in all the appropriate places.
.SH OPTIONS
.TP 5
.B \-n
Do
.I not
touch any files; all error messages are sent to the standard
output.
.TP 5
.B \-q
.B error
asks whether the file should be touched.  A
.RB ` y '
or
.RB ` n '
to the question
is necessary to continue.  Absence of the
.B \-q
option implies that all referenced files
(except those referring to discarded
error messages) are to be touched.
.TP 5
.B \-v
After all files have been touched, overlay the visual editor
.B vi
with it set up to edit all files touched,
and positioned in the first touched file at the first error.
If
.BR vi (1)
can't be found, try
.BR ex (1)
or
.BR ed (1)
from standard places.
.TP 5
.BI \-t " suffixlist"
Take the following argument as a suffix list.
Files whose suffices do not
appear in the suffix list are not touched.
The suffix list is dot separated,
and
.RB ` * '
wildcards work.  Thus the suffix list:
.RS
.IP 
.B .c.y.f*.h
.RE
.IP
allows
.B error
to touch files ending with
.RB ` .c ',
.RB ` .y' ,
.RB ` .f* '
and
.RB ` .h '.
.TP 5
.B \-s
Print out statistics
regarding the error categorization.
.LP
.B error
catches interrupt and terminate signals, and
terminates in an orderly fashion.
.SH USAGE
.SS Action Statements
.LP
.B error
does one of six things with error messages.
.TP 1i
.B synchronize
Some language processors produce short errors describing
which file they are processing.
.B Error 
uses these to determine the file name for languages that
don't include the file name in each error message.
These synchronization messages are consumed entirely by
.B error.
.TP
.B discard
Error messages from
.B lint
that refer to one of the two
.B lint
libraries,
.B /usr/lib/lint/llib-lc
and
.B /usr/lib/lint/llib-port
are discarded, to prevent accidently touching these libraries.
Again, these error messages are consumed entirely by
.B error.
.TP
.B nullify
Error messages from
.B lint
can be nullified if they refer to a
specific function, which is known to
generate diagnostics which are not interesting.
Nullified error messages
are not inserted into the source file,
but are written to the standard output.
The names of functions to ignore are
taken from either the file named
.B .errorrc
in the user's home directory, or from the file named by the
.B \-I
option.  If the file does not exist, no error messages are nullified.
If the file does exist, there must be one function name per line.
.TP
.B not file specific
Error messages that can't be intuited are grouped together,
and written to the standard output before any files are touched.
They are not inserted into any source file.
.TP
.B file specific
Error messages that refer to a specific file but to no specific line
are written to the standard output when that file is touched.
.TP
.B true errors
Error messages that can be intuited are candidates for
insertion into the file to which they refer.
.LP
Only true error messages are inserted into source files.
Other error messages are consumed entirely by
.B error
or are written to the standard output.
.B error
inserts the error messages into
the source file on the line preceding the
line number in the error message.
Each error message is turned into a one
line comment for the language, and is
internally flagged with the string
.B ###
at the beginning of the error, and
.B %%%
at the end of the error.
This makes pattern searching for errors
easier with an editor, and allows
the messages to be easily removed. 
In addition, each error message contains
the source line number for the line
the message refers to.  A reasonably
formatted source program can be recompiled
with the error messages still in it,
without having the error messages themselves
cause future errors.  For poorly
formatted source programs in free
format languages, such as C or Pascal, it
is possible to insert a comment into
another comment, which can wreak havoc
with a future compilation.  To avoid
this, format the source program so there
are no language statements on the
same line as the end of a comment.
.SH FILES
.PD 0
.TP 20
.B ~/.errorrc
function names to ignore for 
.B lint
error messages
.TP
.B /dev/tty
user's teletype
.PD
.SH SEE ALSO
.BR as (1),
.BR cc (1V),
.BR cpp (1),
.BR csh (1),
.BR ed (1),
.BR ex (1),
.BR ld (1),
.BR lint (1V),
.BR make (1),
.BR vi (1)
.SH BUGS
.LP
Opens the tty-device directly for user input.
.LP
Source files with links make a new copy of the file with
only one link to it.
.LP
Changing a language processor's error message format
may cause 
.B error
to not understand the error message.
.LP
.B error,
since it is purely mechanical,
will not filter out subsequent errors caused by ``floodgating''
initiated by one syntactically trivial error.
Humans are still much better at discarding these related errors.
.LP
Pascal error messages belong after the lines affected,
error puts them before.  The alignment of the
.B \||\|
marking
the point of error is also disturbed by
.B error.
.LP
.B error
was designed for work on
.SM CRT 's
at reasonably high speed.
It is less pleasant on slow speed terminals, and has never been
used on hardcopy terminals.
RB ` .y' ,
.RB ` .f* '
and
.RB ` .h '.
.TP 5
.B \-s
Print out statistics
regarding the error categorization.
.LP
.B error
catches interrupt and terminate signals, and
terminates in an orderly fashion.
.SH USAGE
.SS Action Statements
.LP
.B error
does one of six things with error messages.
.TP 1i
.B synchronize
Some language processors produce short errors describing
which file they are processing.
.B ./share/man/man1/eval.1                                                                                755       0      12           72  4424740652   7660                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)eval.1 1.8 89/03/26 SMI; 
        exit.1 o      expand.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1    
     ftp.1c    
0    gcore.1   
H    gene./share/man/man1/ex.1                                                                                  755       0      12        10124  4424740652   7424                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ex.1 1.30 89/03/26 SMI;
.TH EX 1 "22 March 1989"
.SH NAME
ex, edit, e \- line editor
.SH SYNOPSIS
.LP
.B ex
[
.B \-
] [
.B \-lrRvx
] [
.BI \-t " tag"
] [
.BI \-w nnn
] [
.BI \+ command
] 
.IR filename .\|.\|.
.LP
.B edit
.RI [ " options " ]
.SH DESCRIPTION
.IX "ex command"  ""  "\fLex\fP \(em line editor"
.IX "text editing"  "ex command"  ""  "\fLex\fP \(em line editor"
.IX "editing text"  "ex command"  ""  "\fLex\fP \(em line editor"
.IX "edit command"  ""  "\fLedit\fP \(em line editor"
.IX "text editing"  "edit command"  ""  "\fLedit\fP \(em line editor"
.IX "editing text"  "edit command"  ""  "\fLedit\fP \(em line editor"
.LP
.BR  ex ,
a line editor, is the root of a family of editors that includes
.BR edit ,
.BR ex (1),
and
.BR vi (1)
(the display editor).
In most cases
.B vi
is preferred for interactive use.
.SH OPTIONS
.TP  10
.TP 
.B \-
Suppress all interactive feedback to
the user (useful for processing
.B ex
scripts in shell files).
.TP
.B \-l
Set up for editing
.SM LISP
programs.
.TP 
.B \-r
Recover the indicated 
.IR filename s
after a system crash.
.TP 
.B \-R
Read only.  Do not overwrite the original file.
.TP 
.B \-v
Start up in display editing state using
.BR vi .
You can achieve the same effect by simply typing the
.B vi
command itself.
.TP 
.B \-x
Prompt for a key to be used in encrypting the file being edited.
.TP 
.BI \-t " tag"
Edit the file containing the tag
.IR tag .
A tags database must first be created using the
.BR ctags (1) 
command.
.TP 
.BI \-w nnn
Set the default window (number of lines on your terminal) to
.I nnn 
\(em this is useful if you are dialing
into the system over a slow phone line.
.TP 
.BI \+ command
Start the editing session by executing
.IR command .
.SH ENVIRONMENT
The editor recognizes the environment variable
.SB EXINIT
as a command (or list of commands separated by 
.B |
characters) to run when it starts up.  If this variable is
undefined, the editor checks for startup commands in the file
.B ~/.exrc
file, which you must own.  However, if there is a
.B .exrc
owned by you in the current directory, the editor takes its
startup commands from this file 
\(em overriding both the 
file in your home directory and the environment variable.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/ex?.?strings
error messages
.TP
.B /usr/lib/ex?.?recover
recover command
.TP
.B /usr/lib/ex?.?preserve
preserve command
.TP
.B /etc/termcap
describes capabilities of terminals
.TP
.B \&.exrc
editor startup file for current directory 
.TP
.B \&./.exrc
user's editor startup file
.TP
.B \&~/.exrc
user's editor startup file if
.B \&./.exrc
is not found
.TP
.B /tmp/Ex\fInnnnn\fR
editor temporary file
.TP
.B /tmp/Rx\fInnnnn\fR
file named buffer temporary
.TP
.B /var/preserve
preservation directory
.PD
.SH SEE ALSO
.BR awk (1),
.BR ctags (1),
.BR ed (1),
.BR vi (1),
.BR grep (1V),
.BR sed (1V),
.BR termcap (5), 
.BR environ (5V)
.LP
.TX TEXT
.SH BUGS
All marks are lost on
lines changed and then restored
with the
.B undo
commmand,
if the marked lines were changed.
.B undo
never clears the buffer modified condition.
.LP
The
.B z
command prints a number of logical rather than physical lines.
More than a screen full of output
may result if long lines are present.
.LP
File input/output errors do not print a name if the command line
.RB ` \- '
option is used.
.LP
There is no easy way to do a single scan ignoring case.
.LP
The editor does not warn if text is
placed in named buffers and not used
before exiting the editor.
.LP
Null characters are discarded in input
files, and cannot appear in resultant
files.
.LP
With the
.B modeline
option in effect, the editor checks the
first five lines of the text file for
commands of the form
.RS
.B ex:
.IB command :
.RE
or
.RS
.B vi:
.IB command :
.RE
if any are found, the
editor executes them.  This can result
in unexpected behavior, and is not
recommended in any case.  In earlier releases,
.B modeline
was in effect by default.  Now it is not, but setting it in the
.B .exrc
file or the
.SB EXINIT
environment variable can still produce untoward effects.
.SH RESTRICTIONS
.LP
The encryption facilities of
.B ex
are not available on software
shipped outside the U.S.
-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-unget.1  p  8  q  
sccs-val.1 8  H  r  sccs.1 8  \  s  
sccsdiff.1 \  t  t  
screenblank.1 t    u  screendump.1  u    v  ./share/man/man1/exec.1                                                                                755       0      12           72  4424740652   7655                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)exec.1 1.8 89/03/26 SMI; 
.1        expr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1    
     ftp.1c    
0    gcore.1   
H    generic_args.1   
X    get.1    
p  ./share/man/man1/exit.1                                                                                755       0      12           72  4424740652   7702                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)exit.1 1.8 89/03/26 SMI; 
pr.1v   	    false.1   	    
fdformat.1   	,    fg.1 1   	@    fgrep.1v  	@  	P    file.1 @  	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1 	  	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1    
     ftp.1c    
0    gcore.1   
H    generic_args.1   
X    get.1    
p    get_selection.1 ./share/man/man1/expand.1                                                                              755       0      12         3335  4424740652  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)expand.1 1.16 89/03/26 SMI;
.TH EXPAND 1 "9 September 1987"
.SH NAME
expand, unexpand \- expand TAB characters to SPACE characters, and vice versa
.SH SYNOPSIS
.B expand
[
.I \-tabstop
] [
.I \-tab1,\|tab2,.\|.\|.,\|tabn
] [
\fIfilename\fR .\|.\|.
]
.br
.LP
.B unexpand
[
.B \-a
] [
\fIfilename\fR .\|.\|.
]
.SH DESCRIPTION
.IX "expand command"  ""  "\fLexpand\fP \(em expand tabs"
.IX "tabs, expand to spaces \(em \fLexpand\fR"
.IX "unexpand command"  ""  "\fLunexpand\fP \(em spaces to tabs"
.IX "spaces, to tabs \(em \fLunexpand\fR"
.IX convert  "tabs to spaces \fLexpand\fR"
.IX convert  "spaces to tabs \fLunexpand\fR"
.B expand
copies
.IR filename s
(or the standard input) to the standard
output, with 
.SM TAB
characters expanded to
.SM SPACE 
characters.
.SM BACKSPACE
characters are preserved into the output and decrement
the column count for 
.SM TAB
calculations.
.B expand
is useful for pre-processing character files (before sorting, looking at
specific columns, etc.) that contain 
.SM TAB
characters.
.LP
.B unexpand
copies
.IR filename s
(or the standard input) to the standard output,
putting 
.SM TAB
characters back into the data.
By default, only leading
.SM SPACE
and
.SM TAB
characters are converted to strings of
tabs, but this can be overridden by the 
.B \-a
option (see the 
.SM OPTIONS
section below).
.SH OPTIONS
.SS expand
.TP
.I \-tabstop
Specify as a single argument, sets
.SM TAB 
characters 
.I tabstop
.SM SPACE 
characters apart instead of the default 8.
.TP
.I \-tab1,\|tab2,.\|.\|.,\|tabn
Set 
.SM TAB
characters at the columns specified by 
.I tab1\fP\fB.\|.\|.
.SS unexpand
.TP
.B \-a
Insert 
.SM TAB
characters when replacing a run of
two or more
.SM SPACE
characters would produce a
smaller output file.  
creen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,    lpq.1   <    lpr.1   L    lprm.1   `    lptest.1  `  p  	  ls.1v `    
./share/man/man1/expr.1v                                                                               755       0      12        12537  4424740652  10166                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)expr.1v 1.14 89/03/26 SMI; from S5R3
.TH EXPR 1V  "22 March 1989"
.SH NAME
expr \- evaluate arguments as a logical, arithmetic, or string expression
.SH SYNOPSIS
.B expr
.IR argument .\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLexpr\fR"
.IX "expr command"  ""  "\fLexpr\fP \(em evaluate expressions"
.IX "expression evaluation"
.IX "evaluate expressions"
.LP
.B expr
evaluates expressions as specified by its arguments.
After evaluation, the result is written on the standard output.
Each token of the expression is a separate argument, so
terms of the expression must be separated by blanks.
Characters special to the shell must be escaped.
Note:
.B 0
is returned to indicate a zero value,
rather than the null string.
Strings containing blanks or other special characters should be quoted.
Integer-valued arguments may be preceded by a unary minus sign.
Internally, integers are treated as 32-bit, two's-complement numbers.
.LP
The operators and keywords are listed below.
Characters that need to be escaped are preceded by
.RB ` \e '.
The list is in order of increasing precedence,
with equal precedence operators grouped within
.B {\|}
symbols.
.TP 
.IB expr " \e\^\(bv " expr
Return the first
.I expr
if it is neither
.SM NULL
nor
.BR 0 ,
otherwise returns the second
.IR expr .
.TP 
.IB expr " \e& " expr
Return the first
.I expr
if neither
.I expr
is
.SM NULL
or
.BR 0 ,
otherwise returns
.BR 0 .
.HP 
.IR expr " {"
.BR =, " \e>" , " \e>= ,
.BR \e< , " \e<=" , " != " }
.I expr
.br
Return the result of an integer comparison if both arguments are integers,
otherwise returns the result of a lexical comparison.
.HP 
.IR expr " { "
.BR + , " \- " }
.I expr
.br
Addition or subtraction of integer-valued arguments.
.HP
.IR expr " { "
.BR \e\(** , " /" , " % " }
.I expr
.br
Multiplication, division, or remainder of the integer-valued arguments.
.TP
.IB string " : " regular-expression
.br
.ns
.TP
.BI match " string regular-expression"
The two forms of the matching operator above are synonymous.  
The matching operators
.B :
and
.B match
compare the first argument
with the second argument which must be a regular expression.
Regular expression syntax is the same as that of
.BR ed (1),
except that all patterns are \(lqanchored\(rq (treated
as if they begin with
.BR ^ )
and, therefore,
.B ^
is not a special character, in that context.
Normally, the matching operator returns the number of characters matched
.RB ( 0
on failure).  Alternatively, the
.B \e(\|.\|.\|.\|\e)
pattern symbols can be used to return a portion of the first argument.
.TP
.BI substr " string integer-1 integer-2
Extract the subtring of 
.I string
starting at position
.I integer-1
and of length
.I integer-2
characters.  If
.I integer-1
has a value greater than the length of
.IR string ,
.B expr
returns a null string.  If you try to extract more characters than there are in
.IR string ,
.B expr
returns all the remaining characters from
.IR string .
Beware of using negative values for either
.I integer-1
or
.I integer-2
as 
.B expr
tends to run forever in these cases.
.TP
.BI index " string character-list"
Report the first position in
.I string
at which any one of the characters in
.I character-list
matches a character in 
.IR string .
.TP
.BI length " string"
Return the length (that is, the number of characters) of
.IR string .
.TP
.BI (\ expr\ )
Parentheses may be used for grouping.
.SH SYSTEM V DESCRIPTION
The operators
.BR substr ,
.BR index ,
and
.BR length
are not supported.
.SH EXAMPLES
.TP
1.
.B
a=`expr\| $a\| +\| 1`
.LP
.RS
.RS
Adds 1 to the shell variable
.BR a .
.RE
.RE
.TP
2.
.B
\&#  'For $a equal to either "/usr/abc/file" or just "file"'
.br
.B
expr\  $a\  :\  '.\(**/\e(.\(**\e)'\  \e\^\(bv \ $a
.LP
.RS
.RS
Returns
the last segment of a path name
(that is, the filename part).
Watch out for
.B /
alone as an argument:
.I expr
will take it as the division operator (see
.SM BUGS
below).
.RE
.RE
.ne 6
.TP
3.
.B
\&# \ A better representation of example 2.
.br
.B
expr\  //$a\  :\  '.\(**/\e(.\(**\e)'
.LP
.RS
.RS
The addition of the
.B //
characters eliminates any ambiguity about the division operator and simplifies
the whole expression.
.RE
.RE
.TP
4.
.B
expr \ \s-1$VAR\s0 \ : \ '.\(**'
.LP
.RS
.RS
Returns the number of characters in
.BR \s-1$VAR\s0 .
.RE
.RE
.SH "SEE ALSO"
.BR ed (1),
.BR sh (1),
.BR test (1V)
.SH "EXIT CODE"
.B expr
returns the following exit codes:
.RS
.TP
0
if the expression is neither null nor
.B 0
.TP
1
if the expression
.I is
null or
.B 0
.TP
2
for invalid expressions.
.RE
.SH DIAGNOSTICS
.TP 20
.B syntax error
for operator/operand errors
.TP
.B non-numeric argument
if arithmetic is attempted on such a string
.TP
.B division by zero
if an attempt to divide by zero is made
.SH BUGS
After argument processing by the shell,
.B expr
cannot tell the difference between an operator and an operand
except by the value.
If
.B $a
is an
.BR = ,
the command:
.IP
.B "expr \ $a \ = \ '='"
.LP
looks like:
.IP
.B "expr \ = \ = \ ="
.LP
as the arguments are passed to
.B expr
(and they will all be taken as the
.B =
operator).
The following works:
.IP
.B "expr \ X$a \ = \ X="
.LP
Note: the
.BR match ,
.BR substr ,
.BR length ,
and
.B index
operators cannot themselves be used as ordinary strings.  That is, the
expression:
.RS
.nf
.ft B
example% expr index expurgatorious length
syntax error
example%
.ft R
.fi
.RE
generates the
.RB ` "syntax error" '
message as shown instead of the value
.B 1
as you might expect.
r      sysex.1       	syswait.1 1       t300.1g        t300s.1g 1g       t4013.1g     $    t450.1g   4    tabs.1v   D  ./share/man/man1/false.1                                                                               755       0      12           63  4424740653  10024                                                                                                                                                                                                                                                                                                                                                                      .so man1/true.1
.\" @(#)false.1 1.5 89/03/26 SMI; 
  fg.1 1    	@    fgrep.1v  	@  	P    file.1   	d    filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1     	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1   
     ftp.1c .  
0    gcore.1   
H    generic_args.1   
X    get.1  H  
p    get_selection.1   
    getopt.1  
  
    getoptcvt.1   
    	geto./share/man/man1/fdformat.1                                                                            755       0      12         4037  4424740653  10601                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fdformat.1	1.10 89/03/26 SMI;
.TH FDFORMAT 1 "6 March 1989"
.SH NAME
fdformat \- format diskettes for use under SunOS 
.SH "SYNOPSIS \(em Sun386i SYSTEMS"
.B fdformat
[
.B \-L
]
[
.B \-2
]
.br
.B fdformat
[
.B \-eflLv
]
[
.I device
]
.SH AVAILABLITY
.LP
Sun386i and Sun-3/80 systems only.
.SH DESCRIPTION
.IX "fdformat command" "format floppy" "\fLfdformat\fP \(em floppy format" 
.LP
.B fdformat
is a program for formatting diskettes to use with the
SunOS operating system. 
All new blank diskettes must be
formatted before use.
.B fdformat
formats and verifies each track on the diskette, and terminates if
it finds any bad sectors. 
.B fdformat
destroys all existing data on the diskette.
.LP
By default, 
.B fdformat 
formats a 1.44 megabyte high density
diskette.  
Use the
.B \-L
or
.B \-l
option to format low density diskettes.
.LP
On Sun386i systems, use the
.B \-2
option to format diskettes in the optional external 5 1/4" floppy drive.
.LP
On Sun-3/80 systems the default device is the internal floppy drive,
.BR /dev/rfd0c .
.LP
To format a diskette for use under 
.SM MS-DOS\s0,
use the 
.SM MS-DOS 
format command in a 
.SM DOS
window on the Sun386i system.
.SH OPTIONS
.TP
.B \-e
Eject the diskette when done. (Sun-3/80 systems only.)
.TP
.B \-f
Force.
Do not ask for confirmation before starting format. (Sun-3/80 systems only.)
.TP
.B \-l
Format a low density diskette (720 kilobyte) diskette. (Sun-3/80 systems only.)
.TP
.B \-L
Format a low density diskette (720 kilobyte) diskette.
.TP
.B \-v
Verify the floppy diskette after formatting. (Sun-3/80 systems only.)
.TP
.B \-2
Format a diskette in the optional external 5 1/4" floppy drive.
(Sun386i systems only.)
.SH "FILES \(em Sun386i SYSTEMS"
.PD 0
.TP 20
.B /dev/rfd0c
.B /dev/rfdl0c
.B /dev/rfd2c
.B /dev/rfdl2c
.PD
.SH "FILES \(em SPARCstation 1 SYSTEMS"
.PD 0
.TP 20
.B /dev/rfd0
.PD
.SH "SEE ALSO"
.BR dos (1),
.BR fd (4s)
.SH BUGS
.LP
The SunOS system currently does not support bad sector mapping on 
diskettes.
Therefore, a diskette is unusable if 
.B fdformat
finds an error (bad sector).
     $ mailrc_to_defaults.1 ail       
mailtool.1        make.1         man.1  l  4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 H  h    mkdir.1   x    mkstr.1       more.1        mt.1 1        mv.1 1 t      neqn.1 e      newgrp.1        nice.1       nl.1 1        nm.1 1 1       nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #  	objdump.1 H  X  $  od.1./share/man/man1/fg.1                                                                                  755       0      12           70  4424740653   7324                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)fg.1 1.8 89/03/26 SMI; 
file.1 v  	d    filemerge.1   	t    find.1 g  	    finger.1 1    	    fmt.1 .1  	    
fmt_mail.1   	    fold.1 l  	    
fontedit.1   	    	foption.1    
     	foreach.1 	  
    from.1 .  
     ftp.1c m  
0    gcore.1   
H    generic_args.1 H  
X    get.1 gs  
p    get_selection.1   
    getopt.1 .1   
    getoptcvt.1   
    	getopts.1 1   
    	gfxtool.1 
  
    ./share/man/man1/fgrep.1v                                                                              755       0      12           65  4424740655  10227                                                                                                                                                                                                                                                                                                                                                                      .so man1/grep.1v
.\" @(#)fgrep.1v 1.7 89/03/26 SMI; 
 filemerge.1   	t    find.1    	    finger.1  	  	    fmt.1     	    
fmt_mail.1   	    fold.1   	    
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1   
     ftp.1c .  
0    gcore.1   
H    generic_args.1   
X    get.1  H  
p    get_selection.1   
    getopt.1  
  
    getoptcvt.1   
    	getopts.1 
  
    	gfxtool.1 
  
    gigiplot.1g   
  ./share/man/man1/file.1                                                                                755       0      12         4014  4424740655   7713                                                                                                                                                                                                                                                                                                                                                                      .TH FILE 1  "9 September 1987"
.\" @(#)file.1 1.14 89/03/26 SMI; from S5r3
.SH NAME
file \- determine the type of a file by examining its contents
.SH SYNOPSIS
.B file
[ 
.B \-f 
.I ffile 
]
[ 
.B \-cL 
]
[ 
.B \-m
.I mfile 
]
.IR filename .\|.\|.
.SH DESCRIPTION
.IX "file command"  ""  "\fLfile\fP \(em get file type"
.IX files  "determine type of"
.B file
performs a series of tests on each 
.I filename
in an attempt to determine
what it contains.  If the contents of a file appear to be 
.SM ASCII 
text,
.B file
examines the first 512 bytes and tries to guess its language.
.LP
.B file
uses the file
.B /etc/magic
to identify files that have some sort of
.IR "magic number" ,
that is, any file containing a numeric or
string constant that indicates its type.
.SH OPTIONS
.TP
.B \-c
Check for format errors in the magic number file.
For reasons of efficiency, this validation
is not normally carried out.
No file type-checking is done under
.BR \-c .
.TP
.BI \-f " ffile"
Get a list of filenames to identify from 
.I ffile.
.TP
.B \-L
If a file is a symbolic link, test the file the link references
rather than the link itself.
.TP
.BI \-m " mfile"
Use
.I mfile 
as the name of an alternate magic number file.
.SH EXAMPLE
.LP
This example illustrates the use of 
.B file
on all the files in a
specific user's directory:
.RS
.sp .5
.nf
.ft B
example% pwd
/usr/blort/misc
example% file  *
.ft R
.fi
.TP 20
.B code:
.B mc68020 demand paged executable
.TP
.B code.c:	
.B c program text
.TP
.B counts:
.B ascii text
.TP
.B doc:
.B roff, nroff , or eqn
.B input text
.TP
.B empty.file:
.B empty
.TP
.B libz:
.B archive random library
.TP
.B memos:
.B directory
.TP
.B project:
.B symbolic link to
.B /usr/project
.TP
.B script:
.B executable shell script
.TP
.B titles:
.B ascii text
.TP
.B s5.stuff:
.B cpio archive
.TP
.B example%
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/magic
.PD
.SH SEE ALSO
.BR magic (5)
.SH BUGS
.LP
.B file
often makes mistakes.  In particular, it often suggests that command
files are C programs.
.LP
Does not recognize Pascal or 
.SM LISP.
mailtool.1 l      make.1 l       man.1 ke  4    	mc68010.1  l  H    	mc68020.1 4  X    mesg.1 .  h    mkdir.1   x    mkstr.1       more.1 t      mt.1 ore      mv.1 t.1      neqn.1 1      newgrp.1 1 1      nice.1 1      nl.1 ice      nm.1 l.1       nohup.1v ice  $  !  notify.1    4  "  nroff.1   H  #  	objdump.1 1   X  $  od.1v p.  p  %  old-clocktool.1     &  
old-compact.1     './share/man/man1/filemerge.1                                                                           755       0      12        15775  4424743604  10770                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)filemerge.1 1.5 88/02/08 SMI;
.TH FILEMERGE 1 "16 February 1987"
.SH NAME
filemerge \- window-based file comparison and merging program
.SH SYNOPSIS
.B filemerge 
[
.B \-r
] 
[
.B \-b
] 
[
.B \-l
.I listfile
] 
[
.B \-a
.I ancestor
] 
[
.I leftfile
[
.I rightfile
[
.I outfile
] 
]
]
.SH DESCRIPTION
.I Filemerge
is a window-based version of
.IR diff (1),
for comparing and merging text files.  It displays two files
for side-by-side comparison, each in a read-only text-subwindow.
Beneath them, an editing subwindow can be used to construct a
\fImerged\fP version\(em\&one which contains selected lines from
either or both input files, along with any additional edits you may
make.
.LP
.I leftfile
and
.I rightfile
are the files to be compared, and
.I outfile
is name of the file containing the merged version.  If
.I outfile
is a directory, then the output is placed in the file
.IR outfile/leftfile .
If 
.I outfile
is omitted, the output file is named
.I filemerge.out
by default.  If no filename
arguments are given, you can enter them from within the tool itself.
.SH OPTIONS
.TP
.B \-r
Readonly mode.  Don't display the editing subwindow.
.TP
.B \-b
Ignore leading blanks in comparisons.
.TP
.BI \-a " ancestor"
Compare both files with respect to
.I ancestor .
A minus-sign indicates lines that have been deleted relative to the
ancestor.  A plus-sign indicates lines added relative to the ancestor.
.TP
.BI \-l " listfile"
Process a list of filename pairs.  With this option,
.I leftfile
and
.I rightfile
are the names of directories, and
.I listfile
contains a list of filenames that appear in both.
.I filemerge
compares the versions of each file between the two
directories, and allows you to create a merged version (typically
in the directory
.IR outifile ).
The
.B
.SM SHIFT\*S\-Load
command button, which is selected by holding the 
.B
.SM SHIFT
key while clicking on the
.B Load
button, reads in the next pair named in the list.
If
.I listfile
is 
.BR \- ,
then the list of files is read from the standard input.
.SH USAGE
.LP
The text in the editing subwindow
.RI ( outfile )
is initially the same as that in
.IR leftfile .
To construct a merged version, you can directly edit the text of
.I outfile
with textedit commands, or you can change a selected difference to match
.I rightfile
(the one on the right) by clicking the \fBRight\fP button in the top
panel.
.SS Differences
At any given time, one of the displayed ``differences'' is
\fIcurrent\fP.  The current difference is indicated by emboldening the
symbol adjacent to each line, and also by the notation
``\fIi\ \fBof\ \fIn\fR\|'' displayed in the control panel.  Once a
difference is current, you can use the \fBLeft\fP and \fBRight\fP
buttons to apply either the left-hand or the right-hand version of the
text to
.IR outfile .
The
.B Next
and 
.B Prev
buttons select the next or previous difference, respectively.
.SS Property Sheet
You can customize \fIfilemerge\fP using the property sheet to
set or alter various display and control options.  To bring up
the property sheet, press the
.B Props
function key (typically
.BR L3 )
while the mouse is over any part of filemerge.
.SS "Menus"
There are pop-up menus associated with several of the control panel
items, and a menu associated with the editing subwindow.  The former
provide to select any command function obtained with a modified
mouse-button (such as 
.B
.SM SHIFT\*S\-Next\c
); the editing subwindow's menu has items that
control the filename and directory location of the merged output.  To
bring up a menu, move the mouse-cursor to the command button, or to the
editing subwindow, and hold down the right mouse-button.  Select a
desired menu item by releasing the mouse-button after moving the cursor
on top of it.
.SS "Command Buttons"
.IP \fBNext\fP 12
Make the next difference current.  The
subwindow scrolls, if necessary, to display it.
.IP \fB\s-1SHIFT-\fBNext\fP 12
Make the first difference current.  (Also a menu item from the 
.B Next
menu.)
.IP \fBPrev\fP
Make the previous difference current.
.IP \fB\s-1SHIFT\s0-Prev\fR 12
Make the last difference current.
(Also a menu item from the 
.B Prev
menu.)
.IP \fBRight\fP
Apply right-hand version of the current difference to 
.IR outfile .
If \fBautoadvance\fP is in effect, advance to the next difference.
.IP \fB\s-1SHIFT\s0-Right\fP 12
Apply the right-hand version and advance to the next difference, unless
.B autoadvance
is in effect.
(Also a menu item from the 
.B Right
menu.)
.IP \fB\s-1CTRL\s0-Right\fP
Apply the right-hand version for the current difference, and
for all subsequent differences up to the end of the file.
.IP \fBLeft\fP
Apply the left-hand version of the current difference.
.IP \fBUndo\fP
Undo the last \fBRight\fP or \fBLeft\fP operation.  You can undo
up to 100 stacked operations.  You can't undo an undo.
.IP \fB\s-1SHIFT\s0-Undo\fP 12
Undo all the operations since the last \fBLoad\fP, or the last
100 operations.
.IP \fBScroll-Lock\fP
When in effect, the three text-subwindows scroll in unison.
Otherwise each subwindow scrolls independently.
.IP "\fIi \fBof \fIn\fR"
The number of the current difference,
.IR i ,
out of
.IR n
detected differences.
Popping up a menu on this item allows you to jump
to a selected difference.
.IP \fBLoad\fP 12
Load the files whose names appear by the prompts \fBFile1:\fP
and \fBFile2:\fP.
.IP \fB\s-1SHIFT\s0-Load\fP 12
When the
.B \-l
option is used, load the files from the directories shown in
.B File1
and 
.B File2
corresponding to the next name in the list (taken from the
.I listfile
argument).
.IP \fBDone\fP
Save \fIoutfile\fP and close the tool.  The name used to save the
file appears in the namestripe, in the same fashion as textedit.
.IP \fB\s-1SHIFT\s0-Done\fP 12
Save without closing.  You can also save the merged version using
the \fBSave\fP item in the editing subwindow's menu.
.IP \fBQuit\fP
Exit the tool.  You must explictly save your merged 
.I outfile,
either with the \fBDone\fP button or the \fBSave\fP item in the
editing subwindow's menu.
.SS Properties
.LP
Hitting the
.B L3
function key brings up a property sheet that controls several
\fIfilemerge\fP parameters.  The information in the property sheet is
stored in the file
.IR ~/.filemergerc .
The property panel items have the following meanings:
.LP
.IP \fBApply\fP 12
Any changes you have made to the property sheet will now take effect.
.IP \fBReset\fP
reset the property sheet to the state it had at the time of
the last \fBApply\fP.
.IP \fBDone\fP
Close the property sheet.
.IP \fBautoadvance\fP
Advance to the next difference
after each \fBLeft\fP or \fBRight\fP operation.
.IP \fBToplines\fP
number of lines in the top two subwindows
.IP \fBBottomlines\fP
number of lines in the bottom subwindow
.IP \fBColumns\fP
number of columns in the left (and also right) subwindow
.SH FILES
.br
~/\fB.\fPfilemergerc                  file storing property sheet information
.br
.SH SEE ALSO
.br
.IR diff (1), 
.IR sdiff (1),
.IR textedit (1)
.SH BUGS
.LP
Using the \fBFind\fP function key causes the subwindows to get
out of sync for scrolling.  To resync them, turn \fBScroll-Lock\fP
first off, and then on.
 ./share/man/man1/find.1                                                                                755       0      12        17717  4424740655   7752                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)find.1 1.33 89/03/26 SMI;
.TH FIND 1  "25 March 1989"
.SH NAME
find \- find files by name, or by other characteristics
.SH SYNOPSIS
.B find
.I pathname-list  expression
.br
.B find
.I component
.SH DESCRIPTION
.IX "find command"  ""  "\fLfind\fP \(em find files"
.IX files  find
.IX "search for files"
.LP
.B find
recursively descends the directory hierarchy for each 
pathname in the 
.IR pathname-list ,
seeking files that match a logical
.I expression
written using the operators listed below.  
.LP
.B find
does 
.I not
follow symbolic links to other files or directories; it
applies the selection criteria to the symbolic links themselves,
as if they were ordinary files (see
.BR ln (1)
for a description of symbolic links).
.LP
If the 
.I fast-find
feature is enabled,
.B find
displays pathnames in which a filename
.I component
occurs.
.SH USAGE
.SS Operators
In the descriptions, the argument 
.I n
is used as a decimal integer where 
.BI + n
means more than 
.IR n ,
.BI \-  n
means less than 
.IR n ,
and 
.I n
means exactly
.IR n .
.I
.TP 15
.BI \-fstype " type"
True if the filesystem to which the
the file belongs is of type 
.IR type ,
where 
.I type
is typically
.B "4.2"
or
.BR "nfs" .
.TP
.BI \-name " filename" 
True if the 
.I filename
argument matches the current file name.
Shell argument syntax can be used if escaped (watch out for
.BR [ ", "
.BR ? " and "
.BR * ")."
.TP
.BI \-perm " onum"
True if the file permission flags exactly match the octal number 
.I onum
(see
.BR chmod (1V)).
If 
.I onum
is prefixed by a minus sign, more flag bits (017777, see
.BR chmod (1V))
become significant and the flags are compared:
.BI ( flags & onum )==\c
.IR onum .
.TP
.B \-prune
Always yields true.  Has the side effect of pruning the search
tree at the file.  That is, if the current path name is a directory,
.B find
will not descend into that directory.
.TP
.BI \-type " c"
True if the type of the file is 
.IR c ,
where 
.I c
is one of:
.RS 
.RS
.TP
.PD 0
.B b
for block special file
.B c
.PD 0
.TP
.B c
for character special file
.TP
.B d
for directory
.TP
.B f
for plain file
.TP
.B p
for named pipe (\s-1FIFO\s0)
.TP
.B l
for symbolic link
.TP
.B s
for socket
.RE
.RE
.PD
.TP 15
.BI \-links " n"
True if the file has 
.I n
links.
.TP
.BI \-user " uname"
True if the file belongs to the user 
.IR uname .
If 
.I uname
is numeric and does not appear as a login name in the
.B /etc/passwd
database, it is taken as a user 
.SM ID.
.TP
.B \-nouser
True if the file belongs to a user
.I not
in the
.B /etc/passwd
database.
.TP
.BI \-group " gname"
True if the file belongs to group 
.IR gname .
If 
.I gname
is numeric and does not appear as a login name in the
.B /etc/group
database, it is taken as a group 
.SM ID.
.TP
.B \-nogroup
True if the file belongs to a group
.I not
in the
.B /etc/group
database.
.TP
.BI \-size " n"
True if the file is 
.I n
blocks long (512 bytes per block).
If
.I n
is followed by a
.BR c ,
the size is in characters.
.TP
.BI \-inum " n"
True if the file has inode number 
.IR n .
.TP
.BI \-atime " n"
True if the file has been accessed in 
.I n
days.
.br
Note: the access time of directories in 
.I path-name-list
is changed by 
.B find
itself.
.TP
.BI \-mtime " n"
True if the file has been modified in 
.I n
days.
.TP
.BI \-ctime " n"
True if the file has been changed in 
.I n
days.
\(lqChanged\(rq means either that the file has been modified or some attribute
of the file (its owner, its group, the number of links to it, etc.) has been
changed.
.TP
.BI \-exec " command"
True if the executed 
.I command
returns a zero value as exit status.
The end of 
.I command
must be punctuated by an escaped semicolon.
A command argument 
.B {\|}
is replaced by the current pathname.
.TP
.BI \-ok " command"
Like
.B \-exec
except that the generated command is written on
the standard output, then the standard input is read
and the command executed only upon response
.BR y .
.TP
.B \-print
Always true; the current pathname is printed.
.TP
.B \-ls
Always true;
prints current pathname together
with its associated statistics.
These include (respectively) inode number,
size in kilobytes (1024 bytes),
protection mode,
number of hard links,
user,
group,
size in bytes,
and modification time.
If the file is a special file
the size field will instead contain the major and minor
device numbers.
If the file is a symbolic link the
pathname of the linked-to file is printed preceded by
.RB ` \-> '.
The format is identical to that of 
.B "ls \-gilds"
(see
.BR ls (1V)).
.br
Note: formatting is done internally,
without executing the
.B ls
program.
.TP
.BI \-cpio " device"
Always true;
write the current file on
.I device
in
.BR cpio (5)
format (5120-byte records).
.TP
.BI \-ncpio " device"
Always true;
write the current file on
.I device
in
.B cpio \-c
format (5120-byte records).
.TP
.BI \-newer " file"
True if the current file has been modified more recently than the
argument 
.IR filename .
.TP
.B \-xdev
Always true;
find does
.I not
traverse down into a file system different
from the one on which current
.I argument
pathname resides.
.TP
.B \-depth
Always true;
.B find
descends the directory hierarchy, 
acting on the entries in a directory before
acting on 
the directory itself.
This can be useful when 
.B find
is used with
.BR cpio (1)
to transfer files
that are contained in directories without 
write permission.
.TP
.BI ( expression )
True if the parenthesized 
.I expression
is true.
.br
Note: Parentheses are special to the shell and must be escaped.
.TP
.BI ! primary
True if the 
.I primary
is false 
.RB ( !
is the unary 
.I not
operator).
.HP
.I primary1
[
.B \-a
]
.I primary2
.br
True if both 
.I primary1
and 
.I primary2
are true.
The 
.B \-a
is not required.  It is implied by the juxtaposition of two 
primaries.
.HP
.IB primary1 " \-o " primary2
.br
True if either 
.I primary1
or 
.I primary2
is true
.RB "(" \-o " is the"
.I or
operator).
.SS Fast-Find
.LP
The fast-find feature is enabled by the presence of the
.B find.codes
database in
.BR /usr/lib/find .
You must be
.B root
to build or update this database by running the
.B updatedb
script in that same directory.
.SH EXAMPLE
.LP
In our local development system, we keep a file called 
.SM TIMESTAMP
in
all the manual page directories.  Here is how to find all entries that have
been updated since 
.SM TIMESTAMP
was created:
.RS
.ft B
.sp .5
.nf
example% find /usr/share/man/man2 \-newer /usr/share/man/man2/\s-1TIMESTAMP\s0 \-print
/usr/share/man/man2
/usr/share/man/man2/socket.2
/usr/share/man/man2/mmap.2
example%
.fi
.ft R
.RE
.LP
To find all the files called 
.B intro.ms
starting from the current
directory:
.RS
.sp .5
.ft B
.nf
example% find . \-name intro.ms \-print
\&.\|/manuals/assembler/intro.ms
\&.\|/manuals/sun.core/intro.ms
\&.\|/manuals/driver.tut/intro.ms
\&.\|/manuals/sys.manager/uucp.impl/intro.mss
\&.\|/supplements/general.works/unix.introduction/intro.mss
\&.\|/supplements/programming.tools/sccs/intro.mss
example%
.fi
.ft R
.RE
.LP
To recursively print all files names in the current directory and below,
but skipping 
.SM SCCS
directories:
.RS
.sp .5
.ft B
.nf
example% find . \-name \s-1SCCS\s0 \-prune \-o \-print
example%
.ft R
.fi
.RE
.LP
To recursively print all files names in the current directory and below,
skipping the contents of
.SM SCCS
directories, but printing out the
.SM SCCS
directory name:
.RS
.sp .5
.ft B
.nf
example% find . \-print \-name \s-1SCCS\s0 \-prune
example%
.fi
.ft R
.RE
.br
.ne 8
.LP
To remove files beneath your home directory named
.B a.out
or
.B *.o 
that have not been accessed for a week
and that are not mounted using
.SM NFS\s0:
.RS
.sp .5
.ft B
.nf
example% cd
example% find . \e( \-name a.out \-o \-name '*.o' \e) \-atime +7 \-exec rm {\|} \e; \-o -fstype nfs \-prune
.fi
.ft R
.RE
.SH FILES
.PD 0
.TP 20
.B /usr/lib/find/find.codes
database for fast find
.TP
.B /usr/lib/find/updatedb
script to update fast-find database
.TP
.B /usr/lib/find/code
fast-find database utilities
.TP
.B /usr/lib/find/bigram
.PD
.SH "SEE ALSO"
.BR chmod (1V),
.BR cpio (1),
.BR ln (1),
.BR ls (1V),
.BR sh (1),
.BR test (1V),
.BR cpio (5),
.BR fs (5)

1 $        su.1 s.1      sum.1v 1   ./share/man/man1/finger.1                                                                              755       0      12         7151  4424740655  10253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)finger.1 1.18 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH FINGER 1 "22 March 1989"
.SH NAME
finger \- display information about users
.SH SYNOPSIS
.B finger
[
.I options
] 
.IR name .\|.\|.
.SH DESCRIPTION
.IX  "finger command"  ""  "\fLfinger\fP \(em info on users"
.IX  users  "info on users"  users  "info on users \(em \fLfinger\fP"
.IX  login  "info on users"  login  "info on users \(em \fLfinger\fP"
.LP
By default,
.B finger
displays information about each logged-in user, including his or her:
login name, full name, terminal name (prepended with a
.RB ` \(** '
if write-permission is denied), idle time, login time, and
location (comment field in
.B /etc/ttytab
for users logged in locally, hostname for users logged in remotely)
if known.
.LP
Idle time is minutes if it is a single integer,
hours and minutes if a
.RB ' : \|'
is present, or days and hours if a
.B d
is present.
.LP
When one or more
.I name
arguments are given, more detailed information is given for each
.I name
specified, whether they are logged in or not.  A
.I name
may be a first or last name, or an account name.
Information is presented in a multi-line format, and
includes, in addition to the information mentioned above:
.RS
the user's home directory and login shell
.br
the time they logged in if they are currently logged in,
or the time they last logged in if they are not, as well as the terminal
or host from which they logged in and, if a terminal, the comment field in
.B /etc/ttytab
for that terminal
.br
the last time they received mail,
and the last time they read their mail
.br
any plan contained in the file
.B .plan
in the user's home directory
.br
and any project on which they are 
working described in the file
.B .project
(also in that directory)
.RE
.LP
If a 
.I name
argument contains an at-sign,
.RB ` @ ',
then a connection
is attempted to the machine named after the at-sign, and the remote 
finger daemon is queried.
The data returned by that daemon is printed. 
If a long format printout is to be produced,
.B finger
passes the
.B \-l
option to the remote finger daemon over the network using the
.B /W
feature of the protocol
(see
.I \s-1NAME\s0/\s-1FINGER\s0 Protocol).
.SH OPTIONS
.TP
.B \-m
Match arguments only on user name (not first or last name).
.TP
.B \-l
Force long output format.
.TP
.B \-s
Force short output format.
.TP
.B \-q
Force quick output format, which is similar to short format except that only
the login name, terminal, and login time are printed.
.TP
.B \-i
Force ``idle'' output format, which is similar to short format except that
only the login name, terminal, login time, and idle time are printed.
.TP
.B \-b
Suppress printing the user's home directory and shell in a long format
printout.
.TP
.B \-f
Suppress printing the header that is normally printed in a non-long format
printout.
.TP
.B \-w
Suppress printing the full name in a short format printout.
.TP
.B \-h
Suppress printing of the
.B .project
file in a long format printout.
.TP
.B \-p
Suppress printing of the
.B .plan
file in a long format printout.
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
who is logged in
.TP
.B /etc/passwd
for users' names
.TP
.B /var/adm/lastlog
last login times
.TP
.B /etc/ttytab
terminal locations
.TP
.B ~/.plan
plans
.TP
.B ~/.project
projects
.PD
.SH "SEE ALSO"
.BR passwd (1),
.BR w (1),
.BR who (1),
.BR whois (1)
.LP
Harrenstien, K.,
.I \s-1NAME-s0/\s-1FINGER\s0 Protocol,
1977 December 30, RFC 742.
.SH BUGS
.LP
Only the first line of the
.B .project
file is printed.
 |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c 1    `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
./share/man/man1/fmt.1                                                                                 755       0      12         4145  4424740655   7567                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fmt.1 1.21 89/03/26 SMI; from UCB 4.1
.TH FMT 1 "28 December 1987"
.SH NAME
fmt, fmt_mail \- simple text and mail-message formatters
.SH SYNOPSIS
.B fmt
[
.B \-cs
] 
[
.BI \- width
] 
[
.IR inputfile  ".\|.\|."
]
.LP
.B fmt_mail
[
.B \-cs
] 
[
.BI \- width
] 
[
.IR inputfile " .\|.\|."
]
.SH DESCRIPTION
.IX "fmt command"  ""  "\fLfmt\fP \(em simple formatter"
.IX "document production" fmt "" "\fLfmt\fR \(em simple formatter"
.LP
.B fmt 
is a simple text formatter that fills and joins lines 
to produce output lines of (up to) the number of characters
specified in the
.BI \- width
option.  The default 
.I width
is 72.
.B fmt
concatenates the
.IR inputfile s
listed as arguments.  If none are given,
.B fmt
formats text from the standard input.
.LP
Blank lines are preserved in the output, as is the spacing between
words.
.B fmt
does not fill lines beginning with `\fB.\fR', for compatibility with 
.BR nroff (1).
Nor does it fill lines starting with
.BR ` From: ' 
(but for full compatibility with
.BR mail (1),
use
.BR fmt_mail ).
.LP
Indention is preserved in the output, and input lines with differing
indention are not joined (unless
.B \-c
is used). 
.LP
.B fmt
can also be used as an in-line text filter for
.BR vi (1);
the 
.B vi
command:
.IP
.B !}fmt
.LP
reformats the text between the cursor location and the end of
the paragraph.
.LP
.B fmt_mail
is a script that formats and sends mail messages.  It leaves mail
header lines untouched, and runs the remainder of the message through
.BR "fmt -s" .
The resulting message is passed along to
.BR sendmail (8),
which routes it to the recipient.
.SH OPTIONS
.IP \fB\-c\fP
Crown margin mode. Preserve the
indention of the first two lines within a paragraph, and align the left
margin of each subsequent line with that of the second line.
This is useful for tagged paragraphs.
.TP
.B \-s
Split lines only.  Do not join short lines to form longer ones.  This
prevents sample lines of code, and other such \(lqformatted\(rq text,
from being unduly combined.
.IP \fB\-\fIwidth\fR
Fill output lines to up to 
.IR width " columns."
.SH "SEE ALSO"
.BR mail (1),
.BR nroff (1),
.BR vi (1)
1 t      mt.1 ore      mv.1 t.1      neqn.1 1      newgrp.1 1 1      nice.1 1      nl.1 ice      nm.1 l.1       nohup.1v ice  $  !  notify.1    4  "  nroff.1   H  #  	objdump.1 1   X  $  od.1v p.  p  %  old-clocktool.1     &  
old-compact.1     '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1      *  
old-perf./share/man/man1/fmt_mail.1                                                                            755       0      12           64  4424740655  10525                                                                                                                                                                                                                                                                                                                                                                      .so man1/fmt.1
.\" @(#)fmt_mail.1 1.4 89/03/26 SMI;
  
fontedit.1   	    	foption.1 	  
     	foreach.1 
   
    from.1   
     ftp.1c .  
0    gcore.1   
H    generic_args.1   
X    get.1  H  
p    get_selection.1   
    getopt.1  
  
    getoptcvt.1   
    	getopts.1 
  
    	gfxtool.1 
  
    gigiplot.1g   
    glob.1    
    goto.1 t      gprof.1       graph.1g    (    grep.1v   <    groups.1  <  P    
./share/man/man1/fold.1                                                                                755       0      12         1300  4424740655   7713                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fold.1 1.11 89/03/26 SMI; from UCB 4.1
.TH FOLD 1 "9 September 1987"
.SH NAME
fold \- fold long lines for display on an output device of a given width
.SH SYNOPSIS
.B fold
[
.BI \- width
] [
file 
\fB.\|.\|.\fP
]
.SH DESCRIPTION
.IX "fold command"  ""  "\fLfold\fP \(em fold long lines"
Fold the contents of the specified 
\fIfile\fPs,
or the standard input if no files are specified,
breaking the lines to have maximum width
.IR width .
The default for
.I width
is 80.
.I Width
should be a multiple of 8 if tabs are present, or the tabs should
be expanded using
.BR expand (1)
before using
.I fold.
.SH SEE\ ALSO
.BR expand (1)
.SH BUGS
Folding may not work correctly if underlining is present.
1        	iapx286.1    (    
iconedit.1   8    id.1 dit  H    if.1 d.1  \    	implot.1g it  p    indent.1  \     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1       $ input_from_defaults.1         insert_brackets.1   
    	install.1    
./share/man/man1/fontedit.1                                                                            755       0      12        22640  4424740656  10636                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fontedit.1 1.26 89/03/26 SMI;
.TH FONTEDIT 1 "21 December 1987"
.SH NAME
fontedit \- a vfont screen-font editor
.SH SYNOPSIS
.LP
.B fontedit
[
\fIgeneric-tool-argument\fR
] .\|.\|.
[
.I font_name
]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "fontedit command"  ""  "\fLfontedit\fP \(em font editor"
.IX edit  "fonts \(em \fLfontedit\fR"
.IX "screen fonts, edit \(em \fLfontedit\fR"
.LP
.B fontedit
is an editor for fixed-width fonts in
\fIvfont\fR
format whose characters are no taller than 24 pixels
(larger characters will not fit completely onto the screen).
For a description of
\fIvfont\fR
format, see
.BR vfont (5).
.SH OPTIONS
.IP \fIgeneric-tool-argument\fR
\fBfontedit\fP
accepts any generic tool argument as described
in
.BR sunview (1).
Otherwise, you can manipulate the tool using the Frame
Menu.
.SH COMMANDS
.LP
To edit a font, type
`\fBfontedit\fP'.
A
\fIfont_name\fP
may be supplied on the command line or
may be typed into the Control panel once the program has started.
If it exists, the
\fIfont_name\fP
file must be in
\fIvfont\fR
format.
.\"The font_name does not have to exist; however,
.\"if a file called font_name exists, it must be in
.\".I VFONT
.\"format.
When the program starts, it displays a single large window containing
four subwindows.
.\"(the layout is much like that of \fBicontool\fP\^).
From top to bottom, the four subwindows are:
.IP "1)" 4
The top subwindow, a message subwindow, displays messages, prompts, and warnings.
.IP "2)" 4
The second subwindow from the top, an Control panel,
allows you to set global parameters for the entire font and
specify operations for editing any single character.
.\"where the user performs actions that effect the whole font.
.\"Here's a brief explaination of items in the window:
The options are:
.RS
.IP "\fB(Load)\fP" 10
Load in the font specified in the file name field.
The program will warn you if you try to read over a
modified font.
.IP "\fB(Store)\fP"
Store the current font onto disk with the name in file name field.
.IP "\fB(Quit)\fP"
Quit the program; warns you if you have modified the font.
.IP "\fBFont name:\fP"
The name of the font.
.IP "\fBMax Width\fP and \fBMax Height:\fP"
The size, in pixels, of the largest
character in the font.  If you edit an
existing font, these parameters are set automatically; you must set
them if you are creating a new font.  Changing either of these values
for an existing font may alter the glyph of some characters of
the font. If the glyph size of a character is larger
than the new max size, then that character is clipped
to the new size (its bottom and right
edges are moved in). However, if
a glyph's size is smaller than the new size, the glyph is left alone.
.IP "\fBCaps Height\fP and \fBX-Height:\fP"
The distance, in pixels, between the top of a capital and lowercase letter
and the
baseline.
When an existing font is edited, the values
of
\fBCaps Height\fP
and
\fBX-Height\fP
are estimated by
\fIfontedit\fP,
and may require some adjustment.
.IP "\fBBaseline:\fP"
The number of pixels from the top (that is,
the upper left corner)
of the character to the baseline.
For an existing font, the value of the
largest baseline distance is used. For a new font, each
character will have the same baseline distance. If this
value is changed, then the baseline distance for all characters
in the font will be the new value.
.IP "\fB(Apply)\fP"
Apply the current values of
\fBMax Width\fP,
\fBMax Height\fP,
\fBCaps Height\fP,
\fBX-Height\fP,
and
\fBBaseline\fP
to the font.
That is, changes made to these values
do not take effect until
\fBApply\fP
is selected.
.br
.ne 8
.IP "\fBOperation:\fP"
This is a list of drawing and editing operations
that you can perform on a character. For drawing, the
left mouse button draws in black, and the middle draws
in white.  Operations are:
.RS
.IP "\fBSingle Pt\fP" 10
Press a mouse button down and a grey cell
will appear; move the mouse and the
cell will follow it. Releasing the
the button will draw.
.IP "\fBPt Wipe\fP"
Pressing a button down will draw and
moving with the button down will
continue drawing until the button
is released.
.IP "\fBLine\fP"
Button down marks the end point of a
line; moving with the button down
rubber bands a line; releasing button
draws the line.
.IP "\fBRect\fP"
Like \fBLine\fP except draws a rectangle.
.IP "\fBCut\fP"
Button down marks one end of rectangle,
and moving rubber bands the outline
of the rectangle. Button up places the
contents of the rectangle into a
buffer and then ``cuts'' (draws in white)
the rectangular region from the character.  The
\fBPaste\fP
operation
(below) gets the data from the buffer.
.IP "\fBCopy\fP"
Like
\fBCut\fP
except that the region is
just copied; no change is made to the character.
.IP "\fBPaste\fP"
Button down displays a rectangle the
size of the region in the buffer.
Moving with the button down moves the
rectangle. Button up pastes the
contents of the buffer into the character.
.br
The contents of the
\fBpaste\fP
buffer cannot be transferred
between tools.
.br
In
\fBCopy\fP
or
\fBCut\fP
mode, holding down the shift key
while pressing the left or middle mouse button will perform a
\fBPaste\fP
action. For best results, after placing a region
in the buffer, press down the shift key and hold it down, then
press down the mouse button. Release the mouse key to paste the
region and then release the shift key.
.RE
.RE
.IP "3)" 4
The third subwindow echoes the characters in the current font as they
are typed. Note that the cursor must be in this window in order to see
the characters. Your character delete key will delete the echoed characters.
.IP "4)" 4
The bottom subwindow, the editing subwindow, displays eight
smaller squares at its top;
these are called
\fBedit buttons\fP.
The top section of each of these
buttons contains a line of text in the
form
\fInnn: c\fP,
where
\fInnn\fP
is the hexadecimal number of the character and
\fIc\fP
is the standard
.SM ASCII
character corresponding to that number.  In the lower section of
the button the character of the current font, if it exists, is displayed.
.\"Pressing the mouse button down just hi-lights the button;
.\"to edit a character, the mouse button must be released over the button.
Clicking once over an editing button
selects its character for editing.
.RS
.LP	
Just below this row of buttons is a box with the characters
``0  9 A  Z a  z'' in it. This box is called a
\fBslider\fP.
The slider allows you to scroll around in the font and select
which section of the font you want displayed in the edit buttons.
The black rectangle  near ``a'' is an
indicator which shows the section of the font that is displayed in
the buttons above. To move the indicator, select it by pressing the
left or middle mouse button down over the indicator
and then move the mouse to the left or right with
the button down; the indicator will slide along with the cursor.
Releasing the button selects the new section of
the font.  A faster method of moving about in the font is to
just press down and release the mouse button above the area you
want without bothering to drag the indicator.
Another method of scrolling through the characters of the font is
to press a key on the keyboard when the cursor is in the bottom
window; that character is the first one displayed in the
edit buttons.
.RE
.SH "EDITING CHARACTERS:"
.LP
To edit a character, click once over the edit button where the character
is displayed.  When you do this, an edit pad will appear in the bottom
subwindow.
.LP
The edit pad consists of an editing area bordered by scales, a
proof area, and 3 command buttons.
The editing area is
\fBMax Width\fP
by
\fBMax Height\fP
when the
pad opens, and displays a magnified view of the selected character.
Black squares indicate foreground pixels.
The editing area is surrounded by scales which show the current
\fBCaps Height\fP,
\fBX-Height\fP
and
\fBBaseline\fP
in reverse video.
.LP
Just outside the scales, on the top,
right side, and bottom of the pad,
are three small boxes with the capital
letters "R", "B", and "A" in them.
These boxes are movable sliders that
change the right edge, bottom edge,
and x-axis advance of the character
respectively. In a fixed-width font, these
values are usually the same for all characters; however, in a
variable-width font these controls can be
used to set these properties for
each character.
.LP
To the right of the pad is the proof area
where the character is displayed at normal (that is, screen)
resolution and three buttons.  The three buttons are:
.RS
.IP "\fBUndo\fP" 7
Clicking the left or middle mouse button undoes the last operation.
.IP "\fBStore\fP"
Stores the current representation of the character in the font.
.IP "\fBQuit\fP"
Closes the edit pad.
.RE
.LP
In the bottom subwindow, the right
mouse button displays a menu of operations.
These operations are the same as
those in the control panel discussed above;
you can select the current
operation by either picking the operation
in the control panel or by
selecting the appropriate menu with
the right button of the mouse. When the
cursor is in the other subwindows, the
right button displays the standard tool
menu.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/fonts/fixedwidthfonts
Sun-supplied screen fonts
.PD
.SH SEE ALSO
.BR sunview (1),
.BR vswap (1),
.BR vfont (5)
.SH BUGS
.LP
Results are unpredictable with variable-width fonts.
The baseline should be greater than 0 or else the font cannot be read in
by
.B fontedit
or by
.BR sunview (1).
1  1  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 H./share/man/man1/foption.1                                                                             755       0      12         3437  4424740656  10463                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)foption.1 1.8 89/03/26 SMI;
.TH FOPTION 1 "8 December 1987"
.SH NAME
foption \- determine available floating-point code generation options
.SH SYNOPSIS
.B foption
[
.BI \-f type
]
.SH DESCRIPTION
.IX  foption  ""  "\fLfoption\fP \(em determine available floating-point code generation options"
.IX  floating-point
.LP
.B foption
has two uses on Sun-2 and Sun-3 systems.  
Its action is undefined on Sun-4 systems since there are no floating-point
code generation options.
.LP
Called without an argument, it sends
a string to standard output which is the compiler floating-point option
corresponding to the type of floating-point hardware
that would be used by a program compiled with 
.BR \-fswitch .
Exit status is undefined.
This usage is intended for interactively determining available 
floating-point hardware.  On Sun-2 or Sun-3 systems without floating-point hardware,
the result would be
.RS
.sp .5
.nf
.ft B
example% foption
soft
.ft R
.fi
.RE
.LP
corresponding to the compiler option 
.BR \-fsoft .
.LP
Called with an argument which is one of the compiler floating-point options 
.BR \-ffpa ,
.BR \-f68881 ,
.\".BR \-fsky ,
.BR \-fsoft ,
or
.BR \-fswitch ,
it produces no output but returns
exit status 0 (true) if a program compiled with that option could execute
on this machine, and status 1 (false) otherwise.  
Thus
.B "foption \-fsoft"
and
.B "foption \-fswitch"
always produce exit status 0.
This usage is intended for shell scripts and Makefiles that, for instance,
select different executable files or link with different libraries according
to the floating-point hardware present.
.SH OPTIONS
.TP 6
.BI \-f type
Return exit status 0 if a program compiled 
.BI \-f type 
could execute on this machine.
.SH "SEE ALSO"
.BR cc (1V),
.\".BR skyversion (8),
.BR fpaversion (8),
.BR mc68881version (8)
  mail.1 1     $ mailrc_to_defaults.1 $        
mailtool.1 l      make.1 l       man.1 ke  4    	mc68010.1  l  H    	mc68020.1 4  X    mesg.1 .  h    mkdir.1   x    mkstr.1   ./share/man/man1/foreach.1                                                                             755       0      12           75  4424740656  10347                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)foreach.1 1.8 89/03/26 SMI; 
c m  
0    gcore.1   
H    generic_args.1 H  
X    get.1 gs  
p    get_selection.1   
    getopt.1 .1   
    getoptcvt.1   
    	getopts.1 1   
    	gfxtool.1 1   
    gigiplot.1g   
    glob.1 t  
    goto.1 b      gprof.1       graph.1g .1   (    grep.1v   <    groups.1 1v   P    
hashstat.1    `    head.1 t  p    help.1 d      
help_viewer.1       	./share/man/man1/from.1                                                                                755       0      12         1332  4424740656   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)from.1 1.14 89/03/26 SMI; from UCB 4.1
.TH FROM 1 "22 March 1989"
.SH NAME
from \- display the sender and date of newly-arrived mail messages
.SH SYNOPSIS
.B from
[
.BI \-s " sender"
] [
.I username
]
.SH DESCRIPTION
.IX "from command"  ""  "\fLfrom\fP \(em who is mail from"
.IX "mail services"  "who is mail from \(em \fLfrom\fR"
.LP
.B from
prints out the mail header lines in your mailbox file to show you
who your mail is from.  If 
.I username
is specified, then 
.IR username 's
mailbox is examined instead of your own.
.SH OPTIONS
.TP 15
.BI \-s " sender"
Only display headers for mail sent by 
.IR sender .
.SH FILES
.PD 0
.TP 20
.B /var/spool/mail/*
.PD
.SH "SEE ALSO"
.BR biff (1),
.BR mail (1),
.BR prmail (1)
p    indent.1  .1     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1  1      $ input_from_defaults.1         insert_brackets.1   
    	install.1   
    intro.1   
(    ipcrm.1   
8    ipcs.1 r  
H    jobs.1 s  
X    join./share/man/man1/ftp.1c                                                                                755       0      12        57732  4424740656   7770                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ftp.1c 1.30 89/03/26 SMI; from UCB 4.3
.TH FTP 1C "15 January 1988"
.SH NAME
ftp \- file transfer program
.SH SYNOPSIS
.B ftp
[ 
.B \-dgintv
] 
[
.I hostname
]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "ftp command"  ""  "\fLftp\fP \(em file transfer"
.IX files  transfer
.IX "file transfer protocol"  "ftp command"  ""  "\fLftp\fP command"
.LP
.B ftp
is the user interface to the
.SM ARPANET
standard File Transfer Protocol (\s-1FTP\s0).
.B ftp
transfers files to and from a remote network site.
.LP
The client host with which 
.B ftp
is to communicate may be specified on the command line.
If this is done,
.B ftp
immediately attempts to establish a connection to an
.SM FTP
server on that host;
otherwise, 
.B ftp
enters its command interpreter and awaits instructions
from the user.  When 
.B ftp
is awaiting commands from the user, it
displays the prompt
.RB ` ftp> '.  
.SH OPTIONS
Options may be specified at the command line, or to the 
command interpreter.
.TP
.B \-d
Enable debugging.
.TP
.B \-g
Disable filename \(lqglobbing.\(rq
.TP
.B \-i
Turn off interactive prompting during multiple file transfers.
.TP
.B \-n
Do not attempt \(lqauto-login\(rq upon initial connection.
If auto-login is enabled, 
.B ftp
checks the
.B \&.netrc
file in the user's home directory for an entry describing
an account on the remote machine.  If no entry exists,
.B ftp
will prompt for the login name of the account on the remote machine (the
default is the login name on the local machine), and, if necessary, prompts
for a password and an account with which to login.
.TP
.B \-t
Enable packet tracing (unimplemented).
.TP
.B \-v
Show all responses from the remote server, as well
as report on data transfer statistics.  This is turned on by
default if
.B ftp
is running interactively with its input coming from the user's terminal.
.SH COMMANDS
.HP
.B \&!
.RI [ " command " ]
.br
Run
.I command
as a shell command on the local machine.
If no 
.I command
is given, invoke an interactive shell.
.HP
.BI \&$ " macro-name"
.RI [ " args " ]
.br
Execute the macro
.I macro-name
that was defined with the
.B macdef
command.
Arguments are passed to the macro unglobbed.
.HP
.B account
.RI [ " passwd " ]
.br
Supply a supplemental password required by a remote system for access
to resources once a login has been successfully completed.
If no argument is included, the user will be prompted for an account
password in a non-echoing input mode.
.HP
.BI append " local-file"
.RI [ " remote-file " ]
.br
Append a local file to a file on the remote machine.  If
.I remote-file
is left unspecified, the local file name is used in naming the
remote file after being altered by any
.B ntrans
or
.B nmap
setting.
File transfer uses the current settings for
\(lqrepresentation type\(rq, \(lqfile structure\(rq,
and \(lqtransfer mode\(rq.
.TP
.B ascii
Set the \(lqrepresentation type\(rq
to \(lqnetwork
.SM ASCII\s0\(rq.
This is the default type.
.TP
.B bell
Sound a bell after each file transfer
command is completed.
.TP
.B binary
Set the \(lqrepresentation type\(rq to \(lqimage\(rq.
.TP
.B bye
Terminate the
.SM FTP
session with the remote server and exit
.BR ftp .
An
.SM EOF
will also terminate the session and exit.
.TP
.B case
Toggle remote computer file name case mapping during
.B mget
commands.
When
.B case
is on (default is off), remote computer
file names with all letters in
upper case are written in the
local directory with the letters mapped
to lower case.
.TP
.BI cd " remote-directory"
Change the working directory on the remote machine to 
.IR remote-directory .
.TP
.B cdup
Change the remote machine working directory to the parent of the
current remote machine working directory.
.TP
.B close
Terminate the 
.SM FTP
session with the remote server, and
return to the command interpreter.
Any defined macros are erased.
.TP
.B cr
Toggle
.SM RETURN
stripping during \(lqnetwork
.SM ASCII\s0\(rq
type file retrieval.
Records are denoted by a
.SM RETURN/LINEFEED
sequence during \(lqnetwork
.SM ASCII\s0\(rq
type file transfer.
When
.B cr
is on (the default),
.SM RETURN
characters are stripped from this
sequence to conform with the
.SM UNIX
system single
.SM LINEFEED
record delimiter.
Records on non-\s-1UNIX\s0-system remote hosts may contain single
.SM LINEFEED
characters; when an \(lqnetwork
.SM ASCII\s0\(rq
type transfer is made, these
.SM LINEFEED
characters may be
distinguished from a record delimiter only when
.B cr
is off.
.TP
.BI delete " remote-file"
Delete the file
.I remote-file
on the remote machine.
.HP
.B debug
.RI [ " debug-value " ]
.br
Toggle debugging mode. 
If an optional
.I debug-value
is specified it is used to set the debugging level.
When debugging is on,
.B ftp
prints each command sent to the remote machine, preceded
by the string
.RB ` --> '.
.HP
.B dir
.RI [ " remote-directory " "] [ " local-file " ]"
.br
Print a listing of the directory contents in the
directory,
.IR remote-directory ,
and, optionally, placing the output in
.IR local-file .
If no directory is specified, the current working
directory on the remote machine is used.  If no local
file is specified, or
.I local-file
is
.RB ` \- ',
output is sent to the terminal.
.TP
.B disconnect
A synonym for
.BR close .
.HP
.B form
.RI [ " format-name " ]
.br
Set the carriage control format subtype of the
\(lqrepresentation type\(rq to
.IR format-name .
The only valid
.I format-name
is
.BR non-print ,
which corresponds to the default \(lqnon-print\(rq subtype.
.HP
.BI get " remote-file"
.RI [ " local-file " ]
.br
Retrieve the 
.I remote-file
and store it on the local machine.  If the local
file name is not specified, it is given the same
name it has on the remote machine, subject to
alteration by the current
.BR case ,
.BR ntrans ,
and
.B nmap
settings.
The current settings for \(lqrepresentation type\(rq,
\(lqfile structure\(rq, and \(lqtransfer mode\(rq
are used while transferring the file.
.TP
.B glob
Toggle filename expansion, or \(lqglobbing\(rq,  
for
.BR mdelete ,
.B mget
and
.BR mput .
If globbing is turned off, filenames are taken literally.
.IP
Globbing for
.B mput
is done as in
.BR csh (1).
For
.B mdelete
and
.BR mget ,
each remote file name is
expanded separately on the remote machine, and the lists are not merged.
.IP
Expansion of a directory name is likely to be radically
different from expansion of the name of an ordinary file:
the exact result depends on the remote operating system and
.SM FTP
server, and can be previewed by doing
.RB ` "mls\ \fIremote-files\fP\ \-" '.
.IP
.B mget
and 
.B mput
are not meant to transfer
entire directory subtrees of files.  You can do this by
transferring a
.BR tar (1)
archive of the subtree (using a
\(lqrepresentation type\(rq of \(lqimage\(rq as set by the
.B binary
command).
.TP
.B hash
Toggle hash-sign 
.RB ( # )
printing for each data block transferred.
The size of a data block is 1024 bytes.
.HP
.B help
.RI [ " command " ]
.br
Print an informative message about the meaning of
.IR command .
If no argument is given, 
.B ftp
prints a list of the known commands.
.HP
.B lcd
.RI [ " directory " ]
.br
Change the working directory on the local machine.
If no 
.I directory
is specified, the user's home directory is used.
.HP
.B ls
.RI [ " remote-directory " "] [" " local-file " ]
.br
Print an abbreviated listing of the contents of a
directory on the remote machine.  If
.I remote-directory
is left unspecified, the current working directory
is used.  If no local file is specified, 
or if
.I local-file
is
.RB ` \- ',
the output is sent to the terminal.
.TP
.BI macdef " macro-name"
Define a macro.
Subsequent lines are stored as the macro
.IR macro-name ;
a null line (consecutive
.SM NEWLINE
characters in a file or
.SM RETURN
characters from the terminal) terminates macro input mode.
There is a limit of 16 macros and 4096 total characters in all
defined macros.
Macros remain defined until a
.B close
command is executed.
.IP
The macro processor interprets
.RB ` $ '
and
.RB ` \e '
as special characters.
A
.RB ` $ '
followed by a number (or numbers) is replaced by the
corresponding argument on the macro invocation command line.
A
.RB ` $ '
followed by an
.RB ` i '
signals that macro processor that the
executing macro is to be looped. On the first pass
.RB ` $i '
is replaced by the first argument on the macro invocation command line,
on the second pass it is replaced by the second argument, and so on.
A
.RB ` \e '
followed by any character is replaced by that character.
Use the
.RB ` \e '
to prevent special treatment of the
.RB ` $ '.
.HP
.B mdelete
.RI [ " remote-files " ]
.br
Delete the
.I remote-files
on the remote machine.
.TP
.BI mdir " remote-files local-file"
Like
.BR dir ,
except multiple remote files may be specified.
If interactive prompting is on,
.B ftp
will prompt the user to verify that the last argument is indeed the
target local file for receiving
.B mdir
output.
.TP
.BI mget " remote-files"
Expand the
.I remote-files
on the remote machine and do a
.B get
for each file name thus produced.
See
.B glob
for details on the filename expansion.
Resulting file names will then be processed according to
.BR case ,
.BR ntrans ,
and
.B nmap
settings.
Files are transferred into the local working directory,
which can be changed with
.RB ` "lcd\ \fIdirectory\fP" ';
new local directories can be created with
.RB ` "!\ mkdir\ \fIdirectory\fP" '.
.TP
.BI mkdir " directory-name"
Make a directory on the remote machine.
.TP
.BI mls " remote-files local-file"
Like
.BR ls (1V),
except multiple remote files may be specified.
If interactive prompting is on,
.B ftp
will prompt the user to verify that the last argument is indeed the
target local file for receiving
.B mls
output.
.HP
.B mode
.RI [ " mode-name " ]
.br
Set the \(lqtransfer mode\(rq to
.IR mode-name .
The only valid
.I mode-name
is
.BR stream ,
which corresponds to the default \(lqstream\(rq mode.
.TP
.BI mput " local-files"
Expand wild cards in the list of local files given as arguments
and do a
.B put
for each file in the resulting list.
See
.B glob
for details of filename expansion.
Resulting file names will then be processed according to
.B ntrans
and
.B nmap
settings.
.br
.ne 6
.HP
.B nmap
.RI [ " inpattern outpattern " ]
.br
Set or unset the filename mapping mechanism.
If no arguments are specified, the filename mapping mechanism is unset.
If arguments are specified, remote filenames are mapped during
.B mput
commands and
.B put
commands issued without a specified remote target filename.
If arguments are specified, local filenames are mapped during
.B mget
commands and
.B get
commands issued without a specified local target filename.
.IP
This command is useful when connecting to a non-\s-1UNIX\s0-system
remote host with different file naming conventions or practices.
The mapping follows the pattern set by
.I inpattern
and
.IR outpattern .
.I inpattern
is a template for incoming filenames (which may have already been
processed according to the
.B ntrans
and
.B case
settings).
Variable templating is accomplished by including the sequences
.BR $1 ,
.BR $2 ", .\|.\|.\|, " $9
in
.IR inpattern .
Use
.B \e
to prevent this special treatment of the
.B $
character.
All other characters are treated literally, and are used to determine the
.B nmap
.I inpattern
variable values.
.IP
For example, given
.I inpattern
.B $1.$2
and the remote file name
.BR mydata.data ,
.B $1
would have the value \(lqmydata\(rq, and
.B $2
would have the value \(lqdata\(rq.
.IP
The
.I outpattern
determines the resulting mapped filename.
The sequences
.BR $1 ,
.BR $2 ", .\|.\|.\|, " $9
are replaced by any value resulting from the
.I inpattern
template.
The sequence
.B $0
is replaced by the original filename.
Additionally, the sequence
.RI `[ \|seq1\| , \|seq2\| ]'
is replaced by
.I seq1
if
.I seq1
is not a null string; otherwise it is replaced by
.IR seq2 .
.IP
For example, the command
.RB ` "nmap $1.$2.$3 [$1,$2].[$2,file]" '
would yield the output filename
.B myfile.data
for input filenames
.B myfile.data
and
.BR myfile.data.old ,
.B myfile.file
for the input filename
.BR myfile ,
and
.B myfile.myfile
for the input filename
.BR .myfile .
.SM SPACE
characters may be included in
.IR outpattern ,
as in the example `\fBnmap $1 | sed "s/  *$//" > $1\fP'.
Use the
.B \e
character to prevent special treatment
of the
.RB ` $ ',
.RB ` [ ',
.RB ` ] '
and
.RB ` , '
characters.
.HP
.BR  ntrans " [ "
.IR inchars " [ " outchars " ] ]"
.br
Set or unset the filename character translation mechanism.
If no arguments are specified, the filename character
translation mechanism is unset.
If arguments are specified, characters in
remote filenames are translated during
.B mput
commands and
.B put
commands issued without a specified remote target filename, and
characters in local filenames are translated during
.B mget
commands and
.B get
commands issued without a specified local target filename.
.IP
This command is useful when connecting to a non-\s-1UNIX\s0-system
remote host with different file naming conventions or practices.
Characters in a filename matching a character in
.I inchars
are replaced with the corresponding character in
.IR outchars .
If the character's position in
.I inchars
is longer than the length of
.IR outchars ,
the character is deleted from the file name.
.HP
.BI open " host"
.RI [ " port " ]
.br
Establish a connection to the specified
.I host
.SM FTP
server.
An optional port number may be supplied, in which case, 
.B ftp
will attempt to contact an 
.SM FTP
server at that port.
If the 
.I auto-login
option is on (default), 
.B ftp
will also attempt to automatically log the user in to the 
.SM FTP
server (see below).
.TP
.B prompt
Toggle interactive prompting. 
Interactive prompting
occurs during multiple file transfers to allow the
user to selectively retrieve or store files.
By default, prompting is turned on.
If prompting is turned off, any
.B mget
or
.B mput
will transfer all files, and any
.B mdelete
will delete all files.
.TP
.BI proxy " ftp-command"
Execute an 
.SM FTP
command on a secondary control connection.
This command allows simultaneous connection to two remote 
.SM FTP
servers for transferring files between the two servers.
The first
.B proxy
command should be an
.BR open ,
to establish the secondary control connection.
Enter the command
.RB ` "proxy ?" '
to see other 
.SM FTP
commands executable on the secondary connection.
.IP
The following commands behave differently when prefaced by
.BR proxy :
.B open
will not define new macros during the auto-login process,
.B close
will not erase existing macro definitions,
.B get
and
.B mget
transfer files from the host on the primary control connection
to the host on the secondary control connection, and
.BR put ,
.BR mput ,
and
.B append
transfer files from the host on the secondary control connection
to the host on the primary control connection.
.IP
Third party file transfers depend upon support of the
.SB PASV
command by the server on the secondary control connection.
.HP
.BI put " local-file"
.RI [ " remote-file" ]
.br
Store a local file on the remote machine.  If 
.I remote-file
is left unspecified, the local file name is used
after processing according to any
.B ntrans
or
.B nmap
settings in naming the remote file.
File transfer uses the current settings for \(lqrepresentation type\(rq,
\(lqfile structure\(rq, and \(lqtransfer mode\(rq.
.TP
.B pwd
Print the name of the current working directory on the remote
machine.
.TP
.B quit
A synonym for
.BR bye .
.TP
.BI quote " arg1 arg2\fR .\|.\|."
Send the arguments specified, verbatim, to the remote 
.SM FTP
server.  A single 
.SM FTP
reply code is expected in return.
.HP
.BI recv " remote-file"
.RI [ " local-file"  ]
.br
A synonym for
.BR get .
.HP
.B remotehelp
.RI [ " command-name " ]
.br
Request help from the remote 
.SM FTP
server.
If a 
.I command-name
is specified it is supplied to the server as well.
.TP
.BI rename " from to"
Rename the file
.I from
on the remote machine to have the name
.IR to .
.TP
.B reset
Clear reply queue.
This command re-synchronizes command/reply sequencing with the remote
.SM FTP
server.
Resynchronization may be necessary following a violation of the 
.SM FTP
protocol
by the remote server.
.TP
.BI rmdir " directory-name"
Delete a directory on the remote machine.
.TP
.B runique
Toggle storing of files on the local system with unique filenames.
If a file already exists with a name equal to the target
local filename for a
.B get
or
.B mget
command, a
.RB ` \&.1 '
is appended to the name.
If the resulting name matches another existing file, a
.RB ` \&.2 '
is appended to the original name.
If this process continues up to
.RB ` \&.99 ',
an error message is printed, and the transfer does not take place.
The generated unique filename will be reported.
Note: 
.B runique
will not affect local files generated from a shell command
(see below).
The default value is off.
.HP
.BI send " local-file"
.RI [ " remote-file " ]
.br
A synonym for
.BR put .
.TP
.B sendport
Toggle the use of
.SB PORT
commands.  By default, 
.B ftp
will attempt to use a
.SB PORT
command when establishing
a connection for each data transfer.
The use of
.SB PORT
commands can prevent delays
when performing multiple file transfers. If the
.SB PORT
command fails, 
.B ftp
will use the default data port. 
When the use of
.SB PORT
commands is disabled, no attempt will be made to use
.SB PORT
commands for each data transfer.  This is useful
when connected to certain 
.SM FTP
implementations that ignore
.SB PORT
commands but incorrectly indicate they have been accepted.
.TP
.B status
Show the current status of
.BR ftp .
.HP
.B struct
.RI [ " struct-name " ]
.br
Set the \(lqfile structure\(rq to
.IR struct-name .
The only valid
.I struct-name
is
.BR file ,
which corresponds to the default \(lqfile\(rq structure.
.TP
.B sunique
Toggle storing of files on remote machine under unique file names.
The remote 
.SM FTP
server must support the
.SB STOU
command for successful completion.
The remote server will report the unique name.
Default value is off.
.TP
.B tenex
Set the \(lqrepresentation type\(rq to that needed to
talk to
.SM TENEX
machines.
.TP
.B trace
Toggle packet tracing (unimplemented).
.TP
.B type
.RI [ " type-name " ]
.br
Set the \(lqrepresentation type\(rq to
.IR type-name .
The valid
.IR type-name s
are
.B ascii
for \(lqnetwork
.SM ASCII\s0\(rq,
.B binary
or
.B image
for \(lqimage\(rq,
and
.B tenex
for \(lqlocal byte size\(rq with a byte size of 8 (used to talk to
.SM TENEX
machines).
If no type is specified, the current type
is printed.  The default type is \(lqnetwork
.SM ASCII\s0\(rq.
.HP
.BI user " user-name"
.RI [ " password " "] [ " account " ]"
.br
Identify yourself to the remote 
.SM FTP
server. 
If the password is not specified and the server requires it,
.B ftp
will prompt the user for it (after disabling local echo).
If an account field is not specified, and the 
.SM FTP
server requires it, the user will be prompted for it.
If an account field is specified, an account command will
be relayed to the remote server after the login sequence
is completed if the remote server did not require it
for logging in.
Unless
.B ftp
is invoked with \(lqauto-login\(rq disabled, this
process is done automatically on initial connection to the 
.SM FTP
server.
.TP
.B verbose
Toggle verbose mode.
In verbose mode, all responses from the 
.SM FTP
server are displayed to the user.
In addition,
if verbose mode is on, when a file transfer completes, statistics
regarding the efficiency of the transfer are reported. 
By default, verbose mode is on if
.BR ftp 's
commands are coming from a terminal, and off otherwise.
.HP
.B ?
.RI [ " command " ]
.br
A synonym for
.BR help .
.LP
Command arguments which have embedded spaces may be quoted with
quote (\fB"\fR) marks.
.LP
If any command argument which is not indicated as being optional is
not specified,
.B ftp
will prompt for that argument.
.SH "ABORTING A FILE TRANSFER"
To abort a file transfer, use the terminal interrupt key
(usually
.SM CTRL-C\s0).
Sending transfers will be immediately halted.
Receiving transfers will be halted by sending a ftp protocol
.SB ABOR
command to the remote server, and discarding any further data received.
The speed at which this is accomplished depends upon the remote
server's support for
.SB ABOR
processing.
If the remote server does not support the
.SB ABOR
command, an \(lqftp>\(rq
prompt will not appear until the remote server has completed
sending the requested file.
.PP
The terminal interrupt key sequence will be ignored when
.B ftp
has completed any local processing and is awaiting a reply
from the remote server.
A long delay in this mode may result from the
.SB ABOR
processing described
above, or from unexpected behavior by the remote server, including
violations of the ftp protocol.
If the delay results from unexpected remote server behavior, the local
.B ftp
program must be killed by hand.
.SH "FILE NAMING CONVENTIONS"
Local files specified as arguments to
.B ftp
commands are processed according to the following rules.
.TP
1)
If the file name
.RB ` \- '
is specified, the standard input (for reading) or standard output
(for writing) is used.
.TP
2)
If the first character of the file name is 
.RB ` | ',
the remainder of the argument is interpreted as a shell command.
.B ftp
then forks a shell, using 
.BR popen (3S)
with the argument supplied, and reads (writes) from the standard output
(standard input) of that shell.  If the shell command includes
.SM SPACE
characters, the argument
must be quoted; for example `\fB"| ls -lt"\fR'.
A particularly useful example of this mechanism is:
.RB ` "dir | more" '.
.TP
3)
Failing the above checks, if \(lqglobbing\(rq is enabled,
local file names are expanded
according to the rules used in the 
.BR csh (1);
see the
.B glob
command. 
If the
.B ftp
command expects a single local file (for example,
.BR put ),
only the first filename generated by the \(lqglobbing\(rq operation is used.
.TP
4)
For
.B mget
commands and
.B get
commands with unspecified local file names, the local filename is
the remote filename, which may be altered by a
.BR case ,
.BR ntrans ,
or
.B nmap
setting.
The resulting filename may then be altered if
.B runique
is on.
.TP
5)
For
.B mput
commands and
.B put
commands with unspecified remote file names, the remote filename is
the local filename, which may be altered by a
.B ntrans
or
.B nmap
setting.
The resulting filename may then be altered by the remote server if
.B sunique
is on.
.SH "FILE TRANSFER PARAMETERS"
The 
.SM FTP
specification specifies many parameters which may
affect a file transfer.
.LP
The \(lqrepresentation type\(rq
may be one of \(lqnetwork
.SM ASCII\s0\(rq,
\(lq\s-1EBCDIC\s0\(rq, \(lqimage\(rq,
or \(lqlocal byte size\(rq with a specified
byte size (for
.SM PDP\s0-10's
and 
.SM PDP\s0-20's
mostly).  The \(lqnetwork
.SM ASCII\s0\(rq
and \(lq\s-1EBCDIC\s0(rq
types have a further subtype which
specifies whether vertical format control
(\s-1NEWLINE\s0 characters, form feeds, etc.) are to be passed
through (\(lqnon-print\(rq),
provided in
.SM TELNET
format (\(lq\s-1TELNET\s0 format controls\(rq),
or provided in
.SM ASA
(\s-1FORTRAN\s0) (\(lqcarriage control (\s-1ASA\s0)\(rq) format.
.B ftp
supports the \(lqnetwork
.SM ASCII\s0\(rq
(subtype \(lqnon-print\(rq only)
and \(lqimage\(rq types, plus \(lqlocal byte size\(rq
with a byte size of 8 for communicating with
.SM TENEX
machines.
.LP
The \(lqfile structure\(rq may be one of \(lqfile\(rq
(no record structure), \(lqrecord\(rq, or \(lqpage\(rq.
.B ftp
supports only the default value, which is \(lqfile\(rq.
.LP
The \(lqtransfer mode\(rq may be one of \(lqstream\(rq,
\(lqblock\(rq, or \(lqcompressed\(rq.
.B ftp
supports only the default value, which is \(lqstream\(rq.
.SH "SEE ALSO"
.BR csh (1),
.BR ls (1V),
.BR rcp (1C),
.BR tar (1),
.BR popen (3S),
.BR netrc (5),
.BR ftpd (8C)
.SH BUGS
.LP
Correct execution of many commands depends upon proper behavior
by the remote server.
.LP
An error in the treatment of carriage returns in the 4.2
.SM BSD
code handling transfers with a \(lqrepresentation type\(rq of
\(lqnetwork
.SM ASCII\s0\(rq
has been corrected.
This correction may result in incorrect transfers of binary files
to and from 4.2
.SM BSD
servers using a \(lqrepresentation type\(rq of
\(lqnetwork
.SM ASCII\s0\(rq.
Avoid this problem by using the \(lqimage\(rq type.
sferring files between the two servers./share/man/man1/gcore.1                                                                               755       0      12         1546  4424740657  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gcore.1 1.16 89/03/26 SMI
.TH GCORE 1 "26 February 1988"
.SH NAME
gcore \- get core images of running processes
.SH SYNOPSIS
.B gcore
.RB [ " \-o "
.IR filename " ]"
.I process-id
\&.\|.\|.
.SH DESCRIPTION
.IX "gcore command"  ""  "\fLgcore\fP \(em core image of process"
.IX process  "get core image of"
.IX "core image, get of process \(em \fLgcore\fR"
.B gcore
creates a core image of each specified process.
Such an image can be used with 
.BR adb (1)
or
.BR dbx (1).
The name of the core image file for the process whose process
.SM ID
is
.I process-id
will be
.BI core. process-id\fR.
.LP
.SH OPTIONS
.TP 5n
.BI \-o " filename"
Substitute
.I filename
in place of
.B core
as the first part of the name of the core image files.
.SH FILES
\fBcore.\fIprocess-id\fR	core images
.SH "SEE ALSO"
.BR kill (1),
.BR csh (1),
.BR adb (1),
.BR dbx (1),
.BR ptrace (2)
  	install.1 
  
    intro.1   
(    ipcrm.1   
8    ipcs.1    
H    jobs.1    
X    join.1 r  
l    
keylogin.1 l  
|    ./share/man/man1/generic_args.1                                                                        755       0      12          467  4424740657  11416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)generic_args.1 1.7 89/03/26 SMI; 
.\" This is a hack to add SunView generic args to the man pages.
.TH GENERIC_ARGS 1
.SH NAME
generic_args \- generic options for SunView applications, see sunview(1)
.SH GENERIC SUNVIEW APPLICATION ARGUMENTS
.nr zZ 1
.so /usr/man/man1/sunview.1
.SH SEE ALSO
sunview(1)
groups.1  <  P    
hashstat.1 P  `    head.1 P  p    help.1 P      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g ./share/man/man1/get.1                                                                                 755       0      12           64  4424740657   7516                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-get.1
.\" @(#)get.1 1.3 89/03/26 SMI;
    getopt.1 tio  
    getoptcvt.1   
    	getopts.1 cv  
    	gfxtool.1 s.  
    gigiplot.1g   
    glob.1 i  
    goto.1       gprof.1       graph.1g pro  (    grep.1v   <    groups.1 rep  P    
hashstat.1 1  `    head.1 h  p    help.1       
help_viewer.1  P      	history.1 r.      hostid.1 ry.      
hostname.1 1      	hpplot.1g me      i386.1 l     ./share/man/man1/get_selection.1                                                                       755       0      12         3063  4424740657  11625                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)get_selection.1 1.18 89/03/26 SMI;
.TH GET_SELECTION 1 "22 March 1989"
.SH NAME
get_selection  \- copy the contents of a SunView selection to the standard output
.SH SYNOPSIS
.B
get_selection
[
.I rank
] [
.BI t " seconds"
] [
.B D
]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX get_selection "" " \fLget_selection\fR \(em copy a SunView selection to standard output"
.IX "selection, copy to standard output \(em \fLget_selection\fR"
.LP
.B get_selection
prints the contents of the indicated
selection
on standard out.  A selection is a collection of objects (for instance, characters)
picked with the mouse in the SunView window system.
.SH OPTIONS
.TP 15
.I rank
Indicate which selection is to be printed:
.RS
.nf
.BR 1 ":  primary;"
.BR 2 ":  secondary;"
.BR 3 ":  clipboard."
.fi
.RE
.IP
The default is primary.
.TP
.B t " seconds"
Indicate how many seconds to wait for
the holder of a selection to respond to
a request before giving up.  The default is 6 seconds.
.TP
.B D
Debugging. Inquire through a special
debugging service for the selection,
rather than accessing the standard service.
Useful only for debugging window
applications which are clients of the selection library.
.SH EXAMPLE
.LP
The following line in a SunView root
menu file provides a menu command
to print the primary selection on the user's default printer:
.IP
.nf
.B "``Print It''      csh  \-c get_selection | lpr"
.fi
.SH "SEE ALSO"
.LP
.TX SVBG
SELECTION 1 "22 March 1989"
.SH NAME
get_selection  \- copy the contents of a SunView selection to the standard output
.SH SYNOPSIS
.B
get_selection
[
.I rank
] [
.BI t " seconds"
] [
.B D
]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX get_selection "" " \fLget_selection\fR \(em copy a SunView selection to s./share/man/man1/getopt.1                                                                              755       0      12         4727  4424740657  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getopt.1 1.17 89/03/26 SMI; from S5R2 6.2
.TH GETOPT 1 "22 March 1989"
.SH NAME
getopt \- parse command options in shell scripts
.SH SYNOPSIS
.B set \-\|\- `getopt
.I opstring
.B $*`
.br
.B set argv = (`getopt
.I opstring 
.B $*`)
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX command "process options in scripts \(em \fLgetopt\fR"
.IX getopt "" "\fLgetopt\fR \(em process options in scripts"
.B getopt
breaks up options in command lines for easy parsing by shell
scripts, and checks for legal options.
.I optstring
is a string of option letters to recognize, (see
.BR getopt (3)).
If a letter is followed by a colon, the option
is expected to have an argument \(em
which may or may not be separated by white space.
.LP
(The
.RB ` \-\|\- '
following
.B set
indicates that the Bourne shell is to pass arguments
beginning with a dash as parameters to the script.)
.LP
If
.RB ` \- '
appears on the command line that invokes the script,
.B getopt
uses it to delimit the end of options it is
to parse (see example below).
If used explicitly,
.B getopt
will recognize it; otherwise,
.B getopt
will generate it at the first argument it encounters that has no
.RB ` \- '.
In either case,
.B getopt
places it at the end of the options.  The positional parameters
.RB ( $1
.BR $2 .\|.\|.\|)
of the shell are reset so that each option in
.I optstring
is broken out and preceded by a
.RB ` \- ',
along with the argument (if any) for each.
.SH EXAMPLE
.LP
The following code fragment shows how one might process the arguments
for a command that can take the options
.B a
or
.BR b ,
as well as the option
.BR o ,
which requires an argument:
.sp .5
.RS
.nf
.ft B
.ta +.5i +1i
#! /usr/bin/sh
set \-\|\- \*`getopt abo: $*`
if [ $? != 0 ]
then
	echo $\s-1USAGE\s+1
	exit 2
fi
for i in $*
do
	case $i in
	\-a \(bv \-b) \s-1FLAG\s+1 =$i; shift;;
	\-o)	\s-1OARG\s+1 =$2; shift 2;;
	\-\|\-)	shift; break;;
	esac
done
.fi
.ft R
.RE
.LP
This code will accept any of the following
command lines as equivalent:
.RS
.nf
.ft B
cmd \-a \-o arg \0f1 \0f2
cmd \-aoarg \0f1 \0f2
cmd \-oarg \-a \0f1 \0f2
cmd \-a \-oarg \-\|\- \0f1 \0f2
.ft R
.fi
.RE
.SH SEE ALSO
.BR csh (1),
.BR getopts (1),
.BR sh (1),
.BR getopt (3)
.SH DIAGNOSTICS
.B getopt
prints an error message on the standard
error when it encounters an option
letter not included in
.IR optstring .
.SH NOTES
.BR getopts (1)
is preferred.
3  on.1c d-    4  onintr.1 n.1  ./share/man/man1/getoptcvt.1                                                                           755       0      12           72  4424740657  10755                                                                                                                                                                                                                                                                                                                                                                      .so man1/getopts.1
.\" @(#)getoptcvt.1 1.4 89/03/26 SMI; 
 	gfxtool.1 cv  
    gigiplot.1g   
    glob.1 t  
    goto.1 b      gprof.1       graph.1g .1   (    grep.1v   <    groups.1 1v   P    
hashstat.1 p  `    head.1 t  p    help.1 d      
help_viewer.1       	history.1  h      hostid.1  r.      
hostname.1 .      	hpplot.1g  1      i386.1 1       	iAPX286.1  l      	iapx286.1 86  (    
iconedit.1 .  8  ./share/man/man1/getopts.1                                                                             755       0      12         7243  4424740660  10464                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getopts.1 1.8 89/03/26 SMI; from S5R3
.TH GETOPTS 1 "18 November 1987"
.SH NAME
getopts, getoptcvt \- parse command options in shell scripts
.SH SYNOPSIS
.B getopts
.I optstring
.I name
[
.IR argument .\|.\|.
]
.LP
.B getoptcvt
[
.B \-b
]
.I filename
.SH DESCRIPTION
.IX "getopts command" "" "\fLgetopts\fR command" 
.LP
.B getopts
is used by shell procedures to parse positional parameters 
and to check for legal options.
It should be used in place of the
.BR getopt (1)
command.
It supports the following command syntax rules:
.LP
.RS
.TP 5
\(bu
Option names must be one character long.
.TP
\(bu
All options must be preceded by
.RB ` \- '.
.TP
\(bu
Options with no arguments may be grouped after a single
.RB ` \- '.
.TP
\(bu
The first
option-argument
following an option must be preceded by white space.
.TP
\(bu
Option-arguments cannot be optional.
.TP
\(bu
Groups of option-arguments following an option must either be separated by
commas or separated by white space and quoted
(that is,
.RB ` "\-o xxx,z,yy" '
or `\fB\-o "xxx z yy"\fP').
.TP
\(bu
All options must precede operands on the command line.
.TP
\(bu
.RB ` \-\|\- '
may be used to indicate the end of the options.
.RE
.LP
.I optstring
must contain the option letters the command using
.B getopts
will recognize;
if a letter is followed by a colon, the option
is expected to have an argument, or group of arguments,
which must be separated from it by white space.
.LP
Each time it is invoked,
.B getopts
will place the next option in the shell variable
.I name
and the index of the next argument to be processed
in the shell variable
.SM
.BR OPTIND \s0.
Whenever the shell or a shell
procedure is invoked,
.SB OPTIND
is initialized to
.BR 1 .
.LP
When an option requires an option-argument,
.B getopts
places it in the
shell variable
.BR \s-1OPTARG\s0 .
.LP
If
an illegal option is encountered,
.B ?
will be placed in
.IR name .
.LP
When the end of options is encountered,
.B getopts
exits with a non-zero
exit status.  The special option
.RB ` \-\|\- '
may be used to delimit the end of the
options.
.LP
By default,
.B getopts
parses the positional parameters.  If extra arguments
.RI ( argument
\&.\|.\|.)
are given on the
.B getopts
command line,
.B getopts
will parse them instead.
.LP
.B getoptcvt
reads the shell script in
.IR filename ,
converts it to use
.B getopts
instead of
.BR getopt ,
and writes the results on the standard output.
.SH OPTIONS
.SS getoptcvt
.TP
.B \-b
Generate a script that
will be portable to earlier releases of the UNIX system.
The script will determine at run time whether to invoke
.B getopts
or
.BR getopt .
.br
.ne 16
.SH EXAMPLE
.LP
The following fragment of a shell program shows how one might process the arguments
for a command that can take the options
.B a
or
.BR b ,
as well as the option
.BR o ,
which requires an option-argument:
.RS
.sp .5
.nf
.ft B
.ss 18
.ta +.5i +1i
while getopts abo: c
do
	case $c in
	a \(bv b)	\s-1FLAG\s0=$c;;
	o)	\s-1OARG\s0=$\s-1OPTARG\s0;;
	\\?)	echo $\s-1USAGE\s0
		exit 2;;
	esac
done
shift `expr $\s-1OPTIND\s0 \- 1`
.fi
.ta
.ss 12
.ft R
.RE
.LP
This code will accept any of the following as equivalent:
.LP
.RS
.nf
.ft B
.ss 18
cmd \-a \-b \-o "xxx z yy" \fIfilename\fP
cmd \-a \-b \-o "xxx z yy" \-\- \fIfilename\fP
cmd \-ab \-o xxx,z,yy \fIfilename\fP
cmd \-ab \-o "xxx z yy" \fIfilename\fP
cmd \-o xxx,z,yy \-b \-a \fIfilename\fP
.fi
.ss 12
.ft R
.RE
.SH SEE ALSO
.BR getopt (1),
.BR sh (1),
.BR getopt (3)
.SH WARNING
.LP
Changing the value of the shell variable
.SB OPTIND
or parsing different sets of arguments may lead to unexpected results.
.SH DIAGNOSTICS
.LP
.B getopts
prints an error message on
the standard error
when it encounters an option letter not included in
.IR optstring .
l  
sccs-prt.1      m  sccs-rmdel.1      n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-unget.1  $  8  q  
sccs-val.1 $  H  r  sccs.1 l  \  s  
sccsdiff.1 l  t  t  
screenblank.1 t    u  screendump.1      v  screenload.1      w  script.1      x   scrolldefaults.1  x    y  sdif./share/man/man1/gfxtool.1                                                                             755       0      12         4604  4424740660  10457                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gfxtool.1 1.17 89/03/26 SMI;
.TH GFXTOOL 1 "22 March 1989"
.SH NAME
gfxtool \- run graphics programs in a SunView window
.SH SYNOPSIS
.IX gfxtool "" "\fLgfxtool\fR \(em SunWindows graphics tool"
.IX "graphics tool \(em \fLgfxtool\fR"
.IX "SunWindows, graphics tool \(em \fLgfxtool\fR"
.br
.B gfxtool
[
.B \-C
] [
.I program
[
.I arguments
] ]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B gfxtool
is a standard tool provided with the
.I SunView
environment.
It runs graphics programs that do not overwrite the
terminal emulator from which they run.
.LP
.B gfxtool
has two subwindows: a terminal subwindow and an empty subwindow.
The terminal subwindow contains a running shell,
just like the shelltool
(see
.BR shelltool (1)).
Programs invoked in the terminal subwindow can run in the empty
subwindow. 
You can move the boundary between these two subwindows
as described in
.BR sunview (1).
If you wish, you can make
.B gfxtool
your console by entering \-C as the first argument.
.LP
Normally you can use the mouse and keyboard anywhere in the
empty subwindow to access frame functions.  However, some
graphics programs which run in this window may take over
inputs directed to it.
For example, SunCore uses the mouse and keyboard for its own input.
When you run such tools, access the Frame Menu from the tool
boundaries or frame header.
.SH OPTIONS
.TP
.B \-C
Redirect system console output to this instance of
.BR gfxtool .
.LP
.B gfxtool
also accepts all of the generic tool arguments; see
.BR sunview (1)
for a list of these arguments.
.LP
If a
.I program
argument is present,
.B gfxtool
runs it.
If there are no arguments,
.B gfxtool
runs the program corresponding to your
.SB SHELL
environment variable.
If this environment variable is not available, then
.B gfxtool
runs
.BR /usr/bin/sh .
.SH FILES
.PD 0
.TP 20
.B ~/.ttyswrc
.TP
.B /usr/bin/gfxtool
.TP
.B /usr/demo/*
.PD
.SH SEE ALSO
.BR shelltool (1),
.BR sunview (1),
.BR graphics_demos (6)
.SH BUGS
.LP
If more than 256 characters are input to a terminal emulator
subwindow without an intervening
.SM NEWLINE\s0,
the terminal emulator may hang.
If this occurs, display the Frame Menu; the
.RB ` "\s-1TTY\s0 Hung?" '
submenu there has one item,
.RB ` "Flush input" ',
that you can invoke to correct the problem.
nl.1 ice      nm.1 l.1       nohup.1v l.1  $  !  notify.1 l.1  4  "  nroff.1   H  #  	objdump.1 1   X./share/man/man1/gigiplot.1g                                                                           755       0      12           67  4424740660  10721                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)gigiplot.1g 1.4 89/03/26 SMI;
goto.1 b      gprof.1       graph.1g .1   (    grep.1v   <    groups.1 1v   P    
hashstat.1    `    head.1 t  p    help.1 d      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g  h      i386.1 1       	iAPX286.1  1      	iapx286.1  1  (    
iconedit.1 1  8    id.1 dit  H    if.1 d.1  \    	implot.1g .1  p    inde./share/man/man1/glob.1                                                                                755       0      12           72  4424740660   7653                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)glob.1 1.8 89/03/26 SMI; 
1       graph.1g .1   (    grep.1v   <    groups.1 1v   P    
hashstat.1    `    head.1 t  p    help.1 d      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g        i386.1 1       	iAPX286.1  1      	iapx286.1  1  (    
iconedit.1 1  8    id.1 dit  H    if.1 d.1  \    	implot.1g .1  p    indent.1  .1     $ inde./share/man/man1/goto.1                                                                                755       0      12           72  4424740660   7700                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)goto.1 1.8 89/03/26 SMI; 
1g    (    grep.1v   <    groups.1  <  P    
hashstat.1 P  `    head.1    p    help.1 t      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g       i386.1        	iAPX286.1        	iapx286.1   (    
iconedit.1 (  8    id.1 1 1  H    if.1 dit  \    	implot.1g \  p    indent.1  p     $ indentpro_to_defaults.1 ./share/man/man1/gprof.1                                                                               755       0      12        16202  4424740660  10127                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gprof.1 1.23 89/03/26 SMI; from UCB 4.1
.TH GPROF 1 "25 March 1989"
.SH NAME
gprof \- display call-graph profile data
.SH SYNOPSIS
.B gprof
[
.B \-abcsz
]
[
.B \-e
.I function-name
]
[
.B \-E
.I function-name
]
.if n .ti +0.5i
[
.B \-f
.I function-name
]
[
.B \-F
.I function-name
]
.if t .ti +0.5i
.if n .ti +0.5i
[
.I image-file
[
.I profile-file
\&.\|.\|. ] ]
.SH DESCRIPTION
.IX "gprof command"  ""  "\fLgprof\fP \(em call-graph profile"
.IX display  "call-graph profile data \(em \fLgprof\fR"
.IX "call-graph, display profile data \(em \fLgprof\fR"
.IX profile  "display call-graph \(em gprof\fR"
.IX "programming tools"  "display call-graph profile data \(em \fLgprof\fR"
.IX "performance monitoring"  "display call-graph profile data \(em \fLgprof\fR"
.B gprof
produces an execution profile of a program.
The effect of called routines is incorporated in the profile
of each caller.  The profile data is taken from the call graph profile file
which is created by programs compiled with the
.B \-pg
option of
.BR cc (1V)
and other compilers.
That option also links in versions of the library routines
which are compiled for profiling.  The symbol table in the executable image
file
.I image-file
.RB ( a.out
by default) is read and correlated with the call graph profile file
.I profile-file
.RB ( gmon.out
by default).  If more than one profile file is specified, the
.B gprof
output shows the sum of the profile
information in the given profile files.
.LP
First, execution times for each routines are propagated along the
edges of the call graph.
Cycles are discovered, and calls into a cycle are made to share the
time of the cycle.  The first listing shows the functions sorted
according to the time they represent,
including the time of their call
graph descendants.  Below each function entry is shown its (direct)
call-graph children, and how their times are propagated to this
function.  A similar display above the function shows how this
function's time and the time of its
descendants is propagated to its
(direct) call-graph parents.
.LP
Cycles are also shown, with an entry for the cycle as a whole and
a listing of the members of the cycle and their contributions to the
time and call counts of the cycle.
.LP
Next, a flat profile is given, similar to that provided by
.BR prof (1).
This listing gives the total execution times
and call counts for each of
the functions in the program, sorted by decreasing time.
Finally, an index showing the correspondence between function
names and call-graph profile index numbers.
.LP
A single function may be split into subfunctions for profiling
by means of the 
.SB MARK
macro (see 
.BR prof (3)).
.LP
Beware of quantization errors.  The granularity of the sampling is
shown, but remains statistical at best.  It is assumed that the time
for each execution of a function can be
expressed by the total time for
the function divided by the number of times
the function is called.  Thus the time propagated along
the call-graph arcs to parents of that
function is directly proportional to the
number of times that arc is traversed.
.LP
The profiled program must call
.BR exit (2)
or return normally for the profiling information to be saved in the
.B gmon.out
file.
.SH OPTIONS
.TP
.B \-a
Suppress printing statically declared functions.  If this
option is given, all relevant information
about the static function (for
instance, time samples, calls to other
functions, calls from other functions)
belongs to the function loaded just
before the static function in the
.B a.out
file.
.TP
.B \-b
Brief.  Suppress descriptions of each field in the profile.
.TP
.B \-c
The static call-graph of the program is
discovered by a heuristic which
examines the text space of the object file.  Static-only parents or
children are indicated with call counts of 0.
.TP
.B \-s
Produce a profile file
.B gmon.sum
which represents the sum of the profile information in all
the specified profile files.  This summary
profile file may be given to
subsequent executions of
.B gprof
(probably also with a
.BR \-s )
option to accumulate profile data across several runs of an
.B a.out
file.
.TP
.B \-z
Display routines which have zero usage (as indicated by call counts
and accumulated time).
This is useful in conjunction with the
.B \-c
option for discovering which routines were never called.
.TP
.BI \-e " function-name"
Suppress printing the graph profile entry for routine
.I function-name
and all its descendants (unless they have other ancestors that are not
suppressed).  More than one
.B \-e
option may be given.  Only one
.I function-name
may be given with each
.B \-e
option.
.br
.ne 5
.TP
.BI \-E " function-name"
Suppress printing the graph profile entry for routine
.I function-name
(and its descendants) as
.BR \-e ,
above, and also exclude the time spent in
.I function-name
(and its descendants) from the total and
percentage time computations.
More than one
.B \-E
option may be given.  For example:
.sp .5
.RS
.RS
.RB ` \-E
.I mcount
.B \-E
.IR mcleanup '
.RE
.RE
.IP
is the default.
.TP
.BI \-f " function-name"
Print the graph profile entry only for routine
.I function-name
and its descendants.  More than one
.B \-f
option may be given.  Only one
.I function-name
may be given with each
.B \-f
option.
.ne 6
.TP
.BI \-F " function-name"
Print the graph profile entry only for routine
.I function-name
and its descendants (as
.BR \-f,
above) and also use only the times of the printed routines in total
time and percentage computations.  More than one
.B \-F
option may be given.  Only one
.I function-name
may be given with each
.B \-F
option.  The
.B \-F
option overrides the
.B \-E
option.
.SH ENVIRONMENT
.TP
.SB PROFDIR
If this environment variable contains a value, place profiling
output within that directory, in a file named
.IB pid . programname\fR.
.I pid
is the process
.SM ID\s0,
and
.I programname
is the name of the program being profiled, as determined by removing any path
prefix from the
.B argv[0]
with which the program was called.
If the variable contains a
.SM NULL
value, no profiling output is
produced.  Otherwise, profiling output is placed in the file
.BR gmon.out .
.SH FILES
.PD 0
.TP 20
.B a.out
executable file containing namelist
.TP
.B gmon.out
dynamic call-graph and profile
.TP
.B gmon.sum
summarized dynamic call-graph and profile
.TP
.BI \s-1$PROFDIR\s0/ pid . programname
.PD
.SH "SEE ALSO"
.BR cc (1V),
.BR prof (1),
.BR tcov (1),
.BR exit (2),
.BR profil (2),
.BR monitor (3),
.BR prof (3)
.LP
Graham, S.L., Kessler, P.B., McKusick, M.K.,
.RI ` "gprof: A Call Graph Execution Profiler" ',
.IR "Proceedings of the \s-1SIGPLAN\s0 '82 Symposium on Compiler Construction" ,
.SM SIGPLAN
Notices, Vol. 17, No. 6, pp. 120-126, June 1982.
.SH BUGS
.LP
Parents which are not themselves profiled will have the time of
their profiled children propagated to them, but they will appear
to be spontaneously invoked in the call-graph listing, and will
not have their time propagated further.
Similarly, signal catchers, even though profiled, will appear
to be spontaneous (although for more obscure reasons).
Any profiled children of signal catchers should have their times
propagated properly, unless the signal catcher was invoked during
the execution of the profiling routine, in which case all is lost.
on errors.  The granularity of the sampling is
shown, but remains statistical at best.  It is assumed that the time
for each execution of a function can be
expressed by the total time for
the function divided by the number of times
the function is called.  Thus the time propagated along
the call-graph arcs to parents of that
function is directly proportional to the
number of time./share/man/man1/graph.1g                                                                              755       0      12         6636  4424740661  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)graph.1g 1.11 89/03/26 SMI;
.TH GRAPH 1G "22 March 1989"
.SH NAME
graph \- draw a graph
.SH SYNOPSIS
.B graph
[
.B \-a
.I spacing
[
.I start
]\|]\ \ [
.B \-b
]\ \ [
.B \-c
.I string
]
.if n .ti +0.5i
[
.B \-g
.I gridstyle 
]\ \ [
.B \-l
.I label 
]
.if t .ti +0.5i
[
.B \-m
.I connectmode
]
.if n .ti +0.5i
[
.B \-s
]\ \ [
\fB\-x
[
.B l
]
.I lower
[
.I upper
[
.I spacing
]\|]\|]
.if n .ti +0.5i
.if t .ti +0.5i
[
.B \-y
[
.B l
]
.I lower
[
.I upper
[
.I spacing
]\|]\|]
.if n .ti +0.5i
[
.B \-h
.I fraction 
]\ \ [
.B \-w
.I fraction
]\ \ [
.B \-r
.I fraction
]
.if n .ti +0.5i
.if t .ti +0.5i
[
.B \-u
.I fraction 
]\ \ [
.B \-t
] .\|.\|.
.SH DESCRIPTION
.IX "graph command"  ""  "\fLgraph\fP \(em draw graph"
.IX "draw graph"
.B graph
with no options takes pairs of numbers from the standard input
as abscissaes and ordinates of a graph. 
Successive points are connected by straight lines. 
The graph is encoded on the standard output for display by the
.BR  plot (1G)
filters.
.LP
If the coordinates of a point are followed by a nonnumeric string, that
string is printed as a label beginning on the point.
Labels may be surrounded with quotes "
\fB".\|.\|."\fR,
in which case they may be empty or contain blanks
and numbers; labels never contain
.SM NEWLINE
characters.
.LP
A legend indicating grid range is produced with a grid unless the
.B \-s
option is present.
.SH OPTIONS
.LP
Each option is recognized as a separate argument.
.TP
.BI  \-a \ spacing [ " start " ]
Supply abscissaes automatically (they are missing from
the input);
.I spacing
is the spacing (default 1). 
.I start
is the starting point for automatic abscissaes
(default 0 or lower limit given by
.BR \-x ).
.TP
.B  \-b
Break (disconnect) the graph after each label in the input.
.TP
.BI  \-c " string"
.I String
is the default label for each point.
.TP
.BI  \-g " gridstyle"
.I Gridstyle
is the grid style: 0 no grid, 1 frame with ticks, 2
full grid (default).
.TP
.B  \-l
.I label
is label for graph.
.TP
.BI  \-m " connectmode"
Mode (style) of connecting lines: 0 disconnected, 1
connected (default).  Some devices give distinguishable line styles
for other small integers.
.TP
.B  \-s
Save screen, do not erase before plotting.
.HP
.BI "\-x [ l ] " lower " [ " upper 
.BI [ " spacing " "] ]"
.br
If
.B l
is present,
.I x
axis is logarithmic.
.IR lower " and " upper
are lower (and upper)
.IR x ""
limits. 
.IR spacing ,
if present, is grid spacing on
.I x
axis.  Normally these quantities are determined automatically.
.HP
.BI "\-y [ l ] " lower " [ " upper 
.BI [ " spacing " "] ]"
.br
If
.B l
is present,
.I y
axis is logarithmic.
.IR lower " and " upper
are lower (and upper)
.IR y ""
limits. 
.IR spacing ,
if present, is grid spacing on
.I y
axis.  Normally these quantities are determined automatically.
.TP
.BI  \-h " fraction"
.I fraction
of space for height.
.TP
.BI  \-w " fraction"
.I fraction
of space for width.
.TP
.BI  \-r " fraction"
.I fraction
of space to move right before plotting.
.TP
.BI  \-u " fraction"
.I fraction
of space to move up before plotting.
.TP
.B  \-t
Transpose horizontal and vertical axes.
Option
.B \-x
now applies to the vertical axis.
.LP
If a specified lower limit exceeds the
upper limit, the axis is reversed.
.SH "SEE ALSO"
.BR plot (1G),
.BR spline (1G)
.SH BUGS
.LP
.B graph
stores all points internally and drops those for which there
is no room.
.LP
Segments that run out of bounds are dropped, not windowed.
.LP
Logarithmic axes may not be reversed.
`  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1 ./share/man/man1/grep.1v                                                                               755       0      12        30221  4424740661  10133                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)grep.1v 1.34 89/03/26 SMI; from UCB 4.3 BSD and S5
.TH GREP 1V "25 March 1989"
.SH NAME
grep, egrep, fgrep \- search a file for a string or regular expression
.SH SYNOPSIS
.B grep
[
.B \-bchilnsvw
] [
.BI \-e " expression"
] [
.IR filename ".\|.\|. ]" 
.LP
.B egrep
[
.B \-bchilnsv
] [
.BI \-e " expression"
] [
.BI \-f " filename"
] 
.if n .ti +0.5i
[
.I expression
] [
.IR filename ".\|.\|. ]" 
.LP
.B fgrep
[
.B \-bchilnsvx
] [
.BI \-e " string"
] [
.BI \-f " filename"
] 
.if n .ti +0.5i
[
.I string
] [
.IR filename ".\|.\|. ]"
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/grep
[
.B \-bchilnsvw
] [
.BI \-e " expression"
] 
.if n .ti +0.5i
[
.IR filename ".\|.\|. ]" 
.SH DESCRIPTION
.IX "System V commands" "\fLgrep\fR"
.IX "grep command"  ""  "\fLgrep\fP \(em pattern scanner"
.IX "egrep command"  ""  "\fLegrep\fP \(em pattern scanner"
.IX "fgrep command"  ""  "\fLfgrep\fP \(em pattern scanner"
.IX "text processing utilities"  "search for patterns \(em \fLgrep\fR"
.IX files  "search for patterns in \(em \fLgrep\fR"
.IX "patterns, search in file for \(em \fLgrep\fR"
.IX  "search for pattern in file \(em \fLgrep\fR"
.IX  "look for pattern in file \(em \fLgrep\fR"
.IX  find "patterns in file \(em \fLgrep\fR"
Commands of the
.B grep
family search the input
.IR filename s
(the standard input default) for lines matching a pattern.
Normally, each line found is copied to the standard output.
.B grep
patterns are limited regular expressions in the style of
.BR ed (1).
.B egrep
patterns are full regular expressions including alternation.
.B fgrep
patterns are fixed strings \(em no regular expression metacharacters are supported.
.LP
In general,
.B egrep
is the fastest of these programs.
.LP
Take care when using the characters
.RB ` $ ',
.RB ` \(** ',
.RB [ ,
.RB ` \s+2^\s0 ',
.RB ` | ',
.RB ` ( ',
.RB ` ) ',
and
.RB ` \e '
in the
.IR expression ,
as these characters are also meaningful
to the shell.  It is safest to enclose
the entire
.I expression
argument in single quotes
.BR \&\|\' \|.\|.\|.\| \' .
.LP
When any of the
.B grep
utilities is applied to more than one input
file, the name of the file is displayed
preceding each line which matches
the pattern.  The filename is not displayed
when processing a single
file, so if you actually want the filename
to appear, use
.B /dev/null
as a second file in the list.
.SH OPTIONS
.TP
.B \-b
Precede each line by the block number on which it was found.
This is sometimes useful in locating disk block numbers by context.
.TP
.B \-c
Display a count of matching lines rather
than displaying the lines which
match.
.TP
.B \-h
Do not display filenames.
.TP
.B \-i
Ignore the case of letters in making
comparisons \(em that is, upper and
lower case are considered identical.
.TP
.B \-l
List only the names of files with matching
lines (once) separated by
.SM NEWLINE
characters.
.TP
.B \-n
Precede each line by its relative line number in the file.
.TP
.B \-s
Work silently, that is, display nothing except error messages.
This is useful for checking the error status.
.TP
.B \-v
Invert the search to only display lines that
.I do not
match.
.TP
.B \-w
Search for the expression as a word as if surrounded by
.B \e<
and
.BR \e> .
This applies to
.B grep
only.
.TP
.B \-x
Display only those lines which match exactly \(em
that is, only lines
which match in their entirety.
This applies to
.B fgrep
only.
.TP
.BI \-e " expression"
Same as a simple
.I expression
argument, but useful when the
.I expression
begins with a
.RB ` \- '.
.TP
.BI \-e " string"
For 
.B fgrep
the argument is a literal character
.IR string .
.TP
.BI \-f " filename"
Take the regular expression
.RB ( egrep )
or a list of strings separated by
.SM NEWLINE\s0
.RB ( fgrep )
from
.IR filename .
.br
.ne 4
.SH SYSTEM V OPTIONS
The
.B \-s
option to
.B grep
indicates that error messages for nonexistent or unreadable files
should be suppressed, not that all messages
.I except
for error messages should be suppressed.
.ne 4
.SH "REGULAR EXPRESSIONS"
.LP
The following
.I one-character
regular expressions match a
.I single
character:
.TP
.I c
An ordinary character
.RI ( not
one of the special characters discussed below)
is a one-character regular expression that matches that character.
.TP
.BI \e c
A backslash 
.RB ( \e )
followed by any special character is a
one-character regular expression that matches the special character itself.
The special characters are:
.RS
.RS
.TP 
\(bu
.RB ` . ',
.RB ` * ',
.RB ` [ ',
and
.RB ` \e '
(period, asterisk, left square bracket,
and backslash, respectively), which are always special,
.I except
when they appear within square brackets
.RB ( [\|] ).
.TP
\(bu
.RB ` \s+2^\s0 '
(caret or circumflex), which is special at the
.I beginning
of an
.I entire
regular expression,
or when it immediately follows the left of a 
pair of square brackets (\fB[\|]\fP).
.TP
\(bu
.B $
(currency symbol), which is special at the
.I end
of an
entire regular expression.
.RE
.RE
.LP
A backslash followed by one of
.RB ` < ',
.RB ` > ',
.RB ` ( ',
.RB ` ) ',
.RB ` { ',
or
.RB ` } ',
represents a special operator in the regular expression; see below.
.TP
.B \s+4.\s0
A 
.RB ` . '
(period) is a one-character regular expression
that matches any character except
.SM NEWLINE\s0.
.TP
.BI [\| string\| ]
A non-empty string of characters enclosed in square brackets is a
one-character regular expression that matches
.I "any one"
character in that string.
If, however, the first character of the
string is a 
.RB  ` \s+2^\s0 '
(a circumflex or caret),
the one-character regular expression matches any character
.I except
.SM NEWLINE\s0
and the remaining characters in the string.
The
.RB ` \s+2^\s0 '
has this special meaning
.I only
if it
occurs first in the string.
The 
.RB ` \- '
(minus)
may be used to indicate a range of consecutive
.SM ASCII
characters;
for example,
.B [0\-9]
is equivalent to
.BR [0123456789] .
The
.RB ` \- '
loses this special meaning if it occurs first (after
an initial
.RB ` \s+2^\s0 ',
if any)
or last in the string.
The 
.RB ` ] ' 
(right square bracket) does not terminate such a string when it
is the first character within it (after an initial
.RB ` \s+2^\s0\| ',
if any);
that is,
.B [\|]a\-f]
matches either 
.RB ` ] '
(a right square bracket )
or one of the letters
.B a
through
.B f
inclusive.
The four characters
.RB ` . ',
.RB ` * ',
.RB ` [\| ',
and
.RB ` \e '
stand for themselves
within such a string of characters.
.LP
The following rules may be used to construct regular expressions:
.TP
.B *
A one-character regular expression followed by 
.RB ` * '
(an asterisk) is a
regular expression that matches
.I zero
or more occurrences of the
one-character regular expression.
If there is any choice,
the longest leftmost string that permits a match is chosen.
.TP
.BR \e( and \e)
A regular expression enclosed between the character sequences
.B \e(
and
.B \e)
matches whatever the unadorned
regular expression matches.
This applies only to
.BR grep .
.TP
.BI \e n
The expression
.BI \e n
matches the same string of characters
as was
matched by an expression enclosed between
.B \e(
and
.B \e)
.I earlier
in the same regular expression.
Here
.I n
is a digit;
the sub-expression specified is that beginning with the
.IR n th
occurrence of
.B \e(
counting from the left.
For example, the expression
.B ^\e(.*\e)\e1$
matches a line
consisting of two repeated appearances of the same string.
.SS Concatenation
The concatenation of regular expressions is a regular expression
that matches the concatenation of the
strings matched by each component of the
regular expression.
.TP
.B \e<
The sequence
.B \e<
in a regular expression constrains the one-character
regular expression immediately following
it only to match something at the
beginning of a \(lqword\(rq; that is, either
at the beginning of a line, or just
before a letter, digit, or underline and
after a character not one of these.
.TP
.B \e>
The sequence
.B \e>
in a regular expression constrains the one-character
regular expression immediately following
it only to match something at the
end of a \(lqword\(rq; that is, either at the end of a line, or just
before a character which is neither a letter, digit, nor underline.
.ne 8
.TP
.PD 0
.BI \e{ m \e}
.TP
.BI \e{ m, \e}
.TP
.BI \e{ m,n \e}
A regular expression followed by
.BI \e{ m \e},
.BI \e{ m,\e},
or
.BI \e{ m,n \e}
matches a
.B range
of occurrences of the
regular expression.
The values of
.I m
and
.I n
must be non-negative integers less than 256;
.BI \e{\fP m\fP\fB\e}
matches
.I exactly
.I m
occurrences;
.BI \e{\fP m,\fP\fB\e}
matches
.I "at least"
.I m
occurrences;
.BI \e{\fP m,n\fP\fB\e}
matches
.I "any number"
of occurrences
.I between
.I m
and
.I n
inclusive.
Whenever a choice exists,
the regular expression matches as many occurrences as possible.
.PD
.TP
.B \s+2^\s0
A circumflex or caret
.RB (\| \s+2^\s0  \|)
at the beginning of an entire regular expression
constrains that regular expression to match an
.I initial
segment of a line.
.TP
.B $
A currency symbol 
.RB ( $ )
at the end of an entire regular expression
constrains that regular expression to match a
.I final
segment of a line.
.LP
The construction
.IP
.B example%
\fB\s+2^\s0\fIentire
regular expression
.B $
.LP
constrains the entire regular expression to match the entire line.
.LP
.B egrep
accepts regular expressions of the same sort
.B grep
does, except for
.BR \e( ,
.BR \e) ,
.BI \e n,
.BR \e< ,
.BR \e> ,
.BR \e{ ,
and
.BR \e} ,
with the addition of:
.RS
.RS
.TP
.B *
A regular expression (not just a one-character
regular expression) followed by
.RB ` * '
(an asterisk) 
is a regular expression that matches
.I zero
or more occurrences of the
one-character regular expression.
If there is any choice,
the longest leftmost string that permits a match is chosen.
.TP
.B +
A regular expression followed by 
.RB ` + '
(a plus sign) 
is a
regular expression that matches
.I one
or more occurrences of the
one-character regular expression.
If there is any choice,
the longest leftmost string that permits a match is chosen.
.TP
.B ?
A regular expression followed by 
.RB ` ? ' 
(a question mark) 
is a
regular expression that matches
.I zero
or
.I one
occurrences of the one-character regular expression.
If there is any choice,
the longest leftmost string that permits a match is chosen.
.TP
.B |
Alternation: two regular expressions separated by 
.RB ` | '
or
.SM NEWLINE\s0
match either a match for the first or a match for the second.
.TP
.B (\|)
A regular expression enclosed in parentheses
matches a match for the regular expression.
.RE
.RE
.LP
The order of precedence of operators at the same parenthesis level
is
.RB ` [\ ] '
(character classes), then
.RB ` * '
.RB ` + '
.RB ` ? '
.BR  (closures), then
concatenation, then
.RB ` | '
.BR  (alternation) and
.SM NEWLINE\s0.
.SH EXAMPLES
.LP
Search a file for a fixed string using
.BR fgrep :
.LP
.RS
.nf
.ft B
example% fgrep intro /usr/share/man/man3/*.3*
.ft P
.fi
.RE
.LP
Look for character classes using
.BR grep :
.LP
.RS
.nf
.ft B
example% grep '[1-8]([\s-1CJMSNX\s0])' /usr/share/man/man1/*.1
.ft P
.fi
.RE
.LP
Look for alternative patterns using
.BR egrep :
.LP
.RS
.nf
.ft B
example% egrep '(Sally|Fred) (Smith|Jones|Parker)' telephone.list
.ft P
.fi
.RE
.br
.ne 4
.LP
To get the filename displayed when only processing a single file, use
.B /dev/null
as the second file in the list:
.LP
.RS
.nf
.ft B
example% grep 'Sally Parker' telephone.list /dev/null
.ft P
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/null
.PD
.SH "SEE ALSO"
.BR awk (1),
.BR ed (1),
.BR ex (1),
.BR sh (1),
.BR vi (1),
.BR sed (1V)
.SH BUGS
.LP
Lines are limited to 1024 characters by
.BR grep ;
longer lines are truncated.
.LP
The combination of
.B \-l
and
.B \-v
options does
.I not
produce a list of files in which a regular expression is not found.
To get such a list, use the Bourne shell construct:
.LP
.nf
.ft B
.\" Unfortunately, this is what you have to do to set tabs every 8 spaces
.ta +8u*\w'\0'u +8u*\w'\0'u +8u*\w'\0'u +8u*\w'\0'u
	for \fIfilename\fP in *
	do
		if [ `grep "\fIre\fP" $\fIfilename\fP | wc -l` -eq 0 ]
		then
			echo $\fIfilename\fP
		fi
	done
.ft R
.fi
.LP
or the C shell construct:
.LP
.nf
.ft B
	foreach \fIfilename\fP (*)
		if (`grep "\fIre\fP" $\fIfilename\fP | wc -l` == 0) echo $\fIfilename\fP
	end
.ft R
.fi
.LP
Ideally there should be only one
.BR grep .
.SH DIAGNOSTICS
Exit status is 0 if any matches are found,
1 if none, 2 for syntax errors or inaccessible files.


 when a file transfer completes, statistics
regarding the efficiency of the transfer are reported. 
By default, verbose mode is on if
.BR ftp 's
commands are coming from a terminal, and off otherwise.
.HP
.B ?
.RI [ " command " ]
.br
A synonym for
.BR help .
.LP
Command arguments which have embedded spaces may be quoted with
quote (\fB"\fR) marks.
.LP
If any comman./share/man/man1/groups.1                                                                              755       0      12         1736  4424740661  10320                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)groups.1 1.12 89/03/26 SMI; from UCB 4.1
.TH GROUPS 1 "22 March 1989"
.SH NAME
groups \- display a user's group memberships
.SH SYNOPSIS
.B groups
[
.B user ...
]
.SH DESCRIPTION
.IX "groups command"  ""  "\fLgroups\fP \(em display group membership"
.IX display  "group membership"
With no arguments, 
.B groups
displays the groups to which you belong; else it displays the groups
to which the
.B user
belongs.
Each user belongs to a group specified in the password file
.B /etc/passwd
and possibly to other groups as specified in the file
.BR /etc/group .
If you do not own a file but belong to the group which it is owned
by then you are granted group access to the file.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.B /etc/group
.PD
.SH "SEE ALSO"
.BR getgroups (2)
.\" .SH BUGS
.\"The groups facility will be changed slightly before 4.2bsd to include
.\"the notion of accounting groups; this will make an option to this
.\"command to print the current accounting group desirable.
adc.1   x    lockscreen.1  ./share/man/man1/hashstat.1                                                                            755       0      12           76  4424740661  10554                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)hashstat.1 1.8 89/03/26 SMI; 
 d      
help_viewer.1       	history.1       hostid.1        
hostname.1       	hpplot.1g        i386.1 1       	iAPX286.1        	iapx286.1    (    
iconedit.1   8    id.1 dit  H    if.1 d.1  \    	implot.1g it  p    indent.1  \     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1       $ input_from_defaults.1         insert_brack./share/man/man1/head.1                                                                                755       0      12         2712  4424740661   7675                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)head.1 1.18 89/03/26 SMI; from UCB 4.1
.TH HEAD 1 "9 September 1987"
.SH NAME
head \- display first few lines of specified files
.SH SYNOPSIS
.B head
[
.BI \- n
]
[
.IR filename .\|.\|.\
]
.SH DESCRIPTION
.IX "head command"  ""  "\fLhead\fP \(em display head of file"
.IX files  "display first lines of"
.IX display  "first lines of file"
.B head
copies the first
.I n
lines of each
.I filename
to the standard output.
If no
.I filename
is given,
.B head
copies lines from the standard input.
The default value of
.I n
is 10 lines.
.LP
When more than one file is specified,
the
start of each file which looks like:
.IP
.BI ==> filename <==
.LP
Thus, a common way to display a set of short files, identifying each
one, is:
.RS
.nf
.BI "example% head \-9999" " filename1 filename2 " \fR.\|.\|.
.fi
.RE
.SH EXAMPLE
.LP
The following example:
.RS
.nf
.B example% head  -4  /usr/share/man/man1/{cat,head,tail}.1*
.RE
.fi
.LP
produces:
.RS
.ft B
.nf
==> /usr/share/man/man1/cat.1v <==
\&.\s-1TH CAT\s0 1V "2 June 1983"
\&.\s-1SH NAME\s0
cat \- concatenate and display
\&.\s-1SH SYNOPSIS\s0
.sp
==> /usr/share/man/man1/head.1 <==
\&.\s-1TH HEAD\s0 1 "24 August 1983"
\&.\s-1SH NAME\s0
head \- display first few lines of specified files
\&.\s-1SH SYNOPSIS\s0
.sp
==> /usr/share/man/man1/tail.1 <==
\&.\s-1TH TAIL 1  "27 April 1983"
\&.\s-1SH NAME\s0
tail \- display the last part of a file
\&.\s-1SH SYNOPSIS\s0
.fi
.ft R
.RE
.SH "SEE ALSO"
.BR cat (1V),
.BR more (1),
.BR tail (1)
4    	mc68010.1 ke  H    	mc68020.1  l  X  ./share/man/man1/help.1                                                                                755       0      12           66  4424740661   7664                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-help.1
.\" @(#)help.1 1.3 89/03/26 SMI;
  	history.1       hostid.1        
hostname.1       	hpplot.1g       i386.1        	iAPX286.1        	iapx286.1   (    
iconedit.1 (  8    id.1 1    H    if.1 dit  \    	implot.1g \  p    indent.1  p     $ indentpro_to_defaults.1       	indxbib.1       inline.1       $ input_from_defaults.1 pu       insert_brackets.1    
    	install.1 
  
    ./share/man/man1/help_viewer.1                                                                         755       0      12         6647  4424740662  11321                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)help_viewer.1	1.9 89/03/26 SMI;
.TH HELP_VIEWER 1 "19 February 1988"
.SH NAME
help_viewer \- SunView application providing help with applications and desktop
.SH SYNOPSIS
.B /usr/lib/help_viewer
[
.I options
] 
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "help_viewer command"  ""  "\fLhelp_viewer\fP \(em get help_viewer"
.IX " commands"  "help_viewer command"  ""  "\fLhelp_viewer\fP \(em get help_viewer"
.LP
.B help_viewer
allows you to quickly access
documentation about SunView applications and the SunView Desktop.
This help consists of intermixed text and graphics
displayed in a window called the Help Viewer.
.LP
There are two ways 
.B help_viewer 
can be invoked. 
One is as a stand-alone SunView application, where
.B help_viewer
starts up with a list of the applications that it contains documentation for.
The second way to reach 
.B help_viewer 
is by clicking on the More Help button in a Spot Help window.
In this case, the Help Viewer comes up with text specific to the current
application and context.
.LP
The documentation within
.B help_viewer
is extendable, but as shipped it includes
handbooks for the DeskTop,
.BR mailtool (1), 
.BR shelltool (1),
.BR textedit (1),
organizer, Sun\s-1PC\s0, and itself
.RB ( help_viewer ). 
.LP
The available documentation depends only on the existence of the
appropriate files in the directories specified under
.SM FILES\s0.
.LP
The user moves between the various pages of help with the assistance 
of hypertext
.IR links . 
Links are symbolic connections between pages of text.
The current convention at Sun is to use underlined text to indicate the
presence of a link.
When the user double-clicks on a link, the text associated with the topic 
indicated by the link is shown
in the Help Viewer. There are links in many places to make it quick and easy to
go from place to place within the
.B help_viewer 
database. 
.LP
At the lower
levels in the hierarchy of help files, many of the topics contain more 
than one page
of text, and in these cases a link to the next page and to the previous page 
is available
at the upper-right corner of the Help Viewer which allows you to page 
through the document. 
.LP
The current position within
the hierarchy of text is indicated by the links at the upper-left
corner of the Help Viewer. The last link in the list is the level just
above your current position.
.SH OPTIONS
.LP
The standard SunView options for window size, position, fonts, and other
options are allowed. See
.BR sunview (1)
for details.
.TP
.BI \-dir " dirname"
Name of help directory
.TP
.BI \-file " filename \fR[" #\fR]
Name of startup file relative to help directory (or
.B /usr/lib/help
by default).
.B #
is a page number separated from the filename by a
.SM SPACE\s0.
If
.B #
is omitted, the first page is shown.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/help
directory containing miscellaneous help files
.LP
The files in
.B /usr/lib/help
are used by the 
.B help 
and the
.B help_viewer
facilities, and the
.SM SCCS
.BR help (1)
facility.
.LP
.LP
Directories within
.B /usr/lib/help
named after SunView applications
and the DeskTop contain specific information used by
.BR help_viewer .
See
.BR help_viewer (5)
for information
about the files in these directories.
.SH SEE ALSO
.BR help (1),
.BR mailtool (1),
.BR shelltool (1),
.BR textedit (1),
.BR help_viewer (5)
.SH DIAGNOSTICS
.BR help_viewer (1)
displays a pop-up error window if it cannot find the file required to show
the requested help.
t.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $./share/man/man1/history.1                                                                             755       0      12           75  4424740662  10436                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)history.1 1.8 89/03/26 SMI; 
ostname.1 1      	hpplot.1g me      i386.1 l       	iAPX286.1 86      	iapx286.1 6.  (    
iconedit.1 .  8    id.1 con  H    if.1    \    	implot.1g .1  p    indent.1 t.1     $ indentpro_to_defaults.1       	indxbib.1 lt      inline.1 ib.     $ input_from_defaults.1        insert_brackets.1   
    	install.1 s.  
    intro.1   
(    ipcrm.1   
8    ipcs.1 ./share/man/man1/hostid.1                                                                              755       0      12          763  4424740662  10253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hostid.1 1.14 89/03/26 SMI; from UCB 1 Apr 83
.TH HOSTID 1 "9 September 1987"
.SH NAME
hostid \- print the numeric identifier of the current host
.SH SYNOPSIS
.B hostid
.SH DESCRIPTION
.IX "hostid command"  ""  "\fLhostid\fP \(em display host ID"
.IX display  "identifier of current host"
.IX display  "current host identifier"
The
.B hostid
command prints the identifier of the current
host in hexadecimal.  This numeric
value is unique across all Sun hosts.
.SH SEE ALSO
.BR gethostid (2)
jobs.1 s  
X./share/man/man1/hostname.1                                                                            755       0      12         1310  4424740662  10604                                                                                                                                                                                                                                                                                                                                                                      .TH HOSTNAME 1 "9 September 1987"
.\" @(#)hostname.1 1.10 89/03/26 SMI; from UCB 4.1
.SH NAME
hostname \- set or print name of current host system
.SH SYNOPSIS
.B hostname
[
.I name-of-host
]
.SH DESCRIPTION
.IX "hostname command"  ""  "\fLhostname\fP \(em display host name"
.IX display  "name of current host"
.IX display  "current host name"
.IX set  "name of current host"
.IX set  "current host name"
.LP
The
.B hostname
command prints the name of the current host, as given before the
\(lqlogin\(rq prompt.
The super-user can set the hostname by giving an argument; this
is usually done in the startup script
.BR /etc/rc.local .
.SH FILES
.PD 0
.TP 20
.B /etc/rc.local
.PD
.SH SEE ALSO
.BR gethostname (2)
      line.1 i       lint.1v   0    list.1 t  @    ln.1 ist  P    load.1 1  `    loadc.1   x    lockscreen.1  x     $ lockscreen_default.1 $       logger.1 $       login.1        	logname.1 1       logout.1  1       look.1 1      	look./share/man/man1/hpplot.1g                                                                             755       0      12           65  4424740662  10411                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)hpplot.1g 1.4 89/03/26 SMI;
 	iAPX286.1  1      	iapx286.1  1  (    
iconedit.1 l  8    id.1 dit  H    if.1 d.1  \    	implot.1g .1  p    indent.1  .1     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1  1      $ input_from_defaults.1         insert_brackets.1   
    	install.1   
    intro.1   
(    ipcrm.1   
8    ipcs.1 r  
H    jobs.1 s  
X    join.1 s  
l    
keylogin.1 s  
|  ./share/man/man1/i386.1                                                                                755       0      12           63  4424740662   7423                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)i386.1 1.4 89/03/26 SMI;
  	iapx286.1  1  (    
iconedit.1 1  8    id.1 dit  H    if.1 d.1  \    	implot.1g .1  p    indent.1  .1     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1  1      $ input_from_defaults.1         insert_brackets.1   
    	install.1   
    intro.1   
(    ipcrm.1   
8    ipcs.1 r  
H    jobs.1 s  
X    join.1 s  
l    
keylogin.1 s  
|    kill.1 n  
    ./share/man/man1/iAPX286.1                                                                             755       0      12           66  4424740662   7776                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)iAPX286.1 1.3 89/03/26 SMI;
  
iconedit.1 (  8    id.1 1 1  H    if.1 dit  \    	implot.1g \  p    indent.1  p     $ indentpro_to_defaults.1       	indxbib.1       inline.1       $ input_from_defaults.1 pu       insert_brackets.1    
    	install.1 
  
    intro.1   
(    ipcrm.1   
8    ipcs.1    
H    jobs.1 r  
X    join.1 s  
l    
keylogin.1 l  
|    kill.1 s  
    label.1   
    ./share/man/man1/iapx286.1                                                                             755       0      12           66  4424740663  10137                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)iapx286.1 1.4 89/03/26 SMI;
  id.1 dit  H    if.1 d.1  \    	implot.1g it  p    indent.1  \     $ indentpro_to_defaults.1       	indxbib.1 1       inline.1       $ input_from_defaults.1         insert_brackets.1   
    	install.1    
    intro.1   
(    ipcrm.1   
8    ipcs.1 r  
H    jobs.1 s  
X    join.1 s  
l    
keylogin.1 s  
|    kill.1 n  
    label.1   
    last.1 e  
    
last./share/man/man1/iconedit.1                                                                            755       0      12        15265  4424740663  10623                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)iconedit.1 1.20 89/03/26 SMI;
.TH ICONEDIT 1 "21 December 1987"
.SH NAME
iconedit \- create and edit images for SunView icons, cursors and panel items
.SH SYNOPSIS
.br
.B iconedit
[
.I filename
]
.SH OPTIONS
.LP
.B iconedit
accepts the standard SunView command-line arguments; see
.BR sunview (1)
for a list.
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "SunView" "iconedit" "" "\fLiconedit\fR"
.IX "iconedit" "" "\fLiconedit\fR \(em edit icons"
.IX edit "icons \(em \fLiconedit\fR"
.LP
.B iconedit
is a standard tool provided with the SunView
environment.
With it you can create and edit small
images for use in icons, cursors,
panel items, etc.
.B iconedit
has several
subwindows:
.RS
.TP 3
\(bu
A large drawing area or
.I canvas
(on the left).
.TP 3
\(bu
A small proof area
for previewing a life-size version of the image being edited
(at the lower right).
.TP 3
\(bu
A control panel showing the options available and their
current state (at the center right).
.TP 3
\(bu
An area for status messages (at the upper right).
.TP 3
\(bu
An area containing instructions for
the use of the mouse (above the drawing
canvas).
.RE
.LP
Inside the canvas, use the left
button to draw and the middle button
to erase.  As you draw, an enlarged
version of the image appears in the
canvas, while a life-sized version of the
image appears in the proof area.
Use the right button to undo the previous operation.
.LP
While editing a cursor image, you can
try the cursor out against different
backgrounds and with different raster
operations by moving the cursor
into the proof area.
.SH CONTROL PANEL
.LP
The large control panel to the right
of the canvas contains many items
through which you can control
.BR iconedit .
Some items are buttons
which allow you to initiate commands,
some are text fields which you
type into, and some are choice items allowing
you select from a range
of options.  Use the left button to select
items.  Most items also have
a menu which you can invoke with the right button.
.LP
There are three text fields: the two at the top labeled
.B Dir:
and
.BR File: ,
and one to the right of the
.B abc
labeled
.BR Fill: .
A triangular caret points to the current
type-in position.  Typing
.SM RETURN
advances the caret to the next text field;
you can also move the caret
to a text field by selecting the field with the left button.
.LP
Each item in the control panel is described below:
.TP
.B Dir
The current directory.
.TP
.B File
The current filename.  The default is the filename given
on the command line.  You can request
filename completion by pressing
.SM ESC\s0.
.B iconedit
searches the current directory for files whose
names
begin with the string you entered.
If the filename search locates only one file,
that file will be loaded in.
In addition,
typing
.SM CTRL-L\s0,
.SM CTRL-S\s0,
.SM CTRL-B
or
.SM CTRL-Q
are equivalent to pressing the
.BR Load ,
.BR Store ,
.BR Browse ,
or
.B Quit
buttons, respectively.
.TP
.B Load
.BR  (Button)
Load the canvas from the file named in the
.BR File " field."
.TP
.B Store
.BR  (Button)
Store the current image in the file named in the
.BR File " field."
.TP
.B Browse
.BR  (Button)
Display all the images in the current directory in a popup panel.
When you select an image with the left button, it will be loaded
into the canvas for editing and the browsing panel will be hidden.
Pressing browse again will cause the panel to popup again
(it will come up immediately if the directory and file fields have
not been modified).
.TP
.B Quit
.BR  (Button)
Terminate processing.
Quitting requires confirmation.
.TP
.B Size
Alter the canvas size.  Choices are icon size (64 x 64 pixels)
or cursor size (16 x 16 pixels).
.TP
.B Grid
Display a grid over the drawing canvas,
or turn the grid off.
.TP
.B Clear
.BR  (Button)
Clear the canvas.
.TP
.B Fill
.BR  (Button)
Fill canvas with current rectangular fill pattern.
.TP
.B Invert
.BR  (Button)
Invert each pixel represented on the canvas.
.TP
.B Paintbrush
Select from among five painting modes.
Instructions for each painting
mode appear above the canvas.  The painting modes are:
.RS
.TP
.B dot
Paint a single dot at a time.
.TP
.B line
Draw a line.
To draw a line on the canvas, point to the
first endpoint of the line,
and press and hold the left mouse button.
While holding the button down, drag the
cursor to the second endpoint
of the line. 
Release the mouse button.
.TP
.B rectangle
Draw a rectangle.
To draw a rectangle on the canvas, point
to the first corner of the rectangle
and press and hold the left mouse button.
While holding the button down, drag the cursor to the diagonally
opposite corner of the rectangle.
Release the mouse button.
.IP
In the control panel,
the
.B Fill
field to the right of the rectangle
indicates the current rectangle fill pattern.
Any rectangles you paint on the canvas will
be filled with this pattern.
.TP
.B circle
Draw a circle.
To draw a circle on the canvas,
point to the center of the circle,
and press and hold the left mouse button.
While holding the button down, drag the cursor to the
desired edge of the circle.
Release the mouse button.
.IP
In the control panel,
the
.B Fill
field to the right of the circle
indicates the current circle fill pattern.
Any circles you paint on the canvas will be filled with this pattern.
.TP
.B abc
Insert text.
To insert text, move the painting hand to
.B abc
and type the desired text.
Then move the cursor to the canvas and press
and hold the left mouse button.
A box will appear where the text is to go.
Position the box as desired and release the mouse button.
.IP
In addition, you can choose the font in which to draw the text.
Point at the Fill field to the right of the
.B abc
and either click the
left mouse button to cycle through the available fonts
or press and hold the right mouse button to bring up a menu of fonts.
.RE
.LP
.TP
.B Load
This is the rasterop to be used when loading a file in from disk.
(See the
.TX PIXRCT
for details on rasterops).
.TP
.B Fill
This is the rasterop to be used when filling the canvas.
The source for this operation is the rectangle fill pattern,
and the destination is the canvas.
.TP
.B Proof
This is the rasterop to be used when rendering the proof image.
The source for this operation is the proof image,
and the destination is the proof background.
.TP
Proof background
The proof background can be changed to
allow you to preview how the image
will appear against a variety of patterns.
The squares just above the proof area
show the patterns available for use as the proof background pattern.
To change the proof background, point at the desired
pattern and click the left mouse button.
.SH SEE ALSO
.BR sunview (1)
.LP
.TX PIXRCT
     sum.1v 1       sun.1 m.  4    
suntools.1 .  H    	sunview.1  1  \    	suspend.1  4  l    swin.1 .      switch.1 1 .      
switcher.1 .      
symorder.1       sync.1 r      sysex.1       	syswait.1 1       t300.1g        t300s.1g 1g       t4013.1g./share/man/man1/id.1                                                                                  755       0      12         1644  4424740663   7375                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)id.1 1.18 89/03/26 SMI; from S5R2
.TH ID 1 "21 December 1987"
.SH NAME
id \- print the user name and ID, and group name and ID
.SH SYNOPSIS
.B id
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "id command"  ""  "\fLid\fP \(em display user and group IDs"
.IX  display "user and group IDs \(em \fLid\fP"
.IX  "user ID"  "\fLid\fR \(em display user and group IDs"
.IX  "group ID"  "\fLid\fR \(em display user and group IDs"
.IX  login  "display name"  ""   "display user and group IDs \(em \fLid\fP"
.LP
Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
.B id
displays your user and group
.SM ID\s0,
and your username.
If your real and effective 
.SM ID\s0s
do not match, both are printed.
.SH SEE ALSO
.BR getuid (2)
1 .1  <    lpr.1 q.  L    lprm.1 .  `    lptest.1 1 .  p  	  ls.1v .1  ./share/man/man1/if.1                                                                                  755       0      12           70  4424740663   7327                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)if.1 1.8 89/03/26 SMI; 
indent.1  p     $ indentpro_to_defaults.1       	indxbib.1       inline.1       $ input_from_defaults.1 pu       insert_brackets.1    
    	install.1 
  
    intro.1   
(    ipcrm.1   
8    ipcs.1    
H    jobs.1 r  
X    join.1 s  
l    
keylogin.1 l  
|    kill.1 s  
    label.1   
    last.1    
    
lastcomm.1   
    ld.1 1 e  
    ldd.1 mm  
    leave.1 ./share/man/man1/implot.1g                                                                             755       0      12           65  4424740663  10410                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)implot.1g 1.4 89/03/26 SMI;
  $ indentpro_to_defaults.1       	indxbib.1       inline.1       $ input_from_defaults.1 pu       insert_brackets.1    
    	install.1 
  
    intro.1   
(    ipcrm.1   
8    ipcs.1    
H    jobs.1    
X    join.1 r  
l    
keylogin.1 l  
|    kill.1 l  
    label.1   
    last.1    
    
lastcomm.1   
    ld.1 1   
    ldd.1  e  
    leave.1   
    lex.1 1 ./share/man/man1/indent.1                                                                              755       0      12        31135  4424740663  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)indent.1 1.20 89/03/26 SMI;.
.TH INDENT 1 "9 September 1987"
.SH NAME
indent \- indent and format a C program source file
.SH SYNOPSIS
.in +\w'\fBindent \fR'u
.ti -\w'\fBindent \fR'u
.B indent 
[
.I input-file
[
.I output-file
] ] [
[\ \fB\-bap\fR\ |\ \fB\-nbap\fR\ ]
[\ \fB\-bacc\fR\ |\ \fB\-nbacc\fR\ ]
[\ \fB\-bad\fR\ |\ \fB\-nbad\fR\ ]
[\ \fB\-bbb\fR\ |\ \fB\-nbbb\fR\ ]
[\ \fB\-bc\fR\ |\ \fB\-nbc\fR\ ]
[\ \fB\-bl\fR\ ]
[\ \fB\-br\fR\ ]
[\ \fB\-bs\fR\ |\ \fB\-nbs\fR\ ]
[\ \fB\-c\fIn\fR\ ]
[\ \fB\-cd\fIn\fR\ ]
[\ \fB\-cdb\fR\ |\ \fB\-ncdb\fR\ ]
[\ \fB\-ce\fR\ |\ \fB\-nce\fR\ ]
[\ \fB\-ci\fIn\fR\ ]
[\ \fB\-cli\fIn\fR\ ]
[\ \fB\-d\fIn\fR\ ]
[\ \fB\-di\fIn\fR\ ]
[\ \fB\-eei\fR\ |\ \fB\-neei\fR\ ]
[\ \fB\-fc1\fR\ |\ \fB\-nfc1\fR\ ]
[\ \fB\-i\fIn\fR\ ]
[\ \fB\-ip\fR\ |\ \fB\-nip\fR\ ]
[\ \fB\-l\fIn\fR\ ]
[\ \fB\-lc\fIn\fR\ ]
[\ \fB\-lp\fR\ |\ \fB\-nlp\fR\ ]
[\ \fB\-pcs\fR\ |\ \fB\-npcs\fR\ ]
[\ \fB\-npro\fR\ ]
[\ \fB\-psl\fR\ |\ \fB\-npsl\fR\ ]
[\ \fB\-sc\fR\ |\ \fB\-nsc\fR\ ]
[\ \fB\-sob\fR\ |\ \fB\-nsob\fR\ ]
[\ \fB\-st\fR\ ]
[\ \fB\-troff\fR\ ]
[\ \fB\-v\fR\ |\ \fB\-nv\fR\ ]
.SH DESCRIPTION
.IX  indent  ""  "\fLindent\fP \(em format C source"
.IX  "programming tools"  "indent"  ""  "\fLindent\fP \(em format C source"
.IX  "languages"  "indent"  ""  "\fLindent\fP \(em format C source"
.IX  "C programming language"  "indent"  ""  "\fLindent\fP \(em format C source"
.IX  "pretty printer"  "indent"  ""  "\fLindent\fP \(em format C source"
.IX  "format C programs" "" "format C programs \(em \fLindent\fP"
.IX  "code formatter"  "indent"  ""  "\fLindent\fP \(em format C source"
.\".IX  "cb"  "indent"  "\fLcb\fP"  "try \fLindent\fP \(em format C source"
.LP
.B indent
is a C program formatter.  It reformats the C
program in the
.I input-file
according to the switches.  The switches which can
be specified are described below.
They may appear before or after the file
names.
.LP
Note: if you only specify an
.IR input-file ,
the formatting is
done \(lqin-place\(rq, that is, the formatted
file is written back into
.I input-file
and a backup copy of
.I input-file
is written in the current directory.  If
.I input-file
is named
.BR /blah/blah/file ,
the backup file is named
.BR file.\|\s-1BAK\s0 .
.LP
If
.I output-file
is specified,
.B indent
checks to make sure it is different from
.IR input-file .
.SH OPTIONS
.LP
The options listed below control the formatting style imposed by
.BR indent .
.TP 15
.BR \-bap , \-nbap
If
.B \-bap
is specified, a blank line is forced after
every procedure body.  Default:
.B \-nbap.
.TP
.BR \-bacc , \-nbacc
If
.B \-bacc
is specified, a blank line is forced around every conditional
compilation block.  That is. in front of every
.B #ifdef
and after every
.BR #endif .
Other blanklines surrounding these will be swallowed.
Default: 
.B \-nbacc.
.TP
.BR \-bad , \-nbad
If
.B \-bad
is specified, a blank line is forced after every block of
declarations.  Default: 
.B \-nbad.
.TP
.BR \-bbb , \-nbbb
If
.B \-bbb
is specified, a blank line is forced before
every block comment.  Default:
.B \-nbbb.
.TP
.BR \-bc , \-nbc
If
.B \-bc
is specified, then a
.SM NEWLINE
is forced after each comma in a declaration.
.B \-nbc
turns off this option.  The default is
.BR \-bc .
.TP
.BR \-br , \-bl
Specifying
.B \-bl
lines up compound statements like this:
.ne 4
.RS
.RS
.nf
.ft B
if (\|.\|.\|.)
{
.ft R
.RS
.RS
.RS
.B code
.RE
.RE
.RE
.B }
.fi
.RE
.RE
.IP
Specifying
.B \-br
(the default) makes them look like this:
.ne 3
.RS
.RS
.sp .5
.nf
.ft B
if (...) {
.ft R
.RS
.RS
.RS
.B code
.RE
.RE
.RE
.B }
.fi
.RE
.RE
.LP
.TP
.BR \-bs , \-nbs
Enable (disable) the forcing of a blank after
.BR sizeof .
Some people believe that
.B sizeof
should appear as though it were a procedure call
(\fB\-nbs\fR,
the default) and some people believe that since
.B sizeof
is an operator, it should always be treated
that way and should always have a
blank after it.
.TP
.BI \-c n
The column in which comments on code start.  The default is 33. 
.TP
.BI \-cd n
The column in which comments on declarations start.  The default
is for these comments to start in the same column as those on code.
.br
.ne 5
.TP
.BI \-cdb , \-ncdb
Enable (disable) the placement of comment
delimiters on blank lines.  With
this option enabled, comments look like this:
.ne 3
.RS
.nf
.ft B
/*
* this is a comment
*/
.ft R
.fi
.RE
.LP
Rather than like this:
.IP
.B /* this is a comment */
.LP
This only affects block comments, not comments
to the right of code. The default is
.B \-cdb .
.TP
.BI \-ce , \-nce
Enables (disables) forcing
.BR else 's
to cuddle up to the immediately preceeding
.RB ` } '.
The default is
.BR \-ce .
.TP
.BI \-ci n
Sets the continuation indent to be
.IR n .
Continuation
lines will be indented that far from the
beginning of the first line of the
statement.  Parenthesized expressions have extra indentation added to
indicate the nesting, unless
.B \-lp
is in effect.
.B \-ci
defaults to the same value
as
.BR \-i .
.TP
.BI \-cli n
Cause case labels to be indented
.I n
tab stops to the right of the containing
.B switch
statement.
.B -cli0.5
causes case labels to be indented half a tab stop.
The
default is
.B \-cli0 .
.TP
.BI \-d n
Control the placement of comments which are not to the
right of code.  The default
.B \-d1
means that such comments are placed one indentation level to the
left of code.  Specifying
.B \-d0
lines up these comments with the code.  See the section on comment
indentation below.
.TP
.BI \-di n
Specify the indentation, in character
positions, from a declaration keyword
to the following identifier.  The default is
.B \-di16 .
.if 0 \{.TP 15
.BR \-dj , \-ndj
.B \-dj
left justifies declarations.
.B \-ndj
indents declarations the same as code.  The default is
.BR \-ndj .
.TP
.BI \-ei , \-nei
Enable (disables) special
.B else-if
processing.  If it's enabled,
.BR if "s"
following
.BR else "s"
will have the same indentation as the preceeding
.B if
statement.\}
.TP
.BR \-eei , \-neei
If
.B \-eei
is specified, and extra expression indent
is applied on continuation lines
of the expression part of
.BR if (\|)
and
.BR while (\|).
These continuation lines will
be indented one extra level \(em twice instead
of just once.  This is to avoid
the confusion between the continued expression
and the statement that
follows the
.BR if (\|)
or
.BR while (\|).
Default: 
.B \-neei.
.TP
.BI \-fc1 , \-nfc1
Enables (disables) the formatting of comments that start in column 1.
Often, comments whose leading
.RB ` / '
is in column 1 have been carefully
hand formatted by the programmer.  In such cases,
\fB\-nfc1\fR
should be
used.  The default is
.BR \-fc1 .
.TP
.BI \-i n
The number of spaces for one indentation level.  The default is 4.
.TP
.BI \-ip , \-nip
Enables (disables) the indentation of parameter
declarations from the left
margin.  The default is
.B \-ip .
.TP
.BI \-l n
Maximum length of an output line.  The default is 78.
.TP
.BI \-lc n
Sets the line length for block comments to
.IR n .
It defaults to being
the same as the usual line length as specified with
.BR \-l .
.TP
.BI \-lp , \-nlp
Lines up code surrounded by parenthesis
in continuation lines.  If a line
has a left paren which is not closed
on that line, then continuation lines
will be lined up to start at the character
position just after the left
parenthesis.  For example, here is how a piece
of continued code looks with
.B \-nlp
in effect:
.ne 2
.RS
.RS
.sp .5
.nf
.B "p1 = first_procedure(second_procedure(p2, p3),"
.B "                     third_procedure(p4, p5));"
.fi
.RE
.RE
.ne 5
.IP
With
.B \-lp
in effect (the default) the code looks somewhat
clearer:
.RS
.RS
.sp .5
.nf
.B "p1 = first_procedure(second_procedure(p2, p3),"
.B "                     third_procedure(p4, p5));"
.fi
.RE
.RE
.ne 5
.IP
Inserting a couple more
.SM NEWLINE
characters we get:
.RS
.RS
.sp .5
.nf
.B "p1 = first_procedure(second_procedure(p2,"
.B "                                      p3),"
.B "                     third_procedure(p4,"
.B "                                     p5));"
.fi
.RE
.RE
.TP
.B \-npro
Ignore the profile files,
.B .\|/.indent.pro
and
.BR ~/.indent.pro .
.TP
.B \-pcs , \-npcs
If true
.RB ( \-pcs )
all procedure calls will have a space inserted between
the name and the
.RB ' ( '.
The default is
.B \-npcs
.TP
.B \-psl , \-npsl
If true
.RB ( \-psl )
the names of procedures being defined are placed in
column 1 \(em their types, if any, will be
left on the previous lines.  The
default is
.BR -psl .
.TP
.BI \-sc , \-nsc
Enables (disables) the placement of asterisks
.RB (` * 's)
at the left edge of all
comments.
.TP
.BR \-sob , \-nsob
If
.B \-sob
is specified, indent will swallow optional
blank lines.  You can use this to
get rid of blank lines after declarations.  Default:
.B \-nsob
.TP
.B \-st
.B indent
takes its input from the standard input, and put its output to the
standard output.
.TP
.BI \-T " typename"
Add
.I typename
to the list of type keywords.  Names accumulate:
.B \-T
can be specified more than once.
You need to specify all the typenames that
appear in your program that are defined by
.BR typedef s
\(em nothing will
be harmed if you miss a few, but the
program won't be formatted as nicely as
it should.  This sounds like a painful thing
to have to do, but it is really a symptom of a problem in C:
.B typedef
causes a syntactic change in the
language and
.I indent
cannot find all
.BR typedef s.
.TP
.B \-troff
Causes
.B indent
to format the program for processing by
.BR troff .
It will produce a fancy
listing in much the same spirit as
.BR vgrind.
If the output file is not specified, the default is standard output,
rather than formatting in place.
The usual way to get a
.BR troff ed
listing is with the command
.RS
.IP
.BI "indent -troff " program.c " | troff -mindent"
.RE
.TP
.BR \-v , \-nv
.B \-v
turns on \(lqverbose\(rq mode,
.B \-nv
turns it off.  When in verbose mode,
.B indent
reports when it splits one line of input
into two or more lines of output,
and gives some size statistics at completion. The default is
.BR \-nv .
.SH "FURTHER DESCRIPTION"
.LP
You may set up your own \(lqprofile\(rq of defaults to
.B indent
by creating a file called
.B .indent.pro
in either your login directory or the
current directory and including
whatever switches you like.  An
.B .indent.pro
in the current directory takes
precedence over the one in your login directory.  If
.B indent
is run and a profile file exists, then
it is read to set up the program's
defaults.  Switches on the command line,
though, always override profile
switches.  The switches should be separated by
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE
characters.
.SS Comments
.TP 15
Boxed
.B indent
assumes that any comment with a dash or star
immediately after the start of
comment (that is,
.RB ` /*\-' or `/** ')
is a comment surrounded by a box of stars.
Each line of such a comment is left unchanged,
except that its indentation
may be adjusted to account for the change
in indentation of the first line
of the comment.
.br
.ne 5
.TP
Straight text
All other comments are treated as straight text.
.B indent
fits as many words (separated by
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE
characters) on a
line as possible.  Blank lines break paragraphs.
.SS Comment indentation
.LP
If a comment is on a line with code it is started
in the \(lqcomment column\(rq,
which is set by the
.BI \-c n
command line parameter.  Otherwise, the comment is started at
.I n
indentation levels less than where code is
currently being placed, where
.I n
is specified by the
.BI \-d n
command line parameter.  If the code on a
line extends past the comment
column, the comment starts further to the
right, and the right margin may be
automatically extended in extreme cases.
.SS Preprocessor lines
.LP
In general,
.B indent
leaves preprocessor lines alone.  The only
reformatting that it will do is to straighten
up trailing comments.  It
leaves imbedded comments alone.  Conditional compilation
.RB ( #ifdef\|.\|.\|.\|#endif )
is recognized and
.B indent
attempts to correctly
compensate for the syntactic peculiarities introduced.
.SS C syntax
.LP
.B indent
understands a substantial amount about the syntax of C, but
it has a \(lqforgiving\(rq parser.
It attempts to cope with the usual sorts of
incomplete and misformed syntax.
In particular, the use of macros like:
.IP
.B #define forever for(;;)
.LP
is handled properly.
.SH FILES
.PD 0
.TP 20
.B .\|/.indent.pro
profile file
.TP
.B ~/.indent.pro
profile file
.TP
.B /usr/share/lib/tmac/tmac.indent
troff macro package for 
.RB ` "indent \-troff" '
output.
.PD
.SH SEE ALSO
.BR ls (1V),
.BR troff (1)
.SH BUGS
.B indent
has even more switches than
.BR ls (1V).
.LP
A common mistake that often causes grief is typing:
.IP
.B indent *.c
.LP
to the shell in an attempt to indent all the C
programs in a directory.
This is probably a bug, not a feature.
.LP
The
.B \-bs
option splits an excessively fine hair.
lation block.  That is. in front of every
.B #ifdef
and after every
.BR #endif .
Other blanklines surrounding these will be swallowed.
Default: 
.B \-nbacc.
.TP
.BR \-bad , \-nbad
If
.B \-bad
is specified, a blank line is forced after every block of
declarations.  Default: 
.B \-nbad.
.TP
.BR \-bbb , \-nbbb
If
.B \-bbb
is specified, a blank line is forced before
every block comment.  Default:
.B \-nbbb.
.TP
.BR \-bc./share/man/man1/indentpro_to_defaults.1                                                               755       0      12          112  4424740664  13342                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)indentpro_to_defaults.1 1.4 89/03/26 SMI;
line.1  1      $ input_from_defaults.1         insert_brackets.1   
    	install.1   
    intro.1   
(    ipcrm.1   
8    ipcs.1 r  
H    jobs.1 s  
X    join.1 s  
l    
keylogin.1 s  
|    kill.1 n  
    label.1   
    last.1 e  
    
lastcomm.1 e  
    ld.1 omm  
    ldd.1 .1  
    leave.1   
    lex.1 av       limit.1       line.1 i     ./share/man/man1/indxbib.1                                                                             755       0      12         4221  4424740664  10413                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)indxbib.1 1.23 89/03/26 SMI; from UCB 4.1
.TH INDXBIB 1 "21 December 1987"
.SH NAME
indxbib \- create an inverted index to a bibliographic database
.SH SYNOPSIS
.B indxbib
.IR database-file .\|.\|.
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  indxbib  ""  "\fLindxbib\fP \(em make inverted index"
.IX  "document production"  "indxbib"  ""  "\fLindxbib\fP \(em make inverted index"
.IX  "bibliography"  "indxbib"  ""  "\fLindxbib\fP \(em make inverted index"
.B indxbib
makes an inverted index to the named
.I database-file
(which must reside within the current directory),
typically for use by
.BR lookbib (1)
and
.BR refer (1).
A
.I database
contains bibliographic references
(or other kinds of information) separated by blank lines.
.LP
A bibliographic reference is a set of lines, constituting fields of
bibliographic information.  Each field
starts on a line beginning with a
.RB ` % ',
followed by a key-letter, then a blank, and finally the
contents of the field, which may continue
until the next line starting with
.RB ` % '.
.LP
.B indxbib
is a shell script that calls two programs:
.B /usr/lib/refer/mkey
and
.BR /usr/lib/refer/inv .
.B mkey
truncates words to 6 characters,
and maps upper case to lower case.  It
also discards words shorter than 3 characters,
words among the 100 most
common English words, and numbers (dates) < 1900 or > 2000.  These
parameters can be changed.  See
.B refer
in
.TX DOCS
for details.
.LP
.B indxbib
creates an entry file (with a
.B .ia
suffix), a posting file
.RB ( .ib ),
and a tag file
.RB ( .ic ),
in the working directory.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/refer/mkey
.TP
.B /usr/lib/refer/inv
.TP
.IB x .ia
entry file
.TP
.IB x .ib
posting file
.TP
.IB x .ic
tag file
.TP
.IB x .ig
reference file
.PD
.SH SEE ALSO
.BR addbib (1),
.BR lookbib (1),
.BR refer (1),
.BR roffbib (1),
.BR sortbib (1)
.LP
.TX DOCS
.SH BUGS
All dates should probably be indexed,
since many disciplines refer to literature
written in the 1800s or earlier.
.LP
.B indxbib
does not recognize pathnames.
   B  popd.1     C  pr.1v     D  
printenv.1 C    E  prof.1 D       w.1     F  prs.1  v     G  prt.1   0  H  ps.1     @  I  ptx.1 0  P  J  pushd.1   `  K  pwd.1 P  p  L  quota.1     M  ranlib.1  L    N  rasfilter8to1.1     O  
rastrepl.1 f    P  rcp.1c O    Q  rdist.1     R  ./share/man/man1/inline.1                                                                              755       0      12        16524  4424740664  10303                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)inline.1 1.7 89/03/26 SMI; from UCB 4.3 BSD
.TH INLINE 1 "25 March 1989"
.SH NAME
inline \- in-line procedure call expander
.SH SYNOPSIS
.B /usr/lib/inline
.RB [ " \-w " ]
.RB [ " \-v " ]
.RB [ " \-o"
.IR outputfile " ]"
.RB [ " \-i"
.IR inlinefile " ] .\|.\|."
.RI [ " cpu-option " ]
.RI [ " fpu-option " ]
.IR filename .\|.\|.
.SH DESCRIPTION
.IX "inline command" "" "\fLinline\fR command" 
.IX "expand assembly-language calls in-line, \fLinline\fP"
.IX "procedure calls, assembler, expand in-line, \fLinline\fP"
.LP 
.B inline
expands assembly language calls in the indicated source files
into copies of the corresponding procedure bodies obtained from an
.IR inlinefile
specified with the
.B \-i
option.
If no 
.I inlinefile
is specified, the
source files are simply concatenated and written to the standard
output.  If no source files are specified, the input is read from
the standard input.
.LP
Inline itself is little more than a sed script.  Almost all of
the benefit produced is derived from subsequent peephole
optimization.
.SH OPTIONS
.TP
.B \-w 
Display warnings for duplicate definitions on the standard error.
.TP
.B \-v
Verbose.  Display the names of routines that were actually
in-line expanded in the sourcefile on the standard error.
.TP
.BI \-o " outputfile"
write output to the indicated file; standard output by default.
.TP
.BI \-i " inlinefile"
Read in-line code templates from 
.IR inlinefile .
.TP
.I cpu-option
Specify templates for the machine architecture of a Sun-2 or Sun-3
system.  If this option is omitted, the proper template for the
host architecture is used.  Can be one of:
.RS
.RS
.TP 10
.B \-mc68010
expand
.B .mc68010
code templates
.PD 0
.TP
.B \-mc68020
expand
.B .mc68020
code templates
.PD
.RE
.RE
.TP
.I fpu-option
Specify a floating-point processor option for a Sun-2 or Sun-3
system.  Can be one of:
.RS
.RS
.TP 10
.B \-fsoft
expand
.B .fsoft
code templates (the default)
.PD 0
.TP
.B \-fswitch
expand
.B .fswitch
code templates
.TP
.B \-fsky
expand
.B .fsky
code templates
.RB ( \-mc68010
only)
.TP
.B \-f68881
expand
.B .f68881
code templates
.RB ( \-mc68020
only)
.TP
.B \-ffpa
expand
.B .ffpa 
code templates
.RB ( \-mc68020
only)
.PD
.RE
.RE
.SH USAGE
Each 
.I inlinefile
contains one or more labeled assembly language templates of the form:
.RS
.nf
.ft I
inline-directive
\&.\|.\|.
instructions
\&.\|.\|.
\&.end
.ft R
.fi
.RE
.LP
where the
.I instructions
constitute an in-line expansion of the named routine.  An
.I "inline-directive"
is a command of the form:
.IP
.BI .inline "\ \ \ identifier" , " argsize"
.LP
This declares a block of code for the routine named by
.IR identifier ,
with
.I argsize
bytes of arguments.
.RI ( argsize
is optional on Sun-4 systems).   Calls to the named routine are replaced
by the code in the in-line template.
.br
.ne 10
.LP
For Sun-2 and Sun-3 systems, the following additional forms
are recognized:
.RS
.TP 9
.B "\&.mc68010
.IB "	identifier" , " argsize"
.PD 0
.TP
.B "\&.mc68020
.IB "	identifier" , " argsize"
.TP
.B "\&.fsoft
.IB "	identifier" , " argsize"
.TP
.B "\&.fswitch
.IB "	identifier" , " argsize"
.TP
.B "\&.fsky
.IB "	identifier" , " argsize"
.TP
.B \&.f68881
.IB "	identifier" , " argsize"
.TP
.B \&.ffpa
.IB "	identifier" , " argsize"
.DT
.PD
.RE
.LP
These forms are similar to
.BR .inline ,
with the addition of a
.SM CPU
or
.SM FPU
specification.  The template is only expanded if
the specified target system matches the value of the target
.SM CPU
or
.SM FPU
type, as determined by the command-line options, or
if none were given, by the type of the host system.
.LP
Multiple templates are permitted; matching templates after the first
are ignored.  Duplicate templates may be placed in order of decreasing
performance of the corresponding hardware; thus the most efficient
usable version will be selected.
.SS Coding Conventions for all Sun Systems
In-line templates should be coded as expansions of C-compatible
procedure calls,
with the difference that the return address cannot be depended
upon to be in the expected place, since no call instruction will
have been executed.  See 
.SM FILES,
below, for examples.
.LP
In-line templates must conform to standard Sun parameter passing
and register usage conventions, as detailed below.  They must
not call routines that violate these conventions; for example,
assembly language routines such as 
.BR setjmp (3)
may cause problems.
.LP
Registers other than the ones mentioned below must not be
used or set.
.LP
Branch instructions in an in-line template may only transfer
to numeric labels 
.RB ( 1f ,
.BR 2b ,
and so on) defined within the in-line
template.  No other control transfers are allowed.
.LP
Only opcodes and addressing modes generated by Sun
compilers are guaranteed to work.  Binary encodings of
instructions are not supported.
.LP
.SS Coding Conventions for Sun-2 and Sun-3 Systems
Arguments are passed in 32-bit aligned memory locations
starting at
.BR sp@ .
Note that there is no return address on
the stack, since no
.B jbsr
instruction will have been executed.
.LP
Results are returned in
.B d0
or
.BR d0/d1 .
.LP
The following registers may be used as temporaries: registers
.BR a0 ,
.BR a1 ,
.BR d0 ,
and
.BR d1
on the
.SM MC68010
and
.SM MC68020;
registers
.B fp0
and
.B fp1
on the
.SM MC68881;
registers
.B fpa0
through
.B fpa3
on the Sun Floating-Point Accelerator.  No other registers may be used.
.LP
The template must delete exactly
.I argsize
bytes from the
stack.  This is to enable 
.B inline
to deal with autoincrement and
autodecrement addressing modes, which in turn are used by
.B c2
to delimit the lifetimes of stack temporaries.
.LP
The stack must not underflow the level of the last argument.
.LP
Use
.BI j cc
branch mnemonics instead of
.BI b cc.
The 
.BI b cc
ops are span limited and will fail if retargeted to a label whose
span overflows the branch displacement field.
.SS Coding Conventions for Sun-4 Systems
Arguments are passed in registers
.BR %o0-%o5 ,
followed by memory locations starting at
.BR [%sp+0x5c] .
.B %sp
is guaranteed to be 64-bit aligned.  The contents of
.B %o7
are undefined, since no call instruction will have been executed.
.LP
Results are returned in
.B %o0
or
.BR %f0/%f1 .
.LP
Registers
.B %o0-%o5
and
.B %f0-%f31
may be used as temporaries.
.LP
Integral and single-precision floating-point arguments are
32-bit aligned.
.LP
Double-precision floating-point arguments are guaranteed to
be 64-bit aligned if their offsets are multiples of 8.
.LP
Each control-transfer instruction (branches and calls) must be
immediately followed by a nop.
.LP
Call instructions must include an extra (final) argument which
indicates the number of registers used to pass parameters
to the called routine.
.LP
Note that for Sun-4 systems, the instruction following an
expanded 'call' is inserted by
.B inline
.I before
the expanded code to preserve the semantics of the call's delay slot.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/inline
in-line procedure call expander
.TP
.B /usr/lib/fsoft/libm.il
in-line templates for software floating point (Sun-2 and Sun-3 only)
.TP
.B /usr/lib/fswitch/libm.il
in-line templates for switched floating point (Sun-2 and Sun-3 only)
.TP
.B /usr/lib/fsky/libm.il
in-line templates for Sky FFP (Sun-2 only)
.TP
.B /usr/lib/f68881/libm.il
in-line templates for Motorola 68881 (Sun-3 only)
.TP
.B /usr/lib/ffpa/libm.il
in-line templates for Sun FPA (Sun-3 only)
.PD
.SH WARNING
.B inline
does not check for violations of the coding conventions described
above.


 target system matches the value of the target
.SM CPU
or
.SM FPU
type, as determined by the command-line options, or
if none were given, by the type of the host system.
.L./share/man/man1/input_from_defaults.1                                                                 755       0      12         3605  4424740664  13052                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)input_from_defaults.1 1.14 89/03/26 SMI;
.TH INPUT_FROM_DEFAULTS 1 "21 December 1987"
.SH NAME
input_from_defaults, defaults_from_input \- update the current state of the mouse and keyboard from the defaults database, and vice versa
.SH SYNOPSIS
.IX "defaults, update kernel from \(em \fLinput_from_defaults\fR"
.IX defaults_from_input "" "\fLdefaults_from_input\fR \(em update defaults from kernel"
.IX input_from_defaults "" "\fLinput_from_defaults\fR \(em update kernel from defaults database"
.B input_from_defaults
.br
.B defaults_from_input
.\"--- DESCRIPTION section: a brief paragraph that summarizes the
.\"--- main function.  DO NOT describe options within this section.
.\"---
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B input_from_defaults
updates various parameters
controlling mouse- and keyboard-processing
on the machine on which it is run.  It should be used on
systems which are running the SunView
window system.  The parameters control
the distribution of function keys on the
keyboard, the assignment of buttons
on the mouse, the scaling of mouse-to-cursor
motion, and the effect of two
filters on mouse-motion originally provided
to compensate for defective
mice.  The new values are taken from the
defaults database, starting with
the file
.B .defaults
in the user's home
directory.

.LP
.B defaults_from_input
is the inverse operation to
.BR input_from_defaults .
It updates a the user's private defaults database (used by
.BR defaultsedit (1) )
to reflect the current state of
kernel
input parameters listed above.
.SH FILES
.PD 0
.TP 20
.B $\s-1HOME\s0/.defaults
.TP
.B /usr/lib/defaults/*.d
.PD
.SH "SEE ALSO"
.BR defaultsedit (1)
.LP
.TX SVBG
.SH BUGS
.LP
.B input_from_defaults
should be targetable
to any user's
.B .defaults
file.
iew.1     8  pack.1 w  $  9  page.1 k  8  :  
pagesize.1 k  L  ;  passwd.1 1   \  <  paste.1   l  =./share/man/man1/insert_brackets.1                                                                     755       0      12          110  4424740664  12127                                                                                                                                                                                                                                                                                                                                                                      .so man1/textedit_filters.1
.\" @(#)insert_brackets.1 1.4 89/03/26 SMI;
o.1   
(    ipcrm.1   
8    ipcs.1 (  
H    jobs.1 8  
X    join.1 H  
l    
keylogin.1   
|    kill.1   
    label.1   
    last.1   
    
lastcomm.1   
    ld.1    
    ldd.1 
  
    leave.1   
    lex.1 
       limit.1       line.1         lint.1v   0    list.1    @    ln.1  0  P    load.1 @  `    loadc.1   x    lockscreen.1  ./share/man/man1/install.1                                                                             755       0      12         5542  4424740664  10451                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)install.1 1.22 89/03/26 SMI;
.TH INSTALL 1 "25 March 1989"
.SH NAME
install \- install files
.SH SYNOPSIS
.B install
.RB [ " \-cs " ]
.RB [ " \-g "
.IR group " ]"
.RB [ " \-m "
.IR mode " ]"
.RB [ " \-o "
.IR owner " ]"
.I file1 file2
.LP
.B install
.RB [ " \-cs " ]
.RB [ " \-g "
.IR group " ]"
.RB [ " \-m "
.IR mode " ]"
.RB [ " \-o "
.IR owner " ]"
.I file .\|.\|.\ \|directory
.LP
.B install
.B " \-d "
.RB [ " \-g "
.IR group " ]"
.RB [ " \-m "
.IR mode " ]"
.RB [ " \-o "
.IR owner " ]"
.I directory
.SH AVAILABILITY
This command is available with the
.I Install Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  install  ""  "\fLinstall\fP \(em install files"
.IX  "programming tools"  "install"  ""  "\fLinstall\fP \(em install files"
.IX  "system administration"  "install"  ""  "\fLinstall\fP \(em install files"
Install is used within makefiles to copy new versions of
files into a destination directory and to create the destination
directory itself.
.LP
The first two forms are similar to the
.BR cp (1)
command with the addition
that executable files can be stripped during the copy and the
owner, group, and mode of the installed file(s) can be given.
.LP
The third form can be used to create a destination directory with
the required owner, group and permissions.
.LP
Note:
.B install
uses no special privileges to copy files from one place to another.
The implications of this are:
.RS
.PD 0
.TP 3
\(bu
You must have permission to read the files to be installed.
.TP 3
\(bu
You must have permission to copy into the destination file or directory.
.TP 3
\(bu
You must have permission to change the modes on the final copy of the
file if you want to use the
.B \-m
option to change modes. 
.TP 3
\(bu
You must be superuser if you want to specify the ownership of the
installed file with
.BR \-o .
If you are not the super-user, or if
.B \-o
is not in effect, the installed file will be owned by you,
regardless of who owns the original.
.PD
.RE
.SH OPTIONS
.TP 15
.BI \-g " group"
Set the group ownership of the installed file or directory.
(staff by default)
.TP
.BI \-m " mode"
Set the mode for the installed file or directory.
(0755 by default)
.TP
.BI \-o " owner"
If run as root, set the ownership of the installed file to the
user-ID of
.IR owner .
.TP
.B \-c
Copy files.
In fact
.B install
.I always
copies files, but the
.B \-c
option is retained for backwards compatibility with old shell
scripts that might otherwise break.
.TP
.B \-s
Strip executable files as they are copied.
.TP
.B \-d
Create a directory.
Missing parent directories are created as required
as in
.BR "mkdir \-p" .
If the directory already exists, the owner, group and mode
will be set to the values given on the command line.
.SH "SEE ALSO"
.BR chmod (1V),
.BR chgrp (1),
.BR cp (1),
.BR mkdir (1),
.BR strip (1),
.BR chown (8)
r " ]"
.I file .\|.\|.\ \|directory
.LP
.B install
.B " \-d "
.RB [ " \-g "
.IR group " ]"
.RB [ " \-m "
.IR mode " ]"
.RB [ " \-o "
.IR owner " ]"
.I directo./share/man/man1/intro.1                                                                               755       0      12           64  4424740665  10071                                                                                                                                                                                                                                                                                                                                                                      .so man1/Intro.1
.\" @(#)intro.1 1.4 89/03/26 SMI; 
ipcs.1 r  
H    jobs.1 s  
X    join.1 s  
l    
keylogin.1   
|    kill.1 n  
    label.1   
    last.1 e  
    
lastcomm.1   
    ld.1 omm  
    ldd.1 .1  
    leave.1   
    lex.1 av       limit.1       line.1 i       lint.1v   0    list.1 t  @    ln.1 ist  P    load.1 1  `    loadc.1   x    lockscreen.1  x     $ lockscreen_default.1 $       logger.1./share/man/man1/ipcrm.1                                                                               755       0      12         3641  4424740665  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ipcrm.1 1.6 89/03/26 SMI; from S5 6.2
.TH IPCRM 1 "9 September 1987"
.SH NAME
ipcrm \- remove a message queue, semaphore set, or shared memory ID
.SH SYNOPSIS
.B ipcrm
[
.I primitives
]
.SH DESCRIPTION
.IX  "interprocess communication"  ipcrm  ""  \fLipcrm\fP
.IX  "ipcrm command" "" "\fLipcrm\fR \(em remove interprocess communication identifiers"
.B ipcrm
removes one or several messages, semaphores, or shared
memory identifiers, as specified
by the following
.IR primitives :
.TP
.BI \-q\fP  " msqid"
removes the message queue identifier
.I msqid
from the system and destroys the message queue
and data structures associated with it.
.TP
.BI \-m\fP  " shmid"
removes the shared memory identifier
.I shmid
from the system.  The shared memory segment and data
structures associated with it are destroyed after
the last detach.
.TP
.BI \-s\fP  " semid"
removes the semaphore identifier
.I semid
from the system and destroys the set of semaphores and
data structures associated with it.
.TP
.BI \-Q\fP  " msgkey"
removes the message queue identifier, created with key
.IR msgkey ,
from the system and destroys the message queue
and data structures associated with it.
.TP
.BI \-M\fP  " shmkey"
removes the shared memory identifier, created with key
.IR shmkey ,
from the system.  The shared memory segment and data
structures associated with it are destroyed after
the last detach.
.TP
.BI \-S\fP  " semkey"
removes the semaphore identifier, created with key
.IR semkey ,
from the system and destroys the set of semaphores and
data structures associated with it.
.LP
The identifiers and keys may be found by using
.BR ipcs (1).
.LP
The details of removing identifiers are described in
.BR msgctl (2),
.BR shmctl (2),
and
.BR semctl (2)
in the sections detailing the
.B
.SM IPC_RMID
command.
.SH "SEE ALSO"
.BR ipcs (1),
.BR msgctl (2),
.BR msgget (2),
.BR semctl (2),
.BR semget (2),
.BR semop (2),
.BR shmctl (2),
.BR shmget (2),
.BR shmop (2)
 >  pdp11.1     ?  perfmeter.1     @  pg.1v 1     A  plot.1g     B  popd./share/man/man1/ipcs.1                                                                                755       0      12        16022  4424740665   7755                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ipcs.1 1.12 89/03/26 SMI; from System V 6.2
.TH IPCS 1 "22 March 1989"
.SH NAME
ipcs \- report interprocess communication facilities status
.SH SYNOPSIS
.B ipcs
[
.I primitives
]
.SH DESCRIPTION
.IX  "interprocess communication"  ipcs  ""  \fLipcs\fP
.IX  "ipcs command" "" "\fLiipcs\fR \(em display interprocess communication status"
.B ipcs
prints information about active interprocess communication facilities
as specified by the
.I primitives
shown below.
If no
.I primitives
are given,
information is printed in short format for message queues,
shared memory,
and semaphores that are currently active in the system.
.SS Command \- Line Primitives
.LP
If any of the
.I primitives
.BR \-m ,
.BR \-q ,
or
.B \-s
are specified,
information about only indicated facilities is printed.
If none of these are specified,
information about all three is printed.
.TP 15
.B \-q
Print information about active message queues.
.TP
.B \-m
Print information about active shared memory segments.
.TP
.B \-s
Print information about active semaphores.
.TP
.B \-b
Print the biggest allowable size information.
(Maximum number of bytes in messages on queue for message queues,
size of segments for shared memory,
and number of semaphores in each set for semaphores.)
See below for the meaning of columns in a listing.
.TP
.B \-c
Print creator's login name and group name.
See below.
.TP
.B \-o
Print information on outstanding usage.
(Number of messages on queue and total number
of bytes in messages on queue for
message queues and number of processes
attached to shared memory segments.)
.TP
.B \-p
Print process number information.
(Process
.SM ID
of last process to send a message and process
.SM ID
of last process to receive a message on message queues and process
.SM ID
of creating process and process
.SM ID
of last process to attach or detach on shared memory segments)\
See below.
.TP
.B \-t
Print time information.
(Time of the last control operation that changed the access permissions for
all facilities.
Time of last
.B msgsnd
and last
.B msgrcv
(see
.BR msgop (2))
on message queues,
last
.B shmat
and last
.B shmdt
(see
.BR shmop (2))
on shared memory,
last
.BR semop (2)
on semaphores.)
See below.
.TP
.B \-a
Use all display
.IR primitive s.
(This is a shorthand notation for
.BR \-b ,
.BR \-c ,
.BR \-o ,
.BR \-p ,
and
.BR \-t .)
.TP
.BI \-C " corefile"
Use the file
.I corefile
in place of
.BR /dev/mem .
.TP
.BI \-N " namelist"
The argument will be taken as the name of an alternate
.I filenamelist
.RB ( /vmunix
is the default).
.PP
The column headings and the meaning of the columns in an
.B ipcs
listing
are given below; the letters in parentheses indicate the
.I primitives
that cause the corresponding heading to appear;
.B all
means that the heading
always appears.
Note: these
.I primitives
only determine
what information is provided for each facility; they do
.I not
determine which facilities will be listed.
.ta .75i
.ne 5
.TP 16
.SM
.BR T\*S "	(all)"
Type of the facility:
.RS 20
.PD 0
.TP 6
.B q
message queue
.TP
.B m
shared memory segment
.TP
.B s
semaphore
.PD
.RE
.TP
.SM
.BR ID\*S "	(all)"
The identifier for the facility entry.
.TP
.SM
.BR KEY\*S "	(all)"
The key used as an argument to
.BR msgget (2),
.BR semget (2),
or
.BR shmget (2)
to create the facility entry.
(Note:
The key of a shared memory segment is changed to
.SM
.B IPC_PRIVATE
when the segment has been removed until all processes attached to the segment
detach it.)
.TP
.SM
.BR MODE\*S "	(all)"
The facility access modes and flags:
The mode consists of 11 characters that are interpreted as follows:
.ne 4
.RS
.IP
The first two characters are:
.RS
.PD 0
.TP 4
.B R
If a process is waiting on a
.BR msgrcv .
.TP
.B S
If a process is waiting on a
.BR msgsnd .
.TP
.B D
If the associated shared memory segment has been removed.
It will disappear when the last process attached to the segment
detaches it.
.TP
.B C
If the associated shared memory segment is to be cleared when the
first attach is executed.
.TP
.B \-
If the corresponding special flag is not set.
.RE
.PD
.IP
The next 9 characters are interpreted as three sets of three bits each.
The first set refers to the owner's permissions;
the next to permissions of others in the user-group of the facility entry;
and the last to all others.
Within each set, the first character indicates permission to read,
the second character indicates permission to write
or alter the facility entry,
and the last character is currently unused.
.IP
The permissions are indicated as follows:
.RS
.PD 0
.TP 4
.B r
If read permission is granted.
.TP
.B w
If write permission is granted.
.TP
.B a
If alter permission is granted.
.TP
.B \(em
If the indicated permission is
.I not
granted.
.RE
.RE
.PD
.TP
.SM
.BR OWNER\*S "	(all)"
The login name of the owner of the facility entry.
.TP
.SM
.BR GROUP\*S "	(all)"
The group name of the group of the owner of the facility entry.
.TP
.SM
.BR CREATOR\*S "	(a,c)"
The login name of the creator of the facility entry.
.TP
.SM
.BR CGROUP\*S "	(a,c)"
The group name of the group of the creator of the facility entry.
.TP
.SM
.BR CBYTES\*S "	(a,o)"
The number of bytes in messages currently outstanding on the associated
message queue.
.TP
.SM
.BR QNUM\*S "	(a,o)"
The number of messages currently outstanding on the associated message queue.
.TP
.SM
.BR QBYTES\*S "	(a,b)"
The maximum number of bytes allowed in messages outstanding on the associated
message queue.
.TP
.SM
.BR LSPID\*S "	(a,p)"
The process
.SM ID
of the last process to send a message to the associated queue.
.TP
.SM
.BR LRPID\*S "	(a,p)"
The process
.SM ID
of the last process to receive a message from the associated queue.
.TP
.SM
.BR STIME\*S "	(a,t)"
The time the last message was sent to the associated queue.
.TP
.SM
.BR RTIME\*S "	(a,t)"
The time the last message was received from the associated queue.
.TP
.SM
.BR CTIME\*S "	(a,t)"
The time when the associated entry was created or changed.
.TP
.SM
.BR NATTCH\*S "	(a,o)"
The number of processes attached to the associated shared memory segment.
.TP
.SM
.BR SEGSZ\*S "	(a,b)"
The size of the associated shared memory segment.
.TP
.SM
.BR CPID\*S "	(a,p)"
The process
.SM ID
of the creator of the shared memory entry.
.TP
.SM
.BR LPID\*S "	(a,p)"
The process
.SM ID
of the last process to attach or detach the shared memory segment.
.TP
.SM
.BR ATIME\*S "	(a,t)"
The time the last attach was completed to the associated shared memory
segment.
.TP
.SM
.BR DTIME\*S "	(a,t)"
The time the last detach was completed on the associated shared memory
segment.
.TP
.SM
.BR NSEMS\*S "	(a,b)"
The number of semaphores in the set associated with the semaphore entry.
.TP
.SM
.BR OTIME\*S "	(a,t)"
The time the last semaphore operation was completed on the set associated
with the semaphore entry.
.DT
.PD
.SH FILES
.PD 0
.TP 20
.B /vmunix
system namelist
.TP
.B /dev/mem
memory
.TP
.B /etc/passwd
user names
.TP
.B /etc/group
group names
.PD
.SH SEE ALSO
.BR ipcrm (1),
.BR msgop (2),
.BR semctl (2),
.BR semget (2),
.BR semop (2),
.BR shmctl (2),
.BR shmget (2),
.BR shmop (2)
.SH BUGS
Things can change while
.B ipcs
is running; the picture it gives is only a close
approximation to reality.
to shared memory segments.)
.TP
.B \-p
Print process number information.
(Process
.SM ID
of last process to send a message and process
.SM ID
of last process to receive a message on message queues and process
.SM ID
of creating process and process
.SM ID
of last process to attach or detach on shared memory segments)\
See below.
.TP
.B \-t
Print time information.
(Time of the last control operation that changed the access permissions for
all facilities.
Time of last
.B msgsnd
and last
.B ms./share/man/man1/jobs.1                                                                                755       0      12           72  4424740665   7672                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)jobs.1 1.8 89/03/26 SMI; 
in.1 l  
|    kill.1 l  
    label.1   
    last.1    
    
lastcomm.1   
    ld.1 1   
    ldd.1    
    leave.1   
    lex.1 1        limit.1       line.1         lint.1v   0    list.1    @    ln.1 1    P    load.1    `    loadc.1   x    lockscreen.1       $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       ./share/man/man1/join.1                                                                                755       0      12         6711  4424740665   7742                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)join.1 1.17 89/03/26 SMI; from S5R2 6.3 83/09/02
.TH JOIN 1 "16 February 1988"
.SH NAME
join \- relational database operator
.SH SYNOPSIS
.B join
[
.BI \-a n
] [
.BI \-e " string"
] [
.B \-j
.RB [ 1 \(or 2 ]
.I m
] [
.BI \-o " list"
] [
.BI \-t c
]
.if n .ti +0.5i
.I filename1
.I filename2
.SH DESCRIPTION
.IX  "join command"  ""  "\fLjoin\fP \(em relational database operator"
.IX  "relational database operator \(em \fLjoin\fP"
.IX  "database operator \(em \fLjoin\fP"
.B join
forms, on the standard output, a join of the two relations specified
by the lines of
.I filename1
and
.IR filename2 .
If
.I filename1
is
.RB ` \- ',
the standard input is
used.
.LP
.I filename1
and
.I filename2
must be sorted in increasing
.SM ASCII
collating sequence on the fields
on which they are to be joined \(em normally the first in each line.
.LP
There is one line in the output for each pair of lines in
.I filename1
and
.I filename2
that have identical join fields.  The output line normally consists of
the common field, then the rest of the line from
.IR filename1 ,
then the rest of the line from
.IR filename2 .
.LP
The default input field separators are
.SM SPACE\s0,
.SM TAB\s0,
and
.SM NEWLINE
characters.
If the default input field separators are used,
multiple separators count as one field separator,
and leading separators are ignored.
The default output field separator is a blank.
.SH OPTIONS
.TP
.BI \-a n
The parameter
.I n
can be one of the values:
.RS
.PD 0
.TP
1
Produce a line for each unpairable line in
.IR filename1 .
.TP
2
Produce a line for each unpairable line in
.IR filename2 .
.TP
3
Produce a line for each unpairable line in both
.IR filename1 " and " filename2 .
.PD
.RE
.IP
The normal output is also produced.
.TP
.BI \-e " string"
Replace empty output fields by
.IR string .
.TP
.BI \-j\fP\^[\fB1\fR\||\|\fB2\fR]  m
The
.B j
may be immediately followed by
.IR n ,
which is either a
.B 1
or a
.BR 2 . 
If
.I n
is missing, the join is on the
\fIm\fR'th
field of both files.  If
.I n
is present, the join is on the
\fIm\fR'th
field of file
.IR n ,
and
the first field of the other.  Note:
.B join
counts fields from 1 instead of 0 as
.BR sort (1V)
does.
.TP
.BI \-o \ list
Each output line comprises the fields specified in
.IR list ,
each element of which has the form
.IB n . m ,
where
.I n
is a file number and
.I m
is a field number.
The common field is not printed unless specifically requested.
Note:
.B join
counts fields from 1 instead of 0 like
.B sort
does.
.LP
.TP
.BI \-t c
Use character
.I c
as a separator (tab
character).  Every appearance of
.I c
in a line is significant.
The character
.I c
is used as the field separator for both
input and output.
.SH EXAMPLE
The following command line will join
the password file and the group file,
matching on the numeric group
.SM ID\s0,
and outputting
the login name, the group name and the login
directory.
It is assumed that the files have been sorted in
.SM ASCII
collating sequence on the group
.SM ID
fields.
.LP
.IP
.B "join \-j1 4 \-j2 3 \-o 1.1 2.1 1.6 \-t: /etc/passwd /etc/group"
.SH "SEE ALSO"
.BR awk (1),
.BR comm (1),
.BR look (1),
.BR sort (1V),
.BR uniq (1)
.SH BUGS
With default field separation, the collating sequence is that of
.BR "sort \-b" ;
with
.BR \-t ,
the sequence is that of a plain sort.
.LP
The conventions of
.BR join ,
.BR sort ,
.BR comm ,
.BR uniq ,
.BR look ,
and
.B awk
are wildly incongruous.
.PP
Filenames that are numeric may cause conflict
when the
.B \-o
option is used right before listing filenames.
   snap.1        soelim.1        sort./share/man/man1/keylogin.1                                                                            755       0      12         1420  4424740665  10614                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)keylogin.1 1.7 89/03/26 SMI;
.TH KEYLOGIN 1 "9 September 1987"
.SH NAME
keylogin \- decrypt and store secret key
.SH SYNOPSIS
.B keylogin
.SH DESCRIPTION
.IX "keylogin command" "" "\fLkeylogin\fR command" 
.LP
.B keylogin
prompts the user for their login password, and uses it do decrypt
the user's secret key stored in the
.BR publickey (5)
database. Once decrypted, the user's key is stored by the local
key server process
.BR keyserv (8C)
to be used by any secure network services, such as
.SM NFS\s0.
.LP
Normally,
.BR login (1)
does this work when the user logs onto the system, but running
.B keylogin
may be necessary if
the user did not type a password to
.BR login (1).
.SH "SEE ALSO"
.BR chkey (1),
.BR login (1),
.BR publickey (5),
.BR keyserv (8C),
.BR newkey (8)
faults.1 ail       
mailtool.1        make.1         man.1     4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 H  h    mkdir.1   x    mkstr.1       more.1        mt.1 1        mv.1./share/man/man1/kill.1                                                                                755       0      12         4671  4424740666   7742                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)kill.1 1.12 89/03/26 SMI; from UCB 4.3
.TH KILL 1 "16 November 1987"
.SH NAME
kill \- send a signal to a process, or terminate a process
.SH SYNOPSIS
.B kill
[
.BI \- signal
]
.I pid
\fB\&.\|.\|.\fP
.br
.B kill
.B \-l
.SH DESCRIPTION
.IX  "kill command"  ""  "\fLkill\fP \(em terminate process"
.IX  process  terminate  ""  "terminate \(em \fLkill\fR"
.IX send "signal to process \(em \fLkill\fR"
.B kill
sends the
.SB TERM
(terminate, 15) signal to the processes with the specified
.IR pid s.
If a signal name or number preceded by
.RB ` \- '
is given as first argument, that signal is sent instead of terminate.
The signal names are listed by using the
.B \-l
option, and are as given in
.BR /usr/include/signal.h ,
stripped of the common
.SB SIG
prefix.
.LP
The terminate signal will kill processes that do not catch the signal, so
.RB ` "kill \-9 " .\|.\|.'
is a sure kill, as the
.SB KILL
.B (9)
signal cannot be caught.
By convention, if process number 0 is specified, all members
in the process group (that is, processes resulting from 
the current login) are signaled (but beware: this works only if you use
.BR sh (1);
not if you use
.BR csh (1).)
Negative process numbers also have special meanings; see
.BR kill (2V)
for details.
The killed processes must belong to the current user unless
he is the super-user.
.LP
To shut the system down and bring it up single user
the super-user may send the initialization process a
.SB TERM
(terminate) signal by
.RB ` "kill 1" ';
see
.BR init (8).
To force
.B init
to close and open terminals according to what is currently in
.B /etc/ttytab
use
.RB ` kill "\-\s-1HUP\s0 1" '
(sending a hangup, signal 1).
.LP
The shell reports the process number of an asynchronous process
started with
.RB ` & '
(run in the background).
Process numbers can also be found by using
.BR ps (1).
.LP
.B kill
is built in to
.BR csh (1);
it allows job specifiers, such as
.RB ` "kill  % " \|.\|.\|.',
in place of
.B kill
arguments.  See
.BR csh (1)
for details.
.SH OPTIONS
.TP
.B \-l
Display a list of signal names.
.SH FILES
.PD 0
.TP 20
.B /etc/ttytab
.TP
.B /usr/include/signal.h
.PD
.SH "SEE ALSO"
.BR csh (1),
.BR ps (1),
.BR kill (2V),
.BR sigvec(2),
.BR init (8)
.SH BUGS
A replacement for
.RB ` "kill  0" '
for
.BR csh (1)
users should be provided.
 .  
old-sun3cvt.1 D  \  /  old-syslog.1  \  t  0  
old-ttyt./share/man/man1/label.1                                                                               755       0      12           73  4424740666  10016                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)label.1 1.8 89/03/26 SMI; 
m.1   
    ld.1 1    
    ldd.1 mm  
    leave.1   
    lex.1 1        limit.1       line.1         lint.1v   0    list.1    @    ln.1 1 t  P    load.1 t  `    loadc.1   x    lockscreen.1       $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,./share/man/man1/last.1                                                                                755       0      12         4103  4424740666   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)last.1 1.15 89/03/26 SMI;
.TH LAST 1 "9 September 1987"
.SH NAME
last \- indicate last logins by user or terminal
.SH SYNOPSIS
.B last
[
.BI \- number
][
.B \-f
.I filename
] [
.IR name .\|.\|.
] [
.IR tty .\|.\|.
]

.SH DESCRIPTION
.IX  "last command"  ""  "\fLlast\fP \(em list last logins"
.IX  login  "list last"  ""  "list last \(em \fLlast\fP"
.IX  "sign-on last \(em \fLlast\fP"
.IX  users  "list last logins"  ""  "list last logins \(em \fLlast\fP"
.B last
looks back in the
.B wtmp
file which records all logins and logouts for information about
a user, a teletype or any group of users and teletypes.
Arguments specify names of users or teletypes of interest.
Names of teletypes may be given fully or abbreviated.
For example
.B last 0
is the same as
.BI last tty0\fR.
If multiple arguments are given, the information which applies
to any of the arguments is printed.  For example
.B last root console
would list all of ``root's'' sessions as well as all sessions
on the console terminal.
.B last
displays the sessions of the specified users and teletypes,
most recent first, indicating the times at which the session
began, the duration of the session, and the teletype which the
session took place on.
If the session is still continuing or was cut short by a reboot,
.B last
so indicates.
.LP
The pseudo-user
.B reboot
logs in at reboots of the system, thus
.IP
.B last reboot
.LP
will give an indication of mean time between reboot.
.LP
.B last
with no arguments displays a record of all logins and logouts, in
reverse order.
.LP
If
.B last
is interrupted, it indicates how far the search has progressed in
.B wtmp.
If interrupted with a quit signal (generated by a
.SM CTRL\s0-\e)
.B last
indicates how far the search has progressed so far, and the search continues.
.SH OPTIONS
.TP
.BI \- number
limit the number of entries displayed to that specified by
.IR number.
.TP
.BI \-f " filename"
Use
.I filename
as the name of the accounting file instead of
.BR /var/adm/wtmp .
.SH FILES
.PD 0
.TP 20
.B /var/adm/wtmp	
login data base
.PD
.SH "SEE ALSO"
.BR lastcomm (1),
.BR utmp (5),
.BR ac (8)
L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  L  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c     `  
rupt./share/man/man1/lastcomm.1                                                                            755       0      12         3621  4424740666  10620                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lastcomm.1 1.18 89/03/26 SMI; from UCB 4.1
.TH LASTCOMM 1 "22 March 1989"
.SH NAME
lastcomm \- show the last commands executed, in reverse order
.SH SYNOPSIS
.B lastcomm
[
.I command-name
] .\|.\|. [
.I user-name
] .\|.\|. [
.I terminal-name
] .\|.\|.
.SH DESCRIPTION
.IX  "lastcomm command"  ""  "\fLlastcomm\fP \(em display last commands"
.IX  display "last commands \(em \fLlastcomm\fP"
.LP
.B lastcomm
gives information on previously executed commands.
.B lastcomm
with no arguments displays information about all the commands recorded
during the current accounting file's lifetime.  If called with arguments,
.B lastcomm
only displays accounting entries with a matching
.IR command-name ,
.IR user-name ,
or
.IR terminal-name .
.SH EXAMPLES
.LP
The command:
.IP
.B example% lastcomm a.out root ttyd0
.LP
would produce a listing of all the executions of commands named
.BR a.out ,
by user
.B root
while using the terminal
.BR ttyd0 .
and
.IP
.B example% lastcomm root
.LP
would produce a listing of all the commands executed by user
.BR root .
.LP
For each process entry,
.B lastcomm
displays the following items of information:
.RS
.TP 3
\(bu
The command name under which the process was called.
.TP 3
\(bu
One or more flags indicating special information about the process.  The
flags have the following meanings:
.RS
.TP 3
.B F
The process performed a
.B fork
but not an
.BR exec .
.TP 3
.B S
The process ran as a set-user-id program.
.TP 3
.B D
The process dumped memory.
.TP 3
.B X
The process was killed by some signal.
.RE
.TP 3
\(bu
The name of the user who ran the process.
.TP 3
\(bu
The terminal which the user was logged in on at the time (if applicable).
.TP 3
\(bu
The amount of
.SM CPU
time used by the process (in seconds).
.TP 3
\(bu
The date and time the process exited.
.RE
.SH FILES
.PD 0
.TP 20
.B /var/adm/acct
accounting file
.PD
.SH "SEE ALSO"
.BR last (1),
.BR sigvec (2),
.BR acct (5),
.BR core (5)
 E  prof.1        w.1     F  prs.1 1      G  prt.1 1   0  H  ps.1  1   @  I  ptx.1  ./share/man/man1/ld.1                                                                                  755       0      12        53127  4424740666   7426                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ld.1 1.44 89/03/26 SMI;  
.TH LD 1 "18 February 1988"
.SH NAME
ld, ld.so \- link editor, dynamic link editor
.SH SYNOPSIS
.B ld
[
.BI \-align " datum"
] [
.BI \-assert " assertion-keyword"
]
.if n .ti +0.5i
[
.BI \-A " name"
] [
.BI \-B "binding-keyword"
] [
.B \-d
] 
.if t .ti +0.5i
[
.B \-dc
]
.if n .ti +0.5i
[
.B \-dp
] [
.BI \-D " hex"
] [
.BI \-e " entry"
] [
.BI \-l x
] [
.BI \-L dir
]
.if n .ti +0.5i
[
.B \-M
] [
.B \-n
] [
.B \-N
] [
.BI \-o " name"
] [
.B \-p
]
.if t .ti +0.5i
[
.B \-r
] [
.B \-s
] [
.B \-S
]
.if n .ti +0.5i
[
.B \-t
] [
.BR \-T \|[\| text \|]
.I hex
] [
.BI \-Tdata " hex"
] [
.BI \-u " name"
]
.if n .ti +0.5i
[
.B \-x
] [
.B \-X
] [
.BI \-y sym
] 
.if t .ti +0.5i
[
.B \-z
] 
.I filename
\&.\|.\|.
.SH DESCRIPTION
.IX  "ld command"  ""  "\fLld\fP \(em link editor"
.IX  "programming tools"  "ld command"  ""  "\fLld\fP \(em link editor"
.IX  "link editor"  ""  "link editor \(em \fLld\fP"
.LP
.B ld
combines object programs to create an
.I executable
file or another object program suitable for further
.B ld
processing
(with the 
.B \-r
option).  The object modules on which 
.B ld
operates are specified on the command line, and can be:
.RS
.TP 3
\(bu
simple object files, which typically end in the
.BR .o 
suffix, and are referred to as \(lqdot-oh\(rq files
.TP 3
\(bu
.BR ar (1V)
library archives
.RB ( .a ),
or \(lqlibraries\(rq
.TP 3
\(bu
dynamically-bound, sharable object files 
.RB ( .so ),
are also referred to as \(lqshared libraries,\(rq
which are created from previous
.B ld
executions.
.RE
.LP
Unless an output file is specified,
.B ld
produces a file named
.BR a.out .
This file contains the object files given as input,
appropriately combined to form an executable file.
.SH OPTIONS
When linking debugging or profiling objects, include the
.B \-g
or
.B \-pg
option (see
.BR cc (1V)),
as appropriate, in the
.B ld
command.
.LP
Options should appear before
filenames, except for abbreviated library
names specified with
.B \-l
options, and some binding control options specified by
.BR \-B 
(which can appear anywhere in the line).
.TP 
.BI \-align " datum"
Force the global uninitialized data symbol
.I datum
(usually a 
.SM FORTRAN 
common block) to be page-aligned.  Increase its size to a whole number of
pages, and place its first byte at the start of a page.
.TP
.BI \-assert " assertion-keyword"
Check an assertion about the link editing being performed.  The assertion
desired is specified by the
.I assertion-keyword
string.
.B ld
is silent if the assertion holds, else it yields a diagnostic and aborts.
Valid
.IR assertion-keyword 's
and their interpretations are:
.RS
.RS
.TP 15
.B definitions
If the resulting program were run now, there would be no run-time undefined
symbol diagnostics.  This assertion is set by default.
.TP
.B nosymbolic
There are no symbolic relocation items remaining to be resolved.
.TP
.B pure-text
The resulting load has no relocation items remaining in its text.
.RE
.RE
.TP
.BI \-A " name"
Incremental loading: linking is to be done in a manner so that the
resulting object may be read into an already executing program. 
.I name
is the name of a file whose symbol table is taken as a basis
on which to define additional symbols.
Only newly linked material is 
entered into the text and data portions of 
.BR a.out ,
but the new symbol table will reflect all symbols defined before and after
the incremental load. 
This argument must appear before any other object
file in the argument list.
One or both of the 
.B \-T
options may be used as well, and will be taken to mean that the newly linked
segment will commence at the corresponding addresses (which must be a multiple
of the page size). 
The default value is the old value of 
.BR _end .
.br
.ne 10
.TP
.BI \-B binding-keyword
Specify allowed binding times for the items which follow.  Allowed values of
.I binding-keyword
are:
.RS
.TP 15
.B dynamic
Allow dynamic binding: do not resolve symbolic references, allow creation of
run-time symbol and relocation environment. 
.B -Bdynamic
is the default.
When
.B \-Bdynamic
is in effect, all sharable objects encountered until a 
succeeding
.B \-Bstatic
may be added dynamically to the object being 
linked.  Non-sharable objects are bound statically.
.TP
.B nosymbolic
Do not perform symbolic relocation, even if other options imply it.
.TP
.B static
Bind statically.  Opposite of
.BR \-Bdynamic .
Implied when either
.B \-n
or
.B \-N
is specified.  Influences handling of all objects
following its specification on a command line until the next
.BR \-Bdynamic .
.TP
.B symbolic
Force symbolic relocation.  Normally implied if an entry point has been
specified with
.BR \-e ,
or if dynamic loading is in effect.
.RE
.TP 
.B  \-d
Force common storage for uninitialized variables and other
common symbols to be allocated in the current 
.B ld
run, even when the
.B \-r
flag is present (which would otherwise postpone this binding
until the final linking phase).
.TP
.B \-dc
Do
.BR \-d ,
but also copy initialized data referenced by this program
from shared objects.
.TP
.B \-dp
Force an alias definition of undefined procedure entry points. 
Used with dynamic binding to improve sharing and the locality
of run-time relocations.
.TP
.BI \-D " hex"
Pad the data segment with zero-valued bytes to make it
.I hex
bytes long.
.TP
.BI \-e " entry"
Define the entry point: the
.I entry
argument is made the 
name of the entry point of the loaded program.  Implies
.BR \-Bsymbolic .
.TP 
.BI \-l x\|\fR[ . v\|\fR] 
This option is an abbreviation for the library name
.BI lib x .a\fR,
where
.I x
is a string.  
.B ld
searches for libraries first in any directories specified with
.B \-L
options, then in the standard directories
.BR /lib ,
.BR /usr/lib ,
and
.BR /usr/local/lib .
A library is searched when its name is encountered, 
so the placement of a
.B \-l
is significant.  If a dynamically loadable object is found, and 
.B \-Bdynamic
is in effect at that point on the command line, then
.B ld
prepares to access the object for relocation at run-time.  In such a
case, the optional
.BI . v
suffix can be used to indicate a specific library version.
.br
.ne 5
.TP
.BI \-L dir
Add
.I dir
to the list of directories in which to search for libraries.
Directories specified with 
.B \-L
are searched before the standard directories,
.BR /lib ,
.BR /usr/lib ,
and
.BR /usr/local/lib .
.TP
.B \-M
Produce a primitive load map, listing the names of the files
which will be loaded.
.TP 
.B  \-n
Arrange (by giving the output file a 0410 \(lqmagic number\(rq)
that when the output
file is executed, the text portion will be read-only with the data areas
placed at the beginning of the next address boundary following the end of
the text.  Implies
.BR \-Bstatic .
.TP
.B \-N
Do not make the text portion read-only.  (Use \(lqmagic number\(rq 0407.)
Implies
.BR \-Bstatic .
.TP 
.BI  \-o " name"
.I name
is made the name of the
.B ld
output file, instead of
.BR a.out .
.TP 
.B \-p
Arrange for the data segment to begin on a page boundary, even if the text is 
not shared (with the
.B \-N
option).
.TP 
.B  \-r
Generate relocation bits in the output file
so that it can be the subject of another
.B ld
run.  This flag also prevents final definitions from being given to common
symbols, and suppresses the \(lqundefined symbol\(rq diagnostics.
.TP 
.B \-s
Strip the output, that is, remove the symbol table and relocation bits to save
space (but impair the usefulness of the debuggers).  This information can also
be removed by
.BR strip (1).
.TP
.B \-S
Strip the output by removing all symbols except locals and globals.
.TP
.B \-t
Trace: display the name of each file as it is processed.
.br
.ne 5
.TP
.BR \-T \|[\| text \|]\| \fIhex\fR
Start the text segment at location
.IR hex .  
Specifying 
.B \-T
is the same as using the
.B \-Ttext
option.
.TP
.BI \-Tdata " hex"
Start the data segment at location
.IR hex .
This option is only of use
to programmers wishing to write code for 
.SM PROM\s0s,
since the resulting code cannot be executed by the system.
.TP 
.BI  \-u " name"
Enter
.I name
as an undefined symbol.
This is useful for loading
wholly from a library, since initially the symbol table is empty and an
unresolved reference is needed to force the loading of the first routine.
.TP 
.B  \-x
Preserve only global (non-\fB.globl\fP) symbols in the output symbol
table; only enter external symbols.
This option saves some space in the output file.
.TP 
.B \-X
Record local symbols, except for those whose names begin with
.BR L .
This option is used by
.B cc
to discard internally generated labels while
retaining symbols local to routines.
.TP
.BI \-y sym
Display each file in which
.I sym
appears, its type and whether the file defines or references it.
Many such options may be given to trace many symbols.
It is usually necessary to begin
.I sym
with an
.RB ` _ ',
as external C,
.SM FORTRAN
and Pascal variables begin
with underscores.
.TP
.B \-z
Arrange for the process demand paged from the resulting executable
file (0413 \(lqmagic number\(rq).  This is the default.
Results in a (32-byte) header on the output file followed by
text and data segments, each of which has a multiple of page-size
bytes (being padded out with
.SM NULL
characters in the file if necessary).
With this format the first few
.SM BSS
segment symbols may actually end up
in the data segment;
this is to avoid wasting the space resulting from rounding the data 
segment size.  Implies
.BR \-Bdynamic .
.SH USAGE
.SS Command Line Processing
.LP
In general, options should appear ahead of the list of files to
process.  Unless otherwise specified, the
effect of an option covers all of
.B ld
operations, independent
of that option's placement on the command line.  Exceptions to this
rule include some of the binding control options specified by
.RB ` \-B '
and the abbreviated library-names specified by
.RB ` \-l '.
These may appear
anywhere, and their influence is dependent upon their location.  
Some options may be obtained from
environment variables, such options are interpreted before any
on the command line (see
.SM ENVIRONMENT\s0,
below).
.SS Object File Processing
.LP
The files specified on the command line are processed in
the order listed.  Information is extracted from each file,
and concatenated to form the output.  The specific
processing performed on a given file depends upon whether it is
a simple object file, a library archive, or a shared library.
.LP
Simple object
.RB ( .o )
files are concatenated to the output as they are encountered.
.LP
Library archive
.RB  ( .a )
files are searched exactly once each, as each is encountered;
only those archive entries matching an unresolved external reference
are extracted and concatenated to the output.  If a member of an
archive references a symbol defined by another member of that same
archive, the member making the reference must appear before the
member containing the definition.
.LP
On Sun386i, a library contains a dictionary of symbols,  On
other Sun systems, processing library archives through
.BR ranlib (1)
provides this dictionary.  In addition, you can use 
.BR lorder (1),
in combination with
.BR tsort (1)
to place library members in calling order (see 
.BR lorder (1)
for details), or both (for fastest symbol lookup).
The first member of an archived processed by
.B ranlib 
has the reserved name of
.BR _\^_.\s-1SYMDEF\s0 ,
which
.B ld
takes to be the dictionary of all symbols defined by
members of the archive.
.LP
Sharable objects
.RB ( .so )
are scanned for symbol definitions and references, 
but are not normally included in the output from
.BR ld ,
except in cases where a shared library exports initialized data
structures and the
.B \-dc
option is in effect.  However, the
occurrence of each sharable object file in the
.BR ld
command line is noted in the resulting executable file; this
notation is utilized by an execution-time variant of
.BR ld ,
.BR ld.so ,
for
.I deferred
and
.I dynamic
loading and binding during execution.
See
.BR "Execution-Time Loading" ,
below, for details.
.LP
The
.B \-l
option specifies a short name for an object
file or archive used as a library.
The full name of the object file is
derived by adding the prefix 
.B lib
and a suffix of either
.B .a
or
.BR .so [ .\c
.IR v ]
to indicate an 
.BR ar (1V)
archive or a shared library, respectively.
The specific suffix used is determined through rules discussed in
.BR "Binding and Relocation Semantics" ,
below.
.LP
.B ld
searches for the desired object file through a list of
directories specified by
.B \-L
options, the environment variable
.BR \s-1LD_LIBRARY_PATH\s0 ,
and finally, the built-in list of standard library directories:
.BR /lib ,
.BR /usr/lib ,
and
.BR /usr/local/lib .
.
.SS Binding and Relocation Semantics
.LP
The manner in which
.B ld
processes a given object file is
dependent in part upon the \(lqbinding mode\(rq in which it is operating
at the time the file is encountered.
This binding mode is specified by the
.B \-B
flag, which takes the keyword arguments:
.RS
.TP 10
.B dynamic
Allow dynamic binding, do not resolve symbolic references, and allow
creation of execution-time symbol and relocation information.
This is the default setting.
.TP
.B static
Force static binding, implied by options that generate non-sharable
executable formats.
.RE
.LP
.B \-Bdynamic
and
.B \-Bstatic
may be specified several times, and may be used to toggle each other
on and off.
Like
.BR \-l ,
the influence of each depends upon its location within the
command line. 
When
.B \-Bdynamic
is in effect, 
.B \-l
searches may be satisfied by the first occurrence of either form of
library 
.RB ( .so
or
.BR .a ), 
but if both are encountered, the
.B .so
form is preferred.  When
.B \-Bstatic
is in effect,
.B ld
refuses to use any
.B .so
libraries it encounters; it continue searching
for the
.B .a
form.  Furthermore, an explicit request to load a
.B .so
file is treated as an error.  
.LP
After 
.B ld
has processed all input files and command line options, the form of
the output it produces is based on the information provided in
both.  
.B ld
first tries to reduce all symbolic references to
relative numerical offsets within the executable it is building.  To
perform this \(lqsymbolic reduction,\(rq
.B ld
must be able to determine that:
.RS
.TP 3
\(bu
all information relating to the program has been provided, in
particular, no
.B .so
is to be added at execution time; and/or
.TP
\(bu
the program has an entry point, and symbolic reduction can
be performed for all symbols having definitions existing in the
material provided.
.RE
.LP
It should be noted that uninitialized \(lqcommon\(rq areas 
(for example, uninitialized C globals) are allocated by the
link editor
.I after
it has collected all references.
In particular, this allocation can not occur in a program that still
requires the addition of information contained in a 
.B \&.so
file, as the missing information may affect the allocation process.  
Initialized \(lqcommons\(rq however,  are allocated within the executable
in which their definition appears.
.LP
After
.B ld
has performed all the symbolic reductions it can, it
attempts to transform all relative references to absolute addresses.
.B ld
is able to perform this \(lqrelative reduction\(rq
only if it has been provided
.I some
absolute address, either implicitly through the specification of an
entry point, or explicitly through
.B ld
command-line options. 
If, after performing all the reductions it can,
there are no further relocations or definitions to perform, then
.B ld
has produced a completely linked executable.
.SS Execution-Time Loading
.LP
In the event that one or more reductions can not be completed,
the executable will require further link editing at execution
time in order to be usable.  Such executables contain an
data structure identified with the symbol
.BR _\^_\s-1DYNAMIC\s0 .
An incompletely linked \(lqmain\(rq program should be
linked with a \(lqbootstrap\(rq routine that invokes
.BR ld.so ,
which uses the information
contained in the main program's 
.SB _\^_DYNAMIC
to assemble the rest
of the executables constituting the entire program.  A standard
Sun compilation driver (such as 
.BR cc (1V))
automatically includes such a module in each \(lqmain\(rq executable.
.LP
When
.B ld.so
is given control on program startup, it finds all
.B .so
files specified when the program was constructed (and
all
.BR .so 's
on which they depend), and loads
them into the address space.
.B ld.so
then completes all
remaining relocations, with the exception of procedure call
relocations; failure to resolve a given non-procedural relocation
results in termination of the program with an appropriate diagnostic.
.LP
Procedure relocations are resolved when the referencing instruction
is first executed.  It should be noted that it is possible for
\(lqundefined symbol\(rq diagnostics to be produced during program
execution if a given target is not defined when referenced.
.LP
Although it is possible for binding errors to occur at execution-time,
such an occurrence generally indicates something wrong in the
maintenance of shared objects.
.BR ld 's
.B "\-assert  definitions"
function (on by default) checks at
.BR ld -time
whether or not an execution-time binding error would occur.
.SS Version Handling for Shared Libraries
.LP
To allow the independent evolution of
.BR .so 's
used as libraries and the programs which use them,
.BR ld 's
handling of
.B .so
files found through
.B \-l
options involves the retention and
management of version control information.  The
.B .so
files used as such \(lqshared libraries\(rq are post-fixed with a
Dewey-decimal format string describing the version of the \(lqlibrary\(rq
contained in the file.
.LP
The first decimal component is called the library's
\(lqmajor version\(rq number,
and the second component its \(lqminor version\(rq number.  When
.B ld
records a 
.B .so
used as a library, it also records these two
numbers in the database used by
.B ld.so
at execution time.  In turn,
.B ld.so
uses these numbers to
decide which of multiple versions of a given library is \(lqbest\(rq or
whether
.I any
of the available versions are acceptable.  The
rules are:
.RS
.TP 3
\(bu
Major Versions Identical: the major version used at
execution time must exactly match the version found at
.BR ld -time.
Failure to find an instance of the library with a matching major
version causes a diagnostic to be issued and the program's
execution to be terminated.
.TP
\(bu
Highest Minor Version: in the presence of multiple instances of
libraries that match the desired major version, 
.B ld.so
uses the highest minor version it finds.  However, if the highest minor
version found at execution time is less than the version found at
.BR ld -time,
a warning diagnostic is issued; program execution continues.
.RE
.LP
The semantics of version numbers are such that major version numbers
should be changed whenever interfaces are changed.  Minor versions
should be changed to reflect compatible updates to libraries, and
programs will silently favor the highest compatible version they can
obtain.  
.SS Special Symbols
.LP
A number of symbols have special meanings to 
.B ld
and programs should not define these symbols.  The symbols described
below are those actually seen by
.BR ld .
Note: C and several
other languages prepend symbols they use with 
.RB ` _ '.
.TP
.BR _etext
The first location after the text of the program.
.TP
.BR _edata
The first location after initialized data.
.TP
.B _end
The first location after all data.
.TP
.SB _\^_DYNAMIC
Identifies an
.BR ld -produced
data structure.  It is defined with a non-zero value in
executables which require execution-time link editing.
By convention, if defined, it is the
first symbol in the symbol table associated with an
.B a.out
file.
.TP
.SB _\^_GLOBAL_OFFSET_TABLE_
A position-independent reference to an
.BR ld -constructed
table of addresses.  This table is constructed from
\(lqposition-independent\(rq data references occurring in objects
that have been assembled with the assembler's
.B \-k
flag (invoked on behalf of C compilations
performed with the
.B \-pic
flag).  A related table (for which no
symbol is currently defined) contains a series of transfer
instructions and is created from \(lqposition-independent\(rq procedure
calls or, if
.B \-dp
is specified to
.BR ld ,
a list of undefined symbols.
.LP
Symbols in object files beginning with the letter
.B L
are taken to be
local symbols and unless otherwise specified are purged from
.B ld
output files.
.br
.ne 6
.SH ENVIRONMENT
.TP
.SB LD_LIBRARY_PATH
A colon-separated list of directories in which to search for
libraries specified with the
.B \-l
option.  Similar to the 
.SB PATH
environment variable.
.SB LD_LIBRARY_PATH
also affects library searching during execution-time loading.
.br
.ne 5
.TP
.SB LD_OPTIONS
A default set of options to
.BR ld .
.SB LD_OPTIONS
is interpreted by
.B ld
just as though its value had been placed on the command line,
immediately following the name used to invoke
.BR ld ,
as in:
.IP
.ft B
example% ld $LD_OPTIONS \fR.\|.\|. \fIother-arguments \fR.\|.\|.
.LP
Note: Environment variable-names beginning with the characters
.RB ` LD_ '
are reserved for possible future enhancements to 
.BR ld .
.SH FILES
.PD 0
.TP 20
.B /usr/lib/lib*.a
libraries
.TP
.B lib*.so.v
shared libraries
.TP
.B lib*.sa.v
exported, initialized shared library data
.TP
.B /usr/lib/ld.so
execution-time
.B ld
.TP
.B /usr/lib/*crt*.o
default program bootstraps
.TP
.B a.out
output file
.TP
.B /usr/local/lib
.PD
.SH SEE ALSO
.BR as (1),
.BR ar (1V),
.BR cc (1V),
.BR lorder (1),
.BR ranlib (1),
.BR strip (1),
.BR tsort (1)
.SH BUGS
.LP
Options are being overloaded and are an inappropriate vehicle for describing
to
.B ld
the wide variety of things it can do. 
There needs to be
a link-editing language which can be used in the more complex situations.
.LP
The
.B \-r
option does not properly handle programs assembled with
the
.B \-k
(position-independent) flag, invoked from
.B cc
with
.B \-pic
or
.BR \-\s-1PIC\s0 .
is
notation is utilized by an execution-time variant of
.BR ld ,
.BR ld.so ,
for
.I deferred
and
.I dynamic
loading and binding during execution.
See
.BR "Execution-Time Loading" ,
below, for details.
.LP
The
.B \-l
option specifies a short name for an object
file or archive used as a library.
The full name of the object file is
derived by adding the prefix 
.B lib
and a suffix of either
.B .a
or
.BR .so [ .\c
.IR v ]
to ./share/man/man1/ldd.1                                                                                 755       0      12         2472  4424740666   7547                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldd.1 1.5 89/03/26
.TH LDD 1 "12 November 1987"
.SH NAME
ldd \- list dynamic dependencies
.SH SYNOPSIS
.B ldd
.I filename
.B .\|.\|.
.SH DESCRIPTION
.IX "ldd command" "" "\fLldd\fP \(em list dynamic dependencies"
.IX "ldd command" "" "\fLldd\fP \(em list shared libraries"
.IX display "dynamic dependencies \(em \fLldd\fP"
.IX "shared libraries" "display users of \(em \fLldd\fP"
For each
.I filename ,
.B ldd
lists the dynamically loaded objects on which that 
.I filename
depends, if any.  If the dynamic dependency is a ``library'' (a so-called 
``shared library''), then both the canonical form of the library name and
version and the actual pathname used to access the library are listed.
For example, if a given
.I filename
uses a shared C library version 4, which has the name
.B /usr/lib/libc.so.4.9
(where 9 is the most recent revision to interface version number 4)
then
.B ldd
.I filename
will report:
.sp 1
.nf
.ft B
filename:
	-lc.4 => /usr/lib/libc.so.4.9
.ft P
.fi
.sp 1
For each
.I filename
which is 
not an executable program, or else does not require any dynamic objects
for its execution, 
.B ldd
will issue an appropriate diagnostic.
.LP
It should be noted that although all
dynamically linked programs depend on the
file
.B /usr/lib/ld.so ,
.B ldd
will never report this dependency.
.SH "SEE ALSO"
.BR ld (1)
 
old-setkeys.1 -  D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /  t  0  
old-ttytool.1 0    1  old-uncompact.1     2  old-vc.1      3  on.1c 1     4  onintr.1  ./share/man/man1/leave.1                                                                               755       0      12         4625  4424740667  10103                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)leave.1 1.21 89/03/26 SMI; from UCB 6.2 5/7/86
.TH LEAVE 1 "9 September 1987"
.SH NAME
leave \- remind you when you have to leave
.SH SYNOPSIS
.B leave
[\^[
.B +
]
.I hhmm
]
.SH DESCRIPTION
.IX  "leave command"  ""  "\fLleave\fP \(em remind you of leaving time"
.IX  "reminder services"  "leave command"  ""  "\fLleave\fP \(em remind you of leaving time"
.IX  "timed event services"  "leave command"  ""  "\fLleave\fP \(em remind you of leaving time"
.B leave
sets an alarm to a time you specify and will tell you when the time is up.
.B leave
waits until the specified time, then reminds you that you have to leave.
You are reminded 5 minutes and 1 minute before the actual time,
and at the time.  After the specified time, it reminds you every minute
thereafter 10 more times.
.B leave
disappears after you log off.
.LP
You can specify the time in on of two ways, namely as an absolute time
of day in the form
.I hhmm
where
\fIhh\fP is a time in hours (on
a
12 or 24 hour clock), or you can place a
.B +
sign in front of the time, in which case the time is relative to the
current time, that is, the specified number of hours and minutes from
now.  All times are converted to a 12 hour clock, and assumed to be in
the next 12 hours.
.LP
If no argument is given,
.B leave
prompts with
.RB ` "When do you have to leave?" '.
.B leave
exits if you just type a
.SM NEWLINE\s0,
otherwise the reply is assumed to be a time.
This form is suitable for inclusion in a
.B .login
or
.BR .profile .
.LP
.B leave
ignores interrupts, quits, and terminates.  To get rid of it you should
either log off or use
.B kill\ \ \-9
and its process
.SM ID\s0.
.SH EXAMPLES
.LP
The first example sets the alarm to an absolute time of day:
.RS
.sp .5
.nf
.B example% leave 1535
.B "Alarm set for Wed Mar  7 15:35:07 1984"
.sp
.RS
.I work  work  work  work
.RE
.sp
.B example% Time to leave!
.RE
.fi
.LP
The second example sets the alarm for 10 minutes in the future:
.RS
.sp .5
.B example% leave +10
.B Alarm set for Wed Mar  7 15:45:24 1984
.sp
.RS
.I work  work  work  work
.RE
.sp
.B example% Time to leave!
.sp
.RS
.I work  work  work  work
.RE
.sp
.B example% You're going to be late!
.RE
.SH FILES
.PD 0
.TP 20
.B .login
.TP
.B .profile
.PD
.SH SEE ALSO
.BR calendar (1)
up.1c     `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d./share/man/man1/lex.1                                                                                 755       0      12        13440  4424740667   7612                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lex.1 1.22 89/03/26 SMI; from UCB 6.2 4/14/86 and S5R2 6.2 9/2/83
.TH LEX 1 "24 September 1987"
.SH NAME
lex \- lexical analysis program generator
.SH SYNOPSIS
.B lex
[
.B \-fntv
] [
.I filename
] .\|.\|.
.SH DESCRIPTION
.IX  "lex command"  ""  "\fLlex\fP \(em generate lexical analyzer"
.IX  "programming tools"  "lex command"  ""  "\fLlex\fP \(em generate lexical analyzer"
.IX  "programming languages"  "lex command"  ""  "\fLlex\fP \(em generate lexical analyzer"
.IX  "compiler generators" lex ""  "\fLlex\fP \(em lexical analyzer generator"
.IX  languages  "lex command"  ""  "\fLlex\fP \(em generate lexical analyzer"
.IX  generate "lexical analyzer \(em \fLlex\fP"
.LP
.B lex
generates programs to be used in simple lexical analysis of text.
Each
.I filename
(the standard input by default) contains regular expressions
to search for, and actions written in C
to be executed when expressions are found.
.LP
A C
source program,
.B lex.yy.c
is generated, to be compiled as follows:
.IP
.B cc lex.yy.c \-ll
.LP
This program, when run, copies unrecognized portions of
the input to the output, and executes the associated C
action for each regular expression that is recognized.
The actual string matched is left in
.BR yytext ,
an external character array.
.LP
Matching is done in order of the strings in the file.  The strings
may contain square braces to indicate character classes,
as in
.B [abx\-z]
to indicate
.BR a , " b" , " x" ,
.BR y ", and " z ;
and the operators
.BR \(** ", " + " and " ? ,
which mean, respectively,
any nonnegative number, any positive number, or either
zero or one occurrences of the previous character or character-class.
The \(lqdot\(rq character
.RB (`\| . \|')
is the class of all
.SM ASCII
characters except
.SM NEWLINE\s0.
.LP
Parentheses for grouping and vertical bar for alternation are
also supported.  The notation
.IB r { d , \|e }
in a rule indicates instances of regular expression
.I r
between
.I d
and
.IR e .
It has a higher precedence than
.BR | ,
but lower than that of
.BR \(** ,
.BR ? ,
.BR + ,
or concatenation.
The
.B \s+2^\s0
(carat character)
at the beginning of an expression permits a
successful match only immediately after a
.SM NEWLINE\s0,
and the
.B $
character at the end of an expression requires a trailing
.SM NEWLINE\s0.
.LP
The
.B /
character in an expression indicates trailing context;
only the part of the expression up to the slash is returned in
.IR yytext ,
although the remainder of the expression must follow in the input
stream.
.LP
An operator character may be used as an ordinary symbol
if it is within `\fB"\fR'
symbols or preceded by
.RB ` \e '.
.LP
Three subroutines defined as macros are expected:
.B input(\|)
to read a character;
.BI unput( c )
to replace a character read; and
.BI output( c )
to place an output character.  They are defined in terms
of the standard streams, but you can override them.
The program generated is named
.BR yylex(\|) ,
and the library contains a
.B main(\|)
which calls it.
The action
.SM REJECT
on the right side of the rule rejects this
match and executes the next suitable match;
the function
.B yymore(\|)
accumulates additional characters
into the same
.BR yytext ;
and the function
.BI yyless( p )
pushes
back the portion of the string matched beginning at
.IR p ,
which
should be between
.B yytext
and
.BR yytext + yyleng .
The macros
.I input
and
.I output
use files
.B yyin
and
.B yyout
to read from and write to,
defaulted to
.B stdin
and
.BR stdout ,
respectively.
.LP
In a
.B lex
program, any line beginning with a blank is assumed to contain only
C text and is copied; if it precedes
.B %%
it is copied into the external definition area of the
.B lex.yy.c
file.
All rules should follow a
.BR %% ,
as in
.SM YACC.
Lines preceding
.B %%
which begin with a nonblank character define
the string on the left to be the remainder of
the line; it can be used later by surrounding it with
.BR {\|} .
Note: curly brackets do not imply parentheses;
only string substitution is done.
.LP
The external names generated by
.B lex
all begin with the prefix
.BR yy " or " \s-1YY\s0 .
.LP
Certain table sizes for the resulting finite-state machine
can be set in the definitions section:
.RS
.TP "@.\s-1TP\s0
.BI %p " n\^"
number of positions is
.I n\^
(default 2000)
.ns
.TP
.BI %n " n\^"
number of states is
.I n\^
(500)
.ns
.TP
.BI %t " n\^"
number of parse tree nodes is
.I n\^
(1000)
.ns
.TP
.BI %a " n\^"
number of transitions is
.I n\^
(3000)
.RE
.LP
The use of one or more of the above automatically implies the
.B \-v
option,
unless the
.B \-n
option is used.
.SH OPTIONS
.TP
.B \-f
Faster compilation. Do not bother to pack
the resulting tables; limited to small programs.
.TP
.B \-n
Opposite of
.BR \-v ;
.B \-n
is default.
.TP
.B \-t
Place the result on the standard output instead of in file
.BR lex.yy.c .
.TP
.B \-v
Print a one-line summary of statistics of the generated analyzer.
.SH EXAMPLES
.LP
The following command line:
.RS
.B lex lexcommands
.RE
.LP
would draw
.B lex
instructions from the file
.BR lexcommands ,
and place the output in
.BR lex.yy.c .
.LP
The following:
.IP
.ft B
%%
[A\-Z]	putchar (yytext[0]+\'a\'\-\'A\');
[ ]+$	;
[ ]+	putchar(\' \');
.ft R
.LP
is an example of a
.B lex
program.
It converts upper case to lower, removes blanks at the end of lines,
and replaces multiple blanks by single blanks.
.LP
.RS
.ta +8n +8n +8n +8n
.ft B
.nf
D	[0\-9]
%%
if	printf("\s-1IF\s+1 statement\\n");
[a\-z]+	printf("tag, value %s\\n",yytext);
0{D}+	printf("octal number %s\\n",yytext);
{D}+	printf("decimal number %s\\n",yytext);
"++"	printf("unary op\\n");
"+"	printf("binary op\\n");
"/\(**"	{	loop:
		while (input(\|) != \(fm\(**\(fm);
		switch (input(\|))
			{
			case \(fm/\(fm: break;
			case \(fm\(**\(fm: unput(\(fm\(**\(fm);
			default: go to loop;
			}
		}
.fi
.ft R
.RE
.SH FILES
.PD 0
.TP 20
.B lex.yy.c
.PD
.SH "SEE ALSO"
.BR sed (1V),
.BR yacc (1)
.LP
.TX PUL
ernation are
also supported.  The notation
.IB r { d , \|e }
in a rule indicates instances of regular expression
.I r
between
.I d
and
.IR e .
It has a higher precedence than
.BR | ,
but lower than that of
.BR \(** ,
.BR ? ,./share/man/man1/limit.1                                                                               755       0      12           73  4424740667  10056                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)limit.1 1.8 89/03/26 SMI; 
   0    list.1    @    ln.1 1    P    load.1    `    loadc.1   x    lockscreen.1       $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,    lpq.1   <    lpr.1   L    lprm.1   `    lptest.1  `  p  	  ls.1v `    
  m4.1v `      m68k.1 `  ./share/man/man1/line.1                                                                                755       0      12          760  4424740667   7712                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)line.1 1.9 89/03/26 SMI; from S5R2 6.2
.TH LINE 1 "9 September 1987"
.SH NAME
line \- read one line
.SH SYNOPSIS
.B line
.SH DESCRIPTION
.IX line "" "\fLline\fR \(em read one line"
.B line
copies one line (up to a
.SM NEWLINE\s0)
from the standard
input and writes it on the standard output.  It
returns an exit code of 1 on
.SM EOF
and always prints a
.SM NEWLINE
at least.
It is often used within shell scripts to
read a line from the terminal.
.SH "SEE ALSO"
.BR sh (1),
.BR read (2V)
  mach.1 `  ./share/man/man1/lint.1v                                                                               755       0      12        33617  4424740667  10166                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lint.1v 1.51 89/03/26 SMI; from 4.3 BSD and S5
.TH LINT 1V "23 February 1988"
.SH NAME
lint \- a C program verifier
.SH SYNOPSIS
.B lint
[
.B \-abchinquvxz
] 
[
.BI \-D name\fR\|[ = def\|\fR]
]
[
.BI \-host= arch 
]
.if n .ti +0.5i
[
.BI \-I directory
]
[
.BI \-l library
]
[
.BI \-o " outputfile"
]
.if t .ti +.5i
[
.BI \-target= arch
]
[
.BI \-U name
]
.I filename
\&.\|.\|.
.br
.B lint
[
.BI \-C library
]
[
.BI \-D name\fR\|[ = def\|\fR] 
]
.if n .ti +0.5i
[
.BI \-host= arch
]
[
.BI \-I directory
]
[
.BI \-l library
]
[
.BI \-target= arch 
]
.if t .ti +.5i
[
.BI \-U name
]
.I filename
\&.\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/lint
[
.B \-abcghnpquvxzO
] 
[
.BI \-D name\fR\|[ = def\|\fR]
]
.if n .ti +0.5i
[
.BI \-I directory
]
[
.BI \-l library
]
[
.BI \-o " outputfile"
]
.if t .ti +.5i
[
.BI \-U name
]
.I filename
\&.\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLlint\fR"
.IX  "lint command"  ""  "\fLlint\fP \(em C program verifier"
.IX  "programming tools"  "lint command"  ""  "\fLlint\fP \(em C program verifier"
.IX  "programming languages"  "lint command"  ""  "\fLlint\fP \(em C program verifier"
.IX  languages  "lint command"  ""  "\fLlint\fP \(em C program verifier"
.IX  "C programming language"  "lint command"  ""  "\fLlint\fP \(em C program verifier"
.IX  "verifier, C programs \(em \fLlint\fP"
.LP
.B lint
attempts to detect features of the named C program files
that are likely to be bugs, to be non-portable, or to be wasteful.
It also performs stricter type checking than does the C compiler.
.B lint
runs the C preprocessor as its first phase, with the preprocessor symbol
.B lint
defined to allow certain questionable code to be altered or skipped by
.BR lint .
Therefore, this symbol should be thought of as a reserved word
for all code that is to be checked by
.BR lint .
.LP
Among the possible problems that are currently noted are unreachable
statements, loops not entered at the top, automatic variables declared
and not used, and logical expressions with constant values.
Function calls are checked for inconsistencies, such as calls to
functions that return values in some places and not in others,
functions called with varying numbers of arguments,
function calls that pass arguments of a type other than the type the function
expects to receive, functions whose values are not used,
and calls to functions not returning values that use the non-existent return
value of the function.
.LP
Filename arguments ending with
.B \&.c
are taken to be C source files.
Filename arguments with names ending with
.B \&.ln
are taken to be the result of an earlier invocation of
.BR lint ,
with either the
.B \-i
or the
.B \-C
option in effect.
The
.B \&.ln
files are analogous to the
.B \&.o
(object) files produced by the
.BR cc (1V)
from
.B \&.c
files.
.B lint
also accepts special libraries specified with the
.B \-l
option, which contain
simplified definitions of standard library routines (preprocessed by
.RB ` "lint \-C" ')
for faster checking of function calls.
.LP
.B lint
processes the various
.BR \&.c ", "  .ln ,
and
.BI llib-l library .ln
(lint library) files and process them in command-line order.
By default,
.B lint
appends the standard C lint library
.RB ( llib-lc.ln )
to the end of the list of files.
When the
.B \-C
and
.B \-i
options are
.I omitted
the second pass of
.B lint
checks this list of files for mutual compatibility.
When the
.B \-C
or the
.B \-i
options are used, the
.B \&.ln
and the
.BI llib-l library .ln
files are ignored.
.SH SYSTEM V DESCRIPTION
Filename arguments with names ending with
.B \&.ln
are taken to be the result of an earlier invocation of
.BR lint ,
with either the
.B \-c
or the
.B \-o
option in effect.
.LP
.B lint
processes the various
.BR \&.c ", "  .ln ,
and
.BI llib-l library .ln
(lint library) files and process them in command-line order.
By default,
.B lint
appends the standard C lint library
.RB ( llib-lc.ln )
to the end of the list of files.
However, if the
.B \-p
option is used, the portable C lint library
.RB ( llib-port.ln )
is appended instead.
When the
.B \-c
option is
.I omitted
the second pass of
.B lint
checks this list of files for mutual compatibility.
When the
.B \-c
option is used, the
.B \&.ln
and the
.BI llib-l library .ln
files are ignored.
.LP
.B lint
produces its first-pass output on a per-source-file basis.
Complaints regarding included files are collected and printed
after all source files have been processed.
If the
.B \-c
option is not used,
information gathered from all input files is then collected and checked for
consistency.
At this point,
if it is not clear whether a complaint stems from a given source file or from
one of its included files,
the source file name is printed, followed by a question mark.
.SH OPTIONS
.TP
.B \-a
Report assignments of
.B long
values to variables that are not
.BR long .
.TP
.B \-b
Report
.B break
statements that cannot be reached.
This is not the default because, unfortunately, most 
.BR lex (1)
and many 
.BR yacc (1)
outputs produce many such complaints.
.TP
.B \-c
Complain about casts which have questionable portability.
.TP
.B \-h
Apply a number of heuristic tests to attempt to intuit bugs, improve style,
and reduce waste.
.TP
.B \-i
Produce a 
.B \&.ln
file for every 
.B \&.c
file on the command line.  These 
.B \&.ln
files are the product of 
.BR lint 's
first pass only, and are not checked for compatibility
between functions.
.TP
.B \-n
Do not check compatibility against the standard library.
.TP
.B \-q
Do not complain about constructs that do not cause portability problems between
current Sun implementations of the C language but that will cause portability
problems between other implementations.  If the
.B \-q
flag is specified,
.B lint
treats type
.B enum
as an
.BR int ,
treats type
.B long
as type
.B int
and type
.B unsigned long
as
.BR "unsigned int" ,
and treats a 0 argument as being conformable with any pointer.
.TP
.B \-u
Do not complain about functions and external variables used and not
defined, or defined and not used (this is suitable for running
.B lint
on a subset of files comprising part of a larger program).
.TP
.B \-v
Suppress complaints about unused arguments in functions.
.TP
.B \-x
Report variables referred to by
.B extern
declarations, but never used.
.TP
.B \-z
Do not complain about structures that are never defined (for example,
using a structure pointer without knowing its contents).
.TP
.BI \-C library
Create a 
.B lint
library with the name
.BI llib-l library .ln\fR.
.TP
.BI \-D name\fR[ = def\fR]
Define 
.I name
for 
.BR cpp (1),
as if by a
.B #define
directive.
If no definition is given, 
.I name
is defined as 1.
.TP
\fB\-host=\fIarch\fR	(Sun-2, Sun-3, and Sun-4 systems only)
Define the host architecture to be
.IR arch .
The default is the architecture returned by the
.BR arch (1)
command.
.I arch
can be one of
.BR sun2 ,
.BR sun3 ,
or
.BR sun4 .
.TP
.BI \-I directory
Add
.I directory
to the list of list of directories in which to search for
include files.  Include files with names that do not begin
with 
.B /
are always sought first in the directory of the
.I filename
argument, then in directories named in 
.B \-I
options, then in the
.B /usr/include
directory.
.TP
.BI \-l library
Use the lint library
.I library
from the
.B /usr/lib/lint
directory.
.TP
.BI \-o " outputfile"
Name the output file
.IR outputfile .
.I outputfile
cannot be the same as 
.I sourcefile 
.RB ( lint
will not overwrite the source file).
.TP
\fB\-target=\fIarch\fR	(Sun-2, Sun-3, and Sun-4 systems only)
Define the target architecture to be
.IR arch ,
for additional portability checks specific to that architecture.
The default is the value returned by the 
.BR arch (1)
command.
.I arch
can be one of:
.BR sun2 ,
.BR sun3 ,
or
.BR sun4 .
.TP
.BI \-U name
Remove any initial definition of
.I name
for the preprocessor.
.SH SYSTEM V OPTIONS
The sense of the
.BR \-a ,
.BR \-b ,
.BR \-h ,
and
.B \-x
options is reversed in the System V version of
.BR lint ;
the tests they control
.I are
performed unless the flag is specified.
The
.B \-C
option is not available; instead, the
.B \-c
or
.B \-o
options can be used.
The
.B \-i
option is not used; instead, the
.B \-c
option can be used.
The
.BR \-q ,
.BR \-host ,
and
.B \-target
options are not available.
.TP
.B \-c
Produce a
.B \&.ln
file for every
.B \&.c
file on the command line.
These
.B \&.ln
files are the product of
.BR lint 's
first pass only, and are not checked for compatibility between
functions.
.br
.ne 8
.TP
.PD 0
.B \-g
.TP
.B \-O
These options are accepted but ignored.
By recognizing these options,
.BR lint 's
behavior is closer to that of the
.BR cc (1V)
command.
.PD
.TP
.B \-n
Do not check compatibility against either the standard or the portable
lint library.
.TP
.B \-p
Attempt to check portability of code to other dialects of C, such as
.SM IBM
370
and Honeywell
.SM GCOS\s0.
Along with performing stricter checking,
this option truncates all non-external names
to eight characters, and all external names
to six characters and one case.
.TP
.BI \-o " library"
Create a lint library with the name
.BI llib-l lib .ln\fR.
The
.B \-c
option nullifies any use of the
.B \-o
option.
The lint library produced is the input that is given to
.BR lint 's
second pass.  The
.B \-o
option simply saves this file in the named lint library.
To produce a
.BI llib-l lib .ln
without extraneous messages, use of the
.B \-x
option is suggested.  The
.B \-v
option is useful if the source file(s) for the lint library
are just external interfaces (for example, the way the file
.B llib-lc
is written).  These option settings are also available through the
use of \(lqlint comments\(rq (see
.B Input Grammar
below).
.br
.ne 7
.SH USAGE
.LP
For more information about 
.B lint
refer to 
.B lint
in
.TX PUL
.LP
To create lint libraries, use the
.B \-C
option. For example
.IP
.ft B
example% lint \-Ccongress \fIfilename\fRs .\|.\|.
.ft R
.LP
where
.IR filename s
are the C sources of library
.IR congress ,
produces a file
.B llib-lcongress.ln
in the current directory
in the correct library format suitable for \(lqlinting\(rq
programs using
.BR \-lcongress .
.SS Input Grammar
.LP
.BR lint 's
first pass reads standard C source files.
.B lint
recognizes the following C comments as commands.
.TP
.SB /*NOTREACHED*/
At appropriate points, inhibit comments about unreachable code.
(This comment is typically placed just after calls to functions like
.BR exit (2)).
.TP
.SM \fB/*VARARGS\fIn\|\fB*/\fR
Suppress the usual checking for variable numbers of arguments in the
following function declaration.
The data types of the first
.I n
arguments are checked; a missing
.I n
is taken to be 0.  In this version of 
.BR lint ,
.SB /*VARARGS0*/
is allowed.  It no longer indicates the absence of variable
arguments.
.TP
.SB /*ARGSUSED*/
Enable the
.B \-v
option for the next function.
.TP
.SB /*LINTLIBRARY*/
At the beginning of a file, shut off complaints about unused functions
and function arguments in this file.
This is equivalent to using the
.BR \-v " and " \-x
options.
.SH SYSTEM V USAGE
.LP
The behavior of the
.B \-c
and the
.B \-o
options allows for incremental use of
.B lint
on a set of C source files.
Invoking
.RB ` "lint \-c" '
for each source file produces a corresponding
.B \&.ln
file, and prints all messages pertaining to that source file.
After all of the source files have been run through
.B lint
separately, it is invoked once more (without the
.B \-c
option), and with all of the
.B \&.ln
files and
.BI \-l x
options.
This produces messages about any inconsistencies between files.
This scheme works well with
.BR make (1),
since it allows
.B make
to \(lqlint\(rq only those source files that have been modified since
the last time
.BR lint
was run.
.LP
To create lint libraries, use the
.B \-o
option. For example
.IP
.ft B
example% lint \-x \-o congress \fIfilename\fRs .\|.\|.
.ft R
.LP
where
.IR filename s
are the C sources of library
.IR congress ,
produces a file
.B llib-lcongress.ln
in the current directory
in the correct library format suitable for \(lqlinting\(rq
programs using
.BR \-lcongress .
.br
.ne 5
.SH EXAMPLE
The following
.B lint
call:
.IP
.ft B
example% lint  \-b  myfile.c
.ft R
.LP
checks the consistency of the code in the C source file file
.BR myfile.c .
The 
.B \-b
option indicates that unreachable
.B break
statements are to be checked for.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/lint/lint[12]
programs
.TP
.B /usr/lib/lint/llib-l*.ln
various prebuilt lint libraries
.TP
.B /usr/lib/lint/llib-l*
sources of the prebuilt lint libraries
.PD
.LP
The following lint libraries are supplied with Sun\s-1OS\s0:
.BR \-lc ,
.BR \-lcore ,
.BR \-lcurses ,
.BR \-lkvm ,
.BR \-llwp ,
.BR \-lm ,
.BR \-lmp ,
.BR \-lpixrect ,
.BR \-lplot ,
.BR \-lsuntool ,
.BR \-lsunwindow ,
.BR \-ltermcap ,
and
.BR \-ltermlib .
Additional lint libraries may be installed separately.
.SH SYSTEM V FILES
.PD 0
.TP 20
.B /usr/5lib/lint/lint[12]
programs
.TP
.B /usr/5lib/lint/llib-l*.ln
various prebuilt lint libraries
.TP
.B /usr/5lib/lint/llib-l*
sources of the prebuilt lint libraries
.PD
.LP
The following System V lint libraries are supplied with Sun\s-1OS\s0:
.BR \-lc ,
.BR \-lcore ,
.BR \-lcurses ,
.BR \-lkvm ,
.BR \-llwp ,
.BR \-lm ,
.BR \-lmp ,
.BR \-lpixrect ,
.BR \-lplot ,
.BR \-lport .
.BR \-lsuntool ,
and
.BR \-lsunwindow .
Additional lint libraries may be installed separately.
.SH SEE ALSO
.BR cc (1V),
.BR cpp (1),
.BR lex (1),
.BR make (1),
.BR yacc (1),
.BR exit (2),
.BR setjmp (3)
.LP
.TX PUL
.SH BUGS
There are some things you just
.I cannot
get
.B lint
to shut up about.
.LP
The routines
.BR exit (2),
.B longjmp
(see
.BR setjmp (3))
and other functions that do not return are not understood; this causes
various incorrect diagnostics.
.LP
Libraries created by the
.B \-C
or
.B \-o
options will, when used in later
.B lint
runs, cause certain errors that were reported when the libraries were created
to be reported again, and cause line numbers and file names from the original
source used to create those libraries to be reported in error messages.
For these reasons, it is still useful to produce stripped down lint library
source files and to use them to generate lint libraries.

is specified to
.BR ld ,
a list of undefined symbols.
.LP
Symbols in object files beginning with the letter
.B L./share/man/man1/list.1                                                                                755       0      12           62  4424740625   7703                                                                                                                                                                                                                                                                                                                                                                      .so man1/List.1
.\" @(#)list.1 1.3 89/03/26 SMI; 
 load.1    `    loadc.1   x    lockscreen.1       $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,    lpq.1   <    lpr.1   L    lprm.1   `    lptest.1  `  p  	  ls.1v `    
  m4.1v `      m68k.1 `      mach.1 `    
  machid.1        mail.1 ./share/man/man1/ln.1                                                                                  755       0      12        11423  4424740667   7432                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ln.1 1.31 89/03/26 SMI;
.TH LN 1 "25 March 1989"
.SH NAME
ln \- make hard or symbolic links to files
.SH SYNOPSIS
.B ln
[
.B \-fs
]
.I filename
[
.I linkname
]
.br
.B ln
[
.B \-fs
]
.IR pathname .\|.\|.
.I directory
.SH DESCRIPTION
.IX  file  "make link to"  ""  "make link to \(em \fLln\fP"
.IX  directory  "make link to"  ""  "make link to \(em \fLln\fP"
.IX  "hard link, make \(em \fLln\fP"
.IX  "symbolic link, make \(em \fLln\fP"
.IX  make "hard link to file \(em \fLln\fP"
.IX  make "symbolic link to file \(em \fLln\fP"
.LP
.B ln
creates an additional directory entry, called a
.IR link ,
to a file or directory.  Any number of links can be assigned to a
file.  The number of links does not affect other file attributes such
as size, protections, data, etc.
.LP
.I filename
is the name of the original file or directory.
.I linkname
is the new name to associate with the file or filename.  If
.I linkname
is omitted, the last component of
.I filename
is used as the name of the link.
.LP
If the last argument is the name of a directory, symbolic links
are made in that directory for each
.I pathname
argument;
.B ln
uses the last component of each
.I pathname
as the name of each link in the named
.IR directory .
.LP
A hard link (the default) is a standard directory entry just like the
one made when the file was created.  Hard links can only be made to
existing files.  Hard links cannot be made across file systems (disk
partitions, mounted file systems).  To remove a file, all hard links
to it must be removed, including the name by which it was first
created; removing the last hard link releases the inode associated
with the file.
.LP
A symbolic link, made with the
.B \-s
option, is a special directory entry that points to another named file.
Symbolic links can span file systems and point to directories.  In fact,
you can create a symbolic link that points to a file that is currently
absent from the file system; removing the file that it points to does not
affect or alter the symbolic link itself.
.LP
A symbolic link to a directory behaves differently than you might expect
in certain cases.  While an
.BR ls (1V)
on such a link displays the files in the pointed-to directory, an
.RB ` "ls \-l" '
displays information about the link itself:
.sp .5
.RS
.ft B
.nf
example% ln \-s dir link
example% ls link
file1 file2 file3 file4
example% ls \-l link
lrwxrwxrwx  1 user            7 Jan 11 23:27 link -> dir
.ft R
.fi
.RE
.LP
When you
.BR cd (1)
to a directory through a symbolic link, you wind up in the pointed-to
location within the file system.  This means that the parent of the new
working directory is not the parent of the symbolic link, but rather,
the parent of the pointed-to directory.  For instance, in the following
case the final working directory is
.B /usr
and not
.BR /home/user/linktest .
.sp .5
.RS
.ft B
.nf
example% pwd
/home/user/linktest
example% ln \-s /usr/tmp symlink
example% cd symlink
example% cd .\|.
example% pwd
/usr
.fi
.ft R
.RE
.LP
C shell user's can avoid any resulting navigation problems by using the
.B pushd
and
.B popd
built-in commands instead of
.BR cd .
.SH OPTIONS
.TP
.B \-f
Force a hard link to a directory \(em
this option is only available to the super-user.
.TP
.B \-s
Create a symbolic link or links.
.br
.ne 8
.SH EXAMPLE
.LP
The commands below illustrate the effects of the different forms of the
.B ln
command:
.sp .5
.RS
.ft B
.nf
example% ln file link 
example% ls \-F file link
file   link
example% ln \-s file symlink 
example% ls \-F file symlink
file   symlink@
example% ls \-li file link symlink
 10606 -rw-r--r--  2 user            0 Jan 12 00:06 file
 10606 -rw-r--r--  2 user            0 Jan 12 00:06 link
 10607 lrwxrwxrwx  1 user            4 Jan 12 00:06 symlink -> file
example% ln \-s nonesuch devoid
example% ls \-F devoid
devoid@
example% cat devoid
devoid: No such file or directory
example% ln \-s /proto/bin/* /tmp/bin
example% ls \-F /proto/bin /tmp/bin
/proto/bin:
x*      y*      z*

/tmp/bin:
x@      y@      z@
.fi
.ft R
.RE
.SH SEE ALSO
.BR cp (1),
.BR ls (1V),
.BR mv (1),
.BR rm (1),
.BR link (2),
.BR lstat (2),
.BR readlink (2),
.BR stat (2),
.BR symlink (2)
.SH BUGS
.LP
When the last argument is a directory, simple basenames should not
be used for
.I pathname
arguments.  If a basename is used, the resulting symbolic link points
to itself:
.sp .5
.RS
.ft B
.nf
example% ln \-s file /tmp
example% ls \-l /tmp/file
lrwxrwxrwx  1 user            4 Jan 12 00:16 /tmp/file -> file
example% cat /tmp/file
/tmp/file: Too many levels of symbolic links
.fi
.ft R
.RE
.LP
To avoid this problem, use full pathnames, or prepend a
reference to the
.SB PWD
variable to files in the working directory:
.sp .5
.RS
.ft B
.nf
example% rm /tmp/file
example% ln \-s $\s-1PWD\s0/file /tmp
lrwxrwxrwx  1 user            4 Jan 12 00:16 /tmp/file -> /home/user/subdir/file
.fi
.ft R
.RE
  unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       ./share/man/man1/load.1                                                                                755       0      12        11217  4424740670   7733                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)load.1 1.15 89/03/26 SMI;
.TH LOAD 1 "19 February 1988"
.SH NAME
load, loadc \- load Application SunOS or Developer's Toolkit clusters
.SH SYNOPSIS
.B load
[ 
.IR filename " .\|.\|.]" 
.LP
.B loadc
[
.I cluster
\&.\|.\|. ]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "load command" "" "\fLload\fR command"  
.IX "loadc command" "" "\fLloadc\fR command"  
.LP
.B load
loads the optional clusters in the Application Sun\s-1OS\s0 or the Developer's
Toolkit that contain the files specified in the filename arguments.
.B loadc
loads the optional clusters in the Application Sun\s-1OS\s0 or
the Developers Toolkit specified in the cluster arguments.
.LP
.B load
and 
.B loadc
require the user to specify the distribution media
type (3.5" diskette or 1/4" tape) for the system and
to insert the specified 3.5" diskette or 1/4" tape.
The user will be asked to confirm that the specified
media has been inserted.  If the user confirmation
is negative, no software will be loaded from the specified media.
.LP
Without arguments,
.B load
and 
.B loadc
display a summary of the clusters in the Application Sun\s-1OS\s0 and
Developer's Toolkit, including the load state and size of each cluster.
.SH EXAMPLES
To load the cluster that contains the 
.BR spell (1)
command:
.LP
.RS
.ft B
.nf
% load spell
Enter your distribution media type (1=1/4" tape, 2=3.5" diskette): 2
Insert diskette \fIn\fP to load the spellcheck cluster, confirm (y/n): y
Loading the spellcheck cluster ...
The spellcheck cluster has been loaded.
space used by clusters: 6021K bytes
total space remaining: 20432K bytes
.ft
.fi
.RE
.LP
To load the 
.B spellcheck 
cluster:
.LP
.RS
.nf
.ft B
% loadc spellcheck
Enter your distribution media type (1=1/4" tape, 2=3.5" diskette): 2
Insert diskette \fIn\fP to load the spellcheck, confirm (y/n): y
Loading the spellcheck cluster .\|.\|.
The spellcheck cluster has been loaded.
space used by clusters: 6021K bytes
total space remaining: 20432K bytes
.ft
.fi
.RE
.LP
To display a summary of the clusters in the Application
Sun\s-1OS\s0 and Developer's Toolkit:
.LP
.RS
.nf
.ta \w'    available 'u +\w'advanced_admin   'u +\w'diskette  'u
.ft B
% load
\&Application Sun\s-1OS\s0 Clusters:
\&    available	cluster	size (bytes)
\&    ---------	-------	----
\&      yes	accounting	265K
\&      no	advanced_admin	501K
\&      \&.\|.\|.
.br
.ne 10
\&Developer's Toolkit Clusters:
\&    available	cluster	size (bytes)
\&    ---------	-------	----
\&      no	base_devel	6907K
\&      \&.\|.\|.
.sp
space used by clusters: 6021K bytes
total space remaining: 20432K bytes
.ft
.fi
.RE
.LP
A cluster is available if it has been \(lqloaded\(rq using
.B load
or
.B loadc
or if it has been \(lqmounted\(rq across the network.
.SH ENVIRONMENT
.TP 15
.SB LOADMEDIA
Used to specify the distribution media type for the system.  It can be set
to
.B diskette
to specify 3.5" diskette or
.B tape
to specify 1/4" tape.
If it is set,
.B load
and
.B loadc
will not ask the user to enter the distribution media type.
.SH FILES
.PD 0
.TP 20
.B /export/loaded/appl
where Application Sun\s-1OS\s0 clusters are loaded (or mounted)
.TP
.B /export/loaded/devel
where Developer's Toolkit clusters are loaded (or mounted)
.TP
.B /usr/lib/load/*
data files
.PD
.SH SEE ALSO
.BR unload (1),
.BR cluster(1),
.BR toc (5)
.LP
.I Sun386i System Setup and Maintenance
.SH DIAGNOSTICS
.TP
.B "Wrong \fIdiskette\fP/\fItape\fP
An incorrect diskette or tape was inserted.  The user will again
be asked to insert the specified media.
.TP
.BI "The file " filename " is not in any of the optional software clusters."
The specified file is not part of the Application
Sun\s-1OS\s0 or Developer's Toolkit.
.TP
.BI "There is no " cluster " cluster."
The specified cluster is not part of the Application
Sun\s-1OS\s0 or Developers Toolkit.
.TP
.BI "The cluster " cluster " is already loaded, overwrite? (y/n):"
The specified cluster appears to have been loaded already.
Type 
.B y
followed by
.SM RETURN
to have the cluster loaded or
.B n
followed by
.SM RETURN
to cancel the loading of the cluster.
.TP
.BI "Cluster " cluster " requires " n "K; there is not enough disk space."
There is not enough disk space to hold the specified cluster.
.TP
.BI "The " cluster " cluster has not been loaded."
The loading of the specified cluster has been canceled or interrupted by
the user.
.TP
.B "The Application Sun\s-1OS\s0 (and/or) Developers Toolkit are mounted."
The Application Su\s-1nOS\s0 or Developers Toolkit or both
are mounted across the network
and can not be loaded or unloaded.
.TP
.BI "The " tape / diskette " drive is currently in use."
You are trying to load a cluster from tape (or diskette) 
and another process currently
has control of the tape (or diskette) drive.
.SH SYNOPSIS
.B load
[ 
.IR filename " .\|.\|.]" 
.LP
.B loadc
[
.I cluster
\&.\|.\|. ]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "load command" "" "\fLload\fR command"  
.IX "loadc command" "" "\fLloadc\fR command"  
.LP
.B load
loads the optional clusters in the Application Sun\s-1OS\s0 or the Developer's
Toolkit that contain the files specified in./share/man/man1/loadc.1                                                                               755       0      12           62  4424740670  10012                                                                                                                                                                                                                                                                                                                                                                      .so man1/load.1
.\" @(#)loadc.1 1.4 89/03/26 SMI;
   $ lockscreen_default.1 ock      logger.1        login.1        	logname.1       logout.1        look.1       	lookbib.1       lorder.1    ,    lpq.1   <    lpr.1   L    lprm.1   `    lptest.1  `  p  	  ls.1v `    
  m4.1v `      m68k.1 `      mach.1 `    
  machid.1        mail.1      $ mailrc_to_defaults.1 ail       
mailtool.1  ./share/man/man1/lockscreen.1                                                                          755       0      12         7114  4424740670  11125                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lockscreen.1 1.30 89/03/26 SMI;
.TH LOCKSCREEN 1 "22 March 1989"
.SH NAME
lockscreen, lockscreen_default \- maintain SunView context and prevent unauthorized access
.SH SYNOPSIS
.B lockscreen
[
.B \-enr
]
[
.B \-b
.I program
]
[
.B \-t
.I seconds
]
[
.I gfx-program
[
.I gfx-program-arguments
] ]
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "lockscreen command"  ""  "\fLlockscreen\fP \(em save window context"
.IX  "window, save context \(em \fLlockscreen\fP"
.IX  login  "save window context"  ""  "save window context \(em \fLlockscreen\fP"
.LP
.B lockscreen
is a SunView utility that locks the screen against unauthorized access
while preserving the state of the SunView display.  It clears the
workstation screen to black, and then runs
.IR gfx-program ,
which typically provides a moving graphics display to reduce phosphor
burn.  If no
.I gfx-program
is provided, a suitable default program is run.
.LP
.B lockscreen
requires the user's password before restoring the window context.
When any keyboard or mouse button is pressed, the graphics screen
is replaced by a password screen that displays the user name, a small
box with a bouncing logo, and a prompt for the user's password.  If
the user has no password, or if the
.B \-n
option is used, the window context is simply restored.
.LP
When the password screen appears:
.RS
.TP 4
\(bu
Restore the window context by entering the user's password followed by a
.SM RETURN
(this password is not echoed on the screen) or,
.TP
\(bu
Point to the black box and click the left button to return to
the graphics display.
.RE
.LP
If neither of the above actions is taken,
.I gfx_program
will
resume execution after the interval specified with the
.B \-t
option.
.SH OPTIONS
.TP 15
.B \-e
Add the
.B Exit Desktop
choice to the password screen.  If pointed to and clicked, the SunView
environment is exited and the current user is logged out.
.TP
.B \-n
Require no password to reenter the window environment.
.TP
.B \-r
Allow the use of the user name
.B root
in the
.RB ` Name: '
field of the password screen.  Normally,
.B root
is not accepted as a valid user name.
.TP
.BI \-b " program"
Allow an additional program to be run as a child process of
.BR lockscreen .
This background process could be a compile server or some other useful program
that the user wants run while lockscreen is running.  No arguments are
passed to this program.
.TP
.BI \-t " seconds"
After
.I seconds
seconds, clear the password screen and restart
.IR gfx-program .
The default is 5 minutes (300 seconds).
.TP
.RI [ \ gfx-program "\ ] [ " gfx-program-arguments \ ]
Run this program after clearing the screen to black.  If no
.I program
argument is present,
.B lockscreen
will try to run
.B lockscreen_default
if it exists on the standard search
path, otherwise a bouncing Sun logo will appear.  If
.I gfx-program-arguments
are specified and the
.I gfx-program
is not then the arguments are passed to
.BR lockscreen_default .
.B lockscreen_default
is typically a non-interactive graphics program
(see
.BR graphics_demos (6)).
.B lockscreen
will not search for
.B lockscreen_default
if the
.I gfx-program
is specified explicitly as an empty argument (an adjacent pair
of double quotes ("")).
.SH FILES
.PD 0
.TP 20
.B /usr/bin/lockscreen_default
Default
.IR gfx-program .
This displays a series of
.BR life (6)
patterns.
If a file named
.B lockscreen_default
appears earlier in the search path, that file is used instead.
.PD
.SH SEE ALSO
.BR login (1),
.BR sunview (1)
suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D    tail.1    T    talk.1    d    tar.1     t    tbl.1         tcopy.1       tcov.1        tee.1         tek.1g  ./share/man/man1/lockscreen_default.1                                                                  755       0      12          105  4424740670  12602                                                                                                                                                                                                                                                                                                                                                                      .so man1/lockscreen.1
.\" @(#)lockscreen_default.1 1.6 89/03/26 SMI;
 login.1        	logname.1 gi      logout.1 me.      look.1 o      	lookbib.1 ok      lorder.1 ib.  ,    lpq.1 rd  <    lpr.1    L    lprm.1   `    lptest.1 prm  p  	  ls.1v te    
  m4.1v        m68k.1       mach.1     
  machid.1 ach      mail.1 h     $ mailrc_to_defaults.1         
mailtool.1 1      make.1 l       man.1    4  ./share/man/man1/logger.1                                                                              755       0      12         4352  4424740670  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)logger.1 1.6 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH LOGGER 1 "9 September 1987"
.SH NAME
logger \- add entries to the system log
.SH SYNOPSIS
.B logger
[
.B \-t
.I tag
] [
.B \-p
.I priority
] [
.B \-i
] [
.B \-f
.I filename
] [
.I message
] .\|.\|.
.SH DESCRIPTION
.IX  "logger command"  ""  "\fLlogger\fP \(em make system log entry"
.IX  make "system log entry \(em \fLlogger\fP"
.IX  create "system log entry \(em \fLlogger\fP"
.B logger
provides a method for adding one-line entries to the system log file
from the command line.  One or more
.I message
arguments can be given on the command line, in which case each is
logged immediately.  Otherwise, a
.I filename
can be specified, in which case each line in the file
is logged.  If neither is specified,
.B logger
reads and logs messages on a line-by-line basis from the standard input.
.SH OPTIONS
.TP 12n
.BI \-t \ tag
Mark each line added to the log with the specified
.IR tag .
.TP
.BI \-p \ priority
Enter the message with the specified
.IR priority .
The message priority can be specified numerically, or as a
.IB facility . level
pair.  For example,
.RB ` "\-p local3.info" '
assigns the message priority to the
.B info
level in the
.B local3
facility.  The default priority is
.BR user.notice .
.TP
.B \-i
Log the process
.SM ID
of the
.B logger
process with each line.
.TP
.BI \-f \ filename
Use the contents of
.I filename
as the message to log.
.TP
.I message
If this is unspecified, either the file
indicated with
.B \-f
or the standard input is added to the log.
.SH EXAMPLES
.RS
.ft B
logger System rebooted
.ft R
.RE
.LP
will log the message
.RB ` "System rebooted" '
to the facility at priority
.B notice
to be treated by
.B syslogd
as other messages to the facility
.B notice
are.
.IP
.B
logger \-p local0.notice \-t \s-1HOSTIDM\s0 \-f /dev/idmc
.LP
will read from the file
.B /dev/idmc
and will log each line in that file as a message with the tag
.RB ` \s-1HOSTIDM\s0 '
at priority
.B notice
to be treated by
.B syslogd
as other messages to the facility
.B local0
are.
.SH SEE ALSO
.BR syslog (3),
.BR syslogd (8)
1c  	    c  rwho.1c      d  sact.1   8  e  sccs-admin.1    L  f  
sccs-cdc.1 s  `  g  sccs-comb.1   x  h  sccs-delta.1 ccs    i  
sccs-get.1 s    j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1 
    m  sccs-rmdel.1 ccs  ./share/man/man1/login.1                                                                               755       0      12        10435  4424740670  10125                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)login.1 1.18 89/03/26 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH LOGIN 1 "25 March 1989"
.SH NAME
login \- log in to the system
.SH SYNOPSIS
.B login
[
.B \-p
] [
.I username
]
.SH DESCRIPTION
.IX  login  "to local machine \(em \fLlogin\fR"
.IX  "sign on"  ""  "\fLlogin\fP \(em sign on"
.B login
signs
.I username
on to the system initially;
.B login
may also be
used at any time to change from one user\s-1ID\s0 to another.
.LP
When used with no argument,
.B login
requests a user name and password (if appropriate).
Echoing is turned off (if possible) while typing the password.
Note: the number of significant characters in a password is
8. (See
.BR passwd (1).)
.LP
When successful,
.B login
updates accounting files, prints disk usage and limits (by running
.BR quota (1),)
prints the message of the day, informs you
of the existence of any mail, and displays
the time you last logged in.
None of these messages is printed if there is a
.B \&.hushlogin
file in your home directory.
This is mostly used to make life easier for nonhuman users, such as
.BR uucp (1C).
.LP
.B login
initializes the user and group
\s-1ID\s0s
and the working directory,
then starts a command interpreter shell (usually either
.B /usr/bin/sh
or
.BR /usr/bin/csh )
according to specifications found in the file
.BR /etc/passwd .
Argument 0 of the command interpreter is
the name of the command interpreter with
a leading dash
.RB (` \- ')
prepended.
.LP
.B login
also modifies the environment
.RB  ( environ (5V))
with information specifying home directory, command interpreter,
terminal-type (if available) and username.
The
.B \-p
argument preserves the remainder of the environment,
otherwise any previous environment is discarded.
.LP
The super-user
.B root
may only log in on those terminals marked as
\(lqsecure\(rq in the
.B /etc/ttytab
file.  For example, if the file contained:
.sp .5
.RS
.ft B
.nf
console	"/etc/getty Console-9600"	sun	on secure
tty00	"/etc/getty Console-9600"	sun	on
\&.\|.\|.
.fi
.ft R
.RE
.LP
the super-user could only log in on the console.
.LP
If the file
.B /etc/nologin
exists,
.B login
prints its contents on the user's terminal and exits. This is used by
.BR shutdown (8)
to stop logins when the system is about to go down.
.LP
The
.B login
command, recognized by
.BR sh (1)
and
.BR csh (1),
is executed directly (without forking), and terminates that shell.
To resume working, you must log in again.
.LP
.B login
times out and exits if its prompt for input is not answered within a
reasonable time.
.LP
When the Bourne shell
.RB ( sh )
starts up, it reads a file called
.B .profile
from your home directory (that of the username you use to log in).
When the C shell
.RB ( csh )
starts up, it reads a file called
.B \&.cshrc
from your home directory, and then reads a file called
.BR \&.login .
.LP
The shells read these files only if they are owned by the
person logging in.
.SH OPTIONS
.TP
.B \-p
Preserve any existing environment variables and their values;
otherwise the previous environment is discarded.
.SH FILES
.PD 0
.TP 20
.B /etc/utmp	
accounting
.TP
.B /var/adm/wtmp	
accounting
.TP
.B /var/adm/lastlog
time of last login
.TP
.B /etc/ttytab
terminal types
.TP
.B /var/spool/mail/*
mail
.TP
.B /etc/motd
message-of-the-day
.TP
.B /etc/passwd
password file
.TP
.B /etc/nologin
stop login, print message
.TP
.B ~/.hushlogin
makes login quieter
.TP
.B /usr/bin/sh
.TP
.B /usr/bin/csh
.TP
.B \&.login
.TP
.B \&.profile
.PD
.SH "SEE ALSO"
.BR csh (1),
.BR mail (1),
.BR passwd (1),
.BR quota (1),
.BR rlogin (1C),
.BR sh (1),
.BR uucp (1C),
.BR passwd (5),
.BR environ (5V),
.BR utmp (5),
.BR init (8),
.BR getty (8),
.BR shutdown (8)
.SH DIAGNOSTICS
.TP 20
.B Login incorrect
If the name or the password is bad (or mistyped).
.TP
.B No Shell
.TP
.B cannot open password file
.TP
.B no directory
Ask your system administrator for assistance.
.SH NOTES
.LP
The following options are undocumented, and not intended
for the user.
The 
.B \-r
option is used by the remote login server,
.BR rlogind (8C)
to force
.B login 
to enter into an initial connection protocol.
.B \-h
is used by
.BR telnetd (8C)
and other servers to list the host from which the connection was
received.
rue.1 f      tset.1 e      tsort.1       tty.1 or  ,    u370.1 .  <    u3b.1 70  L    u3b15.1   \    u3b2.1 1  l    u3b5.1 2  |    ul.1 3b5      umask.1       	unalias../share/man/man1/logname.1                                                                             755       0      12         1263  4424740671  10417                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)logname.1 1.10 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH LOGNAME 1 "9 September 1987"
.SH NAME
logname \- get the name by which you logged in
.SH SYNOPSIS
.B logname
.SH DESCRIPTION
.IX  "logname command"  ""  "\fLlogname\fP \(em display login name"
.IX  display "login name \(em \fLlogname\fP"
.IX  user  "display effective name"  ""   "display effective name \(em \fLlogname\fP"
.IX  login  "display login name"  ""   "display login name \(em \fLlogname\fP"
.B logname
returns the contents of the environment variable
.SM LOGNAME\s0,
which is set when a user logs into the system.
.SH FILES
.PD 0
.TP 20
.B /etc/profile
.PD
.SH SEE ALSO
.BR env (1),
.BR login (1),
.BR environ (5V)
1 ice       nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #  	objdump.1 H  X  $  od.1v 1   p  %  old-clocktool.1     &  
old-compact.1 &    '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1     *  
old-perfmon.1 *     +  old-prmail.1  +    ,  	old-pti.1   ,./share/man/man1/logout.1                                                                              755       0      12           74  4424740671  10245                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)logout.1 1.8 89/03/26 SMI; 
bib.1        lorder.1    ,    lpq.1 .1  <    lpr.1 q.  L    lprm.1 .  `    lptest.1 1 .  p  	  ls.1v .1    
  m4.1v .1      m68k.1 1      mach.1 k    
  machid.1 1 1      mail.1 1     $ mailrc_to_defaults.1 $        
mailtool.1 l      make.1 l       man.1 ke  4    	mc68010.1  l  H    	mc68020.1 4  X    mesg.1 .  h    mkdir.1   x    mkstr.1   ./share/man/man1/look.1                                                                                755       0      12         2330  4424740671   7735                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)look.1 1.13 89/03/26 SMI; 
.TH LOOK 1 "17 August 1987"
.SH NAME
look \- find words in the system dictionary or lines in a sorted list
.SH SYNOPSIS
.B look
.RB [ " \-df " ]
.RB [ " \-t\fIc\fP " ]"
.I string
.RI [ " filename " ]
.SH DESCRIPTION
.IX  "look command"  ""  "\fLlook\fP \(em find lines in a sorted file"
.IX  find "lines in sorted file"  ""  "find lines in sorted file \(em \fLlook\fP"
.IX  file  "find lines in sorted"  ""  "find lines in sorted \(em \fLlook\fP"
.IX  "sorted file"  "find lines in"  ""  "find lines in \(em \fLlook\fP"
.IX  lines  "find, in sorted file"  ""  "find, in sorted file \(em \fLlook\fP"
.B look
consults a sorted
.I filename
 and prints all lines that begin with
.IR string .
.LP
If no 
.IR filename
is specified,
.B look
uses
.B /usr/dict/words
with collating sequence
.BR \-df .
.SH OPTIONS
.TP 
.B \-d
Dictionary order.  Only letters, digits, 
.SM TAB
and
.SM SPACE
characters are used in comparisons.
.TP
.B \-f
Fold case.  Upper case letters aren't distinguished from lower case
in comparisons.
.TP
.BI \-t c
Set termination character.  All characters to the right of
.I c
in 
.I string
are ignored.
.SH FILES
.PD 0
.TP 20
.B /usr/dict/words
.PD
.SH "SEE ALSO"
.BR grep(1V),
.BR sort(1V)
  
overview.1     8  pack.1 w  $  9  page.1 k  8  :  
pagesize.1 k  L  ;  passwd.1 1 w  \  <  paste.1   l  =  pcat.1 t  |  >  pdp11.1     ?  perfmeter.1     @  pg.1v te    A  plot.1g     B  popd.1 t    C  pr.1v pd    D  
printenv.1 d  ./share/man/man1/lookbib.1                                                                             755       0      12         4275  4424740671  10424                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lookbib.1 1.24 89/03/26 SMI; from UCB 4.1
.TH LOOKBIB 1 "21 December 1987"
.SH NAME
lookbib \- find references in a bibliographic database
.SH SYNOPSIS
.B lookbib
.I database
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  lookbib  ""  "\fLlookbib\fP \(em find bibliographic references"
.IX  "document production"  "lookbib"  ""  "\fLlookbib\fP \(em find bibliographic references"
.IX  "bibliography"  "lookbib"  ""  "\fLlookbib\fP \(em find bibliographic references"
.LP
A bibliographic reference is a set of lines, constituting fields of
bibliographic information.  Each field starts on a line beginning with
a
.RB ` % ',
followed by a key-letter, then a blank, and finally the
contents of the field, which may continue
until the next line starting with
.RB ` % '.
.LP
.B lookbib
uses an inverted index made by
.B indxbib
to find sets of bibliographic references.  It reads keywords typed
after the
.RB ` > '
prompt on the terminal, and retrieves records
containing all these keywords.
If nothing matches, nothing is returned
except another
.RB ` > '
prompt.
.LP
It is possible to search multiple databases, as long as they have a
common index made by
.BR indxbib (1).
In that case, only the first argument given to
.B indxbib
is specified to
.B lookbib.
.LP
If
.B lookbib
does not find the index files (the
.B .i[abc]
files), it looks for a
reference file with the same name as the argument, without the
suffixes.  It creates a file with a
.B .ig
suffix, suitable for use with
.B fgrep 
(see
.BR grep (1V)).
.B lookbib
then uses this
.B fgrep
file to find references.  This method is
simpler to use, but the
.B .ig
file is slower to use than the
.B .i[abc]
files, and does not allow the use of multiple reference files.
.SH FILES
.PD 0
.TP 20
.IB x .ia
.TP
.IB x .ib
.TP
.IB x .ic
index files
.TP
.IR x .ig
reference file
.PD
.SH SEE ALSO
.BR addbib (1),
.BR grep (1V),
.BR indxbib (1),
.BR refer (1),
.BR roffbib (1),
.BR sortbib (1)
.LP
.TX DOCS
.SH BUGS
Probably all dates should be indexed,
since many disciplines refer to literature
written in the 1800s or earlier.
n.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-unget.1  p  8  q  
sccs-val.1 8  H  r  ./share/man/man1/lorder.1                                                                              755       0      12         2734  4424740671  10270                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lorder.1 1.16 89/03/26 SMI;
.TH LORDER 1 "22 March 1989"
.SH NAME
lorder \- find an ordering relation for an object library
.SH SYNOPSIS
.B lorder
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  "lorder command"  ""  "\fLlorder\fP \(em find ordering for object library"
.IX  find "ordering for object library"  ""  "find ordering for object library \(em \fLlorder\fP"
.IX  library  "find ordering for object"  ""  "find ordering for object \(em \fLlorder\fP"
.IX  "object library, find ordering for"  ""  "object library, find ordering for \(em \fLlorder\fP"
.IX  "programming tools"  "lorder"  ""  "\fLlorder\fP \(em find ordering for object library"
.LP
Give
.B lorder
one or more object or library archive (see
.BR ar (1V))
.IR filename s,
and it lists
pairs of object file names \(em
meaning that the first file of the pair refers to
external identifiers defined in
the second \(em to the standard output.
.BR lorder 's
output may be processed by
.BR  tsort (1)
to find an ordering of
a library suitable for one-pass access by
.BR  ld (1).
.SH EXAMPLE
.LP
This brash one-liner intends to build a new library from existing
.B .o
files.
.IP
.B
ar cr library \`\|lorder *.o | tsort\`
.LP
The
.BR ranlib (1),
command converts an ordered archive
into a randomly accessed library and makes
.B lorder
unnecessary.
.SH "SEE ALSO"
.BR ar (1V),
.BR ld (1),
.BR ranlib (1),
.BR tsort (1)
.SH BUGS
The names of object files, in and out of
libraries, must end with
.RB  ` .o ';
otherwise, nonsense results.
prof.1 v       w.1     F  ./share/man/man1/lpq.1                                                                                 755       0      12        10656  4424740671   7617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lpq.1 1.22 89/03/26 SMI; from UCB 4.3 BSD
.TH LPQ 1 "22 March 1989"
.SH NAME
lpq \- display the queue of printer jobs
.SH SYNOPSIS
.B lpq
[
.BI \-P printer
] [
.B \-l
] [
.B +
[
.I interval
] ] [
.I job#
\&.\|.\|.
] [
.I username
\&.\|.\|.
]
.SH DESCRIPTION
.IX  "lpq command"  ""  "\fLlpq\fP \(em display printer queue"
.IX  printer  "display queue"  ""  "\fLlpq\fP \(em display queue"
.IX  display "printer queue \(em \fLlpq\fP"
.IX  queue  "display printer"  ""  "\fLlpq\fP \(em display printer"
.LP
.B lpq
displays the contents of a printer queue.  It reports the status of
jobs specified by
.IR job# ,
or all jobs owned by the user specified by
.IR username .
.B lpq
reports on all jobs in the default printer queue when invoked with no
arguments.
.LP
For each print job in the queue,
.B lpq
reports the user's name, current position, the names of input
files comprising the job, the job number (by which it is
referred to when using
.BR lprm (1))
and the total size in bytes.
Normally, only as much information as will fit on one line
is displayed.  Jobs are normally queued on a first-in-first-out basis.
Filenames comprising a job may be unavailable, such as when
.B lpr
is used at the end of a pipeline; in such cases the filename field
indicates ``(standard input)''.
.LP
If
.B lpq
warns that there is no daemon present
(that is, due to some malfunction), the
.BR lpc (8)
command can be used to restart a printer daemon.
.SH OPTIONS
.TP 15
.BI \-P " printer"
Display information about the queue for the specified
.IR printer .
In the absence of the
.B \-P
option, the queue to the printer specified by the
.SM PRINTER
variable in the environment is used. If the
.SM PRINTER
variable isn't set, the queue for the default printer is used.
.TP
.BI \-l
Display queue information in long format; includes the name of
the host from which the job originated.
.HP
.BR \(pl [
.I interval
]
.br
Display the spool queue periodically until it empties.  This option
clears the terminal screen before reporting on the queue.  If an
.I  interval
is supplied,
.B lpq
sleeps that number of seconds in between reports.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
for manipulating the screen for repeated display
.TP
.B /etc/printcap
to determine printer characteristics
.TP
.B /var/spool/l*
spooling directory, as determined from printcap
.TP
.B /var/spool/l*/cf*
control files specifying jobs
.TP
.B /var/spool/l*/lock
lock file to obtain the currently active job
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR lprm (1),
.BR lpc (8),
.BR lpd (8)
.SH DIAGNOSTICS
.TP
.IB printer " is ready and printing"
The
.B lpq
program checks to see if there is a printer daemon.
If the daemon is hung, the super-user can
abort the current daemon and start a new one using
.BR lpc (8).
.TP
.BI "Waiting for " printer " to become ready (offline ?)"
The daemon could not open the printer device.  The printer may be
turned off-line.  This message can also occur if a printer is out
of paper, the paper is jammed, and so on.  Another possible cause is
that a process, such as an output filter, has exclusive use of the
device.  The only recourse in this case is to kill the offending
process and restart the printer with
.BR lpc .
.TP
.BI "waiting for " host " to come up"
A daemon is trying to connect to the remote machine named
.IR host ,
in order to send the files in the local queue.
If the remote machine is up,
.B lpd
on the remote machine is probably dead or
hung and should be restarted using
.IR lpc .
.br
.ne 5
.TP
.BI "sending to " host
The files are being transferred to the remote
.IR host ,
or else the local daemon has hung while trying to transfer the
files.
.TP
.BI "Warning: " printer " is down"
The printer has been marked as being unavailable with
.BR lpc .
.TP
.B Warning: no daemon present
The
.B lpd
process
overseeing
the spooling queue, as indicated in the ``lock'' file
in that directory, does not exist.  This normally occurs
only when the daemon has unexpectedly died.  Check the printer's
error log for a diagnostic from the deceased process; you can
restart the printer daemon with
.BR lpc .
.SH BUGS
.LP
.B lpq
may report unreliably.  The status as
reported may
not always reflect the actual state of the printer.
Under some circumstances,
.B lpq
reports that a printer is ready and printing when the daemon is,
in fact, hung.
.LP
Output formatting is sensitive to the line length of the terminal;
this can result in widely-spaced columns.
.LP
.B lpq
is sometimes unable to open various files when the
lock file is malformed.
      
unexpand.1       unget.1        uniq.1 e      unha./share/man/man1/lpr.1                                                                                 755       0      12        17736  4424740672   7627                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)lpr.1 1.37 89/03/26 SMI; from UCB 4.3 BSD 6.1
.\"
.TH LPR 1 "22 March 1989"
.SH NAME
lpr \- send a job to the printer
.SH SYNOPSIS
.B lpr
[
.BI \-P printer
] [
.BI \-# copies
] [
.BI \-C class
] [
.BI \-J job
]
.if n .ti +5n
[
.BI \-T title
] [
.B \-i
[
.I indent
] ] [
.BI \-1234 font
]
.if t .ti +.5i
[
.BI \-w cols
]
.if n .ti +5n
[
.B \-B
] [
.B \-r
] [
.B \-m
] [
.B \-h
] [
.B \-s
] [
.BI \- filter-option
]
.if n .ti +5n
[
.I filename
\&.\|.\|.
]
.SH DESCRIPTION
.IX  "lpr command"  ""  "\fLlpr\fP \(em print files"
.IX  "print files" "" "print files \(em \fLlpr\fP"
.IX  file  print  ""  "print \(em \fLlpr\fP"
.LP
.B lpr
forwards printer jobs to a spooling area for subsequent printing as
facilities become available.
Each printer job consists of copies of
(or, with
.B \-s ,
symbolic links to) each
.I filename
you specify.
The spool area is managed by the line printer daemon,
.BR lpd (8).
.B lpr
reads from the standard input if no files are specified.
.SH OPTIONS
.LP
.TP 15
.BI \-P printer
Send output to the named
.IR printer .
Otherwise send output to the printer named in the
.SB PRINTER
environment variable, or to the default printer,
.BR lp .
.TP
.BI \-# copies
Produce the number of
.I copies
indicated for each named file.  For example:
.RS
.IP
.B example% lpr \-#3 index.c lookup.c
.RE
.IP
produces three copies of
.BR index.c ,
followed by three copies of
.BR lookup.c .
On the other hand,
.RS
.IP
.B example% cat index.c lookup.c | lpr \-#3
.RE
.IP
generates three copies of the concatenation of the files.
.TP
.BI \-C class
Print
.I class
as the job classification on the
burst page.
For example,
.RS
.IP
.B example% lpr \-C Operations new.index.c
.RE
.IP
replaces the system name (the name returned by
.IR hostname )
with \(lqOperations\(rq on the burst page, and prints the file
.IR new.index.c .
.TP
.BI \-J job
Print
.I job
as the job name on the
burst page.  Normally,
.B lpr
uses the first file's name.
.TP
.BI \-T " title"
Use
.I title
instead of the file name for the title
used by
.BR pr (1V).
.TP
\fB\-i\fR[ \fIindent\fR ]
Indent output
.I indent
.SM SPACE
characters.  Eight
.SM SPACE
characters is the default.
.PD 0
.TP
.BI \-1 " font "
.TP
.BI \-2 " font "
.TP
.BI \-3 " font "
.TP
.BI \-4 " font "
Mount the specified
.I font
on font position
.BR 1 ,
.BR 2 ,
.B 3
or
.BR 4 .
The daemon will construct a
.I .railmag
file in the spool directory that
indicates the mount by referencing
.BR /usr/lib/vfont/font .
.PD
.TP
.BI \-w cols
Use
.I cols
as the page width for
.BR pr .
.TP
.B \-r
Remove the file upon completion of spooling,
or upon completion of printing with the
.B \-s
option.
.TP
.B \-m
Send mail upon completion.
.TP
.B \-h
Suppress printing the burst page.
.TP
.B \-s
Create a symbolic link from the spool
area to the data files rather than trying to copy
them (so large files can be printed).
This means the data files should
not be modified or removed until they
have been printed.  In the absence of this
option, files larger than the maximum given in the
.B mx
capability of the
.BR printcap (5)
entry.  The default is just under 1 Megabyte.
.B \-s
only prevents copies of local files from being made.  Jobs from
remote hosts are copied anyway.
.B \-s
only works with named data files; if the
.B lpr
command is at the end of a pipeline, the data is copied to the
spool.
.br
.ne 10
.TP
.I filter-option
The following single letter options notify the line printer
spooler that the files are not standard text files.
The spooling daemon will use the appropriate filters to
print the data accordingly.
.ne 12
.RS
.TP
.B \-p
.PD 0
Use
.B pr
to format the files
.RB ( "lpr \-p"
is very much like
.RB "pr | lpr" ).
.TP
.B \-l
Print control characters and suppress page breaks.
.TP
.B \-t
The files contain
.BR troff (1)
(cat phototypesetter) binary data.
.TP
.B \-n
The files contain data from
.B ditroff
(device independent troff).
.TP
.B \-d
The files contain data from
.B tex
(\s-1DVI\s0
format from Stanford).
.TP
.B \-g
The files contain standard plot data as produced by the
.BR plot (3X)
routines (see also
.BR plot (1G)
for the filters used by the printer spooler).
.TP
.B \-v
The files contain a raster image, see
.BR rasterfile (5).
The printer must support an appropriate imaging model such as
PostScript in order to print the image.
.TP
.B \-c
The files contain data produced by
.IR cifplot .
.TP
.B \-f
Interpret the first character of each line as a standard
.SM FORTRAN
carriage control character.
.PD
.LP
If no
.I filter-option
is given (and the printer can interpret PostScript), the string
.RB ` %! '
as the first two characters of a file indicates that it
contains PostScript commands.
.LP
These filter options offer a standard user interface,
and all options may not be available for, nor applicable to,
all printers.
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
personal identification
.TP
.B /etc/printcap
printer capabilities data base
.TP
.B /usr/lib/lpd
line printer daemon
.TP
.B /var/spool/l*
directories used for spooling
.TP
.B /var/spool/l*/cf*
daemon control files
.TP
.B /var/spool/l*/df*
data files specified in
.RB ` cf '
files
.TP
.B /var/spool/l*/tf*
temporary copies of
.RB ` cf '
files
.TP
.B /usr/lib/vfont/font
.PD
.SH "SEE ALSO"
.BR lpq (1),
.BR lprm (1),
.BR plot (1G),
.BR pr (1V),
.BR screendump (1),
.BR troff (1),
.BR plot (3X),
.BR printcap (5),
.BR rasterfile (5),
.BR lpc (8),
.BR lpd (8)
.SH DIAGNOSTICS
.TP
.B lpr: copy file is too large
A file is determined to be too \(lqlarge\(rq
to print by copying into the spool area.
Use the
.B \-s
option as defined above to make a symbolic
link to the file instead of copying
it.  A too-large file is approximately 1 Megabyte.
.BR lpr
truncates the file, and prints as much of it as it can.
.TP
.B lpr: \fIprinter\fP\|: unknown printer
The
.B printer
was not found in the
.B printcap
database.  Usually this is a typing mistake; however, it may indicate
a missing or incorrect entry in the
.B /etc/printcap
file.
.TP
.B "lpr: \fIprinter\fP\|: jobs queued, but cannot start daemon."
The connection to
.B lpd
on the local machine failed.
This usually means the printer server started at
boot time has died or is hung.  Check the local socket
.B /dev/printer
to be sure it still exists (if it does
not
exist,
there is no
.B lpd
process running).
.TP
.B lpr: \fIprinter\fP\|: printer queue is disabled
This means the queue was turned off with
.RS
.IP
.BI "example% /usr/etc/lpc disable " printer
.RE
.IP
to prevent
.B lpr
from putting files in the queue.  This is normally
done by the system manager when a printer is
going to be down for a long time.  The
printer can be turned back on by a super-user with
.BR lpc .
.IP
If a connection to
.B lpd
on the local machine cannot be made
.B lpr
will say that the daemon cannot be started.
Diagnostics may be printed in the daemon's log file
regarding missing spool files by
.BR lpd
.SH BUGS
.LP
Command-line options cannot be combined into a single argument
as with some other commands.  The command:
.IP
.B lpr \-fs
.LP
is not equivalent to
.IP
.BR "lpr \-f \-s"
.LP
Placing the
.B \-s
flag first, or writing each option as a separate argument, makes a link
as expected.
.LP
.B lpr \-p
is not precisely
equivalent
to
.BR "pr | lpr" .
.B lpr \-p
puts the current date at the top of each page, rather
than the date last modified.
.LP
Fonts for
.BR troff (1)
and
\s-1T\s-1\dE\u\s+1X\s+1\(rg
reside on the printer host.
It is currently not possible to use local font libraries.
.LP
If you spool too large a file, output is truncated at about 1
Megabyte.
.LP
.B lpr
objects to printing binary files.
.LP
The
.B \-s
option only works for print jobs that are run from the printer host
itself.  Jobs added to the queue from a remote host are always
copied into the spool area.  That is, if the printer does not
reside on the host that
.B lpr
is run from, the spooling system makes a copy the file to print,
and places it in the spool area of the printer host, regardless of
.BR \-s .
reated by the
.B \-C
or
.B \-o
opt./share/man/man1/lprm.1                                                                                755       0      12         6564  4424740672   7761                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lprm.1 1.20 89/03/26 SMI; from UCB 4.3 BSD 6.1
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH LPRM 1 "22 March 1989"
.UC 5
.SH NAME
lprm \- remove jobs from the printer queue
.SH SYNOPSIS
.B lprm
[
.BI \-P printer
] [
.B \-
] [
\fIjob #\fR .\|.\|.
] [
.I username
\&.\|.\|.
]
.SH DESCRIPTION
.IX  "lprm command"  ""  "\fLlprm\fP \(em remove print jobs"
.IX  remove "print jobs \(em \fLlprm\fP"
.IX  delete "print jobs \(em \fLlprm\fP"
.IX  printer  "remove jobs from queue"  ""  "remove jobs from queue \(em \fLlprm\fP"
.IX  queue  "remove jobs from printer"  ""  "remove jobs from printer \(em \fLlprm\fP"
.B lprm
removes a job or jobs from a printer's spooling queue.
Since the spool directory is protected from users, using
.B lprm
is normally the only method by which a user can remove a job.
.LP
Without any arguments,
.BR lprm
deletes the job that is currently active, provided that the user who
invoked
.BR lprm
owns that job.
.LP
When the super-user specifies a
.IR username ,
.B lprm
removes all jobs belonging to that user.
.LP
You can remove a specific job by supplying its job number as an
argument, which you can obtain using
.BR lpq (1).
For example:
.LP
.nf
.RS
.ta\w'active'u+2n +\w'wendy'u+2n +\w'385'u+2n +\w'standard input'u+16n
.B example% lpq  \-Phost
.B host is ready and printing
.B Rank	Owner	Job	Files	Total Size
.B active	wendy	385	standard input	35501 bytes
.B example% lprm \-Phost 385
.in -0.5i
.fi
.RE
.LP
.B lprm
reports the names of any files it removes, and is
silent if there are no applicable jobs to remove.
.LP
.B lprm
kills the active printer daemon, if necessary, before removing
spooled jobs; it restarts the daemon when through.
.SH OPTIONS
.TP 15
.BI \-P printer
Specify the queue associated with a specific
printer.  Otherwise the value of the
.SB PRINTER
variable in the environment is used.  If this variable is unset,
the queue for the default printer is used.
.TP
.B \-
Remove all jobs owned by you.  If invoked by the super-user, all
jobs in the spool are removed.  (Job ownership is determined by the
user's login name and host name on the machine where the
.B lpr
command was invoked).
.SH FILES
.PD 0
.TP 20
.B /etc/printcap
printer characteristics file
.TP
.B /var/spool/*
spooling directories
.TP
.B /var/spool/l*/lock
lock file used to obtain the pid of the current
daemon and the job number of the currently active job
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR lpq (1),
.BR lpd (8)
.SH DIAGNOSTICS
.TP
.B lprm: \fIprinter\fP\|: cannot restart printer daemon
The connection to
.B lpd
on the local machine failed.
This usually means the printer server started at
boot time has died or is hung.  If it is hung, the master
.BR lpd (8)
daemon may have to be killed and a new one started.
.SH BUGS
Since race conditions are possible when updating the lock file,
an active job may be incorrectly identified for removal by an
.B lprm
command issued with no arguments.  During the interval between an
.BR lpq (1)
command and the execution of
.BR lprm ,
the next job in line may have become active; that job
may be removed unintentionally if it is owned by you.
To avoid this, supply
.B lprm
with the job number to remove when a critical job that
you own is next in line.
.LP
Only the super-user can remove print jobs submitted from another host.
  |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c      `  
ruptime.1c     a./share/man/man1/lptest.1                                                                              755       0      12         2155  4424740672  10312                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lptest.1 1.4 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH LPTEST 1 "16 February 1988"
.SH NAME
lptest \- generate lineprinter ripple pattern
.SH SYNOPSIS
.B lptest
[
.I length
[
.I count
] ]
.br
.SH DESCRIPTION
.IX "lptest command" "" "\fLlptest\fR command"  
.LP
.B lptest
writes the traditional "ripple test" pattern on standard output.
In 96 lines,
this pattern will print all 96 printable
.SM ASCII
characters
in each position.
While originally created to test printers, it is quite
useful for testing terminals,
driving terminal ports for debugging purposes,
or any other task where a quick supply of random data is needed.
.LP
The 
.I length
argument specifies the output line length if the the default 
length of 79 is inappropriate.
.LP
The
.I count
argument specifies the number of output lines to be generated if
the default count of 200 is inappropriate.
Note that if 
.I count
is to be specified,
.I length
must be also be specified.
 8  pack.1   $  9  page.1   8  :  
pagesize.1 8  L  ;  passwd.1  L  \  <  paste.1   l  =  pcat.1    |  >  pdp11.1     ?  perfmeter.1     @  pg.1v 1     A  plot.1g     B  popd.1      C  pr.1v       D  
printenv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1 1   0  H  ps.1  1   @  I  ptx.1    P  J  push./share/man/man1/ls.1v                                                                                 755       0      12        17124  4424740672   7625                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ls.1v 1.30 89/03/26 SMI; from UCB 4.3 BSD and S5
.TH LS 1V "25 March 1989"
.SH NAME
ls \- list the contents of a directory
.SH SYNOPSIS
.B ls
[
.B \-aAcCdfFgilLqrRstu1
]
.I filename
\&.\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/ls
[
.B \-abcCdfFgilLmnopqrRstux
]
.I filename
\&.\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLls\fR"
.IX  "ls command"  ""  "\fLls\fP \(em list files"
.IX  display "file names \(em \fLls\fP"
.IX  files  "display names"  ""  "display names \(em \fLls\fP"
.IX  directory  "list contents of"  ""  "list contents of \(em \fLls\fP"
.LP
For each
.I filename
which is a directory,
.B ls
lists the contents of the directory; for each
.I filename
which is a file,
.B ls
repeats its name and any other information
requested.  By default, the output
is sorted alphabetically.  When no argument
is given, the current directory
is listed.  When several arguments are given,
the arguments are first sorted
appropriately, but file arguments are
processed before directories and their
contents.
.LP
In order to determine output formats for the
.BR \-C ,
.BR \-x ,
and
.B \-m
options,
.B /usr/5bin/ls
uses an environment variable,
.BR \s-1COLUMNS\s0 ,
to determine the number of character positions available on one
output line.
If this variable is not set, the
.B terminfo
database is used to determine the number of columns, based on the
environment variable
.BR \s-1TERM\s0 .
If this information cannot be obtained, 80 columns are assumed.
.SS Permissions Field
.LP
The mode printed under the
.B \-l
option contains 10 characters interpreted as follows.
If the first character is:
.sp .5
.RS
.PD 0
.TP 3
.B d
entry is a directory;
.TP 3
.B b
entry is a block-type special file;
.TP 3
.B c
entry is a character-type special file;
.TP 3
.B l
entry is a symbolic link;
.TP 3
.B p
entry is a
.SM FIFO
(also known as \(lqnamed pipe\(rq) special file;
.TP 3
.B s
entry is an
.SB AF_UNIX
address family socket, or
.TP 3
.B  \-
entry is a plain file.
.PD
.RE
.LP
The next 9 characters are interpreted as three sets of three
bits each.
The first set refers to owner permissions; the next refers to
permissions to
others in the same user-group; and the last refers to all
others.  Within each
set the three characters indicate permission respectively to
read, to write, or to execute the file as a program.  For a
directory, \(lqexecute\(rq
permission is interpreted to mean permission to search the
directory.
The permissions are indicated as follows:
.sp .5
.RS
.PD 0
.TP 3
.B  r
the file is readable;
.TP 3
.B  w
the file is writable;
.TP 3
.B  x
the file is executable;
.TP 3
.B  \-
the indicated permission is not granted.
.PD
.RE
.LP
The group-execute permission character is given as
.B s
if the file has the set-group-id bit set;
likewise the owner-execute permission character is given as
.B s
if the file has the set-user-id bit set.
.LP
The last character of the mode (normally
.B x
or
.RB ` \- ')
is
.B t
if the 1000 bit of the mode is on.  See
.BR chmod (1V)
for the meaning of this mode.
The indications of set-\s-1ID\s0 and 1000 bits of the mode
are capitalized
.RB ( S
and
.B T
respectively) if the corresponding execute permission is
.I not
set.
.LP
When the sizes of the files in a directory are listed, a
total
count
of blocks,
including indirect blocks is printed.
.SH OPTIONS
.TP
.B \-a
List all entries; in the absence of this option, entries whose
names begin with a
.RB ` . '
are
.I not
listed (except for the super-user, for whom
.BR ls ,
but not
.BR /usr/5bin/ls ,
normally prints even files that begin with a
.RB ` . ').
.TP
.B \-A
.RB ( ls
only)  Same as
.BR \-a ,
except that
.RB ` . '
and
.RB ` .\|. '
are not listed.
.TP
.B \-c
Use time of last edit (or last mode change) for sorting or printing.
.br
.ne 5
.TP
.B \-C
Force multi-column output, with entries sorted down the columns;
for
.BR ls ,
this is the default when output is to a terminal.
.TP
.B \-d
If argument is a directory, list only its name
(not its contents); often used with
.B \-l
to get the status of a directory.
.TP
.B \-f
Force each argument to be interpreted as
a directory and list the name
found in each slot.  This option turns off
.BR \-l ,
.BR \-t ,
.BR \-s ,
and
.BR \-r ,
and turns on
.BR \-a ;
the order is the order in which entries appear in the directory.
.TP
.B \-F
Mark directories with a trailing slash
.RB (` / '),
executable files with a trailing asterisk
.RB (` * '),
symbolic links with a trailing at-sign
.RB (` @ '),
and
.SB AF_UNIX
address family sockets with a trailing equals sign
.RB (` = ').
.TP
.B \-g
For
.BR ls ,
show the group ownership of the file in a
long output.  For
.BR /usr/5bin/ls ,
print a long listing, the same as
.BR \-l ,
except that the owner is not printed.
.TP
.B \-i
For each file, print the i-number in the first column of the report.
.TP
.B \-l
List in long format, giving mode, number
of links, owner, size in bytes,
and time of last modification for each file.
If the file is a special file the size field will instead
contain the major and minor device numbers.
If the time of last modification is greater than six months ago,
it is shown in the format
.RI ` "month date year" ';
files modified within six months show
.RI ` "month date time" '.
If the file is a symbolic link the pathname of the
linked-to file is printed preceded by
.RB ` \(em> '.
.B /usr/5bin/ls
will print the group in addition to the owner.
.TP
.B \-L
If argument is a symbolic link, list the file or directory the
link references rather than the link itself.
.TP
.B \-q
Display non-graphic characters in filenames as
the character
.BR ? ;
for
.BR ls ,
this is the default when output is to a terminal.
.TP
.B \-r
Reverse the order of sort to get reverse alphabetic
or oldest first as appropriate.
.TP
.B \-R
Recursively list subdirectories encountered.
.TP
.B \-s
Give size of each file, including any
indirect blocks used to map the file,
in kilobytes
.RB ( ls )
or 512-byte blocks
.RB ( /usr/5bin/ls ).
.TP
.B \-t
Sort by time modified (latest first) instead of by name.
.TP
.B \-u
Use time of last access instead of last modification for sorting
(with the
.B \-t
option) and/or printing (with the
.B \-l
option).
.TP
.B \-1
.RB ( ls
only)
Force one entry per line output format; this is the default
when output is not to a terminal.
.SH SYSTEM V OPTIONS
.TP
.B \-b
Force printing of non-graphic characters to be
in the octal
.B \eddd
notation.
.TP
.B \-m
Stream output format; the file names are printed
as a list separated by commas, with as many
entries as possible printed on a line.
.TP
.B \-n
The same as
.BR \-l ,
except that the owner's
.SM UID
and group's
.SM GID
numbers are printed, rather than
the associated character strings.
.TP
.B \-o
The same as
.BR \-l ,
except that the group is not printed.
.TP
.B \-p
Put a slash
.RB (` / ')
after each filename if that file is a directory.
.TP
.B \-x
Multi-column output with entries sorted across
rather than down the page.
.br
.ne 8
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
to get user
.SM ID\s0's
for
.RB ` "ls \-l" '
and
.RB ` "ls \-o" '.
.TP
.B /etc/group
to get group
.SM ID\s0
for
.RB ` "ls \-g" '
and
.RB ` "/usr/5bin/ls \-l" '.
.TP
.B /usr/share/lib/terminfo/*
to get terminal information for
.BR /usr/5bin/ls .
.PD
.br
.ne 5
.SH BUGS
.LP
.SM NEWLINE
and
.SM TAB
are considered printing characters in filenames.
.LP
The output device is assumed to be 80 columns wide.
.LP
The option setting based on whether the output is a teletype is
undesirable as
.RB ` "ls \-s" '
is much different than
.RB ` "ls \-s | lpr" '.
On the other hand, not doing this setting would
make old shell scripts which used
.B ls
almost certain losers.
.LP
None of the above apply to
.BR /usr/5bin/ls .
.LP
Unprintable characters in file names may confuse the
columnar output options.
others in the same user-group; and the last refers to all
others.  Within each
set the three characters indicate permission respectively to
read, to write, or to execute the file as a program.  For a
directory, \(lqexecute\(rq
permission is interpreted to mean permission to search the
directory.
The permissions are indicated as follows:
.sp .5
.RS
.PD 0
.TP 3
.B  r
the file is readable;
.TP 3
.B  w
the file is writable;
.TP ./share/man/man1/m4.1v                                                                                 755       0      12        21733  4424740672   7530                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)m4.1v 1.12 89/03/26 SMI; from S5R2 X.X
.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 M4 1V "22 March 1989"
.SH NAME
m4 \- macro language processor
.SH SYNOPSIS
.B m4
[
.I filename
] .\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/m4
[
.B \-es
]
[
.BI \-B int
]
[
.BI \-H int
]
[
.BI \-S int
]
[
.BI \-T int
]
[
.BI \-D\fIname\fB= val
]
[
.BI \-U name
]
[
.I filename 
].\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLm4\fR"
.IX  "m4 command"  ""  "\fLm4\fP \(em macro processor"
.IX  "macro processor"  ""  "macro processor \(em \fLm4\fP"
.IX  "programming tools"  m4  ""  "\fLm4\fP \(em macro processor"
.B m4
is a macro processor intended as a front end
for Ratfor, C, and other languages.
Each of the argument files is processed in order;
if there are no files, or if a file name is
.RB ` \- ',
the standard input is read.
The processed text is written on the standard output.
.LP
Macro calls have the form:
.LP
.RS
.IB name ( argument1\c
.RB [ ","
.IB argument2 ,
.RB \&.\|.\|. , ]
.IB argumentn )
.RE
.LP
The
.RB ` ( '
must immediately follow the name of the macro.
If the name of a defined macro is not followed by a
.RB ` ( ',
it is interpreted as a call of the macro with no arguments.
Potential macro names consist of letters, digits, and
.RB ` _ ',
(underscores)
where the first character is not a digit.
.LP
Leading unquoted
.SM SPACE\s0,
.SM TAB\s0,
and
.SM NEWLINE
characters are ignored while collecting arguments.
Left and right single quotes
.RB ( `\|' )
are used to quote strings.
The value of a quoted string is the string stripped of the quotes.
.LP
When a macro name is recognized,
the arguments are collected by searching
for a matching right parenthesis.
If fewer arguments are supplied than are in the macro definition,
the trailing arguments are taken to be
.SM NULL\s0.
Macro evaluation proceeds normally during
the collection of the arguments,
and any commas or right parentheses which
happen to turn up within the value
of a nested call are as effective as those
in the original input text.
After argument collection, the value of
the macro is pushed back onto the
input stream and rescanned.
.SH SYSTEM V OPTIONS
.LP
The options and their effects are as follows:
.TP
.B \-e
Operate interactively.
Interrupts are ignored and the output is unbuffered.
.TP
.B \-s
Enable line sync output for the C preprocessor
.RB ( # "line .\|.\|.\|)"
.TP
.BI \-B int
Change the size of the push-back and argument collection
buffers from the default of 4,096.
.TP
.BI \-H int
Change the size of the symbol table hash array from the
default of 199.
The size should be prime.
.TP
.BI \-S int
Change the size of the call stack from the default of 100 slots.
Macros take three slots, and non-macro arguments take one.
.TP
.BI \-T int
Change the size of the token buffer from the default of 512 bytes.
.LP
To be effective, these flags must appear before any
file names and before any
.B \-D
or
.B \-U
flags:
.TP
.BI \-D name [= val ]
Define
.I filename
to be
.B val
or to be
.SM NULL
in
.IR val 's
absence.
.TP
.BI \-U name
Undefine
.IR name .
.SH USAGE
.SS Built-In Macros
.LP
.B m4
makes available the following built-in macros.
They may be redefined, but once this is
done the original meaning is lost.
Their values are
.SM NULL
unless otherwise stated.
.TP 12
.B define
The second argument is installed as the value of the macro
whose name is the first argument.
Each occurrence of
.BI $ n
in the replacement text, where
.I n
is a digit, is replaced by the
.IR n 'th
argument.  Argument 0 is the name of the macro;
missing arguments are replaced by the
.SM NULL
string.
.TP
.B undefine
Remove the definition of the macro named in the argument.
.TP
.B ifdef
If the first argument is defined, the value
is the second argument, otherwise the third.
If there is no third argument, the value is
.SM NULL\s0.
The word
.I unix
is predefined.
.TP
.B changequote
Change quote characters to the first and second arguments.
.B changequote
without arguments restores the original values (that is,
.BR \(lq\|\(rq ).
.TP
.B divert
.B m4
maintains 10 output streams, numbered 0-9.
The final output is the concatenation of
the streams in numerical order;
initially stream 0 is the current stream.  The
.I divert
macro changes the current output stream to
the (digit-string) argument.
Output diverted to a stream other than 0 through 9 is discarded.
.TP
.B undivert
Display immediate output of text from diversions named as
arguments, or all diversions if no argument.
Text may be undiverted into another diversion.
Undiverting discards the diverted text.
.TP
.B divnum
Return the value of the current output stream.
.TP
.B dnl
Read and discard characters up to and including the next
.SM NEWLINE\s0.
.TP
.B ifelse
Has three or more arguments.
If the first argument is the same string as the second,
then the value is the third argument.
If not, and if there are more than four arguments, the process is repeated with arguments 4, 5, 6, 7 and so on.
Otherwise, the value is either the last string not used by the above
process, or, if it is not present,
.SM NULL\s0.
.TP
.B incr
Return the value of the argument incremented by 1.
The value of the argument is calculated
by interpreting an initial digit-string as a decimal number.
.TP
.B eval
Evaluate the argument as an arithmetic expression, using 32-bit arithmetic.
Operators include
.BR + ,
.BR \- ,
.BR \(** ,
.BR / ,
.BR % ,
.B ^
(exponentiation); relationals; parentheses.
.TP
.B len
Return the number of characters in the argument.
.TP
.B index
Return the position in the first argument where the second argument
begins (zero origin), or \-1 if the second argument does not occur.
.TP
.B substr
Return a substring of the first argument.
The second argument is a zero origin
number selecting the first character;
the third argument indicates the length of the substring.
A missing third argument is taken to be large enough to extend to
the end of the first string.
.TP
.B translit
Transliterate the characters in the first argument
from the set given by the second argument
to the set given by the third.
No abbreviations are permitted.
.TP
.B include
Return the contents of the file named in the argument.
.TP
.B sinclude
Is similar to
.BR include ,
except that it says nothing if the file is inaccessible.
.TP
.B syscmd
Execute the
system command given in the first argument.
No value is returned.
.TP
.B maketemp
Fill in a string of
.SM XXXXX
in the argument with the current process
.SM ID\*S.
.TP
.B errprint
Print the argument on the diagnostic output file.
.TP
.B dumpdef
Print current names and definitions,
for the named items, or for all if no arguments are given.
.SH SYSTEM V USAGE
.LP
In the System V version of
.BR m4 ,
the following built-in macros have added capabilities.
.SS Built-In Macros
.TP 12
.B define
.RB ` $# '
is replaced by the number of arguments;
.B $\(**
is replaced by a list of all the arguments separated by commas;
.B $@
is like
.RB ` $\(** ',
but each argument is quoted (with the current quotes).
.TP
.B changequote
Change quote symbols to the first and second arguments.
The symbols may be up to five characters long.
.TP
.B eval
Additional operators include
bitwise
.RB ` & ',
.RB ` \(bv ',
.RB ` ^ ' 
and
.RB ` ~ '.
Octal, decimal and hex numbers may be specified as in C.
The second argument specifies the radix for the result;
the default is 10.
The third argument may be used to specify the minimum number
of digits in the result.
.dt
.LP
The System V version of
.B m4
makes available the following additional built-in macros.
.TP 12
.B defn
Return the quoted definition of the argument(s).
It is useful for renaming macros, especially built-ins.
.TP
.B pushdef
Like
.BR define ,
but saves any previous definition.
.TP
.B popdef
Remove current definition of the argument(s),
exposing the previous one, if any.
.TP
.B shift
Return all but the first argument.
The other arguments are quoted and pushed back with
commas in between.
The quoting nullifies the effect of the extra scan that
will subsequently be performed.
.TP
.B changecom
Change left and right comment markers from the default
.B #
and
.SM NEWLINE.
With no arguments, the comment mechanism is effectively
disabled.
With one argument, the left marker becomes the argument and
the right marker becomes
.SM NEWLINE.
With two arguments, both markers are affected.
Comment markers may be up to five characters long.
.TP
.B decr
Return the value of the argument decremented by 1.
.TP
.B sysval
Return code from the last call to
.BR syscmd .
.TP
.B m4exit
Exit immediately from
.BR m4 .
Argument 1, if given, is the exit code;
the default is 0.
.TP
.B m4wrap
Argument 1 will be pushed back at final
.SM EOF\*S.
For example,
.RB ` "m4wrap(\(lqcleanup(\|)\(rq)" '.
.TP
.B traceon
With no arguments, turn on tracing for all macros
(including built-ins).
Otherwise, turn on tracing for named macros.
.TP
.B traceoff
Turn off trace globally and for any macros specified.
Macros specifically traced by
.B traceon
can be untraced only by specific calls to
.BR traceoff .
.SH SEE ALSO
.IR "m4 \(em A Macro Processor" ,
in
.TX PUL
ses which
happen to turn up within th./share/man/man1/m68k.1                                                                                755       0      12           63  4424740673   7521                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)m68k.1 1.4 89/03/26 SMI;
machid.1        mail.1      $ mailrc_to_defaults.1 ail       
mailtool.1        make.1         man.1  l  4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 H  h    mkdir.1   x    mkstr.1       more.1        mt.1 1        mv.1 1 t      neqn.1 e      newgrp.1        nice.1       nl.1 1 t      nm.1 1 1       nohup.1v    $  !  notify.1  $  4  "./share/man/man1/mach.1                                                                                755       0      12          621  4424740673   7664                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mach.1 1.8 89/03/26 SMI; from UCB 4.1
.TH MACH 1 "9 September 1987"
.SH NAME
mach \- display the processor type of the current host
.SH SYNOPSIS
.B mach
.SH DESCRIPTION
.IX "mach command"  ""  "\fLmach\fP \(em display Sun processor"
.IX display  "processor of current Sun host"
The
.B mach
command displays the processor-type of the current Sun host.
.SH SEE ALSO
.BR arch (1),
.BR machid (1)
   nl.1 1       nm.1 1 t       nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #./share/man/man1/machid.1                                                                              755       0      12         4155  4424740673  10227                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)machid.1 1.16 89/03/26 SMI; from UCB 4.3 and S5R3
.TH MACHID 1 "18 February 1988"
.SH NAME
machid, sun, iAPX286, m68k, pdp11, sparc, u3b, u3b2, u3b5, u3b15, vax, i386 \- return a true exit status if the processor is of the indicated type
.SH SYNOPSIS
.B sun
.LP
.B iAPX286
.PP
.B m68k
.PP
.B pdp11
.PP
.B sparc
.PP
.B u3b
.PP
.B u3b2
.PP
.B u3b5
.PP
.B u3b15
.PP
.B vax
.\" Sun386i only from here
.PP
.B i386
.SH DESCRIPTION
.IX iAPX286 "" "\fLiAPX286\fR \(em machine type indication"
.IX i386 "" "\fLi386\fR \(em machine type indication"
.IX m68k "" "\fLm68k\fR \(em machine type truth value"
.IX pdp11 "" "\fLpdp11\fR \(em machine type truth value"
.IX sun "" "\fLsun\fR \(em machine type truth value"
.IX sparc "" "\fLsparc\fR \(em machine type truth value"
.IX u3b "" "\fLu3b\fR \(em machine type truth value"
.IX u3b2 "" "\fLu3b2\fR \(em machine type truth value"
.IX u3b5 "" "\fLu3b5\fR \(em machine type truth value"
.IX u3b15 "" "\fLu3b15\fR \(em machine type truth value"
.IX vax "" "\fLvax\fR \(em machine type truth value"
.LP
The following commands will return a true value (exit code of 0) 
if you are on a processor that the command name indicates.
.RS
.TP 10
.B sun
True if you are on a Sun system.
.TP
.B i\s-1APX\s0286
True if you are on a computer using an i\s-1APX\s0286
processor.
.TP
.B i386
True if you are on a computer using an i\s-1APX\s0386
processor.
.TP
.B m68k
True if you are on a computer, such as a Sun-2 or a Sun-3,
using an M68000-family processor.
.TP
.B pdp11
True if you are on a
.SM PDP\s0-11.
.TP
.B sparc
True if you are on a computer, such as a Sun-4, using a
.SM SPARC\s0-family
processor.
.TP
.B u3b
True if you are on a 3B20S computer.
.TP
.B u3b2
True if you are on a 3B2 computer.
.TP
.B u3b5
True if you are on a 3B5 computer.
.TP
.B u3b15
True if you are on a 3B15 computer.
.TP
.B vax
True if you are on a
.SM VAX\s0.
.dt
.RE
.LP
The commands that do not apply will return a false
(non-zero) value.
These commands are often used within
.BR make (1)
makefiles and shell procedures to increase portability.
.SH SEE ALSO
.BR arch (1),
.BR mach (1),
.BR make (1),
.BR sh (1),
.BR test (1V),
.BR true (1)
   k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-unget.1  p  8  q  
sccs-val.1 8  H  r  sccs.1 8  \  s  
sccsdiff.1 \  t  t  
screenblank.1 t    u  screendump.1  u    v  screenload.1  v    w  script.1      x   scrolldefaults.1       y  sdiff.1      z  sed.1v  ./share/man/man1/mail.1                                                                                755       0      12       157762  4424740673  10001                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mail.1 1.56 89/03/26 SMI; from UCB 4.2 and S5
.ds ~ \u\(ap\d
.TH MAIL 1 "26 March 1989"
.SH NAME
mail, Mail \- read or send mail messages
.SH SYNOPSIS
.B Mail
.RB [ " \-deHinNUv " ]
.RB [ " \-f " 
.RI [ " filename " | " \fB+\fPfolder"
] ]
.RB [ " \-T "
.IR file " ]"
.if n .ti +0.5i
.RB [ " \-u "
.IR user " ]"
.LP
.B Mail
.RB [ " \-dFinUv " ]
.RB [ " \-h "
.IR number " ]"
.RB [ " \-r "
.IR address " ]"
.RB [ " \-s "
.IR subject " ]"
.if n .ti +0.5i
.I recipient
\&.\|.\|.
.LP
.B /usr/ucb/mail
\&.\|.\|.
.SH DESCRIPTION
.IX  "mail command"  ""  "\fLmail\fP \(em send and receive mail"  ""  PAGE START
.IX  "send and receive mail"  ""  "send and receive mail \(em \fLmail\fP"  ""  PAGE START
.IX  "read mail"  ""  "read mail \(em \fLmail\fP"  ""  PAGE START
.IX  communications  mail  ""  "\fLmail\fP \(em send and receive mail"  PAGE START
.LP
.B mail
is a comfortable, flexible, interactive program for composing, sending
and receiving electronic messages.  While reading messages,
.B mail
provides you with
commands to browse, display, save, delete, and respond to messages.
While sending mail, 
.B mail
allows editing and reviewing of messages being composed, and the
inclusion of text from files or other messages.
.LP
Incoming mail is stored in the
.I system mailbox 
for each user.  This is a file named after the user in
.BR /var/spool/mail .
.B mail
normally looks in this file for incoming messages, but you
can use the
.SB MAIL
environment variable to have it look in a different file.
When you read a message, it is
marked to be moved to a secondary file for storage. 
This secondary file, called the 
.IR mbox ,
is normally the file
.B mbox
in your home directory. 
This file can also be changed by setting the
.SB MBOX
environment variable.  Messages remain in the 
.I mbox
file until deliberately removed.
.SH OPTIONS
.LP
If no 
.I recipient 
is specified, 
.B mail
attempts to read messages from the system mailbox.  
.TP 14
.B \-d
Turn on debugging output.  
(Neither particularly interesting nor recommended.)
.TP 
.B \-e
Test for presence of mail.
If there is no mail,
.B mail
prints nothing and exits (with a successful return code).
.TP
.B \-F
Record the message in a file named after the first recipient.
Override the 
.B record 
variable, if set.
.TP
.B \-H
Print header summary only.
.TP
.B \-i
Ignore interrupts (as with the
.B ignore 
variable).
.TP 
.B \-n
Do not initialize from the system default
.B Mail.rc
file.
.TP
.B \-N
Do not print initial header summary.
.TP
.B \-U
Convert
.B uucp
style addresses to Internet standards.
Overrides the 
.B conv
environment variable.
.TP
.B \-v
Pass the
.B \-v
flag to
.BR sendmail (8).
.TP
.BI "\-f\fR [\fP" filename\fR]
Read messages from 
.I filename
instead of system mailbox.  If no 
.I filename
is specified, the 
.I mbox
is used.
.TP
.BI "\-f\fR \fP+" folder
Use the file
.I folder
in the folder directory (same as the
.BR fold er 
command).  The name of this directory is listed in the
.B folder
variable.
.TP
.BI \-h " number"
The number of network \(lqhops\(rq made so far.
This is provided for network
software to avoid infinite delivery loops.
.TP
.BI \-r " address"
Pass
.I address
to network delivery software.
All tilde
.RB ( \(ap )
commands are disabled.
.TP
.BI \-s " subject"
Set the
.B Subject
header field to
.IR subject .
.TP
.BI \-T " file"
Print the contents of the
.I article-id
fields of all messages that were read or deleted on
.IR file 
(for the use of
network news programs if available).
.TP
.BI \-u " user"
Read
.IR user 's
system mailbox.
This is only effective if
.IR user 's
system mailbox is not read protected.
.SH USAGE
Refer to 
.TX MMBG
for tutorial information about 
.BR mail .
.SS Starting Mail
.LP
As it starts,
.B mail
reads commands from a system-wide file
.RB ( /usr/lib/Mail.rc \|)
to initialize certain variables,
then it reads from from a private start-up file called the
.I \&.mailrc
file (it is normally the file
.B \&.mailrc
in your home directory, but can be changed by setting the
.SB MAILRC
environment variable) for your personal commands and variable settings.  
Most 
.B mail
commands are legal inside start-up files.  The most common uses
for this file are to set up initial display options and alias lists.
The following commands are 
.I not 
legal in the start-up file:
.BR ! ,
.BR C opy,
.BR e dit,
.BR fo llowup,
.BR F ollowup,
.BR ho ld,
.BR m ail,
.BR pre serve,
.BR r eply,
.BR R eply,
.BR replya ll,
.BR replys ender,
.BR sh ell,
and
.BR v isual.
Any errors in the start-up file cause the remaining lines in that file 
to be ignored.
.LP
You can use the 
.B mail
command to send a message directly by including names of recipients as 
arguments on the command line.  When no recipients appear on the 
.B mail
command line, it enters command mode, from which you can read
messages sent to you.  If you list no recipients and have no messages,
.B mail
prints the message:
.RB ` "No mail for \fIusername\fP" '
and exits.
.LP
When in command mode (while reading messages), you can send messages 
using the 
.BR m ail
command.
.SS Sending Mail
.LP
While you are composing a message to send,
.B mail
is in 
.I input 
mode. 
If no subject is specified as an argument to the command
a prompt for the subject is printed. 
After entering the subject line,
.B mail
enters 
.I input 
mode to accept the text of your message to send.
.LP
As you type in the message,
.B mail 
stores it in a temporary file.
To review or modify the message, enter the appropriate 
.IR "tilde escapes" ,
listed below, at the beginning of an input line.
.LP
To indicate that the message is ready to send, type a dot
(or
.SM EOF
character, normally
.SM CTRL-D\s0 )
on a line by itself.  
.B mail
submits the message to
.BR sendmail (8)
for routing to each 
.IR recipient .
.LP
Recipients can be;
.IP \(bu
local usernames
.IP \(bu
Internet addresses of the form:
.RS
.IP
.IB name @ domain
.RE
.IP \(bu
.BR uucp (1C)
addresses of the form:
.RS
.IP
[\fIhost\fB!\fR.\|.\|.\fIhost\fB!\fR]\fIhost\fB!\fIusername
.RE
.IP \(bu
filenames for which you have write permission
.IP \(bu
alias groups
.LP
If the name of the
.I recipient 
begins with a pipe symbol 
.RB ( \||\| ),
the remainder of the name is taken as a shell command to pipe
the message through.  This provides an automatic interface with
any program that reads the standard input, such as
.BR lpr (1)
to record outgoing mail on paper.
An alias group is the name of a list of recipients that is set by the 
.B alias
command, taken from the host's
.B /etc/aliases
file, or taken from the Yellow Pages aliases domain.
See
.BR aliases (5)
for more information about mail addresses and aliases.
.SS Tilde Escapes
.IX  "mail tilde escapes"  ""  "\fLmail\fP tilde escapes"  ""  PAGE START
.IX  "tilde escapes in mail"  ""  "tilde escapes in \fLmail\fP"  ""  PAGE START
The following 
.I tilde escape
commands can be used when composing messages to send. 
Each must appear at the beginning of an input line.
The escape character (\|\(ap\|), can be changed by setting a new
value for the 
.B escape
variable.
The escape character can be entered as text by typing it twice.
.HP
.B \(ap! 
.RI [ shell-command ]
.br
.IX  "mail tilde escapes"  "~!"  "\fLmail\fP tilde escapes"  "\fL\(ap!\fP\ \ \ "
.IX  "~! mail tilde escape"  ""  "\fL\(ap!\fP\ \ \ \(em mail tilde escape"
Escape to the shell.
If present, run
.IR shell-command .
.TP
.B \(ap.
.IX  "mail tilde escapes"  "~."  "\fLmail\fP tilde escapes"  "\fL\(ap.\fP\ \ \ "
.IX  "~. mail tilde escape"  ""  "\fL\(ap.\fP\ \ \ \(em mail tilde escape"
Simulate
.SM EOF
(terminate message input).
.HP
.B \(ap: 
.I mail-command
.br
.PD 0
.HP
.B \(ap_ 
.I mail-command
.br
.IX  "mail tilde escapes"  "~:"  "\fLmail\fP tilde escapes"  "\fL\(ap:\fP\ \ \ "
.IX  "~: mail tilde escape"  ""  "\fL\(ap:\fP\ \ \ \(em mail tilde escape"
.IX  "mail tilde escapes"  "~_"  "\fLmail\fP tilde escapes"  "\fL\(ap_\fP\ \ \ "
.IX  "~_ mail tilde escape"  ""  "\fL\(ap_\fP\ \ \ \(em mail tilde escape"
Perform the indicated
.B mail
command.
Valid only when sending a message while reading mail.
.PD
.TP
.B \(ap?
.IX  "mail tilde escapes"  "~?"  "\fLmail\fP tilde escapes"  "\fL\(ap?\fP\ \ \ "
.IX  "~? mail tilde escape"  ""  "\fL\(ap?\fP\ \ \ \(em mail tilde escape"
Print a summary of tilde escapes.
.TP
.B \(apA
.IX  "mail tilde escapes"  "~A"  "\fLmail\fP tilde escapes"  "\fL\(apA\fP\ \ \ "
.IX  "~A mail tilde escape"  ""  "\fL\(apA\fP\ \ \ \(em mail tilde escape"
Insert the autograph string 
.B Sign
into the message.
.TP
.B \(apa
.IX  "mail tilde escapes"  "~a"  "\fLmail\fP tilde escapes"  "\fL\(apa\fP\ \ \ "
.IX  "~a mail tilde escape"  ""  "\fL\(apa\fP\ \ \ \(em mail tilde escape"
Insert the autograph string 
.B sign
into the message.
.TP
\fB\(apb\fI name\fR .\|.\|.
.IX  "mail tilde escapes"  "~b"  "\fLmail\fP tilde escapes"  "\fL\(apb\fP\ \ \ "
.IX  "~b mail tilde escape"  ""  "\fL\(apb\fP\ \ \ \(em mail tilde escape"
Add the 
.IR name s
to the blind carbon copy
.RB ( Bcc )
list.  This is like the carbon copy
.RB ( Cc )
list, except that the names in the
.B Bcc
list are not shown in the header
of the mail message.
.TP
\fB\(apc\fI name\fR .\|.\|.
.IX  "mail tilde escapes"  "~c"  "\fLmail\fP tilde escapes"  "\fL\(apc\fP\ \ \ "
.IX  "~c mail tilde escape"  ""  "\fL\(apc\fP\ \ \ \(em mail tilde escape"
Add the 
.IR name s
to the carbon copy
.RB ( Cc )
list.
.TP
.B \(apd
.IX  "mail tilde escapes"  "~d"  "\fLmail\fP tilde escapes"  "\fL\(apd\fP\ \ \ "
.IX  "~d mail tilde escape"  ""  "\fL\(apd\fP\ \ \ \(em mail tilde escape"
Read in the 
.I dead.letter
file.
The name of this file is listed in the variable
.BR \s-1DEAD\s0 .
.TP
.B \(ape
.IX  "mail tilde escapes"  "~e"  "\fLmail\fP tilde escapes"  "\fL\(ape\fP\ \ \ "
.IX  "~e mail tilde escape"  ""  "\fL\(ape\fP\ \ \ \(em mail tilde escape"
Invoke the editor to edit the message. 
The name of the editor is listed in the
.SB EDITOR
variable.
The default editor is
.BR ex (1).
.HP
.BI \(apf 
.RI [ message-list ]
.br
.IX  "mail tilde escapes"  "~f"  "\fLmail\fP tilde escapes"  "\fL\(apf\fP\ \ \ "
.IX  "~f mail tilde escape"  ""  "\fL\(apf\fP\ \ \ \(em mail tilde escape"
Forward the listed messages, or the current message being read.
Valid only when sending a message while reading mail;
the messages are inserted without alteration (as opposed to the
.B \(apm
escape).  
.TP
.B \(aph
.IX  "mail tilde escapes"  "~h"  "\fLmail\fP tilde escapes"  "\fL\(aph\fP\ \ \ "
.IX  "~h mail tilde escape"  ""  "\fL\(aph\fP\ \ \ \(em mail tilde escape"
Prompt for the message header lines:
.BR Subject ,
.BR To ,
.BR Cc ,
and
.BR Bcc .
If the header line contains text, you can edit the text by
backspacing over it and retyping.
.TP
.BI \(api " variable"
.IX  "mail tilde escapes"  "~i"  "\fLmail\fP tilde escapes"  "\fL\(api\fP\ \ \ "
.IX  "~i mail tilde escape"  ""  "\fL\(api\fP\ \ \ \(em mail tilde escape"
Insert the value of the named
.I variable
into the message.
.HP
.BI \(apm 
.RI [ message-list ]
.br
.IX  "mail tilde escapes"  "~m"  "\fLmail\fP tilde escapes"  "\fL\(apm\fP\ \ \ "
.IX  "~m mail tilde escape"  ""  "\fL\(apm\fP\ \ \ \(em mail tilde escape"
Insert text from the specified messages, or the current message,
into the letter.  Valid only when sending a message while reading mail;
the text the message is shifted to the right, and the string contained
in the
.B indentprefix
variable is inserted as the leftmost characters of each line.
If 
.B indentprefix
is not set, a
.SM TAB
character is inserted into each line.
.TP
.B \(app
.IX  "mail tilde escapes"  "~p"  "\fLmail\fP tilde escapes"  "\fL\(app\fP\ \ \ "
.IX  "~p mail tilde escape"  ""  "\fL\(app\fP\ \ \ \(em mail tilde escape"
Print the message being entered.
.TP
.B \(apq
.IX  "mail tilde escapes"  "~q"  "\fLmail\fP tilde escapes"  "\fL\(apq\fP\ \ \ "
.IX  "~q mail tilde escape"  ""  "\fL\(apq\fP\ \ \ \(em mail tilde escape"
Quit from input mode by simulating an interrupt.  If the body of the 
message is not empty, the partial message is saved in the 
.I dead.letter
file.
.TP
.BI \(apr " filename"
.PD 0
.TP
.BI \(ap< " filename"
.TP
.BI \(ap<! " shell-command"
.IX  "mail tilde escapes"  "~r"  "\fLmail\fP tilde escapes"  "\fL\(apr\fP\ \ \ "
.IX  "~r mail tilde escape"  ""  "\fL\(apr\fP\ \ \ \(em mail tilde escape"
.IX  "mail tilde escapes"  "~<"  "\fLmail\fP tilde escapes"  "\fL\(ap<\fP\ \ \ "
.IX  "~< mail tilde escape"  ""  "\fL\(ap<\fP\ \ \ \(em mail tilde escape"
Read in text from the specified file or the standard output of
the specified
.IR shell-command .
.PD
.TP
.BI \(aps " subject"
.IX  "mail tilde escapes"  "~s"  "\fLmail\fP tilde escapes"  "\fL\(aps\fP\ \ \ "
.IX  "~s mail tilde escape"  ""  "\fL\(aps\fP\ \ \ \(em mail tilde escape"
Set the subject line to
.IR subject .
.TP
.BI \(apt " name .\|.\|."
.IX  "mail tilde escapes"  "~t"  "\fLmail\fP tilde escapes"  "\fL\(apt\fP\ \ \ "
.IX  "~t mail tilde escape"  ""  "\fL\(apt\fP\ \ \ \(em mail tilde escape"
Add each 
.I name
to the list of recipients.
.TP
.B \(apv
.IX  "mail tilde escapes"  "~v"  "\fLmail\fP tilde escapes"  "\fL\(apv\fP\ \ \ "
.IX  "~v mail tilde escape"  ""  "\fL\(apv\fP\ \ \ \(em mail tilde escape"
Invoke a visual editor to edit the message.  The name of the editor
is listed in the
.SB VISUAL
variable.  The default visual editor is
.BR vi (1).
.TP
.BI \(apw " filename"
.IX  "mail tilde escapes"  "~w"  "\fLmail\fP tilde escapes"  "\fL\(apw\fP\ \ \ "
.IX  "~w mail tilde escape"  ""  "\fL\(apw\fP\ \ \ \(em mail tilde escape"
Write the message text onto the given file, without the header.
.TP
.B \(apx
.IX  "mail tilde escapes"  "~x"  "\fLmail\fP tilde escapes"  "\fL\(apx\fP\ \ \ "
.IX  "~x mail tilde escape"  ""  "\fL\(apx\fP\ \ \ \(em mail tilde escape"
Exit as with
.B \(apq
but do not save the message in the
.I dead.letter
file.
.TP
.BI \(ap| " shell-command"
.IX  "mail tilde escapes"  "~|"  "\fLmail\fP tilde escapes"  "\fL\(ap|\fP\ \ \ "
.IX  "~| mail tilde escape"  ""  "\fL\(ap|\fP\ \ \ \(em mail tilde escape"
Pipe the body of the message through the given 
.IR shell-command .
If 
.I shell-command
returns a successful exit status,
the output of the command replaces the message.
.IX  "mail tilde escapes"  ""  "\fLmail\fP tilde escapes"  ""  PAGE END
.IX  "tilde escapes in mail"  ""  "tilde escapes in \fLmail\fP"  ""  PAGE END
.IX  "tilde escapes in mail"  ""  "tilde escapes in \fLmail\fP"  ""  PRINT "see also \fLmail\fP \fItilde escapes\fP"
.SS Reading Mail
When you enter
.I command 
mode in order to read your messages, 
.B mail
displays a header summary of the first several messages,
followed by a prompt for one of the commands listed below.
The default prompt is the
.B &
(ampersand character).
.LP
Message are listed and referred to by number.
There is, at any time, a 
.B current
message, which is marked by a
.B >
in the header summary.  
For commands that take an optional list of messages,
if you omit a message number as an argument, the command applies
to the current message.
.LP
A 
.I message-list
is a list of message specifications, separated by
.SM SPACE
characters, which may include:
.RS
.TP
.B \&.
The current message.
.PD 0
.TP
.I n
Message number
.IR n .
.TP
.B ^
The first undeleted message.
.TP
.B $
The last message.
.TP
.B +
The next undeleted message.
.TP
.B \-
The previous undeleted message.
.TP
.B *
All messages.
.TP
.IB n \- m
An inclusive range of message numbers.
.TP
.I user
All messages from
.IR user .
.TP
.BI / string
All messages with
.I string
in the subject line (case ignored).
.TP
.BI : c
All messages of type
.IR c ,
where
.I c
is one of:
.sp .5
.RS
.RS
.TP
.B d
deleted messages
.TP
.B n
new messages
.TP
.B o
old messages
.TP
.B r
read messages
.TP
.B u
unread messages
.RE
.RE
.IP
Note: the context of the command determines whether this type of
message specification makes sense.
.PD
.RE
.LP
Additional arguments are treated as strings whose usage
depends on the command involved.  Filenames, where expected,
are expanded using the normal shell filename-substitution
mechanism.
.LP
Special characters, recognized by certain commands, are
documented with those commands.
.SS Commands
.IX  "mail commands"  ""  "\fLmail\fP commands"  ""  PAGE START
While in command mode, if you type in an empty command line
(a
.SM RETURN
or
.SM NEWLINE
only), the
.BR p rint
command is assumed.  The following is a complete list of 
.B mail
commands:
.TP 18
.BI ! " shell-command"
.IX  "mail commands"  "!"  "\fLmail\fP commands"  "\fL!\fP"
.IX  "! mail command"  ""  "\fL!\fP mail command"
Escape to the shell.  The name of the shell to use is listed in
the 
.SB SHELL
variable.
.TP
.BI # " arguments"
.IX  "mail commands"  "#"  "\fLmail\fP commands"  "\fL#\fP"
.IX  "# mail command"  ""  "\fL#\fP mail command"
Null command.  This may be used as if it were a comment in 
.I \&.mailrc
files, but note that it must be separated from its arguments
(commentary) by white space.
.TP
.B =
.IX  "mail commands"  "="  "\fLmail\fP commands"  "\fL=\fP"
.IX  "= mail command"  ""  "\fL=\fP mail command"
Print the current message number.
.TP
.B ?
.IX  "mail commands"  "?"  "\fLmail\fP commands"  "\fL?\fP"
.IX  "? mail command"  ""  "\fL?\fP mail command"
Print a summary of commands.
.HP
.BR a lias 
.RI [ "alias recipient" \|.\|.\|.\^]
.br
.PD 0
.HP
.BR g roup 
.RI [ "alias recipient" \|.\|.\|.\^]
.br
.IX  "mail commands"  "alias"  "\fLmail\fP commands"  "\fLalias\fP"
.IX  "alias mail command"  ""  "\fLalias\fP mail command"
.IX  "mail commands"  "group"  "\fLmail\fP commands"  "\fLgroup\fP"
.IX  "group mail command"  ""  "\fLgroup\fP mail command"
Declare an alias for the given list of recipients. 
The list will be substituted when the
.I alias
is used as a recipient while sending mail.  When put in the
.I \&.mailrc
file, this command provides you with a record of the alias.  With no 
arguments, the command displays the list of defined aliases.
.PD
.TP
.BR alt "ernates\fI name \fP.\|.\|."
.IX  "mail commands"  "alternates"  "\fLmail\fP commands"  "\fLalternates\fP"
.IX  "alternates mail command"  ""  "\fLalternates\fP mail command"
Declare a list of alternate names for your login.
When responding to a message,
these names are removed from the list of recipients for the response.
With no arguments,
.BR alt ernates
prints the current list of alternate names.
.HP
.BR cd [ 
.IR directory ]
.br
.PD 0
.TP
.BR ch "dir [\fIdirectory\fP]"
.IX  "mail commands"  "cd"  "\fLmail\fP commands"  "\fLcd\fP"
.IX  "cd mail command"  ""  "\fLcd\fP mail command"
.IX  "mail commands"  "chdir"  "\fLmail\fP commands"  "\fLchdir\fP"
.IX  "chdir mail command"  ""  "\fLchdir\fP mail command"
Change directory.  If 
.I directory
is not specified,
.SM $HOME
is used.
.PD
.HP
.BR c opy 
.RI [ message-list ]
.RI [ filename ]
.br
.IX  "mail commands"  "copy"  "\fLmail\fP commands"  "\fLcopy\fP"
.IX  "copy mail command"  ""  "\fLcopy\fP mail command"
Copy messages to the file without marking the messages as saved.
Otherwise equivalent to the
.BR s ave
command.
.TP
.BR C "opy [\fImessage-list\fP]"
.IX  "mail commands"  "copya"  "\fLmail\fP commands"  "\fLCopy\fP"
.IX  "copya mail command"  ""  "\fLCopy\fP mail command"
Save the specified messages in a file whose name is derived from the
author of the
message to be saved, without marking the messages as saved.
Otherwise equivalent to the
.BR S ave
command.
.TP
.BR d "elete [\fImessage-list\fP]"
.IX  "mail commands"  "delete"  "\fLmail\fP commands"  "\fLdelete\fP"
.IX  "delete mail command"  ""  "\fLdelete\fP mail command"
Delete messages from the system mailbox.  If the variable
.B autoprint
is set, print the message following the last message deleted.
.HP
.BR di scard 
.RI [ header-field .\|.\|.\^]
.br
.PD 0
.HP
.BR ig nore
.RI [ header-field .\|.\|.\^]
.br
.IX  "mail commands"  "discard"  "\fLmail\fP commands"  "\fLdiscard\fP"
.IX  "discard mail command"  ""  "\fLdiscard\fP mail command"
.IX  "mail commands"  "ignore"  "\fLmail\fP commands"  "\fLignore\fP"
.IX  "ignore mail command"  ""  "\fLignore\fP mail command"
Suppress printing of the specified header fields when displaying 
messages on the screen, such as 
\(lqStatus\(rq and \(lqReceived\(rq.
The fields are included when the message is saved unless the
variable
.B alwaysignore
is set.
The
.BR P rint
and
.BR T ype
commands display all header fields, ignored or not.
.PD
.HP
.B dp 
.RI [ message-list ]
.br
.PD 0
.HP
.BR dt " [\fImessage-list\fP]"
.br
.IX  "mail commands"  "dp"  "\fLmail\fP commands"  "\fLdp\fP"
.IX  "dp mail command"  ""  "\fLdp\fP mail command"
.IX  "mail commands"  "dt"  "\fLmail\fP commands"  "\fLdt\fP"
.IX  "dt mail command"  ""  "\fLdt\fP mail command"
Delete the specified messages from the system mailbox, and print the 
message after the last one deleted.  Equivalent to a
.BR d elete
command followed by a
.BR p rint
command.
.PD
.TP
.BR ec "ho [\fIstring \fP.\|.\|.\|]"
.IX  "mail commands"  "echo"  "\fLmail\fP commands"  "\fLecho\fP"
.IX  "echo mail command"  ""  "\fLecho\fP mail command"
Echo the given strings (like
.BR echo (1V)).
.TP
.BR e "dit [\fImessage-list\fP]"
.IX  "mail commands"  "edit"  "\fLmail\fP commands"  "\fLedit\fP"
.IX  "edit mail command"  ""  "\fLedit\fP mail command"
Edit the given messages.
The messages are placed in a temporary file and the
.SB EDITOR
variable is used to get the name of the editor.
The default editor is
.BR ex (1).
.TP
.BR ex it
.PD 0
.TP
.BR x it
.IX  "mail commands"  "exit"  "\fLmail\fP commands"  "\fLexit\fP"
.IX  "exit mail command"  ""  "\fLexit\fP mail command"
.IX  "mail commands"  "xit"  "\fLmail\fP commands"  "\fLxit\fP"
.IX  "xit mail command"  ""  "\fLxit\fP mail command"
Exit from 
.B mail
without changing the system mailbox.
No messages are saved in the 
.I mbox
(see also
.BR q uit).
.PD
.HP
.BR fi le 
.RI [ filename ]
.br
.PD 0
.TP
.BR fold "er [\fIfilename\fP]
.IX  "mail commands"  "file"  "\fLmail\fP commands"  "\fLfile\fP"
.IX  "file mail command"  ""  "\fLfile\fP mail command"
.IX  "mail commands"  "folder"  "\fLmail\fP commands"  "\fLfolder\fP"
.IX  "folder mail command"  ""  "\fLfolder\fP mail command"
Quit from the current mailbox file and read in the named mailbox
file.  Several special characters are recognized when used as file 
names:
.PD
.RS
.RS
.TP 10
.B %
.PD 0
Your system mailbox.
.TP
.BI % user
The system mailbox for
.IR user .
.TP
.B #
The previous mail file.
.TP
.B &
Your
.I mbox
file (of messages previously read).
.TP
.BI + filename
The named file in the 
.I folder
directory (listed in the
.B folder
variable).
.PD
.RE
.RE
.IP
With no arguments,
.BR fi le
prints the name of the current mail file, and the number of messages 
and characters it contains.
.TP
.B folders
.IX  "mail commands"  "folders"  "\fLmail\fP commands"  "\fLfolders\fP"
.IX  "folders mail command"  ""  "\fLfolders\fP mail command"
Print the name of each mail file in the 
.I folder
directory (listed in the
.B folder
variable).
.TP
.BR fo "llowup [\fImessage\fP]"
.IX  "mail commands"  "followup"  "\fLmail\fP commands"  "\fLfollowup\fP"
.IX  "followup mail command"  ""  "\fLfollowup\fP mail command"
Respond to a message, recording the response in a file, name of which 
is derived from the author of the message (overrides the 
.B record
variable, if set).
See also the
.BR F ollowup,
.BR S ave,
and
.BR C opy
commands and the
.B outfolder
variable.
.HP
.BR F ollowup 
.RI [ message-list ]
.br
.IX  "mail commands"  "followupa"  "\fLmail\fP commands"  "\fLFollowup\fP"
.IX  "followupa mail command"  ""  "\fLFollowup\fP mail command"
Respond to the first message in the message list,
sending the message to the author of each message in the list.
The subject line is taken from the first message,
and the response is recorded in a file, the name of which is derived 
from the author of the first message (overrides the
.B record
variable, if set).
See also the
.BR fo llowup,
.BR S ave,
and
.BR C opy
commands and the
.B outfolder
variable.
.TP
.BR f "rom [\fImessage-list\fP]"
.IX  "mail commands"  "from"  "\fLmail\fP commands"  "\fLfrom\fP"
.IX  "from mail command"  ""  "\fLfrom\fP mail command"
Print the header summary for the indicated messages or the
current message.
.TP
.BR g "roup\fI alias name\fP .\|.\|."
Same as the 
.BR a lias
command.
.TP
.BR h "eaders [\fImessage\fP]"
.IX  "mail commands"  "headers"  "\fLmail\fP commands"  "\fLheaders\fP"
.IX  "headers mail command"  ""  "\fLheaders\fP mail command"
Print the page of headers that includes the message specified,
or the current message.  The 
.B screen
variable sets the number of headers per page.
See also the
.B z
command.
.TP
.BR hel p
.IX  "mail commands"  "help"  "\fLmail\fP commands"  "\fLhelp\fP"
.IX  "help mail command"  ""  "\fLhelp\fP mail command"
Print a summary of commands.
.br
.ne 4
.HP
.BR ho ld 
.RI [ message-list ]
.br
.PD 0
.HP
.BR pre serve 
.RI  [ message-list ]
.br
.IX  "mail commands"  "hold"  "\fLmail\fP commands"  "\fLhold\fP"
.IX  "hold mail command"  ""  "\fLhold\fP mail command"
.IX  "mail commands"  "preserve"  "\fLmail\fP commands"  "\fLpreserve\fP"
.IX  "preserve mail command"  ""  "\fLpreserve\fP mail command"
Hold the specified messages in the system mailbox.
.PD
.HP
.BR i f 
.IR s \||\| r \||\| t
.br
.PD 0
.TP
.I mail-command
.TP
\&.\|.\|.
.TP
.BR el se
.TP
.I mail-command
.TP
\&.\|.\|.
.TP
.BR en dif
.IX  "mail commands"  "if"  "\fLmail\fP commands"  "\fLif\fP"
.IX  "if mail command"  ""  "\fLif\fP mail command"
.IX  "mail commands"  "else"  "\fLmail\fP commands"  "\fLelse\fP"
.IX  "else mail command"  ""  "\fLelse\fP mail command"
.IX  "mail commands"  "endif"  "\fLmail\fP commands"  "\fLendif\fP"
.IX  "endif mail command"  ""  "\fLendif\fP mail command"
Conditional execution, where
.I s
will execute following 
.I mail-command
up to an
.BR el se
or
.BR en dif,
if the program is in
.I send
mode,
.I r
executes the 
.I mail-command
only in
.I receive
mode, and
.I t
executes the 
.I mail-command
only if
.B mail
is being run from a terminal.  Useful primarily in the 
.I \&.mailrc
file.
.PD
.HP
.BR ig nore 
.RI  [ header-field .\|.\|.\|]
.br
Same as the 
.BR di scard
command.
.TP
.B inc
.IX  "mail commands"  "inc"  "\fLmail\fP commands"  "\fLinc\fP"
.IX  "inc mail command"  ""  "\fLinc\fP mail command"
Incorporate messages that arrive while you are reading the
system mailbox.  The new messages are added to the message list in the
current
.B mail
session.  This command does not commit changes made during
the session, and prior messages are not renumbered.
.TP
.BR l ist
.IX  "mail commands"  "list"  "\fLmail\fP commands"  "\fLlist\fP"
.IX  "list mail command"  ""  "\fLlist\fP mail command"
Prints all commands available.  No explanation is given.
.HP
.BR lo ad
.RI [ message ]
.I filename
.br
.IX  "mail commands"  "load"  "\fLmail\fP commands"  "\fLload\fP"
.IX  "load mail command"  ""  "\fLload\fP mail command"
Load the specified message from the name file.
.I filename
should contain a single mail message including mail headers
(as saved by the
.BR s ave
command).
.TP
.BR m "ail\fI recipient \fP.\|.\|."
.IX  "mail commands"  "mail"  "\fLmail\fP commands"  "\fLmail\fP"
.IX  "mail mail command"  ""  "\fLmail\fP mail command"
Mail a message to the specified recipients.
.TP
.BR mb "ox [\fImessage-list\fP]"
.IX  "mail commands"  "mbox"  "\fLmail\fP commands"  "\fLmbox\fP"
.IX  "mbox mail command"  ""  "\fLmbox\fP mail command"
Arrange for the given messages to end up in the standard 
.I mbox
file when 
.B mail
terminates normally.
See also the
.BR ex it
and
.BR q uit
commands.
.HP
.BR ne w
.RI [ message-list ]
.br
.PD 0
.BR N ew
.RI [ message-list ]
.br
.BR unr ead
.RI [ message-list ]
.br
.HP
.BR U nread 
.RI [ message-list ]
.br
.IX  "mail commands"  "new"  "\fLmail\fP commands"  "\fLnew\fP"
.IX  "new mail command"  ""  "\fLnew\fP mail command"
.IX  "mail commands"  "unread"  "\fLmail\fP commands"  "\fLunread\fP"
.IX  "unread mail command"  ""  "\fLunread\fP mail command"
Take a message list and mark each message as
.I not
having been read.
.PD
.TP
.BR n "ext\fI message\fP"
.IX  "mail commands"  "next"  "\fLmail\fP commands"  "\fLnext\fP"
.IX  "next mail command"  ""  "\fLnext\fP mail command"
Go to next message matching 
.IR message .
A 
.I message-list
can be given instead of
.IR message ,
but only first valid message in the list is used.  (This can be used, 
for instance, to jump to the next message from a specific user.)
.HP
.BR pi pe 
.RI [ message-list ]
.RI [ shell-command ]
.br
.PD 0
.HP
.B | 
.RI [ message-list ]
.RI [ shell-command ]
.br
.IX  "mail commands"  "pipe"  "\fLmail\fP commands"  "\fLpipe\fP"
.IX  "pipe mail command"  ""  "\fLpipe\fP mail command"
.IX  "mail commands"  "|"  "\fLmail\fP commands"  "\fL|\fP"
.IX  "| mail command"  ""  "\fL|\fP mail command"
Pipe the message through 
.IR shell-command .
The message is treated marked as read (and normally saved to the
.I mbox
file when 
.B mail 
exits).  If no arguments are given, the current message is piped 
through the command specified by the value of the 
.B cmd 
variable.  If the 
.B page
variable is set, a form feed character is inserted after each message.
.PD
.HP
.BR pre serve 
.RI [ message-list ]
.br
Same as the 
.BR ho ld
command.
.HP
.BR p rint 
.RI [ message-list ]
.br
.PD 0
.TP
.BR t "ype [\fImessage-list\fP]"
.IX  "mail commands"  "print"  "\fLmail\fP commands"  "\fLprint\fP"
.IX  "print mail command"  ""  "\fLprint\fP mail command"
.IX  "mail commands"  "type"  "\fLmail\fP commands"  "\fLtype\fP"
.IX  "type mail command"  ""  "\fLtype\fP mail command"
Print the specified messages.  If the 
.B crt
variable is set, messages longer than the number of lines it indicates
paged through the command specified by the
.SB PAGER
variable.  The default paging command is
.BR more (1).
.PD
.HP
.BR P rint 
.RI [ message-list ]
.br
.PD 0
.TP
.BR T "ype [\fImessage-list\fP]"
.IX  "mail commands"  "printa"  "\fLmail\fP commands"  "\fLPrint\fP"
.IX  "printa mail command"  ""  "\fLPrint\fP mail command"
.IX  "mail commands"  "typea"  "\fLmail\fP commands"  "\fLType\fP"
.IX  "typea mail command"  ""  "\fLType\fP mail command"
Print the specified messages on the screen, including all header fields.
Overrides suppression of fields by the
.BR ig nore
and
.BR ret ain
commands.
.PD
.TP
.BR q uit
.IX  "mail commands"  "quit"  "\fLmail\fP commands"  "\fLquit\fP"
.IX  "quit mail command"  ""  "\fLquit\fP mail command"
Exit from 
.B mail
storing messages that were read in the
.I mbox
file and unread messages in the system mailbox.
Messages that have been explicitly saved in a file are deleted
unless the variable
.B keepsave
is set.
.HP
.BR r eply 
.RI  [ message-list ]
.br
.PD 0
.HP
.BR r espond 
.RI  [ message-list ]
.br
.HP
.BR replys ender 
.RI  [ message-list ]
.br
.IX  "mail commands"  "reply"  "\fLmail\fP commands"  "\fLreply\fP"
.IX  "reply mail command"  ""  "\fLreply\fP mail command"
.IX  "mail commands"  "respond"  "\fLmail\fP commands"  "\fLrespond\fP"
.IX  "respond mail command"  ""  "\fLrespond\fP mail command"
.IX  "mail commands"  "replysender"  "\fLmail\fP commands"  "\fLreplysender\fP"
.IX  "replysender mail command"  ""  "\fLreplysender\fP mail command"
Send a response to the author of each message in the 
.IR message-list .
The subject line is taken from the first message.  If 
.B record
is set to a filename, a copy of the
the reply is added to that file.
If the 
.B replyall
variable is set, the actions of
.BR R eply/ R espond
and
.BR r eply/ r espond
are reversed.
The
.BR replys ender
command is not 
affected by the 
.B replyall
variable, but sends each reply only to the sender of each
message.
.PD
.HP
.BR R eply 
.RI [ message ]
.br
.PD 0
.HP
.BR R espond 
.RI [ message ]
.br
.TP
.BR replya "ll [\fImessage\fP]"
.IX  "mail commands"  "replya"  "\fLmail\fP commands"  "\fLReply\fP"
.IX  "replya mail command"  ""  "\fLReply\fP mail command"
.IX  "mail commands"  "responda"  "\fLmail\fP commands"  "\fLRespond\fP"
.IX  "responda mail command"  ""  "\fLRespond\fP mail command"
.IX  "mail commands"  "replyalla"  "\fLmail\fP commands"  "\fLReplyall\fP"
.IX  "replyalla mail command"  ""  "\fLReplyall\fP mail command"
Reply to the specified message, including all other recipients of that
message.  If the variable
.B record
is set to a filename, a copy of the reply added to that file.
If the 
.B replyall
variable is set, the actions of
.BR R eply/ R espond
and
.BR r eply/ r espond
are reversed.  The
.BR replya ll
command is not affected by the 
.B replyall
variable, but always sends the reply to all recipients of the
message.
.PD
.TP
.BR ret ain
Add the list of header fields named to the
.IR "retained list" .
Only the header fields in the retain list
are shown on your terminal when you print a message.
All other header fields are suppressed.  The set of retained fields
specified by the
.BR ret ain
command overrides any list of ignored fields specified by the
.BR ig nore
command.
The
.BR T ype
and
.BR P rint
commands can be used to print a message in its entirety.
If
.BR ret ain
is executed with no arguments, it lists the current set of
retained fields.
.HP
.BR s ave 
.RI [ message-list ]
.RI [ filename ]
.br
.IX  "mail commands"  "save"  "\fLmail\fP commands"  "\fLsave\fP"
.IX  "save mail command"  ""  "\fLsave\fP mail command"
Save the specified messages in the named file.
The file is created if it does not exist.  If no
.I filename
is specified, the file named in the
.SB MBOX
variable is used, 
.B mbox
in your home directory by default.
Each saved message is deleted from the system mailbox when
.B mail
terminates unless the
.B keepsave
variable is set.
See also the
.BR ex it
and
.BR q uit
commands.
.TP
.BR S "ave [\fImessage-list\fP]"
.IX  "mail commands"  "savea"  "\fLmail\fP commands"  "\fLSave\fP"
.IX  "save mail command"  ""  "\fLSave\fP mail command"
Save the specified messages in a file whose name is derived from
the author of the first message.
The name of the file is taken from the author's name, with all
network addressing stripped off.  See also the
.BR C opy,
.BR fo llowup,
and
.BR F ollowup
commands and the
.B outfolder
variables.
.HP
.BR se t
.RI [ variable [\c
.BI = value \fR]\|]
.br
.IX  "mail commands"  "set"  "\fLmail\fP commands"  "\fLset\fP"
.IX  "set mail command"  ""  "\fLset\fP mail command"
Define a 
.IR variable .
To assign a 
.I value 
to
.IR variable ,
separate the variable name from the value by an
.RB ` = '
(there must be no space before or after the
.RB ` = ').
A variable may be given a null, string, or numeric 
.IR value .
To embed
.SM SPACE
characters within a
.I value
enclose it in quotes.
.IP
With no arguments,
.BR se t
displays all defined variables and any values they might have.
See 
.B Variables
for a description of all predefined
.B mail
variables.
.TP
.BR sh ell
.IX  "mail commands"  "shell"  "\fLmail\fP commands"  "\fLshell\fP"
.IX  "shell mail command"  ""  "\fLshell\fP mail command"
Invoke the interactive shell listed in the
.SB SHELL
variable.
.TP
.BR si "ze [\fImessage-list\fP]"
.IX  "mail commands"  "size"  "\fLmail\fP commands"  "\fLsize\fP"
.IX  "size mail command"  ""  "\fLsize\fP mail command"
Print the size in characters of the specified messages.
.TP
.BR so "urce\fI filename\fP"
.IX  "mail commands"  "source"  "\fLmail\fP commands"  "\fLsource\fP"
.IX  "source mail command"  ""  "\fLsource\fP mail command"
Read commands from the given file and return to command mode.
.TP
.BR to "p [\fImessage-list\fP]"
.IX  "mail commands"  "top"  "\fLmail\fP commands"  "\fLtop\fP"
.IX  "top mail command"  ""  "\fLtop\fP mail command"
Print the top few lines of the specified messages.
If the 
.B toplines
variable is set, it is taken as the number of lines to print.
The default number is 5.
.TP
.BR tou "ch [\fImessage-list\fP]"
.IX  "mail commands"  "touch"  "\fLmail\fP commands"  "\fLtouch\fP"
.IX  "touch mail command"  ""  "\fLtouch\fP mail command"
Touch the specified messages.  If any message in 
.I message-list
is not specifically saved in a file, it will be placed in the 
.I mbox
upon normal termination.  See also the
.BR ex it
and
.BR q uit
commands.
.TP
.BR t "ype [\fImessage-list\fP]"
Same as the
.BR p rint 
command.
.TP
.BR T "ype [\fImessage-list\fP]"
Same as the 
.BR P rint
command.
.HP
.BR u ndelete 
.RI [ message-list ]
.br
.IX  "mail commands"  "undelete"  "\fLmail\fP commands"  "\fLundelete\fP"
.IX  "undelete mail command"  ""  "\fLundelete\fP mail command"
Restore deleted messages.  This command
only restores messages 
.I
deleted in the current mail session.
If the 
.B autoprint
variable is set, the last message restored is printed.
.HP
.BR unr ead
.RI [ message-list ]
.br
.PD 0
.HP
.BR U nread 
.RI [ message-list ]
.br
Same as the 
.BR ne w
command.
.TP
.BR uns "et \fIvariable \fP.\|.\|."
.IX  "mail commands"  "unset"  "\fLmail\fP commands"  "\fLunset\fP"
.IX  "unset mail command"  ""  "\fLunset\fP mail command"
Erase the specified variables.
If the variable was imported from the environment (that is, an
environment variable or exported shell variable), it cannot be 
unset from within
.BR mail .
.PD
.TP
.BR ve rsion
.IX  "mail commands"  "version"  "\fLmail\fP commands"  "\fLversion\fP"
.IX  "version mail command"  ""  "\fLversion\fP mail command"
Print the current version and release date of the
.B mail
utility.
.TP
.BR v "isual [\fImessage-list\fP]"
.IX  "mail commands"  "visual"  "\fLmail\fP commands"  "\fLvisual\fP"
.IX  "visual mail command"  ""  "\fLvisual\fP mail command"
Edit the given messages with the screen editor listed in the
.SB VISUAL
variable.  The default screen editor is
.BR vi (1).
Each message is placed in a temporary file for editing.
.HP
.BR w rite 
.RI  [ message-list ]
.RI [ filename ]
.br
.IX  "mail commands"  "write"  "\fLmail\fP commands"  "\fLwrite\fP"
.IX  "write mail command"  ""  "\fLwrite\fP mail command"
Write the given messages onto the specified file, but without the header
and trailing blank line.  Otherwise, this is  equivalent to the
.BR s ave
command.
.TP
.BR x it
Same as the
.BR ex it
command.
.TP
.BR z [\| + \||\| \- \|]
.IX  "mail commands"  "z"  "\fLmail\fP commands"  "\fLz\fP"
.IX  "z mail command"  ""  "\fLz\fP mail command"
Scroll the header display forward 
.RB ( + )
or backward 
.RB ( \- )
one screenfull.  The number of headers displayed is set by the 
.B screen
variable.
.IX  "mail commands"  ""  "\fLmail\fP commands"  ""  PAGE END
.SS Forwarding Messages
.IX "forwarding mail"
.IX "mail forwarding messages" "" "\fLmail\fR, forwarding messages"
.IX "forward" "" "\fL.forward\fR file"
.LP
To forward a specific message, include it in a message to the
desired recipients with the
.B \(apf
or
.B \(apm
tilde escapes. 
To forward mail automatically, add a comma-separated list of addresses
for additional recipients to the 
.B \&.forward
file in your home directory.  (This is different from the format
of the
.B alias
command, which takes a space-separated list instead.)
Note: forwarding addresses must be valid (as described in
.BR aliases (5)),
or the messages will \(lqbounce.\(rq  You cannot, for
instance, reroute your mail to a new host by forwarding it to your
new address if it is not yet listed in the
.SM YP
aliases domain.
.SS Variables
.IX  "mail variables"  ""  "\fLmail\fP variables"  "\fL\fP"  PAGE START
.IX  "variables in mail"  ""  "environment variables in \fLmail\fP"  ""  PAGE START
.LP
The behavior of 
.B mail
is governed by a set of predefined variables
that are set and cleared using the
.BR se t
and
.BR uns et
commands.  
.SS "\fIEnvironment Variables\fR"
Values for the following variables are read in 
automatically from the environment; they cannot be altered from within
.BR mail :
.HP 14
.SB HOME\c
.BI = directory
.br
.IX  "mail environment variables"  "HOME"  "\fLmail\fP environment variables"  "\fLHOME\fP"
.IX  "HOME mail environment variable"  ""  "\fLHOME\fP mail environment variable"
The user's home directory.
.HP
.SB MAIL\c
.BI = filename
.br
.IX  "mail environment variables"  "MAIL"  "\fLmail\fP environment variables"  "\fLMAIL\fP"
.IX  "MAIL mail environment variable"  ""  "\fLMAIL\fP mail environment variable"
The name of the initial mailbox file to read (in lieu of the
standard system mailbox).  The default is 
.BR /var/spool/mail/\fIusername\|\fR.
.HP
.SB MAILRC\c
.BI = filename
.br
.IX  "mail environment variables"  "MAILRC"  "\fLmail\fP environment variables"  "\fLMAILRC\fP"
.IX  "MAILRC mail environment variable"  ""  "\fLMAILRC\fP mail environment variable"
The name of the personal start-up file.  The
default is 
.BR $\s-1HOME\s0/.mailrc .
.br
.ne 6
.SS "\fIMail Variables"
.LP
The following variables can be initialized within the
.I \&.mailrc
file, or set and altered interactively using the
.BR se t
command.  
They can also be imported from the environment (in which
case their values cannot be changed within
.BR mail ).
The
.BR uns et
command clears variables. The set command can also be used to
clear a variable by prefixing the word
.B no
to the name of the variable to clear.
.LP
Variables for which values are normally supplied are indicated
with an equal-sign
.RB ( = ).  
The equal-sign is required by the 
.BR se t 
command, and there can be no spaces between the variable-name,
equal-sign, and value, using
.B set
to assign a value.
.TP 14
.B allnet
.IX  "mail variables"  "allnet"  "\fLmail\fP variables"  "\fLallnet\fP"
.IX  "allnet mail variable"  ""  "\fLallnet\fP mail variable"
All network names whose last component (login name) match are treated as
identical.
This causes the message list specifications to behave similarly.
Default is
.BR noallnet .
See also the
.BR alt ernates
command and the 
.B metoo
variable.
.TP
.B alwaysignore
.IX  "mail variables"  "alwaysignore"  "\fLmail\fP variables"  "\fLalwaysignore\fP"
.IX  "alwaysignore mail variable"  ""  "\fLalwaysignore\fP mail variable"
Ignore header fields with
.BR ig nore
everywhere, not just during
.BR p rint
or
.BR t ype.
Affects the
.BR s ave,
.BR S ave,
.BR c opy,
.BR C opy,
.BR to p,
.BR pi pe,
and
.BR w rite
commands, and the
.B \(apm
and
.B \(apf
tilde escapes.
.TP
.B append
.IX  "mail variables"  "append"  "\fLmail\fP variables"  "\fLappend\fP"
.IX  "append mail variable"  ""  "\fLappend\fP mail variable"
Upon termination, append messages to the end of the 
.I mbox
file instead of prepending them.
Default is
.B noappend
but
.B append
is set in the global start-up file (which can be suppressed with the
.B \-n
command line option).
.TP
.B askcc
.IX  "mail variables"  "askcc"  "\fLmail\fP variables"  "\fLaskcc\fP"
.IX  "askcc mail variable"  ""  "\fLaskcc\fP mail variable"
Prompt for the
.B Cc
list after message is entered.
Default is
.BR noaskcc .
.TP
.B asksub
.IX  "mail variables"  "asksub"  "\fLmail\fP variables"  "\fLasksub\fP"
.IX  "asksub mail variable"  ""  "\fLasksub\fP mail variable"
Prompt for subject if it is not specified on the command line
with the
.B \-s
option.
Enabled by default.
.TP
.B autoprint
.IX  "mail variables"  "autoprint"  "\fLmail\fP variables"  "\fLautoprint\fP"
.IX  "autoprint mail variable"  ""  "\fLautoprint\fP mail variable"
Enable automatic printing of messages after
.BR d elete
and
.BR u ndelete
commands.
Default is
.BR noautoprint .
.TP
.B bang
.IX  "mail variables"  "bang"  "\fLmail\fP variables"  "\fLbang\fP"
.IX  "bang mail variable"  ""  "\fLbang\fP mail variable"
Enable the special-casing of exclamation points (!) in shell escape
command lines
as in
.BR vi (1).
Default is
.BR nobang .
.TP
.BI cmd= shell-command
.IX  "mail variables"  "cmd"  "\fLmail\fP variables"  "\fLcmd\fP"
.IX  "cmd mail variable"  ""  "\fLcmd\fP mail variable"
Set the default command for the
.BR pi pe
command.
No default value.
.TP
.BI conv= conversion
.IX  "mail variables"  "conv"  "\fLmail\fP variables"  "\fLconv\fP"
.IX  "conv mail variable"  ""  "\fLconv\fP mail variable"
Convert
.B uucp
addresses to the address style specified by
.IR conversion ,
which can be either:
.RS
.TP
.B internet 
This requires a mail delivery program conforming to the
.SM RFC\s0822
standard for electronic mail addressing.
.TP
.B optimize
Remove loops in 
.BR uucp (1C)
address paths (typically generated by the
.BR r eply
command).  No rerouting is performed;
.B mail
has no knowledge of 
.SM UUCP
routes or connections.
.RE
.IP
Conversion is disabled by default.  See also 
.BR sendmail (8)
and the
.B \-U
command line option.
.TP
.BI crt= number
.IX  "mail variables"  "crt"  "\fLmail\fP variables"  "\fLcrt\fP"
.IX  "crt mail variable"  ""  "\fLcrt\fP mail variable"
Pipe messages having more than \fInumber\fR lines
through the command specified by the value of the 
.SB PAGER
variable
.RI ( more
by default).
Disabled by default.
.HP
.SB DEAD\c 
.BI = filename
.br
.IX  "mail variables"  "DEAD"  "\fLmail\fP variables"  "\fLDEAD\fP"
.IX  "DEAD mail variable"  ""  "\fLDEAD\fP mail variable"
The name of the file in which to save partial letters
in case of untimely interrupt or delivery errors.
Default is the file
.B dead.letter
in your home directory.
.TP
.B debug
.IX  "mail variables"  "debug"  "\fLmail\fP variables"  "\fLdebug\fP"
.IX  "debug mail variable"  ""  "\fLdebug\fP mail variable"
Enable verbose diagnostics for debugging.
Messages are not delivered.
Default is
.BR nodebug .
.TP
.B dot
.IX  "mail variables"  "dot"  "\fLmail\fP variables"  "\fLdot\fP"
.IX  "dot mail variable"  ""  "\fLdot\fP mail variable"
Take a period on a line by itself during input from a terminal as
.SM EOF\s0.
Default is
.B nodot
but
.B dot
is set in the global start-up file (which can be suppressed with the
.B \-n
command line option).
.HP
.SB EDITOR\c
.BI = shell-command
.br
.IX  "mail variables"  "EDITOR"  "\fLmail\fP variables"  "\fLEDITOR\fP"
.IX  "EDITOR mail variable"  ""  "\fLEDITOR\fP mail variable"
The command to run when the
.BR e dit
or
.B \(ape
command is used.
Default is
.BR ex (1).
.TP
.BI escape= c
.IX  "mail variables"  "escape"  "\fLmail\fP variables"  "\fLescape\fP"
.IX  "escape mail variable"  ""  "\fLescape\fP mail variable"
Substitute
.I c
for the \(ap escape character.
.TP
.BI folder= directory
.IX  "mail variables"  "folder"  "\fLmail\fP variables"  "\fLfolder\fP"
.IX  "folder mail variable"  ""  "\fLfolder\fP mail variable"
The directory for saving standard mail files.
User specified file names beginning with a plus
.RB ( + )
are expanded by preceding the filename with
this directory name to obtain the real filename.
If 
.I directory
does not start with a slash 
.RB ( / ),
the value of 
.SB HOME 
is prepended to it.  There is no default for the 
.B folder
variable.
See also 
.B outfolder
below.
.TP
.B header
.IX  "mail variables"  "header"  "\fLmail\fP variables"  "\fLheader\fP"
.IX  "header mail variable"  ""  "\fLheader\fP mail variable"
Enable printing of the header summary when entering 
.BR mail .
Enabled by default.
.TP
.B hold
.IX  "mail variables"  "hold"  "\fLmail\fP variables"  "\fLhold\fP"
.IX  "hold mail variable"  ""  "\fLhold\fP mail variable"
Preserve all messages that are read in
the system mailbox instead of putting them
in the standard 
.I mbox
save file.
Default is
.BR nohold
for
.BR mail
and 
.B hold
for
.BR mailtool (1).
.TP
.B ignore
.IX  "mail variables"  "ignore"  "\fLmail\fP variables"  "\fLignore\fP"
.IX  "ignore mail variable"  ""  "\fLignore\fP mail variable"
Ignore interrupts while entering messages.
Handy for noisy dial-up lines.
Default is
.BR noignore .
.TP
.B ignoreeof
.IX  "mail variables"  "ignoreeof"  "\fLmail\fP variables"  "\fLignoreeof\fP"
.IX  "ignoreeof mail variable"  ""  "\fLignoreeof\fP mail variable"
Ignore
.SM EOF
during message input.
Input must be terminated by a period
.RB (` . ')
on a line by itself
or by the
.RB ` \(ap '.
command.
Default is
.BR noignoreeof .
See also 
.B dot
above.
.TP
.BI indentprefix= string
.IX  "mail variables"  "indentprefix"  "\fLmail\fP variables"  "\fLindentprefix\fP"
.IX  "indentprefix mail variable"  ""  "\fLindentprefix\fP mail variable"
When 
.B indentprefix
is set,
.I string
is used to mark indented lines from messages included with
.BR \(apm .
The default is a
.SM TAB
character.
.TP
.B keep
.IX  "mail variables"  "keep"  "\fLmail\fP variables"  "\fLkeep\fP"
.IX  "keep mail variable"  ""  "\fLkeep\fP mail variable"
When the system mailbox is empty,
truncate it to zero length instead of removing it.
Disabled by default.
.TP
.B keepsave
.IX  "mail variables"  "keepsave"  "\fLmail\fP variables"  "\fLkeepsave\fP"
.IX  "keepsave mail variable"  ""  "\fLkeepsave\fP mail variable"
Keep messages that have been saved in other files in the system
mailbox instead of deleting them.
Default is
.BR nokeepsave .
.HP
.SB LISTER\c
.BI = shell-command
.br
.IX  "mail variables"  "LISTER"  "\fLmail\fP variables"  "\fLLISTER\fP"
.IX  "LISTER mail variable"  ""  "\fLLISTER\fP mail variable"
The command (and options) to use when listing the files in the 
.B folder
directory.  The default is
.BR ls (1V).
.HP
.SB MBOX\c
.BI = filename
.br
.IX  "mail variables"  "MBOX"  "\fLmail\fP variables"  "\fLMBOX\fP"
.IX  "MBOX mail variable"  ""  "\fLMBOX\fP mail variable"
The name of the file to save messages which have been read.
The
.BR x it
command overrides this variable,
as does saving the message explicitly to another file.
Default is the file
.B mbox
in your home directory.
.TP
.B metoo
.IX  "mail variables"  "metoo"  "\fLmail\fP variables"  "\fLmetoo\fP"
.IX  "metoo mail variable"  ""  "\fLmetoo\fP mail variable"
If your login appears as a recipient,
do not delete it from the list.
Default is
.BR nometoo .
.TP
.B no
.IX  "mail variables"  "no"  "\fLmail\fP variables"  "\fLno\fP"
.IX  "no mail variable"  ""  "\fLno\fP mail variable"
When used as a prefix to a variable name, has the effect of
unsetting the variable.
.TP
.B onehop
.IX  "mail variables"  "onehop"  "\fLmail\fP variables"  "\fLonehop\fP"
.IX  "onehop mail variable"  ""  "\fLonehop\fP mail variable"
When responding to a message that was originally sent to several
recipients,
the other recipient addresses are normally forced to be relative to the
originating author's machine for the response.
This flag disables alteration of the recipients' addresses,
improving efficiency in a network where all machines can send directly
to all other machines (that is, one \(lqhop\(rq away).
.TP
.B outfolder
.IX  "mail variables"  "outfolder"  "\fLmail\fP variables"  "\fLoutfolder\fP"
.IX  "outfolder mail variable"  ""  "\fLoutfolder\fP mail variable"
Locate the files used to record outgoing messages
in the directory specified by the 
.B folder
variable unless the
pathname is absolute.  Default is
.BR nooutfolder .
See 
.B folder
above and the
.BR S ave,
.BR C opy,
.BR fo llowup,
and
.BR F ollowup
commands.
.TP
.B page
.IX  "mail variables"  "page"  "\fLmail\fP variables"  "\fLpage\fP"
.IX  "page mail variable"  ""  "\fLpage\fP mail variable"
Used with the
.BR pi pe
command to insert a form feed after each message sent through the pipe.
Default is
.BR nopage .
.HP
.SB PAGER\c
.BI = shell-command
.br
.IX  "mail variables"  "PAGER"  "\fLmail\fP variables"  "\fLPAGER\fP"
.IX  "PAGER mail variable"  ""  "\fLPAGER\fP mail variable"
The command to use as a filter for paginating output, along
with any options to be used.
Default is
.BR more (1).
.TP
.BI prompt= string
.IX  "mail variables"  "prompt"  "\fLmail\fP variables"  "\fLprompt\fP"
.IX  "prompt mail variable"  ""  "\fLprompt\fP mail variable"
Set the
.I command mode
prompt to 
.IR string .
Default is 
.RB ` & '.
.br
.ne 3
.TP
.B quiet
.IX  "mail variables"  "quiet"  "\fLmail\fP variables"  "\fLquiet\fP"
.IX  "quiet mail variable"  ""  "\fLquiet\fP mail variable"
Refrain from printing the opening message and version when entering 
.BR mail .
Default is
.BR noquiet .
.TP
.BI record= filename
.IX  "mail variables"  "record"  "\fLmail\fP variables"  "\fLrecord\fP"
.IX  "record mail variable"  ""  "\fLrecord\fP mail variable"
Record all outgoing mail in 
.IR filename .
Disabled by default.
See also the variable
.BR outfolder .
.TP
.B replyall
.IX  "mail variables"  "replyall"  "\fLmail\fP variables"  "\fLreplyall\fP"
.IX  "replyall mail variable"  ""  "\fLreplyall\fP mail variable"
Reverse the effect of the
.BR r eply
and
.BR R eply
commands.
.TP
.B save
.IX  "mail variables"  "save"  "\fLmail\fP variables"  "\fLsave\fP"
.IX  "save mail variable"  ""  "\fLsave\fP mail variable"
Enable saving of messages in the 
.I dead.letter
file on interrupt or delivery error.
See 
.SB DEAD
for a description of this file.  Enabled by default.
.TP
.BI screen= number
Set the number of lines in a screen\-full of headers for the
.BR h eaders
command.
.TP
.BI sendmail= shell-command
.IX  "mail variables"  "sendmail"  "\fLmail\fP variables"  "\fLsendmail\fP"
.IX  "sendmail mail variable"  ""  "\fLsendmail\fP mail variable"
Alternate command for delivering messages.  Note:
in addition to the expected list of recipients,
.B mail
also passes the
.BR \-i
and
.BR \-m ,
flags to the command.  Since these flags are not appropriate to
other commands, you may have to use a shell script that strips them
from the arguments list before invoking the desired command.
.TP
.B sendwait
.IX  "mail variables"  "sendwait"  "\fLmail\fP variables"  "\fLsendwait\fP"
.IX  "sendwait mail variable"  ""  "\fLsendwait\fP mail variable"
Wait for background mailer to finish before returning.
Default is
.BR nosendwait .
.HP
.SB SHELL\c
.BI = shell-command
.br
.IX  "mail variables"  "SHELL"  "\fLmail\fP variables"  "\fLSHELL\fP"
.IX  "SHELL mail variable"  ""  "\fLSHELL\fP mail variable"
The name of a preferred command interpreter.
Typically inherited from the environment, the shell is normally
the one you always use.  Otherwise defaults to 
.BR sh (1).
.TP
.B showto
.IX  "mail variables"  "showto"  "\fLmail\fP variables"  "\fLshowto\fP"
.IX  "showto mail variable"  ""  "\fLshowto\fP mail variable"
When displaying the header summary and the message is from you,
print the recipient's name instead of the author's name.
.TP
.BI sign= autograph
.IX  "mail variables"  "sign"  "\fLmail\fP variables"  "\fLsign\fP"
.IX  "sign mail variable"  ""  "\fLsign\fP mail variable"
The 
.I autograph
text inserted into the message when the
.B \(apa
(autograph) command is given.
No default
(see also the
.B \(api
tilde escape).
.TP
.BI Sign= autograph
.IX  "mail variables"  "sign"  "\fLmail\fP variables"  "\fLSign\fP"
.IX  "sign mail variable"  ""  "\fLSign\fP mail variable"
The 
.I autograph 
text inserted into the message when the
.B \(apA
command is given.  No default (see also the
.B \(api
tilde escape).
.TP
.BI toplines= number
.IX  "mail variables"  "toplines"  "\fLmail\fP variables"  "\fLtoplines\fP"
.IX  "toplines mail variable"  ""  "\fLtoplines\fP mail variable"
The number of lines of header to print with the
.BR to p
command.  Default is 5.
.TP
.B verbose
.IX  "mail variables"  "verbose"  "\fLmail\fP variables"  "\fLverbose\fP"
.IX  "verbose mail variable"  ""  "\fLverbose\fP mail variable"
Invoke
.B sendmail
with the
.B \-v
flag.
.HP
.SB VISUAL\c
.BI = shell-command
.br
.IX  "mail variables"  "VISUAL"  "\fLmail\fP variables"  "\fLVISUAL\fP"
.IX  "VISUAL mail variable"  ""  "\fLVISUAL\fP mail variable"
The name of a preferred screen editor.  Default is
.BR vi .
.IX  "mail variables"  ""  "\fLmail\fP variables"  "\fL\fP"  PAGE END
.IX  "environment variables in mail"  ""  "environment variables in \fLmail\fP"  ""  PAGE END
.IX  "environment variables in mail"  ""  "environment variables in \fLmail\fP"  ""  PRINT "see also \fLmail\fP \fIenvironment variables\fP"
.SH FILES
.PD 0
.TP 20
.BI $\s-1HOME\s0/ .mailrc
personal start-up file
.TP 
.BI $\s-1HOME\s0/ .forward
list of recipients for automatic forwarding of messages
.TP
.BI $\s-1HOME\s0/ mbox
secondary storage file
.TP 
.BI $\s-1HOME\s0/ dead.letter
undeliverable messages file
.TP 
.B /var/spool/mail
directory for system mailboxes
.TP
.B /usr/lib/Mail.help*
help message files
.TP
.B /usr/lib/Mail.rc
global start-up file
.TP
.B /tmp/R[emqsx]*
temporary files
.PD
.SH SEE ALSO
.BR biff (1),
.BR binmail (1),
.BR echo (1V),
.BR ex (1),
.BR fmt (1),
.BR ls (1V),
.BR mailtool (1),
.BR more (1),
.BR sh (1),
.BR uucp (1C),
.BR vacation (1),
.BR vi (1),
.BR aliases (5),
.BR newaliases(8),
.BR sendmail (8)
.LP
.TX MMBG
.LP
.B mail 
is found in 
.BR /usr/ucb/Mail , 
as a link to 
.BR /usr/ucb/mail .
If you wish to use the original
(version 6)
.SM UNIX
mail program, you can find it in 
.BR /usr/bin/mail .  
Its man page is named
.BR binmail (1).
.SH BUGS
Where 
.I shell-command
is shown as valid, arguments are not always allowed.
Experimentation is recommended.
.LP
Internal variables imported from the execution environment cannot be
.BR uns et.
.LP
Replies do not always generate correct return addresses.  Try
resending the errant reply with
.B onehop
set.
.LP
.B mail 
does not lock your record file.  So, if you use a record file
and send two or more messages simultaneously, lines from the
messages may be interleaved in the record file.
.LP
The format for the
.B alias
command is a space-separated list of recipients, while the
format for an alias in either the 
.B \&.forward
or
.B /etc/aliases
is a comma-separated list.
.IX  "mail command"  ""  "\fLmail\fP \(em send and receive mail"  ""  PAGE END
.IX  "send and receive mail"  ""  "send and receive mail \(em \fLmail\fP"  ""  PAGE END
.IX  "read mail"  ""  "read mail \(em \fLmail\fP"  ""  PAGE END
.IX  communications  mail  ""  "\fLmail\fP \(em send and receive mail"  PAGE END
iables"  "\fLi./share/man/man1/mailrc_to_defaults.1                                                                  755       0      12          107  4424740674  12614                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)mailrc_to_defaults.1 1.4 89/03/26 SMI;
make.1 l       man.1  l  4    	mc68010.1 4  H    	mc68020.1 H  X    mesg.1 4  h    mkdir.1   x    mkstr.1       more.1        mt.1 1 t      mv.1 ore      neqn.1 1      newgrp.1        nice.1        nl.1 1 1      nm.1 ice       nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #  	objdump.1 H  X  $  od.1v 1   p  %  old-clocktool.1 ./share/man/man1/mailtool.1                                                                            755       0      12        40053  4424740674  10640                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mailtool.1 1.30 89/03/26 SMI;
.TH MAILTOOL 1 "22 March 1989"
.SH NAME
mailtool \- SunView interface for the mail program
.SH SYNOPSIS
.B mailtool
[
.B \-Mx
]
[
.B \-Mi
.I interval
]
[
.I generic-tool-arguments
]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX mailtool "" "\fLmailtool\fR \(em SunView mail interface"
.IX tools mailtool "" "\fLmailtool\fR"
.LP
.B mailtool
is the standard SunView interface to 
.BR mail (1).
It provides a window and mouse-based interface for reading, storing,
composing, and sending mail messages.
Scrollable windows allow easy access to
your mailbox and mail folders. 
Software \(lqpanel buttons\(rq make frequently-used commands readily
available. 
Less-used commands are accessible from
menus, and keyboard accelerators are provided
for the more experienced user.
.LP
The full editing capabilities of
.BR textedit (1)
and the SunView selection service are available
for modifying and composing mail.
In addition, you can customize
.B mailtool
by setting various parameters with
.BR defaultsedit (1).
.SH OPTIONS
.TP 15
.B \-Mx
Expert mode.
Do not ask for confirmation after potentially damaging
.B mail
commands.
This has the same effect as setting the
.B expert
variable.
.TP
.BI \-Mi " interval"
Check for new mail every
.I interval
seconds.
This has the same effect as specifying a value for the
.I interval
variable.
.TP
.I generic-tool-arguments
.B mailtool
accepts the generic tool arguments described in
.BR sunview (1).
.SH USAGE
Users who are not familiar with the 
.B mail
command should read
.TX MMBG .
For more information on text editing and the
selection service, see the 
.TX SVBG .
.LP
.B mailtool
comes up closed.
You can open the tool by clicking on the icon with the
.SM LEFT
mouse button.
.B mailtool
starts reading your system mailbox as it opens.
Alternatively, the frame menu on the icon contains the 
.B Open
pull-right item, which allows you to open
.B mailtool
to a selected folder, or open and
.BR Compose ,
or just open without performing any other operation.
.SS Subwindows
.LP
.B mailtool
is composed of six parts. 
From top to bottom, they are:
.TP 12
frame header\ \ \ \ 
This is the broad stripe at the top of the tool, and it
displays status information.
The right side displays information about the
most-recently executed command.
The left side displays other information such as the
name of the current folder.
When involved in a lengthy operation,
.B mailtool
displays a message to that effect on the left side.
While an operation is pending, the cursor takes on
the shape of an hourglass; you must wait until it
finishes.
.TP
header-list window
This read-only text window contains a list of message headers
from the current folder or mailbox. 
Initially, it shows the contents of your system mailbox (by default).
Each header typically contains fields indicating who the message is from,
its subject, and so forth.
There is a scrollbar to the left
that you can use to scroll through the headers.
.TP
control panel\ \ \ \ 
This panel contains a collection of
software buttons corresponding to the most frequently used
.BR mail (1)
commands.
Clicking on one of these buttons starts the indicated
operation for either the selected or the current message.
Commands that require the name of a folder, such as
.BR Save ,
use the contents of the
.RB ` File: '
text item.
You must enter the name of a file or folder in this space before
clicking on the button.
.IP
In addition to the panel buttons, other commands
and variations are accessible through menus \(lqbehind\(rq
each panel button. 
To display a button menu, hold down the
.SM RIGHT
mouse button over the panel button.
See
.BR "Command Menus" ,
below, for details.
.TP
The message window
This text window displays the current message
(marked with
.RB ` > '
in the header window). 
You can edit this message, in which case the result replaces
the original message in the mailbox or folder.
.TP
composition panel
This panel contains software buttons for
composing or replying to messages, and is visible
only when you are composing a message or reply.
.TP
composition window
This text window, in which you compose messages to send, appears in
conjunction with the composition panel. 
It is normally displayed only when composing a message or reply. 
It is initially loaded with mail header lines such as
.RB ` To: '
and 
.RB ` Subject: ',
and perhaps,
.RB ` Cc: '. 
After these labels come various text fields, such as
.BR "|>recipients<|" .
You can move from field to field using
.SM CTRL-TAB\s0.
This advances to the next text field.
If you supply input to
the field, your input replaces its contents. 
Empty fields are deleted when the message is sent.
You can continue
to edit the message as you see fit until you click on
.BR Deliver ,
at which point the message is sent as is.
(You normally cannot retrieve a message once it has been sent).
.TP
pop-up composition window
While composing a message or reply, clicking again on
.B Compose
or
.BR Reply ,
opens another frame that contains a composition panel and window.
The only limit on the number of such pop-up composition frames is the
number of windows that a tool can support.
These additional frames operate independently.
.SS "Basic Mailtool Concepts"
.LP
.TP 12
Choosing a message
To choose a message, place the cursor anywhere
in its header in the header window and click the
.SM LEFT
mouse button. 
If there is no message chosen, 
.B mailtool
applies operations to the current message.
.TP
Current message
The message that is displayed in
the message window, and flagged with a
.RB ` > '
in the header window.
.TP
Confirmation\ \ \ \ \ 
Some operations require confirmation, in which case an alert is
displayed.
You can then confirm or cancel the operation.
.TP
Folders\ \ \ \ \ \ \ \ \ \ \ \ 
When mailtool starts up, it normally reads your system mailbox.
However, you can select another \(lqfolder\(rq (file containing mail
messages) from which to read.
.TP
Committing Changes
Some operations change the state of your system mailbox or the current
folder.  These changes are not finalized until you commit them.
For instance, you can \(lqundelete\(rq messages that were deleted,
provided that you have not yet done an operation that commits your
changes. 
If the
.B mailtool
session is interrupted, pending changes to the mailbox  or
folder do not take effect.  The
.B Done
button commits changes, as does the
.B Quit
button, which also exits from
.BR mailtool .
To deliberately exit without committing, use the pop-up menu behind the 
.B Quit
button.
.SS "Control Panel"
.LP
Except for the 
.B Next
and
.B Undelete
buttons,
.B mailtool
commands operate on the selected message or the current message only.
You cannot specify a list or range of messages as with
.BR mail (1).
The control panel buttons and items are (in alphabetical order):
.TP 12
.B Compose
Open a composition panel and window to compose a message.
.TP
.B Delete
Delete the selected or current message.
.TP
.B Done
Commit changes, close 
.BR mailtool ,
and read new mail on next
.BR Open .
.TP
.B File:
This is a text item in which to enter the name of a folder for the
.BR Save ,
.BR Copy ,
and
.BR Folder
commands.
This name can be a full pathname, a
pathname relative to the current directory (the directory 
.B mailtool
was started from), or a filename prefixed with a
.RB ` + '
to refer to a file in the \(lqfolder\(rq directory.
.TP
.B Folder
Commit changes and switch to the file or folder specified in the
.RB ` File: '
text item.
.TP
.B Misc
Display a pop-up panel to change the current directory of
.BR mailtool .
Other miscellaneous operations are available on
the menu behind this button.
.TP
.B New Mail
If you are examining your system mailbox, retrieve
new mail
.I without
committing changes.
If your are examining a folder, commit any changes to the folder,
switch back to system mailbox, and retrieve any new mail
in the process.
.TP
.B Next
Display the message following the
.I current
message in the message window.
.TP
.B Print
Print the corresponding message on a hardcopy printer.
.TP
.B Reply
Open a composition window to reply to the selected or current message.
.TP
.B Save
Save the current or selected message in the folder specified in the
.RB ` File: '
text field, and delete it from your system mailbox or current folder.
.TP
.B Show
Display the chosen or current message in the message window.
.SS "The Composition Panel"
.LP
This panel contains four buttons and a cycle-item. 
The cycle-item
controls the behavior of the composition window when it becomes
inactive \(em when the user delivers or cancels a message.
Items in the cycle are:
.TP 12
.B Disappear
Remove the composition window and panel from display.  This is
the default.
.TP
.B Stay Up
Clear the window, but leave it displayed.
.TP
.B Close
Close a pop-up composition frame.
.LP
The panel buttons are:
.TP 12
.B Cancel
Abort the message being composed.
.TP
.B Deliver
Send the message being composed to the indicated recipients.
.TP
.B Include
Insert the corresponding message into the composition window at
the caret.  This operation can be performed repeatedly, to
include various messages.
.TP
.B Re-address
Insert the appropriate
.RB ` To: ',
.RB ` Subject: '
and
.RB ` Cc: '
fields at the top
of the composition window.
.LP
.SS "Command Menus"
.LP
All panel buttons have menus behind them.  The first item on
the menu is the default command; choosing this item is the same as
clicking on the panel button.
.LP
Some menu items are pull-right to menus of related commands.
You can browse the button menus to discover what additional commands are
available, and what their accelerators are, if any.
The following commands are particularly useful.
.TP 15
.B Change Directory
Display a pop-up panel to change the current directory.
.TP
.B Commit Changes
Commit changes.  This item is behind the
.B New Mail
button when viewing a folder.
.TP
.B Commit Changes and Quit
Behind the
.B Done
button.
Commit changes and exit
.BR mailtool (1).
This is the same as choosing
.B Quit
from the frame menu.
.br
.ne 5
.TP
.B "Commit Changes and Retrieve New Mail"
Behind the 
.B New Mail
button.
Commit changes and retrieve new mail, switching to the system mail box
if in a folder. 
This is the default when viewing a folder.
.TP
.B Copy
Behind the 
.B Save
button.
Copy the selected message to the file or folder specified in the
.RB ` File: '
text item, without deleting it from the mailbox or folder.
.TP
.B "Deliver, Leave Window Intact"
Behind the
.B Deliver
button.
Deliver the message, but do not undisplay, close, or clear the message
composition window.
.TP
.B Include, Indented
Behind the
.B Include
button.
Include the indicated message, setting it off by indention
rather than bracketing it with 
.RB ` "--- Begin Included Message ---" '
and
.RB ` "--- End Included Message ---" '
lines.
.TP
.B Previous
Behind the
.B Next
button.
Display the previous message in the message window.
.TP
.B "Quit without Committing Changes"
Behind the
.B Done
button.
Exit
.B mailtool
.I without
committing changes.
.TP
.B Show Full Header
Behind the
.B Show
button.
Display the complete message in the message window, including
header lines that are normally ignored.
.TP
.B Source .mailrc
Behind the
.B Misc
button.
Read in your
.B \&.mailrc
file to acquire new variables and settings. 
Note: this operation does not \(lqforget\(rq the
previous option settings; only changes to
boolean variables take effect.
.TP
.B Undelete
Behind the
.B Delete
button.
Undelete the most recently deleted message(s) \(em this may be
used repeatedly.
It is inactive when there are no deleted messages.
.LP
There are two special 
menus for use with the
.RB ` File: '
text item.
Choosing a name from either of these menus replaces the contents of
this item. 
The menu behind the
.RB ` File: '
item holds the most recently used folder names of the current
session.
It is be initialized by the 
.B filemenu
variable.
The menu behind the 
.B Folder
button displays all folders in the \(lqfolder\(rq directory, which is
specified by the 
.B folder
variable (described in
.BR mail (1)).
Folders can be organized into subdirectories
within the folder directory. 
Files in these subdirectories
appear in a hierarchy of pull-right menus.
.LP
To switch to a folder, choose it from one of the file menus, or
type it in directly, and click on the
.B Folder
button.
To return to your system mailbox, use the
.B New Mail
button.
.SS "Mailtool Variables"
.LP
In addition to the variables recognized by
.BR mail (1),
.B mailtool
recognizes those listed below. 
They can be set by using
.BR defaultsedit (1),
or by editing your
.B \&.mailrc
file directly.
Unless otherwise noted, the default for the
following variables is off.
.TP 15
.B allowreversescan
When set, allows you to step through messages in latest-first
oldest-first order if you choose.
The next message depends on the order of travel.
.TP
.B alwaysusepopup
Never split the message window to compose or reply; always use pop-up
composition windows.
.TP
.B askbcc
Prompt for the
.RB ` "Bcc:" '
field when composing or replying.
.TP
.B autoprint
Display the next message when the current message
is deleted or saved.
.TP
.B bell
The number of times to ring the bell when new mail arrives.
The default is 0.
.TP
.B disablefields
Do not use text fields in the composition window. 
The default is to use text fields.
.TP
.B editmessagewindow
Request confirmation before the first editing operation to a mesage in
the message window (as opposed to composing a reply).
The default is not to request confirmation of the first edit.
.TP
.B expert
Set expert mode in which no confirmations are requested.
.TP
.B filemenu
A list of files from which to initialize the
.RB ` File: '
menu.
These can be absolute pathnames, pathnames relative to the
working directory for 
.BR mailtool 
(typically your home directory), or filenames prefixed with a 
.RB ` + ',
which are taken as relative to the directory specified in the
.B folder
variable (see
.BR mail (1)).
.TP
.B filemenusize
Specifies the maximum size of the 
.RB ` File: '
menu.
The default is 10.
.TP
.B flash
The number of times to flash the window or icon when new mail arrives.
The default is 0.
.TP 
.B headerlines
The number of lines in header window. 
The default is 10.
.TP
.B interval
The interval in seconds to check for new mail.
The default is 300.
.TP
.B maillines
The number of lines in mail message window.
The default is 30.
.TP
.B moveinputfocus
Move the input focus into the composition window for
.B Compose
and
.BR Reply .
This only works for click-to-type.
.TP
.B pop-uplines
The number of lines in pop-up message composition window.
The default is 30.
.TP
.B msgpercent
The percent of the message window to remain visible during
.B Compose
or
.BR Reply .
The default is 50.
.TP
.B printmail
The command to use to print a message.
The default is 
.RB ` "lpr \-p" '.
.TP
.B trash
The name of trash bin, which may be accessed just like any other folder.
If set, all deleted messages are moved to the trash bin.
The trash bin is emptied when you commit changes.
.SS Conditional Settings
.LP
You can make your 
.B \&.mailrc
set variables conditionally,
depending on whether it is running in the tty environment or the
window environment.
See
.TX MMBG
for details.
.SH FILES
.PD 0
.TP 20
.B /var/spool/mail/*
system mailboxes
.TP
.B ~/.mailrc
startup file for 
.B mail
and
.B mailtool
.PD
.SH SEE ALSO
.BR binmail (1),
.BR defaultsedit (1),
.BR mail (1),
.BR sunview (1),
.BR textedit (1)
.BR aliases (5),
.BR newaliases( 8),
.BR sendmail (8)
.LP
.TX MMBG
.br
.TX SVBG
.SH BUGS
.LP
If
.BR mail (1)
receives an error, then 
.B mailtool
may hang, in which case you must kill it.
.LP
New mail status is only approximate, therefore the presence of new mail
is not always accurately reflected in the icon image or tool frame
header.
.LP
Mouse input may be lost while
.B mailtool
switches to iconic state.
.LP
When notifying you of new mail,
.B mailtool
will not flash the window or icon without beeping (ringing the
audible bell).  Thus, the
number of flashes is limited by the number of beeps you set.
.LP
Unlike
.BR mail (1),
.B mailtool
retains unsaved messages in the system mailbox by default; that
is, the
.B hold
variable is initially set.
e current
folder.  These changes are not finalized until you commit them.
For instance, you can \(lqundelete\(rq messages that were deleted,
provided that you have not yet done an operation that commits your
changes. 
If the
.B mailtool
session is interrupted, pending changes to the mailbox  or
folder do not take effect.  The
.B Done
button commits changes, as does the
.B Quit
button, which also exits from
.BR mailtool .
To deliberately exit without committing, use./share/man/man1/make.1                                                                                755       0      12       172023  4424740674   7760                                                                                                                                                                                                                                                                                                                                                                      '\" t
.ds ~ ~
.\" @(#)make.1 1.35 89/03/26 SMI; from UCB 4.3 BSD
.TH MAKE 1 "26 March 1989"
.SH NAME
make \- maintain, update, and regenerate related programs and files
.SH SYNOPSIS
.B make
[
.BI \-f " makefile"
] \&.\|.\|.
.RB [ " \-d " ]
.RB [ " \-dd " ]
.\".RB [ " \-ddd " ]
.RB [ " \-D " ]
.RB [ " \-DD " ]
.\".RB [ " \-DDD " ]
.if n .ti +.5i
.RB [ " \-e " ]
.RB [ " \-i " ]
.RB [ " \-k " ]
.\".RB [ " \-l " ]
.RB [ " \-n " ]
.\".RB [ " \-N " ]
.RB [ " \-p " ]
.RB [ " \-P " ]
.RB [ " \-q " ]
.RB [ " \-r " ]
.if t .ti +.5i
.\".RB [ " \-R " ]
.if n .ti +.5i
.RB [ " \-s " ]
.RB [ " \-S " ]
.RB [ " \-t " ]
.\".if t .ti +.5i
.RB [ " \-z " ]
.\"[
.\".BI \-M " machines-file"
.\"]
[
.I target
\&.\|.\|.
]
.if n .ti +.5i
[
.IB macro = value
\&.\|.\|.
]
.IX  "make command"  ""  "\fLmake\fP \(em build programs"  "" PAGE START
.IX  "programming tools"  make  ""  "\fLmake\fP \(em build programs"  PAGE START
.IX  "build programs make"  ""  "build programs \(em \fLmake\fP"  ""  PAGE START
.IX  "maintain programs make"  ""  "maintain programs \(em \fLmake\fP"  ""  PAGE START
.IX  "update programs make"  ""  "update programs \(em \fLmake\fP"  ""  PAGE START
.IX  "regenerate programs make"  ""  "regenerate programs \(em \fLmake\fP"  ""  PAGE START
.SH DESCRIPTION
.LP
.B make
executes a list of shell commands associated with each
.IR target ,
typically to create or update a file of the same name.
.I makefile
contains entries that describe how to bring a target
up to date with respect to those on which it depends, which are called
.IR dependencies .
Since each dependency is a target, it may have dependencies
of its own.
Targets, dependencies, and sub-dependencies comprise a tree
structure that
.B make
traces when deciding whether or not to rebuild a
.IR target .
.LP
.B make
recursively checks each
.I target
against its dependencies, beginning with the first target entry in
.I makefile
if no
.I target
argument is supplied on the command line.
If, after processing all of its dependencies, a target file is
found either to be missing, or to be older than any of its dependencies,
.B make
rebuilds it.  Optionally with this version of
.BR make ,
a target can be treated as out-of-date when the commands used to
generate it have changed since the last time the target was built.
.LP
To build a given target,
.B make
executes the list of commands, called a
.IR rule .
This rule may be listed explicitly in the target's
makefile entry, or it may be supplied implicitly by
.BR make .
.LP
When no
.I makefile
is specified with a
.B \-f
option:
.RS
.TP 3
\(bu
If there is a file named
.B makefile
in the working directory,
.B make
uses that file.  If, however, there is an
.SM SCCS
history file
(\fB\s-1SCCS\s0/s.makefile\fP)
which is newer,
.B make
attempts to retrieve and use the most recent version.
.TP
\(bu
In the absence of the above file(s), if a file named
.B Makefile
is present in the working directory,
.B make
attempts to use it.  If there is an
.SM SCCS
history file
(\fB\s-1SCCS\s0/s.Makefile\fP)
that is newer,
.B make
attempts to retrieve and use the most recent version.
.RE
.LP
If no
.I target
is specified on the command line,
.B make
uses the first target defined in
.IR makefile .
.LP
If a
.I target
has no makefile entry, or if its entry has no rule,
.B make
attempts to derive a rule by each of the following methods, in
turn, until a suitable rule is found.  (Each method is
described under
.SM USAGE
below.)
.RS
.TP 3
\(bu
Pattern matching rules.
.TP
\(bu
Implicit rules, read in from a user-supplied makefile.
.TP
\(bu
Standard implicit rules (also known as
suffix rules), typically read in from the file
.BR /usr/include/make/default.mk .
.TP
\(bu
.SM SCCS
retrieval.
.B make
retrieves the most recent version from the
.SM SCCS
history file (if any).  See the description of the
.SB .SCCS_GET:
special-function target for details.
.TP
\(bu
The rule from the
.SB .DEFAULT:
target entry, if there is such an entry in the makefile.
.RE
.LP
If there is no makefile entry for a
.IR target ,
if no rule can be
derived for building it, and if no file by that name is present,
.B make
issues an error message and halts.
.SH OPTIONS
.TP
.BI \-f " makefile"
Use the description file
.IR makefile .
A
.RB ` \- '
as the
.I makefile
argument denotes the standard input.
The contents of
.IR makefile ,
when present, override the standard set of implicit rules and
predefined macros.  When more than one
.RB ` "\-f \fI\ makefile\fP" '
argument pair appears,
.B make
uses the concatenation of those files, in order of appearance.
.TP
.B \-d
Display the reasons why
.B make
chooses to rebuild a target;
.B make
displays any and all dependencies that are newer.
In addition,
.B make
displays options read in from the
.SB MAKEFLAGS
environment variable.
.TP
.B \-dd
Display the dependency check and processing in vast detail.
.TP
.B \-D
Display the text of the makefiles read in.
.TP
.B \-DD
Display the text of the makefiles,
.B default.mk
file, the state file, and all hidden-dependency reports.
.TP
.B \-e
Environment variables override assignments within makefiles.
.TP
.B \-i
Ignore error codes returned by commands.  Equivalent to the
special-function target
.RB ` \s-1.IGNORE:\s0 '.
.TP
.B \-k
When a nonzero error status is returned by a rule, or when
.B make
cannot find a rule,
abandon work on the current target, but continue with other dependency
branches that do not depend on it.
.\".TP
.\".B \-l
.\"Loop through targets interactively.
.\".B make
.\"reads the makefile, and requests a target to build.  When
.\"finished with a target,
.\".B make
.\"requests another, until you respond with
.\".BR quit .
.TP
.B \-n
No execution mode.
Print commands, but do not execute them.
Even lines beginning with an
.B @
are printed.  However, if a command line contains a reference to the
.B $(\s-1MAKE\s+1)
macro, that line is always executed (see the discussion of
.SB MAKEFLAGS
in
.BR "Reading Makefiles and the Environment" ).
.\".TP
.\".B \-N
.\"Override
.\".B \-n
.\"to force execution.
.TP
.B \-p
Print out the complete set of macro
definitions and target descriptions.
.\".TP
.\".B \-P
.\"Report dependencies for the target or targets, without rebuilding them.
.TP
.B \-P
Merely report dependencies, rather than building them.
.TP
.B \-q
Question mode.
.B make
returns a zero or nonzero status code
depending on whether or not the target file is up to date.
.TP
.B \-r
Do not read in the default makefile,
.BR /usr/include/make/default.mk .
.\".TP
.\".B \-R
.\"Do not distribute targets nor build in parallel.  Normally, if the
.\".BI .make.machines
.\"file is found in your home directory, the machines defined in that file are
.\"used to rebuild targets that require it.
.TP
.B \-s
Silent mode.
Do not print command lines before executing them.
Equivalent to the special-function target
.RB ` \&.\s-1SILENT:\s0 '.
.TP
.B \-S
Undo the effect of the
.B \-k
option.
Stop processing when a non-zero exit status is returned
by a command.
.TP
.B \-t
Touch the target files (bringing them up
to date) rather than performing
their rules.
.ft I
This can be dangerous when files are
maintained by more than one person.
.ft R
When the
.SB \&.KEEP_STATE:
target appears in the makefile, this option updates the state
file just as if the rules had been performed.
.\".TP
.\".B \-w
.\"Report the working directory if a fatal error occurs.  This comes in
.\"handy for debugging recursive makefiles.
.\".TP
.\".B \-ww
.\"Report the working directory before running each command.
.\".TP
.\".B \-b
.\"This option has no effect, but is present for compatibility reasons.
.TP
.B \-z
Propagate
.B \-d
and
.B \-D
to nested (recursive)
.L make
commands through the
.SB MAKEFLAGS
macro.
.\".TP
.\".BI \-M " machines-file"
.\"Use the
.\".IR "machines-file"
.\"to define the set of machines to use for distributing target builds.
.\"By default,
.\".B make
.\"normally reads the file
.\".BR .make.machines
.\"in your home directory.
.TP
.IB macro = value
Macro definition.
This definition overrides any regular definition for the specified
macro within the makefile itself, or in the environment.  However,
this definition can still be overridden by conditional macro
assignments.
.SH USAGE
.LP
Refer to
.TX DMBG
and
.B make
in
.TX PUL
for tutorial information about
.B make.
.SS "Reading Makefiles and the Environment"
.LP
When
.B make
first starts, it reads the
.SB MAKEFLAGS
environment variable to obtain any the following
options specified present in its value:
.BR \-e ,
.BR \-i ,
.BR \-k ,
.BR \-l ,
.BR \-n ,
.BR \-p ,
.BR \-q ,
.BR \-r ,
.BR \-s ,
.BR \-S ,
.BR \-t ,
or
.BR \-z .
(Within the
.SB MAKEFLAGS
value, the leading
.RB ` \(em '
character for the option string is omitted.)
.B make
then reads the command line for additional
options, which also take effect.
.LP
Next,
.B make
reads in a default makefile that typically contains predefined
macro definitions, target entries for implicit rules, and
additional rules, such as the rule for retrieving
.SM SCCS
files.
If present,
.B make
uses the file
.B default.mk
in the current directory; otherwise it reads the file
.BR /usr/include/make/default.mk ,
which contains the standard definitions and rules.
.br
.ne 4
Use the directive:
.IP
.B include /usr/include/make/default.mk
.LP
in your local
.B default.mk
file to include them.
.LP
Next,
.B make
imports variables from the environment (unless the
.B \-e
option is in effect), and treats them as defined macros.  Because
.B make
uses the most recent definition it encounters, a macro definition
in the makefile normally overrides an
environment variable of the same name.
When
.B \-e
is in effect, however, environment variables are read in
.I after
all makefiles have been read.
In that case, the environment variables
take precedence over definitions in the makefile.
.LP
Next,
.B make
reads the state file,
.B .make.state
in the local directory if it exists, and then
any makefiles you specify with
.BR \-f ,
or one of
.B makefile
or
.B Makefile
as described above.
.LP
Next, (after reading the environment if
.B \-e
is in effect),
.B make
reads in any macro definitions supplied as command line
arguments.  These override macro definitions in the makefile
and the environment both,
but only for the
.B make
command itself.
.LP
.B make
exports environment variables, using the most recently defined value.
Macro definitions supplied on the command line are not normally
exported, unless the macro is also an environment variable.
.LP
.B make
does not export macros defined in the makefile.
If an environment variable is set, and a macro with the same name
is defined on the command line,
.B make
exports its value as defined on the command line. 
Unless
.B \-e
is in effect, macro definitions within
the makefile take precedence over
those imported from the environment.
.LP
The macros
.BR \s-1MAKEFLAGS\s0 ,
.SM
.BR MAKE ,
.SM
.BR KEEP_STATE ,
.SM
.BR SHELL ,
.SM
.BR HOST_ARCH ,
.SM
.BR TARGET_ARCH ,
.SM
.BR HOST_MACH ,
and
.SM
.BR TARGET_MACH
are special cases. 
See
.B Special-Purpose Macros
below, for details.
.SS "Makefile Target Entries"
.LP
A target entry has the following format:
.RS
.HP
.IR target .\|.\|.
.RB [ : \||\| :: ]
.RI [ dependency "] .\|.\|."
.RB [ ;
.IR command "] .\|.\|."
.nf
.RI [ command ]
\&.\|.\|.
.fi
.RE
.LP
The first line contains the name of a target, or a space-separated
list of target names, terminated with a colon
or double colon.  If a list of targets is given, this is
equivalent to having a separate entry of the same form
for each target.
The colon(s) may be followed by a
.IR dependency ,
or a dependency list.
.B make
checks this list before building the target.
The dependency list may be terminated with a semicolon
.RB ( ; ),
which in turn can be followed by a single Bourne shell command.
Subsequent lines in the target entry begin with a
.SM TAB\s0,
and contain Bourne shell commands.
These commands comprise the rule for building the target.
.LP
Shell commands may be continued across input lines by escaping the
.SM NEWLINE
with a backslash
.RB ( \e ).
The continuing line must also start with a
.SM TAB\s0.
.LP
To rebuild a target,
.B make
expands macros, strips off initial
.SM TAB\s0
characters and either executes the command directly (if it contains no
shell metacharacters), or passes each command line to a Bourne shell
for execution.
.LP
The first line that does not begin with a
.SM TAB
or
.B #
begins another target or macro definition.
.SS "Makefile Special Characters"
.SS \fIGlobal\fP
.LP
.TP
.B #
Start a comment.  The comment ends at the next
.SM NEWLINE\s0.
If the
.B #
follows the
.SM TAB
in a command line, that line is passed to the shell (which also treats
.B #
as the start of a comment).
.TP
.BI include " filename"
If the word
.B include
appears as the first seven letters of a line and is followed by a
.SM SPACE
or
.SM TAB\s0,
the string that follows
is taken as a filename to interpolate at that line.
.B include
files can be nested to a depth of no more than about 16.  If
.I filename
is a macro reference, it is expanded.
.br
.ne 5
.SS "\fITargets and Dependencies\fR"
.LP
.TP
.B :
Target list terminator.
Words following the colon are
added to the dependency list for the target or targets. 
If a target is named in more than one colon-terminated target entry,
the dependencies for all its entries are added to form that
target's complete dependency list.
.br
.ne 7
.TP
.B ::
Target terminator for alternate dependencies.
When used in place of a
.RB ` : '
the double-colon allows a target
to be checked and updated with respect
to alternate dependency lists.  When the target is out-of-date
with respect to dependencies listed in the first alternate, it is built
according to the rule for that entry. 
When out-of-date with respect to dependencies in another alternate,
it is built according the rule in that other entry.
Implicit rules do not apply to double-colon targets;
you must supply a rule for each entry.  If no dependencies are
specified, the rule is always performed.
.HP
.I target
.RB [ "+ "
.IR target .\|.\|.\|]
.B :
.br
Target group.
The rule in the target entry builds all the indicated targets as a
group.  It is normally performed only once per
.B make
run, but is checked for command dependencies every time a target
in the group is encountered in the dependency scan.
.TP
.B %
Pattern matching wild card metacharacter.  Like the
.B *
shell wild card,
.B %
matches any string of zero or more characters in a
target name or dependency, in the target portion of a
conditional macro definition, or within a pattern replacement macro
reference.  Note: only one
.B %
can appear in a target, dependency-name, or pattern-replacement macro
reference.
.SS "\fIMacros\fR"
.LP
.TP
.B =
Macro definition.
The word to the left of this character is
the macro name; words to the right comprise its value.
Leading and trailing white space characters are stripped from
the value.
A word break following the
.B =
is implied.
.TP
.B $
Macro reference.
The following character, or the parenthesized or
bracketed string, is interpreted as a macro reference:
.B make
expands the reference (including the
.BR $ )
by replacing it with the macro's value.
.TP
.PD 0
.B ( )
.TP
.B { }
Macro-reference name delimiters. 
A parenthesized or bracketed word appended to a
.B $
is taken as the name of the macro being referred to.
Without the delimiters,
.B make
recognizes only the first character as the macro name.
.PD
.TP
.B $$
A reference to the dollar-sign macro, the value of which is the
character
.RB ` $ '.
Used to pass variable expressions beginning with
.B $
to the shell, to refer to environment variables which are expanded by
the shell, or to delay processing of dynamic macros within the
dependency list of a target, until that target is actually processed.
.TP
.B \e$
Escaped dollar-sign character.  Interpreted as a literal dollar sign
within a rule.
.TP
.B +=
When used in place of
.RB ` = ',
appends a string to a macro definition (must be surrounded by
white space, unlike
.RB ` = ').
.TP
.B :=
Conditional macro assignment.
When preceded by a list of
targets with explicit target entries, the
macro definition that follows takes effect when processing only those
targets, and their dependencies.
.SS \fIRules\fR
.LP
.TP
.B \- 
.B make
ignores any nonzero error code returned by a command line for which the
first non-\s-1TAB\s0 character is a
.RB ` \- '.
This character is not passed to the shell
as part of the command line.
.B make
normally terminates when a command returns
nonzero status, unless the
.B \-i
or
.B \-k
options, or the
.SB \&.IGNORE:
special-function target is in effect.
.TP
.B @
If the first non-\s-1TAB\s0 character is a
.BR @ ,
.B make
does not print the command line before executing it.
This character is not passed to the shell.
.TP
.B ?
Escape command-dependency checking.
Command lines starting with this
character are not subject to command dependency checking.
.TP
.B !
Force command-dependency checking. 
Command-dependency checking
is applied to command lines for which it
would otherwise be suppressed.
This checking is normally suppressed for lines that contain
references to the
.RB ` ? '
dynamic macro (for example,
.RB ` $? ').
.\".TP
.\".BI = macro = value
.\"Delayed macro definition.
.\"Temporarily defines
.\".I macro
.\"to have the given
.\".I value
.\"for all targets that are subsequently processed.
.LP
When any combination of
.RB ` \- ',
.RB ` @ ',
.RB ` ? ',
or
.RB ` ! '
.\".RB ` = ',
appear as the first characters after the
.SM TAB\s0,
all that are present apply.  None are passed to the shell.
.br
.ne 5
.SS "Special-Function Targets"
.LP
When incorporated in a makefile, the following target names perform
special-functions:
.\".TP 12
.\".SB \&.AR_REPLACE
.\"This target can be used to specify a rule to preprocess
.\"member files before updating an
.\".BR ar (1V)
.\"library.
.TP
.SB \&.DEFAULT:
If it has an entry in the makefile,
the rule for this target is used to
process a target when there is no other entry for it, no rule for
building it, and no
.SM SCCS
history file from which to retrieve a current version.
.B make
ignores any dependencies for this target.
.br
.ne 3
.TP
.SB \&.DONE:
If defined in the makefile,
.B make
processes this target and its dependencies
after all other targets are built.  This target is also performed 
when
.B make
halts with an error, unless the
.SB \&.FAILED
target is defined.
.TP
.SB \&.FAILED:
This target, along with its dependencies, is performed instead of
.SB \&.DONE
when defined in the makefile and
.B make
halts with an error.
.TP
.SB \&.IGNORE:
Ignore errors.
When this target appears in the makefile,
.B make
ignores non-zero error codes returned from commands.
.TP
.SB \&.INIT:
If defined in the makefile, this target and its dependencies are
built before any other targets are processed.
.TP
.SB \&.KEEP_STATE:
If this target appears in the makefile,
.B make
updates the state file,
.BR .make.state ,
in the current directory.  This target
also activates command dependencies, and hidden dependency checks.
.TP
.SB \&.MAKE_VERSION:
A target-entry of the form:
.RS
.IP
.BI \&\s-1.MAKE_VERSION:\s0\0\0\s-1VERSION\-\s0 number
.RE
.IP
enables version checking.  If the version of
.B make
differs from the version indicated,
.B make
issues a warning message.
.\".TP
.\".B \&\s-1.NO_PARALLEL:\s+1
.\"List of targets not to be built in parallel with any other target.  If
.\"no dependency list is given, all targets will default to non-parallel (see
.\".BR "Building Targets in Parallel" ).
.\".TP
.\".B \&\s-1.PARALLEL:\s+1
.\"List of targets to be built in parallel.  This can be used to indicate
.\"that some nested invocations of
.\".B make
.\"should run in parallel, or that some targets should be built in parallel
.\"after a
.\".SB .NO_PARALLEL:
.\"target has caused all targets to default to non-parallel (see
.\".BR "Building Targets in Parallel" ).
.TP
.B \&\s-1.PRECIOUS:\s+1
List of files not to delete.
.B make
does not remove any of the files listed as dependencies for this
target when interrupted.
.B make
normally removes the current target when it receives an interrupt.
.TP
.SB \&.SCCS_GET:
This target contains the rule for retrieving the current version
of an
.SM SCCS
file from its history file.  To suppress automatic retrieval,
add an entry for this target with an empty rule to your makefile.
.TP
.SB \&.SILENT:
Run silently. 
When this target appears in the makefile,
.B make
does not echo commands before executing them.
.TP
.SB \&.SUFFIXES:
The suffixes list for selecting implicit rules (see
.BR "The Suffixes List" ).
.br
.ne 5
.\".TP
.\".SB \&.WAIT:
.\"When this special target appears in a dependency list and the dependents
.\"are being built in parallel, all dependents prior to the
.\".SB \&.WAIT
.\"target are finished before continuing with the dependency list.  This is
.\"used when some dependents must be completely built before others are
.\"started (see
.\".BR "Building Targets in Parallel" ).
.br
.ne 8
.SS "\fIClearing Special Targets\fP"
In this version of
.BR make ,
you can clear the definition of the following special targets by
supplying entries for them with no dependencies and no rule:
.LP
.RS
.SM
.BR .DEFAULT ,\ 
.SM
.BR .DONE ,\ 
.SM
.BR .FAILED ,\ 
.SM
.BR .INIT ,\ 
.SM
.BR .SCCS_GET ,\ 
and
.SM
.BR .SUFFIXES
.ps
.ft B
.ft
.RE
.SS Command Dependencies
.LP
When the
.SB .KEEP_STATE:
target appears in the makefile,
.B make
checks the command for building a target against the state file,
.BR \&.make.state .
If the command has changed since the last
.B make
run,
.B make
rebuilds the target.
.SS Hidden Dependencies
.LP
When the
.SB .KEEP_STATE:
target appears in the makefile,
.B make
reads reports from
.BR cpp (1)
and other compilation processors for any \(lqhidden\(rq files, such as
.B #include
files.  If the target is out of date with
respect to any of these files,
.B make
rebuilds it.
.\".SS "Symbolic Link Support"
.\".LP
.\".B make
.\"recognizes a target entry of the form:
.\".IP
.\".IB target ": \&\s-1.SYM_LINK_TO\s0 " dependency-file
.\".LP
.\"as an entry to maintain
.\".I target
.\"as a symbolic link to
.\".IR dependency-file .
.\".SB \&.SYM_LINK_TO
.\"is a special dependency that is only meaningful when it appears
.\"first in the dependency list, followed by a single
.\".IR dependency-file .
.\".B make
.\"processes
.\".I dependency-file
.\"as a normal dependency.  If
.\".I target
.\"exists and is not a symbolic link to
.\".IR dependency-file ,
.\".B make
.\"issues an error message and stops.
.\"If there is a rule in the target entry,
.\".B make
.\"issues a warning and ignores that rule.
.SS Macros
.LP
Entries of the form
.IP
.IB macro = value
.LP
define macros.
.I macro
is the name of the macro, and
.IR value ,
which consists of all characters up to a
comment character or unescaped
.SM NEWLINE\s0,
is the value.
.B make
strips both leading and trailing white space in accepting the value.
.LP
Subsequent references to the macro, of the forms:
.BI $( name )
or
.BI ${ name }
are replaced by
.IR value .
The parentheses or brackets can be omitted in a reference to a
macro with a single-character name.
.LP
Macro references can contain references
to other macros, in which case
nested references are expanded first.
.\"On lines in which the first
.\"character is a
.\".BR ! ,
.\"references contained in the definition are evaluated just before an
.\"initial assignment (as the makefile is being read).
.SS "\fISuffix Replacement Macro References\fR"
.LP
Substitutions within macros can be made as follows:
.IP
.BI $( name : string1 = string2)
.LP
where
.I string1
is either a suffix, or a word to be replaced in the macro
definition, and
.I string2
is the replacement suffix or word.  Words in a macro value are
separated by
.SM SPACE\s0,
.SM TAB\s0,
and escaped
.SM NEWLINE
characters.
.SS "\fIPattern Replacement Macro References\fR"
.LP
Pattern matching replacements can also be applied to macros, with a
reference of the form:
.sp .5
.RS
.BI $( name :
.IB op % os =
.IB np % ns )
.RE
.LP
where
.I op
is the existing (old) prefix and
.I os
is the existing (old) suffix,
.I np
and
.I ns
are the new prefix and new suffix, respectively, and the pattern
matched by
.BR %
(a string of zero or more characters),
is carried forward from the value
being replaced.  For example:
.sp .5
.RS
.nf
.ft B
\s-1PROGRAM\s0=fabricate
\s-1DEBUG\s0= $(\s-1PROGRAM\s0:%=tmp/%\-g)
.fi
.ft R
.RE
.LP
sets the value of
.SB DEBUG
to
.BR tmp/fabricate\-g .
.LP
Note: pattern replacement macro references cannot be used
in the dependency line of a pattern matching rule; the
.B %
characters are not evaluated independently.
.br
.ne 5
.SS "\fIAppending to a Macro\fR"
.LP
Words can be appended to macro values as follows:
.IP
.IB macro " += " "word .\|.\|."
.SS "Special-Purpose Macros"
.LP
When the
.SB MAKEFLAGS
variable is present in the environment,
.B make
takes options from it,
in combination with options entered on the command line.
.B make
retains this combined value as the
.SB MAKEFLAGS
macro, and exports it automatically to
each command or shell it invokes.
.LP
Note: flags passed by way of
.SB MAKEFLAGS
are only displayed when the
.BR \-d ,
or
.B \-dd
options are in effect.
.LP
The
.SB MAKE
macro is another special case.  It has the value
.B make
by default, and temporarily overrides the
.B \-n
option for any line in which it is referred to.
This allows nested invocations of
.B make
written as:
.IP
.BR $(\s-1MAKE\s0) " .\|.\|."
.LP
to run recursively, with the
.B \-n
flag in effect for all commands but
.B make.
This lets you use
.RB ` "make \-n" '
to test an entire hierarchy of makefiles.
.LP
For compatibility with the 4.2
.SM BSD
.BR make ,
the
.SB MFLAGS
macro is set from the
.SB MAKEFLAGS
variable by prepending a
.RB ` \- '.
.SB MFLAGS
is not exported automatically.
.LP
The
.SB SHELL
macro, when set to a single-word value such as
.BR /usr/bin/csh ,
indicates the name of an alternate shell to use.  The default is
.BR /bin/sh .
Note:
.B make
executes commands that contain no shell metacharacters itself.
Built-in commands, such as
.BR dirs
in the C shell, are not recognized unless the command line includes a
metacharacter (for instance, a semicolon).  This macro is neither
imported from, nor exported to the environment, regardless of
.BR \-e .
To be sure it is set properly,
you must define this macro within every
makefile that requires it.
.LP
The
.SB KEEP_STATE
environment variable has the same effect as the
.SB .KEEP_STATE:
special-function target.  It enables command dependencies, hidden
dependencies and writing of the state file.
.br
.ne 10
.LP
The following macros are provided for use with
cross-compilation:
.LP
.TP
.B HOST_ARCH
The machine architecture of the host system.  By default, this is the
output of the
.BR arch (1)
command
prepended with
.RB ` \(em '.
Under normal circumstances, this value should never be
altered by the user.
.TP
.B TARGET_ARCH
The machine architecture of the target system.  By default, the
output of
.BR arch ,
prepended with
.RB ` \(em '.
.TP
.B HOST_MACH
The machine architecture of the host system.  By default, this is the
output of the
.BR mach (1),
prepended with
.RB ` \(em '.
Under normal circumstances, this value should never be altered
by the user.
.TP
.B TARGET_MACH
The machine architecture of the target system.  By default, the
output of
.BR mach ,
prepended with
.RB ` \(em '.
.SS Dynamic Macros
.LP
There are several dynamically maintained macros that are useful
as abbreviations within rules.  They are shown here as references;
if you were to define them,
.B make
would simply override the definition.
.TP
.B $*
The basename of the current target, derived as if selected for
use with an implicit rule.  In the case of
pattern matching rules, the value is the string matched by the
.RB ` % '.
.TP
.B $<
The name of a dependency file, derived as if selected for
use with an implicit rule.
.TP
.B $@
The name of the current target.
.br
.ne 5
.TP
.B $?
The list of dependencies that are newer than the target.
Command-dependency checking is automatically
suppressed for lines that
contain this macro, just as if the command had been prefixed
with a
.RB ` ? '.
See the description of
.RB ` ? ',
under
.BR "Makefile Special Tokens" ,
above.  You can force this check with the
.B !
command-line prefix.
.TP
.B $%
The name of the library member being processed.  (See
.BR "Library Maintenance" ,
below.)
.LP
To refer to a dynamic macro within a dependency list,
precede the reference with an additional
.RB ` $ '
character (for example,
.RB ` $$@ ').
Because
.B make
assigns
.B $<
and
.B $*
as it would for implicit rules (according to the suffixes list and
the directory contents), they may be unreliable when used within
explicit target entries.
.LP
These macros
can be modified to apply either to the filename part, or the
directory part of the strings they stand for, by adding an
upper case
.B F
or
.BR D ,
respectively (and enclosing the resulting name in parentheses or
braces).  Thus,
.RB ` $(@D) '
refers to the directory part of the string
.RB ` $@ ';
if there is no directory part,
.RB ` \&. '
is assigned.
.B $(@F)
refers to the filename part.
.SS Conditional Macro Definitions
.LP
A macro definition of the form:
.IP
.IB "target-list " ":= " "macro " "= " value
.LP
indicates that when processing any of the targets listed
.I "and their dependencies" ,
.I macro
is to be set to the
.I value
supplied.  Note that if a conditional macro is referred to in a
dependency list, the
.B $
must be delayed (use
.B $$
instead).  Also,
.I target-list
may contain a
.B %
pattern, in which case the macro will be conditionally defined
for all targets encountered that match the pattern.  A pattern
replacement reference can be used within the
.IR value .
.LP
You can temporarily append to a macro's value with a condtional
definition of the form:
.IP
.IB "target-list " ":= " "macro " "+= " value
.SS "Predefined Macros"
.LP
.B make
supplies the macros shown in the table that follows for compilers and
their options, host architectures, and other commands.
Unless these macros are read in as environment variables,
their values are not exported by
.BR make .
If you run
.B make
with any of these set in the environment, it is a good idea to add
commentary to the makefile to indicate what value each is
expected to take.
If
.B \-r
is in effect,
.B make
does not supply these macro definitions.
.br
.ne 10
.\" === troff version of table ============
.br
.if n .ig IG
.ne 7.75i
.ps -1
.vs -1
.TS
box expand ;
cfI s s
cfI | cfI | cfI
lfI | lfB | lfB .
Table of Predefined Macros
_
Use  	Macro	Default Value
_
Library 	\s-1AR\s0	ar
Archives	\s-1ARFLAGS\s0	rv
_
Assembler	\s-1AS\s0	as
Commands	\s-1ASFLAGS\s0	
 	\s-1COMPILE\s0.s	$(\s-1AS\s0)\ \ $(\s-1ASFLAGS\s0)\ \ $(\s-1TARGET_MACH\s0)
 	\s-1COMPILE\s0.S	$(\s-1CC\s0)\ \ $(\s-1ASFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1TARGET_MACH\s0) \-c
_
C Compiler	\s-1CC\s0	cc
Commands	\s-1CFLAGS\s0	
	\s-1CPPFLAGS\s0	
 	\s-1COMPILE\s0.c	$(\s-1CC\s0)\ \ $(\s-1CFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) \-c
	\s-1LINK\s0.c    	$(\s-1CC\s0)\ \ $(\s-1CFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1LDFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) 
_
\s-1FORTRAN\s0 77	\s-1FC\s0	f77
Compiler	\s-1FFLAGS\s0	
 Commands	\s-1COMPILE\s0.f	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) \-c
	\s-1LINK\s0.f    	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)\ \ $(\s-1LDFLAGS\s0)
 	\s-1COMPILE.F\s0	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) \-c
	\s-1LINK.F\s0    	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1LDFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) 
_
Link Editor	\s-1LD\s0	ld
Command	\s-1LDFLAGS\s0	
_
lex 	\s-1LEX\s0	lex
Command	\s-1LFLAGS\s0	
	\s-1LEX\s0.l    	$(\s-1LEX\s0)\ \ $(\s-1LFLAGS\s0) \-t
_
lint	\s-1LINT\s0	lint
Command	\s-1LINTFLAGS\s0	
 	\s-1LINT\s0.c	$(\s-1LINT\s0)\ \ $(\s-1LINTFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)
_
Modula 2	\s-1M2C\s0	m2c
Commands	\s-1M2FLAGS\s0	
	\s-1MODFLAGS\s0	
	\s-1DEFFLAGS\s0	
	\s-1COMPILE\s0.def	$(\s-1M2C\s0)\ \ $(\s-1M2FLAGS\s0)\ \ $(\s-1DEFFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)
	\s-1COMPILE\s0.mod	$(\s-1M2C\s0)\ \ $(\s-1M2FLAGS\s0)\ \ $(\s-1MODFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)
_
Pascal  	\s-1PC\s0	pc
Compiler	\s-1PFLAGS\s0	
Commands	\s-1COMPILE\s0.p	$(\s-1PC\s0)\ \ $(\s-1PFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) \-c
	\s-1LINK\s0.p	$(\s-1PC\s0)\ \ $(\s-1PFLAGS\s0)\ \ $(\s-1CPPFLAGS\s0)\ \ $(\s-1LDFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)
_
Ratfor  	\s-1RFLAGS\s0	
Compilation	\s-1COMPILE\s0.r	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1RFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0) \-c
Commands	\s-1LINK\s0.r	$(\s-1FC\s0)\ \ $(\s-1FFLAGS\s0)\ \ $(\s-1RFLAGS\s0)\ \ $(\s-1TARGET_ARCH\s0)\ \ $(\s-1LDFLAGS\s0)
_
rm	\s-1RM\s0	rm\ \-f
Command 	\^	\^
_
sccs	\s-1SCCSFLAGS\s0
Command	\s-1SCCSGETFLAGS\s0	\-s
_
yacc	\s-1YACC\s0	yacc
Command       	\s-1YFLAGS\s0	
	\s-1YACC\s0.y	$(\s-1YACC\s0)\ \ $(\s-1YFLAGS\s0)
_
Suffixes	\s-1SUFFIXES\s0	T{
.nf
\&.o .c .c~ .s .s~ .S .S~ .ln .f .f~ .F .F~ .l
\&.l~ .mod .mod~ .sym .def .def~ .p .p~ .r .r~
\&.y .y~ .h .h~ .sh .sh~ .cps .cps~
.fi
T}
List	\^	\^
.TE
.br
.ps +1
.vs +1
.DT
.IG
.\" === end troff version ======
.\" ====nroff version ==========
.if t .ig IG
.cs R 20
.nf
\&                 Table of Predefined Macros
.sp
\&     Use     Macro             Default Value
.sp
Library       AR           ar
Archives      ARFLAGS      rv
.sp
Assembler     AS           as
Commands      ASFLAGS
\&              COMPILE.s    $(AS) $(ASFLAGS) $(TARGET_MACH)
\&              COMPILE.S    $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c
.sp 
C   Compiler  CC           cc
Commands      CFLAGS
\&              CPPFLAGS
\&              COMPILE.c    $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
\&              LINK.c       $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
\&                                $(TARGET_ARCH)
.sp 
FORTRAN 77    FC           f77
Compiler      FFLAGS
Commands      COMPILE.f    $(FC) $(FFLAGS) $(TARGET_ARCH) -c
\&              LINK.f       $(FC) $(FFLAGS) $(TARGET_ARCH) $(  LDFLAGS)
\&              COMPILE.F    $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
\&              LINK.F       $(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS)
\&                                $(TARGET_ARCH)
.sp
Link Editor   LD           ld
Command       LDFLAGS
.sp
lex           LEX          lex
Command       LFLAGS
\&              LEX.l        $(LEX) $(LFLAGS) -t
.sp
lint          LINT         lint
Command       LINTFLAGS
\&              LINT.c       $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)
.sp
Modula 2      M2C          m2c
Commands      M2FLAGS
\&              MODFLAGS
\&              DEFFLAGS
\&              COMPILE.def  $(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH)
\&              COMPILE.mod  $(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH)
.sp
Pascal        PC           pc
Compiler      PFLAGS
Commands      COMPILE.p    $(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
\&              LINK.p       $(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS)
\&                                $(TARGET_ARCH)
.sp
Ratfor        RFLAGS
Compilation   COMPILE.r    $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c
Commands      LINK.r       $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH)
\&                                $(LDFLAGS)
.sp
rm            RM           rm -f
Command
.sp
sccs          SCCSFLAGS
Command       SCCSGETFLAGS -s
.sp
yacc          YACC         yacc
Command       YFLAGS
\&              YACC.y       $(YACC) $(YFLAGS)
.sp
Suffixes      SUFFIXES     .o .c .c~ .s .s~ .S .S~ .ln .f .f~ .F .F~ .l
List                       .l~ .mod .mod~ .sym .def .def~ .p .p~ .r .r~
\&                           .y .y~ .h .h~ .sh .sh~ .cps .cps~
.cs R
.fi
.IG
.\" === end nroff version ======
.br
.ne 12
.SS Implicit Rules
.LP
When a target has no entry in the makefile,
.B make
attempts to determine its class (if any) and apply the rule for
that class.  An implicit rule describes how to build any target
of a given class, from an associated dependency file.  The class
of a target can be determined either by a pattern, or by a suffix;
the corresponding dependency file (with the same basename) from
which such a target might be built.  In addition to a predefined set
of implicit rules, make allows you to define your own, either by
pattern, or by suffix.
.SS "\fIPattern Matching Rules\fR"
.LP
A target entry of the form:
.RS
.TP
.IB tp\fB%\fIts\fP\|:\ \ \fIdp\fB%\fIds
.I rule
.RE
.LP
is a pattern matching rule, in which
.I tp
is a target prefix,
.I ts
is a target suffix,
.I dp
is a dependency prefix, and
.I ds
is a dependency suffix (any of which may be null).
The
.B %
stands for a basename of zero or more characters that is matched
in the target, and is used to construct the name of a dependency.  When
.B make
encounters a match in its search for an implicit rule, it
uses the rule in that target entry to build the target from
the dependency file.  Pattern-matching implicit rules typically
make use of the
.B $@
and
.B $<
dynamic macros as placeholders for the target and dependency names.
The dynamic macro
.B $*
is set to the string matched by the
.B %
wild card.  Other, regular dependencies may occur in the
dependency list.  An entry of the form:
.IP
\fItp\|\fB%\fIts\fB\|:\ \ 
\fR[\fIdependency .\|.\|.\fR\|]\ \ 
\fIdp\|\fB%\fIds\fR\ \ 
\fR[\fIdependency .\|.\|.\fR\|] \ \ 
.br
	\fIrule\fP
.LP
is a valid pattern matching rule.
.SS "\fISuffix Rules\fR"
.LP
When no pattern matching rule applies,
.B make
checks the target name to see if it ends with a suffix in the
known suffixes list.  If so,
.B make
checks for any suffix rules, as well as a dependency file
with same root and another recognized suffix, from which
to build it.
.LP
The target entry for a suffix rule takes the form:
.RS
.TP
.IB DsTs :
.br
.I rule
.RE
.LP
where
.I Ts
is the suffix of the target,
.I Ds
is the suffix of the dependency file, and
.I rule
is the rule for building a target in the class.  Both
.I Ds
and
.I Ts
must appear in the suffixes list.  (A suffix need not begin with a
.RB ` . '
to be recognized.)
.LP
A suffix rule with only one suffix describes how to build
a target having a null (or no)
suffix from a dependency file with the indicated suffix.  For instance,
the
.B \&.c
rule could be used to build an executable program named
.B file
from a C source file named
.RB ` file.c '.
.IX "make" "implicit rules, list of \(em \fB/usr/include/make/default.mk\fP"
.\" ==== begin troff version ====
.if n .ig IG
.LP
.ps -1
.vs -1
.TS
box expand ;
cfI s s
cfI | cfI | cfI
lfI | lfB | lfB .
Table of Standard Implicit (Suffix) Rules
_
Use	Implicit Rule Name	Command Line
_
Assembly	.s.o	$(\s-1COMPILE\s0.s) \-o\ \ $@ $<
	_	_
Files	.s.a	$(\s-1COMPILE\s0.s) \-o\ \ $% $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@ $%
		$(\s-1RM\s0)\ \ $%
	_	_
	.S.o	$(\s-1COMPILE\s0.S) \-o\ \ $@ $<
	_	_
	.S.a	$(\s-1COMPILE\s0.S) \-o\ \ $% $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@ $%
		$(\s-1RM\s0)\ \ $%
_
C	.c	$(\s-1LINK\s0.c) \-o\ \ $@ $< $(\s-1LDLIBS\s0)
	_	_
Files	.c.ln	$(\s-1LINT\s0.c)\ \ $(\s-1OUTPUT_OPTION\s0) \-i $<
	_	_
	.c.o	$(\s-1COMPILE\s0.c)\ \ $(\s-1OUTPUT_OPTION\s0)\ \ $<
	_	_
	.c.a	$(\s-1COMPILE\s0.c)\ \-o\ \ $% $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@ $%
		$(\s-1RM\s0)\ \ $%
_
\s-1FORTRAN\s0\ 77	.f	$(\s-1LINK\s0.f)\ \-o\ \ $@ $< $(\s-1LDLIBS\s0)
	_	_
Files	.f.o	$(\s-1COMPILE\s0.f)\ \ $(\s-1OUTPUT_OPTION\s0)\ \ $<
	_	_
	.f.a	$(\s-1COMPILE\s0.f)\ \-o\ \ $% $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@ $%
		$(\s-1RM\s0)\ \ $%
	_	_
	.F	$(\s-1LINK\s0.F)\ \-o\ \ $@ $< $(\s-1LDLIBS\s0)
	_	_
	.F.o	$(\s-1COMPILE\s0.F)\ \ $(\s-1OUTPUT_OPTION\s0)\ \ $<
	_	_
	.F.a	$(\s-1COMPILE\s0.F)\ \-o\ \ $% $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@ $%
		$(\s-1RM\s0)\ \ $%
_
lex	.l	$(\s-1RM\s0)\ \ $*.c
Files		$(\s-1LEX\s0.l)\ \ $<\ >\ $*.c
		$(\s-1LINK\s0.c) \-o\ \ $@\ $*.c $(\s-1LDLIBS\s0)
		$(\s-1RM\s0)\ \ $*.c
	_	_
	.l.c	$(\s-1RM\s0)\ \ $@
		$(\s-1LEX\s0.l)\ \ $<\ >\ $@
	_	_
	.l.ln	$(\s-1RM\s0)\ \ $*.c
		$(\s-1LEX\s0.l)\ \ $<\ >\ $*.c
		$(\s-1LINT\s0.c)\ \-o\ \ $@\ \-i\ $*.c
		$(\s-1RM\s0)\ \ $*.c
	_	_
	.l.o	$(\s-1RM\s0)\ \ $*.c
		$(\s-1LEX\s0.l)\ \ $<\ >\ $*.c
		$(\s-1COMPILE\s0.c)\ \-o\ \ $@\ $*.c
		$(\s-1RM\s0)\ \ $*.c
_
Modula 2	.mod	$(\s-1COMPILE\s0.mod)\ \-o\ \ $@\ \-e $@\ $<
Files	.mod.o	$(\s-1COMPILE\s0.mod)\ \-o\ \ $@\ $<
	.def.sym	$(\s-1COMPILE\s0.def)\ \-o\ \ $@\ $<
_
Ne\s-1WS\s0	.cps.h	cps\ $*.cps
_
Pascal	.p	$(\s-1LINK\s0.p)\ \-o\ \ $@\ $<\ $(\s-1LDLIBS\s0)
	_	_
Files	.p.o	$(\s-1COMPILE\s0.p)\ \ $(\s-1OUTPUT_OPTION\s0)\ \ $<
_
Ratfor	.r	$(\s-1LINK\s0.r)\ \-o\ \ $@\ $<\ $(\s-1LDLIBS\s0)
	_	_
Files	.r.o	$(\s-1COMPILE\s0.r)\ \ $(\s-1OUTPUT_OPTION\s0)\ \ $<
	_	_
	.r.a	$(\s-1COMPILE\s0.r)\ \-o\ \ $%\ $<
		$(\s-1AR\s0)\ \ $(\s-1ARFLAGS\s0)\ \ $@\ $%
		$(\s-1RM\s0)\ \ $%
.TE
.ps +1
.vs +1
.br
.ne 18
.ps -1
.vs -1
.TS
box expand ;
cfI s s
cfI | cfI | cfI
lfI | lfB | lfB .
Table of Standard Implicit (Suffix) Rules (continued)
_
Use	Implicit Rule Name	Command Line
_
\s-1SCCS\s0	.SCCS_GET	sccs\ $(SCCSFLAGS)\ get\ $(SCCSGETFLAGS)\ $@\ \-G$@
Files	\^	\^
_
Shell	.sh	cat $< >$@
Scripts		chmod +x $@
_
yacc	.y	$(\s-1YACC\s0.y) $<
Files		$(\s-1LINK\s0.c) \-o $@ y.tab.c $(\s-1LDLIBS\s0)
 		$(\s-1RM\s0) y.tab.c
	_	_
 	.y.c	$(\s-1YACC\s0.y) $<
		mv y.tab.c $@
	_	_
 	.y.ln	$(\s-1YACC\s0.y) $<
		$(\s-1LINT\s0.c) \-o $@ \-i y.tab.c
		$(\s-1RM\s0) y.tab.c
	_	_
 	.y.o	$(\s-1YACC\s0.y) $<
		$(\s-1COMPILE\s0.c) \-o $@ y.tab.c
		$(\s-1RM\s0) y.tab.c
.TE
.LP
.ps +1
.vs +1
.DT
.IG
.\" ====== end troff version ===
.\" =======begin nroff version =
.if t .ig IG
.cs R 20
.nf
\&         Table of Standard Implicit (Suffix) Rules
.sp
Use         Implicit  Command Line(s)
\&            Rule
.sp
Assembly     .s.o    $(COMPILE.s) -o $@ $<
Files        .s.a    $(COMPILE.s) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
\&             .S.o    $(COMPILE.S) -o $@ $<
\&             .S.a    $(COMPILE.S) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
.sp
C            .c      $(LINK.c) -o $@ $< $(LDLIBS)
Files        .c.ln   $(LINT.c) $(OUTPUT_OPTION) -i $<
\&             .c.a    $(COMPILE.c) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
.sp
FORTRAN 77  .f       $(LINK.f) -o $@ $< $(LDLIBS)
Files       .f.o     $(COMPILE.f) $(OUTPUT_OPTION) $<
\&            .f.a     $(COMPILE.f) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
\&            .F       $(LINK.F) -o $@ $< $(LDLIBS)
\&            .F.o     $(COMPILE.F) $(OUTPUT_OPTION) $<
\&            .F.a     $(COMPILE.F) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
.sp
lex         .l       $(RM) $*.c
Files                $(LEX.l) $< > $*.c
\&                     $(LINK.c) -o $@ $*.c $(LDLIBS)
\&                     $(RM) $*.c
\&            .l.c     $(RM) $@
\&                     $(LEX.l) $< > $@
\&            .l.ln    $(RM) $*.c
\&                     $(LEX.l) $< > $*.c
\&                     $(LINT.c) -o $@ -i $*.c
\&                     $(RM) $*.c
\&            .l.o     $(RM) $*.c
\&                     $(LEX.l) $< > $*.c
\&                     $(COMPILE.c) -o $@ $*.c
\&                     $(RM) $*.c
.sp
Modula 2   .mod      $(COMPILE.mod) -o $@ -e $@ $<
Files      .mod.o    $(COMPILE.mod) -o $@ $<
\&           .def.sym  $(COMPILE.def) -o $@ $<
.sp
NeWS       .cps.h    cps $*.cps
.sp
Pascal     .p        $(LINK.p) -o $@ $< $(LDLIBS)
Files      .p.o      $(COMPILE.p) $(OUTPUT_OPTION) $<
.sp
Ratfor     .r        $(LINK.r) -o $@ $< $(LDLIBS)
Files      .r.o      $(COMPILE.r) $(OUTPUT_OPTION) $<
\&           .r.a      $(COMPILE.r) -o $% $<
\&                     $(AR) $(ARFLAGS) $@ $%
\&                     $(RM) $%
.sp
SCCS       .SCCS_GET sccs $(SCCSFLAGS) get $(SCCSGETFLAGS) $@ -G$@
Files
.sp
Shell      .sh       cat $< >$@
Scripts              chmod +x $@
.sp
yacc       .y        $(YACC.y) $<
Files                $(LINK.c) -o $@ y.tab.c $(LDLIBS)
\&                     $(RM) y.tab.c
\&           .y.c      $(YACC.y) $<
\&                     mv y.tab.c $@
\&           .y.ln     $(YACC.y) $<
\&                     $(LINT.c) -o $@ -i y.tab.c
\&                     $(RM) y.tab.c
\&           .y.o      $(YACC.y) $<
\&                     $(COMPILE.c) -o $@ y.tab.c
\&                     $(RM) y.tab.c
.cs R
.fi
.IG
.\" ====== end nroff version ===
.DT
.LP
.B make
reads in the standard set of implicit rules from the file
.BR /usr/include/make/default.mk ,
unless
.B \-r
is in effect, or there is a
.B default.mk
file in the local directory that does not
.B include
that file.
.SS "The Suffixes List"
.LP
The suffixes list is given as the list of dependencies for the
.RB ` \&.\s-1SUFFIXES\s0: '
special-function target.  The default list is contained in the
.SB SUFFIXES
macro (See
.I "Table of Predefined Macros"
for the standard list of suffixes).  You can define additional
.SB .SUFFIXES:
targets; a
.SB \&.SUFFIXES
target with no dependencies clears the list of suffixes.
Order is significant within the list;
.B make
selects a rule that corresponds to the target's suffix and the first
dependency-file suffix found in the list.
To place suffixes at the head of the list, clear the list and
replace it with the new suffixes, followed by the default list:
.IP
.B \&.SUFFIXES:
.br
.B \&.SUFFIXES:
.I suffixes
.B $(\s-1SUFFIXES\s0)
.LP
A tilde
.RB ( \s+2~\s0 )
indicates that if a dependency file with the indicated suffix (minus the
.BR \s+2~\s0 )
is under
.SM SCCS
its most recent version should be retrieved, if necessary,
before the target is processed.
.SS Library Maintenance
.LP
A target name  of the form:
.IP
.IB lib ( "member .\|.\|." )
.LP
refers to a member, or a space-separated list of members, in an
.BR ar (1V)
library.
.LP
The dependency of the library member on the corresponding file must
be given as an explicit entry in the makefile.  This can be
handled by a pattern matching rule of the form:
.IP
.IB lib (% .s "): %" .s
.LP
where
.I \&.s
is the suffix of the member; this suffix is typically
.BR \&.o
for object libraries.
.LP
A target name of the form
.IP
.IB lib (( symbol ))
.LP
refers to the member of a randomized object library (see
.BR ranlib (1))
that defines the entry point named
.IR symbol .
.SS "Command Execution"
.LP
Command lines are executed one at a time,
.I "each by its own process or shell."
Shell commands, notably
.BR cd ,
are ineffectual across an unescaped
.SM NEWLINE
in the makefile.
A line is printed (after macro expansion) just before being
executed.  This is suppressed if it starts with a
.RB ` @ ',
if there is a
.RB ` \&.\s-1SILENT\s0: '
entry in the makefile, or if
.B make
is run with the
.B \-s
option.  Although the
.B \-n
option specifies printing without execution, lines containing the macro
.B $(\s-1MAKE\s0)
are executed regardless, and lines containing the
.B @
special character are printed.  The
.B \-t
(touch) option updates the modification date of a file without executing
any rules.  This can be dangerous when sources are
maintained by more than one person.
.br
.ne 10
.SS Bourne Shell Constructs
.LP
To use the Bourne shell
.B if
control structure for branching, use a command line of the form:
.RS
.sp .5
.nf
.BI if " expression " "; \e"
.BI then " command " "; \e"
	\&.\|.\|. \fB; \e\fR
.B else ; \e
	\&.\|.\|. \fB; \e\fR
.B fi
.fi
.RE
.LP
Although composed of several input lines, the escaped
.SM NEWLINE
characters insure that
.B make
treats them all as one (shell) command line.
.LP
To use the Bourne shell
.B for
control structure for loops, use a command line of the form:
.RS
.sp .5
.nf
.BI "for " var " in " list " ; \e"
.BI "	do " command "; \e"
.RB "	\&.\|.\|. "; \e"
.B done
.fi
.RE
.LP
To refer to a shell variable, use an escaped dollar-sign
.RB ( \e$ ).
This prevents expansion of the dollar-sign by
.BR make .
.br
.ne 5
.LP
To incorporate the standard output of a shell command in a macro,
use a definition of the form:
.IP
.IB \s-1MACRO\s0\| ":sh =" command
.LP
The command is executed only once, standard error output is
discarded, and
.SM NEWLINE
characters are replaced with
.SM SPACE\s0s.
If the
command has a non-zero exit status,
.B make
halts with an error.
.LP
To capture the output of a shell command in a macro reference,
use a reference of the form:
.IP
.BI $( \s-1MACRO\s0\| :sh)
.LP
where
.SM
.I MACRO
is the name of a macro containing a valid Bourne shell command line.
In this case, the command is executed whenever the reference
is evaluated.  As with shell command substitutions, the reference
is replaced with the standard output of the command.
If the
command has a non-zero exit status,
.B make
halts with an error.
.SS \fISignals\fR
.LP
.SB INT
and
.SB QUIT
signals received from the keyboard halt
.B make
and remove the target file being processed
unless that target is in the dependency list for
.RB ` \&.\s-1PRECIOUS:\s0 '.
.\".SS Building Targets in Parallel
.\".LP
.\".B make
.\"has the ability to use multiple machines on a network to build multiple
.\"targets in parallel.  Normally
.\".B make
.\"will build targets serially as usual.  However, if the
.\".IR "machines-file"
.\"is provided,
.\".B make
.\"will use the hosts defined in that file to build multiple targets in
.\"parallel.
.\".SS "\fISetting Up the Remote Machines\fR"
.\".LP
.\"The user must ensure that the remote machines are properly set up for
.\"use by
.\".BR make .
.\"The remote machines must be running the same release of the operating system
.\"as the local machine.  The
.\".B make
.\"user must be able to log in to each of the remote machines (see
.\".BR passwd (5)).
.\"Normally, the
.\".BR rexd (8C)
.\"server is used to invoke the commands for the target on the remote machine
.\"and must be active (see the
.\".SB REMOTE_COMMAND
.\"macro, described below).  The
.\".BR rstatd (8C)
.\"server is used to monitor the load on the remote machine and must be
.\"active.  Both of these servers are defined in the
.\".BR /etc/inetd.conf
.\"file
.\".BR ( inetd.conf (5)).
.\"It is also important that any files outside of the current directory (such
.\"as include files and libraries) exist on the remote machines and be the same
.\"versions.  For best results, be sure to mount the directory in
.\"which the build is to occur in the same location (pathname) on all
.\"remote machines.
.\".SS "\fIThe \fB.make.machines\fP File"
.\"The
.\".B .make.machines
.\"file is used to define the set of hosts to be used for building targets.
.\"The home directory is searched for this file unless the
.\".B \-M
.\"option is given.  This file consists of names of hosts, one per
.\"line, to be used in the parallel building of the targets.
.\"If the local host is to be utilized, it must be in this list.
.\"Even if you use only the local host for building,
.\"performing multiple builds usually results in faster builds.
.\".LP
.\"Options can be specified for each host of the form
.\".I option
.\"or
.\".IR option = value . 
.\"The only option now available is
.\".B max
.\"whose value indicates the maximum number of simultaneous 
.\"builds to run on that host.
.\"The default value is 2.
.\"The load of each host is monitored by
.\".B make
.\"using
.\".BR rstat (8C)
.\"and when the short term load average exceeds the maximum number of builds
.\"allowed for that host, the maximum number of builds for that host is
.\"temporarily decreased.
.\"For example, if a host is limited to 3 builds in the
.\".B .make.machines
.\"file and the load exceeds 3.0,
.\".B make
.\"will temporarily decrease the number of builds on that host until the
.\"load goes down.
.\"This would normally be necessary if multiple
.\".B makes
.\"were using the same host for remote builds.
.\".br
.\".ne 5
.\".\".SS "\fIOutput from \fBmake\fR"
.\"When targets are built in parallel, the output from each is collected
.\"in a file and
.\"then displayed when the target build is complete.
.\"This is to prevent the output of multiple builds from becoming intermixed.
.\"There is no guarantee that the output parallel builds will come out
.\"in the normal serial order; targets that appear later in the
.\"makefile may finish ahead of ``earlier'' ones. 
.\"This means that no output will be seen from the
.\"rule until it completes.
.\".br
.\".ne 5
.\".SS "\fILimitations on Parallel makefiles\fR"
.\".LP
.\"Targets which will run in parallel must not modify the same files.
.\"For example, defining a suffix rule which uses a
.\"temporary file with a fixed name will fail if two
.\"targets being built in parallel use the same suffix
.\"rule, and hence simultaneously attempt to use the same temporary file.
.\"Prefix any temporary files with the name of the target being built using the
.\"dynamic macro
.\".RB ` $@ '.
.\".LP
.\"If
.\".B make
.\"started nested invocations of
.\".B make
.\"in parallel, it would be possible for two nested invocations of
.\".B make
.\"to end up in the same directory building the same targets. 
.\"To avoid this possibility, all nested invocations of
.\".B make
.\"are run serially.
.\"You can force these nested invocations to run in parallel by using
.\".SB .PARALLEL:
.\"with the nested invocation targets.
.\"Note: nested invocations of
.\".B make
.\"are only noticed when the
.\".SB $(MAKE)
.\"construct is used.
.\".LP
.\"When it is impossible or impractical to remove conflicts from some
.\"targets, the special target
.\".SB .NO_PARALLEL:
.\"can be used to mark the targets as non-parallel.
.\"Sometimes the ordering of a dependency list is critical,
.\"in that some targets must be built before others.
.\"Use the
.\".SB .WAIT
.\"target to separate these to ensure that the prior targets are built before
.\"the following ones.
.\".SS "\fIThe \fB\s-1REMOTE_COMMAND\s0\fP Macro\fR"
.\".LP
.\"The
.\".SB REMOTE_COMMAND
.\"macro can be set to the name of a program to be used
.\"to invoke the remote execution.
.\"Normally the
.\".BR on (1C)
.\"program is used, but you may substitute your own program.
.\"The program is called with the name of the host on
.\"which to execute the command, followed by the command
.\"to execute and its arguments.
.\"This program must set up an equivalent context on the
.\"remote machine including the current directory and
.\"the environment variables.
.\"The program must also handle the interrupt signal
.\".BR \s-1SIGINT\s0 .
.\".\".BR \s-1SIGSTOP\s0 ,
.\".\"and
.\".\".BR \s-1SIGCONT\s0 .
.\".SS "\fIConditional Macros and Parallel Targets\fR"
.\".LP
.\"When used with
.\".BR \s-1.KEEP_STATE\s0 ,
.\"and parallel targets,
.\"conditional macros allow the same target to be built multiple times with
.\"different macro settings (for example, building a normal and an optimized
.\"version of an object file).
.\"In order to avoid overwriting one version with
.\"another before the first version has been used (for example, building the
.\"optimized object file before the normal object file has
.\"been linked into an executable),
.\".B make
.\"delays building targets with new conditional macro values until
.\"all targets with the previous conditional macro setting have finished.
.br
.ne 7
.SH EXAMPLES
.LP
This makefile says that
.B pgm
depends on two files
.B a.o
and
.BR b.o ,
and that they in turn depend on their corresponding source files
.RB ( a.c
and
.BR b.c )
along with a common file
.BR incl.h :
.ne 8
.sp .5
.RS
.PD 0
.TP
.B pgm: a.o b.o
.B $(LINK.c) \-o $@ a.o b.o
.TP
.B a.o: incl.h a.c
.B cc \-c a.c
.TP
.B b.o: incl.h b.c
.B cc \-c b.c
.PD
.RE
.LP
The following makefile uses implicit rules to express the same
dependencies:
.sp .5
.RS
.PD 0
.TP
.B pgm: a.o b.o
.B cc a.o b.o \-o pgm
.TP
.B a.o b.o: incl.h
.PD
.RE
.br
.ne 8
.SH FILES
.PD 0
.TP 20
.B makefile
.TP
.B Makefile
current version(s) of
.B make
description file
.TP
.B SCCS/s.makefile
.TP
.B SCCS/s.Makefile
.SM SCCS
history files for the above makefile(s)
.TP
.B default.mk
default file for user-defined targets, macros, and implicit rules
.TP
.B /usr/include/make/default.mk
makefile for standard implicit rules and macros (not read if
.B default.mk
is)
.\".TP
.\".B /usr/lib/makesh
.\"program used by make to execute shell commands on a remote host
.TP
.B \&.make.state
state file in the local directory
.\".TP
.\".B \&~/.make.machines
.\"default file with list of remote machines for distributed parallel builds
.fi
.SH SEE ALSO
.BR ar (1V),
.BR cc (1V),
.BR cd (1),
.BR get (1),
.BR lex (1),
.BR ranlib (1),
.\".BR sh (1),
.\".BR inetd.conf (5),
.BR passwd (5),
.\".BR rexd (8C),
.\".BR rstat (8C),
.\".BR rstatd (8C)
.LP
.TX DMBG
.br
.TX PUL
.SH DIAGNOSTICS
.LP
.B make
returns an exit status of
.B 1
when it halts as a result of an error.
Otherwise it returns an exit status of
.BR 0 .
.LP
.TP
.BI "Do not know how to make " target ". Stop."
There is no makefile entry for
.IR target ,
and none of
.BR make 's
implicit rules apply (there is no dependency file with
a suffix in the suffixes list, or the target's suffix is not in
the list).
.br
.ne 4
.TP
.BI *** " target " removed.
.B make
was interrupted while building
.IR target .
Rather than leaving a partially-completed version
that is newer than its dependencies,
.B make
removes the file named
.IR target .
.br
.ne 3
.TP
.BI "*** " target " not removed."
.B make
was interrupted while building
.I target
and
.I target
was not present in the directory.
.br
.ne 3
.TP
.BI "*** " target " could not be removed, " reason
.B make
was interrupted while building
.IR target ,
which was not removed for the indicated reason.
.br
.ne 3
.TP
.BI "Read of include file `" file "' failed"
.br
The makefile indicated in an
.B include
directive was not found, or was inaccessible.
.TP
.BI "Loop detected when expanding macro value `" macro '
A reference to the macro being defined was found in the definition.
.TP
.BI "Could not write state file `" file '
You used the
.SB \&.KEEP_STATE:
target, but do not have write permission on the state file.
.TP
.BI "*** Error code " n
The previous shell command returned a nonzero error code.
.TP
.BI *** " signal message"
The previous shell command was aborted due to a signal.  If
.RB ` "\- core dumped" '
appears after the message, a
.B core
file was created.
.br
.ne 5
.\".TP
.\".BI "No answer from " host
.\"The host has failed to respond after several attempts, and is
.\"presumed unavailable.  Targets running on that host are aborted.
.\".TP
.\".IB "host " rebooted
.\"The host was rebooted during the run, or its system clock was reset.
.\"Targets on that host are aborted.
.\".TP
.\".B "No machines available, waiting for load to come down"
.\"The list of remote machines in
.\".B \&.make.machines
.\"does not include the local host, and the machines in that list have
.\"loads that are too high to start a new target.
.\".br
.\".ne 3
.\".TP
.\".B "No answer from any host on list, using local machine"
.\"When no remote host in the list of remote hosts responds,
.\".B make
.\"processes targets locally in serial fashion.
.\".TP
.\".B "Host responded, not running local anymore"
.\"A remote machine listed in
.\".B \&.make.machines
.\"has responded;
.\".B make
.\"resumes parallel procesing.
.TP
.B "Conditional macro conflict encountered"
Displayed only when
.B \-d
is in effect, this message indicates that two or more parallel targets
currently being processed depend on a target which is built differently
for each by virtue of conditional macros.  Since the target cannot
simultaneously satisfy both dependency relationships, it is conflicted.
.\"Targets with different variants of the same dependency should be built
.\"\s-1\fB.NO_PARALLEL\s0\fP.
.SH BUGS
.LP
Some commands return nonzero status inappropriately; 
to overcome this difficulty, prefix the offending command line in
the rule with a 
.RB ` \- '.
.LP
Filenames with the characters
.RB ` = ',
.RB ` : ',
or
.RB ` @ ',
do not work.
.LP
You cannot build
.B file.o
from
.BR lib(file.o) .
.LP
Options supplied by
.SB MAKEFLAGS
should be reported for nested
.B make
commands.  Use the
.B \-d
option to find out what options the nested command picks up from
.BR \s-1MAKEFLAGS\s0 .
.LP
This version of
.B make
is incompatible in certain respects with previous versions:
.RS
.TP 3
\(bu
The
.B \-d
option output is much briefer in this version.
.B \-dd
.\".B \-ddd
now produces the equivalent voluminous output.
.TP 3
\(bu
.B make
attempts to derive values for the dynamic macros
.RB ` $* ',
.RB ` $< ',
and
.RB ` $? ',
while processing explicit targets.  It uses the same method as for
implicit rules; in some cases this can
lead either to unexpected values,
or to an empty value being assigned.  (Actually, this was true
for earlier versions as well, even though the documentation stated
otherwise.)
.TP 3
\(bu
.B make
no longer searches the current directory for
.SM SCCS
history files.
.TP 3
\(bu
Suffix replacement in macro references are now applied after the
macro is expanded.
.RE
.LP
There is no guarantee that makefiles created for this version of
.B make
will work with earlier versions.
.LP
If there is no
.B default.mk
file in the current directory, and the file
.B /usr/include/make/default.mk
is missing,
.B make
stops before processing any targets.  To force
.B make
to run anyway, create an empty
.B default.mk
file in the current directory.
.LP
Once a dependency is made,
.B make
assumes the dependency file is present for the remainder of the run.
If a rule subsequently removes that file and future targets depend on
its existence, unexpected errors may result.
.LP
When hidden dependency checking is in effect, the
.B $?
macro's value includes the names of hidden dependencies.  This
can lead to improper filename arguments to compiler commands when
.B $?
is used in a rule.
.LP
Pattern replacement macro references cannot be used in the
dependency line of a pattern matching rule.
.LP
Unlike previous versions, this version of
.B make
strips a leading
.RB ` ./ '
.\" The `/' really does belong in the previous line.
from the value of the 
.RB ` $@ '
dynamic macro.
.LP
With automatic
.SM SCCS
retrieval, this version of
.BR make
does not support tilde suffix rules.
.IX  "make command"  ""  "\fLmake\fP \(em build programs"  "" PAGE END
.IX  "programming tools"  make  ""  "\fLmake\fP \(em build programs" PAGE END
.IX  "build programs make"  ""  "build programs \(em \fLmake\fP"  ""  PAGE END
.IX  "maintain programs make"  ""  "maintain programs \(em \fLmake\fP"  ""  PAGE END
.IX  "update programs make"  ""  "update programs \(em \fLmake\fP"  "" PAGE END
.IX  "regenerate programs make"  ""  "regenerate programs \(em \fLmake\fP"  ""  PAGE END
5
.\".SS "\fILimitations on Parallel makefiles\fR"
.\".LP
.\"Targets which will run in parallel must not modify the same files.
.\"For example, defining a suffix rule which uses a
.\"temporary file with a fixed name will fail if two
.\"targets being built in parallel use the same suffix
.\"rule, and hence simultaneously attempt to use the same temporary file.
.\"Prefix any temporary files with the name of the target being built using the
.\"dynamic macro
.\".RB ` $@ '.
.\".LP
.\"If
.\".B ./share/man/man1/man.1                                                                                 755       0      12        16203  4424740675   7574                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)man.1 1.33 89/03/26 SMI; from UCB 6.2 8/7/85
.TH MAN 1 "12 January 1988"
.SH NAME
man \- display reference manual pages; find reference pages by keyword
.SH SYNOPSIS
.B man
.RB "[\|" \-  "\|]"
.RB "[\|" \-t "\|]"
.RB "[\|" \-M
.IR path "\|]"
.RB "[\|" \-T
.IR macro-package "\|]"
.RI "[\|[\|" section "\|] " title " .\|.\|.\|] .\|.\|."
.br
.B man
.RB "[\|" \-M
.IR path "\|]"
.BI \-k " keyword"
\&.\|.\|.
.br
.B man
.RB "[\|" \-M
.IR path "\|]"
.BI \-f " filename"
\&.\|.\|.
.SH DESCRIPTION
.IX man "" "\fLman\fR \(em online display of reference pages"
.IX "online reference \(em \fLman\fR"
.LP
.B man
displays information from the reference manuals.
It can display complete manual pages that you select by
.IR title ,
or one-line summaries selected either by
.I keyword
.RB ( \-k ),
or by the name of an associated file
.RB ( \-f ).
.LP
A
.IR section ,
when given, applies to the
.I titles
that follow it on the command line (up to the next
.IR section ,
if any).
.B man
looks in the indicated section of the manual for those
.IR title s.
.I section
is either a digit (perhaps followed by a single letter indicating
the type of manual page), or one of the words
.BR new ,
.BR local ,
.BR old ,
or
.BR public .
If
.I section
is omitted,
.B man
searches all reference sections
(giving preference to commands over functions)
and prints the first manual page it finds.
If no manual page is located,
.B man
prints an error message.
.LP
The reference page sources are typically located in the
.BR /usr/share/man/man?
directories.  Since these directories are optionally installed,
they may not reside on your host; you may have to mount 
.B /usr/share/man
from a host on which they do reside.
If there are preformatted, up-to-date versions in
corresponding
.B cat?
or
.B fmt?
directories,
.B man
simply displays or prints those versions.  If the preformatted
version of interest is out of date or missing,
.B man
reformats it prior to display.  If directories for the
preformatted versions are not provided, 
.B man
reformats a page whenever it is requested; it uses a temporary
file to store the formatted text during display.
.LP
If the standard output is not a terminal, or if the
.RB ` \- '
flag is given,
.B man
pipes its output through
.BR cat (1V).
Otherwise,
.B man
pipes its output through
.BR more (1)
to handle paging and underlining on the screen.
.SH OPTIONS
.TP
.B \-t
.B man
arranges for the specified manual pages to be
.BR troff ed
to a suitable raster output device (see
.BR troff (1)
or
.BR vtroff (1)).
If both the
.B \-
and
.B \-t
flags are given,
.B man
updates the
.BR troff ed
versions of each named
.I title
(if necessary), but does not display them.
.TP
.BI \-M " path"
Change the search path for manual pages.
.I path
is a colon-separated list of directories that contain manual page
directory subtrees.
For example,
.B /usr/share/man/u_man:/usr/share/man/a_man
makes
.B man
search in the standard System V locations.  When used with the
.B \-k
or
.B \-f
options,
the
.B \-M
option must appear first.  Each directory in the
.I path
is assumed to contain subdirectories of the form
.BR man[1-8l-p] .
.TP
.BI \-T " macro-package"
.B man
uses
.I macro-package
rather than the standard
.B \-man
macros defined in
.B /usr/share/lib/tmac/tmac.an
for formatting manual pages.
.TP
.BI \-k " keyword .\|.\|."
.B man
prints out one-line summaries from the
.B whatis
database (table of contents) that contain any of the given
.IR keyword s.
.TP
.BI \-f " filename .\|.\|."
.B man
attempts to locate manual pages related to any of the given
.IR filename s.
It strips the leading pathname components from each
.IR filename ,
and then prints one-line summaries containing the resulting
basename or names.
.SH "MANUAL PAGES"
.LP
Manual pages are
.BR troff (1)/ nroff (1)
source files prepared with the
.B \-man
macro package.
Refer to
.BR man (7),
or
.TX DOCS
for more information.
.LP
When formatting a manual page,
.B man
examines the first line to determine whether
it requires special processing.
.SS "Referring to Other Manual Pages"
.LP
If the first line of the manual page is a reference to another
manual page entry fitting the pattern:
.sp .5
.RS
.BI "\&.so man" "?*/ sourcefile"
.RE
.LP
.B man
processes the indicated file in place of the current one.
The reference must be expressed as
a pathname relative to to the root of
the manual page directory subtree.
.LP
When the second or any subsequent line starts with
.BR .so ,
.B man
ignores it;
.BR troff (1)
or
.BR nroff (1)
processes the request in the usual manner.
.SS "Preprocessing Manual Pages"
.LP
If the first line is a string of the form:
.IP
\fB\'\|\e"\0 \fIX\fP
.LP
where
.I X
is separated from the the
`\fB"\fP'
by a single
.SM SPACE
and consists of any combination of characters in the following list,
.B man
pipes its input to
.BR troff (1)
or
.BR nroff (1)
through the corresponding preprocessors.
.sp .5
.RS
.PD 0
.TP
.B e
.BR eqn (1),
or
.B neqn
for
.B nroff
.TP
.B r
.BR refer (1)
.TP
.B t
.BR tbl (1),
and
.BR col (1V)
for
.B nroff
.TP
.B v
.BR vgrind (1)
.PD
.RE
.LP
If
.B eqn
or
.B neqn
is invoked,
it will automatically read the file
.B /usr/pub/eqnchar
(see
.BR eqnchar (7)).
.SH ENVIRONMENT
.TP 15
.SB MANPATH
If set,
its value overrides
.B /usr/share/man
as the default search path.
(The
.B \-M
flag, in turn, overrides this value.)
.TP
.SB PAGER
A program to use for interactively delivering
.BR man 's
output to the screen.
If not set,
.RB ` "more \-s" '
(see
.BR more (1))
is used.
.TP
.SB TCAT
The name of the program to use to display
.BR troff ed
manual pages.
If not set,
.RB ` "lpr \-t" '
(see
.BR lpr (1))
is used.
.TP
.SB TROFF
The name of the formatter to use when the
.B \-t
flag is given.
If not set,
.B troff
is used.
.SH FILES
.PD 0
.TP 20
.B /usr/share/man
root of the standard manual page directory subtree
.TP
.B /usr/share/man/man?/*
unformatted manual entries
.TP
.B /usr/share/man/cat?/*
.BR nroff ed
manual entries
.TP
.B /usr/share/man/fmt?/*
.BR troff ed
manual entries
.TP
.B /usr/share/man/whatis
table of contents and keyword database
.TP
.B /usr/share/lib/tmac/tmac.an
standard
.B \-man
macro package
.TP
.B /usr/pub/eqnchar
.PD
.SH "SEE ALSO"
.\"apropos (1),	\" What happened to this man page?
.BR cat (1V),
.BR col (1V),
.BR eqn (1),
.BR lpr (1),
.BR more (1),
.BR nroff (1),
.BR refer (1),
.BR tbl (1),
.BR troff (1),
.BR vgrind (1),
.BR vtroff (1),
.BR whatis (1),
.BR eqnchar (7),
.BR man (7),
.BR catman (8)
.br
.ne 5
.SH BUGS
.LP
The manual is supposed to be reproducible
either on a phototypesetter or on an
.SM ASCII
terminal.
However,
on a terminal some information
(indicated by font changes,
for instance)
is necessarily lost.
.LP
Some dumb terminals cannot process the vertical motions produced
by the
.B e
.RB ( eqn (1))
preprocessing flag.
To prevent garbled output on these terminals,
when you use
.B e
also use
.BR t ,
to invoke
.BR col (1V)
implicitly.
This workaround has the disadvantage of eliminating superscripts and
subscripts \(em even on those terminals that can display them.
.SM CTRL-Q
will clear a terminal that gets confused by
.BR eqn (1)
output.
,
if any).
.B man
looks in the indicated section of the manual for those
.IR title s.
.I section
is either a digit (perhaps followed by a single letter indicating
the type of manual page), or one of the words
.BR new ,
.BR local ,
.BR old ,
or
.BR public .
If
.I section
is omitted,
.B man
searches all reference sections
(giving preference to commands over functions)
and prints t./share/man/man1/mc68010.1                                                                             755       0      12           66  4424740675   7737                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)mc68010.1 1.4 89/03/26 SMI;
  mesg.1 H  h    mkdir.1   x    mkstr.1       more.1        mt.1 1        mv.1 1 t      neqn.1 e      newgrp.1        nice.1       nl.1 1       nm.1 1 1       nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #  	objdump.1 H  X  $  od.1v H  p  %  old-clocktool.1     &  
old-compact.1 &    '  old-eyacc.1     (  old-filemerge.1     )  
old-make./share/man/man1/mc68020.1                                                                             755       0      12           66  4424740675   7740                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)mc68020.1 1.3 89/03/26 SMI;
 mkdir.1   x    mkstr.1       more.1 t      mt.1 ore      mv.1 t.1      neqn.1 1      newgrp.1 1 e      nice.1 1      nl.1 ice      nm.1 l.1       nohup.1v 1 1  $  !  notify.1    4  "  nroff.1   H  #  	objdump.1 1   X  $  od.1v p.  p  %  old-clocktool.1     &  
old-compact.1     '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1      *  
old-perf./share/man/man1/mesg.1                                                                                755       0      12         2025  4424740675   7731                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mesg.1 1.10 89/03/26 SMI;
.TH MESG 1  "9 September 1987"
.SH NAME
mesg \- permit or deny messages on the terminal
.SH SYNOPSIS
.B mesg
[
.B n
] [
.B y
]
.SH DESCRIPTION
.IX  "mesg command"  ""  "\fLmesg\fP \(em permit or deny messages"
.IX  messages  "permit or deny"  ""  "permit or deny \(em \fLmesg\fP"
.IX  "permit messages"  ""  "permit messages \(em \fLmesg\fP"
.IX  "allow messages"  ""  "allow messages \(em \fLmesg\fP"
.IX  "deny messages"  ""  "deny messages \(em \fLmesg\fP"
.IX  "inhibit messages"  ""  "inhibit messages \(em \fLmesg\fP"
.IX  communications  "mesg"  ""  "\fLmesg\fR \(em permit or deny messages"
.B mesg
with argument
.B n
forbids messages with
.BR write (1)
by revoking non-user write permission on the user's terminal.
.B mesg
with argument
.B y
reinstates permission.  All by itself,
.B mesg
reports the current state without changing it.
.SH FILES
.PD 0
.TP 20
.B /dev/tty*
.PD
.SH "SEE ALSO"
.BR write (1),
.BR talk (1)
.SH DIAGNOSTICS
Exit status is 0 if messages are receivable, 1 if not, 2 on error.
   B  popd.1 t    C  pr.1v pd    D  
printenv.1 d    E  prof.1 v       w.1     F  prs.1       G  prt.1 s.  0  H  ps.1 rt.  @  I  ptx.1 .1  P  J  pushd.1   `  K  pwd.1 sh  p  L  quota.1     M  ranlib.1 .1     N  rasfilter8to1.1     O  
rastrepl.1      P  rcp.1c l    Q  rdist.1     R  red.1 is    S  refer.1     T  rehash.1 .1     U  repeat.1 .1   (  V  reset.1   8  W  rev.1 se  L  X./share/man/man1/mkdir.1                                                                               755       0      12         1572  4424740675  10112                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkdir.1 1.17 89/03/26 SMI; from UCB 4.2
.TH MKDIR 1  "9 September 1987"
.SH NAME
mkdir \- make a directory
.SH SYNOPSIS
.B mkdir
[
.B \-p
]
.IR dirname .\|.\|.
.SH DESCRIPTION
.IX  "mkdir command"  ""  "\fLmkdir\fP \(em make directory"
.IX  make "directory \(em \fLmkdir\fP"
.IX  "create" "directory \(em \fLmkdir\fP"
.IX  directory  make  ""  "make \(em \fLmkdir\fP"
.B mkdir
creates directories.  Standard entries,
.RB ` . ',
for the directory itself, and
.RB ` .\|. '
for its parent, are made automatically.
.LP
The 
.B \-p
flag allows missing parent directories to be created as needed.
.LP
The current
.BR umask (2)
setting determines the mode in which directories
are created.  Modes may
be modified after creation by using
.BR chmod (1V).
.LP
.B mkdir
requires write permission in the parent directory.
.SH "SEE ALSO"
.BR chmod (1V),
.BR rm (1),
.BR mkdir (2),
.BR umask (2)
sswd.1  L  \  <  paste.1   l  =  pcat.1    |  >  pdp11.1     ?  perfmeter.1     @  pg.1v 1     A  plot.1g ./share/man/man1/mkstr.1                                                                               755       0      12         5073  4424740675  10144                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkstr.1 1.13 89/03/26 SMI; from UCB 4.1
.TH MKSTR 1 "22 March 1989"
.SH NAME
mkstr \- create an error message file by massaging C source files
.SH SYNOPSIS
.B mkstr
[
.B \-
]
.I messagefile
.I prefix
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  directory  make  ""  "make \(em \fLmkdir\fP"
.IX  "mkstr command"  ""  "\fLmkstr\fP \(em create C error messages"
.IX  "programming tools"  mkstr  ""  "\fLmkstr\fP \(em create C error messages"
.IX  "C programming language"  mkstr  ""  "\fLmkstr\fP \(em create C error messages"
.IX  languages  mkstr  ""  "\fLmkstr\fP \(em create C error messages"
.B mkstr
creates files of error messages.
You can use
.B mkstr
to make programs with large numbers of error
diagnostics much smaller, and to reduce
system overhead in running the
program \(em as the error messages
do not have to be constantly swapped in
and out.
.LP
.B mkstr
processes each of the specified
.IR filename s,
placing a massaged version of the input file in a file with
a name consisting of the specified
.I prefix
and the original source file name.
A typical example of using
.B mkstr
would be:
.IP
.B mkstr pistrings processed *.c
.LP
This command would cause all the error messages from the C source
files in the current directory to be placed in the file
.B pistrings
and processed copies of the source for these files to be placed in
files whose names are prefixed with
.IR processed .
.LP
To process the error messages in the source to the message file,
.B mkstr
keys on the string `\fBerror("\fR'
in the input stream.
Each time it occurs, the C string starting at the `\fB"\fR'
is placed in the message file followed by a null character and a
.SM NEWLINE
character; the null character terminates
the message so it can be easily used
when retrieved, the
.SM NEWLINE
character makes it possible to sensibly
.B cat
the error message file to see its contents.
The massaged copy of the input file then contains a
.B lseek
pointer into the file which can be used
to retrieve the message, that is:
.RS
.IP
.nf
.ft B
char efilname[\|] = "/usr/lib/pi_strings";
int efil = \-1;
.sp
error(a1, a2, a3, a4)
{
.RS
.IP
.ft B
char
buf[256];
if (efil < 0) {
.RS
.RS
.IP
.ft B
efil = open(efilname, 0);
if (efil < 0) {
.RE
.RE
.RE
.B oops:
.RS
.RS
.RS
.IP
.B perror (efilname);
.B exit (\&1);
.RE
.B }
.RE
.ft B
}
if (lseek(efil, (long) a1, 0) |\|| read(efil, buf, 256) <= 0)
.RS
.B goto oops;
.RE
.B printf(buf, a2, a3, a4);
.RE
.B }
.fi
.ft R
.RE
.SH OPTIONS
.TP 3
.B \-
Place error messages at the end of the specified
message file for recompiling part of a large
\fBmkstr\fPed
program.
.SH SEE\ ALSO
.BR xstr (1)
 "22 March 1989"
.SH NAME
mkstr \- create an error message file by massaging C source files
.SH SYNOPSIS
.B mkstr
[
.B \-
]
.I messagefile
.I prefix
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  directory  make  ""  "make \(em \fLmkdir\fP"
.IX  "mkstr command"  ""  "\fLmkstr\fP \(em create C error messages"
.IX  "programming tools"  mkstr  ""  "\fLmkstr\fP \(em create C error messages"
.IX  "C programming language"  mkstr  ""  "\fLmkstr\fP \(em create C./share/man/man1/more.1                                                                                755       0      12        17162  4424740676   7771                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)more.1 1.23 89/03/26 SMI; from UCB 4.3 BSD
.\"
.TH MORE 1 "9 September 1987"
.SH NAME
more, page \- browse or page through a text file
.SH SYNOPSIS
.B more
[
.B \-cdflsu
] [
.BI \- lines
] [
.B +\fIlinenumber\fP
] [
.B +/\fIpattern\fP
]
.if n .ti +0.5i
[
.I filename
\&.\|.\|. ]
.LP
.B page
[
.B \-cdflsu
] [
.BI \- lines
] [
.B +\fIlinenumber\fP
] [
.B +/\fIpattern\fP
] [
.I filename
\&.\|.\|. ]
.if n .ti +05i
.SH DESCRIPTION
.IX  "more command"  ""  "\fLmore\fP \(em browse text file"
.IX  "page command"  ""  "\fLpage\fP \(em browse text file"
.IX  "text file, browse through" \fLmore\fP
.IX  "text file, browse through" \fLpage\fP
.IX  file  "browse more"  ""  "browse through text\(em \fLmore\fP"
.IX  file  "browse page"  ""  "browse through text\(em \fLpage\fP"
.IX  display "file by screenfuls \(em \fLmore\fP"
.B more
is a filter that displays the contents of a text
file
on the terminal, one screenful at a time.  It normally pauses after
each screenful, and prints
.B --More--
at the bottom of the screen.
.B more
provides a two-line overlap between screens for continuity.
If
.B more
is reading from a file rather than a pipe, the percentage of
characters displayed so far is also shown.
.LP
.B more
scrolls up to display one more line in response to a
.SM RETURN
character; it displays another screenful in response to a
.SM SPACE
character.  Other commands are listed below.
.LP
.I page
clears the screen before displaying the next screenful of text;
it only provides a one-line overlap between screens.
.LP
.B more
sets the terminal
to
.I noecho
mode, so that the output can be continuous.
Commands that you type do not normally show up on your terminal,
except for the
.B /
and
.B !
commands.
.LP
If the standard output is not a terminal,
.B more
acts just like
.BR cat (1V),
except that a header is printed before each file in a series.
.SH OPTIONS
.TP
.B \-c
Clear before displaying.  Redrawing the screen instead of scrolling
for faster displays.  This option is ignored if
the terminal does not have the ability to clear to the end of a line.
.TP
.B \-d
Display error messages rather than ringing the terminal bell if
an unrecognized command is used.
This is helpful for inexperienced users.
.TP
.B \-f
Do not fold long lines.  This is useful when lines contain
nonprinting characters or escape sequences, such as those generated
when
.BR nroff (1)
output is piped through
.BR ul (1).
.TP
.B \-l
Do not treat
.SM FORMFEED
characters (\s-1CTRL-D\s0) as \(lqpage breaks.\(rq If
.B \-l
is not used,
.B more
pauses to accept commands after any line containing a
.BR ^L
character (\s-1CTRL-D\s0).  Also, if a file begins with a
.SM FORMFEED\s0,
the screen is cleared before the file is printed.
.TP
.B \-s
Squeeze.  Replace multiple blank lines with a single
blank line.  This is helpful when viewing
.BR nroff (1)
output, on the screen.
.TP
.B \-u
Suppress generation of underlining escape sequences.
Normally,
.B more
handles underlining, such as that produced
by
.BR nroff (1),
in a manner appropriate to the terminal.  If the terminal can
perform underlining or has a stand-out mode,
.B more
supplies appropriate escape sequences as called for in the
text file.
.TP
.BI \- lines
Display the indicated number of
.I lines
in each screenful, rather than the default (the number of lines
in the terminal screen less two).
.TP
.BI + linenumber\fP
Start up at
.IR linenumber .
.TP
.BI +/ pattern\fP
Start up two lines above the line containing the
regular expression
.IR pattern .
Note: unlike
editors, this construct should
.I not
end with a
.RB ` / '.
If it does, then the trailing slash is taken as a character in the
search pattern.
.br
.ne 8
.SH USAGE
.SS Environment
.LP
.B more
uses the terminal's
.BR termcap (5)
entry to determine its display characteristics, and
looks in the environment variable
.SB MORE
for any preset options.  For instance, to page through files using
the
.B \-c
mode by default, set the value of this variable to
.BR \-c .
(Normally, the command sequence to set up this
environment variable is placed in the
.B .login
or
.B .profile
file).
.SS Commands
.LP
The commands take effect immediately;  it is not necessary to
type a carriage return.
Up to the time when the command character itself is given,
the user may type the line kill character to cancel the numerical
argument being formed.
In addition, the user may type the erase character to redisplay the
.RB ` "--More--(\fIxx\fP%)" '
message.
.LP
In the following commands,
.I i
is a numerical argument
.RB ( 1
by default).
.TP 10
.IR i \s-1SPACE\s0
Display another screenful, or
.I i
more lines if
.I i
is specified.
.TP
.IR i \s-1RETURN\s0
Display another line, or
.I i
more lines, if specified.
.TP
.IB i ^D
(\s-1CTRL\s0\-D)
Display (scroll down) 11 more lines.
.I i
is given, the scroll size is set to
.IR i\| .
.TP
.IR i d
Same as
.BR ^D .
.TP
.IB i z
Same as
.SM SPACE,
except that
.IR i\| ,
if present, becomes the new default number
of lines per screenful.
.TP
.IB i s
Skip
.I i\|
lines and then print a screenful.
.TP
.IB i f
Skip
.I i
screenfuls and then print a screenful.
.TP
.IB i ^B
(\s-1CTRL-B\s0)
Skip back
.I i
screenfuls and then print a screenful.
.TP
.I b
Same as
.B ^B
(\s-1CTRL-D\s0).
.TP
.B q
.PD 0
.TP
.B Q
.PD
Exit from
.BR more .
.TP
.B =
Display the current line number.
.TP
.B v
Drop into the
.BR vi (1)
editor at the current line of the current
file.
.TP
.B h
Help.  Give a description of all the
.B more
commands.
.TP
.IB i / pattern
Search for the
.IR i\| th
occurrence of the regular expression
.IR pattern .
Display the screenful starting two lines prior to the line
that contains the
.IR i\| th
match for the regular expression
.IR pattern ,
or the end of a pipe, whichever comes first.  If
.B more
is displaying a file and there is no such match, its position
in the file remains unchanged.  Regular expressions can be
edited using erase and kill characters.
Erasing back past the first column cancels the search command.
.TP
.IB i n
Search for the
.IR i\| th
occurrence of the last
.I pattern
entered.
.TP
.B \'
Single quote.  Go to the point from which the last search started.
If no search has been performed in the current file,
go to the beginning of the file.
.TP
.BI ! command
Invoke a shell to execute
.IR command\| .
The characters
.B %
and
.BR ! ,
when used within
.I command
are replaced with the current filename
and the previous shell command,
respectively.
If there is no current filename,
.B %
is not expanded. Prepend a backslash to these characters to
escape expansion.
.TP
.IB i :n
Skip to the
.IR i\| th
next filename given in the command line,
or to the last filename in the list if
.I i
is out of range.
.TP
.IB i :p
Skip to the
.IR i\| th
previous filename given in the command line,
or to the first filename if
.I i
is out of range.
If given while
.B more
is positioned within a file, go to the
beginning of the file.
If
.B more
is reading from a pipe,
.B more
simply rings the terminal bell.
.br
.ne 2
.TP
.B :f
Display the current filename and line number.
.br
.ne 5
.TP
.B :q
.PD 0
.TP
.B :Q
.PD
Exit from
.B more
(same as
.B q
or
.B Q ).
.TP
.B \&.
Dot.  Repeat the previous command.
.TP
.B \s+3^\s0\|\e
Halt a partial display of text.
.B more
stops sending output, and displays the usual
.B --More--
prompt.  Unfortunately, some output is lost as a result.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
terminal data base
.TP
.B /usr/lib/more.help
help file
.PD
.SH "SEE ALSO"
.BR cat (1V),
.BR csh (1),
.BR man (1),
.BR script (1),
.BR sh (1),
.BR environ (5V),
.BR termcap (5)
.SH BUGS
Skipping backwards is too slow on large files.
ake
was interrupted while building
.IR target .
Rather than leaving a partially-completed version
that is newer than its dependencies,
.B make
removes the file named
.IR target .
.br
.ne 3
.TP
.BI "*** " target " not removed."
.B make
was interrupted while building
.I target
and
.I target
was not present in the directory.
.br
.ne 3
.TP
.BI "*** " target " could not be removed, " reason
.B make
w./share/man/man1/mt.1                                                                                  755       0      12        14140  4424740676   7440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mt.1 1.25 89/03/26 SMI;
.TH MT 1 "25 March 1989"
.SH NAME
mt \- magnetic tape control
.SH SYNOPSIS
.B mt
[
.B \-f
.I tapename
]
.I command
[
.I count
]
.SH DESCRIPTION
.IX  "mt command"  ""  "\fLmt\fP \(em manipulate magnetic tape"
.IX  "manipulate magnetic tape"  ""  "manipulate magnetic tape \(em \fLmt\fP"
.IX  "control magnetic tape"  ""  "control magnetic tape \(em \fLmt\fP"
.IX  "magnetic tape"  manipulate  ""  "manipulate \(em \fLmt\fP"
.IX  tape  "manipulate magnetic"  ""  "manipulate magnetic \(em \fLmt\fP"
.IX  "write EOF mark on magnetic tape"  ""  "write EOF mark on magnetic tape \(em \fLmt\fP"
.IX  "skip forward magnetic tape files"  ""  "skip forward magnetic tape files \(em \fLmt\fP"
.IX  "skip forward magnetic tape records"  ""  "skip forward magnetic tape records \(em \fLmt\fP"
.IX  "skip backward magnetic tape files"  ""  "skip backward magnetic tape files \(em \fLmt\fP"
.IX  "skip backward magnetic tape records"  ""  "skip backward magnetic tape records \(em \fLmt\fP"
.IX  "backspace magnetic tape files"  ""  "backspace magnetic tape files \(em \fLmt\fP"
.IX  "backspace magnetic tape records"  ""  "backspace magnetic tape records \(em \fLmt\fP"
.IX  "rewind magnetic tape"  ""  "rewind magnetic tape \(em \fLmt\fP"
.IX  "place magnetic tape unit off-line"  ""  "place magnetic tape unit off-line \(em \fLmt\fP"
.IX  get "magnetic tape unit status \(em \fLmt\fP"
.IX  "place magnetic tape unit off-line"  ""  "place magnetic tape unit off-line \(em \fLmt\fP"
.IX  "retension magnetic tape"  ""  "retension magnetic tape \(em \fLmt\fP"
.IX  "erase magnetic tape"  ""  "erase magnetic tape \(em \fLmt\fP"
.IX  "magnetic tape"  "write EOF mark on"  ""    "write EOF mark on \(em \fLmt\fP"
.IX  "magnetic tape"  "skip forward files"  ""    "skip forward files \(em \fLmt\fP"
.IX  "magnetic tape"  "skip forward records"  ""    "skip forward records \(em \fLmt\fP"
.IX  "magnetic tape"  "forward space files"  ""    "forward space files \(em \fLmt\fP"
.IX  "magnetic tape"  "forward space records"  ""    "forward space records \(em \fLmt\fP"
.IX  "magnetic tape"  "skip backward files"  ""    "skip backward files \(em \fLmt\fP"
.IX  "magnetic tape"  "skip backward records"  ""    "skip backward records \(em \fLmt\fP"
.IX  "magnetic tape"  "backspace files"  ""    "backspace files \(em \fLmt\fP"
.IX  "magnetic tape"  "backspace records"  ""    "backspace records \(em \fLmt\fP"
.IX  "magnetic tape"  "rewind"  ""    "rewind \(em \fLmt\fP"
.IX  "magnetic tape"  "place unit off-line"  ""    "place unit off-line \(em \fLmt\fP"
.IX  "magnetic tape"  "get unit status"  ""    "get unit status \(em \fLmt\fP"
.IX  "magnetic tape"  "retension"  ""    "retension \(em \fLmt\fP"
.IX  "magnetic tape"  "erase"  ""    "erase \(em \fLmt\fP"
.IX  tape  "write EOF mark on"  ""    "write EOF mark on \(em \fLmt\fP"
.IX  tape  "skip forward files"  ""    "skip forward files \(em \fLmt\fP"
.IX  tape  "skip forward records"  ""    "skip forward records \(em \fLmt\fP"
.IX  tape  "forward space files"  ""    "forward space files \(em \fLmt\fP"
.IX  tape  "forward space records"  ""    "forward space records \(em \fLmt\fP"
.IX  tape  "skip backward files"  ""    "skip backward files \(em \fLmt\fP"
.IX  tape  "skip backward records"  ""    "skip backward records \(em \fLmt\fP"
.IX  tape  "backspace files"  ""    "backspace files \(em \fLmt\fP"
.IX  tape  "backspace records"  ""    "backspace records \(em \fLmt\fP"
.IX  tape  "rewind"  ""    "rewind \(em \fLmt\fP"
.IX  tape  "place unit off-line"  ""    "place unit off-line \(em \fLmt\fP"
.IX  tape  "get unit status"  ""    "get unit status \(em \fLmt\fP"
.IX  tape  "retension"  ""    "retension \(em \fLmt\fP"
.IX  tape  "erase"  ""    "erase \(em \fLmt\fP"
.LP
.B mt
sends commands to a magnetic tape drive.
If
.I tapename
is not specified, the environment variable
.SB TAPE
is used.  If
.SB TAPE
does not exist,
.B mt
uses the device
.BR /dev/rmt12 .
.I tapename
must refer to a raw (not block) tape device.
By default,
.B mt
performs the requested operation once;  multiple operations
may be performed by specifying
.IR count .
.LP
The available commands are listed below.  Only as many
characters as are required to uniquely identify a command
need be specified.
.LP
.B mt
returns a 0 exit status when the operation(s)
were successful, 1 if the command was
unrecognized or if
.B mt
was unable to open the specified tape drive,
and 2 if an operation failed.
.SH OPTIONS
.TP 13
.BR eof , " weof"
Write
.I count
.SM EOF
marks at the current position on the tape.
.TP
.B fsf
Forward space
.I count
files.  The tape is positioned on the first block of the file.
.TP
.B fsr
Forward space
.I count
records.
.TP
.B bsf
Back space
.I count
files.  The tape is positioned on the first block of the file.
.TP
.B bsr
Back space
.I count
records.
.TP
.B bsfm
Back space
.I count
file marks.  The tape is positioned on the
beginning\-of\-tape
side of the file mark.
.TP
.B asf
Absolute space to 
.I count
file number.  This is equivalent to a
.B rewind
followed by a
.B fsf
.I count.
.LP
For the following commands,
.I count
is ignored:
.TP 13
.B eom
Space to the end of recorded media on the tape (SCSI only).
This is useful for appending files onto previously written tapes.
.TP
.B rewind
Rewind the tape.
.TP
.BR offline , " rewoffl"
Rewind the tape and, if appropriate, take the drive unit 
offline by unloading the tape.
.TP
.B status
Print status information about the tape unit.
.TP
.BR retension
Rewind the tape completely, then wind it forward
to the end of the reel
and back to beginning\-of\-tape
to smooth out
tape tension.
.TP
.BR erase
Erase the entire tape.
.SH FILES
.PD 0
.TP 20
.B /dev/rmt*
raw magnetic tape interface
.TP
.B /dev/rar*
raw Archive cartridge tape interface
.TP
.B /dev/rst* 
raw
.SM SCSI
tape interface
.TP
.B /dev/rmt*
raw Xylogics tape interface
.PD
.SH "SEE ALSO"
.BR ar (4S), 
.BR mtio (4), 
.BR st (4S), 
.BR tm (4S), 
.BR xt (4S)
.BR environ (5V)
.SH BUGS
.LP
Not all devices support all options, in particular 
.B retension
and
.BR bsfm .
For example,
.BR ar (4S)
currently does not support the
.BR fsr ,
.BR bsf ,
or
.B bsr
options.
The half-inch tape driver,
.BR /dev/rmt* ,
does not support the
.B retension
option.
n
.IR pattern .
Display the screenful starting two lines prior to the line
that contains the
.IR i\| th
match for the regular expression
.IR pattern ,
or the end of a pipe, whichever comes first.  If
.B more
is displaying a file and there is no such match, its position
in the file remains unchanged.  Regular expressions can be
edited using erase and kill characters.
Erasing back past the first column cancels the ./share/man/man1/mv.1                                                                                  755       0      12         6317  4424740676   7431                                                                                                                                                                                                                                                                                                                                                                      .TH MV 1 "22 March 1989"
.\" @(#)mv.1 1.16 89/03/26 SMI;
.SH NAME
mv \- move or rename files
.SH SYNOPSIS
.B mv
[
.B \-
]
[
.B \-f\|i
]
.I filename1
.I filename2
.br
.B mv
[
.B \-
]
[
.B \-f\|i
]
.I directory1
.I directory2
.br
.B mv
[
.B \-
]
[
.B \-f\|i
]
.I filename
\&.\|.\|.
.I directory
.SH DESCRIPTION
.IX  "mv command"  ""  "\fLmv\fP \(em move or rename files or directory"
.IX  "move file"  ""  "move file \(em \fLmv\fP"
.IX  "move directory"  ""  "move directory \(em \fLmv\fP"
.IX  "rename file"  ""  "rename file \(em \fLmv\fP"
.IX  "rename directory"  ""  "rename directory \(em \fLmv\fP"
.IX  "change"  "name of file or directory \(em \fLmv\fP"
.IX  file  rename  ""  "rename \(em \fLmv\fP"
.IX  directory  rename  ""  "rename \(em \fLmv\fP"
.IX  file  move  ""  "move \(em \fLmv\fP"
.IX  directory  move  ""  "move \(em \fLmv\fP"
.IX  file  "change name of"  ""  "change name of \(em \fLmv\fP"
.IX  directory  "change name of"  ""  "change name of \(em \fLmv\fP"
.LP
.B mv
moves files and directories around in the file
system.  A side effect of
.B mv
is to rename a file or directory.  The
three major forms of
.B mv
are shown in the synopsis above.
.LP
The first form of
.B mv
moves (changes the name of)
.I filename1
to
.IR filename2 .
If
.I filename2
already exists, it is removed before
.I filename1
is moved.  If
\fIfilename2\fP has a mode which forbids writing,
.B mv
prints the mode (see
.BR chmod (2))
and reads the standard input to obtain a line;
if the line begins with
.BR y ,
the move takes place, otherwise
.B mv
exits.
.LP
The second form of
.B mv
moves (changes the name of)
.I directory1
to
.IR directory2 ,
.I only
if
.I directory2
does not already exist \(em if it
does, the third form applies.
.LP
The third form of
.B mv
moves one or more
.IR filename s
(may also be directories)
with their original names, into the last
.I directory
in the list.
.LP
.B mv
refuses to move a file or directory onto
itself.
.SH OPTIONS
.TP
.B \-
Interpret all the following arguments to
.B mv
as file names.  This allows file names starting with minus.
.TP
.B \-f
Force. Override any mode restrictions and the
.B \-i
option.  The
.B \-f
option also suppresses any warning messages about modes
which would potentially restrict overwriting.
.TP
.B \-i
Interactive mode.
.B mv
displays the name of the file or directory
followed by a question mark whenever a move
would replace an existing file
or directory.  If you type
a line starting with
.BR y ,
.B mv
moves the specified file or
directory, otherwise
.B mv
does nothing with that file or directory.
.SH "SEE ALSO"
.BR cp (1),
.BR ln (1),
.BR chmod (2),
.BR rename (2)
.SH DIAGNOSTICS
.TP 12
.BI "mv: " pathname ": rename: Permission denied"
Attempted to move 
.I pathname
into a directory that did not have write permission.
.SH BUGS
.LP
If
.I filename1
and
.I filename2
are on different file systems, then
.B mv
must copy the file and delete the original.
In this case the owner name becomes that
of the copying process and any
linking relationship with other files is lost.
.LP
Modification times may be different than expected when
.B mv
must copy the file's data, rather than simply updating a
directory entry.
.LP
.B mv
will not move a directory from one file system to another.
Use
.BR cp (1)
instead.
T    talk.1    d    tar.1     t    tbl.1         tcopy.1       tcov.1        tee.1         tek.1g        	tektool.1       	telnet.1c       test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1    L./share/man/man1/neqn.1                                                                                755       0      12           62  4424740676   7677                                                                                                                                                                                                                                                                                                                                                                      .so man1/eqn.1
.\" @(#)neqn.1 1.13 89/03/26 SMI; 
  nice.1       nl.1 1       nm.1 1        nohup.1v    $  !  notify.1  $  4  "  nroff.1   H  #  	objdump.1 H  X  $  od.1v H  p  %  old-clocktool.1     &  
old-compact.1 &    '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1     *  
old-perfmon.1 *     +  old-prmail.1  +    ,  	old-pti.1   ,  -  
old-setkeys.1 -  D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /./share/man/man1/newgrp.1                                                                              755       0      12         4636  4424740676  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)newgrp.1 1.9 89/03/26 SMI; from S5R2
.TH NEWGRP 1  "16 November 1987"
.SH NAME
newgrp \- log in to a new group
.SH SYNOPSIS
.B newgrp
[
.B \-
] [
.B group
]
.IX  "newgrp command"  "" "\fLnewgrp\fP \(em change group ID of user"
.IX  change  "group ID of user \(em \fLnewgrp\fR"
.IX  "group ID"  "\fLnewgrp\fR \(em change group ID of user"
.SH DESCRIPTION
.LP
.B newgrp
changes a user's group identification.  Only the group-\s-1ID\s0 is changed;
the user remains a member of all groups previously established by
.B setgroups
(see
.BR getgroups (2)).
The user remains logged in
and the current directory is unchanged,
but the group-\s-1ID\s0 of newly-created files will be
set to the new effective group-\s-1ID\s0 (see
.BR open (2V)).
The user is always given a new shell, replacing the current shell,
regardless of whether 
.B newgrp
terminated successfully or
due to an error condition (such as an unknown group).
.LP
Exported variables retain their values after invoking
.BR newgrp ;
however, all unexported variables are either reset to their
default value or set to null.
System variables (such as
.BR \s-1HOME\s0 ,
.BR \s-1LOGNAME\s0 ,
.BR \s-1PATH\s0 ,
.BR \s-1SHELL\s0 ,
.BR \s-1TERM\s0 ,
and
.BR \s-1USER\s0 ),
unless exported by the system
or explicitly exported by
the user, are reset to default values.
Note: the shell command
.B export
(see
.BR sh (1))
is the method to export variables, while the C shell command
.B setenv
(see
.BR csh (1))
implicitly exports its argument.
.LP
With no arguments,
.B newgrp
changes the group identification back to
the group specified in the user's password file entry.
.LP
If the first argument to
.B newgrp
is a
.RB ` \- ',
the environment is changed to what would be expected if the
user actually logged in again.
.LP
A password is demanded if the group has
a password and the user does not,
or if the group has a password and the user is not listed
in
.B /etc/group
as being
a member of that group.
.SH FILES
.PD 0
.TP 20
.B /etc/group
system group file
.TP
.B /etc/passwd
system password file
.PD
.SH SEE ALSO
.BR login (1),
.BR su (1),
.BR csh (1),
.BR sh (1),
.BR open (2V),
.BR getgroups (2),
.BR initgroups (3),
.BR environ (5V),
.BR group (5),
.BR passwd (5)
.SH BUGS
.LP
There is no convenient way to enter a password into
.BR /etc/group .
Use of group passwords is not encouraged, because,
by their very nature, they encourage poor security practices.
Group passwords may disappear in the future.
  snap.1        soelim.1        sort.1v       	sortbib.1       sour./share/man/man1/nice.1                                                                                755       0      12         2747  4424740677   7731                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nice.1 1.17 89/03/26 SMI; from UCB 4.1
.TH NICE 1  "9 September 1987"
.SH NAME
nice \- run a command at low priority
.SH SYNOPSIS
.B nice
[
.BI \- number
]
.I command
.RI [ " arguments " ]
.SH DESCRIPTION
.IX  "nice command"  ""  "\fLnice\fP \(em change priority of command"
.IX  "change" "priority of command \(em \fLnice\fP"
.IX  command  "change priority of"  ""  "change priority of \(em \fLnice\fP"
There are two distinct versions of
.BR nice :
it is built in to the C shell, and is an executable program
available in
.BR /usr/bin/nice
for use with the Bourne shell.
.LP
.B nice
executes
.I command
with a higher ``nice'' value.  The higher the value, the lower the
command's scheduling priority.
If the
.I number
argument is present,
the nice value is incremented
by that amount, up to a limit of 20.
The default
.I number
is 10.
.LP
The super-user may run commands with
priority higher than normal
by using a negative nice value, such as
.BR \-10 .
.SH FILES
.PD 0
.TP 20
.B /usr/bin/nice
.PD
.SH "SEE ALSO"
.BR csh (1),
.BR nice (3C),
.BR renice (8)
.SH DIAGNOSTICS
.B nice
returns the exit status of the subject command.
.SH BUGS
The
.B nice
C shell built-in has a slightly different syntax than the
.B nice
command described here.
When using the built-in, the additional
.B +
option, as in:
.RS
.BI "nice +" n
.RE
sets the nice value to
.I n
rather than incrementing by
.I n.
.LP
Although you can increase the nice value  for any process you
own, only the super-user can decrement that value.
.1c 1    _  rup.1c ../share/man/man1/nl.1                                                                                  755       0      12         6744  4424740677   7425                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nl.1 1.11 89/03/26 SMI; from S5R2 6.2
.TH NL 1 "21 December 1987"
.SH NAME
nl \- line numbering filter
.SH SYNOPSIS
.B nl
[
.B \-p
] [
.BI\-h " type"
] [
.BI \-b " type"
] [
.BI \-f t\|ype
] [
.BI \-v " start"
] [
.BI \-i " incr"
] [
.BI \-l " num"
] [
.BI \-s " sep"
] [
.BI \-w " width"
]
.if t .ti +.5i
[
.BI \-n " fmt"
] [
.BI \-d " delim"
]
.I filename
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX nl "" "\fLnl\fR \(em number lines"
.IX "line numbering \(em \fLnl\fR"
.B nl
reads lines from
.I filename
(or the standard input), numbers them according to the options in
effect, and sends its output to the standard output.
.LP
.B nl
views the text it reads in terms of logical pages.
Line numbering is normally reset at the start of each page.
A logical page is composed of header, body and footer sections.
The start of each page section is signaled by input
lines containing section delimiters only:
.RS
.IP
.nf
.I Start of file
.sp
.B \e:\e:\e:
.I header
.sp
.B \e:\e:
.I body
.sp
.B \e:
.I footer
.fi
.RE
.LP
Empty sections are valid.
Different line-numbering options are available within
each section.  The default scheme is no numbering for headers and
footers.
.SH OPTIONS
.TP .75i
.B \-p
Do not restart numbering at logical page delimiters.
.TP
.BI \-b " type"
Specify which logical page body lines are to be numbered.
.I type
is one of:
.RS
.PD 0
.TP
.B a
number all lines
.TP
.B t
number lines with printable text only (the default)
.TP
.B n ,
no line numbering
.TP
.BI p " rexp"
number only lines that contain the regular expression
.I rexp
.PD
.RE
.TP
.BI \-h " type"
Same as
.BI \-b " type"
except for the header.
The default
.I type
for the logical page header is
.B n
(no lines numbered).
.TP
.BI \-f t\|ype
Same as
.BI \-b " type"
except for the footer.
The default for logical page footer is
.B n
(no lines numbered).
.TP
.BI \-v " start"
.I start
is the initial value used to number logical page lines.
The default is 1.
.TP
.BI \-i " incr"
.I incr
is the increment by which to number logical page lines.
The default is 1.
.TP
.BI \-s " sep"
.I sep
is the character(s) used to separate the line number from the
corresponding text line.  The default is a
.SM TAB.
.TP
.BI \-w " width"
.I width
is the number of characters to be used for the line-number field.
The default is 6.
.TP
.BI \-n " fmt"
.B fmt
is the line numbering format.
Recognized values are:
.RS
.PD 0
.TP
.B rn
right justified, leading zeroes suppressed (the default)
.TP
.B ln
left justified, leading zeroes suppressed
.TP
.B rz
right justified, leading zeroes kept
.PD
.RE
.TP
.BI \-l " num"
.I num
is the number of blank lines to be considered as one.
For example,
.B \-l2
results in only the second adjacent blank
being numbered (if the appropriate
.BR \-ha ,
.BR \-ba ,
and/or
.B \-fa
option is set).
The default is 1.
.TP
.BI \-d " xx"
The delimiter characters specifying the start of a logical page
section may be changed from the default characters (\e:) to
two user-specified characters.
If only one character is entered,
the second character remains the default character (:).
No space should appear between the
.B \-d
and the delimiter characters.
To enter a backslash, use two backslashes.
.SH EXAMPLE
The command:
.IP
.BI "nl \-v10 \-i10 \-d!+ " filename1
.LP
will number
.I filename1
starting at line number 10 with an increment of ten.
The logical page delimiters are
.BR !+ .
.SH SEE ALSO
.BR pr (1V)
es.1        touch.1v./share/man/man1/nm.1                                                                                  755       0      12        13652  4424740677   7442                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nm.1 1.19 89/03/26 SMI; from UCB 4.1
.TH NM 1 "22 March 1989"
.SH NAME
nm \- print name list
.SH SYNOPSIS
.B nm
[
.B \-gnoprsua
]
[
.RI [ " filename " "] .\|.\|."
.SH Sun386i SYNOPSIS
.B /usr/bin/nm
.RB [ \-oxhvnefurpVT ]
.I filename .\|.\|.
.SH DESCRIPTION
.IX  "nm command"  ""  "\fLnm\fP \(em display name list"
.IX  display "name list of object file or library \(em \fLnm\fP"
.IX  "programming tools"  nm  ""  "\fLnm\fP \(em display name list"
.B nm
prints the name list (symbol table) of each object
.I filename
in the argument list.  If an argument is
an archive, a listing for each object
file in the archive will be produced.  If no
.I filename
is given, the symbols in
.B a.out
are listed.
.SS Output Format
.LP
Each symbol name is preceded by its value (blanks if undefined)
and one of the letters:
.TP
.B A
absolute
.TP
.B B
bss segment symbol
.TP
.B C
common symbol
.TP
.B D
data segment symbol
.TP
.B f
filename
.TP
.B t
a static function symbol
.TP
.B  T
text segment symbol
.TP
.B U
undefined
.TP
.B \-
debug, giving symbol table entries (see
.B \-a
below)
.LP
The type letter is upper case if the symbol is external, and
lower case if it is local.  The output is sorted alphabetically.
.SH Sun386i DESCRIPTION
The Sun386i version of the System V compatibility package includes
.IR /usr/bin/nm ,
which allows the System V options to be used and creates the same
output as the System V
.BR nm (1)
command.
.PP
The System V
.B nm
command displays the symbol table of
.SM COFF
files.
.I filename
may be a relocatable or absolute common object file;
or it may be an archive of relocatable or absolute common object files.
For each symbol, the following information will be printed:
.PP
.TP 9
.B name
The name of the symbol.
.TP
.B value
Its value expressed as an offset or an address
depending on its storage class.
.TP
.B class
Its storage class.
.TP
.B type
Its type and derived type.
If the symbol is an instance of a structure or of a union then the structure
or union tag will be given following the type (e.g., struct-tag).
If the symbol is an array, then the array dimensions will be given 
following the type (e.g.,
.BR "char[ n ][ m ]" ).
Note that the object file must have been compiled with the
.B \-g
option of the
.BR cc (1V)
command for this information to appear.
.TP
.B size
Its size in bytes, if available.
(must be compiled with
.BR cc \-g ).
.TP
.B line
The source line number at which it is defined, if available.
(must be compiled with
.BR cc \-g ).
.TP
.B section
For storage classes static and external,
the object file section containing the symbol (e.g., text, data or bss).
.SH OPTIONS
.TP
.B  \-a
Print all symbols.
.TP
.B  \-g
Print only global (external) symbols.
.TP
.B \-n
Sort numerically rather than alphabetically.
.TP
.B  \-o
Prepend file or archive element name to
each output line rather than only once.
.TP
.B  \-p
Do not sort; print in symbol-table order.
.TP
.B  \-r
Sort in reverse order.
.TP
.B  \-s
Sort according to the size of the external
symbol (computed from the difference between the
value of the symbol and the value of the symbol
with the next higher value).
This difference is the value printed.
.TP
.B  \-u
Print only undefined symbols.
.SH Sun386i OPTIONS
.TP 9
.B \-o
Print the value and size of a symbol in octal instead of decimal.
.TP
.B \-x
Print the value and size of a symbol in hexadecimal instead of decimal.
.TP
.B \-h
Do not display the output header data.
.TP
.B \-v
Sort external symbols by value before they are printed.
.TP
.B \-n
Sort external symbols by name before they are printed.
.TP
.B \-e
Print only external and static symbols.
.TP
.B \-f
Produce full output.  Print redundant symbols (.text, .data, .lib,  and .bss),
normally suppressed.
.TP
.B \-u
Print undefined symbols only.
.TP
.B \-r
Prepend the name of the object file or archive to each output line.
.TP
.B \-p
Produce easily parsable, terse output.
Each symbol name is preceded by its value (blanks if undefined) and one
of the letters
.B U
(undefined),
.B A
(absolute),
.B T
(text segment symbol),
.B D
(data segment symbol),
.B S
(user defined segment symbol),
.B R
(register symbol),
.B F
(file symbol),
or
.B C
(common symbol).
If the symbol is local (non-external), the type letter is in lower case.
.TP
.B \-V
Print the version of the System V \*pnm command executing on the standard error output.
.TP
.B \-T
By default, System V
.B nm
prints the entire name of the symbols listed.
Since object files can have symbols names with an arbitrary number of 
characters, a name that is longer than the width of the column set aside
for names will overflow its column, forcing every column after the name
to be misaligned.  The 
.B \-T
option causes System V
.B nm
to truncate every name which would otherwise overflow its column and
place an asterisk as the last character in the displayed name to mark
it as truncated.
.DT
.br
.PP
Options may be used in any order, either singly or in combination,
and may appear anywhere in the command line.
Therefore, both 
.BI "/usr/bin/nm " name " \-e \-v"
and
.BI "/usr/bin/nm \-ve " name
print the static and external symbols in
.IR name ,
with external symbols sorted by value.
.SH EXAMPLE
.IP
.B example% nm
.LP
prints the symbol list of the file named
.BR  a.out ,
the default output file for the
.BR C ,
compiler.
.SH SEE ALSO
.BR ar (1V),
.BR as (1),
.BR cc (1V),
.BR ld (1),
.BR tmpnam (3S),
.BR a.out (5),
.BR ar (5),
.BR coff (5)
.SH BUGS
.LP
To see what is in a shared library, run
.B nm
on the
.I static
.RB ( .a )
version.
.SH "Sun386i BUGS"
When all the symbols are printed, they must be printed in the order they
appear in the symbol table in order to preserve scoping information.
Therefore, the
.B \-v
and
.B \-n
options should be used only in conjunction with the
.B \-e 
option.
.SH "Sun386i DIAGNOSTICS"
.TP 9
.BI "nm: " name ": cannot open"
if
.I name
cannot be read.
.PP
.TP 9
.BI "nm: " name ": bad magic"
if
.I name
is not a common object file.
.PP
.TP 9
.BI "nm: " name ": no symbols"
if the symbols have been stripped from
.IR name .
dited using erase and kill characters.
Erasing back past the first column cancels the ./share/man/man1/nohup.1v                                                                              755       0      12         6167  4424740677  10332                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nohup.1v 1.12 89/03/26 SMI; from S5R2
.TH NOHUP 1V "10 January 1988"
.SH NAME
nohup \- run a command immune to hangups and quits
.SH SYNOPSIS
.B nohup
.I command
.RI [ " arguments " ]
.SH DESCRIPTION
.IX "System V commands" "\fLnohup\fR"
.IX  "nohup command"  ""  "\fLnohup\fP \(em run command immune to hangup"
.IX  command   "run immune to hangup"  ""  "run immune to hangup \(em \fLnohup\fP"
There are three distinct versions of
.BR nohup :
it is built in to the C shell, and is an executable program
available in
.B /usr/bin/nohup
and
.B /usr/5bin/nohup
when using the Bourne shell.
.LP
The Bourne shell version of
.B nohup
executes
.I command
such that it is immune to
.SM HUP
(hangup)
and
.SM TERM
(terminate)
signals.
If the standard output is a terminal, it is redirected to the file
.BR nohup.out .
The standard error is redirected to follow the standard output.
.LP
The priority is incremented by 5.
.B nohup
should be invoked from the shell with
.RB ` & '
in order to
prevent it from responding to interrupts
or input from the next user.
.SH SYSTEM V DESCRIPTON
Processes run by
.B nohup
are immune to
.SM HUP 
(hangup)
and 
.SM QUIT
(quit)
signals;
.B nohup
does not arrange to make them immune to a
.SM TERM
(terminate) signal, so unless they arrange to be immune to a
.SM TERM
signal, or the shell makes them immune to a
.SM TERM
signal, they will receive that signal.
If
.B nohup.out
is not writable in the current directory,
output is redirected to
.BR $\s-1HOME\s+1/nohup.out .
If the standard error is a terminal,
it is redirected to the standard output, otherwise it is not redirected.
The priority of the process run by
.B nohup
is not altered.
.SH EXAMPLE
It is frequently desirable to apply
.B nohup
to pipelines or lists of commands.
This can be done only by placing pipelines
and command lists in a
single file, called a shell script.
The command
.IP
.B example% nohup sh script
.LP
applies to everything in
.BR script .
(If the script is to be executed often,
then the need to type
.IR sh
can be eliminated by giving
.BR script
execute permission).  Add an ampersand and the contents of
.B script
are run in the background with interrupts also ignored (see
.BR sh (1)):
.IP
.B example% nohup script &
.SH FILES
.PD 0
.TP 20
.B nohup.out
.TP
.B $\s-1HOME\s0/nohup.out
.PD
.SH SEE ALSO
.BR chmod (1V),
.BR csh (1),
.BR nice (1),
.BR sh (1),
.BR signal (3)
.SH BUGS
If you use
.BR csh (1),
then commands executed with
.RB ` & '
are automatically immune to
.SM HUP
signals while in the background.
.LP
There is a C shell built-in command
.B nohup
that provides immunity from terminate, but does not
redirect output to
.BR nohup.out .
.LP
.B nohup
does not recognize command sequences. For instance,
.IP
.BI nohup " command1" ; " command2" ~~~~~
.LP
applies only to
.IR command1
and the command:
.IP
.BI "nohup (" command1 "; " command2 )
.LP
is syntactically incorrect.
.LP
Be careful of where the standard error is redirected.
The following command may put error messages on tape,
making it unreadable:
.IP
.B nohup cpio \-o <list >/dev/rmt/1m&
.LP
while
.IP
.B nohup cpio \-o <list >/dev/rmt/1m 2>errors&
.LP
puts the error messages into the file
.BR errors .
hangups and quits
.SH SYNOPSIS
.B nohup
.I command
.RI [ " arguments " ]
.SH DESCRIPTION
.IX "System V commands" "\fLnohup\fR"
.IX  "nohup command"  ""  "\fLnohup\fP \(em run command immune to hangup"
.IX  command   "run immune to hangup"  ""  "run immune to hangup \(em \fLnohup\fP"
There are three distinct versions of
.BR nohup :
it is built in to the C shell, and is an executable program
./share/man/man1/notify.1                                                                              755       0      12           74  4424740677  10252                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)notify.1 1.8 89/03/26 SMI; 
ump.1 1   X  $  od.1v p.  p  %  old-clocktool.1     &  
old-compact.1     '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1      *  
old-perfmon.1      +  old-prmail.1       ,  	old-pti.1 +  ,  -  
old-setkeys.1 ,  D  .  
old-sun3cvt.1 D  \  /  old-syslog.1  \  t  0  
old-ttytool.1 t    1  old-uncompact.1     2  old-vc.1 .1     3  on.1c .1    4  onintr.1    ./share/man/man1/nroff.1                                                                               755       0      12        10520  4424740700  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nroff.1 1.31 89/03/26 SMI;
.TH NROFF 1 "22 March 1989"
.SH NAME
nroff \- format documents for display or line-printer
.SH SYNOPSIS
.B nroff
[
.B \-ehig
]
[
.BI \-m name
] [
.BI \-n N
] [
.BI \-o pagelist
] [
.BI \-r aN
] [
.BI \-s N
] [
.BI \-T name 
]
.if n .ti +0.5i
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "nroff command"  ""  "\fLnroff\fP \(em document formatter"
.IX  "document production"  nroff  ""  "\fLnroff\fP \(em document formatter"
.LP
.B nroff
formats text in the named
.I files
for
typewriter-like
devices.  See also
.BR troff (1).
The full capabilities of
.B nroff
and
.B troff
are described in
.TX DOCS .
.LP
If no
.I file
argument is present,
.B nroff
reads the standard input.
An argument consisting of a 
.RB ` \- '
is taken to be a file name corresponding to the standard input.
.SH OPTIONS
.LP
Options may appear in any order so long as they appear
.I before
the files.
.TP
.B \-e
Produce equally-spaced words in adjusted
lines, using full terminal resolution.
.TP
.B \-h
Use output
.SM TAB
characters during horizontal spacing
to speed output and reduce output character count.
.SM TAB 
settings are assumed to be every 8 nominal character widths.
.TP
.B \-i
Read the standard input after the input files are exhausted.
.TP
.B \-q
Invoke the simultaneous input-output mode of the
.B rd
request.
.TP
.BI \-m name
Prepend the macro file
.B /usr/share/lib/tmac/tmac.name
to the input files.
.TP
.BI \-n N
Number first generated page
.IR N .
.TP
.BI \-o pagelist
Print only pages whose page numbers appear in the comma-separated
.I list
of numbers and ranges.  A
range
.IB N \- M
means pages
.I N
through
.IR M ;
an initial
.I \-N
means from the beginning to page
.IR N ;
and a final
.IR N \-
means from
.I N
to the end.
.TP
.BI \-r aN
Set register
.I a
(one-character) to
.IR N .
.TP
.BI \-s N
Stop every
.IR N " pages."
.B nroff
will halt prior to every
.I N
pages (default
.IR N =1)
to allow paper loading or changing, and will
resume upon receipt of a
.SM NEWLINE\s0.
.TP
.BI \-T name
Prepare output for a device of the specified
.IR name .
Known
.IR name s
are:
.RS
.sp .5
.PD 0
.TP 20
.B 37
Teletype Corporation Model 37 terminal \(em this is the default.
.TP
.BR crt "\ \ |\ \ " lpr "\ \ |\ \ " tn300
.SM GE
TermiNet\ 300, or any line printer or terminal without half-line
capability.
.TP
.B 300
.SM DASI\s0-300.
.TP
.B 300-12
.SM DASI\s0-300 \(em
12-pitch.
.TP
.BR 300S "\ \ |\ \ " 302 "\ \ |\ \ " dtc
.SM DASI\s0-300S.
.TP
.BR 300S-12 "\ \ |\ \ " 302-12 "\ \ |\ \ " dtc12
.SM DASI\s0-300S.
.TP
.B 382
.SM DASI\s0-382 (fancy DTC
382).
.TP
.B 382-12
.SM DASI\s0-82  (fancy
.SM DTC
382 \(em
12-pitch).
.TP
.BR 450 "\ \ |\ \ " ipsi
.SM DASI\s0-450 (Diablo
Hyterm).
.TP
.BR 450-12 "\ \ |\ \ " ipsi12
.SM DASI\s0-450 (Diablo Hyterm) \(em
12-pitch.
.TP
.B 450-12-8
.SM DASI\s0-450 (Diablo Hyterm) \(em 12-pitch and 8
lines-per-inch.
.TP
.B 450X
.SM DASI\s0-450X (Diablo
Hyterm).
.TP
.B 832
.SM AJ\s0
832.
.TP
.B 833
.SM AJ\s0
833.
.TP
.B 832-12
.SM AJ\s0
832 \(em
12-pitch.
.TP
.B 833-12
.SM AJ\s0
833 \(em
12-pitch.
.TP
.B epson
Epson FX80.
.TP
.B itoh
.SM C:ITOHs0
Prowriter.
.TP
.B itoh-12
.SM C:ITOHs0
Prowriter \(em
12-pitch.
.TP
.B nec	
.SM NEC 55?0s0 or
.SM NEC 77?0s0
Spinwriter.
.TP
.B nec12
.SM NEC 55?0s0 or
.SM NEC 77?0s0
Spinwriter \(em 12-pitch.
.TP
.B nec-t
.SM NEC 55?0/77?0s0
Spinwriter \(em Tech-Math/Times-Romanthimble.
.TP
.B qume
Qume
Sprint \(em 5 or9.
.TP
.B qume12
Qume
Sprint \(em 5 or 9,12-pitch.
.TP
.B xerox
Xerox 17?0 or Diablo 16?0.
.TP
.B xerox12
Xerox 17?0 or
Diablo 16?0 \(em
12-pitch.
.TP
.B x-ecs
Xerox/Diablo 1730/630 \(em Extended Character
Set.
.TP
.B x-ecs12
Xerox/Diablo 1730/630 \(em Extended Character Set,
12-pitch.
.RE
.PD
.SH EXAMPLE
.LP
The following command:
.IP
.B example% nroff \-s4 \-me users.guide
.LP
formats
.B users.guide
using the
.B \-me
macro package, and stopping every 4 pages.
.SH FILES
.PD 0
.TP 28
.B /tmp/ta*
temporary file
.TP
.B /usr/share/lib/tmac/tmac.*
standard macro files
.TP
.B /usr/share/lib/term/*
terminal driving tables for
.B nroff
.TP
.B /usr/share/lib/term/\s-1README\s0
index to terminal description files
.PD
.SH "SEE ALSO"
.BR checknr (1),
.BR col (1V),
.BR eqn (1),
.BR tbl (1),
.BR troff (1),
.BR term (5),
.BR man (7),
.BR me (7),
.BR ms (7)
.LP
.TX DOCS
  
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 d.1        view.1 1      ./share/man/man1/objdump.1                                                                             755       0      12         5605  4424740700  10432                                                                                                                                                                                                                                                                                                                                                                      .TH OBJDUMP 1 "19 February 1988"
.\" @(#)objdump.1	1.9 89/03/26; from System V
.SH NAME
objdump \- dump selected parts of a COFF object file
.SH SYNOPSIS
.B objdump
[
.I option
[
.I modifier .\|.\|.
] ]
.I filename .\|.\|.
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "objdump command" "" "\fLobjdump\fR command"  
.LP
The
.B objdump
command
dumps selected parts of each
of its object
.I filename
arguments.
This command is compatible with System V in all its options.
It will accept both object files and archives of object files.
.LP
.B objdump
command
attempts to format the information it dumps in a meaningful way,
printing certain information in character,
hex, octal or decimal representation as appropriate.
.SH OPTIONS
.TP 10
.B \-a
Dump the archive header of each member of each archive file
argument.
.TP
.B \-g
Dump the global symbols in the symbol table of an archive.
.TP
.B \-f
Dump each file header.
.TP
.B \-o
Dump each optional header.
.TP
.B \-h
Dump section headers.
.TP
.B \-s
Dump section contents.
.TP
.B \-r
Dump relocation information.
.TP
.B \-l
Dump line number information.
.TP
.B \-t
Dump symbol table entries.
.TP
.BI \-z " name
Dump line number entries for the named function.
.TP
.BR \-c
Dump the string table.
.TP
.B \-L
Interpret and print the contents of the
.B .lib
sections.
.SS Modifiers
The following
.I modifiers
are used in conjunction with the options
listed above.
.TP 10
.BI \-d " number
Dump the section number,
.IR number ,
or the range of sections 
starting at
.I number
and ending at the
.I number
specified by
.BR +d .
.TP
.BI +d " number
Dump sections in the range either beginning with 
first section or beginning
with section specified by
.BR \-d .
.TP
.BI \-n " name
Dump information pertaining only to the named entity.
This
.I modifier
applies to
.BR \-h ,
.BR \-s ,
.BR \-r ,
.BR \-l ,
and 
.BR \-t .
.TP
.B \-p
Suppress printing of the headers.
.TP
.BI \-t " index
Dump only the indexed symbol table entry.
The 
.B \-t
used in conjunction with
.BR +t ,
specifies a range of symbol
table entries.
.TP
.BI +t " index
Dump the symbol table entries in the range ending with the indexed entry.
The range begins at the first symbol table entry or at the entry
specified by the 
.B \-t
option.
.TP
.B \-u
Underline the name of the file for emphasis.
.TP
.B \-v
Dump information in symbolic representation rather than numeric
(e.g.,
.SB C_STATIC
instead of 
.BR \s-10X02\s+1 ).
This
.I modifier
can be used with all the above options except
.B \-s
and
.BR \-o .
.TP
.BI \-z " name" , number
.PD 0
.BI \-z " name\ number
Dump line number entry or range of line numbers starting at
.I number
for the named function.
.PD
.TP
.BI \+z " number
Dump line numbers starting at either function
.IR name " or " number
specified 
by
.BR \-z,
up to
.I number
specified by
.BR +z .
.PP
White space separating an
.I option
and its
.I modifier
is optional.
.PP
.SH "SEE ALSO"
.BR coff (5),
.BR ar (5)
it.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D  ./share/man/man1/od.1v                                                                                 755       0      12        10354  4424740700   7577                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)od.1v 1.8 89/03/26 SMI; from UCB 4.2 16 Feb 1983
.TH OD 1V "9 September 1987"
.SH NAME
od \- octal, decimal, hex, and ascii dump
.SH SYNOPSIS
.B od
[
.BI \- format
]
.RI [ " filename " ]
[
.RB [ + ]\c
.IR offset [\c
.BR . ]\|[ b ]
.RI [ label ]
]
.SH DESCRIPTION
.IX  "od command"  ""  "\fLod\fP \(em dump file"
.IX  file  dump  file  "dump \(em \fLod\fP"
.IX  "octal dump file"  ""  "octal dump file \(em \fLod\fP"
.IX  "decimal dump file"  ""  "decimal dump file \(em \fLod\fP"
.IX  "hexadecimal dump file"  ""  "hexadecimal dump file \(em \fLod\fP"
.IX  "ASCII dump file"  ""  "ASCII dump file \(em \fLod\fP"
.B od
displays
.IR file ,
or its standard input, in one or more dump formats as selected by the
first argument.  If the first argument is missing,
.B \-o
.BR (octal)
is the default.  Dumping continues until end-of-file.
.SS Format Arguments
.LP
The meanings of the format argument characters are:
.TP 5
.B  a
Interpret bytes as characters and display them with their
.SM ASCII
names.  If the
.B p
character is given also, bytes with even parity are underlined.  If the
.B P
character is given, bytes with odd parity are underlined.
Otherwise the parity bit is ignored.
.TP 5
.B  b
Interpret bytes as unsigned octal.
.TP 5
.B  c
Interpret bytes as
.SM ASCII
characters.  Certain non-graphic characters appear as C escapes:
.SM NULL\s0=\fB\e0\fP,
backspace=\fB\eb\fP,
formfeed=\fB\ef\fP,
.SM NEWLINE\s0=\fB\en\fP,
.SM RETURN\s0=\fB\er\fP,
.SM TAB\s0=\fB\et\fP;
others appear as 3-digit octal numbers.
Bytes with the parity bit set are displayed in octal.
.TP 5
.B  d
Interpret (short) words as unsigned decimal.
.TP 5
.B  f
Interpret long words as floating point.
.TP 5
.B  h
Interpret (short) words as unsigned hexadecimal.
.TP 5
.B  i
Interpret (short) words as signed decimal.
.TP 5
.B  l
Interpret long words as signed decimal.
.TP 5
.B  o
Interpret (short) words as unsigned octal.
.TP 5
.BI s[ n ]
Look for strings of
.SM ASCII
graphic characters, terminated with a null byte.
.I n
specifies the minimum length string to be recognized.
By default, the minimum length is 3 characters.
.TP 5
.B  v
Show all data. By default, display lines that are identical to the last
line shown are not output, but are indicated with an
.RB ` * '
in column 1.
.TP 5
.BI w[ n ]
Specifies the number of input bytes to be interpreted and displayed
on each output line. If
.B w
is not specified, 16 bytes are read for each display line.
If
.I n
is not specified, it defaults to 32.
.TP 5
.B  x
Interpret (short) words as hexadecimal.
.LP
An upper case format character implies the long or double precision
form of the object.
.LP
The
.I offset
argument specifies the byte offset into the
file where dumping is to commence.
By default this argument is interpreted in octal.
A different radix can be
specified; if
.B .
is appended to the argument, then
.I offset
is interpreted in decimal.  If
.I offset
begins with
.B x
or
.BR 0x ,
it is interpreted in hexadecimal.  If
.B b
.BR  (\fBB\fP)
is appended, the offset is interpreted
as a block count, where a block is 512 (1024) bytes.  If the
.B file
argument is omitted, the
.I offset
argument must be preceded by
.BR + .
.LP
The radix of the displayed address will be the same as the radix of the
.IR offset ,
if specified; otherwise it will be octal.
.LP
.I label
will be interpreted as a pseudo-address for the first byte displayed.
It will be shown in
.B (\|)
following the file offset.  It is intended to
be used with core images to indicate the
real memory address.  The syntax for
.I label
is identical to that for
.IR offset .
.SH SYSTEM V DESCRIPTION
.IX "System V commands" "\fLod\fR"
The
.BR a ,
.BR f ,
.BR h ,
.BR l ,
.BR v ,
and
.B w
formats are not supported.  The
.B s
format interprets (short) words as
signed decimal, rather than searching for
strings.  The options for interpreting
long or double-precision forms are not
supported.  The
.I label
argument is not supported.  The
.B B
suffix to the
.I offset
argument is not supported.
.SH "SEE ALSO"
.BR adb (1),
.BR dbx (1),
.BR dbxtool (1)
.SH BUGS
A file name argument can't start with
.BR + .
A hexadecimal offset can't be a block count.
Only one file name argument can be given.
.LP
It is an historical botch to require specification
of object, radix, and
sign representation in a single character argument.
c D  l    	uustat.1c X  |    uux.1c 1      
vacation.1 D      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 .1         view.1 1        view.1 1 d.1        view.1 1      ./share/man/man1/old-clocktool.1                                                                       755       0      12           73  4424740700  11471                                                                                                                                                                                                                                                                                                                                                                      .so man1/clock.1
.\" @(#)old-clocktool.1 1.6 89/03/26 SMI;
  '  old-eyacc.1     (  old-filemerge.1     )  
old-make.1     *  
old-perfmon.1 *     +  old-prmail.1  +    ,  	old-pti.1   ,  -  
old-setkeys.1 -  D  .  
old-sun3cvt.1 .  \  /  old-syslog.1  /  t  0  
old-ttytool.1 0    1  old-uncompact.1     2  old-vc.1      3  on.1c 1     4  onintr.1      5  organizer.1     6  othertools.1  6    7  
overview.1     8  pack./share/man/man1/old-compact.1                                                                         755       0      12         5151  4424740700  11170                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-compact.1 1.18 89/03/26 SMI; from UCB 4.1
.TH OLD-COMPACT 1 "22 March 1989"
.SH NAME
old-compact, old-uncompact, old-ccat \- compress and uncompress files, and cat them
.SH SYNOPSIS
.B /usr/old/compact
[
.IR filename .\|.\|.
]
.LP
.B uncompact
[
.IR filename .\|.\|.
]
.LP
.B ccat
[
.IR filename .\|.\|.
]
.SH DESCRIPTION
.IX  compact  ""  "\fLcompact\fP \(em compress files"
.IX  uncompact  ""  "\fLuncompact\fP \(em uncompress files"
.IX  ccat  ""  "\fLccat\fP \(em extract files compressed with \fLcompact\fR"
.IX  files  "compact command"  files  "\fLcompact\fP \(em compress files"
.IX  files  "uncompact command"  files  "\fLuncompact\fP \(em uncompress files"
.IX  files  "ccat command"  files  "\fLccat\fP \(em extract files compressed with \fLcompact\fR"
.LP
.B Note:
This program is considered to be obsolete, and will not be
distributed or supported in future Sun releases.
.LP
.B compact
compresses the named files using an
adaptive Huffman code.  If no file
names are given, the standard input is
compacted to the standard output.
.B compact
operates as an on-line algorithm.  Each time a byte is read,
it is encoded immediately according to the current prefix code.
This code is an optimal Huffman code for the set of frequencies seen so far.
It is unnecessary to prepend a decoding tree to the compressed file
since the encoder and the decoder start in the same state and stay
synchronized.  Furthermore,
.B compact
and
.B uncompact
can operate as filters.  In particular:
.IP
.RB \&.\|.\|.\| " | compact | uncompact | " .\|.\|.
.LP
operates as a (very slow) no-op.
.LP
When an argument
.B file
is given, it is compacted and the resulting file is placed in
.BR file.C ;
.B file
is removed.  The first two bytes of the compacted file code the
fact that the file is compacted.  This code is used to prohibit recompaction.
.LP
The amount of compression to be expected depends on the type of file being
compressed.  Typical values of compression are:
Text (38%), Pascal Source (43%), C Source (36%) and Binary (19%).
These values are the percentages of file bytes reduced.
.LP
.B uncompact
restores the original file from a file called
.IB file .C
which was compressed by
.B compact.
If no file names are given, the standard input is uncompacted to
the standard output.
.LP
.B ccat
cats the original file from a file compressed by
.B compact,
without uncompressing the file.
.SH FILES
.PD 0
.TP 20
.B *.C
compacted file created by compact, removed by uncompact
.PD
.SH "SEE ALSO"
Gallager, Robert G.,
.IR "Variations on a Theme of Huffman" ,
.I "I.E.E.E.  Transactions on Information Theory,"
vol. IT-24, no. 6, November 1978, pp. 668 - 674.
 
suntools.1 .  H    	sunview.1 ls  \    	suspend.1 w.  l    swin.1 p      switch.1 win      
switcher.1 1      
symorder.1 r      sync.1 o      sysex.1       	syswait.1 se      t300.1g        t300s.1g 300      t4013.1g .1g  $    t450.1g   4    tabs.1v   D    tail.1   T    talk.1   d    tar.1    t    tbl.1  ./share/man/man1/old-eyacc.1                                                                           755       0      12         2145  4424740700  10626                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-eyacc.1 1.9 89/03/26 SMI; from UCB 4.2
.TH OLD-EYACC 1 "22 March 1989"
.SH NAME
old-eyacc \- modified yacc allowing much improved error recovery
.SH SYNOPSIS
.B /usr/old/eyacc
[
.B \-v
]
.RI [ " grammar " ]
.SH DESCRIPTION
.IX "eyacc command"  ""  "\fLeyacc\fP \(em compiler generator"
.IX "programming tools"  "compiler generator"
.IX "compiler generator"
.B eyacc
is a version of
.BR yacc (1),
that produces tables used by the Pascal system and its error recovery
routines.
.B eyacc
fully enumerates test actions in its parser when an error token
is in the look-ahead set.
This prevents the parser from making undesirable reductions
when an error occurs before the error is detected.
The table format is different in
.B eyacc
than it was in the old
.BR yacc ,
as minor changes had been made for efficiency reasons.
.SH "SEE ALSO"
.BR yacc (1)
.LP
.I Practical \s-1LR\s0 Error Recovery
by Susan L. Graham, Charles B.
Haley
and W. N. Joy;
.SM SIGPLAN
Conference on Compiler Construction, August 1979.
.SH BUGS
.B pc
and its error recovery routines should be made into a library
of routines for the new
.BR yacc .
 rev.1    L  X  	rlogin.1c v.  \  Y  rm.1 log  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1 di    ]  rpcgen.1 ib.    ^  rsh.1c g    _  rup.1c     `  
ruptime.1c .    a  	rusers.1c e.     b  rwall.1c s.1    c  rwho.1c      d  sact.1   8  e  sccs-admin.1 1   L  f  
sccs-cdc.1 1  `  g  sccs-comb.1   x  h  sccs-delta.1 .1     i  
./share/man/man1/old-filemerge.1                                                                       755       0      12        16230  4424740701  11522                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-filemerge.1 1.14 89/03/26 SMI;
.TH OLD-FILEMERGE 1 "22 March 1989"
.SH NAME
old-filemerge \- window-based file comparison and merging program
.SH SYNOPSIS
.B /usr/old/filemerge 
[
.B \-br
] [
.B \-a
.I ancestor
] [
.B \-l
.I listfile
] [
.I leftfile
[
.I rightfile
[
.I outfile
] 
]
]
.SH DESCRIPTION
.IX "filemerge command" "" "\fLfilemerge\fR command"  
.LP
Note: This program is considered to be obsolete, and will not be 
distributed or supported in future Sun releases.
.LP 
.B filemerge
is a window-based version of
.BR diff (1),
for comparing and merging text files.  It displays two files
for side-by-side comparison, each in a read-only text-subwindow.
Beneath them, an editing subwindow can be used to construct a
.I merged
version\(em\&one which contains selected lines from
either or both input files, along with any additional edits you may
make.
.LP
.I leftfile
and
.I rightfile
are the files to be compared, and
.I outfile
is name of the file containing the merged version.  If
.I outfile
is a directory, then the output is placed in the file
.IB outfile / leftfile.
If 
.I outfile
is omitted, the output file is named
.B filemerge.\|out
by default.  If no filename
arguments are given, you can enter them from within the tool itself.
.SH OPTIONS
.TP
.B \-b
Ignore leading blanks in comparisons.
.TP
.B \-r
Read-only mode.  Do not display the editing subwindow.
.TP
.BI \-a " ancestor"
Compare both files with respect to
.IR ancestor .
A minus-sign indicates lines that have been deleted relative to the
ancestor.  A plus-sign indicates
lines added relative to the ancestor.
.TP
.BI \-l " listfile"
Process a list of filename pairs.  With this option,
.I leftfile
and
.I rightfile
are the names of directories, and
.I listfile
contains a list of filenames that appear in both.
.B filemerge
compares the versions of each file between the two
directories, and allows you to create a merged version (typically
in the directory
.IR outfile ).
The
.RB \s-1SHIFT\s0- Load
command button, which is selected by holding the 
.SM SHIFT
key while clicking on the
.B Load
button, reads in the next pair named in the list.
If
.I listfile
is 
.RB ` - ',
then the list of files is read from the standard input.
.SH USAGE
.LP
The text in the editing subwindow
.RI ( outfile )
is initially the same as that in
.IR leftfile .
To construct a merged version, you can directly edit the text of
.I outfile
with textedit commands, or you can change
a selected difference to match
.I rightfile
(the one on the right) by clicking the
.B Right
button in the top panel.
.SS Differences
At any given time, one of the displayed ``differences'' is
.IR current .
The current difference is indicated by emboldening the
symbol adjacent to each line, and also by the notation
.RI `` i 
.B of
.IR n\|'' 
displayed in the control panel.  Once a
difference is current, you can use the
.B Left
and
.B Right
buttons to apply either the left-hand or
the right-hand version of the text to
.IR outfile .
The
.B Next
and 
.B Prev
buttons select the next or previous difference, respectively.
.SS Property Sheet
You can customize
.B filemerge
using the property sheet to
set or alter various display and control options.  To bring up
the property sheet, press the
.B Props
function key (typically L3)
while the mouse is over any part of the 
.BR filemerge " window."
.SS "Menus"
There are pop-up menus associated with several of the control panel
items, and a menu associated with the editing subwindow.  The former
provide to select any command function obtained with a modified
mouse-button (such as 
.RB \s-1SHIFT\s0- Next
); the editing subwindow's menu has items that
control the filename and directory location of the merged output.  To
bring up a menu, move the mouse-cursor
to the command button, or to the
editing subwindow, and hold down the 
.SM RIGHT 
mouse-button.  Select a
desired menu item by releasing the
mouse-button after moving the cursor
on top of it.
.SS "Command Buttons"
.TP 12
.B Next
Make the next difference current.  The
subwindow scrolls, if necessary, to display it.
.IP 
.RB \s-1SHIFT\s0- Next
12
Make the first difference current.  (Also a menu item from the 
.B Next
menu.)
.TP 
.B Prev
Make the previous difference current.
.IP 
.RB \s-1SHIFT\s0- Prev
12
Make the last difference current.
(Also a menu item from the 
.B Prev
menu.)
.TP 
.B Right
Apply right-hand version of the current difference to 
.IR outfile .
If
.B autoadvance
is in effect, advance to the next difference.
.IP 
.RB \s-1SHIFT\s0- Right
12
Apply the right-hand version and advance
to the next difference, unless
.B autoadvance
is in effect.
(Also a menu item from the 
.B Right
menu.)
.TP 
.RB \s-1CTRL\s0- Right
Apply the right-hand version for the current difference, and
for all subsequent differences up to the end of the file.
.TP 
.B Left
Apply the left-hand version of the current difference.
.TP 
.B Undo
Undo the last
.B Right
or
.B Left
operation.  You can 
.B Undo
up to 100 stacked operations.  You cannot undo an 
.BR Undo .
.IP
.RB \s-1SHIFT\s0- Undo
12
Undo all the operations since the last
.BR Load ,
or the last
100 operations.
.TP 
.B Scroll-Lock
When in effect, the three text-subwindows scroll in unison.
Otherwise each subwindow scrolls independently.
.TP 
.IB i " of " n
The number of the current difference,
.IR i ,
out of
.I n
detected differences.
Popping up a menu on this item allows you to jump
to a selected difference.
.TP 
.B Load
Load the files whose names appear by the prompts
.B File1:
and
.BR File2: .
.IP 
.RB \s-1SHIFT\s0- Load
12
When the
.B \-l
option is used, load the files from the directories shown in
.B File1
and 
.B File2
corresponding to the next name in the list (taken from the
.I listfile
argument).
.TP 
.B Done
Save
.I outfile
and close the tool.  The name used to save the
file appears in the namestripe, in the same fashion as 
.BR textedit (1).
.IP 
.RB \s-1SHIFT\s0- Done
12
Save without closing.  You can also save the merged version using
the
.B Save
item in the editing subwindow's menu.
.TP 
.B Quit
Exit the tool.  You must explicitly save your merged 
.IR outfile ,
either with the
.B Done
button or the
.B Save
item in the
editing subwindow's menu.
.SS Properties
.LP
Hitting the L3
function key brings up a property sheet that controls several
.B filemerge
parameters.  The information in the property sheet is
stored in the file
.BR ~/.\|filemergerc .
The property panel items have the following meanings:
.RS
.TP 12
.B Apply
Any changes you have made to the property sheet will now take effect.
.TP 
.B Reset
Reset the property sheet to the state it had at the time of
the last
.BR Apply .
.TP 
.B Done
Close the property sheet.
.TP 
.B autoadvance
Advance to the next difference
after each
.B Left
or
.BR Right operation.
.TP 
.B Toplines
Number of lines in the top two subwindows.
.TP 
.B Bottomlines
Number of lines in the bottom subwindow.
.TP 
.B Columns
Number of columns in the left (and also right) subwindow.
.RE
.SH FILES
.PD 0
.TP 20
.B ~/.\|filemergerc
file storing property sheet information
.TP
.B filemerge.out
default output file
.PD
.SH SEE ALSO
.BR diff (1), 
.BR sdiff (1),
.BR textedit (1)
.SH BUGS
.LP
Using the
.B Find
function key gets the subwindows 
out of sync for scrolling.  To resync them, turn
.B Scroll-Lock
first off, and then on.
Repeat the previous command.
.TP
.B \s+3^\s0\|\e
Halt a partial display of text.
.B more
stops sending output, and displays the usual
.B --More--
prompt.  Unfortunately, some output is lost as a result.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
terminal data base
.TP
.B /usr/lib/more.help
help file
.PD
.SH "SEE ALSO"
.BR cat (1V),
.BR csh (1),
.BR man (1),
.BR ./share/man/man1/old-make.1                                                                            755       0      12        57113  4424740701  10505                                                                                                                                                                                                                                                                                                                                                                      '\" t
.ds ~ \u\(ap\d
.\" @(#)old-make.1 1.44 89/03/26 SMI; from S5
.TH OLD-MAKE 1 "22 March 1989"
.SH NAME
old-make \- maintain, update, and regenerate groups of programs
.SH SYNOPSIS
.B /usr/old/make
[
.BI \-f " makefile"
]
\&.\|.\|.
.RB [ " \-bdeikmnpqrsSt " ]
[
.I target
\&.\|.\|.
]
[
.IB macro-name = value
\&.\|.\|.
]
.IX  "make command"  ""  "\fLmake\fP \(em build programs"  "" PAGE START
.IX  "programming tools"  make  ""  "\fLmake\fP \(em build programs"  PAGE START
.IX  "build" "programs \(em \fLmake\fP"
.IX  "maintain programs make"  ""  "maintain programs \(em \fLmake\fP"  ""  PAGE START
.IX  "update programs make"  ""  "update programs \(em \fLmake\fP"  ""  PAGE START
.IX  "regenerate programs make"  ""  "regenerate programs \(em \fLmake\fP"  ""  PAGE START
.SH DESCRIPTION
.LP
.B make
executes a list of shell commands associated with each
.IR target ,
typically to create or update a file of the same name.
.I makefile
contains entries for targets that describe how
to bring them up to date with respect to the files and/or other
targets on which each depends, called
.IR dependencies .
.LP
A target is out of date when the file it describes is missing, or
when one (or more) of its dependency files
has a more recent modification time than that of the target
file.
.B make
recursively scans the list of dependencies for each
.I target
argument (or the first
.I target
entry in the
.I makefile
if no
.I target
argument is supplied) to generate a list of targets to check.
It then checks, from the bottom up,
each target against any files it depends on to see if it is out
of date.  If so,
.B make
rebuilds that target.
.LP
To rebuild a target,
.B make
executes the set of shell commands, called a
.IR rule ,
associated with it.  This rule may be listed explicitly in a
makefile entry for that target, or it may be supplied implicitly by
.BR make .
.LP
If no
.I makefile
is specified on the command line,
.B make
uses the first file it finds with a name from the following
list:
.IP
.BR makefile ,
.BR Makefile ,
.BR s.makefile ,
.BR s.Makefile ,
.BR \s-1SCCS\s0/s.makefile ,
.BR \s-1SCCS\s0/s.Makefile .
.LP
If no
.I target
is specified on the command line,
.B make
uses the first target defined in
.IR makefile .
If a
.I target
has no
.I makefile
entry,
or if its entry has no rule,
.B make
attempts to update that target using an implicit rule.
.SH OPTIONS
.TP
.BI \-f " makefile"
Use the description file
.I makefile.
A
.RB ` \- '
as the
.I makefile
argument denotes the standard input.  The contents of
.IR makefile ,
when present, override the builtin rules.  When more than one
.RB ` "\-f\fI\ makefile" '
argument pairs appear,
.B make
takes input from each
.I makefile
in the order listed (just as if they were run through
.BR cat (1V)).
.TP
.B \-b
This option has no effect, but is present for compatibility reasons.
.TP
.B \-d
Debug mode.
Print out detailed information on files and times examined.
.TP
.B \-e
Environment variables override assignments within makefiles.
.TP
.B \-i
Ignore error codes returned by invoked commands.
.TP
.B \-k
When a nonzero error status is returned by an invoked command,
abandon work on the current target but continue with other branches
that do not depend on that target.
.TP
.B \-n
No execution mode. 
Print commands, but do not execute them.
Even lines beginning with an
.B @
are printed.  However, if a command line contains the
.B $(\s-1MAKE\s0)
macro, that line is always executed (see the discussion of
.SB MAKEFLAGS
in
.BR "Environment Variables and Macros" ).
.TP
.B \-p
Print out the complete set of macro definitions and target descriptions.
.TP
.B \-q
Question mode.
.B make
returns a zero or nonzero status code depending
on whether or not the target file is up to date.
.TP
.B \-r
Do not use the the implicit rules
.B make
supplies by default.
Implicit rules defined in the makefile remain in effect.
.TP
.B \-s
Silent mode.
Do not print command lines before executing them.
.TP
.B \-S
Undo the effect of the
.B \-k
option.
.TP
.B \-t
Touch the target files (bringing them up to date) rather than performing
commands listed in their rules.
.br
.ne 5
.TP
.IB macro-name = value
Macro definition.
This definition overrides any definition for the
specified macro that occurs in the makefile itself, or in the
environment.  See
.B Macros
and
.IR "Environment Variables and Macros" ,
for details.
.SH USAGE
.LP
Refer to
.TX DMBG
and
.TX PUL
for tutorial information about
.BR make .
.SS "Targets and Rules"
.LP
There need not be an actual file named by a target, but every
dependency in the dependency list must be either the name of a file,
or the name of another target.
.LP
If the target has no dependency list and no rule, or if the target
has no entry in the makefile,
.B make
attempts to produce an entry by selecting a rule from its its
set of implicit rules.  If none of the implicit rules apply,
.B make
uses the rule specified in the
.SB \&.DEFAULT
target (if it appears in the makefile).  Otherwise
.B make
stops and produces an error message.
.SS "Makefile Target Entries"
.LP
A target entry has the following format:
.RS
.DT
.HP
.I target .\|.\|.
.B :
.RI [ dependency "] .\|.\|."
.RB [ ;
.IR command "] .\|.\|.
.br
.nf
.RI [ command ]
\&.\|.\|.
.fi
.RE
.LP
The first line contains the name of a target (or a space-separated
list of target names), terminated with a colon
.RB ( : ).
This may be followed by a
.IR dependency ,
or a dependency list that
.B make
checks in the order listed.
The dependency list may be terminated with a semicolon
.RB ( ; ),
which in turn can be followed by a Bourne shell command.
Subsequent lines in the target entry begin with a
.SM TAB\s0,
and contain Bourne shell commands.
These commands comprise a rule for building the target, and are
performed when the target is updated by
.BR make .
.LP
Shell commands may be continued across input lines by escaping the
.SM NEWLINE
with a backslash
.RB ( \|\e\| ).
The continuing line must also start with a
.SM TAB\s0.
.LP
To rebuild a target,
.B make
expands any macros, strips off initial
.SM TAB\*S
characters and passes each resulting command line to a Bourne shell for execution.
.LP
The first nonblank line that does not begin with a
.SM TAB
or
.B #
begins another target or macro definition.
.SS "Makefile Special Characters"
.TP
.B ::
Conditional dependency branch.  When used in place of a colon
.RB ( : )
the double-colons allow a target to be checked and updated with respect
to more than one dependency list.  The double-colons allow the target
to have more than one branch entry in the makefile, each with a
different dependency list and a different rule.
.B make
checks each branch, in order of appearance, to see if the target is
outdated with respect to its dependency list.  If so,
.B make
updates the target according to dependencies and rule for that branch.
.TP
.B #
Start a comment.
The comment ends at the next
.SM NEWLINE\s0.
.TP
.B $
Macro expansion.
See
.BR Macros ,
below, for details.
.TP
.B \-
Following the
.SM TAB\s0,
if the first character of a command line is a
.RB ` \- ',
.B make
ignores any nonzero error code it may return.
.B make
normally terminates when a command returns nonzero status, unless the
.B \-i
or
.B \-k
options are in effect.
.TP
.B @
Following the
.SM TAB\s0,
if the first character is a
.RB ` @ ',
.B make
does not print the command line before executing it.
.IP
If
.RB ` \- '
and
.RB ` @ '
appear as the first two characters after the
.SM TAB\s0,
both apply.
.TP
.B $$
The dollar-sign, escaped from macro expansion.  Can be used to
pass variable expressions beginning with
.B $
to the shell.
.SS "Command Execution"
.LP
Command lines are executed one at a time,
.IR "each by its own shell" .
Shell commands, notably
.BR cd ,
are ineffectual across an unescaped
.SM NEWLINE
in the makefile.
A line is printed (after macro expansion) as it is executed, unless
it starts with a
.RB ` @ ',
there is a
.SB \&.SILENT
entry in the dependency hierarchy of the current target, or
.B make
is run with the
.B \-s
option.
Although the
.B \-n
option specifies printing without execution, lines containing the macro
.B $(\s-1MAKE\s0)
are executed regardless, and lines containing the
.B @
special character are printed.
The
.B \-t
(touch) option updates the modification date of a file without executing
any rules.  This can be dangerous when sources are
maintained by more than one person.
.LP
To take advantage of the Bourne shell
.B if
control structure for branching, use a command line of the form:
.RS
.nf
.B if
.IB expression "; \e"
.B then
.IB command "; \e"
.IB command "; \e"
\&.\|.\|.
.B elif
.IB expression "; \e"
\&.\|.\|.
.B else
.IB command "; \e"
.B fi
.fi
.RE
Although composed of several input lines, the escaped
.SM NEWLINE 
characters insure that
.B make
treats them all as one command line.
To take advantage of the Bourne shell
.B for
control statement, use a command line of the form:
.RS
.nf
.BI for " var " in " list " "; do \e"
.IB command " ; \e"
\&.\|.\|.
.B done
.fi
.RE
To write shell variables, use double dollar-signs
.RB ( \|$$\| ).
This escapes expansion of the dollar-sign by
.BR make .
.SS Signals
.LP
.SM INT
and
.SM QUIT
signals received from the keyboard halt
.B make
and remove the target file being processed
(unless it is in the dependency list for 
.BR \&.\s-1PRECIOUS\s0 ).
.SS "Special-Function Targets"
.LP
When incorporated in a makefile, the following
target names perform special functions.
.TP 12
.SB \&.DEFAULT
If this target is defined in the makefile, its rule is used when
there is no entry in the makefile for a given target and none
of the implicit rules applies.
.B make
ignores the dependency list for this target.
.TP
.SB \&.PRECIOUS
List of files not to delete.  
Files listed as dependencies for this target are
not removed if
.B make
is interrupted while rebuilding them.
.TP
.SB \&.SILENT
Run silently.  
When this target appears in the makefile,
.B make
does not echo commands before executing them.
.TP
.SB \&.IGNORE
Ignore errors.  
When this target appears in the makefile,
.B make
ignores nonzero error codes returned from commands.
.TP
.SB \&.SUFFIXES
The suffixes list for selecting implicit rules (see
.BR "Implicit Rules" ).
.SS "Include Files"
.LP
.B make
has an include file capability.  If the word
.B include
appears as the first seven letters of a line,
and is followed by a
.SM SPACE
or a
.SM TAB\s0,
the string that follows
is taken as a filename.  The text of the named file is read in
at the current location in the makefile.
.B include
files can be nested to a depth of no more than about 16.
.br
.ne 8
.SS Macros
Entries of the form
.IP
.IB macro-name = value
.LP
define macros.
.I name
is the name of the macro, and
.IR value ,
which consists of all characters up to a comment character or
unescaped
.SM NEWLINE\s0,
is the value.
Words in a macro value are delimited by
.SM SPACE\s0,
.SM TAB\s0,
and
escaped
.SM NEWLINE
characters, and the terminating
.SM NEWLINE\s0.
.LP
Subsequent references to the macro, of the forms:
.BI $( name )
or
.BI ${ name }
are replaced by
.IR value .
The parentheses or brackets can be omitted in a reference to a
macro with a single-character name.
.LP
Macros definitions can contain references to other macros, but
the nested references aren't expanded immediately.  Instead,
they are expanded along with references to the macro itself.
.LP
Substitutions within macros can be made as follows:
.IP
.BI $( name : str1 = str2\fB)
.LP
where
.I str1
is either a suffix, or a word to be replaced in the macro
definition, and
.I str2
is the replacement suffix or word.
.SS Dynamically Maintained Macros
.LP
There are several dynamically maintained macros that are useful
as abbreviations within rules.
.TP
.B $*
The basename of the current target.  It is assigned only
for implicit rules.
.TP
.B $<
The name of the file on which the target is assumed to depend.
This macro is only assigned for implicit rules, or within the
.SB \&.DEFAULT
target's rule.
.TP
.B $@
The name of the current target.  
It is assigned only for rules
in targets that are explicitly defined in the makefile.
.TP
.B $?
The list of dependencies with respect to which the target
is out of date.  This macro is assigned only for explicit rules.
.TP
.B $%
The library member. The 
.B $% 
macro is only evaluated when the target is an
archive library member of the form:
.IB lib ( file ".o )"\fR. 
In this case,
.B $@
evaluates to
.I lib
and
.B $%
evaluates to the library member,
.IB file .o\fR.
.LP
All of these macros but
.B $?
can be modified to apply either to the filename part, or the
directory part of the strings they stand for, by adding an
upper case
.B F
or
.BR D ,
respectively (and enclosing the resulting name in parentheses or
braces).  Thus,
.RB ` $(@D) '
refers to the directory part of the string
.RB ` $@ '.
If there is no directory part,
.RB ` \&. '
is generated.
.SS Environment Variables and Macros
.LP
After reading in its implicit rules,
.B make
reads in
variables from the environment, treating them as if they were
macro definitions.  Only then does
.B make
read in a makefile.
Thus, macro assignments within a makefile override environment
variables, provided that the
.B \-e
option is not in effect.  In turn,
.B make
exports environment variables to each shell it invokes.  Macros
not read in from the environment are
.I not
exported.
.LP
The
.SB MAKEFLAGS
macro is a special case.
When present as an environment variable,
.B make
takes its options (except for
.BR  \-f ,
.BR  \-p ,
and
.BR  \-d )
from
.SB MAKEFLAGS
in combination with any flags entered on the command line.
.B make
retains this combined value, exports it automatically to each
shell it forks, and reads its value to obtain options for any
.B make
commands it invokes.  Note, however that flags passed with
.SB MAKEFLAGS
even though they are in effect, are not shown in the output produced by
.BR make .
.LP
The
.SB MAKE
macro is another special case.  It has the value 
.B make
by default, and temporarily overrides the
.B \-n
option for any line that contains a reference to it.
This allows nested invocations of
.B make
written as:
.IP
.BR $(\s-1MAKE\s0) " .\|.\|."
.LP
to run recursively,
so that the command 
.B make \-n 
can be used to test an
entire hierarchy of makefiles.
.LP
For compatibility with the 4.2 
.SM BSD
.BR make ,
the
.SB MFLAGS
macro is set from the
.SB MAKEFLAGS
variable by prepending a
.RB  ` \- '.
.SB MFLAGS
is not exported automatically.
.LP
.B make
supplies the following macros for compilers and their options:
.TS
lBp-1 l lBp-1 l .
CC	\fBC\fR compiler, \fBcc\fR\|(1V)	CFLAGS	\fBC\fR compiler options
FC	\s-1FORTRAN\s0 77 compiler, \fBf77\fR\|(1)	FFLAGS	\s-1FORTRAN\s0 77 compiler options
		RFLAGS	\s-1FORTRAN\s0 77 compiler options with Ratfor (\fB.r\fR) source files
PC	Pascal compiler, \fBpc\fR\|(1)	PFLAGS	Pascal compiler options
M2C	Modula-2 compiler 	M2FLAGS 	Modula-2 compiler options
GET	\fBsccs\fR\|(1) \fBget\fR command	GFLAGS	\fBsccs get\fR options
AS	the assembler, \fBas\fR\|(1)	ASFLAGS 	assembler options
LD  	the linker, \fBld\fR\|(1)	LDFLAGS 	linker options
LEX 	\fBlex\fR\|(1) 	LFLAGS 	\fBlex\fR options
YACC 	\fByacc\fR\|(1)	YFLAGS	\fByacc\fR options
.TE
Unless these macros are  read in as environment variables,
their values are not exported by
.BR make .
If you run
.B make
with any these set in the environment, it is a good idea to add
commentary to the makefile to indicate what value each takes.
If
.B \-r
is in effect,
.B make
ignores these macro definitions.
.DT
.LP
When set to a single-word value such as
.BR /usr/bin/csh ,
the
.SB SHELL
macro indicates the name of an alternate shell to use for
invoking commands.  Note: to improve normal performance
.B make
executes command lines that contain no shell
metacharacters directly.  Such builtin commands as
.BR dirs ,
or
.BR set
in the C shell are not recognized unless the command line includes a
metacharacter (for instance, a semicolon).
.\"
.\".SS Target/Dependency File Search Path
.\"Normally,
.\".B make
.\"searches for target and dependency files in the current working
.\"directory.  To extend this search, set the
.\".SB VPATH
.\"macro to contain a colon-separated list of additional directories.
.\".LP
.\"If a target or dependency is found,
.\".B make
.\"uses entire pathname, rather than just the filename part.
.\".LP
.\"To maintain multiple versions of target files,
.\"isolate dependency files in a directory listed in the search
.\"path, and
.\".B make
.\"each version from within a directory outside that search path.
.\"
.SS Implicit Rules
.LP
.B make
supplies implicit rules for certain types of targets that have no
explicit rule defined in the makefile.  For these types of targets,
.B make
attempts to select an implicit rule by looking for an association
between the target and a file in the directory that shares its
basename.  That file, if found, is presumed to be a dependency file.
The implicit rule is selected according to the target's suffix
(which may be null), and that of the dependency file.
If there is no such dependency file, if the suffix of either dependency
or target is not the suffixes list, or if there is no implicit
rule defined for that pair of suffixes, no rule is selected.
.B make
either uses the default rule that you have supplied (if any), or stops.
.LP
The suffixes list is a target with each known suffix listed
as a dependency, by default:
.RS
.HP
.SB \&.SUFFIXES:
.B
\&.o  .c  .c\*~  .mod  .mod\*~  .sym  .def  .def\*~  .p
.B
\&.p\*~  .f  .f\*~  .r  .r\*~  .y  .y\*~  .l  .l\*~
.br
.B \&.s  .s\*~  .sh  .sh\*~  .h  .h\*~
.RE
Multiple suffix-list targets accumulate; a 
.SB \&.SUFFIXES
target with no dependencies clears the list of suffixes.  Order is
significant;
.B make
selects a rule that corresponds to the target's suffix and the first
dependency-file suffix found in the list.
.LP
A tilde
.RB ( \(ap )
refers to the
.BI s. prefix
of an 
.SM SCCS 
history file (see
.BR sccs (1)).
If
.B make
cannot locate a history file (with a name of the form
.BI s. basename.suffix\fR)
in the current working directory, it checks for one in the
.SM SCCS 
subdirectory (if that directory exists) for one from which to
.BR get (1)
the dependency file.
.LP
An implicit rule is a target of the form:
.RS
.sp
.IB dt :
.ti +5
.I rule
.RE
.LP
where
.I t
is the suffix of the target,
.I d
is the suffix of the dependency, and
.I rule
is the implicit rule for building such a target from such a dependency.
Both
.I d
and
.I t
must appear in the suffixes list for
.B make
to recognize the target as one that defines an implicit rule.
.LP
An implicit rule with only one suffix describes how to build
a target having a null (or no)
suffix, from a dependency having the indicated suffix.  For instance,
the
.B \&.c
rule describes how to build the executable
.I file
from a
.B C
source file,
.IB file .c\fR.
.LP
Implicit rules are supplied for the following suffixes and suffix pairs:
.IP
.RS
.ft B
\&.c  .c\*~  .p  .p\*~  .mod  .mod\*~  .f  .f\*~  .F  .F\*~  .r  .r\*~
\&.sh  .sh\*~
\&.c.o  .c\*~.o  .c\*~.c  .p.o  .p\*~.o  .p\*~.p  .mod.o  .mod\*~.o
\&.mod\*~.mod
\&.def.sym  .def\*~.sym  .def\*~.def .f.o  .f\*~.f  .F.o  .F\*~.o
\&.F\*~.F
\&.r.o  .r\*~.o  .r\*~.r  .s.o  .s\*~.o .s\*~.s .sh\*~.sh .y.o
\&.y\*~.o  .l.o  .l\*~.o
\&.y.c  .y\*~.c  .y\*~.y  .l.c  .l\*~.c  .l\*~.l  .c.a  .c\*~.a
\&.s\*~.a  .h\*~.h
.ft R
.RE
.LP
These rules can be changed within a makefile, and additional
implicit rules can be added.
To print out
.BR make 's
internal rules, use the following command.
Note: this command only works with the Bourne Shell:
.IP
.RS
.nf
$  \fBmake \|\-fp \|\- \|2>/dev/null \|</dev/null\fP
.fi
.RE
.LP
If you are using the C shell, use this command to print out
.BR make 's
internal rules:
.IP
.RS
.nf
.B "example%  (make \|\-fp \|\- \|</dev/null \|>/dev/tty) \|>&/dev/null"
.fi
.RE
.SS Library Maintenance
.LP
If a target name contains parentheses, as with:
.RS
.LP
.B lib.a(member)
.RE
.LP
it is assumed to be the name of an archive
.RB ( ar (1V))
library.  The string within the parentheses
refers to a member of the library.  (If the string contains
more than one word, the only first word is used.)
A member of an archive can be explicitly made to depend on a
file with a matching filename.  For instance, given a directory that
contains the files
.B mem1.c
and
.BR mem2.c ,
along with a makefile with the entries:
.RS
.LP
.B lib.a: lib.a(mem1.o) lib.a(mem2.0)
.TP
.B lib.a(mem1.o): mem1.o
.B ar rv lib.a mem1.o
.TP
.B lib.a(mem2.o): mem2.o
.B ar rv lib.a mem2.o
.RE
.LP
.BR make ,
when run, compiles the
.B \&.c
files into relocatable object
.RB ( .o )
files using the
.B \&.c.o
implicit rule.  It then loads the freshly compiled version of
each file into the library according to the explicit rules in
the 
.BR lib.a() targets.
.LP
Implicit rules pertaining to archive libraries have the form
.BI \&.\| \s-1XX\s0 .a
where the
.SM
.I XX
is the suffix from which the archive member is to be made.
An unfortunate byproduct of the current implementation
requires that
.SM
.I XX
to be different from the suffix of the archive member itself.
For instance, the target 
.BI lib( file .o) 
cannot depend upon the
.IB file .o 
explicitly, but instead, must be made to depend
on a source file, such as
.IB file .c\fR.
For this reason it is recommended that you define an
explicit target in the makefile for each library member to
maintain, as shown above.
.LP
A target name of the form
.IP
.IB library (( entry-point ))
.LP
refers to the member of a randomized object library (see
.BR ranlib (1))
that defines the symbol
.IR entry-point .
.SH EXAMPLES
.LP
This
.I makefile
says that
.B pgm
depends on two files
.B a.o
and
.BR b.o ,
and that they in turn depend on their corresponding source files
.RB ( a.c
and
.BR b.c )
along with a common file
.BR incl.h :
.LP
.RS
.TP
.B pgm: a.o b.o
.B cc a.o b.o \-o $@
.TP
.B a.o: incl.h a.c
.B cc \-c a.c
.TP
.B b.o: incl.h b.c
.B cc \-c b.c
.PD
.RE
The following
.I makefile
uses the builtin inference rules to express the same dependencies:
.br
.ne 6
.RS
.TP
.B pgm: a.o b.o
.B cc a.o b.o \-o pgm
.TP
.B a.o b.o: incl.h
.PD
.RE
.SH FILES
.PD 0
.TP 20
.RI [ Mm ] akefile
.TP
.BI s.\fR[ Mm\fR]\fPakefile
.TP
.BI \s-1SCCS\s0/s.\fR[ mM\fR]\fPakefile
.TP
.B /usr/bin/csh
.PD
.SH DIAGNOSTICS
.TP
.BI "Don't know how to make " target "\|. Stop."
There is no makefile entry for
.IR target ,
and none of
.BR make 's
implicit rules apply (there is no dependency file with
a suffix in the suffixes list, or the target's suffix is not in
the list).
.TP
.BI *** " target " removed.
.B make
was interrupted in the middle of trying to build
.IR target .
Rather than leaving a partially-completed version
that is newer than its dependencies, make removes the file
associated with
.IR target .
.TP
.BI "*** Error code " n .
The previous shell command returned a nonzero error code.
In this case
.I make
stops, unless either the
.B \-k
or the
.B \-i
option is set, the target
.SB \&.IGNORE
appears, or the command is prefixed with a
.RB ` \- '
in the makefile.
.TP
.BI *** " signal message"
The previous shell command was aborted due to a signal.  If
.RB ` "\- core dumped" '
appears after the message, a
.B core
file was created.
.SH SEE ALSO
.BR ar (1V),
.BR cat (1V),
.BR cc (1V),
.BR cd (1),
.BR csh (1),
.BR get (1),
.BR lex (1),
.BR ranlib (1),
.BR sccs (1),
.BR sh (1)
.LP
.TX DMBG
.br
.TX PUL
.SH BUGS
Some commands return nonzero status inappropriately; use
.B \-i
to overcome the difficulty.
.LP
Filenames with the characters
.BR = ,
.BR : ,
and
.B @
will not work.
.LP
You cannot build 
.BI lib( file .o) 
from 
.IB file .o\fR.
.LP
The macro substitution
.B  $(a:.o=.c~)
does not work.
.LP
Options supplied by
.SB MAKEFLAGS
should appear in output from
.BR make .
.IX  "make command"  ""  "\fLmake\fP \(em build programs"  "" PAGE END
.IX  "programming tools"  make  ""  "\fLmake\fP \(em build programs" PAGE END
.IX  "maintain programs make"  ""  "maintain programs \(em \fLmake\fP"  ""  PAGE END
.IX  "update programs make"  ""  "update programs \(em \fLmake\fP"  "" PAGE END
.IX  "regenerate programs make"  ""  "regenerate programs \(em \fLmake\fP"  ""  PAGE END
AKE
macro is another special case.  It has the value 
.B make
by default, and temporarily overrides the
.B \-n
option for any line that contains a reference to it.
This allows nested invocations of
.B make
written as:
.IP
.BR $(\s-1MAKE\s0) " .\|.\|."
.LP
to run recursively,
so that the command 
.B make \-n 
can be used to test an
entire hierarchy of makefiles.
.LP
For compatibility with the 4.2 
.SM BSD
.BR make ,
the
.SB MFLAGS
mac./share/man/man1/old-perfmon.1                                                                         755       0      12           75  4424740701  11151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-perfmon.1 1.5 89/03/26 SMI;
.so man1/perfmeter.1
 ,  	old-pti.1   ,  -  
old-setkeys.1 ,  D  .  
old-sun3cvt.1 D  \  /  old-syslog.1  \  t  0  
old-ttytool.1 t    1  old-uncompact.1     2  old-vc.1 .1     3  on.1c .1    4  onintr.1  d-    5  organizer.1     6  othertools.1      7  
overview.1      8  pack.1 w  $  9  page.1 k  8  :  
pagesize.1   L  ;  passwd.1 1 e  \  <  paste.1   l  =  pcat.1 t  |  >  pdp11.1 ./share/man/man1/old-prmail.1                                                                          755       0      12         1435  4424740701  11030                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-prmail.1 1.18 89/03/26 SMI; from UCB 4.1
.TH OLD-PRMAIL 1 "22 March 1989"
.SH NAME
old-prmail \- display waiting mail
.SH SYNOPSIS
.B /usr/old/prmail
.RI [ " user " "] .\|.\|."
.SH DESCRIPTION
.IX  "prmail command"  ""  "\fLprmail\fP \(em print waiting mail"
.IX  mail  "print waiting"  ""  "print waiting \(em \fLprmail\fP"
.IX  print "print waiting mail \(em \fLprmail\fP"
.IX  display "waiting mail \(em \fLprmail\fP"
.LP
Note: This program is considered to be obsolete, and will not be 
distributed or supported in future Sun releases. 
.LP 
.B prmail
displays waiting mail for you, or the specified
.IR user s.
The mail is not disturbed.
.SH FILES
.PD 0
.TP 20
.BR /var/spool/mail/ *	
waiting mail files
.PD
.SH SEE ALSO
.BR biff(1), 
.BR mail(1), 
.BR from (1), 
.BR binmail (1)
 ranlib.1 uot    N  rasfilter8to1.1     O  
rastrepl.1 o    P  rcp.1c t    Q  rdist.1     R  red.1      S  refer.1     T  rehash.1 efe    U  repeat.1 h.1  (  V  reset.1   8  W  ./share/man/man1/old-pti.1                                                                             755       0      12         2217  4424740702  10340                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-pti.1 1.15 89/03/26 SMI; from UCB 4.1
.TH OLD-PTI 1 "22 March 1989"
.SH NAME
old-pti \- phototypesetter interpreter
.SH SYNOPSIS
.B /usr/old/pti
[
.I filename .\|.\|.
]
.SH DESCRIPTION
.IX  "pti command"  ""  "\fLpti\fP \(em (old) \fLtroff\fP interpreter"
.IX  "document production"  "pti command"  ""  "\fLpti\fP \(em (old) \fLtroff\fP interpreter"
.IX  "interpret (old) troff output pti"  ""  "interpret (old) \fLtroff\fP output \(em \fLpti\fP"
.IX  "CAT interpreter"  ""  "C/A/T interpreter \(em \fLpti\fP"
.LP
Note: This program is considered to be obsolete, and will not be 
distributed or supported in future Sun releases. 
.LP 
.B pti
shows the commands in a stream from the standard output of
.BR troff (1)
using
.BR troff 's
.B \-t
option, interpreting the  commands as they would act on the typesetter.
Horizontal motions show as counts in internal units and
are marked with 
.BR < " and " > 
indicating left and right motion.
Vertical space is called
.I leading
and is also indicated.
.LP
The output is really cryptic unless you are an experienced C/A/T
hardware person.  It is better to use 
.RB ` "troff\ \ \-a" '.
.SH SEE ALSO
.BR troff (1)
rup.1c     `  
ruptime.1c .    a  	rusers.1c e.     b  rwall.1c s.1    c  rwho.1c      d  sact.1   8  e  sccs-admin.1 1   L  f  
sccs-cdc.1 1  `  g  sccs-comb.1   x  h  sccs-delta.1 .1     i  
sccs-get.1 1    j  sccs-help.1     k  
sccs-prs.1 l    l  
sccs-prt.1 s    m  sccs-rmdel.1 1 s    n  sccs-sac./share/man/man1/old-setkeys.1                                                                         755       0      12        14511  4424740702  11253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-setkeys.1 1.20 89/03/26 SMI;
.TH OLD-SETKEYS 1 "22 March 1989"
.SH NAME
old-setkeys \- modify interpretation of the keyboard
.SH SYNOPSIS
.B /usr/old/setkeys
[
\fBreset\fR |
\fBnosunview\fR |
[ [
.B lefty
] [
.B noarrows
] ] ] [
\fBsun1\fR |
\fBsun2\fR |
.B sun3
]
.SH Sun386i SYNOPSIS
.B setkeys
[
\fBreset\fR |
\fBnosunview\fR |
[ [
.B lefty
] [
.B noarrows
] ] ] [
\fBsun1\fR |
\fBsun2\fR |
.BR sun3 |
.B sun4
]
.SH DESCRIPTION
.IX setkeys "" "\fLsetkeys\fR \(em change keyboard layout"
.LP
.B setkeys
has been superseded by the
.B Input
category in
.BR defaultsedit (1),
and by the program
\fBinput_from_defaults\fR (1).
It is retained for backwards compatibility on Sun-2, Sun-3 and
Sun-4 systems.
.SH Sun386i DESCRIPTION
.LP
.B setkeys
changes the kernel's keyboard translation tables,
converting a keyboard to one of a number of
commonly desired configurations.
It takes an indication of the modifications
to be performed, and optionally,
the kind of keyboard attached to the user's machine.
It affects all keyboard input for the machine it is run on
(in or out of the window system)
until that effect is superseded by rebooting,
or by running
.RB ` "setkeys reset" '.
.SH OPTIONS
.TP
.I modifications
Empty, or one of
.BR reset ,
.BR nosunview ,
or some combination of
.B lefty
and
.BR noarrows .
By default, the keyboard is set to produce
the SunView function-key codes
.RB ( Stop ,
.BR Props ,
.BR Front ,
.BR Close ,
.BR Find ,
.BR Again ,
.BR Undo ,
.BR Copy ,
.BR Paste
and
.BR Cut ;
.TX SVBG .
On Sun2 and Sun3 keyboards, this
is meaningless; on the Sun1, those functions
are assigned to two columns of
the right numeric-function pad.
.TP
.B lefty
Indicate the SunView functions are to be produced from keys on
the right side of the keyboard, convenient for using the mouse in the
left hand.
.IP
On the Sun2 and Sun3 systems, the SunView functions are reflected to the
outside columns of the right function pad; those right-side functions
are distributed in a more complicated fashion dictated by keeping the
arrow keys together; see below.  Also, the Line Feed key, immediately
below Return, is converted to a second Control.
.IP
On the Sun1,
.B lefty
is the same as the default, since there is no left
function pad.
.TP
.B noarrows
Reassign the keys with cursor arrows on their caps to
produce simple function codes (so they may be used with filters in the
textsw, or mapped input in the ttysw).
.TP
.B nosunview
Only valid on Sun2 and Sun3 keyboards,
or on a Sun4 keyboard used with 386i architecture.
.B nosunview
is incompatible with
.BR lefty ,
.BR noarrows ,
or
.BR reset .
This option assigns new codes to keys F1 and L2 - L10,
codes that are not normally produced anywhere on the keyboard.
These codes may be selected by a
.I mapi
or
.I mapo
operation defined in a user's
.B .ttyswrc
file.
.IP
This option supports a measure of backwards compatibility to
programs that apply some other interpretation to the affected
function keys.
It allows them to access the new codes when the standard codes would
be preempted by SunView functions (for instance, in a
.BR tty (1)
subwindow).
.TP
.B reset
Incompatible with
.BR lefty ,
.BR noarrows ,
or
.BR nosunview ;
it causes the keyboard to be reset to its original interpretation.
.TP
.I "keyboard-type"
One of
.BR sun1 ,
.BR sun2 ,
or
.BR sun3 .
.B sun4
is available with 386i architecture only.   Normally, this option is omitted;
the type of keyboard attached to the
system is obtained from the kernel.
If included, the option is believed in
preference to the kernel's information.
.B setkeys
treats Sun2 and Sun3 keyboards
identically except when the modification is
.BR reset .
.IP
Note: the keyboard type is not necessarily
the same as the machine type.
A Sun1 keyboard is the
.SM VT\s0100-style
keyboard shipped with Model 100Us,
while Sun2 and Sun3 keyboards may be attached interchangeably
to Sun-2 and Sun-3 machines.
A Sun3 keyboard is distinguished by its aerodynamic housing,
and the presence of Caps and Alternate keys.
.LP
Options may appear in any order, and case is not significant.  The
accompanying diagrams show the exact distribution of codes for each
combination of keyboard and arguments to setkeys.
.SH EXAMPLES
.LP
The command
.IP
.B setkeys lefty noarrows
.LP
puts the SunView functions on the right pad of the keyboard,
replacing arrow keys by the corresponding right-function codes, and
displacing right-function codes to the left pad.
.LP
The command:
.IP
.B setkeys sun1 reset
.LP
restores a Sun1 keyboard to its original arrangement.
.SH "SEE ALSO"
.BR defaultsedit (1),
.BR input_from_defaults (1),
.BR kb (4M)
.LP
.TX SVBG
.SH BUGS
.B setkeys
affects the kernel's key tables, which in turn affects all users
logged in to the system.
.SH DIAGRAMS
.nf
.ft B
Sun1,	reset:
		  ^    V    <    >
	[	standard	 ]	TF1	TF2	TF3	TF4
	[	 typing		 ]	 7	 8	 9	 -
	[	  array		 ]	 4	 5	 6	 ,
	[	   ....		 ]	 1	 2	 3	En-
					     0		 .	ter
	default / lefty:
		  ^    V    <    >
	[	standard	 ]	Again	RF1	Stop	RF2
	[	 typing		 ]	Undo	RF3	Props	RF4
	[	  array		 ]	Put	RF5	Front	RF6
	[	   ....		 ]	Get	RF7	Close	RF8
					  Delete	Find	
	default / lefty, noarrow:
		   TF1 TF2 TF3 TF4
	[	standard	 ]	Again	RF1	Stop	RF2
	[	 typing		 ]	Undo	RF3	Props	RF4
	[	  array		 ]	Put	RF5	Front	RF6
	[	   ....		 ]	Get	RF7	Close	RF8
					  Delete	Find
.ne 50
Sun2 & Sun3,
	reset / default:
			TF1 TF2 ...	  ]
	Stop	Again	[     standard	  ]	RF1	RF2	RF3
	Props	Undo	[      typing	  ]	RF4	RF5	RF6
	Front	Put	[       array	  ]	RF7	 ^	RF9
	Close	Get	[		Retn	 <	RF11	 >
	Find	Delete	[		 LF	RF13	 V	RF15
	noarrows (only):
			TF1 TF2 ...	  ]
	Stop	Again	[     standard	  ]	RF1	RF2	RF3
	Props	Undo	[      typing	  ]	RF4	RF5	RF6
	Front	Put	[       array	  ]	RF7	RF8	RF9
	Close	Get	[		Retn	RF10	RF11	RF12
	Find	Delete	[		 LF	RF13	RF14	RF15
	lefty:
			TF1 TF2 ...	  ]
	Stop	RF1	[     standard	  ]	Again	 <	Stop
	RF6	RF4	[      typing	  ]	Undo	 >	Props
	RF9	RF7	[       array	  ]	Put	 ^	Front
	RF12	RF10	[		Retn	Get	RF11	Close
	RF15	RF13	[		Ctrl	Delete	 V	Find
	lefty, noarrows
			TF1 TF2 ...	  ]
	Stop	RF1	[     standard	  ]	Again	RF2	Stop
	RF6	RF4	[      typing	  ]	Undo	RF5	Props
	RF9	RF7	[       array	  ]	Put	RF8	Front
	RF12	RF10	[		Ret	Get	RF11	Close
	RF15	RF13	[		Ctrl	Delete	RF14	Find
	nosunview:
			LF11 TF2 ...	  ]
	Stop	TF11	[     standard	  ]	RF1	RF2	RF3
	LF12	TF12	[      typing	  ]	RF4	RF5	RF6
	LF13	TF13	[       array	  ]	RF7	 ^	RF9
	LF14	TF14	[		Ret	 <	RF11	 >
	LF15	TF15	[		LF	RF13	 V	RF15
.fi
ance
.B make
executes command lines that contain no shell
metacharacters directly.  Such builtin commands as
.BR dirs ,
or
.BR set
in the C shell are not recognized unless the command./share/man/man1/old-sun3cvt.1                                                                         755       0      12         2610  4424740702  11146                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-sun3cvt.1 1.13 89/03/26 SMI; 
.TH OLD-SUN3CVT 1 "22 March 1989"
.SH NAME
old-sun3cvt \- convert large Sun-2 system executables to Sun-3 system executables
.SH SYNOPSIS
.B /usr/old/sun3cvt
[ 
.I oldfile 
[
.I newfile
] ]
.SH DESCRIPTION
.IX sun3cvt "" "\fLsun3cvt\fR \(em convert large Sun-2 executables to Sun-3"
.LP
Note: This program is considered to be obsolete, and will not be 
distributed or supported in future Sun releases. 
.LP 
.B sun3cvt
converts an old Sun-2 system program file (predating Sun release 3.0) into a 
Sun-3 system executable file.
.LP
The default 
.I oldfile 
is 
.BR a.out .  
The default 
.I newfile 
is 
.BR sun3.out .
.LP
.B sun3cvt 
attempts to create a file of the same type (magic number).  
However, for sharable-text files with less than 128kb
of text, the new file will not be sharable (since Sun-3 data
segments must begin on 128kb boundaries).  Also, most programs
have some text in the data segment as a consequence of
the new larger Sun-3 system page and segment sizes.
.LP
.BR execve (2) 
executes an old Sun-2 system program file, but the
program's text is not sharable.  Old pure-text programs with text segments 
larger than 128kb can be made sharable on machines running release 
3.0 or subsequent releases by using 
.BR sun3cvt .
.SH FILES
.PD 0
.TP 20
.B a.out
.RI default " oldfile "
.TP
.B sun3.out
.RI default " newfile "
.PD
.SH SEE ALSO
.BR execve (2)
  l  
sccs-prt.1 s    m  sccs-rmdel.1 1 l    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-ung./share/man/man1/old-syslog.1                                                                          755       0      12         3144  4424740702  11064                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-syslog.1 1.17 89/03/26 SMI; from UCB 4.2
.TH OLD-SYSLOG 1 "22 March 1989"
.SH NAME
old-syslog \- make a system log entry
.SH SYNOPSIS
.B /usr/old/syslog
[
.B \-
] [
.B \-p
] [
.B \-i
.I name
] [
.BI \- level
] [
.RI message \|.\|.\|.
]
.SH DESCRIPTION
.IX  "syslog command"  ""  "\fLsyslog\fP \(em make system log entry"
.IX  make "system log entry \(em \fLsyslog\fP"
.IX  create "system log entry \(em \fLsyslog\fP"
.LP
Note: This program is considered to be obsolete, and will not be 
distributed or supported in future Sun releases. 
.LP 
.B syslog
sends the specified message (or 
.I stdin 
if 
.RB ` "\-" '
is specified)
as a system log entry to the syslog daemon.
The log entry is sent to the daemon on the machine specified by the
.I loghost 
entry in the 
.BR "/etc/hosts " file.
.SH OPTIONS
.TP 
.B \-
Each line of the standard input is sent as a log entry.
.TP
.B \-p
.B syslog
will log its process ID in addition to the other information.
.TP
.BI \-i \ name
The specified name will be used as the \(lq ident \(rq for the log entry.
.TP
.BI \- level
The message will be logged at the specified level.
The level can be specified numerically, in the range 1 through 9,
or symbolically using the names specified in the include file
.B /usr/include/syslog.h 
(with the leading 
.SB LOG_ 
stripped off).
.BR syslog-\s-1HELP\s0 " will list the valid symbolic level names."
Only the super-user can make log entries at levels less than or
equal to 
.SB SALERT.
.SH FILES
.PD
.TP 25
.B /usr/etc/syslogd
syslog daemon
.TP
.B /usr/include/syslog.h	
names of logging levels
.PD
.SH "SEE ALSO"
.BR syslog (3), 
.BR syslogd (8)
   s    v  screenload.1  t    w  script.1 d.1    x   scrolldefaults.1      y  sdiff.1      z  sed.1v     {  selection_svc.1   (  |  set.1 io  <  }  setenv.1 et.  P  ~  	setkeys.1 .1  `    sh.1 etk  t    shelltool.1       shift.1       
shift_lines.1 1       size.1 i      sleep.1       snap.1       soelim.1 nap      ./share/man/man1/old-ttytool.1                                                                         755       0      12           75  4424740702  11222                                                                                                                                                                                                                                                                                                                                                                      .so man1/shelltool.1
.\" @(#)old-ttytool.1 1.6 89/03/26 SMI;
 2  old-vc.1 pac    3  on.1c d-    4  onintr.1 n.1    5  organizer.1     6  othertools.1 .1     7  
overview.1 1    8  pack.1 r  $  9  page.1   8  :  
pagesize.1 e  L  ;  passwd.1 ize  \  <  paste.1   l  =  pcat.1   |  >  pdp11.1     ?  perfmeter.1     @  pg.1v rf    A  plot.1g     B  popd.1     C  pr.1v      D  
printenv.1 1    E  prof.1 n       w.1 ./share/man/man1/old-uncompact.1                                                                       755       0      12          103  4424740702  11505                                                                                                                                                                                                                                                                                                                                                                      .so man1/old-compact.1
.\" @(#)old-uncompact.1 1.12 89/03/26 SMI; 
1c d-    4  onintr.1 n.1    5  organizer.1     6  othertools.1 .1     7  
overview.1 1    8  pack.1 r  $  9  page.1   8  :  
pagesize.1 e  L  ;  passwd.1 ize  \  <  paste.1   l  =  pcat.1   |  >  pdp11.1     ?  perfmeter.1     @  pg.1v rf    A  plot.1g     B  popd.1     C  pr.1v      D  
printenv.1 1    E  prof.1 n       w.1     F  prs.1      G./share/man/man1/old-vc.1                                                                              755       0      12        13341  4424740703  10175                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-vc.1 1.12 89/03/26 SMI;
.TH OLD-VC 1 "22 March 1989"
.SH NAME
old-vc \- version control
.SH SYNOPSIS
.B /usr/old/vc
.RB [ " \-a " ]
.RB [ " \-s " ]
.RB [ " \-t " ]
.RB [ " \-c"\c
.IR c " ]"
.RI [ " keyword" = value ].\|.\|.
.SH DESCRIPTION
.IX "vc command" "" "\fLvc\fR command"  
.LP
The
.B vc
command copies lines from the standard input to the
standard output under control of its 
.I arguments
and the
.I "control statements"
encountered in the standard input.
In the process of performing the copy operation, a reference to a
user-declared
.I keyword
is replaced by its character-string
.IR value ,
when appearing in a plain text line or control statement.
.LP
Copying lines from the standard input to the standard output is
conditional, based on tests (in control statements)
of keyword values specified either in control statements, or as
.B vc
command-line arguments.
.SH OPTIONS
.TP
.B \-a
Force replacement of keyword references in
.I all
text lines, and not just in
.B vc
statements.
.TP
.B \-s
Silent.  Suppress warning messages (but not error messages) that are
normally printed on the diagnostic output.
.TP
.B \-t
If a
.SM TAB
character appears on a line, all characters from the beginning of a
line, up to and including the first
.SM TAB,
are ignored for the purpose of detecting a control statement.
If the
.SM TAB
precedes a control statement, the leading text is discarded.
.TP
.BI \-c c
Specify an alternate control character to use instead of 
.RB ` : '.
.SH USAGE
.LP
.B vc
distinguishes between text input lines and version control statement 
lines.  A version control statement (control statement) is a single
line beginning with a control character.  The default control character
is colon 
.RB ( : ), 
except as modified by the
.BI \-c c
option.  Input lines beginning with a backslash 
.RB ( \|\e\| ), 
and followed by a control character, are not control lines and are copied
to the standard output as text with the backslash removed.  Lines
beginning with a backslash, but not followed by a control character,
are copied in their entirety.
.SS Keyword Replacement
.LP
A keyword is composed of 9 or less alphanumeric characters;
the first must be alphabetic.  A value
is any printable 
.SM ASCII 
character or character string.
An unsigned string of digits is treated as a numeric value in
control operations.  Keyword values may not contain any
.SM SPACE
or
.SM TAB
characters.
.LP
Keyword replacement is performed whenever a keyword, surrounded by
control characters, is encountered on a version control statement.
The
.B \-a
option forces replacement of keywords in
.I all
lines of text.
An uninterpreted control character may be included in a value by
preceding it with 
.RB ` \|\e\| '. 
If a literal 
.RB ` \|\e\| '
is desired, then it too must be preceded by a 
.RB ` \|\e\| '.
.SS "Version Control Statements"
.HP
.B : dcl
.IR keyword [, keyword ]
.IP
Declare a keyword.  All keywords must be declared.
.HP
.B : asg
.IB keyword = value
.IP
Assign a value to  a keyword.  An
.B asg
statement overrides any previous assignment for the corresponding
keyword, including those on the
.B vc
command line.
Keywords declared, but not assigned values, have null values.
.HP
.B :if
.RB [ not ]
.I condition
.PD 0
.TP
\&.\|.\|.
.TP
.B :end
.PD
Skip lines of the standard input.  When 
.I condition
is
.SM TRUE\s0 ,
all lines between the
.B if
statement and
the matching
.B end
statement are 
.I copied
to the standard output.
Otherwise, the intervening lines are discarded and ignored,
.I
including intervening control statements.
Intervening
.B if
and 
.B end
control statements are recognized solely for the purpose of
maintaining the proper
.BR if \- end
matching. The
.B not
argument inverts the sense of the condition.  When it is used,
intervening lines are included in the output only when the
conditions is false.
.IP
.I condition
is a logical expression composed of
.I comparisons
and logical operators.
A
.I comparison
consists of two text values (may be keyword references)
separated by a comparison operator.  Each value must be separated
from all operators by at least one
.SM SPACE\s0 .
Numeric strings are treated as unsigned integers for certain
comparisons.  The comparison operators are:
.RS
.RS
.TP
.B =
equal (string)
.PD 0
.TP
.B !=
not equal (string)
.TP
.B >
greater than (numeric)
.TP
.B <
less than (numeric)
.PD
.RE
.LP
For instance, the line:
.IP
.B :if 
.I xxx 
.B != 
.I yyy
.LP
tests to see whether the string 
.RI ` xxx ' 
is not equal to 
.RI ` yyy ', 
which is
true; subsequent intervening lines are therefore included.
.LP
The logical sense of comparisons can be combined using the
logical operators (in order of precedence):
.RS
.TP
.B ( )
logical grouping
.TP
.B &
and
.PD 0
.TP
.B |
or
.PD
.RE
.LP
For instance, the line
.IP
.B :if
.I xxx
.B =
.I yyy
.B |
.I xxx
.BI != " yyy"
.LP
is true because either comparison will make it true, while
.IP
.B :if 
.I xxx 
.B = 
.I yyy 
.B & 
.I xxx 
.B != 
.I yyy
.LP
is false, because in this case, both comparisons must be true.
.RE
.TP
.BI :: text
Force keyword replacement on lines that are copied to the standard
output, independent from the
.B \-a 
option.  The two leading control characters are removed,
and keywords surrounded by control characters in text are replaced
by their value before the line is copied to the
output file.
.TP
.B :on 
.PD 0
.TP
.B :off
Turn on or off keyword replacement on all lines.
.PD
.TP
.BI :ctl " c"
Change the control character to
.IR c .
.TP
.BI :msg " message"
Print
.I message
on the diagnostic output.
.TP
.BI :err " message"
Print the given message, followed by:
.RS
.IP
.SB ERROR\s0: err statement on line .\|.\|. 
.B (915)
.RE
.IP
on the diagnostic output;
.B vc
halts execution, and returns an exit code of 
.BR 1 .
.SH "SEE ALSO"
.BR help (1)
.SH DIAGNOSTICS
Use
.BR help (1)
for explanations.

s search, set the
.\".SB VPATH
.\"macro to contain a colon-separated list of additional directories.
.\".LP
.\"If a target or dependency is found,
.\".B make
.\"uses entire pathname, rather than just the filename part.
.\".LP
.\"To maintain multiple versions of target files,
.\"isolate ./share/man/man1/on.1c                                                                                 755       0      12         4675  4424740703   7562                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)on.1c 1.13 89/03/26 SMI;
.TH ON 1C "22 March 1989"
.SH NAME
on \- execute a command on a remote system, but with the local environment
.SH SYNOPSIS
.B on
[
.B \-i
] [
.B \-d
] [
.B \-n
]
.I host
.I command
[
.I argument
]
\&.\|.\|.
.SH DESCRIPTION
.IX  "on command"  ""  "\fLon\fP \(em remote command execution"
.IX  "remote command execution"  ""  "remote command execution \(em \fLon\fP"
.LP
The
.B on
program is used to execute commands on another system, in an
environment similar to that invoking the program.
All environment variables are passed, and the current working
directory is preserved.
To preserve the working directory, the working file system
must be either already mounted on the host or be exported to it.
Relative path names will only work if they are within the
current file system; absolute path names may cause problems.
.LP
The standard input is connected to the
standard input of the remote command,
and the standard output and the standard error
from the remote command
are sent to the corresponding files for the
.B on
command.
.SH OPTIONS
.TP
.B \-i
Interactive mode. Use remote echoing and
special character processing.
This option is needed for programs
that expect to be talking to a terminal.
All terminal modes and window size changes are propagated.
.TP
.B \-d
Debug mode. Print out some messages as work is being done.
.TP
.B \-n
No Input. This option causes the remote
program to get
.SM EOF
when it reads from the standard input,
instead of passing the standard input from
the standard input of the
.B on
program.
For example,
.B \-n
is necessary when running commands in the background
with job control.
.SH "SEE ALSO"
.BR chkey (1),
.BR publickey (5),
.BR exports (5),
.BR rexd (8C)
.SH DIAGNOSTICS
.TP 20
.B unknown host
Host name not found.
.TP
.B cannot connect to server
Host down or not running the server.
.TP
.B can't find
Problem finding the working directory.
.TP
.B can't locate mount point
Problem finding current file system.
.B RPC: Authentication error 
The server requires des authentication and you 
do not have a secret key registered with keyserv.
Perhaps you logged in without a password.
Try to keylogin.  If that fails try to
set your publickey with chkey.
.LP
Other error messages may be passed back from the server.
.SH BUGS
.LP
The SunView window system can get confused
by the environment variables.
.LP
When the working directory is remote mounted over
.SM NFS\s0,
a
.B ^Z
hangs the window.
.LP
Root cannot use
.BR on .
iff.1 s  t  t  
screenblank.1 t    u  screendump.1    ./share/man/man1/onintr.1                                                                              755       0      12           74  4424740703  10241                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)onintr.1 1.8 89/03/26 SMI; 
othertools.1  6    7  
overview.1     8  pack.1    $  9  page.1 w  8  :  
pagesize.1 8  L  ;  passwd.1  L  \  <  paste.1   l  =  pcat.1    |  >  pdp11.1     ?  perfmeter.1     @  pg.1v 1     A  plot.1g     B  popd.1      C  pr.1v  t    D  
printenv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1    0  H  ps.1  s.  @  I  ptx.1 t.  P  J  pushd.1 ./share/man/man1/organizer.1                                                                           755       0      12         5466  4424740703  11002                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)organizer.1	1.10 89/03/26 SMI;
.TH ORGANIZER 1 "22 March 1989"
.SH NAME
organizer \- file and directory manager
.SH SYNOPSIS
.B organizer
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "organizer command"  ""  "\fLorganizer\fP \(em get organizer"
.IX " commands"  "organizer command"  ""  "\fLorganizer\fP "
.B organizer
is a SunView application for viewing and manipulating files and
directories.  It performs many of the functions of the
.BR ls (1V), 
.BR cd (1), 
.BR cp (1), 
.BR rm (1), 
.BR mv (1), 
.BR mkdir (1), 
.BR rmdir (see
.BR rm (1), 
.BR backup (1V), 
.BR restore (1V), 
.BR find (1),
and
.BR chmod (1V)
commands with a visual interface.
.LP
At any given time, the 
.B organizer
window normally shows the files and directories
in a single directory,  representing each file or directory with an 
appropriate illustrated icon.  The illustration indicates whether a file
is a directory, contains text, 
is an executable program, or optionally a user-defined file type.  
.LP
When
.B organizer
is switched into Map mode, the icons are arranged to indicate the hierarchy of
files and directories.  Double clicking on a directory icon shows the contents
of that directory in a new column.
.LP
Several display modes are available, and can be set for an individual 
.B organizer
window or for all 
.B organizer
windows.  You can select whether hidden files are shown,
whether just the name, the name and information, or name and
icon are shown for each file and directory, and how the contents are sorted.
.LP
Text files can be \(lqopened\(rq by double clicking on the file's icon. 
The contents of the file are then shown and can be edited in a
separate text editor window.
Double-clicking always opens files; in user-defined file types, 
you can specify the
.SM OPEN\s0,
.SM EDIT\s0,
and
.SM PRINT
applications.
.LP
You can move down through the directory hierarchy by
double clicking on a directory icon, and up by double clicking on the
up arrow button on the command panel.
.LP
Copying, moving, and deleting require you to select one or more
files.  To select a file, click the
.SM LEFT
mouse button on it (do not double click\(emthis will open the file). 
To select additional files to be operated on, click the
.SM MIDDLE
mouse button on each additional file. 
Copying and moving operations require a destination directory.
After the files are selected, change directories to the desired
destination as described above, and then \(lqdrop\(rq the files
with the Drop button on the command panel. 
If the copy involves overwriting an identically named file, 
.B organizer
will prepend
.B copy_of_
to the filename of the new file.
.SH FILES
.LP
.TP 20
.B /usr/include/images/*
file and directory icons
.SH SEE ALSO
.BR cd (1),
.BR chmod (1V)
.BR cp (1),
.BR find (1),
.BR ls (1V),
.BR mkdir (1),
.BR mv (1),
.BR restore (1V),
.BR rm (1)
it_filters.1   ,    tftp.1c   <    then.1 p  L    time.1v   \    tip.1c e  t    toolplaces.1  t      touch.1v        tput.1v       tr.1v ut      trac./share/man/man1/othertools.1                                                                          755       0      12           72  4424740703  11130                                                                                                                                                                                                                                                                                                                                                                      .so man1/sunview.1
.\" @(#)othertools.1 1.6 89/03/26 SMI;
8  pack.1 w  $  9  page.1 k  8  :  
pagesize.1 k  L  ;  passwd.1 1 w  \  <  paste.1   l  =  pcat.1 t  |  >  pdp11.1     ?  perfmeter.1     @  pg.1v te    A  plot.1g     B  popd.1 t    C  pr.1v pd    D  
printenv.1 d    E  prof.1 v       w.1     F  prs.1       G  prt.1 s.  0  H  ps.1 rt.  @  I  ptx.1 .1  P  J  pushd.1   `  K  pwd.1 sh  p  L  quota.1     M./share/man/man1/overview.1                                                                            755       0      12         5142  4424740704  10640                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)overview.1 1.18 89/03/26 SMI;
.TH OVERVIEW 1 "22 March 1989"
.SH NAME
overview \- run a program from SunView that takes over the screen
.SH SYNOPSIS
.B overview
[
.B \-w
] [
.I generic_tool_options
]
.I program_name
[
.I arguments
] .\|.\|.
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX overview "" "\fLoverview\fR \(em take over screen w/ graphics"
.LP
Bitmap graphics based programs that are not SunView based
can be run from SunView using
.BR overview .
.B overview
shows an
icon in SunView when
.B overview
is brought up iconic
.RB ( \-Wi
generic tool option;
see
.BR sunview (1))
or when the program being run by
.B overview
is suspended
(for example, using
\s-1CTRL\s0-Z).
Opening the
.B overview
icon, or starting
.B overview
non-iconic, starts
the program named on the command line.
.B overview
suppresses SunView so
that SunView window applications will not interfere with the program's
display output or input devices.
.LP
.B overview
runs programs that fit the following profile:
.TP 25
.I own display
The program needs to own the bits on the screen.
It does not use the
.I sunview
library
to arbitrate the use of the display and input devices between
processes.
.TP
.IB "keyboard input from " stdin
The program takes keyboard input from
.I stdin
directly.
.TP
.IB "mouse input from " /dev/mouse
The program takes locator input from the mouse directly.
.LP
.SH OPTIONS
.LP
.TP
.B \-w
This option is
used to specify that the program being run creates its own SunWindows
window in order to receive the serialized input stream from the keyboard
and mouse that is provided by the SunWindows kernel driver.
\fB\-w\fP tells
.B overview
to not convert SunWindows input
into
\s-1ASCII\s0
which is then sent to the program being run under
.B overview
via a pty.
X and NeWS are programs that fall in this category
(as of Dec 86.
This is subject to change in the future.)
.SH "SEE ALSO"
.BR sunview (1)
.SH BUGS
.LP
Users of
.B overview
on a Sun-3/110 should be aware of the impact
of plane groups on pre-3.2
applications.  You cannot successfully run pre-3.2 applications under
.B overview
if
.B overview
itself is running in the color
buffer.  If you start
.B overview
so that it is not running in the
overlay plane, then the enable plane is not be properly set up for
viewing the application.  This means that you cannot run
.B overview
with the
.B \-Wf
or
.B \-Wb
generic tool arguments.  Also, you cannot run
.B overview
on a desktop created by
.B sunview
using the
.B -8bit_color_only
option.
ogram from SunView that takes over the screen
.SH SYNOPSIS
.B overview
[
.B \-w
] [
.I generic_tool_options
]
.I program_name
[
.I arguments
] .\|.\|.
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX overview "" "\fLoverview\fR \(em take over screen w/ graphics"
.LP./share/man/man1/pack.1                                                                                755       0      12        10274  4424740704   7732                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pack.1 1.14 89/03/26 SMI; from S5R2 6.2
.TH PACK 1 "21 December 1987"
.SH NAME
pack, pcat, unpack \- compress and expand files
.SH SYNOPSIS
.B pack
[
.B \-
] [
.B \-f
]
.IR filename .\|.\|.
.LP
.B pcat
.IR filename .\|.\|.
.LP
.B unpack
.IR filename .\|.\|.
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  pack  ""  "\fLpack\fP \(em pack files"
.IX  unpack  ""  "\fLunpack\fP \(em unpack files"
.IX  pcat  ""  "\fLpcat\fP \(em pack files"
.IX  files  "pack command"  files  "\fLpack\fP \(em pack files"
.IX  files  "unpack command"  files "\fLunpack\fP \(em unpack files"
.IX  files  "pcat command"  files  "\fLpcat\fP \(em pack files"
.B pack
attempts to store the specified files in a packed form using Huffman
(minimum redundancy) codes on a byte-by-byte basis.
Wherever possible (and useful), each input file
.I filename
is replaced by a packed file
.IB filename .z
with the same access modes, access and modified
dates, and owner as those of
.IR filename .
If
.B pack
is successful,
.I filename
will be removed.
.LP
Packed files can be restored to their original form using
.B unpack
or
.BR pcat .
.LP
The amount of compression obtained depends on the size of the
input file and the frequency distribution of its characters.
.LP
Because a decoding tree forms the first part of each
.B .z
file, it is usually not worthwhile
to pack files smaller than three blocks unless the distribution
of characters is very skewed.
This may occur with printer plots or pictures.
.LP
Typically, large text-files are reduced
to 60-75% of their original size.
Load modules, which use a larger character set and have a more
uniform distribution of characters, show little compression.  Their
packed versions come in at about 90% of the original size.
.LP
No packing will occur if:
.PD 0
.IP
the file appears to be already packed
.IP
the file name has more than 12 characters
.IP
the file has links
.IP
the file is a directory
.IP
the file cannot be opened
.IP
no disk storage blocks will be saved by packing
.IP
a file called
.IB name .z
already exists
.IP
the
.B .z
file cannot be created
.IP
an I/O error occurred during processing
.PD
.LP
The last segment of the filename must contain no more than 12
characters to allow space for the appended
.B .z
extension.
Directories cannot be packed.
.LP
.B pcat
does for packed files what
.BR cat (1V)
does for ordinary files,
except that
.B pcat
cannot be used as a filter.
The specified files are unpacked and written to the standard output.
To view a packed file named
.IB name .z
use:
.IP
.BI pcat " filename" .z
.LP
or just:
.IP
.BI pcat " filename"
.LP
To make an unpacked copy without destroying the packed version, use
.IP
.BI  pcat " filename" > " newname"
.br
.ne 8
.LP
Failure may occur if:
.PD 0
.IP
the filename (exclusive of the
.BR .z )
has more than 12 characters;
.IP
the file cannot be opened;
.IP
the file does not appear to be the output of
.BR pack .
.PD
.LP
.B unpack
expands files created by
.BR pack .
For each file
.I filename
specified in the command, a search is made for a file called
.IB filename .z
(or just
.IR filename ,
if
.I filename
ends in
.BR .z ).
If this file appears to be a packed, it is replaced by
its expanded version.  The new file has the
.B .z
suffix stripped from its name, and has the same access modes,
access and modification dates, and owner as those of the packed file.
Failure may occur for the same reasons that it may in
.BR pcat ,
as well as for the following:
.TP 3
\(bu
a file with the \(lqunpacked\(rq name already exists
.TP 3
\(bu
the unpacked file cannot be created.
.LP
.SH OPTIONS
.TP
.B \-
Print compression statistics for the following
filename or names on the standard output.
Subsequent
.RB ` \- 's
between filenames toggle statistics off and on.
.TP
.B \-f
Force packing of
.IR filename .
This is useful for causing an entire directory to be packed,
even if some of the files will not benefit.
.SH DIAGNOSTICS
.B pack
returns the number of files that it failed to compress.
.LP
.B pcat
returns the number of files it was unable to unpack.
.LP
.B unpack
returns the number of files it was unable to unpack.
.SH "SEE ALSO"
.BR cat (1V)
.B !=
not equal (string)
.TP
.B >
greater than (numeric)
.TP
.B <
less than (numeric)
.PD
.RE
.LP
For instance, the line:
.IP
.B :if 
.I xxx 
.B != 
.I yyy
.LP
tests to see whether the string 
.RI ` xxx ' 
is not equal to 
.RI ` yyy ', 
which is
true; subsequent intervening lines are therefore included.
.LP
The logical sen./share/man/man1/page.1                                                                                755       0      12           62  4424740704   7642                                                                                                                                                                                                                                                                                                                                                                      .so man1/more.1
.\" @(#)page.1 1.7 89/03/26 SMI; 
;  passwd.1  L  \  <  paste.1   l  =  pcat.1    |  >  pdp11.1     ?  perfmeter.1     @  pg.1v 1     A  plot.1g     B  popd.1      C  pr.1v  t    D  
printenv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1    0  H  ps.1  s.  @  I  ptx.1 t.  P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1   ./share/man/man1/pagesize.1                                                                            755       0      12         1026  4424740704  10576                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pagesize.1 1.11 89/03/26 SMI; from UCB 4.2
.TH PAGESIZE 1 "9 September 1987"
.SH NAME
pagesize \- display the size of a page of memory
.SH SYNOPSIS
.B pagesize
.SH DESCRIPTION
.IX  "pagesize command"  ""  "\fLpagesize\fP \(em display page size"
.IX  display "page size \(em \fLpagesize\fP"
.IX  "page size, display \(em \fLpagesize\fP"
.B pagesize
prints the size of a page of memory in bytes, as
returned by
.BR getpagesize (2).
This program is useful in constructing portable
shell scripts.
.SH SEE ALSO
.BR getpagesize (2)
R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  L  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c i    `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h./share/man/man1/passwd.1                                                                              755       0      12         7023  4424740704  10273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)passwd.1 1.21 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH PASSWD 1 "25 March 1989"
.SH NAME
passwd, chfn, chsh \- change password file information
.SH SYNOPSIS
.B passwd
[
.B \-fs
]
[
.B \-F
.I filename
] [
.I username
]
.LP
.B chfn
[
.B \-f
]
[
.B \-F
.I filename
] [
.I username
]
.LP
.B chsh
[
.B \-s
]
[
.B \-F
.I filename
] [
.I username
]
.SH DESCRIPTION
.IX  "passwd command"  ""  "\fLpasswd\fP \(em change login password"
.IX  password  "change login"  ""  "change login \(em \fLpasswd\fP"
.IX  "change" "login password \(em \fLpasswd\fP"
.IX  login  "change password"  ""  "change password \(em \fLpasswd\fP"
.IX  "login password"  "change"  ""  "change password \(em \fLpasswd\fP"
.B passwd
changes (or installs)
a password, login shell
.RB ( \-s
option), or full name
.RB ( \-f
option) associated with the user
.I username
(your own by default).
.B chsh
is equivalent to
.B passwd
with the
.B \-s
option, and
.B chfn
is equivalent to
.B passwd
with the
.B \-f
option.
.LP
When changing a password,
.B passwd
prompts for the old password and then for the new one.
You must supply both, and the new password must be typed twice to
forestall mistakes.
.LP
New passwords should be at least five characters long, if they
combine upper-case and lower-case letters, or at least six characters
long if in monocase.  Users that persist in entering shorter passwords
are compromising their own security. The number of significant
characters in a password is eight, although longer passwords
will be accepted.
.LP
Only the owner of the name or the super-user may change a password;
the owner must prove he knows the old password.
.LP
When changing a login shell,
.B passwd
displays the current login shell and then prompts
for the new one.
The new login shell must be one of the approved shells
listed in
.B /etc/shells
unless you are the super-user.
If
.B /etc/shells
does not exist, the only shells that may be specified are
.B /bin/sh
and
.BR /bin/csh .
.LP
The super-user may change anyone's login shell; normal users
may only change their own login shell.
.LP
When changing a full name,
.B passwd
displays the current full name, enclosed
between brackets, and prompts for a
new full name.  If you type a carriage return,
the full name is not changed.
If the full name is to be made blank, you must type the word ``none''.
.LP
The super-user may change anyone's full name; normal
users may only change their own.
.LP
Use
.BR yppasswd (1)
to change your password in the network Yellow Pages.
This will not affect your local password,
or your password on any remote
machines on which you have accounts.
On Sun386i systems,
.B passwd
calls
.B yppasswd
automatically if you do not have an entry in the local passwd file.
.SH OPTIONS
.TP
.B \-s
Change the login shell.
.TP
.B \-f
Change the full name.
.TP
.BI \-F " filename"
Treat
.I filename
as the password file.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
file containing all of this information
.TP
.B /etc/shells
The list of approved shells
.PD
.SH "SEE ALSO"
.BR finger (1),
.BR login (1),
.BR yppasswd (1),
.BR crypt (3),
.BR passwd (5),
.\".br
.\"Robert Morris and Ken Thompson,
.\".I UNIX Password Security
.SH BUGS
.B passwd
changes a local password, but not a password in the network
Yellow Pages.
Refer to
.BR yppasswd (1)
for information on how to change a
.SM YP
password.
.LP
There is no way to change the login shell or the full name in
the Yellow Pages.
     su.1 s.1      sum.1v 1       sun.1 m.  4    
suntools.1 1  H    	sunview.1  4  \    	suspend.1 H  l    swin.1 .      switch.1 1 \      
switcher.1       
symorder.1       sync.1 r      sysex.1       	syswait.1 1       t300.1g        t300s.1g 1g       t4013.1g     $    t450.1g   4    tabs.1v   D    tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1 ./share/man/man1/paste.1                                                                               755       0      12         5457  4424740705  10120                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)paste.1 1.15 89/03/26 SMI; from S5R2 6.2
.TH PASTE 1 "25 March 1989"
.SH NAME
paste \- join corresponding lines of several files, or subsequent lines of one file
.SH SYNOPSIS
.B paste 
.I filename1
.I filename2
\&.\|.\|.
.br
.B paste
.BI \-d list
.I filename1
.I filename2
\&.\|.\|.
.br
.B paste
.B \-s
[
.BI \-d list
]
.I filename
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX paste "" "\fLpaste\fR \(em horizontal merge"
.IX files paste "" "\fLpaste\fR \(em horizontal merge"
.IX "merge files \(em \fLpaste\fR"
In the first two forms,
.B paste
concatenates corresponding lines of the given input
files
.IR filename1 ,
.IR filename2 ,
etc.
It treats each file as a column or columns
of a table and pastes them together horizontally
(parallel merging).
It is the counterpart of
.BR cat (1V)
which concatenates vertically, that is,
one file after the other.
In the last form above,
.B paste
replaces 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
.SM TAB
character, or with characters from an optionally specified
.IR list .
.B paste
can be used as a filter, if
.B \-
is used in place of a filename.
.SH OPTIONS
.TP
.B "\-d"
Without this option, the
.SM NEWLINE
characters of each but the last file
(or last line in case of the
.B \-s
option)
are replaced by a
.SM  TAB
character.  This option allows replacing the
.SM TAB
character by one or more alternate characters in
.I list.
The list is used circularly; when exhausted, it is reused.
In parallel merging (no
.B \-s
option),
the lines from the last file are always terminated with a
.SM NEWLINE
character,
not from the
.IR list .
.I list
may contain the special escape sequences:
.B \en
.BR  (\s-1NEWLINE\s0),
.B \et
.BR  (tab),
.B \e\e
.BR  (backslash), " and"
.B \e0
(empty string, not a null character).
Quoting may be necessary, if characters
have special meaning to the shell.
.TP
.B "\-s"
Merge subsequent lines rather than one from each input file.
Use
.SM TAB
for concatenation, unless
.I list
is specified
with
.BR \-d .
Regardless of the
.IR list ,
the very last character of the file is forced to be a
.SM NEWLINE\s0.
.SH EXAMPLES
.\".TP
.\"\fBls \|\(bv\| paste \|\-d" " \|\-\fR
.\"List directory in one column.
.LP 
List directory in four columns:
.IP
.B "ls | paste\|\-\|\-\|\-\|\-"
.LP
Combine pairs of lines into lines:
.IP
.ft B
paste \-s \-d"\e\|t\e\|n" filename
.ft
.LP
.SH "SEE ALSO"
.BR cat (1V),
.BR cut (1),
.BR grep (1V),
.BR pr (1V)
.SH DIAGNOSTICS
.TP
.B "line too long"
Output lines are restricted to 511 characters.
.TP
.B "too many files"
Except for
.B \-s
option, no more than 12 input files may be specified.
tput.1v       tr.1v ut      trace.1       
traffic.1c        troff.1       true.1 f      tset.1 e      tsort.1       tty.1 or  ,    u370.1 .  <    u3b../share/man/man1/pcat.1                                                                                755       0      12           62  4424740705   7656                                                                                                                                                                                                                                                                                                                                                                      .so man1/pack.1
.\" @(#)pcat.1 1.7 89/03/26 SMI; 
 perfmeter.1     @  pg.1v 1     A  plot.1g     B  popd.1      C  pr.1v  t    D  
printenv.1     E  prof.1 d       w.1     F  prs.1 1      G  prt.1    0  H  ps.1  s.  @  I  ptx.1 t.  P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c      Q  rdist.1     R  red.1 1     S  refer.1     T  ./share/man/man1/pdp11.1                                                                               755       0      12           64  4424740705   7656                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)pdp11.1 1.4 89/03/26 SMI;
  pg.1v 1     A  plot.1g     B  popd.1      C  pr.1v       D  
printenv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1 1   0  H  ps.1     @  I  ptx.1 s.  P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1      U./share/man/man1/perfmeter.1                                                                           755       0      12         6520  4424740705  10765                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)perfmeter.1 1.28 89/03/26 SMI;
.TH PERFMETER 1 "22 March 1989"
.SH NAME
perfmeter \- display system performance values in a meter or strip chart
.SH SYNOPSIS
.B perfmeter
[
.B \-s
.I sample-time
] [
.B \-h
.I h-hand-int
]
.if n .ti +0.5i
[
.B \-m
.I m-hand-int
]
[
.B \-M
.I smax minmax maxmax
]
.if n .ti +0.5i
.if t .ti +0.5i
[
.B \-v
.I value
] [
.I hostname
]
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "perfmeter command"  ""  "\fLperfmeter\fP \(em display performance statistics"
.IX  "performance monitoring"  ""  "performance monitoring \(em \fLperfmeter\fP"
.B perfmeter
is a SunView utility that displays performance values (statistics) for
a given
.IR hostname .
If no host is specified, statistics on the current host are metered.
The
.BR rstatd (8C)
daemon must be running on the machine being metered.
.LP
When open,
.BR perfmeter
displays a performance value in the form of a strip chart.  When
closed, it displays a meter dial.
By default, the display is updated with a
.I sample-time
of 2 seconds.
The hour hand of the meter represents the average over a
20-second interval;
the minute hand, the average over 2 seconds. The default
value displayed is the percent of
.SM CPU
being utilized.
.LP
The maximum scale value for the strip chart will automatically double
or halve to accommodate increasing or decreasing values for the
host machine.  This scale can be restricted to a certain range
with the
.B \-M
option.
.SH OPTIONS
.TP
.BI \-s " sample-time"
Set the sample time to
.I sample-time
seconds.
.TP
.BI \-h  " h-hand-int"
Set the hour-hand interval to
.I h-hand-int
seconds.
.TP
.BI \-m  " m-hand-int"
Set the minute hand interval to
.I m-hand-int
seconds.
.TP
.BI \-M  " smax minmax maxmax"
Set a range of maximum values for the strip chart.  Values for
each of the arguments should be powers of 2.
.I smax
sets the starting maximum-value.
.I minmax
sets the lowest allowed maximum-value for the scale.
.I maxmax
sets the highest allowed maximum-value.
.TP
.BI \-v " value"
Set the performance value to be monitored to one of:
.RS
.TP 8n
.B cpu
Percent of
.SM CPU
being utilized.
.TP
.B pkts
Ethernet packets per second.
.TP
.B page
Paging activity in pages per second.
.TP
.B swap
Jobs swapped per second.
.TP
.B intr
Number of device interrupts per second.
.TP
.B disk
Disk traffic in transfers per second.
.TP
.B cntxt
Number of context switches per second.
.TP
.B load
Average number of runnable processes over the last minute.
.TP
.B colls
Collisions per second detected on the ethernet.
.TP
.B errs
Errors per second on receiving packets.
.RE
.br
.ne 5
.SH USAGE
.SS Commands
.LP
You can change the statistic being displayed by clicking
the
.SM RIGHT
mouse button, and then choosing the desired menu item.
The other meter parameters can be modified by moving the pointer
onto the tool (either open or closed), and typing:
.RS
.TP
.B m
Decrease
.I minutehandintv
by one
.TP
.B M
Increase
.I minutehandintv
by one
.TP
.B h
Decrease
.I hourhandintv
by one
.TP
.B H
Increase
.I hourhandintv
by one
.TP
.B 1\-9
Set
.I sampletime
to a range from 1 to 9 seconds.
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/inetd.conf
starts statistics server
.PD
.SH SEE ALSO
.BR sunview (1),
.BR netstat (8C),
.BR rstatd (8C),
.BR vmstat (8)
stop.1        	strings.1       strip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 tty      sum.1v y       sun.1    4  ./share/man/man1/pg.1v                                                                                 755       0      12        17703  4424740705   7615                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pg.1v 1.17 89/03/26 SMI; from S5R2 6.4 9/2/83
.TH PG 1V "22 March 1989"
.SH NAME
pg \- page through a file on a soft-copy terminal
.SH SYNOPSIS
.B /usr/5bin/pg
[
.B \-cefns
] [
.BI \- number
] [
.B \-p
.B string
] [
.BI + linenumber
] [
.BI +/ pattern /
] [
.BI filename
\&.\|.\|. ]
.SH DESCRIPTION
.IX "System V commands" "\fLpg\fR"
.IX  "pg command"  ""  "\fLpg\fP \(em browse text file"
.IX  "text file"  "browse pg"  ""  "browse through \(em \fLpg\fP"
.IX  file  "browse pg"  ""  "browse through text\(em \fLpg\fP"
.LP
Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
The
.B pg
command is a filter that allows you to page through
.IR filename ,
one screenful at a time, on a soft-copy terminal.  With a
.I filename
of
.RB ` \- ',
or no
.I filename
specified,
.B pg
reads from the standard input.
Each screenful is followed by a prompt.
If the user types a
.SM RETURN\s0,
another page is displayed;
other possibilities are enumerated below.
.LP
This command is different from previous paginators
in that it allows you to back up
and review something that has already passed.
The method for doing this is explained below.
.LP
In order to determine terminal attributes,
.B pg
scans the
.BR terminfo (5V)
data base for the terminal type specified by the
environment variable
.SM TERM\s0.
If
.SM TERM\s0
is not defined,
the terminal type
.B dumb
is assumed.
.LP
The responses that may be typed when
.B pg
pauses can be divided
into three categories: those causing further perusal, those that
search, and those that modify the perusal environment.
.LP
Commands which cause further perusal normally take a preceding
.IR address ,
an optionally signed number indicating the point from which
further text should be displayed.
This
.I address
is interpreted in either pages or lines depending
on the command.
A signed
.I address
specifies a point relative to the current page
or line, and an unsigned
.I address
specifies an address relative
to the beginning of the file.
Each command has a default address that is used if none is provided.
.LP
The perusal commands and their defaults are as follows:
.TP
(+1) \s-1NEWLINE\s0 or \s-1SPACE\s0
Display one page.
The address is specified in pages.
.TP
.RB "(+1) " l
With a relative address
.B pg
will simulate scrolling the screen, forward or backward,
the number of lines specified.
With an absolute address
this command prints a screenful
beginning at the specified line.
.TP
.RB "(+1) " d " or " ^D
Simulate scrolling half a screen forward or backward.
.LP
The following perusal commands take no
.IR address .
.TP
.BR . " or " ^L
Redisplay the current page
of text.
.TP
.B $
Display the last full window in the file.
Use with caution when the input is a pipe.
.LP
The following commands are available for searching for text patterns
in the text.
The regular expressions described in
.BR ed (1)
are available.
They must always be terminated by a
\s-1NEWLINE\s0,
even if the
.B \-n
option is specified.
.TP
.IB i / pattern /
Search forward for the
.IR i th
(default
.IR i =1)
occurrence
of
.IR pattern .
Searching begins immediately after the current
page and continues to the
end of the current file, without wrap-around.
.LP
.IB i ^ pattern ^
.PD 0
.TP
.IB i ? pattern ?
Search backwards for the
.IR i th
(default
.IR i =1)
occurrence of
.IR pattern .
Searching begins immediately before the current page
and continues to the beginning of the current file, without
wrap-around.
The
.B ^
notation is useful for Adds 100 terminals which will not properly
handle the
.BR ? .
.PD
.LP
After searching,
.B pg
will normally display the line found at the top of the screen.
This can be modified by appending
.B m
or
.B b
to the search
command to leave the line found in the middle or at the bottom of
the window from now on.
The suffix
.B t
can be used to restore the original situation.
.LP
The user of
.B pg
can modify the environment of perusal with the
following commands:
.TP 15
.IB i n
Begin perusing the
.IR i th
next file in the command line.
The
.I i
is an unsigned number, default value is 1.
.TP
.IB i p
Begin perusing the
.IR i th
previous file in the command line.
.I i
is an unsigned number, default is 1.
.TP
.IB i w
Display another window of text.
If
.I i
is present, set the window size to
.IR i .
.TP
.BI "s " filename
Save the input in the named file.
Only the current file being perused is saved.
The white space between the
.B s
and
.I filename
is optional.
This command must always be terminated by a
\s-1NEWLINE\s0,
even if the
.B \-n
option is specified.
.TP
.B h
Help by displaying an abbreviated summary of available commands.
.TP
.BR q " or " Q "
Quit
.BR pg .
.TP
.BI ! command
.B command
is passed to the shell, whose name is
taken from the
.SM SHELL\s0
environment variable.
If this is not available, the default shell is used.
This command must always be terminated by a
\s-1NEWLINE\s0,
even if the
.B \-n
option is specified.
.LP
At any time when output is being sent to the terminal, the user can hit
the quit key, normally
\s-1CTRL\s0-\e
or the
.SM BREAK
(interrupt) key.
This causes
.B pg
to stop sending output, and display the prompt.
The user may then enter one of the above commands in the normal manner.
Unfortunately, some output is lost when this is done, due to the fact
that any characters waiting in the terminal's output queue are flushed
when the quit signal occurs.
.LP
If the standard output is not a terminal, then
.B pg
acts just like
.BR cat (1V),
except that a header is printed before each file (if there is
more than one).
.SH OPTIONS
The command line options are:
.TP 15
.I \-number
An integer specifying the size (in lines)
of the window that
.B pg
is to use instead of the default.
(On a terminal containing 24 lines, the default window size is 23).
.TP
.BI \-p " string"
Use
.B string
as the prompt.
If the prompt string contains a
.RB ` %d ',
the first occurrence
of
.RB ` %d '
in the prompt will be replaced
by the current page number when the prompt is issued.
The default prompt string is
.RB ` : '.
.TP
.B \-c
Home the cursor and clear the screen before displaying each page.
This option is ignored if
.B clear_screen
is not defined for this terminal type in the
.BR terminfo (5V)
data base.
.TP
.B \-e
do
.I not
pause at the end of each file.
.TP
.B \-f
Inhibit
.B pg
from splitting lines.
Normally,
.B pg
splits lines longer than the screen width,
but some sequences of characters
in the text being displayed
(for instance, escape sequences for underlining)
generate undesirable results.  The
.TP
.B \-n
Automatic end of command as soon as a command
letter is entered.
Normally, commands must be terminated by a
\s-1NEWLINE\s0
character.
.TP
.B \-s
Print all messages and prompts in standout
mode (usually inverse video).
.TP
.BI + linenumber
Start up at
.IR linenumber .
.br
.ne 5
.TP
.BI +/ pattern /
Start up at the first line containing
the regular expression pattern.
.SH EXAMPLE
A sample usage of
.B pg
in reading system news would be
.IP
.B news | pg \-p \(lq(Page %d):\(rq
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/*
terminal information data base
.TP
.B /tmp/pg*
temporary file when input is from a pipe
.PD
.SH SEE ALSO
.BR cat (1V),
.BR crypt (1),
.BR ed (1),
.BR grep (1V),
.BR more (1),
.BR terminfo (5V)
.SH BUGS
.LP
If terminal
.SM TAB
characters are not set every eight positions,
undesirable results may occur.
.LP
When using
.B pg
as a filter with another command that changes the terminal
.SM I/O
options
(for instance,
.BR crypt (1)),
terminal settings may not be restored correctly.
.SH NOTES
While waiting for terminal input,
.B pg
responds to
.SM BREAK\s0 ,
.SM DEL\s0 ,
and
.B ^
by terminating execution.
Between prompts, however, these signals interrupt
.BR pg 's
current task and place the user in prompt mode.
These should be used with caution when input is being read from
a pipe, since an interrupt is likely to terminate the other
commands in the pipeline.
.LP
Users of
.BR more (1)
will find that the z and f commands are available,
and that the terminal
.BR / , ^ , or ?
may be omitted from the searching commands.
em \fLpg\fP"
.IX  file  "browse pg"  ""  "browse through text./share/man/man1/plot.1g                                                                               755       0      12         4777  4424740705  10135                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)plot.1g 1.17 89/03/26 SMI; from UCB 4.3 BSD
.TH PLOT 1G  "22 December 1987"
.SH NAME
plot, aedplot, bgplot, crtplot, dumbplot, gigiplot, hpplot, implot, t300, t300s, t4013, t450, tek \- graphics filters for various plotters
.SH SYNOPSIS
.B plot
[
.BI \-T terminal
]
.SH DESCRIPTION
.IX  "plot command"  ""  "\fLplot\fP \(em graphics filters"
.IX  "graphics filters"  ""  "graphics filters \(em \fLplot\fP"
.B plot
reads plotting instructions (see
.BR  plot (5))
from the standard input and produces plotting instructions suitable
for a particular
.I terminal
on the standard output.
.LP
If no
.I terminal
is specified, the environment variable
.SB TERM
is used.  The default
.I terminal
is
.BR tek .
.SH ENVIRONMENT
.LP
Except for
.BR ver ,
the following terminal-types can be used with
.RB ` "lpr \-g" '
see 
.BR lpr (1))
to produce plotted output:
.RS
.HP 12n
.BR 2648  " | "
.BR 2648a " | "
.BR h8 " | "
.BR hp2648 " | "
.BR hp2648a
.br
Hewlett Packard 2648 graphics terminal.
.TP
.B 300
.SM DASI
300 or
.SM GSI
terminal (Diablo mechanism).
.TP
.BR 300s " | " 300S
.SM DASI
300s terminal (Diablo mechanism).
.TP
.B 450
.SM DASI
Hyterm 450 terminal (Diablo mechanism).
.TP
.B 4013
Tektronix 4013 storage scope.
.TP
.BR 4014 " | " tek
Tektronix 4014 and 4015 storage scope
with Enhanced Graphics Module.
(Use 4013 for Tektronix 4014 or 4015 without the Enhanced
Graphics Module).
.TP
.B aed
.SM AED
512 color graphics terminal.
.HP
.BR bgplot " | "
.B bitgraph
.br
.SM BBN
bitgraph graphics terminal.
.TP
.B crt
Any crt terminal capable of running
.BR vi (1).
.HP
.BR dumb  " | "
.BR un " | "
.B unknown
.br
Dumb terminals without cursor addressing or line printers.
.TP
.BR gigi " | " vt125
.SM DEC
vt125 terminal.
.HP
.BR h7 " | "
.BR hp7 " | "
.B hp7221
.br
Hewlett Packard 7221 graphics terminal.
.TP
.B implot
Imagen plotter.
.TP
.B var
Benson Varian printer-plotter
.TP
.B ver
Versatec D1200A printer-plotter.  The output is scan-converted and
suitable input to
.RB ` "lpr \-v" '.
.RE
.SH FILES
.PD 0
.TP 20
.B /usr/bin/t300
.TP
.B /usr/bin/t300s
.TP
.B /usr/bin/t4013
.TP
.B /usr/bin/t450
.TP
.B /usr/bin/aedplot
.TP
.B /usr/bin/crtplot
.TP
.B /usr/bin/gigiplot
.TP
.B /usr/bin/implot
.TP
.B /usr/bin/plot
.TP
.B /usr/bin/bgplot
.TP
.B /usr/bin/dumbplot
.TP
.B /usr/bin/hpplot
.TP
.B /usr/bin/vplot
.TP
.B /usr/bin/tek
.TP
.B /usr/bin/t450
.TP
.B /usr/bin/t300
.TP
.B /usr/bin/t300s
.TP
.B /usr/bin/vplot
.TP
.BI /var/tmp/vplot nnnnnn
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR vi (1),
.BR graph (1G),
.BR plot (3X),
.BR plot (5),
.BR rasterfile (5)
 ./share/man/man1/popd.1                                                                                755       0      12           72  4424740706   7673                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)popd.1 1.8 89/03/26 SMI; 
nv.1     E  prof.1        w.1     F  prs.1 1      G  prt.1 1   0  H  ps.1     @  I  ptx.1 s.  P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \./share/man/man1/pr.1v                                                                                 755       0      12        17233  4424740706   7627                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pr.1v 1.14 89/03/26 SMI; from 4.3 BSD and S5
.TH PR 1V  "22 March 1989"
.SH NAME
pr \- prepare file(s) for printing, perhaps in multiple columns
.SH SYNOPSIS
.B pr
[
.BR \-\| | \| +
.I n
] [
.B \-fmt
] [
.B \-h
.I string
] [
.BI \-l n
] [
.BI \-s c
] 
.if n .ti +0.5i
[
.BI \-w n
]
[
.I filename
] .\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/pr
[
.BR \-\| | \| +
.I n
] [
.B \-adfmprt
] [
.BI \-e ck
]
.if n .ti +0.5i
[
.B \-h 
.I string
]
[
.BI \-i ck
] [
.BI \-l n
] [
.BI \-n ck
]
.if n .ti +.5i
[
.BI \-o n
] 
[
.BI \-s c
]
[
.BI \-w n
]
.if t .ti +0.5i 
[
.I filename
] .\|.\|.
.if t .ti +0.5i
.SH DESCRIPTION
.IX "System V commands" "\fLpr\fR"
.IX  "pr command"  ""  "\fLpr\fP \(em prepare files for printing"
.IX  "prepare files for printing"  ""  "prepare files for printing \(em \fLpr\fP"
.IX  files  "prepare for printing"  files  "prepare files for printing \(em \fLpr\fP"
.IX  "multiple columns, print in \(em \fLpr\fP"
.IX  columns  "print in multiple"  ""  "print in multiple \(em \fLpr\fP"
.B pr
prepares one or more
.IR filename s
for printing.  By default, the output is separated
into pages headed by a date, the name of the file, and the page number.
.B pr
prints its standard input if there are no
.I filename
arguments.  
.SM FORMFEED 
characters in the input files cause page breaks in
the output, as expected.
.LP
By default, columns are of equal width,
separated by at least one
.SM SPACE\s0;
lines that do not fit are truncated.  If the
.B \-s
option is used, lines are not truncated
and columns are separated by the
separation character.
.LP
Inter-terminal messages using
.BR write (1)
are forbidden during a
.BR pr .
.SH OPTIONS
.LP
Options apply to all following
.IR filename s
but may be reset between
.IR filename s:
.nr xx (\w'\-h string'u+2n)/1n
.\" .TP \n(xx
.RS
.TP
.BI \-f
Use 
.SM FORMFEED
characters instead of
.SM NEWLINE
characters to separate pages.
A 
.SM FORMFEED 
is assumed to use up two blank lines at the top of a page.
Thus this option does not affect the effective page length.
.TP
.B \-m
Print all
.IR filename s
simultaneously, each in one column, for example:
.RS
.RS
.nf
.ft B
.ta +.75i; +.75i; +.75i
Print	Print	The
the	the	third
lines	lines	file's
of 	of	lines
file	file	go
one.	two.	here.
.fi
.RE
.RE
.TP
.B \-t
Do not print the 5-line header or the 5-line trailer
normally supplied for
each page.  Pages are not separated when this option is
used, even if the
.B \-f
option was used.  The
.B \-t
option is intended for applications where
the results should be directed
to a file for further processing.
.TP
.BI \-h " string"
Use
.IR string ,
instead of the file name, in the page header.
.TP
.BI \-l n
Take the length of the page to be
.I n
lines instead of the default 66.
.TP
.BI \-s c
Separate columns by the single character
.I c
instead of by the appropriate amount of white space.  A missing
.I c
is taken to be a
.SM TAB\s0.
.TP
.BI \-w n
For multicolumn output, take the width of the page to be
.I n
characters instead of the default 72.
.TP
.BI \- n
Produce
.IR n -column
output.  For example:
.RS
.RS
.nf
.ta +.75i; +.75i; +.75;
.ft B
Print	of	in	
the	one	three	
lines	file	columns.
.fi
.in -.5i
.RE
.RE
.IP
Columns are not balanced; if, for example,
there are as many lines in the
file as there are lines on the page, only one column will be printed.
Even if the
.B \-t
option (see below) is specified, blank lines
will be printed at the end of
the output to pad it to a full page.
.TP
.BI + n
Begin printing with page
.IR  n .
.RE
.SH SYSTEM V OPTIONS
When the
.BI \- n
option is specified for multicolumn output,
columns are balanced. For
example, if there are as many lines in the
file as there are lines to be
printed, and two columns are to be printed,
each column will contain half
the lines of the file.  If the
.B \-t
option is specified, no blank lines will be
printed to pad the last page.
.LP
The options
.B \-e
and
.B \-i
are assumed for multicolumn output.  The
.B \-m
option overrides the
.B \-k
and
.B \-a
options.
.LP
The
.B \-f
option does not assume that 
.SM FORMFEED
uses up two blank lines; blank
lines will be printed after the 
.SM FORMFEED 
if necessary.
.RS
.TP
.B \-a
When combined with the
.BI \- n
option, print multicolumn output across the page.  For example:
.RS
.RS
.nf
.ta +.75i; +.75i; +.75;
.ft B
Print	the	lines
of	one	file
in	three	columns.
.fi
.RE
.RE
.TP
.B \-d
Double-space the output.
.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 
.SM RETURN\s0).
.TP
.B \-r
Do Not print diagnostic reports if a file
cannot be opened, or if it is empty.
.TP
.BI \-e ck
Expand
.I input
.SM TAB
characters to character positions
.IR k "+1, 2\(**" k "+1, 3\(**" k +1,
etc.
If
.I k
is 0 or is omitted, default
.SM TAB
settings
at every eighth position are assumed.
.SM TAB
characters in the input are expanded
into the appropriate number of 
.SM SPACE
characters.
If
.I c
(any non-digit character)
is given, it is treated as the input
.SM TAB
character
(default for
.I c
is the
.SM TAB
character).
.TP
.BI \-i ck
In
.IR output ,
replace white space wherever possible by inserting
.SM TAB
characters to character positions
.IR k "+1, 2\(**" k "+1, 3\(**" k +1,
etc.
If
.I k
is 0 or is omitted, default
.SM TAB
settings at every eighth position are assumed.
If
.I c
(any non-digit character)
is given, it is treated as the output
.SM TAB
(default for
.I c
is the
.SM TAB
character).
.TP
.BI \-n ck
Provide
.IR k -digit
line numbering (default for
.I k
is 5).
The number 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
.SM TAB\s0).
.TP
.BI \-o k
Offset each line by
.I k
character positions.
The number of character positions
per line is the sum of the width and offset.
.RE
.SH EXAMPLES
.LP
Print a file called
.B dreadnought
on the printer \(em this is the simplest use of
.BR pr :
.RS
.sp .5
.nf
.B example% pr  dreadnought | lpr
.B example%
.fi
.RE
.LP
Produce three laminations of a file called
.B ridings
side by side in the output, with no headers or trailers, the results to
appear in the file called
.BR Yorkshire :
.RS
.sp .5
.nf
.B
example% pr \-m \-t ridings ridings ridings > Yorkshire
.B example%
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/tty*
to suspend messages.
.PD
.SH SEE ALSO
.BR cat (1V),
.BR lpr (1),
.BR write (1)
.SH DIAGNOSTICS
.TP
.B can't print 0 cols, using 1 instead.
.B \-0
was specified as a
.BI \- n
option.
.TP
.BI "pr: bad key " key
An illegal option was given.
.TP
.B pr: No room for columns.
The number of columns requested will not fit on the page.
.TP
.B pr: Too many args
More than 10 files were specified with the
.B \-m
option.
.TP
.IB filename " : " error
.I filename
could not be opened.  This diagnostic is not printed if
.B pr
is printing on a terminal.
.SH SYSTEM V DIAGNOSTICS
.TP
.B pr: bad option
An illegal option was given.
.TP
.B pr: width too small
The number of columns requested will not fit on the page.
.TP
.B pr: too many files
More than 10 files were specified with the
.B \-m
option.
.TP
.B pr: page-buffer overflow
The formatting required is more complicated than
.B pr
can handle.
.TP
.B pr: out of space
.B pr
could not allocate a buffer it required.
.TP
.BI "pr: " filename "-- empty file"
.I filename
was empty.  This diagnostic is printed
after all the files are printed if
.B pr
is printing on a terminal.
.TP
.BI "pr: can't open " filename
.I filename
could not be opened.  This diagnostic
is printed after all the files are printed if
.B pr
is printing on a terminal.
.SH BUGS
.LP
The options described above interact with each
other in strange and as yet to be defined ways.
ad of the default 66.
.TP
.BI \-s c
Separate columns by the single character
.I c
instead of by the appropriate amount of white space.  A missing
.I c
is taken to be a
.SM TAB\s0.
.TP
.BI \-w n
For multicolumn output, take the width of the page to be
.I n
characters instead of the default 72.
.TP
.BI \- n
Produce
.IR n -column
output.  For example:
.RS
.R./share/man/man1/printenv.1                                                                            755       0      12         1450  4424740706  10637                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)printenv.1 1.15 89/03/26 SMI; from UCB 4.1
.TH PRINTENV 1 "9 September 1987"
.SH NAME
printenv \- display environment variables currently set
.SH SYNOPSIS
.B printenv
[
.I variable
]
.SH DESCRIPTION
.IX  "printenv command"  ""  "\fLprintenv\fP \(em display environment"
.IX  environment  "display variables"  ""  "display variables \(em \fLprintenv\fP"
.IX  "login environment"  "display variables"  ""  "display variables \(em \fLprintenv\fP"
.LP
.B printenv
prints out the values of the variables in the environment.  If a
.I variable
is specified, only its value is printed.
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR stty (1V),
.BR tset (1),
.BR environ (5V)
.SH DIAGNOSTICS
.LP
If a
.I variable
is specified and it is not defined in the environment,
.B printenv
returns an exit status of
.BR 1 .
  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs./share/man/man1/prof.1                                                                                755       0      12         7122  4424740706   7742                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)prof.1 1.23 89/03/26 SMI
.TH PROF 1 "22 December 1987"
.SH NAME
prof \- display profile data
.SH SYNOPSIS
.B prof
[
.B \-alnsz
] [
.B \-v
.BI \- low
[
\fB\-\fIhigh\fR
] ]
.if n .ti +0.5i
[
.I image-file
[
.I profile-file
\&.\|.\|. ] ]
.SH DESCRIPTION
.IX  "prof command"  ""  "\fLprof\fP \(em display program profile"
.IX  display "program profile \(em \fLprof\fP"
.IX  "programming tools"  prof  ""  "\fLprof\fP \(em display program profile"
.IX  "performance monitoring"  prof  ""  "\fLprof\fP \(em display program profile"
.IX  profiling  prof  ""  "\fLprof\fP \(em display program profile"
.LP
.B prof
produces an execution profile of a program.
The profile data is taken from the profile file
which is created by programs compiled with the 
.B \-p
option of
.BR cc (1V)
and other compilers.
That option also links in versions of the library routines (see
.BR monitor (3))
which are compiled for profiling.  The symbol table in the executable image
file
.I image-file
.RB ( a.out
by default) is read and correlated with the profile file
.I profile-file
.RB ( mon.out
by default).  For each external symbol,
the percentage of time spent executing
between that symbol and the next is printed (in
decreasing order), together
with the number of times that routine was called and the number of
milliseconds per call.  If more than one profile file is specified,
the
.B prof
output shows the sum of the profile
information in the given profile files.
.LP
To tally the number of calls to a routine, the modules that make up the
program must be compiled with the
.RB ' "cc \-p" '
option (see 
.BR cc (1v)).
This option also means that the profile file is produced automatically.
.LP
A single function may be split into subfunctions for profiling
by means of the 
.SB MARK
macro (see 
.BR prof (3)).
.LP
Beware of quantization errors.
.LP
The profiled program must call 
.BR exit (2)
or return normally for the profiling information to be saved in the
.B mon.out
file.
.SH OPTIONS
.TP
.B \-a
Report all symbols rather than just external symbols.
.TP
.B \-l
Sort the output by symbol value.
.TP
.B \-n
Sort the output by number of calls.
.TP
.B \-s
Produce a summary profile file in
.BR mon.sum .
This is really only useful when more
than one profile file is specified.
.TP
.B \-z
Display routines which have zero usage (as indicated by call counts
and accumulated time).
.TP
\fB\-v\fR [ \fB\-\fIlow\fR [ \fB\-\fIhigh\fR ]]
Suppress all printing and produce a graphic version of the profile
on the standard output for display by the
.BR plot (1G)
filters.  When plotting, the numbers
.I low
and
.I high,
(by default 0 and 100), select a percentage of the
profile to be plotted, with accordingly higher resolution.
.SH ENVIRONMENT
.TP
.SB PROFDIR
If this environment variable contains a value, place profiling
output within that directory, in a file named
\fIpid\fB.\fIprogramname\fR.
.I pid
is the process
.SM ID\s0,
and
.I programname
is the name of the program being profiled, as determined by removing any path
prefix from the
.B argv[0]
with which the program was called.
If the variable contains a
.SM NULL
value, no profiling output is
produced.  Otherwise, profiling output is placed in the file
.BR mon.out .
.SH FILES
.PD 0
.TP 20
.B a.out
executable file containing namelist
.TP
\fB\s-1$PROFDIR\s0/\fIpid\fB.\fIprogramname\fR
.TP
.B mon.out
profiling output
.TP
.B mon.sum
summary profile
.PD
.SH "SEE ALSO"
.BR gprof (1),
.BR tcov (1),
.BR plot (1G),
.BR cc (1V),
.BR exit (2),
.BR profil (2),
.BR monitor (3)
.br
.ne 4
.SH BUGS
.LP
.B prof
is confused by the
.SM FORTRAN
compiler which puts the entry points at the
bottom of subroutines and
functions.
ontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1          view.1 e lines of the file.  If the
.B \-t
option is specified, no blank lines will be
printed to pad the last page.
.LP
The options
.B \-e
and
.B \-i
are assumed for multicolumn output.  The
.B \-m
option overrides the
.B \-k
and
.B \-a
options.
.LP
The
.B \-f
option does not assume that 
.SM FORMFEED
uses up two blank lines; blank
line./share/man/man1/w.1                                                                                   755       0      12         5756  4424740747   7262                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)w.1 1.14 89/03/26 SMI; from UCB 4.2
.TH W 1 "22 March 1989"
.SH NAME
w \- who is logged in, and what are they doing
.SH SYNOPSIS
.B w
[
.B \-hls
] [
.I user
]
.IX  "w command"  ""  "\fLw\fP \(em what are users doing"
.IX  "what are users doing"  ""  "what are users doing \(em \fLw\fP"
.IX  users  "what are they doing"  users  "what are they doing \(em \fLw\fP"
.IX  login  "what are users doing"  login  "what are users doing \(em \fLw\fP"
.SH DESCRIPTION
.LP
.B w
displays a summary of the current activity on the system,
including what each user is doing.
The heading line shows the current time of day, how long the system has
been up, the number of users logged into the system,
and the load averages.
The load average numbers give the number of jobs in the run queue
averaged over 1, 5 and 15 minutes.
.LP
The fields displayed are: the users login name, the name of the tty
the user is on, the time of day the user logged on (in hours:minutes),
the idle time \(em that is, the number of minutes since the user last
typed anything (in hours:minutes), the
.SM CPU
time used by all processes and their children on that terminal
(in minutes:seconds), the
.SM CPU
time used by the currently active processes
(in minutes:seconds), the name and arguments of the current process.
.LP
If a
.I user
name is included, output is restricted to that user.
.SH OPTIONS
.TP
.B \-h
Suppress the heading.
.TP
.B \-l
Produce a long form of output, which is the default.
.TP
.B \-s
Produce a short form of output.
In the short form, the tty is abbreviated,
the login time and
.SM CPU
times are left off, as are the arguments to commands.
.SH EXAMPLE
.RS
.ft B
.nf
example% w
7:36am  up 6 days, 16:45,  1 users,  load average: 0.20, 0.23, 0.18
User	tty	login@	idle	\s-1JCPU\s0	\s-1PCPU\s0	what
ralph	console	7:10am	   1	10:05	4:31	w
example%
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.TP
.B /dev/kmem
.TP
.B /dev/drum
.PD
.SH "SEE ALSO"
.BR ps (1),
.BR who (1),
.BR utmp (5)
.SH BUGS
The notion of the ``current process'' is muddy.
The current algorithm is
`the highest numbered process on the terminal that is not ignoring
interrupts, or, if there is none, the highest numbered process on the
terminal'.  This fails, for example, in critical sections of programs
like the shell and editor, or when faulty programs running in the
background fork and fail to ignore interrupts.  In cases where no
process can be found,
.B w
prints
.RB ` \- '.
.LP
The
.SM CPU
time is only an estimate, in particular, if someone leaves a
background process running after logging out, the person currently
on that terminal is ``charged'' with the time.
.LP
Background processes are not shown, even though they account for
much of the load on the system.
.LP
Sometimes processes, typically those in the background, are
printed with null or garbaged arguments.
In these cases, the name of the command is printed in parentheses.
.LP
.B w
does not know about the new conventions for detecting background
jobs.
It will sometimes find a background job instead of the right one.
 then.1    L  ./share/man/man1/prs.1                                                                                 755       0      12           64  4424740706   7536                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-prs.1
.\" @(#)prs.1 1.3 89/03/26 SMI;
ps.1  0  @  I  ptx.1 @  P  J  pushd.1   `  K  pwd.1 `  p  L  quota.1     M  ranlib.1  M    N  rasfilter8to1.1     O  
rastrepl.1 O    P  rcp.1c     Q  rdist.1     R  red.1     S  refer.1     T  rehash.1  T    U  repeat.1  U  (  V  reset.1   8  W  rev.1 8  L  X  	rlogin.1c X  \  Y  rm.1  \  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1 \    ]  rpcgen.1./share/man/man1/prt.1                                                                                 755       0      12           64  4424740707   7540                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-prt.1
.\" @(#)prt.1 1.3 89/03/26 SMI;
ptx.1 0  P  J  pushd.1   `  K  pwd.1 1   p  L  quota.1     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c O    Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  X  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh../share/man/man1/ps.1                                                                                  755       0      12        26225  4424740707   7444                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ps.1 1.31 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH PS 1 "25 March 1989"
.SH NAME
ps \- display the status of current processes 
.SH SYNOPSIS
.B ps
[
.RB [ \- ]\c
.B acCegklnrStuUvwx
]
[
.I num
]
.if n .ti +0.5i
[
.I kernel_name
]
[
.I c_dump_file
]
[
.I swap_file
]
.SH DESCRIPTION
.IX  "ps command"  ""  "\fLps\fP \(em display process status"
.IX  display "process status \(em \fLps\fP"
.IX  process  "display status"  ""  "display status \(em \fLps\fP"
.B ps
displays information about processes.
Normally, only those processes that are running with your effective user
.SM ID
and are attached to a controlling terminal (see 
.BR termio (4))
are shown.  Additional categories of processes
can be added to the display using various options.
In particular, the
.B \-a
option allows you to include processes that are not owned by you
(that do not have your user
.SM ID\s0),
and the
.B \-x
option allows you to
include processes without control terminals.  When you specify
both 
.B \-a
and 
.BR \-x ,
you get processes owned by anyone, with or without a control
terminal.
The
.B \-r
option restricts the list of processes printed to \(lqrunning\(rq processes:
runnable processes, those in page wait, or those in disk or other
short-term waits.
.LP
.B ps
displays the process
.SM ID\s0,
under
.SM PID\s0;
the control terminal (if any), under
.SM TT\s0;
the cpu time used by the 
process so far, including both user and system time), under
.SM TIME\s0;
the state of the process, under
.SM STAT\s0;
and finally, an indication of the 
.SM COMMAND
that is running.
.LP
The state is given by a sequence of four letters, for example,
.RB ` \s-1RWNA\s0 '.
.TP 15
.I First letter
indicates the runnability of the process:
.RS
.PD 0
.TP 8
.B R
Runnable processes,
.TP
.B T
Stopped processes,
.TP
.B P
Processes in page wait,
.TP
.B D
Processes in disk (or other short term) waits,
.TP
.B S
Processes sleeping for less than about 20 seconds,
.TP
.B I
Processes that are idle (sleeping longer than about 20 seconds),
.TP
.B Z
Processes that have terminated and that are waiting for their parent process
to do a
.BR wait (2)
(\(lqzombie\(rq processes).
.RE
.PD
.TP
.I Second letter
indicates whether a process is swapped out;
.RS
.PD 0
.TP 8
.I blank
(that is, a
.SM SPACE
character)
in this position indicates that the process is loaded
(in memory).
.TP
.B W
Process is swapped out.
.TP
.B >
Process has specified a soft limit on memory requirements
and has exceeded that limit; such a process is (necessarily)
not swapped.
.RE
.PD
.TP
.I Third letter
indicates whether a process is running with altered
.SM CPU
scheduling priority (nice):
.RS
.PD 0
.TP 8
.I blank
(that is, a
.SM SPACE
character)
in this position indicates that the process is
running without special treatment.
.TP
.B N
The process priority is reduced,
.TP
.B < 
The process priority has been raised artificially.
.RE
.PD
.TP
.I Fourth letter
indicates any special treatment of the process for virtual
memory replacement.
The letters correspond to options to the
.BR vadvise (2)
system call.
Currently the possibilities are:
.RS
.PD 0
.TP 8
.I blank
(that is, a
.SM SPACE
character)
in this position stands for
.BR \s-1VA_NORM\s0 .
.TP
.B A
Stands for
.BR \s-1VA_ANOM\s0 .
An
.B A 
typically represents a program which is doing
garbage collection.
.TP
.B S
Stands for
.BR \s-1VA_SEQL\s0 .
An
.B S
is typical of large image processing programs
that are using virtual memory to sequentially address voluminous data.
.RE
.PD
.LP
.I kernel_name
specifies the location of the system namelist.  
If the 
.B \-k
option is given, 
.I c_dump_file
tells
.B ps
where to look for the core dump.
Otherwise, the core dump is located in the file
.B /vmcore 
and this argument is ignored.
.I swap_file
gives the location of a swap file other than
the default,
.BR /dev/drum .  
.SH OPTIONS
.LP
Options must all be combined to form the first argument.
.TP 5
.B \-a
Include information about processes owned by others.
.TP 5
.B \-c
Display the command name, as stored internally in the system for purposes
of accounting, rather than the command arguments, which are kept
in the process' address space.  This is more reliable, if less informative,
since the process is free to destroy the latter information.
.TP 5
.B \-C
Display raw
.SM CPU
time in the
.SB %CPU
field instead of the decaying average.
.TP 5
.B \-e
Display the environment as well as the arguments to the command.
.TP 5
.B \-g
Display all processes.  Without this option,
.B ps
only prints \(lqinteresting\(rq processes.
Processes are deemed to be uninteresting if they are process group leaders.
This normally eliminates top-level command interpreters and processes
waiting for users to login on free terminals.
.TP 5
.B \-k
Normally, 
.I kernel_name
defaults to 
.BR /vmunix ,
.I c_dump_file 
is ignored, and
.I swap_file 
defaults to 
.BR /dev/drum .
With the
.B \-k
option in effect, these arguments default to 
.BR /vmunix ,
.BR /vmcore ,
and
.BR /dev/drum ,
respectively.
.TP 5
.B \-l
Display a long listing, with fields
.BR \s-1F\s0 ,
.BR \s-1PPID\s0 , 
.BR \s-1CP\s0 , 
.BR \s-1PRI\s0 , 
.BR \s-1NI\s0 , 
.BR \s-1SZ\s0 , 
.SB RSS
and
.SB WCHAN
as described below.
.TP 5
.B \-n
Produce numerical output for some fields.
In a long listing, the
.SB WCHAN
field is printed numerically rather than
symbolically, or, in a user listing, the
.SB USER
field is replaced by a
.SB UID
field.
.TP 5
.B \-r
Restrict output to \(lqrunning\(rq processes.
.TP 5
.B \-S
Display accumulated
.SM CPU
time used by this process and all of its reaped 
children.
.TP 5
.BI t x
Restrict output to processes whose controlling terminal is
.I x
(which should be specified as printed by
.BR ps ,
for example,
.B t3
for
.BR /dev/tty3 ,
.B tco
for
.BR /dev/console ,
.B td0
for
.BR /dev/ttyd0 ,
.B t?
for processes with no terminal, etc).  This option must be the last one
given.
.TP 5
.B \-u
Display user-oriented output.
This includes fields
.BR \s-1USER\s0 ,
.BR \s-1%CPU\s0 ,
.BR \s-1%MEM\s0 ,
.BR \s-1SZ\s0 ,
.SB RSS
and
.SB START
as described below.
.TP
.B \-U
Update a private database where
.B ps
keeps system information.  Thus,
.RB ` "ps \-U" '
should be included in the
.B /etc/rc
file.
.TP 5
.B \-v
Display a version of the output containing virtual memory.
This includes fields
.BR \s-1RE\s0 ,
.BR \s-1SL\s0 ,
.BR \s-1PAGEIN\s0 ,
.BR \s-1SIZE\s0 ,
.BR \s-1RSS\s0 ,
.BR \s-1LIM\s0 ,
.SB %CPU
and
.BR \s-1%MEM\s0 ,
described below.
.TP 5
.B \-w
Use a wide output format (132 columns rather than 80); if repeated,
that is,
.BR \-ww ,
use arbitrarily wide output.
This information is used to decide how much of long commands to print.
.TP 5
.B \-x
Include processes with no controlling terminal.
.TP 5
.I num
A process number may be given, in which case the output
is restricted to that process.  This option must also be last.
.SH "DISPLAY FORMATS"
.LP Fields that are not common to all output formats:
.PD 0
.TP 12
.SB USER
Name of the owner of the process.
.TP
.SB %CPU
.SM CPU
utilization of the process; this is a decaying average over up to
a minute of previous (real) time.  Since the time base over which this
is computed varies (since processes may be very young) it is possible
for the sum of all
.SB %CPU
fields to exceed 100%.
.TP
.SB NI
Process scheduling increment (see
.BR getpriority (2)
and
.BR nice (3C).)
.TP
.PD 0
.SB SIZE
.TP 15
.SB SZ
.PD
The combined size of the data and stack segments (in kilobyte units)
.TP
.SB RSS
Real memory (resident set) size of the process (in kilobyte units).
.TP
.SB LIM
Soft limit on memory used, specified using a call to
.BR getrlimit (2);
if no limit has been specified then shown as
.IR xx .
.TP
.SB %MEM
Percentage of real memory used by this process.
.TP
.SB RE
Residency time of the process (seconds in core).
.TP
.SB SL
Sleep time of the process (seconds blocked).
.TP
.SB PAGEIN
Number of disk I/O's resulting from references by the process
to pages not loaded in core.
.TP
.SB UID
Numerical user-\s-1ID\s0 of process owner.
.TP
.SB PPID
Numerical
.SM ID
of parent of process.
.TP
.SB CP
Short-term
.SM CPU
utilization factor (used in scheduling).
.TP
.SB PRI
Process priority (non-positive when in non-interruptible wait).
.TP
.SB START
Time the process was created if that was today, or the date it was
created if that was before today.
.TP
.SB WCHAN
Event on which process is waiting (an address in the system).
A symbol is chosen that classifies the address, unless numerical
output is requested (see the 
.B n
flag).
In this case, the address is printed in hexadecimal.
.sp
.TP
.B F
Flags associated with process as in 
.RB < sys/proc.h >:. 
.br
.LP
.RS
.sp
.nf
.ta 6n 18n 26n
	\fB\s-1SLOAD\fR\s0	0000001	in core
	\fB\s-1SSYS\fR\s0	0000002	swapper or pager process
	\fB\s-1SLOCK\fR\s0	0000004	process being swapped out
	\fB\s-1SSWAP\fR\s0	0000008	save area flag
	\fB\s-1STRC\fR\s0	0000010	process is being traced
	\fB\s-1SWTED\fR\s0	0000020	parent has been told that this process stopped
	\fB\s-1SULOCK\fR\s0	0000040	user settable lock in core
	\fB\s-1SPAGE\fR\s0	0000080	process in page wait state
	\fB\s-1SKEEP\fR\s0	0000100	another flag to prevent swap out
	\fB\s-1SOMASK\fR\s0	0000200	restore old mask after taking signal
	\fB\s-1SWEXIT\fR\s0	0000400	working on exiting
	\fB\s-1SPHYSIO\fR\s0	0000800	doing physical I/O
	\fB\s-1SVFORK\fR\s0	0001000	process resulted from \fBvfork\fR()
	\fB\s-1SVFDONE\fR\s0	0002000	another vfork flag
	\fB\s-1SNOVM\fR\s0	0004000	no vm, parent in a \fBvfork\fR()
	\fB\s-1SPAGI\fR\s0	0008000	init data space on demand, from inode
	\fB\s-1SSEQL\fR\s0	0010000	user warned of sequential vm behavior
	\fB\s-1SUANOM\fR\s0	0020000	user warned of anomalous vm behavior
	\fB\s-1STIMO\fR\s0	0040000	timing out during sleep
	\fB\s-1SPGLDR\fR\s0	0080000	process is session process group leader
	\fB\s-1STRACNG\fR\s0	0100000	process is tracing another process
	\fB\s-1SOWEUPC\fR\s0	0200000	owe process an \fBaddupc\fR() call at next ast
	\fB\s-1SSEL\fR\s0	0400000	selecting; wakeup/waiting danger
	\fB\s-1SFAVORD\fR\s0	2000000	favored treatment in swapout and pageout
	\fB\s-1SLKDONE\fR\s0	4000000	record-locking has been done
	\fB\s-1STRCSYS\fR\s0	8000000	tracing system calls
.fi
.PD
.RE
.LP
A process that has exited and has a parent, but has not
yet been waited for by the parent is marked
.RB < defunct >;
a process that is blocked trying to exit is marked
.RB < exiting >;
otherwise,
.B ps
makes an educated guess as to the file name
and arguments given when the process was created
by examining memory or the swap area.
The method is inherently somewhat unreliable and in any event
a process is entitled to destroy this information,
so the names cannot be counted on too much.
.SH FILES
.PD 0
.TP 20
.B /vmunix
system namelist
.TP
.B /dev/kmem
kernel memory
.TP
.B /dev/drum
swap device
.TP
.B /vmcore
core file
.TP
.B /dev
searched to find swap device and terminal names
.TP
.B /etc/psdatabase
system namelist, device, and wait channel information
.PD
.SH "SEE ALSO"
.BR kill (1),
.BR w (1),
.BR getpriority (2),
.BR getrlimit (2),
.BR wait (2),
.BR vadvise (2),
.BR nice (3C),
.BR termio (4),
.BR pstat (8)
.SH BUGS
.LP
Things can change while
.B ps
is running; the picture it gives is only a close approximation to the
current state.
at the end of each file.
.TP
.B \-f
Inhibit
.B pg
from splitting lines.
Normally,
.B pg
splits lines longer than the screen width,
but some sequences of characters
in the text being displayed
(for instance, escape sequences for underlining)
generate undesirable results.  The
.TP
.B \-n
Automatic end of command as soon as a command
letter is entered.
Normally, c./share/man/man1/ptx.1                                                                                 755       0      12         6161  4424740707   7612                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ptx.1 1.13 89/03/26 SMI;
.TH PTX 1 "22 March 1989"
.SH NAME
ptx \- generate a permuted index
.SH SYNOPSIS
.B ptx
[
.B \-f
] [
.B \-t
] [
.B \-w
.I n
] [
.BI \-g
.I n
] [
.BI \-o
.I only
] [
.BI \-i
.I ignore
]
.if n .ti +0.5i
[
.BI \-b
.I break] [
.B \-r
] [
.I input
[
.I output
] ]
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ptx command"  ""  "\fLptx\fP \(em generate permuted index"
.IX  generate "permuted index \(em \fLptx\fP"
.IX  "create" "permuted index \(em \fLptx\fP"
.IX  "document production"  ptx  ""  "\fLptx\fP \(em generate permuted index"
.IX  "permuted index, generate \(em \fLptx\fP"
.IX  "indexing, generate permuted index \(em \fLptx\fR"
.B ptx
generates a permuted index of the contents of file
.I input
onto file
.I output
(defaults are standard input and output).
.B ptx
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 the page.
.B ptx
produces output in the form:
.IP
\&\fB.\fIxx\fB "\fItail\fB" "\fIbefore keyword\fB" "\fIkeyword and after\fB" "\fIhead\fB"
.LP
where
.I xx
may be an
.BR nroff (1)
or
.BR troff (1)
macro for user-defined formatting.  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 at the middle of the page.
.I tail
and
.IR head ,
at least one of which is an empty string
.BR \(lq\|\(lq ,
are wrapped-around pieces small enough to fit
in the unused space at the opposite end of the line.
When original text must be discarded,
.RB ` / '
marks the spot.
.SH OPTIONS
.TP 15
.BR \-f
Fold upper and lower case letters for sorting.
.TP
.BR \-t
Prepare the output for the phototypesetter;
the default line length is 100 characters.
.TP
.BI \-w " n"
Use the next argument,
.I n,
as the width of the output line.
The default line length is 72 characters.
.TP
.BI \-g " n"
Use the next argument,
.IR n ,
as the number of characters to allow for
each gap among the four parts of the line as finally printed.
The default gap is 3 characters.
.TP
.BI \-o " only"
Use as keywords only the words given in the
.I only
file.
.TP
.BI \-i " ignore"
Do not use as keywords any words given in the
.I ignore
file.
If the
\fB\-i\fR
and
\fB\-o\fR
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.
In any case,
.SM TAB\s0,
.SM NEWLINE\s0,
and
.SM SPACE
characters are always used as
break characters.
.TP
.BR \-r
Take any leading nonblank characters of each input line to
be a reference identifier (as to a page or chapter)
separate from the text of the line.
Attach that identifier as a 5th field on each output line.
.SH FILES
.PD 0
.TP 20
.B /usr/bin/sort
.TP
.B /usr/lib/eign
.PD
.SH SEE ALSO
.BR nroff (1),
.BR troff (1)
.SH BUGS
Line length counts do not account for overstriking
or proportional spacing.

.B ptx
[
.B \-f
] [
.B \-t
] [
.B \-w
.I n
] [
.BI \-g
.I n
] [
.BI \-o
.I only
] [
.BI \-i
.I ignore
]
.if n .ti +0.5i
[
.BI \-b
.I break] [
.B \-r
] [
.I input
[
.I output
] ]
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ptx command"  ""./share/man/man1/pushd.1                                                                               755       0      12           73  4424740707  10056                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)pushd.1 1.8 89/03/26 SMI; 
     M  ranlib.1      N  rasfilter8to1.1     O  
rastrepl.1     P  rcp.1c     Q  rdist.1     R  red.1 1     S  refer.1     T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  L  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c     `  
ruptime.1c     a  	./share/man/man1/pwd.1                                                                                 755       0      12         3625  4424740707   7573                                                                                                                                                                                                                                                                                                                                                                      .TH PWD 1  "22 March 1989"
.\" @(#)pwd.1 1.17 89/03/26 SMI; from UCB 4.1
.SH NAME
pwd \- display the pathname of the current working directory
.SH SYNOPSIS
.B pwd
.SH DESCRIPTION
.IX  "pwd command"  ""  "\fLpwd\fP \(em print working directory name"
.IX  display "working directory name \(em \fLpwd\fP"
.IX  "working directory"  "display name of"  ""  "display name of \(em \fLpwd\fP"
.IX  directory  "display name of working"  ""  "display name of working \(em \fLpwd\fP"
.IX  print "working directory name \(em \fLpwd\fP"
.IX  "file system"  "where am I"  ""  "where am I \(em \fLpwd\fP"
.LP
.B pwd
prints the pathname of the working (current)
directory.
.LP
If you are using
.BR csh (1),
you can use the
.B dirs
builtin command to do the same job more quickly;
.I but
.B dirs
can give a
different answer in the rare case that the current directory or a
containing directory was moved after the shell descended into it.
This is because
.B pwd
searches back up the directory tree to report
the true pathname, whereas
.B dirs
remembers the pathname from the
last
.BR cd (1)
command.  The example below illustrates the differences.
.LP
.RS
.nf
.ft B
example% cd  /usr/wendy/january/reports
example% pwd
/usr/wendy/january/reports
example% dirs
\s+2~\s0/january/reports
example% mv \s+2~\s0/january \s+2~\s0/february
example% pwd
/usr/wendy/february/reports
example% dirs
\s+2~\s0/january/reports
example%
.ft R
.fi
.RE
.LP
.B pwd
and
.B dirs
also give different answers when you change
directory through a symbolic
link.  For example:
.RS
.nf
.ft B
example% cd  /usr/wendy/january/reports
example% pwd
/usr/wendy/january/reports
example% dirs
\s+2~\s0/january/reports
example% ls \-l /usr/wendy/january
lrwxrwxrwx  1 wendy          17 Jan 30  1983 /usr/wendy/january \-> /usr/wendy/1984/jan/
example% cd  /usr/wendy/january
example% pwd
/usr/wendy/1984/jan
example% dirs
/usr/wendy/january
.ft R
.fi
.RE
.SH "SEE ALSO"
.BR cd (1),
.BR csh (1)
     sync.1       sysex.1       	syswait.1       t300.1g        t300s.1g   ./share/man/man1/quota.1                                                                               755       0      12         2276  4424740710  10125                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quota.1 1.13 89/03/26 SMI; from UCB 4.2
.TH QUOTA 1  "9 September 1987"
.UC 4
.SH NAME
quota \- display a user's disk quota and usage
.SH SYNOPSIS
.B quota
[
.B \-v
] [
.I username
]
.SH DESCRIPTION
.IX "quota command"  ""  "\fLquota\fP \(em display disk usage and limits"
.IX "file system"  "display disk usage and limits quota" ""  "display disk usage and limits \(em \fLquota\fP"
.IX display  "disk usage and limits quota"  ""  "disk usage and limits \(em \fLquota\fP"
.IX  limits "disk space \(em \fLquota\fP"
.B quota
displays users' disk usage and limits.
Only the super-user may use the optional
.I username
argument to view the limits of users other than himself.
.LP
.B quota
without options displays only warnings
about mounted file systems where usage is over quota.
Remotely mounted file systems which are
mounted with the ``noquota'' option (see
.BR fstab (5))
are ignored.
.SH OPTIONS
.TP
.B \-v
Display user's quotas on all mounted file systems where quotas exist.
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system root
.TP
.B /etc/mtab
list of currently mounted filesystems
.PD
.SH "SEE ALSO"
.BR quotactl (2),
.BR fstab (5),
.BR edquota (8),
.BR quotaon (8),
.BR rquotad (8C)
.1  P  t    shelltool.1       shift.1       
shift_lines.1       size.1       sleep.1       snap.1        soelim.1        sort.1v       	sortbib.1       source.1    (    sparc.1   8    spell.1   L    	spellin.1 L  `    
spellout.1 `  t./share/man/man1/ranlib.1                                                                              755       0      12         3110  4424740710  10227                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ranlib.1 1.17 89/03/26 SMI; from UCB 4.2 BSD
.TH RANLIB 1 "9 September 1987"
.SH NAME
ranlib \- convert archives to random libraries
.SH SYNOPSIS
.B ranlib
[
.B \-t
]
.IR archive .\|.\|.
.SH DESCRIPTION
.IX  "ranlib command"  ""  "\fLranlib\fP \(em make random library"
.IX  "create" "random library \(em \fLranlib\fP"
.IX  "build" "random library \(em \fLranlib\fP"
.IX  "programming tools"  ranlib  ""  "\fLranlib\fP \(em make random library"
.IX  "object code management"  ranlib  ""  "\fLranlib\fP \(em make random library"
.IX  library "make random \(em \fLranlib\fP"
.B ranlib
converts each
.I archive
to a form that can be linked more rapidly.
.B ranlib
does this by adding a table of contents called
.B _\|_.\s-1SYMDEF\s0
to the beginning of the archive.
.B ranlib
uses
.BR ar (1V)
to reconstruct the archive. Sufficient temporary file space must
be available in the file system that contains the current directory.
.SH OPTIONS
.TP
.B \-t
.B ranlib
only \(lqtouches\(rq the archives and does not modify them.
This is useful after copying an archive
or using the
.B \-t
option of
.BR make (1)
to avoid having
.BR ld (1)
complain about
an \(lqout of date\(rq symbol table.
.SH "SEE ALSO"
.BR ar (1V),
.BR ld (1),
.BR lorder (1),
.BR make (1)
.SH BUGS
.LP
Because generation of a library by
.B ar
and randomization of the library by
.B ranlib
are separate processes, phase errors are possible.  The linker,
.BR ld ,
warns when the modification date of a library is more recent than the
creation date of its dictionary;  but this means that you get the
warning even if you only copy the library.
  strip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 tty      sum.1v y       sun.1  y  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450./share/man/man1/rasfilter8to1.1                                                                       755       0      12         3714  4424740710  11501                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rasfilter8to1.1 1.11 89/03/26 SMI;
.TH RASFILTER8TO1 1 "22 March 1989"
.SH NAME
rasfilter8to1 \- convert an 8-bit deep rasterfile to a 1-bit deep rasterfile
.SH SYNOPSIS
.B rasfilter8to1
.RB [ " \-d " ]
.RB [ " \-rgba "
.IR threshold " ]"
.if n .ti +0.5i
.RI [ " infile " [ " outfile " ]]
.SH DESCRIPTION
.IX  "rasfilter8to1 command"  ""  "\fLrasfilter8to1\fP \(em convert 8-bit rasterfile to 1-bit rasterfile"
.IX  "convert 8-bit rasterfile to 1-bit rasterfile"  ""  "convert 8-bit rasterfile to 1-bit rasterfile\(em \fLrasfilter8to1\fP"
.LP
.B rasfilter8to1
reads the 8-bit deep rasterfile
.I infile
(the standard input default) and converts it to
the 1-bit deep rasterfile
.I outfile
(standard output default) by thresholding or ordered dither.
The output format is Sun standard rasterfile format
.RB "(see " /usr/include/rasterfile.h ).
This command is useful
for viewing 8-bit rasterfiles on devices that can only display
monochrome images.
.SH OPTIONS
.TP
.B \-d
Use ordered dither to convert the input file instead of thresholding.
.TP
.BI \-rgba " threshold"
Set the threshold for the red, green, blue, and average pixel color
values.  Pixels whose color values are greater
than or equal to all of the thresholds are
given a value of 0 (white) in the output rasterfile;
other pixels are set to 1 (black).  The average threshold defaults to
128, the individual thresholds to zero.
.SH EXAMPLE
The command
.IP
.B
example% screendump \-f  /dev/cgtwo | rasfilter8to1 | lpr \-Pversatec \-v
.LP
prints a monochromatic representation of the
.B /dev/cgtwo
frame buffer on the printer named
.B versatec
using the
.B v
output filter (see
.BR /etc/printcap ).
The printer must support an appropriate imaging model such as
PostScript in order to print the image.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/rasfilters/*
filters for non-standard rasterfile formats
.TP
.B /usr/include/rasterfile.h
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR rastrepl (1),
.BR screendump (1),
.BR screenload (1)
.LP
.TX PIXRCT
 \-d
Use ordered dither to convert the input file in./share/man/man1/rastrepl.1                                                                            755       0      12         2120  4424740710  10614                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rastrepl.1 1.13 89/03/26 SMI;
.TH RASTREPL 1 "22 March 1989"
.SH NAME
rastrepl \- magnify a raster image by a factor of two
.SH SYNOPSIS
.B rastrepl
.RI [ " input-file " [ " output-file " ]]
.SH DESCRIPTION
.IX  "rastrepl command"  ""  "\fLrastrepl\fP \(em magnify raster image"
.IX  "magnify raster image"  ""  "magnify raster image \(em \fLrastrepl\fP"
.LP
.B rastrepl
reads the rasterfile
.I input-file
(the standard input default) and converts it to
the rasterfile
.I output-file
(the standard output default) which is twice as large in width and height.
Pixel replication is used to magnify the image.
The output file has the same type as the input file.
.SH EXAMPLES
.LP
The following command:
.IP
.B
example% screendump  |  rastrepl  |  lpr \-Pversatec \-v
.LP
sends a rasterfile containing the current frame buffer contents to the
Versatec plotter, doubling the size of the image so that it fills a
single page.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/rasfilters/*
filters for non-standard rasterfile formats
.PD
.SH SEE ALSO
.BR lpr (1),
.BR screendump (1),
.BR screenload (1)
.LP
.TX PIXRCT
  P  ~  	setkeys.1 .1  `    sh.1 etk  t    shelltool.1       shift.1       
shift_lines.1 1       size.1 i      sleep.1       snap.1       soelim.1 nap      sort.1v       	sortbib.1 rt      source.1 ib.  (    sparc.1   8    spell.1   L    	spellin.1 el  `    
spellout.1 .  t    	spline.1g ut      split.1       stop.1       	./share/man/man1/rcp.1c                                                                                755       0      12         6614  4424740710   7723                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rcp.1c 1.21 89/03/26 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RCP 1C "16 December 1987"
.SH NAME
rcp \- remote file copy
.SH SYNOPSIS
.B rcp
[
.B \-p
]
.I filename1 filename2
.br
.B rcp
[
.B \-p \-r
]
.IR filename .\|.\|. directory
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rcp command"  ""  "\fLrcp\fP \(em remote file copy"
.IX  copy "files from remote machine \(em \fLrcp\fP"
.IX  file  "copy from remote machine"  ""  "copy from remote machine \(em \fLrcp\fP"
.IX  "remote file copy"  ""  "remote file copy \(em \fLrcp\fP"
.IX  network  "copy files across"  ""  "copy files across \(em \fLrcp\fP"
.B rcp
copies files between machines.  Each
.I filename
or
.I directory
argument is either a remote file name of the form:
.IP
.IB hostname : path
.LP
or a local file name (containing no
.RB ` : '
characters, or a
.RB ` / '
before any
.RB ` : 's).
.LP
If a
.I filename
is not a full path name, it is interpreted relative to
your home directory on
.IR hostname .
A
.I path
on a remote host may be quoted (using \fB\e\fR, \fB"\fR,
or \fB\(aa\fR)
so that the metacharacters are interpreted remotely.
.LP
.B rcp
does not prompt for passwords; your current local user name
must exist on
.I hostname
and allow remote command execution by
.BR rsh (1C).
.LP
.B rcp
handles third party copies, where neither source nor target files
are on the current machine.
Hostnames may also take the form
.IP
.IB username @ hostname : filename
.LP
to use
.I username
rather than your current local user name as the user name on
the remote host.
.B rcp
also supports Internet domain addressing of the remote host,
so that:
.IP
.IB username @ host . domain :\c
.I filename
.LP
specifies the username to be used, the hostname, and the domain
in which that host resides.
Filenames that are not full path names will be interpreted
relative to the home directory of the user named
.IR username ,
on the remote host.
.LP
The destination hostname may also take the form
.IB hostname . username : filename
to support destination machines that are running older versions of
.BR rcp .
.SH OPTIONS
.TP
.B \-p
Attempt to give each copy the same modification times, access times,
and modes as the original file.
.TP
.B \-r
Copy each subtree rooted at
.IR filename ;
in this case the destination must be a directory.
.SH FILES
.PD 0
.TP 20
.B .cshrc
.TP
.B .login
.TP
.B .profile
.PD
.SH SEE ALSO
.BR ftp (1C),
.BR rlogin (1C),
.BR rsh (1C)
.SH BUGS
.B rcp
is meant to copy between different hosts; attempting to
.B rcp
a file onto itself,
as with:
.IP
.B myhost% rcp tmp/file myhost:/tmp/file
.LP
results in a severely corrupted file.
.LP
.B rcp
does not detect all cases where the target of a copy might
be a file in cases where only a directory should be legal.
.LP
.B rcp
can become confused by output generated by commands in a
.BR \&.profile ,
.BR \&.cshrc ,
or
.BR \&.login
file on the remote host.
.LP
.B rcp
requires that the source host have permission
to execute commands on the
remote host when doing third-party copies.
.LP
If you forget to quote metacharacters intended for the remote host
you get an incomprehensible error message.
        view.1 1 gri        view.1 vi.1 d.1        view.1 1          view.1         view.1 ./share/man/man1/rdist.1                                                                               755       0      12        27132  4424740711  10140                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rdist.1 1.19 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RDIST 1 "22 March 1989"
.SH NAME
rdist \- remote file distribution program
.SH SYNOPSIS
.B rdist
[
.B \-bhinqRvwy
] [
.BI \-d " macro = value"
] [
.BI \-f " distfile"
] [
.BI \-m " host"
] .\|.\|. [
.I package
\&.\|.\|.
]
.LP
.B rdist
[
.B \-bhinqRvwy
]
.B \-c
.IR pathname " .\|.\|."
[\fIlogin\|\fB@\fR]\fIhostname\fR[\fB:\fIdestpath\|\fR]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "rdist command" "" "\fLrdist\fP \(em remote file distribution"
.B rdist
maintains copies of files on multiple hosts.
It preserves the owner, group, mode, and modification time of the
master copies, and can update programs that are executing.
Normally, a copy on a remote host is updated if its size
or modification time differs from the original on the local host.
.B rdist
reads the indicated
.I distfile
for instructions on updating files and/or directories.
If
.I distfile
is
.RB ` \- ',
the standard input is used.
If no
.B \-f
option is present,
.B rdist
first looks in its working directory for
.BR distfile ,
and then for
.BR Distfile ,
for instructions.
.LP
.B rdist
updates each
.I package
specified on the command line; if none are given, all packages
are updated according to their entries in the
.IR distfile .
.SH OPTIONS
.TP
.B \-b
Binary comparison.
Perform a binary comparison and update files if they differ,
rather than merely comparing dates and sizes.
.TP
.B \-h
Follow symbolic links.
Copy the file that the link points to rather than the link itself.
.TP
.B \-i
Ignore unresolved links.
.B rdist
will normally try to maintain the link structure of files being transfered
and warn the user if all the links cannot be found.
.TP
.B \-n
Print the commands without executing them.
This option is useful for debugging a distfile.
.TP
.B \-q
Quiet mode.  Do not display the files being updated on the standard output.
.TP
.B \-R
Remove extraneous files.
If a directory is being updated, remove files on the remote host that do not
correspond to those in the master (local) directory.
This is useful for maintaining truly identical copies of directories.
.TP
.B \-v
Verify that the files are up to date on all the hosts.
Any files
that are out of date are displayed, but no files are updated, nor is
any mail sent.
.TP
.B \-w
Whole mode.
The whole file name is appended to the destination directory name.
Normally, only the last component of a name is used when renaming files.
This preserves the directory structure of the files being copied, instead
of flattening the directory structure.
For instance, renaming a list of files such as
.B "( dir1/f1 dir2/f2 )"
to
.B dir3
would create files
.B dir3/dir1/f1
and
.B dir3/dir2/f2
instead of
.B dir3/f1
and
.BR dir3/f2 .
When the
.B \-w
option is used with a filename that begins with
.BR ~ ,
everything except the home directory is appended to the destination name.
.TP
.B \-y
Younger mode.
Do not update remote copies that are younger than the master copy, but
issue a warning message instead.
.TP
.BI \-d " macro" = value
Define
.I macro
to have
.IR value .
This option is used to define or override macro definitions in the distfile.
.I value
can be the empty string, one name, or a list of names surrounded by
parentheses and separated by white space.
.HP
.B \-c
.IR pathname " .\|.\|."
[\fIlogin\|\fB@\fR]\fIhostname\fR[\fB:\fIdestpath\|\fR]
.br
Update each
.I pathname
on the named host. (Relative filenames are taken as relative to your
home directory.)
If the
\fR`\fIlogin\fB\|@\fR'
prefix is given, the update is performed with the user ID of 
.IR login .  
If the
\fR`\fB:\fIdestpath\fR'
is  given, the remote file is installed as that pathname.
.br
.ne 5
.TP
.BI \-f " distfile"
Use the description file
.IR distfile .
A
.RB ` \- '
as the
.I distfile
argument denotes the standard input.
.TP
.BI \-m " host"
Limit which machines are to be updated.
Multiple
.B \-m
arguments can be given to limit updates to a subset of the hosts
listed in the distfile.
.SH USAGE
.SS Packages
A typical package begins with a label composed of the package
name followed by a colon:
.IP
.IB package :
.LP
This label allows you to group any number of file-to-host and
file-to-timestamp mappings into a single distribution package.
If no package label appears in the distfile, the default package
includes all mappings in the file.
.LP
A file-to-host mapping specifies a list of files or directories
to distribute, their destination host(s), and any
.B rdist
primitives to use in performing the update.  A mapping of this
sort takes the form:
.IP
.BI ( " pathname .\|.\|. " )
.B \->
.BI ( " hostname .\|.\|. " )
.I primitive
.B ;
.RI [ primitive
.BR ; ]\|.\|.\|.
.LP
In this case, each
.I pathname
is the full pathname of a local file or directory to distribute; each
.I hostname
is the name of a remote host on which those files are to be copied,
and
.I primitive
is one of the
.B rdist
primitive listed under
.IR Primitives ,
below.  If there is only one 
.I pathname
or 
.IR hostname ,
the surrounding parentheses can be omitted.  A
.I hostname
can also take the form:
.IP
.IB login @ hostname
.LP
in which case the update is performed as the user named
.IR login .
.LP
A file-to-timestamp mapping is used to monitor which local files are
updated with respect to a local ``timestamp'' file.  This mapping
takes the form:
.IP
.BI ( " filename .\|.\|. " )
.B ::
.I timestamp-file
.I primitive
.B ;
.RI [ primitive
.BR ; ]\|.\|.\|.
.LP
In this case,
.I timestamp-file
is the name of a file, the modification time of which is compared with
each named file on the local host.  If a file is newer than
.IR time-stamp-file ,
.B rdist
displays a message to that effect.  If there is only one
.IR filename ,
the parentheses can be omitted.
.SS White Space Characters
.LP
.SM NEWLINE\s0,
.SM TAB\s0,
and
.SM SPACE
characters are all treated as white space; a mapping
continues across input lines until the start of the next mapping:
either a single
.I filename
followed by a
.RB ` \-> '
or the opening parenthesis of a filename list.
.SS Comments
Comments begin with
.B #
and end with a
.SM NEWLINE\s0.
.SS Macros
.LP
.B rdist
has a limited macro facility.  Macros are only expanded in filename or
hostname lists, and in the argument lists of certain primitives.  Macros
cannot be used to stand for primitives or their options, or the
.BR ` \-> '
or
.BR ` :: '
symbols.
.LP
A macro definition is a line of the form:
.IP
.IB macro " = " value
.LP
A macro reference is a string of the form:
.IP
.BI ${ macro }
.LP
although (as with
.BR make (1))
the braces can be omitted if the macro name consists of just one
character.
.br
.ne 7
.SS Metacharacters
.LP
The shell meta-characters:
.BR [ ,
.BR ] ,
.BR { ,
.BR } ,
.B *
and
.B ?
are recognized and expanded (on the local host only) just as
they are with 
.BR csh (1).
Metacharacters can be escaped by prepending a backslash.
.LP
The
.B ~
character is also expanded in the same way as with
.BR csh ,
however, it is expanded separately on the local and destination hosts.
.SS Filenames
.LP
File names that do not begin with
.B /
or
.B ~
are taken to be relative to user's home directory on each
destination host.  Note that they are
.I not
relative to the current working directory.
.SS Primitives
The following primitives can be used to specify actions
.B rdist
is to take when updating remote copies of each file.
.HP
.B install \-bhiRvwy
.RI [ newname ]
.br
Copy out-of-date files and directories (recursively).
If no
.B install
primitive appears in the package entry, or if
no
.I newname
option is given, the name of the local file is given to the
remote host's copy.
If absent from the remote host, parent directories in a
filename's path are created.
To help prevent disasters, a non-empty directory on a target host is
not replaced with a regular file or a symbolic link by
.BR rdist .
However, when using the
.B \-R
option, a non-empty directory is removed if the corresponding filename
is completely absent on the master host.
The options for
.B install
have the same semantics as
their command line counterparts, but are limited
in scope to a particular map.
The login name used on the destination host is the same as the local host
unless the destination name is of the format
.IB login @ host\fR.
In that case, the update is performed under the username
.IR login .
.TP 20
.BI notify " address \&.\|.\|."
Send mail to the indicated DARPA
.I address
of the form:
.IP
.IB user @ host
.LP
that lists the files updated and any errors that may have occurred.
If an address does not contain a
\fR`\fB@\fIhost\|\fR'
suffix,
.B rdist
uses the name of the destination host to complete the address.
.TP
.BI except " filename .\|.\|."
Omit from updates the files named as arguments.
.TP
.BI except_pat "pattern .\|.\|."
.LP
Omit from updates the filenames that match each regular-expression
.I pattern
(see
.BR ed (1)
for more information on regular expressions.
Note that 
.B \e
and 
.B $
characters must be escaped in the distfile.
Shell variables can also be used within a pattern, however
shell filename expansion is not supported.
.HP
.B special
.RI [ filename "] .\|.\|."
\fB"\fIcommand-line\|\fB"\fR
.br
Specify a Bourne shell,
.BR sh (1)
command line to execute on the remote host after each named file is updated.
If no
.I filename
argument is present, the 
.I command-line
is performed for every updated file, with the shell variable
.SB FILE
set to the file's name on the local host.  The quotation marks allow 
.I command-line
to span input lines in the distfile; multiple shell commands must be
separated by semicolons
.RB ( ; ).
.IP
The default working directory for the shell executing each
.I command-line
is the user's home directory on the remote host.
.SH EXAMPLE
The following sample distfile instructs
.B rdist
to maintain identical copies of a shared
library, a shared-library initialized data file, several
include files, and a directory, on hosts named
.B hermes
and
.BR magus .
On
.BR magus ,
commands are executed as root.
.B rdist
notifies 
.B merlin@druid
whenever it discovers that a local file has changed relative to
a timestamp file.
.br
.ne 5
.IP
.ft B
.nf
\s-1HOSTS\s0 = ( hermes root@magus )
.sp
\s-1FILES\s0 = ( /usr/local/lib/libcant.so.1.1
	/usrlocal/lib/libcant.sa.1.1 /usr/local/include/{*.h}
	/usr/local/bin )
.sp
${\s-1FILES\s0} \-> ${\s-1HOSTS\s0}
	install \-R ;
${\s-1FILES\s0} :: /usr/local/lib/timestamp
	notify merlin@druid ;
.fi
.ft R
.SH FILES
.PD 0
.TP 20
.B /tmp/rdist*
temporary file for update lists
.PD
.SH "SEE ALSO"
.BR csh (1),
.BR ed (1),
.BR sh (1),
.BR stat (2)
.SH DIAGNOSTICS
.LP
A complaint about mismatch of
.B rdist
version numbers may really stem
from some problem with starting your shell,
for example, you are in too many groups.
.SH BUGS
.LP
Source files must reside or be mounted on the local host.
.LP
There is no easy way to have a special command executed only once after
all files in a directory have been updated.
.LP
Variable expansion only works for name lists;
there should be a general macro facility.
.LP
.B rdist
aborts on files that have a negative modification time (before Jan 1, 1970).
.LP
There should be a \(lqforce\(rq option to allow replacement of
non-empty directories by regular files or symlinks.
A means of updating file modes and owners
of otherwise identical files is also needed.
.SH CAVEATS
.B root
does not have its accustomed access privileges on NFS mounted 
file systems.  Using
.B rdist
to copy to such a file system may fail, or the copies may be
owned by user ``nobody.''
h the Bourne Shell:
.IP
.RS
.nf
$  \fBmake \|\-fp \|\- \|2>/dev/null \|</dev/null\fP
.fi
.RE
.LP
If you are using the C shell, use this command to print out
.BR make 's
internal rules:
.IP
.RS
.nf
.B "example%  (make \|\-fp \|\- \|</dev/null \|>/dev/tty) \|>&/dev/null"
.fi
.RE
.SS Library Maintenance
.LP
If a target name contains parentheses, as with:
.RS
.LP
.B lib.a(member)
.RE
.LP
it is assumed to be the name of an ./share/man/man1/red.1                                                                                 755       0      12           56  4424740711   7501                                                                                                                                                                                                                                                                                                                                                                      .so man1/ed.1
.\" @(#)red.1 1.5 89/03/26 SMI;
T  rehash.1      U  repeat.1    (  V  reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  L  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c i    `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1./share/man/man1/refer.1                                                                               755       0      12         7577  4424740711  10111                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)refer.1 1.17 89/03/26 SMI;
.TH REFER 1 "22 March 1989"
.SH NAME
refer \- expand and insert references from a bibliographic database
.SH SYNOPSIS
.B refer
[
.B \-ben
] [
.BI \-a r
] [
.BI \-c string
] [
.BI \-k x
] [
.BI \-l m,n
]
.if n .ti +0.5i
[
.BI \-p " filename"
] [
.BI \-s keys
]
.IR filename .\|.\|.
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "refer command"  ""  "\fLrefer\fP \(em insert literature references"
.IX  "insert literature references"  ""  "insert literature references \(em \fLrefer\fP"
.IX  find "literature references"  ""  "find literature references \(em \fLrefer\fP"
.IX  "document production"  refer  ""  "\fLrefer\fP \(em insert literature references"
.IX  "bibliography"  refer  ""  "\fLrefer\fP \(em insert literature references"
.IX  "literature references, find and insert \(em \fLrefer\fP"
.B refer
is a preprocessor for
.BR nroff (1),
or
.BR troff (1),
that finds and formats references.
The input files (standard input by
default) are copied to the standard output, except for lines between
.RB ` .\|[ '
and
.RB ` .\|] '
command lines,
Such lines are assumed to contain keywords as for
.BR lookbib (1),
and are replaced by information from a bibliographic data base.  The
user can avoid the search, override
fields from it, or add new fields.
The reference data, from whatever source, is assigned to a set of
.B troff
strings.  Macro packages such as
.BR ms (7)
print the finished reference text from
these strings.  A flag is placed
in the text at the point of reference.
By default, the references are
indicated by numbers.
.LP
When
.B refer
is used with
.BR eqn (1),
.BR neqn ,
or
.BR tbl (1),
.B refer
should be used first in the sequence, to minimize the
volume of data passed through pipes.
.SH OPTIONS
.TP
.B \-b
Bare mode \(em do not put any flags in
text (neither numbers or labels).
.TP
.B \-e
Accumulate references instead of leaving
the references where encountered,
until a sequence of the form:
.RS
.RS
.sp .5
.nf
.ft B
\&.[
$\s-1LIST\s0$
\&.]
.fi
.RE
.RE
.IP
is encountered, and then write out all references collected so far.
Collapse references to the same source.
.TP
.B \-n
Do not search the default file.
.TP
.BI \-a r
Reverse the first
.I r
author names (Jones, J. A. instead of J. A. Jones).  If
.I r
is omitted, all author names are reversed.
.TP
.BI \-c string
Capitalize (with
\s-1SMALL CAPS\s0)
the fields whose key-letters are in
.IR string .
.TP
.BI \-k x
Instead of numbering references, use labels
as specified in a reference
data line beginning with the characters
.IR %x ;
By default,
.I x
is
.BR L .
.TP
.BI \-l m,n
Instead of numbering references, use labels
from the senior author's last
name and the year of publication.  Only the first
.I m
letters of the
last name and the last
.I n
digits of the date are used.  If either of
.I m
or
.I n
is omitted, the entire name or date, respectively, is used.
.TP
.BI \-p " filename"
Take the next argument as a file of references to be searched.  The
default file is searched last.
.TP
.BI \-s keys
Sort references by fields whose key-letters are in the
.I keys
string, and permute reference numbers in the text accordingly.
Using this option implies the
.B \-e
option.  The key-letters in
.I keys
may be followed by a number indicating how many such fields are used,
with a
.B +
sign taken as a very large number.  The default is
.SM
.BR AD\s0 ,
which sorts on the senior author and date.
To sort on all authors and
then the date, for instance, use the options
.RB  ` \-sA+T '.
.br
.ne 6
.SH FILES
.PD 0
.TP 20
.B /usr/dict/papers
directory of default publication lists and indexes
.TP
.B /usr/lib/refer
directory of programs
.PD
.SH "SEE ALSO"
.BR addbib (1),
.BR eqn (1),
.BR indxbib (1),
.BR lookbib (1),
.BR nroff (1),
.BR roffbib (1),
.BR sortbib (1),
.BR tbl (1),
.BR troff (1)
n filename or
hostname lists, and in the argument lists of certain primitives.  Macros
cannot be used to stand for primitives or ./share/man/man1/rehash.1                                                                              755       0      12           74  4424740711  10201                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)rehash.1 1.8 89/03/26 SMI; 
reset.1   8  W  rev.1 1   L  X  	rlogin.1c L  \  Y  rm.1  L  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c     `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  ./share/man/man1/repeat.1                                                                              755       0      12           74  4424740711  10207                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)repeat.1 1.8 89/03/26 SMI; 
1 se  L  X  	rlogin.1c 1   \  Y  rm.1 n.1  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1 1     ]  rpcgen.1      ^  rsh.1c 1    _  rup.1c .    `  
ruptime.1c     a  	rusers.1c       b  rwall.1c      c  rwho.1c      d  sact.1 o  8  e  sccs-admin.1  8  L  f  
sccs-cdc.1 e  `  g  sccs-comb.1   x  h  sccs-delta.1  x    i  
sccs-get.1 h    j  sccs-help.1     k  
./share/man/man1/reset.1                                                                               755       0      12           63  4424740712  10050                                                                                                                                                                                                                                                                                                                                                                      .so man1/tset.1
.\" @(#)reset.1 1.5 89/03/26 SMI; 
	rlogin.1c se  \  Y  rm.1 n.1  l  Z  rmdel.1   |  [  rmdir.1     \  	roffbib.1 1     ]  rpcgen.1  1     ^  rsh.1c 1    _  rup.1c .    `  
ruptime.1c .    a  	rusers.1c       b  rwall.1c       c  rwho.1c      d  sact.1 o  8  e  sccs-admin.1  8  L  f  
sccs-cdc.1 8  `  g  sccs-comb.1   x  h  sccs-delta.1  x    i  
sccs-get.1 x    j  sccs-help.1     k  
sccs-prs.1      l  
./share/man/man1/rev.1                                                                                 755       0      12         1210  4424740712   7555                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rev.1 1.9 89/03/26 SMI;
.TH REV 1  "9 September 1987"
.SH NAME
rev \- reverse the order of characters in each line
.SH SYNOPSIS
.B rev
[
.I filename
] .\|.\|.
.SH DESCRIPTION
.IX  "rev command"  ""  "\fLrev\fP \(em reverse lines in file"
.IX  "reverse lines in file"  ""  "reverse lines in file \(em \fLrev\fP"
.IX  file  "reverse lines in"  ""  "reverse lines in \(em \fLrev\fP"
.IX  "text processing utilities"  "reverse lines in file"  ""  "reverse lines in file \(em \fLrev\fP"
.B rev
copies the named files to the standard output,
reversing the order of characters in every line.
If no file is specified, the standard input is copied.
sccs.1 $  \  s  
sccsdiff.1 \  t  t  
screenblank.1 t    u  screendump.1  u    v  screenload.1  v    w  script.1      x   scrolldefaults.1       y  sdiff.1      z  sed.1v      {  selection_svc.1   (  |  set.1 1   <  }  setenv.1  <  P  ~  	setkeys.1 P  `    sh.1  1   t    shelltool.1       shift.1   ./share/man/man1/rlogin.1c                                                                             755       0      12        11374  4424740712  10452                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rlogin.1c 1.30 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RLOGIN 1C "22 March 1989"
.SH NAME
rlogin \- remote login
.SH SYNOPSIS
.B rlogin
[
.B \-L
]
[
.B \-8
] 
[
.BI \-e c
] [
.B \-l
.I username
]         
.\"[
.\".B \-7
.\"]
.if n .ti +0.5i
.I hostname
.SH AVAILABILITY
.LP
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rlogin command"  ""  "\fLrlogin\fP \(em remote login"
.IX  "remote login"  \fLrlogin\fP
.IX  login  "to remote machine"  ""  "to remote machine \(em \fLrlogin\fP"
.LP
.B rlogin
establishes a remote login session from
your terminal to the remote machine named
.IR hostname .
.LP
Hostnames are listed in the 
.I hosts 
database,
which may be contained in the
.B /etc/hosts
file, the Yellow Pages
.I hosts
database,
the Internet domain name server,
or a combination of these.
Each host has one official name (the
first name in the database entry),
and optionally one or more nicknames.
Either official hostnames or nicknames may be specified in
.IR hostname.
.LP
Each remote machine may have a file named
.B /etc/hosts.equiv
containing a list of trusted hostnames
with which it shares usernames.
Users with the same username on both the local
and remote machine may 
.nh
.B rlogin 
.hy
from the
machines listed in the remote machine's
.B /etc/hosts.equiv
file without supplying a password.
Individual users
may set up a similar private equivalence list with the file
.B \&.rhosts
in their home directories.
Each line in this file contains two names: a
.I hostname
and a
.I username
separated by a 
.SM SPACE\s0.
An entry in a remote user's
.B \&.rhosts
file permits the user named
.I username
who is logged into
.I hostname
to rlogin to the remote machine as the remote user
without supplying a password.
If the name of the local host is not found in the 
.B /etc/hosts.equiv
file on the remote machine,
and the local username and hostname are not found in
the remote user's .rhosts file, then
the remote machine will prompt for a password.
Hostnames listed in 
.B /etc/hosts.equiv
and 
.B \&.rhosts
files must be the official hostnames listed in the hosts database;
nicknames may not be used in either of these files.
.LP
To counter security problems, the
.B \&.rhosts
file must be owned by
either the remote user or by root.
.LP
The remote terminal type is the same as your local
terminal type (as given in your environment
.SB TERM
variable).  The terminal or window size
is also copied to the remote system
if the server supports the option, and
changes in size are reflected as well.
All echoing takes place at the remote site, so that (except for
delays) the remote login is transparent.  Flow control using
.B ^S
(\s-1CTRL\s0-S)
and
.B ^Q
(\s-1CTRL\s0-Q)
and
flushing of input and output on interrupts are handled properly.
.SH ESCAPES
.LP
Lines that you type which start with the tilde
character are \(lqescape sequences\(rq (the
escape character can be changed using the
.B \-e
options):
.TP
.B \s+2~\s0\^.
Disconnect from the remote host \(em this is not the same as a logout,
because the local host breaks the connection with no warning to the
remote end.
.TP
.B \s+2~\s0susp
Suspend the login session (only if you are using the C shell).
.B susp
is your \(lqsuspend\(rq character, usually
.BR \^^Z ,
(\s-1CTRL\s0-Z),
see
.BR tty (1).
.TP
.B \s+2~\s0dsusp
Suspend the input half of the login,
but output will still be seen (only
if you are using the C shell).
.B dsusp
is your \(lqdeferred suspend\(rq character, usually
.BR \^^Y ,
(\s-1CTRL\s0-Y),
see
.BR tty (1).
.SH OPTIONS
.TP
.B \-L
Allow the
.B rlogin
session to be run in \(lqlitout\(rq mode.
.TP 
.B \-8
Pass eight-bit data across the net instead of seven-bit data.
.\"This is the default.
.TP 
.BI \-e c
Specify a different escape character,
.IR c ,
for the line used to disconnect from the remote host.
.\".TP
.\" .BR \-7 5
.\"Pass seven-bit data across the net instead of eight-bit data.
.TP 
.BI \-l " username"
Specify a different
.I username
for the remote login.  If you do not use
this option, the remote username used is the
same as your local username.
.br
.ne 5
.SH FILES
.PD 0
.TP 20
.B /usr/hosts/*
for the
.I hostname
version of the command
.TP
.B /etc/hosts.equiv	
list of trusted hostnames
with shared usernames
.TP
.B \s+2~\s0/.rhosts
private list of trusted hostname/username combinations
.SH SEE ALSO
.BR rsh (1C),
.BR stty (1V),
.BR tty (1),
.BR ypcat (1),
.BR hosts (5),
.BR named (8C)
.SH BUGS
.LP
This implementation can only use the
.SM TCP
network service.
.LP
More of the environment should be propagated.
.B ~
are taken to be relative to user's home directory on each
destination host.  Note that they are
.I not
relative to the current working directory.
.SS Primitives
The following primitives can be used to specify actions
.B rdist
is to take when updating remo./share/man/man1/rm.1                                                                                  755       0      12         4666  4424740713   7422                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rm.1 1.18 89/03/26 SMI; from UCB 4.1
.TH RM 1 "22 March 1989"
.SH NAME
rm, rmdir \- remove (unlink) files or directories
.SH SYNOPSIS
.B rm
.RB [ " \- " ]
.RB [ " \-fir " ]
.IR filename \&.\|.\|.
.LP
.B rmdir
.IR directory .\|.\|.
.SH DESCRIPTION
.IX  "rm command"  ""  "\fLrm\fP \(em remove file or directory"
.IX  "rmdir command"  ""  "\fLrmdir\fP \(em remove directory"
.IX  remove "file \(em \fLrm\fP"
.IX  remove "directory \(em \fLrmdir\fP"
.IX  delete "file \(em \fLrm\fP"
.IX  delete "directory \(em \fLrmdir\fP"
.IX  erase "file \(em \fLrm\fP"
.IX  erase "directory \(em \fLrmdir\fP"
.IX  file  remove  ""  "remove \(em \fLrm\fP"
.IX  file  delete  ""  "delete \(em \fLrm\fP"
.IX  directory  "remove"  ""  "remove \(em \fLrmdir\fP"
.IX  directory  "delete"  ""  "delete \(em \fLrmdir\fP"
.LP
.B rm
removes (directory entries for) one or more files.
If an entry was the last link to the file, the contents of that
file are lost.  See
.BR ln (1)
for more information about multiple links to files.
.LP
To remove a file, you must have write permission in its directory; but
you do not need read or write permission on the file itself.
If you do not have write permission on the file and the standard input
is a terminal,
.B rm
displays the file's permissions and waits for
you to type in a response.  If your response begins with
.B y
the file is deleted; otherwise the file is left alone.
.LP
.B rmdir
removes each named
.IR directory .
.B rmdir
only removes empty directories.
.SH OPTIONS
.TP
.B \-
Treat the following arguments as filenames
.RB ` \- '
so that you can specify filenames starting with a minus.
.TP
.B \-f
Force files to be removed without displaying permissions, asking
questions or reporting errors.
.TP
.B \-i
Ask whether to delete each file, and, under
.BR \-r ,
whether to examine each directory.  Sometimes called the
.I interactive
option.
.TP
.B \-r
Recursively delete the contents of a directory,
its subdirectories, and the directory itself.
.SH SEE ALSO
.BR ln (1),
.BR su (1)
.SH BUGS
.LP
.RB ` "rm \ \-r" '
removes a directory and its files only if your real user
.SM ID
has write permission on that directory.
.SH DIAGNOSTICS
.TP
.BI "rm: " filename ": No such file or directory"
.I filename
does not exist.
.B rm
will also return false
.RB ( 1 )
if
.I filename
was not found.
.SH WARNING
.LP
It is forbidden to remove the file
.RB ` .\|. '
to avoid the antisocial consequences of
inadvertently doing something like
.RB ` "rm \ \-r \ .*" '.
l    u3b5.1 2  |    ul.1 3b5      umask.1       	unal./share/man/man1/rmdel.1                                                                               755       0      12           70  4424740713  10030                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-rmdel.1
.\" @(#)rmdel.1 1.3 89/03/26 SMI;
bib.1     ]  rpcgen.1      ^  rsh.1c     _  rup.1c 1    `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-scc./share/man/man1/rmdir.1                                                                               755       0      12           60  4424740714  10042                                                                                                                                                                                                                                                                                                                                                                      .so man1/rm.1
.\" @(#)rmdir.1 1.9 89/03/26 SMI;
  ]  rpcgen.1      ^  rsh.1c     _  rup.1c     `  
ruptime.1c     a  	rusers.1c      b  rwall.1c       c  rwho.1c      d  sact.1    8  e  sccs-admin.1  e  L  f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  ./share/man/man1/roffbib.1                                                                             755       0      12         7107  4424740714  10407                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)roffbib.1 1.28 89/03/26 SMI;
.TH ROFFBIB 1 "22 March 1989"
.SH NAME
roffbib \- format and print a bibliographic database
.SH SYNOPSIS
.B roffbib
[
.B \-e
] [
.B \-h
] [
.B \-m
.I filename
] [
.BI \-n p
]
.if n .ti +0.5i
[
.BI \-o list
] [
.B \-Q
]
[
.BI \-r aN
] [
.BI \-s N
]
[
.BI \-T term
]
.if n .ti +0.5i
[
.B \-V
]
.if t .ti +0.5i
[
.B \-x
]
[
.I filename
] .\|.\|.
.SH AVAILABILITY
.LP
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "roffbib command"  ""  "\fLroffbib\fP \(em print bibliographic database"
.IX  "document production"  "roffbib command"  ""  "\fLroffbib\fP \(em print bibliographic database"
.IX  "print bibliographic database"  ""  "print bibliographic database \(em \fLroffbib\fP"
.IX  "bibliography"  roffbib  ""  "\fLroffbib\fP \(em print literature references"
.LP
.B roffbib
prints out all records in a bibliographic database,
in bibliography format rather than as footnotes or endnotes.
Generally it is used in conjunction with
.BR sortbib (1):
.IP
.B example% sortbib  database | roffbib
.SH OPTIONS
.B roffbib
accepts all options understood by
.BR nroff (1)
except
.B \-i 
and
.BR \-q .
.TP
.B \-e
Produce equally-spaced words in adjusted lines using full
terminal resolution.
.TP
.B \-h
Use output tabs during horizontal spacing to speed output and
reduce output character count.
.SM TAB
settings are assumed to be
every 8 nominal character widths.
.TP
.BI \-m " filename"
Prepend the macro file
.B /usr/share/lib/tmac/tmac.name
to the input files.
There should be a space between the
.B \-m
and the macro filename.
This set of macros will replace the ones
defined in
.BR /usr/share/lib/tmac/tmac.bib .
.TP
.BI \-n p
Number first generated page
.IR p .
.TP
.BI \-o list
Print only page numbers that appear in the comma-separated
.I list
of numbers and ranges.  A range
.IB N \- M
means pages
.I N
through
.IR M ;
an initial
.BI \- N
means from the beginning to page
.IR N ;
a final
.IB N \-
means from page
.I N
to end.
.TP
.B \-Q
Queue output for the phototypesetter.  Page offset is set to 1
inch.
.TP
.BI \-r aN
Set register
.I a
(one-character) to
.IR N .
The command-line argument
.B \-rN1
will number the references starting at 1.
.IP
Four command-line registers control formatting style
of the bibliography, much like the number registers of
.BR ms (7).
The flag
.B \-rV2
will double space the bibliography, while
.B \-rV1
will double space references but single space annotation paragraphs.
The line length can be changed from the default 6.5 inches
to 6 inches with the
.B \-rL6i
argument, and the page offset can be set from the default of 0
to one inch by specifying
.B \-rO1i
(capital O, not zero).
.TP
.BI \-s N
Halt prior to every
.I N
pages for paper loading or changing
(default
.IR N \|=1).
To resume, enter
.SM NEWLINE
or
.SM RETURN\s0.
.TP
.BI \-T term
Specify
.I term
as the terminal type.
.TP
.B \-V
Send output to the Versatec.  Page offset is set to 1 inch.
This option not available on Sun386i systems.
.TP
.B \-x
If abstracts or comments are entered following the
.B %X
field key,
.B roffbib
will format them into paragraphs for an annotated bibliography.
Several
.B %X
fields may be given if several
annotation paragraphs are desired.
.SH FILES
.PD 0
.TP 25
.B /usr/share/lib/tmac/tmac.bib
file of macros used by
.B nroff/troff
.PD
.br
.ne 7
.SH SEE ALSO
.BR addbib (1),
.BR indxbib (1),
.BR lookbib (1),
.BR nroff (1)
.BR refer (1),
.BR sortbib (1),
.BR troff (1)
.LP
.TX DOCS
.SH BUGS
.LP
Users have to rewrite macros to create customized formats.
login,
but output will still be seen (only
if you are using the C shell).
.B dsusp
is your \(lqdeferred suspend\(rq character, usually
.BR \^^Y ,
(\s-1CTRL\s0-Y),
see
.BR tty (1).
.SH OPTIONS
.TP
.B \-L
Allow the
.B rlogin
session to be run in \(lqlitout\(rq mode.
.TP 
.B \-8
Pass eight-bit data across the net instead of seven-bit data.
.\"This is the default.
.TP 
.BI \-e c
Specify a different escape character,
.IR c ,
for the line used./share/man/man1/rpcgen.1                                                                              755       0      12         7061  4424740714  10253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rpcgen.1 1.13 89/03/26 SMI
.TH RPCGEN 1 "18 January 1988"
.SH NAME
rpcgen \- an RPC protocol compiler
.SH SYNOPSIS
.BI rpcgen " infile"
.br
.B rpcgen
.BR \-c \|| \|\-h \|| \|\-l \||\fB\|\-m
[
.BI \-o " outfile"
]
[
.I infile
]
.br
.B rpcgen \-s
.I transport
[
.BI \-o " outfile"
]
[
.I infile
]
.br
.SH DESCRIPTION
.IX "compilers" rpcgen "" "\fLrpcgen\fR \(em generate RPC protocols, C header files"
.IX rpcgen "" "\fLrpcgen\fR \(em generate RPC protocol, C header files, and server skeleton"
.IX RPC "generate protocols \(em \fLrpcgen\fR"
.B rpcgen
is a tool that generates C
code to implement an
.SM RPC
protocol.  The input to
.B rpcgen
is a language similar to C
known as
.SM RPC
Language (Remote Procedure Call Language).  Information
about the syntax of
.SM RPC
Language is available in the
.RI ` rpcgen ' " Programming Guide"
in the
.TX NETP
manual.
.LP
.B rpcgen
is normally used as in the first synopsis where it takes an input file
and generates four output files. If the
.I infile
is named
.BR proto.x ,
then
.B rpcgen
will generate a header file in
.BR proto.h ,
.SM XDR
routines in
.BR proto_xdr.c ,
server-side stubs in
.BR proto_svc.c ,
and client-side stubs in
.BR proto_clnt.c .
.LP
The other synopses shown above are used when one does not want to
generate all the output files, but only a particular one.  Their
usage is described in the
.SM USAGE
section below.
.LP
The C-preprocessor,
.BR cpp (1),
is run on all input files before they are actually
interpreted by
.BR rpcgen ,
so all the
.B cpp
directives are legal within an
.B rpcgen
input file.  For each type of output file,
.B rpcgen
defines a special
.B cpp
symbol for use by the
.B rpcgen
programmer:
.PP
.PD 0
.TP 12
.SB RPC_HDR
defined when compiling into header files
.TP
.SB RPC_XDR
defined when compiling into
.SM XDR
routines
.TP
.SB RPC_SVC
defined when compiling into server-side stubs
.TP
.SB RPC_CLNT
defined when compiling into client-side stubs
.PD
.LP
In addition,
.B rpcgen
does a little preprocessing of its own.
Any line beginning with
.RB ` % '
is passed directly into the output file, uninterpreted by
.BR rpcgen .
.LP
You can customize some of your
.SM XDR
routines by leaving those data
types undefined.  For every data type that is undefined,
.B rpcgen
will assume that there exists a routine with the name
.B xdr_
prepended to the name of the undefined type.
.SH OPTIONS
.TP
.B \-c
Compile into
.SM XDR
routines.
.TP
.B \-h
Compile into
.B C
data-definitions (a header file)
.TP
.B \-l
Compile into client-side stubs.
.TP
.B \-m
Compile into server-side stubs, but do not generate a \(lqmain\(rq routine.
This option is useful for doing callback-routines and for people who
need to write their own \(lqmain\(rq routine to do initialization.
.TP
.BI \-o " outfile"
Specify the name of the output file.
If none is specified, standard output is used
.RB ( \-c ,
.BR \-h ,
.B \-l
and
.B \-s
modes only).
.TP
.BI \-s " transport"
Compile into server-side stubs, using the the given transport.  The
supported transports
are
.B udp
and
.BR tcp .
This option may be invoked more than once
so as to compile a server that serves multiple transports.
.br
.ne 5
.SH "SEE ALSO"
.BR cpp (1)
.LP
.RI ` rpcgen ' " Programming Guide"
in
.TX NETP
.br
.ne 4
.SH BUGS
.LP
Nesting is not supported.
As a work-around, structures can be declared at
top-level, and their name used inside other structures in order to achieve
the same effect.
.LP
Name clashes can occur when using program definitions, since the apparent
scoping does not really apply. Most of these can be avoided by giving
unique names for programs, versions, procedures and types.
e customized formats.
login,
but output will still be seen (only
if you are using the C shell).
.B dsusp
is your \(lqdeferred suspend\(rq character, usually
.BR \^^Y ,
(\s-1CTRL\s0-Y),
see
.BR tty (1).
.SH OPTIONS
.TP
.B \-L
Allow the
.B rlogin
session to be run in \(lqlitout\(rq mode.
.TP 
.B \-8
Pass eight-bit data across the net instead of seven-bit data.
.\"This is the default.
.TP 
.BI \-e c
Specify a different escape character,
.IR c ,
for the line used./share/man/man1/rsh.1c                                                                                755       0      12        13711  4424740714   7753                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rsh.1c 1.24 89/03/26 SMI;
.hw rlogin
.TH RSH 1C "22 March 1989"
.SH NAME
rsh \- remote shell
.SH SYNOPSIS
.B rsh
[
.B \-l
.I username
] [
.B \-n
]
.I hostname
.I command
.LP
.B rsh
.I hostname
[
.B \-l
.I username
] [
.B \-n
]
.I command
.LP
.I hostname
[
.B \-l
.I username
] [
.B \-n
]
.I command
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rsh command"  ""  "\fLrsh\fP \(em remote shell"
.IX  "remote shell"  ""  "remote shell \(em \fLrsh\fP"
.IX  shell  remote  shell  "remote \(em \fLrsh\fP"
.B rsh
connects to the specified
.I hostname
and executes the specified
.IR command .
.B rsh
copies its standard input to the remote command, the standard
output of the remote command to its standard output, and the
standard error of the remote command to its standard error.
Interrupt, quit and terminate signals are propagated to the remote
command;
.B rsh
normally terminates when the remote command does.
.LP
If you omit
.IR command ,
instead of executing a single command,
.B rsh
logs you in on the remote host using
.BR rlogin (1C).
.BP
Shell metacharacters which are not quoted are interpreted
on the local machine, while quoted metacharacters are interpreted on
the remote machine. See
.SM EXAMPLES\s0.
.LP
Hostnames are given in the 
.I hosts
database, which may be contained in the 
.B /etc/hosts
file,
the Yellow Pages
.I hosts 
database, the Internet domain name database,
or some combination of the three.
Each host has one official name (the first
name in the database entry)
and optionally one or more nicknames.
Official hostnames or nicknames may be given as
.IR hostname .
.LP
If the name of the file from which 
.B rsh
is executed is anything other than ``rsh,''
.B rsh 
takes this name as its
.I hostname
argument.
This allows you to create a symbolic link to
.B rsh in the name
of a host which, when executed, will invoke a remote
shell on that host.
The
.B /usr/hosts
directory is provided to be populated with symbolic links in the names
of commonly used hosts.
By including
.B /usr/hosts
in your shell's search path,
you can run
.B rsh
by typing 
.I hostname 
to your shell.
.LP
Each remote machine may have a file named
.B /etc/hosts.equiv
containing a list of trusted hostnames
with which it shares usernames.
Users with the same username on both the local and
remote machine may 
.B rsh
from the machines listed in the remote machine's
.B /etc/hosts
file.
Individual users may set up a similar private
equivalence list with the file
.B .rhosts
in their home directories.
Each line in this file contains two names: a
.I hostname
and a
.I username
separated by a space.
The entry permits the user named
.I username
who is logged into
.I hostname
to use
.B rsh
to access the remote machine as the remote user.
If the name of the local host is not found in the
.B /etc/hosts.equiv file on the remote machine,
and the local username and hostname are not
found in the remote user's
.B .rhosts
file, then the access is denied.
The hostnames listed in the
.B /etc/hosts.equiv
and
.B .rhosts
files must be the official hostnames listed in the hosts database;
nicknames may not be used in either of these files.
.LP
.B rsh
will not prompt for a password if access is denied on the remote machine
unless the
.I command
argument is omited.
.SH OPTIONS
.TP
.BI \-l " username"
Use
.I username
as the remote username instead of your local username.  In the absence
of this option, the remote username is the same as your local username.
.TP
.B \-n
Redirect the input of
.B rsh
to
.BR /dev/null .
You sometimes need this option to avoid
unfortunate interactions between
.B rsh
and the shell which invokes it.  For example, if you are running
.B rsh
and invoke a
.B rsh
in the background without redirecting its input
away from the terminal, it will block even if no reads
are posted by the remote command.  The
.B \-n
option will prevent this.
.LP
The type of remote shell
.RB ( sh ,
.BR rsh ,
or other) is determined by the user's
entry in the file
.B /etc/passwd
on the remote system.
.SH EXAMPLES
The command:
.IP
.B
example% rsh lizard cat lizard.file >> example.file
.LP
appends the remote file 
.B lizard.file
from the machine called
.B lizard
to the file called
.B example.file
on the machine called
.BR example ,
while the command:
.IP
.ft B
example% rsh lizard cat lizard.file ">>" another.lizard.file
.ft R
.LP
appends the file
.B lizard.file
on the machine called
.B lizard
to the file
.B another.lizard.file
which also resides on the machine called
.BR lizard .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
.TP
.B /usr/hosts/*
.TP
.B /etc/passwd
.PD
.SH SEE ALSO
.BR rlogin (1C),
.BR vi (1),
.BR ypcat (1),
.BR hosts (5),
.BR named (8C)
.SH BUGS
.LP
You cannot run an interactive command (such as
.BR vi (1));
use
.B rlogin
if you wish to do so.
.LP
Stop signals stop the local
.B rsh
process only; this is arguably
wrong, but currently hard to fix for reasons too complicated to
explain here.
.LP
The current local environment is not passed to the remote shell.
.LP
Sometimes the
.B \-n
option is needed for reasons that are less than obvious.
For example, the command:
.IP
.B
example% rsh somehost dd if=/dev/nrmt0 bs=20b | tar xvpBf \-
.LP
will put your shell into a strange state.  Evidently, what happens is
that the
.B tar
terminates before the
.BR rsh .
The
.B rsh
then tries to write into the \(lqbroken pipe\(rq and,
instead of terminating neatly,
proceeds to compete with your shell for its standard input.  Invoking
.B rsh
with the
.B \-n
option avoids such incidents.
.LP
Note: this bug occurs only when
.B rsh
is at the beginning of a pipeline and
is not reading standard input.  Do not use the
.B \-n
if
.B rsh
actually needs to read standard input.  For example,
.IP
.B
example% tar cf \- . | rsh sundial dd of=/dev/rmt0 obs=20b
.LP
does not produce the bug.  If you were to use the
.B \-n
in a case like this,
.B rsh
would incorrectly read from
.B /dev/null
instead of from the pipe.
ular file or a symbolic link by
.BR rdist .
However, wh./share/man/man1/rup.1c                                                                                755       0      12         2533  4424740714   7745                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rup.1c 1.11 89/03/26 SMI;
.TH RUP 1C "22 March 1989"
.SH NAME
rup \- show host status of local machines (RPC version)
.SH SYNOPSIS
.B rup
[
.B \-hlt
]
.br
.B rup
[
.IR host .\|.\|.
]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rup command"  ""  "\fLrup\fP \(em display status of network hosts"
.IX  display "status of network hosts \(em \fLrup\fP"
.B rup
gives a status similar to
.B uptime
for remote machines.  It broadcasts on the local network, and displays
the responses it receives.
.LP
Normally, the listing is in the order that responses are received,
but this order can be
changed by specifying one of the options listed below.
.LP
When
.I host
arguments are given, rather than broadcasting
.B rup
will only query the list of specified hosts.
.LP
A remote host will only respond if it is running the
.B rstatd
daemon, which is normally started up from
.BR inetd (8C).
.SH OPTIONS
.TP
.B \-h
Sort the display alphabetically by host name.
.TP
.B \-l
Sort the display by load average.
.TP
.B \-t
Sort the display by up time.
.SH FILES
.PD 0
.TP 20
.B /etc/servers
.PD
.SH SEE ALSO
.BR ruptime (1C),
.BR inetd (8C),
.BR rstatd (8C)
.SH BUGS
.LP
Broadcasting does not work through gateways.
  	sunview.1 H  \    	suspend.1 \  l    swin.1 4      switch.1        
switcher.1       
symorder.1       sync.1       ./share/man/man1/ruptime.1c                                                                            755       0      12         2440  4424740714  10621                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ruptime.1c 1.19 89/03/26 SMI; from UCB 4.1
.TH RUPTIME 1C "17 December 1987"
.SH NAME
ruptime \- show host status of local machines
.SH SYNOPSIS
.B ruptime
[
.B \-alrtu
]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ruptime command"  ""  "\fLruptime\fP \(em display status of local hosts"
.IX  "display status of network hosts"  ""  "display status of local hosts \(em \fLruptime\fP"
.B ruptime
gives a status line like
.B uptime
for each machine on the local network; these are formed from packets
broadcast by each host on the network once a minute.
.LP
Machines for which no status report has been received for 5 minutes are
shown as being down.
.LP
Normally, the listing is sorted by host name, but this order can be
changed by specifying one of the options listed below.
.SH OPTIONS
.TP 5
.B \-a
Count even those users who have been idle for an hour or more.
.TP
.B \-l
Sort the display by load average.
.TP
.B \-r
Reverse the sorting order.
.TP
.B \-t
Sort the display by up time.
.TP
.B \-u
Sort the display by number of users.
.SH FILES
.PD 0
.TP
.B /var/spool/rwho/whod.*
data files
.PD
.SH SEE ALSO
.BR rup (1C),
.BR rwho (1C)
sun.1  1  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	./share/man/man1/rusers.1c                                                                             755       0      12         3755  4424740715  10472                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rusers.1c 1.11 89/03/26 SMI; from UCB 4.1
.TH RUSERS 1C "22 March 1989"
.SH NAME
rusers \- who's logged in on local machines (RPC version)
.SH SYNOPSIS
.B rusers
[
.B \-ahilu
] [
.IR host .\|.\|.
]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rusers command"  ""  "\fLrusers\fP \(em who is logged in on local network"
.IX  "who is logged in on local network"  ""  "who is logged in on local network \(em \fLrusers\fP"
.IX  network  rusers  ""  "\fLrusers\fP \(em who is logged in on local network"
.IX  login  rusers  ""  "\fLrusers\fP \(em who is on local network"
.LP
The
.B rusers
command produces output similar to
.BR users (1)
and
.BR who (1),
but for remote machines.  It broadcasts on the local network,
and prints the responses it receives.
Normally, the listing is in the order that responses are received,
but this order can be
changed by specifying one of the options listed below.
When
.I host
arguments are given, rather than broadcasting
.B rusers
will only query the list of specified hosts.
.LP
The default is to print out a listing in the style of
.BR users (1)
with one line per machine.  When the
.B \-l
flag is given, a
.BR rwho (1C)
style listing is used.  In addition, if
a user has not typed to the system for a minute or more,
the idle time is reported.
.LP
A remote host will only respond if it is running the
.B rusersd
daemon, which is normally started up from
.BR inetd (8C).
.SH OPTIONS
.TP
.B \-a
Give a report for a machine even if
no users are logged on.
.TP
.B \-h
Sort alphabetically by host name.
.TP
.B \-i
Sort by idle time.
.TP
.B \-l
Give a longer listing in the style of
.BR who (1).
.TP
.B \-u
Sort by number of users.
.SH FILES
.PD 0
.TP 20
.B /etc/inetd.conf
.PD
.SH SEE ALSO
.BR rwho (1C),
.BR users (1),
.BR who (1),
.BR inetd (8C),
.BR rusersd (8C)
.SH BUGS
.LP
Broadcasting does not work through gateways.
   touch.1v  ./share/man/man1/rwall.1c                                                                              755       0      12         2746  4424740715  10267                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rwall.1c 1.15 89/03/26 SMI;
.TH RWALL 1C "22 March 1989"
.SH NAME
rwall \- write to all users over a network
.SH SYNOPSIS
.B /usr/etc/rwall
.IR hostname .\|.\|.
.br
.B /usr/etc/rwall
.B \-n
.IR netgroup .\|.\|.
.br
.B /usr/etc/rwall
.B \-h
.B hostname
.B \-n
.B netgroup
.SH AVAILABILITY
.LP
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "write to all users on network \(em \fLrwall\fP"
.IX  network  rwall  ""  "\fLrwall\fP \(em write to all users"
.IX  "broadcast messages to all users on network \(em \fLrwall\fR"
.LP
.B rwall
reads a message from standard input until
.SM EOF\s0.
It then sends this message,
preceded by the line
.RB ` "Broadcast Message .\|.\|." ',
to all users logged in on the specified host machines.
With the
.B \-n
option, it sends to the specified network groups,
which are defined in
.BR netgroup (5).
.LP
A machine can only receive such a message if it is running
.BR rwalld (8C),
which is normally started up from
.B /etc/servers
by the daemon
.BR inetd (8C).
.SH FILES
.PD 0
.TP 20
.B /etc/servers
.PD
.SH "SEE ALSO"
.BR wall (1),
.BR netgroup (5),
.BR inetd (8C),
.BR rwalld (8C),
.BR shutdown (8)
.SH BUGS
.LP
The timeout is fairly short in order to be able to send to
a large group of machines (some of which may be down)
in a reasonable amount of time.
Thus the message may not get through to a heavily loaded machine.
 t300.1g        t300./share/man/man1/rwho.1c                                                                               755       0      12         3413  4424740715  10115                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rwho.1c 1.16 89/03/26 SMI; from UCB 4.1
.TH RWHO 1C "17 December 1987"
.SH NAME
rwho \- who's logged in on local machines
.SH SYNOPSIS
.B rwho
[
.B \-a
]
.SH AVAILABILITY
The
.B rwho
service daemon,
.BR rwhod (8C)
must be enabled for this command to return useful results.
Refer to
.BR finger (1),
.BR rup (1C)
and
.BR rusers (1C)
for alternatives.
.SH AVAILABILITY
.LP
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rwho command"  ""  "\fLrwho\fP \(em who is logged in on local network"
.IX  "who is logged in on local network"  ""  "who is logged in on local network \(em \fLrwho\fP"
.IX  network  rwho  ""  "\fLrwho\fP \(em who is logged in on local network"
.IX  login  rwho  ""  "\fLrwho\fP \(em who is on local network"
.LP
The
.B rwho
command produces output similar to
.BR who (1),
but for all machines on your network.  If no report has been
received from a machine for 5 minutes,
.B rwho
assumes the machine is down, and does not report users last known
to be logged into that machine.
.LP
If a user has not typed to the system for a minute or more,
.B rwho
reports this idle time.  If a user has not  typed to the system for
an hour or more, the user is omitted from the output of
.B rwho
unless the
.B \-a
flag is given.
.SH OPTIONS
.TP 5
.B \-a
Report all users whether or not they
have typed to the system in the
past hour.
.SH FILES
.PD 0
.TP 20
.B /var/spool/rwho/whod.*
information about other machines
.SH SEE ALSO
.BR finger (1),
.BR rup (1C),
.BR ruptime (1C),
.BR rusers (1C),
.BR who (1),
.BR rwhod (8C)
.SH BUGS
.LP
Does not work through gateways.
.LP
This is unwieldy when the number of machines
on the local net is large.
test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1 p  L    time.1v   \    tip.1c e  t    toolplaces.1  t      touch.1v  t      tput.1v       tr.1v ut    ./share/man/man1/sact.1                                                                                755       0      12           66  4424740715   7666                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-sact.1
.\" @(#)sact.1 1.3 89/03/26 SMI;
f  
sccs-cdc.1 L  `  g  sccs-comb.1   x  h  sccs-delta.1  h    i  
sccs-get.1     j  sccs-help.1     k  
sccs-prs.1     l  
sccs-prt.1     m  sccs-rmdel.1  m    n  sccs-sact.1     o  sccs-sccsdiff.1   $  p  sccs-unget.1  p  8  q  
sccs-val.1 8  H  r  sccs.1 $  \  s  
sccsdiff.1 \  t  t  
screenblank.1 t    u  screendump.1  u    v  screenload.1  v    w  script.1      x./share/man/man1/sccs-admin.1                                                                          755       0      12        22136  4424740715  11037                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-admin.1 1.33 89/03/26 SMI; from UCB 4.2
.TH SCCS-ADMIN 1 "22 March 1989"
.SH NAME
sccs-admin, admin \- create and administer SCCS history files
.SH SYNOPSIS
.B /usr/sccs/admin
[
.B \-bhnz
] [
.BI \-a username\c
.RI | groupid
] \&.\|.\|. [
.BI \-d flag
] \&.\|.\|.
.if n .in +0.5i
[
.BI \-e username\c
.RI | groupid
] \&.\|.\|.
.if t .ti +.5i
[
.BI \-f flag
[
.I value
]\|] \&.\|.\|.
[
.B \-i
[
.I filename
]\|]
.if n .br
[
.BR "\-l a" |\c
.IR release [\c
.BI , release\c
\&.\|.\|.\|]
] [
.B \-m
.I mr-list
] [
.BI \-r release
]
.if t .ti +.5i
[
.B \-t
[
.I description-file
]\|]
.if n .br
[
.B \-y
[
.I comment
]\|]
.I s.filename
\&.\|.\|.
.SH DESCRIPTION
.IX  admin  ""  "\fLadmin\fP \(em administer SCCS"
.IX  "SCCS commands"  "admin command"  ""  "\fLadmin\fP \(em administer SCCS"
.IX  create  "SCCS data bases"
.LP
.B admin
creates or modifies the flags and other parameters of
.SM SCCS
history files.  Filenames of
.SM SCCS
history files begin with the
.RB ` s. '
prefix, and are referred to as
.BR s. files ,
or ``history'' files.
.LP
The named
.BR s. file
is created if it does not exist already.
Its parameters are initialized or modified according to the
options you specify.  Parameters not specified are given default
values when the file is initialized, otherwise they remain unchanged.
.LP
If a directory name is used in place of the
.IR s.filename
argument,
the
.B admin
command applies to all
.BR s. files
in that directory.  Unreadable
.BR s. files
produce an error.  The use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from the
standard input, one
.BR s. file 
per line.  
.SH OPTIONS
.TP
.B \-b
Force encoding of binary data.  Files that
contain
.SM ASCII NUL
or other control characters, or that do not end with a
.SM NEWLINE,
are recognized as binary data files.  The contents of such files are
stored in the history file in encoded form.  See
.BR uuencode (1C)
for details about the encoding.  This option
is normally used in conjunction with
.BR \-i
to force
.B admin
to encode initial versions not recognized as containing binary data.
.TP
.B \-h
Check the structure of an existing
.BR s. file
(see
.BR sccsfile (5)),
and compare a newly computed check-sum with one stored
in the first line of that file.
.B \-h
inhibits writing on the file; and so nullifies the effect of any
other options.
.TP
.B \-n
Create a new 
.SM SCCS
history file.
.TP
.B \-z
Recompute the file check-sum and store it in the first
line of the
.BR s. file.
Caution:  it is important to verify the contents of the
history file (see
.BR sccs-val (1),
and the
.B print
subcommand in
.BR sccs (1)),
since using
.B \-z
on a truly corrupted file may prevent detection of the error.
.HP
.BI \-a username\c
.RI | groupid
.br
Add a user name, or a numerical group
.SM ID\s0,
to the list of users who may check deltas in or out.
If the list is empty, any user is allowed to do so.
.TP
.BI \-d flag
Delete the indicated
.I flag
from the
.SM SCCS
file.  The
.B \-d
option may be specified only for existing s.files.
See
.B \-f
for the list of recognized flags.
.HP
.BI \-e username\c
.RI | groupid
.br
Erase a user name or group
.SM ID
from the list of users allowed to make
deltas.
.HP
.BI \-f flag
.RI [ value ]
.br
Set the indicated
.IR flag
to the (optional)
.I value
specified.  The following flags are recognized:
.RS
.RS
.TP
.B b
Enable branch deltas.  When
.B b
is set, branches can be created using the
.B \-b
option of the
.SM SCCS
.B get
command
(see
.BR sccs-get (1)).
.TP
.BI c ceil
Set a ceiling on the releases that can be checked out.
.I ceil
is a number less than or equal to 9999.
If
.B c
is not set, the ceiling is 9999.
.TP
.BI f floor
Set a floor on the releases that can be checked out.
The floor is a number greater than 0 but less than
9999.  If
.B f
is not set, the floor is 1.
.TP
.BI d sid
The default delta number, or 
.SM SID,
to be used by an
.SM SCCS
.BR get
command.
.br
.ne 5
.TP
.B i
Treat the
.RB ` "No id keywords (ge6)" '
message issued by an
.SM SCCS
.BR get
or
.BR delta
command as an error rather than a warning.
.TP
.B j
Allow concurrent updates.
.TP
.B la
.PD 0
.HP
.B l\c
.I release\c
.RB [ ,\c
.IR release \|.\|.\|.\|]
.br
.PD
Lock the indicated list of releases against deltas.  If
.B a
is used, lock out deltas to all releases.
An
.SM SCCS
.RB ` "get \-e" '
command fails when applied against a locked release.
.TP
.B n
Create
empty releases when releases are skipped.  These null (empty) deltas
serve as anchor points for branch deltas.
.TP
.BI q value
Supply a 
.I value
to which the
.B %\&Q%
keyword is to expand when a read-only version is retrieved with the
.SM SCCS
.BR get
command.
.TP
.BI m module
Supply a value for the module name to which the
.B %\&M%
keyword is to expand.
If the
.B m
flag is not specified, the value
assigned is the name of the SCCS file with the leading
.B s.
removed.
.TP
.BI t type
Supply a value for the module type
to which the
.B %\&Y%
keyword is to expand.
.TP
.BI v\fR\|[ \|program\fR\|]
Specify a validation
.I program
for the
.SM MR
numbers associated with a new delta.
The optional
.I program
specifies the name of an
.SM MR
number validity checking
.IR program .
If this flag is set when creating an
.SM SCCS
file, the
.B \-m
option must also be used, in which case the list of
.SM MRs
may be empty.
.RE
.RE
.TP
.BI \-i\fR\|[\fP filename\fR]
Initialize the history file with text from the indicated file.
This text constitutes the initial delta, or set of checked-in
changes.
If
.I filename
is omitted, the initial text is obtained from the standard input.
Omitting the
.B \-i
option altogether creates an empty
.BR s. file.
You can only initialize one
.BR s. file
with text using
.BR \-i .
This option implies the
.B \-n
option.
.TP
.BR "\-l a"
.PD 0
.HP
.B \-l\c
.IR release [\c
.BI , release\c
\&.\|.\|.\|]
Unlock the specified releases so that deltas can be checked in.  If
.B a
is specified, allow deltas to be checked in for all releases.
.TP
.BI \-m\fR\|[\| mr-list\fR\|]
Insert the indicated Modification Request (\s-1MR\s0) numbers into the
commentary for the initial version.
When specifying more than one MR number on the command line,
.I mr-list
takes the form of a quoted, space-separated list.
A warning results if the
.B v
flag is not set or the
.SM MR
validation fails.
.TP
.BI \-r release
Specify the release for the initial delta.
.B \-r
may be used only in conjunction with
.BR \-i .
The initial delta is inserted into release 1 if this option is
omitted.  The level of the initial delta is always 1;
initial deltas are named 1.1 by default.
.TP
.BI \-t\fR\|[\fP description-file\fR]
Insert descriptive text from the file
.IR description-file .
When 
.B \-t
is used in conjunction with
.BR \-n ,
or
.BR \-i
to initialize a new s.file, the
.I description-file
must be supplied.
When modifying the description for an existing file:
a
.B \-t
option without a
.I description-file
removes the descriptive text, if any;
a
.B \-t
option with a
.I description-file
replaces the existing text.
.TP
.BI \-y\fR\|[\|\fP comment\fR\|]
Insert the indicated
.I comment
in the ``Comments:''
field for the initial delta.  Valid only in conjunction with
.B \-i
or
.BR \-n .
If
.B \-y
option is omitted, a default
comment line is inserted that notes the date and time the
history file was created.
.SH FILES
.PD 0
.TP 20
.B s.*
history file
.TP
.B \s-1SCCS\s0/s.*
history file in
.SM SCCS
subdirectory
.TP
.B z.*
temporary lock file
.PD
.SH WARNINGS
The last component of all 
.SM SCCS
filenames must have the
.RB ` s. '
prefix.
New 
.SM SCCS
files are given mode 444 (see
.BR chmod (1V)).
All writing done by
.B admin
is to a temporary file with an
.B x.
prefix, created with mode 444 for a new
.SM SCCS
file, or with the same mode as an existing
.SM SCCS
file.  After successful execution of
.BR admin ,
the existing
.B s.
file is removed and replaced with the 
.BR x. file.
This ensures that changes are made to the 
.SM SCCS
file only when no errors have occurred.
.LP
It is recommended that directories containing 
.SM SCCS
files have permission mode 755,
and that the 
.BR s. files
themselves have mode 444.
The  mode for directories allows only the owner to modify the
.SM SCCS
files contained in the directories, while
the mode of the 
.BR s. files
prevents all modifications except those performed using
.SM SCCS
commands.
.LP
If it should be necessary to patch an 
.SM SCCS
file for any reason,
the mode may be changed to 644 by the owner to allow use of a text
editor.  However, extreme care must be taken when doing this.
The edited file should
.I always
be processed by an
.RB ` "admin \-h" '
to check for corruption, followed by an
.RB ` "admin \-z" '
to generate a proper check-sum.  Another
.RB ` "admin \-h" '
is recommended to ensure that the resulting
.BR s. file
is valid.
.LP
.B admin
also uses a temporary lock
.BR s. file,
starting with the
.RB ` z. '
prefix, to prevent simultaneous updates to the
.BR s. file.
See
.BR sccs-get (1)
for further information about the
.RB ` z. file'.
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-cdc (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-rmdel (1),
.BR sccs-val (1),
.BR sccsfile (5)
.LP
.TX PUL .
.SH DIAGNOSTICS
.LP
Use the
.SM SCCS
.B help
command for explanations (see
.BR sccs-help (1)).
-line
to span input lines in the distfile; multiple shell commands must be
separated by semicolons
.RB ( ; ).
.IP
The default working directory for the shell executing each
.I command-line
is the user's home directory on the remote host.
.SH EXAMPLE
The following sample distfile instructs
.B rdist
to maintain identical copies of a shared
library, a shared-library initialized data file, several
include files, and a ./share/man/man1/sccs-cdc.1                                                                            755       0      12         7167  4424740715  10467                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-cdc.1 1.19 89/03/26 SMI;
.TH SCCS-CDC 1 "22 March 1989"
.SH NAME
sccs-cdc, cdc \- change the delta commentary of an SCCS delta
.SH SYNOPSIS
.B /usr/sccs/cdc
.BI \-r sid
[
.BI \-m mr-list
]
[
.B \-y
[
.I comment
] ]
.I s.filename
\&\.\|.\|.
.SH DESCRIPTION
.IX  cdc  ""  "\fLcdc\fP \(em change delta commentary"
.IX  "SCCS commands"  "cdc command"  ""  "\fLcdc\fP \(em change delta commentary"
.IX  "SCCS delta"  "change commentary"
.IX  "delta"  "change commentary"
.IX  "change"  "delta commentary"
.LP
.B cdc
annotates the delta commentary for the
.SM SCCS
delta ID
(\s-1SID\s0)
specified by the
.B \-r
option in each named
.BR s. file.
.LP
If the
.B v
flag is set in the
.BR s. file,
you can also use
.B cdc
to update the Modification Request
(\s-1MR\s0)
list.
.LP
If you checked in the delta,
or, if you own the file and directory and have write permission,
you can use
.B cdc
to annotate the commentary.
.LP
Rather than replacing the existing commentary,
.B cdc
inserts the new comment you supply, followed by a line of the form:
.IP
.B "*** \s-1CHANGED\s0 ***
.IB yy / mm / dd
.IB hh / mm / ss
.I username
.LP
above the existing commentary.
.LP
If a directory is named as the
.I s.filename
argument, the
.B cdc
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if any).
If
.RB ` \- '
is given as the
.I s.filename
argument, each line of the standard input is taken as the name of an
.SM SCCS
history file to be processed, and the
.B \-m
and
.B \-y
options must be used.
.SH OPTIONS
.TP
.BI \-r sid
Specify the
.SM SID
of the delta to change.
.TP 
.BI \-m mr-list
Specify one or more MR numbers to add or delete.
When specifying more than one MR on the command line,
.I mr-list
takes the form of a quoted, space-separated list.
To delete an MR number, precede it with a
.B !
character (an empty
.SM MR
list has no effect).
A list of deleted
.SM MR\s0s
is placed in the comment section of the delta commentary.
If
.B \-m
is not used and the standard input is a terminal,
.B cdc
prompts with
.B \s-1MR\s0s?
for the list (before issuing the
.B comments?
prompt).
.B \-m
is only useful when the
.B v
flag is set in the
.BR s. file.
If that flag has a value, it is
taken to be the name of a program to validate the MR numbers.  If
that validation program returns a non-zero exit status,
.B cdc
terminates and the delta commentary remains unchanged.
.HP
.B \-y\c
.RI [ comment ]
Use
.I comment
as the annotation in the delta commentary.
The previous comments are retained; the
.I comment
is added along with a notation that the commentary was changed.
A 
.SM NULL
.I comment
leaves the commentary unaffected.
If
.B \-y
is not specified and the standard input is a terminal,
.B cdc
prompts with
.BR  comments?
for the text of the notation to be added.  An unescaped
.SM NEWLINE
character terminates the annotation text.
.SH EXAMPLES
.LP
The following command:
.RS
.ft B
.nf
example% cdc \-r1.6 \-y"corrected commentary" s.program.c
.fi
.ft R
.RE
.LP
produces the following annotated commentary for delta 1.6 in
.BR s.program.c :
.IP
.ft B
.nf
D 1.6 88/07/05 23:21:07 username 9 0 00001/00000/00000
MRs:
\s-1COMMENTS\s0:
corrected commentary
*** \s-1CHANGED\s0 *** 88/07/07 14:09:41 username
performance enhancements in main()
.fi
.ft
.br
.ne 5
.SH FILES
.PD 0
.TP
.BI z. file
temporary lock file
.PD
.br
.ne 5
.SH SEE ALSO
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-comb (1),
.BR sccs-delta (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-rmdel (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL .
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
BI \-m mr-list
Specify one or more MR numbers to add or delete.
When specifying more than one MR on the command line,
.I mr-list
takes the form of a quoted, space-separated list.
To delete an MR number, precede it with a
.B !
character (an empty
.SM MR
list has no effect).
A list of deleted
.SM MR\s0s
is placed in the comment section of the delta commentary.
If
.B \-m
is not used and the st./share/man/man1/sccs-comb.1                                                                           755       0      12         5561  4424740716  10653                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-comb.1 1.18 89/03/26 SMI;
.TH SCCS-COMB 1 "22 March 1989"
.SH NAME
sccs-comb, comb \- combine SCCS deltas
.SH SYNOPSIS
.B /usr/sccs/comb 
[
.B \-os
] 
[
.BI \-c sid-list
] 
[
.BI \-p sid
] 
.if n .ti +0.5i
.I s.filename
\&.\|.\|.
.SH DESCRIPTION
.IX  comb  ""  "\fLcomb\fP \(em combine deltas"
.IX  "SCCS commands"  "comb command"  ""  "\fLcomb\fP \(em combine deltas"
.IX  "SCCS delta"  combine
.IX  delta  combine
.IX  "combine SCCS deltas"
.LP
.B comb
generates a shell script (see
.BR sh (1))
that you can use to reconstruct the indicated
.BR s. files.
This script is written to the standard output.
.LP
If a directory name is used in place of the
.I s.filename
argument, the
.B comb
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from the
standard input, one
.BR s. file 
per line.
.LP
If no options are specified,
.B comb
preserves only the most recent (leaf) delta in a branch, and the
minimal number of ancestors needed to preserve the history.
.SH OPTIONS
.TP
.B \-o
For each
.RB ` "get \-e" '
generated, access the reconstructed file at
the release of the delta to be created.  Otherwise,
the reconstructed file is accessed at the most
recent ancestor.  The use of
.B \-o
may decrease the size of the reconstructed
.BR s.  file.
It may also alter the shape of the delta tree of the original file.
.TP
.B \-s
Generate scripts to gather statistics, rather than combining deltas.
When run, the shell scripts report: the file name, size (in blocks)
after combining, original size (also in blocks), and the percentage
size change, computed by the formula:
.RS
.RS
100 * ( \fIoriginal\fB \- \fIcombined\fB ) / \fIoriginal\fB
.RE
.RE
.IP
This option can be used to calculate the space that will be saved,
before actually doing the combining.
.TP
.BI \-c sid-list
Include the indicated list of deltas.  All other deltas are omitted.
.I sid-list
is a comma-separated list of
.SM SCCS
delta
.SM ID\s0s
(\s-1SID\s0s).
To specify a range of deltas, use a
.RB ` \- '
separator instead of a comma, between two
.SM SID\s0s
in the list.
.TP
.BI \-p \s-1SID\s0
The
.SM SID
of the oldest delta to be preserved.
.LP
.SH FILES
.PD 0
.TP 20
.B s.\|\s-1COMB\s+1
reconstructed 
.SM SCCS
file
.TP
.B comb?????
temporary file
.PD
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-cdc (1),
.BR sccs-delta (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-rmdel (1),
.BR sccs-sccsdiff (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.BR help
command for explanations
.RB ( sccs-help (1)).
.SH BUGS
.B comb
may rearrange the shape of the tree of deltas.
It may not save any space; in fact, it is possible for the reconstructed file to
actually be larger than the original.
 vgrind.1 .1       vi.1 d.1        view.1 1 gri        view.1 the
.SM MR
numbers associated with a new delta.
The optional
.I ./share/man/man1/sccs-delta.1                                                                          755       0      12        10525  4424740716  11040                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-delta.1 1.23 89/03/26 SMI;
.TH SCCS-DELTA 1 "22 March 1989"
.SH NAME
sccs-delta, delta \- make a delta to an SCCS file
.SH SYNOPSIS
.B /usr/sccs/delta
[ 
.B \-nps
]
[ 
.BI \-g " sid-list"
]
[
.BI \-m mr-list
]
[
.BI \-r sid
]
]
.if n .br
[
.B \-y\c
.RI [ comment ]
]
.I s.filename
\&.\|.\|.
.SH DESCRIPTION
.IX delta "make SCCS delta \(em \fLdelta\fR"
.IX create "delta \(em \fLdelta\fR"
.IX create  "SCCS delta \(em \fLdelta\fR"
.IX make  "delta, SCCS \(em \fLdelta\fR"
.IX make  "SCCS delta \(em \fLdelta\fR"
.IX "SCCS delta" "create \(em \fLdelta\fR"
.LP
.B delta
checks in a record of the line-by-line differences made to a
checked-out version of a file under
.SM SCCS
control.  These changes are taken from the writable working
copy that was retrieved using the
.SM SCCS
.B get
command (see
.BR sccs-get (1)).
This working copy does not have the
.RB ` s. '
prefix, and is also referred to as a
.BR g -file.
.LP
If a directory name is used in place of the
.IR s.filename ,
argument, the
.B delta
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from the
standard input, one
.BR s.file 
per line (requires
.BR \-y ,
and in some cases,
.BR \-m ).
.LP
.B delta
may issue prompts on the standard output depending upon
the options specified and the flags that are set in the
.BR s. file
(see
.BR sccs-admin (1),
and the
.B \-m
and
.B \-y
options below, for details).
.SH OPTIONS
.TP
.B \-n
Retain the edited
.BR g -file,
which is normally removed at the completion of processing.
.TP
.B \-p
Display line-by-line differences (in
.BR diff (1)
format) on the standard output.
.TP
.B \-s
Silent.  Do not display warning or confirmation messages.  Do
not suppress error messages (which are written to standard error).
.TP
.BI \-g " sid-list"
Specify a list of deltas to omit when the file is accessed at the
.SM SCCS
version
.SM ID
(\s-1SID\s0)
created by this delta.
.I sid-list
is a comma-separated list of
.SM SID\s0s.
To specify a range of deltas, use a
.RB ` \- '
separator instead of a comma, between two
.SM SID\s0s
in the list.
.TP
.B \-m\fR\|[\|\fImr-list\fR\|]
If the SCCS file has the
.B v
flag set (see
.BR admin (1)),
you must supply one or more Modification Request (MR) numbers
for the new delta.
When specifying more than one MR number on the command line,
.I mr-list
takes the form of a quoted, space-separated list.
If
.B \-m
is not used and the standard input is a terminal,
.B delta
prompts with
.B \s-1MR\s0s?
for the list (before issuing the
.B comments?
prompt).
If the
.B v
flag in the
.BR s. file
has a value, it is
taken to be the name of a program to validate the MR numbers.
If
that validation program returns a non-zero exit status,
.B delta
terminates without checking in the changes.
.TP
.BI \-r sid
When two or more versions are checked out, specify the version
to check in.
This
.SM SID
value can be either the
.SM SID
specified on the
.B get
command line, or the
.SM SID
of the new version to be checked in
as reported by
.BR get .
A diagnostic results if the specified
.SM SID
is ambiguous, or if one is required but not supplied.
.HP
.B \-y\c
.RI [ comment ]
.br
Supply a comment for the delta table (version log).  A
.SM NULL
comment is accepted, and produces an empty commentary in the log.  If
.B \-y
is not specified and the standard input is a terminal,
.B delta
prompts with
.RB ` comments? '.
An unescaped
.SM NEWLINE
terminates the comment.
.SH FILES
.PD 0
.TP 20
.BI d. file
temporary file of differences
.TP
.BI p. file
lock file for a checked-out version
.TP
.BI q. file
temporary file
.TP
.BI s. file
.SM SCCS
history file
.TP
.BI x. file
temporary copy of the
.BR s. file
.TP
.BI z. file
temporary file
.PD
.SH WARNINGS
.LP
Lines beginning with an
.SM ASCII SOH
character (binary 001) cannot be placed in the
.SM SCCS
file unless the
.SM SOH
is escaped.  This character has special meaning to
.SM SCCS
(see
.BR sccsfile (5))
and produces an error.
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-cdc (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-rmdel (1),
.BR sccs-sccsdiff (1),
.BR sccs-unget (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
delta \(em \fLdelta\fR"
.IX create "delta \(em \fLdelta\fR"
.IX create  "SCCS delta \(em \fLdelta\fR"
.IX make  "delta, SCCS \(em \fLdelta\fR"
.IX make  "SCCS delta \(em \./share/man/man1/sccs-get.1                                                                            755       0      12        21413  4424740716  10524                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-get.1 1.26 89/03/26 SMI;
.TH SCCS-GET 1 "22 March 1989"
.SH NAME
sccs-get, get \- retrieve a version of an SCCS file
.SH SYNOPSIS
.B /usr/sccs/get
[
.B \-begkmnpst
] [
.BR \-l \|[\| p \|]\|] 
[
.BI \-a " sequence
]
.if n .ti +5
[
.BI \-c date-time
]
[
.BI \-G g-file
]
[
.BI \-i " sid-list"
]
[
.BI \-r sid
]
.if n .ti +5
.if t .ti +.5i
[
.BI \-x " sid-list"
] 
.I s.filename
\&.\|.\|.
.SH DESCRIPTION
.IX "get command"  ""  "\fLget\fP \(em get SCCS file"
.IX "SCCS commands"  "get command"  ""  "\fLget\fP \(em get SCCS file"
.B get
retrieves a working copy from the 
.SM SCCS
history file,
according to the specified options.
.LP
For each
.I s.filename
argument,
.B get
displays the 
.SM SCCS
delta
.SM ID
(\s-1SID\s0)
and number of lines retrieved.
.LP
If a directory name is used in place of the
.I s.filename
argument, the
.B get
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from the
standard input, one
.BR s. file
per line.
.LP
The retrieved file normally has the same filename base as the
.BR s. file,
less the prefix, and is  referred to as the
.BR g- file.
.LP
For each file processed,
.B get
responds (on the standard output) with the
.SM SID
being accessed, and with the number of lines retrieved from the
.BR s. file.
.SH OPTIONS
.TP
.B \-b
Create a new branch.  Used with the
.B \-e
option to indicate that the new delta should have an
.SM SID
in a new branch.  Instead of incrementing the
level for version to be checked in,
.B get
indicates in the
.BR p. file
that the delta to be checked in should either initialize a new
branch and sequence (if there is no existing branch at the
current level), or increment the branch component of the
.SM SID\s0.
If the
.B b
flag is not set in the
.BR s. file,
this option is ignored.
.TP
.B \-e
Retrieve a version for editing.
With this option,
.B get
places a lock on the
.BR s. file,
so that no one else can check in changes to the version 
you have checked out.
If the
.B j
flag is set in the
.BR s. file,
the lock is advisory:
.BR get
issues a warning message.
Concurrent use of
.RB ` "get  \-e" '
for different
.SM SID\s0s
is allowed, however,
.BR get
will not check out a version of the file if a writable version
is present in the directory.  All
.SM SCCS
file protections stored in the
.BR s. file,
including the release ceiling, floor, and authorized user list,
are honored by
.RB ` "get \-e" '.
.TP
.B \-g
Get the
.SM SCCS
version ID, without retrieving the version itself.
Used to verify the existence of a particular
.SM SID\s0.
.TP
.B \-k
Suppress expansion of ID keywords.
.B \-k
is implied by the
.BR \-e .
.TP
.B \-m
Precede each retrieved line with the
.SM SID
of the delta in which it was added to the file.  The
.SM SID
is separated from the line with a
.SM TAB.
.TP
.B \-n
Precede each line with the
.B %\&M%
ID keyword and a
.SM TAB.
When both the
.B \-m
and
.B \-n
options are used, the ID keyword
precedes the
.SM SID\s0,
and the line of text.
.TP
.B \-p
Write the text of the retrieved version to the standard output.
All messages that normally go to the standard output are written
to the standard error instead.
.TP
.B \-s
Suppress all output normally written on the standard output.
However, fatal error messages (which always go to the standard error)
remain unaffected.
.br
.ne 5
.TP
.B \-t
Retrieve the most recently created (top) delta in a given release
(for example:
.BR \-r1 ).
.TP
.BR \-l \|[\| p \|]
Retrieve a summary of the delta table (version log) and write it to a
listing file, with the
.RB ` l. '
prefix (called
.RB ` l. file').
When
.B \-lp
is used, write the summary onto the standard output.
.TP
.BI \-a \|sequence
Retrieve the version corresponding to the indicated delta sequence
number.  This option is used primarily by the
.SM SCCS
.B comb
command (see
.BR sccs-comb (1));
for users,
.B \-r
is an easier way to specify a version.
.B \-a
supercedes
.BR \-r
when both are used.
.TP
.BI \-c date-time
Retrieve the latest version checked in prior to the date and time
indicated by the
.I date-time
argument.
.I date-time
takes the form:
.IR yy [ mm [ dd [\c
.IR hh [ mm [ ss ]\|]\|]\|]\|].
Units omitted from the indicated date and time default to their maximum
possible values; that is
.B \-c7502
is equivalent to
.BR \-c750228235959 .
Any number of non-numeric characters may separate
the various 2 digit components.  If white-space characters occur, the
.I date-time
specification must be quoted.
.TP 
.BI \-G newname
Use
.I newname
as the name of the retrieved version.
.TP
.BI \-i sid-list
Specify a list of deltas to include in the retrieved version.
The included deltas are noted in the standard output message.
.I sid-list
is a comma-separated list of
.SM SID\s0s.
To specify a range of deltas, use a 
.RB ` \- ' 
separator instead of a comma, between two 
.SM SID\s0s 
in the list.
.TP
.BI \-r sid
Retrieve the version corresponding to the indicated
.SM SID
(delta).
.IP
The
.SM SID
for a given delta is a number, in Dewey decimal format, composed
of two or four fields: the
.I release
and
.IR level
fields, and for branch deltas, the
.IR branch
and
.IR sequence
fields.  For instance, if
.BR 1.2
is the
.SM SID\s0,
.B 1
is the release,
and
.B 2
is the level number.  If
.BR 1.2.3.4
is the
.SM SID\s0,
.B 3
is the branch and
.B 4
is the sequence number.
.IP
You need not specify the entire
.SM SID
to retrieve a version with
.BR get .
When you omit
.B \-r
altogether, or when you omit both release and level,
.B get
normally retrieves the highest release and level.  If the
.B d
flag is set to an
.SM SID
in the
.BR s. file
and you omit the
.SM SID\s0,
.B get
retrieves the default version indicated by that flag.
.IP
When you specify a release but omit the level,
.B get
retrieves the highest level in that release.  If that release
does not exist,
.BR get
retrieves highest level from the next-highest existing release.
.IP
Similarly with branches, if you specify a release, level and
branch,
.B get
retrieves the highest sequence in that branch.
.TP 
.BI \-x sid-list
Exclude the indicated deltas from the retrieved version.
The excluded deltas are noted in the standard output message.
.I sid-list
is a comma-separated list of
.SM SID\s0s.
To specify a range of deltas, use a 
.RB ` - ' 
separator instead of a comma, between two 
.SM SID\s0s 
in the list.
.SH USAGE
.SS ID Keywords
In the absence of
.B \-e
or
.BR \-k ,
.B get
expands the following ID keywords by replacing them with the
indicated values in the text of the retrieved source.
.PD 0
.TP 12
.I Keyword
.I Value
.sp .5
.TP
.B %\&A%
Shorthand notation for an
.SM ID
line with data for
.BR what (1):
.B %\&\s-1Z\s0%%\&\s-1Y\s0%\ %\&\s-1M\s0%\ %\&\s-1I\s0%%\&\s-1Z\s0%
.TP
.B %\&B%
.SM SID
branch component
.TP
.B %\&C%
Current line number.
Intended for identifying messages
output by the program such as
.RI `` "this shouldn't have happened" ''
type errors.  It is
.I not
intended to be used on every line to provide sequence numbers.
.TP
.B %\&D%
Current date:
.IB yy / mm / dd
.TP
.B %\&E%
Date newest applied delta was created:
.IB yy / mm / dd
.TP
.B %\&F%
.SM SCCS
.BR s. file
name
.TP
.B %\&G%
Date newest applied delta was created:
.IB mm / dd / yy
.TP
.B %\&H%
Current date:
.IB mm / dd / yy
.TP
.B %\&I%
.SM SID
of the retrieved version:
.B %\&\s-1R\s0%.%\&\s-1L\s0%.%\&\s-1B\s0%.%\&\s-1S\s0%
.TP
.B %\&L%
.SM SID
level component
.TP
.B %\&M%
Module name: either the value of the
.B m
flag in the
.BR s. file
(see
.BR sccs-admin (1)),
or the name of the
.BR s. file
less the prefix
.TP
.B %\&P%
Fully qualified
.BR s. file
name
.TP
.B %\&Q%
Value of the
.B q
flag in the
.BR s. file
.TP
.B %\&R%
.SM SID
Release component
.TP
.B %\&S%
.SM SID
Sequence component
.TP
.B %\&T%
Current time:
.IB hh : mm : ss
.TP
.B %\&U%
Time the newest applied delta was created:
.IB hh : mm : ss
.TP
.B %\&W%
Shorthand notation for an
.SM ID
line with data for
.BR what :
.B %\&\s-1Z\s0%%\&\s-1M\s0%\ \ \ \ \ \ \ \ %\&\s-1I\s0%
.TP
.B %\&Y%
Module type: value of the
.B t
flag in the
.BR s. file
.TP
.B %\&Z%
4-character string:
.RB ` @(#) ',
recognized by
.BR what .
.PD
.SH FILES
.PD 0
.TP 20
``g-file''
version retrieved by
.B get
.TP
.BR l. file
file containing extracted delta table info
.TP
.BR p. file
permissions (lock) file
.TP
.BR z. file
temporary copy of
.BR s.file
.PD
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-delta (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-sact (1),
.BR sccs-unget (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
.SH BUGS
If the effective user has write permission (either explicitly or
implicitly) in the directory containing the
.SM SCCS
files, but the real user does not, only one file may be named when using
.BR \-e .
empty directories by regular files or symlinks.
A means of updating file modes and owners
of otherwise identical files is also needed.
.SH CAVEATS
.B root
does not have its accustomed access privileges on NFS mounted 
file systems.  Using
.B rdi./share/man/man1/sccs-help.1                                                                           755       0      12         2403  4424740716  10653                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-help.1 1.16 89/03/26 SMI;
.TH SCCS-HELP 1 "22 March 1989"
.SH NAME
sccs-help, help \- ask for help regarding SCCS error or warning messages
.SH SYNOPSIS
.B /usr/sccs/help
[
.I argument
] .\|.\|.
.SH DESCRIPTION
.IX "help command"  ""  "\fLhelp\fP \(em get SCCS help"
.IX "SCCS commands"  "help command"  ""  "\fLhelp\fP \(em get SCCS help"
.B help
retrieves information to further explain errors messages and warnings
from
.SM SCCS
commands.  It also provides some information about
.SM SCCS
command usage.  If no arguments are given,
.B help
prompts for one.
.LP
An
.I argument
may be a message number (which normally appears
in parentheses following each
.SM SCCS
error or warning message), or an
.SM SCCS
command name.
.B help
responds with an explanation of the message or a usage line for
the command.
.LP
When all else fails, try
.RB ` "/usr/sccs/help\ \ stuck" '.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/help
directory containing files of message text.
.TP
.B /usr/sccs/help
.PD
.SH SEE ALSO
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-cdc (1),
.BR sccs-comb (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-rmdel (1),
.BR sccs-sact (1),
.BR sccs-sccsdiff (1),
.BR sccs-unget (1),
.BR sccs-val (1),
.BR what (1),
.BR sccsfile (5)
       	syswait.1 1       t300.1g        t300s.1g 1g       t4013.1g 300  $    t450.1g   4    tabs.1v   D    tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1       tcov.1 p./share/man/man1/sccs-prs.1                                                                            755       0      12        12351  4424740716  10552                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)sccs-prs.1 1.25 89/04/12 SMI;
.TH SCCS-PRS 1 "12 April 1989"
.SH NAME
sccs-prs, prs \- display selected portions of an SCCS history
.SH SYNOPSIS
.B /usr/sccs/prs
[
.B \-ael
] [
.BI \-c date-time
] [
.BI \-d dataspec
] [
.BI \-r sid
]
.if n .br
.I s.filename
\&.\|.\|.
.SH DESCRIPTION
.IX  "prs command"  ""  "\fLprs\fP \(em display SCCS history"
.IX  "SCCS commands"  "prs command"  ""  "\fLcdc\fP \(em display SCCS history"
.LP
.B prs
displays part or all of the
.SM SCCS
file (see
.BR sccsfile (5))
in a user supplied format.
.LP
If a directory name is used in place of the
.IR s.filename
argument,
the
.B prs
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from the
standard input, one
.BR s. file
per line.
.SH OPTIONS
.LP
In the absence of options,
.B prs
displays the delta table (version log).  In the absence of
.BR \-d ,
or
.BR \-l ,
.B prs
displays the entry for each delta indicated by the other options.
.TP
.B \-a
Include all deltas, including those marked as removed (see
.BR sccs-rmdel (1)).
.TP
.B \-e
Request information for all deltas created
.I earlier
than, and including, the delta indicated with
.BR \-r
or
.BR \-c .
.TP
.B \-l
Request information for all deltas created
.I later
than, and including, the delta indicated with
.B \-r
option.
.TP
.BI \-d dataspec
Produce a report according to the indicated data specification.
.I dataspec
consists of a (quoted) text string that includes embedded data
keywords of the form:
`\fB:\fIkey\fB:\fR'
(see
.IR "Data Keywords" ,
below).
.B prs
expands these keywords in the output it produces.
To specify a
.SM TAB
character in the output, use
.BR \et ;
to specify a
.SM NEWLINE
in the output, use
.BR \en .
.TP
.BI \-r sid
Specify the
.SM SCCS
delta
.SM ID
(\s-1SID\s0)
of the delta for which information is desired.
If no 
.SM SID 
is specified, the most recently created delta is used.
.SH "USAGE"
.SS Data Keywords
Data keywords specify which parts of an
.SM SCCS
file are to be retrieved.  All parts of an
.SM SCCS
file (see
.BR sccsfile (5))
have an associated data keyword.
A data keyword may appear any number of times in a data
specification argument to
.BR \-d .
These data keywords are listed in the table below:
.if t .ps -1
.if t .vs -1
.nf
.sp .5
.TS
c c c c c 
c c c c c 
lfB lfR cfR lfI cfR .
\fIKeyword	Data Item	File 	Value	Format\u\s-2**\s0\d\fR
\^	\^	\fISection\u\s-2*\s0\d\fR	\^	\^
.sp .5
:A:	a format for the \fBwhat\fR string:	N/A	\fB:Z::Y: :M: :I::Z:\fR	S
:B:	branch number	D	nnnn	S
:BD:	body	B	text	M
:BF:	branch flag	F	\fByes\fR or \fBno\fR	S
:CB:	ceiling boundary	F	\fB:R:\fR	S
:C:	comments for delta	D	text	M
:D:	date delta created	D	\fB:Dy:/:Dm:/:Dd:\fR	S
:Dd:	day delta created	D	nn	S
:Dg:	deltas ignored (seq #)	D	\fB:DS: :DS:\fR\|.\|.\|.	S
:DI:	seq-no. of deltas included,	D	\fB:Dn:/:Dx:/:Dg:\fR	S
\^	excluded, ignored	\^	\^	\^
:DL:	delta line statistics	D	\fB:Li:/:Ld:/:Lu:\fR	S
:Dm:	month delta created	D	nn	S
:Dn:	deltas included (seq #)	D	\fB:DS: :DS:\fR\|.\|.\|.	S
:DP:	predecessor delta seq-no. 	D	nnnn	S
:Ds:	default \s-1SID\s0	F	\fB:I:\fR	S
:DS:	delta sequence number	D	nnnn	S
:Dt:	delta information	D 	\fB:DT: :I: :D: :T: :P: :DS: :DP:\fR	S
:DT:	delta type	D	\fBD\fR or \fBR\fR	S
:Dx:	deltas excluded (seq #)	D	\fB:DS:\fR \|.\|.\|.	S
:Dy:	year delta created	D	nn	S
:F:	\fBs.\fRfile name	N/A	text	S
:FB:	floor boundary	F	\fB:R:\fR	S
:FD:	file descriptive text	C	text	M
:FL:	flag list	F	text	M
:GB:	gotten body	B	text	M
:I:	\s-1SCCS\s0 delta \s-1ID\s0 (\s-1SID\s0)	D	\fB:R:.:L:.:B:.:S:\fR	S
:J:	joint edit flag	F	\fByes\fR or \fBno\fR	S
:KF:	keyword error/warning flag	F	\fByes\fR or \fBno\fR	S
:L:	level number	D	nnnn	S
:Ld:	lines deleted by delta	D	nnnnn	S
:Li:	lines inserted by delta	D	nnnnn	S
:LK:	locked releases	F	\fB:R:\fR\|.\|.\|.	S
:Lu:	lines unchanged by delta	D	nnnnn	S
:M:	module name	F	text	S
:MF:	MR validation flag	F	\fByes\fR or \fBno\fR	S
:MP:	MR validation program	F	text	S
:MR:	MR numbers for delta	D	text	M
:ND:	null delta flag	F	\fByes\fR or \fBno\fR	S
:Q:	user defined keyword	F	text	S
:P:	user who created delta	D	username	S
:PN:	\fBs.\fRfile's pathname	N/A	text	S
:R:	release number	D	nnnn	S
:S:	sequence number	D	nnnn	S
:T:	time delta created	D	\fB:Th:::Tm:::Ts:\fR	S
:Th:	hour delta created	D	nn	S
:Tm:	minutes delta created	D	nn	S
:Ts:	seconds delta created	D	nn	S
:UN:	user names	U	text	M
:W:	a form of \fBwhat\fP string	N/A	\fB:Z::M:\et:I:\fR	S
:Y:	module type flag	F	text	S
:Z:	\fBwhat\fP string delimiter	N/A	\fB@(#)\fR	S
.TE
	\u\s-2*\s0\dB = body, D = delta table, F = flags, U = user names
	\u\s-2**\s0\dS = simple format, M = multi-line format
.fi
.if t .ps +1
.if t .vs +1p
.SH EXAMPLES
.LP
The command:
.IP
.ft B
/usr/sccs/prs \-e \-d":I:\et:P:" program.c
.ft R
.LP
produces:
.RS
.nf
.ft B
1.6	username
1.5	username
\fR\&.\|.\|.\fP
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /tmp/pr?????
temporary file
.PD 
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-cdc (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prt (1),
.BR sccs-sact (1),
.BR sccs-sccsdiff (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
e release,
and
.B 2
is the level number.  If
.BR 1.2.3.4
is the
.SM SID\s0,
.B 3
is the branch and
.B 4
is the sequence number.
.IP
You need not specify the entire
.SM SID
to retrieve a version with
.BR get .
When you omit
.B \-r
altogether, or when you omit both release and lev./share/man/man1/sccs-prt.1                                                                            755       0      12        10770  4424740717  10557                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-prt.1 1.21 89/03/26 SMI;
.TH SCCS-PRT 1 "22 March 1989"
.SH NAME
sccs-prt, prt \- display delta table information from an SCCS file
.SH SYNOPSIS
.B /usr/sccs/prt
.RB [ "\-abdefistu" ]
[
.BI \-c date-time
] [
.BI \-r date-time
] [
.BI \-y sid
]
.I s.filename .\|.\|.
.SH DESCRIPTION
.IX "prt command" "" "\fLprt\fP \(em display SCCS history"
.IX "SCCS commands" "prt command" "" "\fLprt\fP \(em display SCCS history"
.LP
.B prt
prints selected portions of an
.SM SCCS
file.  By default, it prints the delta table (version log).
.LP
If a directory name is used in place of the
.IR s.filename
argument, the
.B prt
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from
the
standard input, one
.BR s. file
per line.
.SH OPTIONS
.LP
If any option other than
.BR \-y ,
.BR \-c ,
or
.B \-r
is supplied, the name of each file being processed (preceded by one
.SM NEWLINE
and followed by two
.SM NEWLINE
characters) appears above its contents.
.LP
If none of the
.BR \-u ,
.BR \-f ,
.BR \-t ,
or
.B \-b
options are used,
.B \-d
is assumed.
.BR \-s ,
.BR \-i
are mutually exclusive, as are
.B \-c
and
.BR \-r .
.TP
.B \-a
Display log entries for all deltas, including those marked as removed.
.TP
.B \-b
Print the body of the
.BR s. file.
.TP
.B \-d
Print delta table entries.  This is the default.
.TP
.B \-e
Everything.  This option implies
.BR \-d ,
.BR \-i ,
.BR \-u ,
.BR \-f ,
and
.BR \-t .
.TP
.B \-f
Print the flags of each named
.BR s. file.
.TP
.B \-i
Print the serial numbers of included,
excluded, and ignored deltas.
.TP
.B \-s
Print only the first line of the delta table entries;
that is, only up to the statistics.
.TP
.B \-t
Print the descriptive text contained in the
.BR s. file.
.TP
.B \-u
Print the user-names and/or numerical group
.SM ID\s0s
of users allowed to make deltas.
.TP
.BI \-c date-time
Exclude delta table entries
that are specified cutoff date and time.
Each entry is printed as a single line, preceded by the name of the
.SM SCCS
file.  This format (also produced by
.B \-r ,
and
.BR \-y  )
makes it easy to sort multiple delta tables in chronological order.
When both
.B \-y
and
.BR \-c ,
or
.B \-y
and
.B \-r
are supplied,
.B prt
stops printing when the first of the two conditions is met.
.TP
.BI \-r date-time
Exclude delta table entries
that are newer than the specified cutoff date and time.
.TP
.BI \-y sid
Exclude delta table entries made prior to the
.SM SID
specified.  If no delta in the table has the specified
\s-1SID\s0,
the entire table is printed.  If no
.SM SID
is specified, the most recent delta is printed.
.SH USAGE
.SS Output Format
.LP
The following format is used to print those portions of the
.BR s. file
that are specified by the various options.
.RS
.PD 0v
.TP 3
\(bu
.SM NEWLINE
.TP
\(bu
Type of delta
.RB ( D
or
\fBR\fP)
.TP
\(bu
.SM SPACE\s0
.TP
\(bu
.SM SCCS
delta 
.SM ID
(\s-1SID\s0)
.TP
\(bu
.SM TAB\s0
.TP
\(bu
Date and time of creation in the form:
.IB yy / mm / dd
.IB hh / mm / ss
.TP
\(bu
.SM SPACE\s0
.TP
\(bu
Username the delta's creator
.TP
\(bu
.SM TAB\s0
.TP
\(bu
Serial number of the delta
.TP
\(bu
.SM SPACE\s0
.TP
\(bu
Predecessor delta's serial number
.TP
\(bu
.SM TAB\s0
.TP
\(bu
Line-by-line change statistics in the form:
.IB inserted / deleted / unchanged
.TP
\(bu
.SM NEWLINE\s0
.TP
\(bu
List of included deltas, followed by a
.SM NEWLINE
(only if there were any such deltas and the
.B \-i
options was used)
.TP
\(bu
List of excluded deltas, followed by a
.SM NEWLINE
(only if there were any such deltas and the
.B \-i
options was used)
.TP
\(bu
List of ignored deltas, followed by a
.SM NEWLINE
(only if there were any such deltas and the
.B \-i
options was used)
.TP
\(bu
List of
modification requests
(\s-1MR\0s), followed by a
.SM NEWLINE
(only if any
.SM MR
numbers were supplied).
.TP
\(bu
Lines of the delta commentary (if any), followed by a
.SM NEWLINE\s0.
.PD
.RE
.SH EXAMPLES
The command:
.IP
.B /usr/sccs/prt \-y program.c
.LP
produces a one-line display of the delta table entry for the most
recent version:
.IP
.BR "s.program.c:  D 1.6   88/07/06 21:39:39 username   5 4 00159/00080/00636" " .\|.\|.
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-cdc (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-sact (1),
.BR sccs-sccsdiff (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
D	\fB:Li./share/man/man1/sccs-rmdel.1                                                                          755       0      12         3560  4424740717  11034                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-rmdel.1 1.21 89/03/26 SMI;
.TH SCCS-RMDEL 1 "22 March 1989"
.SH NAME
sccs-rmdel, rmdel \- remove a delta from an SCCS file
.SH SYNOPSIS
.B /usr/sccs/rmdel
.BI \-r sid
.I s.filename .\|.\|.
.SH DESCRIPTION
.IX  "rmdel command"  ""  "\fLrmdel\fP \(em remove delta from SCCS file"
.IX  remove "delta from SCCS file"  ""  "remove delta from SCCS file \(em \fLrmdel\fP"
.IX  "SCCS commands"  "rmdel command"  ""  "\fLrmdel\fP \(em remove delta"
.IX  "SCCS delta"  remove  "SCCS delta"  "remove \(em \fLrmdel\fP"
.IX  delta  "remove rmdel"  delta  "remove \(em \fLrmdel\fP"
.LP
.B rmdel
removes the delta specified by the
.SM SCCS
delta ID
(\s-1SID\s0)
supplied with
.BR \-r .
The delta to be removed must be the most recent (leaf) delta
in its branch.  In addition, the
.SM SID
must
.I not
be that of a version checked out for editing:
it must not appear in any entry of the version lock file
.RB  ( p. file).
.LP
If you created the delta,
or, if you own the file and directory and have write
permission, you can remove it with
.BR rmdel .
.LP
If a directory name is used in place of the
.IR s.filename 
argument, the
.B rmdel
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from
the
standard input, one
.BR s. file
per line.
.SH FILES
.PD 0
.TP 20
.BI s. file
history file
.TP
.BI z. file
temporary copy of the
.BR s. file
.TP
.BI p. file
permissions file
.PD
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-cdc (1),
.BR sccs-comb (1),
.BR sccs-delta (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-sccsdiff (1),
.BR sccs-unget (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations
.RB ( sccs-help (1)).
      tsort.1       tty.1 or  ,    u370.1 .  <    u3b.1 70  L    u3b15.1   \    u3b2.1 1  l    u3b5.1 2  |./share/man/man1/sccs-sact.1                                                                           755       0      12         3102  4424740717  10653                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-sact.1 1.19 89/03/26 SMI;
.TH SCCS-SACT 1 "22 March 1989"
.SH NAME
sccs-sact, sact \- show editing activity status of an SCCS file
.SH SYNOPSIS
.B /usr/sccs/sact
.I s.filename .\|.\|.
.SH DESCRIPTION
.IX  display "SCCS file editing status \(em \fLsact\fP"
.IX  "SCCS commands"  sact  ""  "\fLsact\fP \(em display SCCS file editing status"
.LP
.B sact
informs the user of any
.SM SCCS
files that are checked out for editing.
.LP
The output for each named file consists
of five fields separated by
.SM SPACE
characters.
.RS
.PD 0
.TP 3
\(bu
.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
\(bu
.SM SID
for the new delta to be created
.TP
\(bu
Username of the person who has the file checked out for editing.
.TP
\(bu
Date that the version was checked out.
.TP
\(bu
Time that the version was checked out.
.PD
.RE
.LP
If a directory name is used in place of the
.IR s.filename
argument, the
.B sact
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from
the
standard input, one
.BR s. file
per line.
.SH "SEE ALSO"
.BR sccs (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations (see
.BR sccs-help (1)).
.SH BUGS
.B sact
is not recognized as a subcommand of
.BR sccs (1).
,    tftp.1c   <    then.1   L    time.1v   \    tip.1c   t    toolplaces.1 c e      touch.1v s.1      tput.1v       tr.1v        trace.1       
traffic.1c c      troff.1       true.1       tset.1       tsort.1       tty.1    ,    u370.1   <    u3b.1    L    u3b15.1   \    u3b2.1   l    u3b5.1   |    ul.1        ./share/man/man1/sccs-sccsdiff.1                                                                       755       0      12         2733  4424740717  11516                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-sccsdiff.1 1.23 89/03/26 SMI;
.TH SCCS-SCCSDIFF 1 "22 March 1989"
.SH NAME
sccs-sccsdiff, sccsdiff \- compare two versions of an SCCS file
.SH SYNOPSIS
.B /usr/sccs/sccsdiff
[
.B \-p
]
.BI \-r sid
.BI \-r sid
[
.I diff-options
]
.I s.filename
.SH DESCRIPTION
.IX  "sccsdiff command"  ""  "\fLsccsdiff\fP \(em compare versions of SCCS file"
.IX  compare "versions of SCCS file \(em \fLsccsdiff\fP"
.IX  "SCCS commands"  sccsdiff  ""  "\fLsccsdiff\fP \(em compare versions of SCCS file"
.B sccsdiff
compares two versions of an
.SM SCCS
file and displays the differences between
the two versions.  Any number of
.SM SCCS
files may be specified; the options specified apply to all
named
.BR s. files.
.SH OPTIONS
.TP
.B \-p
Pipe output for each file through
.BR pr (1V).
.TP
.BI \-r sid
Specify a version corresponding to the indicated
.SM SCCS
delta
.SM ID\s0
(\s-1SID\s0)
for comparison.  Versions are passed to
.BR diff (1)
in the order given.
.TP
.I diff-options
Pass options to
.BR diff (1),
including:
.BR \-c ,
.BR \-e ,
.BR \-f ,
.BR \-h ,
.B \-b
and
.BR \-D .
.SH FILES
.TP 20
.B /tmp/get?????
temporary files
.SH "SEE ALSO"
.BR diff (1),
.BR sccs (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
.PD 0
.TP 10
.IB filename ": No differences"
If the two versions are the same.
.LP
Use the
.SM SCCS
.B help
command for explanations of other messages (see
.BR sccs-help (1)).
.      test.1v        
text./share/man/man1/sccs-unget.1                                                                          755       0      12         3005  4424740717  11045                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-unget.1 1.16 89/03/26 SMI; from UCB 4.2
.TH SCCS-UNGET 1 "22 March 1989"
.SH NAME
sccs-unget, unget \- undo a previous get of an SCCS file
.SH SYNOPSIS
.B /usr/sccs/unget
[
.B \-ns
]
[
.BI \-r sid
]
.I s.filename .\|.\|.
.IX  "unget command"  ""  "\fLunget\fP \(em unget SCCS file"
.IX  "SCCS commands"  unget  ""  "\fLunget\fP \(em unget SCCS file"
.SH DESCRIPTION
.LP
.B unget
undoes the effect of a
.RB ` "get\ \ \-e" '
done prior to the creation of the pending delta.
.LP
If a directory name is used in place of the
.IR s.filename
argument, the
.B unget
command applies to all
.BR s. files
in that directory.
Unreadable
.BR s. files
produce an error; processing continues with the next file (if
any).
The
use of
.RB ` \- '
as the
.I s.filename
argument indicates that the names of files are to be read from
the
standard input, one
.BR s. file
per line.
.SH OPTIONS
.TP
.B \-n
Retain the retrieved version, which
is otherwise removed.
.TP
.B \-s
Suppress display of the
.SM SCCS
delta
.SM ID
(\s-1SID\s0).
.TP
.BI \-r sid
When multiple versions are checked out, specify which pending delta to
abort.
A diagnostic results if the specified
.SM SID
is ambiguous, or if it is necessary but omitted from the command line.
.SH SEE ALSO
.BR sccs (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR sccs-prs (1),
.BR sccs-prt (1),
.BR sccs-rmdel (1),
.BR sccs-sact (1),
.BR sccs-sccsdiff (1),
.BR what (1),
.BR sccsfile (5)
.LP
.SH DIAGNOSTICS
Use the
.SM SCCS
.B help
command for explanations (see
.BR sccs-help (1)).
ers.1   ,    tftp.1c   <    then.1   L    time.1v   \    tip.1c   t    toolplaces.1 c e      touch.1v s.1      tput.1v       tr.1v        trace.1       
traffic.1c c      troff.1       true.1       tset.1       tsort.1       tty.1    ,    u370.1   <    u3b.1    L    u3b15.1   \    u3b2.1   l    u3b5.1   |    ul.1        umask.1       	unalias.1 as      uname.1v./share/man/man1/sccs-val.1                                                                            755       0      12         4732  4424740717  10515                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs-val.1 1.18 89/03/26 SMI; from UCB 4.2
.TH SCCS-VAL 1 "22 March 1989"
.SH NAME
sccs-val, val \- validate an SCCS file
.SH SYNOPSIS
.B /usr/sccs/val \-
.LP
.B /usr/sccs/val
[
.B \-s
]
[
.B \-m 
.I name
]
[
.BI \-r sid
]
[
.B \-y
.I type
]
.I s.filename .\|.\|.
.IX  "val command"  ""  "\fLval\fP \(em validate SCCS file"
.IX  "validate SCCS file"  ""  "validate SCCS file \(em \fLval\fP"
.IX  "SCCS commands"  val  ""  "\fLval\fP \(em validate SCCS file"
.SH DESCRIPTION
.B val
determines if the specified
.BR s. files
files meet the characteristics specified by the indicated
arguments.
.B val
can process up to 50 files on a single command line.
.LP
.B val
has a special argument,
.RB ` \- ',
which reads the standard input until the end-of-file condition
is detected.
Each line read is independently processed
as if it were a command line argument list.
.LP
.B val
generates diagnostic messages on the
standard output for each command line
and file processed and also returns a single 8\-bit
code upon exit as described below.
.LP
The 8-bit code returned by
.B val
is a disjunction of the possible errors,
that is, it can be interpreted as a bit
string where (moving from left to right)
the bits set are interpreted as follows:
.RS
.sp .5
.nf
bit 0 = missing file argument
bit 1 = unknown or duplicate option
bit 2 = corrupted \fBs.\fRfile
bit 3 = can not open file or file not in \fBs.\fRfile format
bit 4 = the \s-1SCCS\s0 delta \s-1ID\s0 (\s-1SID\s0) is invalid or ambiguous
bit 5 = the \s-1SID\s0 does not exist
bit 6 = mismatch between \fB%\&Y%\fR and \fB\-y\fR argument
bit 7 = mismatch between \fB%\&M%\fR \fB\-m\fR argument
.fi
.RE
.LP
.B val
can process two or more files on a given command line, and in turn can
process multiple command lines (when reading the standard input).
In these cases, an aggregate code is returned which is the logical
.SB OR
of the codes generated for each command line and file processed.
.SH OPTIONS
.TP 8
.B \-s
Silent.  Suppress the normal error or warning messages.
.TP
.BI \-m  name
Compare
.I name
with the
.B %\&M%
ID keyword in the
.BR s. file.
.TP
.BI \-r sid
Check to see if the indicated
.SM SID
is ambiguous, invalid, or absent from the
.BR s. file.
.TP
.BI \-y " type"
Compare
.I type
with the
.B %\&Y%
ID keyword.
.SH SEE ALSO
.BR sccs (1),
.BR sccs-admin (1),
.BR sccs-delta (1),
.BR sccs-get (1),
.BR sccs-help (1),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH DIAGNOSTICS
.LP
Use the
.SM SCCS
.B help
command for explanations (see
.BR sccs-help (1)).
send.1c .1  l    	uustat.1c .1  |./share/man/man1/sccs.1                                                                                755       0      12        37661  4424740720   7756                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccs.1 1.35 89/04/17 SMI;
.ds S) sccs-
.TH SCCS 1 "22 March 1989"
.SH NAME
sccs \- front end for the Source Code Control System (SCCS)
.SH SYNOPSIS
.B sccs
[
.B \-r
] [
.BI \-d rootprefix
] [
.BI \-p subdir
]
.if n .ti +0.5i
.I subcommand
[
.I option
\&.\|.\|. ]
[
.I filename
\&.\|.\|. ]
.SH DESCRIPTION
.IX  "sccs command"  ""  "\fLsccs\fP \(em source code control system"
.IX  "source code control system"  ""  "source code control system \(em \fLsccs\fP"
.IX  "programming tools"  sccs  ""  "\fLsccs\fP \(em source code control system"
.LP
The
.B sccs
command is a comprehensive, straightforward front end to the various
utility programs of the Source Code Control System
(\s-1SCCS\s+1).
.LP
.B sccs
applies the indicated
.I subcommand
to the history file associated with each of the inidcated files.
.LP
The name of an
.SM SCCS
history file is derived by prepending the
.RB ` s. '
prefix to the filename of a working copy.  The
.B sccs
command normally expects these
.RB ` s. files'
to reside in an
.SM 
.B SCCS
subdirectory.  Thus, when you supply
.B sccs
with a
.I filename
argument, it normally applies the subcommand to a file named
.BI s. filename
in the
.SB SCCS
subdirectory.  If
.I filename
is a pathname,
.B sccs
looks for the history file in the
.SB SCCS
subdirectory of that file's parent directory.  If
.I filename
is a directory, however,
.B sccs
applies the subcommand to every
.BR s. file
file it contains.  Thus, the command:
.IP
.B sccs get program.c
.LP
would apply the
.B get
subcommand to a history file named:
.IP
.B SCCS/s.program.c
.LP
while the command:
.IP
.B sccs get \s-1SCCS\s0
.LP
would apply it to every
.BR s. file
in the
.B
.SM SCCS
subdirectory.
.LP
Options for the
.B sccs
command itself must appear before the
.I subcommand
argument.  Options for a given subcommand must appear after the
.I subcommand
argument.  These options are specific to each subcommand,
and are described along with the subcommands themselves (see
.BR Subcommands ,
below).
.SS Running Setuid
.LP
The
.B sccs
command also includes the capability to run
``setuid''
to provide additional protection.  However this does not apply
to subcommands such as
.BR admin (1),
since this would allow anyone to change the authorizations of the
history file.  Commands that would do so always run as the real user.
.SH OPTIONS
.TP
.B \-r
Run
.B sccs
with the real user
.SM ID\s0,
rather than set to the effective user
.SM ID\s0.
.TP
.BI \-d rootprefix
Define the root portion of the pathname for
.SM SCCS
history files.  The default root portion is the current directory.
Note:
.I rootprefix
is prepended to the entire 
.I filename
argument, even if
.I filename
is an absolute pathname.
.B \-d
overrides any directory specified by the
.nh
.SB PROJECTDIR
.hy
environment variable (see
.SM ENVIRONMENT\s0,
below).
.TP
.BI \-p subdir
Define the (sub)directory within which a history file is
expected to reside.
.B \s-1SCCS\s0
is the default. (See
.SM EXAMPLES\s0,
below).
.SH USAGE
.SS "Subcommands"
.LP
Many of the following
.B sccs
subcommands invoke programs that reside in
.BR /usr/sccs .
Many of these subcommands accept additional arguments that are
documented in the reference page for the utility program the
subcommand invokes.
.TP
.B admin
Modify the flags or checksum of an
.SM SCCS
history file.
Refer to
.BR \*(S)admin (1)
for more information about the
.B admin
utility.  While
.B admin
can be used to initialize a history file, you may find that the
.BR create
subcommand is simpler to use for this purpose.
.HP
.B cdc
.BI \-r sid
[
.B \-y\c
.RI [ comment ]
]
.br
Annotate (change) the delta commentary.
Refer to
.BR \*(S)cdc (1).
Note: the
.B fix
subcommand can be used to replace the delta, rather than merely
annotating the existing commentary.
.RS
.RS
.TP
.BI \-r sid
Specify the
.SM SCCS
delta
.SM ID
(\s-1SID\s0)
to which the change notation is to be added.
The
.SM SID
for a given delta is a number, in Dewey decimal format, composed
of two or four fields: the
.I release
and
.IR level
fields, and for branch deltas, the
.IR branch
and
.IR sequence
fields.  For instance, the
.SM SID
for the initial delta is normally
.BR 1.1 .
.HP
.B \-y\c
.RI [ comment ]
.br
Specify the comment with which to annotate the delta commentary.  If
.B \-y
is omitted,
.BR sccs
prompts for a comment.  A
.SM NULL
.I comment
results in an empty annotation.
.RE
.RE
.HP
.B  check
.RB [ \-b ]
.RB [ \-u\c
.RI [ username ]\|]
.br
Check for files currently being edited.  Like
.BR info
and
.BR tell ,
but returns an exit code, rather than producing a listing of files.
.B check
returns a non-zero exit status if anything is being edited.
.RS
.RS
.TP
.B \-b
Ignore branches.
.HP
.B \-u\c
.RI [ username ]
.br
Only check files being edited by you.  When
.I username
is specified, only check files being edited by that user.
.RE
.RE
.br
.ne 7
.HP
.B  clean
.RB [ \-b ]
.br
Remove everything in the current directory that can be retrieved from
an
.SM SCCS
history.  Does not remove files that are being edited.
.RS
.RS
.TP
.B \-b
Do not check branches to see if they are being edited.
.RB ` "clean\ \-b" '
is dangerous when branch versions are kept in the same directory.
.RE
.RE
.TP
.B comb
Generate scripts to combine deltas.
Refer to
.BR \*(S)comb (1).
.TP
.B  create
Create (initialize) history files.
.BR create
performs the following steps:
.RS
.IP \(bu 3
Renames the original source file to
.PD 0
.B ,program.c
in the current directory.
.IP \(bu
Create the history file called
.B s.program.c
in the
.SB SCCS
subdirectory.
.IP \(bu
Performs an
.RB ` "sccs get" '
on
.B program.c
to retrieve a read-only copy of the initial version.
.PD
.RE
.HP
.B deledit
.RB [ \-s ]
.RB [ \-y\c
.RI [ comment ]\|] 
.br
Equivalent to an
.RB ` "sccs delta" '
and then an
.RB ` "sccs edit" '.
.B deledit
checks in a delta, and checks the file back out again, but leaves
the current working copy of the file intact.
.RS
.RS
.TP
.B \-s
Silent.  Do not report delta numbers or statistics.
.HP
.B \-y\c
.RI [ comment ]
.br
Supply a comment for the delta commentary.  If
.B \-y
is ommitted,
.BR delta
prompts for a comment.  A
.SM NULL
.I comment 
results in an empty comment field for the delta.
.RE
.RE
.\"
.HP
.B delget
.RB [ \-s ]
.RB [ \-\y\c
.RI [ comment ]\|]
.br
Perform an
.RB ` "sccs delta" '
and then an
.RB ` "sccs get" '
to check in a delta and retrieve read-only copies of the resulting new
version.
See the
.B deledit
subcommand for a description of
.BR \-s
and
.BR \-y .
.B sccs
performs a
.B delta
on all the files specified in the argument list, and then a 
.BR get
on all the files.  If an error occurs during the
.BR delta ,
the
.B get
is not performed.
.HP
.B delta
.RB [ \-s ]
.BR [ \-y\c
.RI [ comment ]\|]
.br
Check in pending changes.
Records the line-by-line changes introduced while the file was
checked out.
The effective user
.SM ID
must be the same as the
.SM ID
of the person who has the file checked out.
Refer to
.BR \*(S)delta (1).
See the
.B deledit
subcommand for a description of
.BR \-s
and
.BR \-y .
.br
.ne 10
.HP
.B  diffs
.RB [ \-C ]
.RB [ \-c\c
.IR date-time ]
.RB [ \-r\c
.IR sid ]
.I diff-options
.br
Compare (in
.BR diff (1)
format) the working copy of a file that is checked out for
editing, with a version from the
.SM SCCS
history.  Use the most recent checked-in version by default.
The
.B diffs
subcommand accepts the same options as
.BR diff ,
with the exception that the
.B \-c
option to
.BR diff
must be specified as
.BR \-C .
.RS
.RS
.TP
.B \-C
Pass the
.B \-c
option to
.BR diff .
.br
.ne 5
.TP
.BI \-c date-time
Use the most recent version checked in before the
indicated date and time for comparison.
.I date-time
takes the form:
.IR yy [ mm [ dd [\c
.IR hh [ mm [ ss ]\|]\|]\|]\|].
Omitted units default to their maximum possible values; that is
.B \-c7502   
is equivalent to
.BR \-c750228235959 .
.TP
.BI \-r sid
Use the version corresponding to the indicated delta for
comparison.
.RE
.RE
.TP
.B edit
Retrieve a version of the file for editing.
.RB ` "sccs edit" '
extracts a version of the file that is writable by you, and creates a
.BR p. file
in the
.SM 
.B SCCS
subdirectory as lock on the history, so that no one else can check that
version in or out.
.SM ID
keywords are retrieved in unexpanded form.
.B edit
accepts the same options options as
.BR get ,
below.
.TP
.B enter
Similar to
.BR create ,
but omits the final
.RB ` "sccs get" '.
This may be used if an
.RB ` "sccs edit" '
is to be performed immediately after the history file is initialized.
.HP
.B fix
.BI \-r sid
.br
Revise a (leaf) delta.  Remove the indicated delta from the
.SM SCCS
history, but leave a working copy of the current version in the
directory.  This is useful for incorporating trivial updates for
which no audit record is needed, or for revising the delta
commentary.
.B fix
must be followed by a
.BI \-r
option, to specify the
.SM SID
of the delta to remove.  The indicated delta
must be the most recent (leaf) delta in its branch.
Use
.B fix
with caution since it does not leave an audit trail of
differences (although
the previous commentary is retained within the history file).
.br
.ne 10
.HP
.B  get
.RB [ \-ekmps ]
.RB [ \-c\c
.IR date-time ]
.RB [ \-r\c
.IR sid ]
.br
Retrieve a version from the
.SM SCCS
history.  By default, this is a read-only working copy of the most
recent version;
.SM ID
keywords are in expanded form.
Refer to
.BR \*(S)get (1).
.RS
.RS
.TP
.B \-e
Retrieve a version for editing.   Same as
.BR "sccs edit" .
.TP
.B \-k
Retrieve a writable copy but do not check out the file.
.SM ID
keywords are unexpanded.
.TP
.B \-m
Precede each line with the
.SM SID
of the delta in which it was added.
.TP
.B \-p
Produce the retrieved version on the standard output.  Reports that
would normally go to the standard output (delta
.SM ID\s0's
and statistics) are directed to the standard error.
.TP 
.B \-s
Silent.  Do not report version numbers or statistics. 
.TP
.BI \-c date-time
Retrieve the latest version checked in prior to the date and time
indicated by the
.I date-time 
argument.  
.I date-time
takes the form:
.IR yy [ mm [ dd [\c
.IR hh [ mm [ ss ]\|]\|]\|]\|].
.TP
.BI \-r sid
Retrieve the version corresponding to the indicated
.SM SID\s0.
.RE
.RE
.\"
.HP
.B help
.IR message-code | sccs-command
.PD 0
.TP
.B  help stuck
.br
.PD
Supply more information about
.SM SCCS
diagnostics.
.B help
displays a brief explanation of the error when you supply the
code displayed by an
.SM SCCS
diagnostic message.  If you supply the name of an
.SM SCCS
command, it prints a usage line.
.B help
also recognizes the keyword
.BR stuck .
Refer to
.BR \*(S)help (1).
.br
.ne 10
.HP
.B info
.RB [ \-b ]
.RB [ \-u [\c
.IR username ]\|]
.br
Display a list of files being edited, including the version
number checked out, the version to be checked in, the name of
the user who holds the lock, and the date and time the file was
checked out.
.RS
.RS
.TP
.B \-b
Ignore branches.
.HP
.B \-u\c
.RI [ username ]
.br
Only list files checked out by you.  When
.I username
is specified, only list files checked out by that user.
.RE
.RE
.TP
.B  print
Print the entire history of each named file.
Equivalent to an
.RB ` "sccs prs \-e" '
followed by an
.RB ` "sccs get\ \-p\ \-m" '.
.HP
.B  prs
.RB [ \-el ]
.RB [ \-c\c
.IR date-time ]
.RB [ \-r\c
.IR sid ]
.br
Peruse (display) the delta table, or other portion of an
.BR s. file.
Refer to
.BR \*(S)prs (1).
.RS
.RS
.TP
.B \-e
Display delta table information for all deltas earlier than the one specified with
.B \-r
(or all deltas if none is specified).
.TP
.BI \-l
Display information for all deltas later than, and including,
that specified by
.B \-c
or
.BR \-r .
.TP
.BI \-c date-time
Specify the latest delta checked in before the indicated date
and time.  The
.I date-time
argument takes the form:
.IR yy [ mm [ dd [\c
.IR hh [ mm [ ss ]\|]\|]\|]\|].
.TP
.BI \-r sid
Specify a given delta by
.SM SID\s0.
.RE
.RE
.\"
.HP
.B  prt
.RB [ \-y ]
Display the delta table, but omit the
.SM MR
field (see
.BR sccsfile (5)
for more information on this field).
Refer to
.BR \*(S)prt (1).
.RS
.RS
.TP
.B \-y
Display the most recent delta table entry.  The
format is a single output line for each filename argument, which
is convenient for use in a pipeline with
.BR awk (1)
or
.BR sed (1V).
.RE
.RE
.TP
.BI "rmdel \-r" sid
Remove the indicated delta from the history file.  That delta
must be the most recent (leaf) delta in its branch.
Refer to
.BR \*(S)rmdel (1).
.HP
.BI "sccsdiff \-r" old-sid " \-r" new-sid
.I diff-options
.br
Compare two versions corresponding to the indicated
.SM SID\s0s
(deltas) using
.BR diff .
Refer to
.BR \*(S)sccsdiff (1).
.HP
.B  tell
.RB [ \-b ]
.RB [ \-u\c
.RI [ username ]\|]
.br
Display the list of files that are currently checked out, one filename per line.
.RS
.RS
.TP
.B \-b
Ignore branches.
.HP
.B \-u\c
.RI [ username ]
.br
Only list files checked out to you.  When
.I username
is specified, only list files check out to that user.
.RE
.RE
.TP
.B  unedit
\(lqUndo\(rq the last
.B edit
or
.RB ` "get \-e" ',
and return the working copy to its previous condition.
.B unedit
backs out all pending changes made since the file was checked out.
.TP
.B  unget
Same as
.BR unedit .
Refer to
.BR \*(S)unget (1).
.TP
.B  val
Validate the history file.
Refer to
.BR \*(S)val (1).
.TP
.B what
Display any expanded
.SM ID
keyword strings contained in a binary (object) or text file.
Refer to
.BR what (1)
for more information.
.br
.ne 12
.SH ENVIRONMENT
If the environment variable
.SB PROJECTDIR
is set to contain an absolute pathname (beginning with a slash),
.B sccs
searches for
.SM SCCS
history files in the directory given by that variable.
If
.SB PROJECTDIR
does not begin with a slash, it is taken as the name of a user, and
.B sccs
searches the
.B src
or
.BR source
subdirectory of that user's home directory for history files.
.SH EXAMPLES
.LP
.B sccs
converts the command:
.IP
.B "sccs\ \ \-d/usr/src/include\ \ \ get\ \ \ stdio.h"
.LP
to:
.IP
.B /usr/sccs/get\ \ \ /usr/src/include/SCCS/s.stdio.h
.LP
.ta 15
The command:
.IP
.B sccs\ \ \-pprivate\ \ \ get\ \ \ include/stdio.h
.LP
becomes:
.IP
.B /usr/sccs/get\ \ \ include/private/s.stdio.h
.DT
.LP
To initialize the history file for a source file named
.BR program.c :
make the
.SM SCCS
subdirectory, and then use
.RB ` "sccs create" ':
.RS
.sp .5
.ft B
.nf
example% mkdir \s-1SCCS\s0
example% sccs create program.c
program.c:
1.1
14 lines
.ft
.fi
.RE
.LP
After verifying the working copy, you can remove the backup file
that starts with a comma:
.RS
.sp .5
.B example% diff program.c ,program.c
.br
.B example% rm ,program.c
.RE
.LP
To check out a copy of
.B program.c
for editing, edit it, and then check it back in:
.RS
.nf
.sp .5
.ft B
example% sccs edit program.c
1.1
new delta 1.2
14 lines
example% vi program.c
.I your editing session
.ft B
example% sccs delget program.c
comments? clarified cryptic diagnostic
1.2
3 inserted
2 deleted
12 unchanged
1.2
15 lines
.ft R
.fi
.RE
.LP
To retrieve a file from another directory into the current
directory:
.RS
.sp .5
.B example% sccs get /usr/src/sccs/cc.c
.RE
.LP
or:
.RS
.sp .5
.B example% sccs \-p/usr/src/sccs/  get cc.c
.RE
.LP
To check out all files under
.SM SCCS
in the current directory:
.RS
.sp .5
.B example% sccs edit \s-1SCCS\s0
.RE
.LP
To check in all files currently checked out to you:
.RS
.sp .5
.B example% sccs delta \`sccs tell \-u\`
.RE
.SH FILES
.PD 0
.TP 20
.SB SCCS
.SM SCCS
subdirectory
.TP
.BI \s-1SCCS\s0/d. file
temporary file of differences
.TP
.BI \s-1SCCS\s0/p. file
lock (permissions) file for checked-out versions
.TP
.BI \s-1SCCS\s0/q. file
temporary file
.TP
.BI \s-1SCCS\s0/s. file
.SM SCCS
history file
.TP
.BI \s-1SCCS\s0/x. file
temporary copy of the
.BR s. file
.TP
.BI \s-1SCCS\s0/z. file
temporary lock file
.TP
.B /usr/sccs/*
.SM SCCS
utility programs
.PD
.SH "SEE ALSO"
.BR awk (1),
.BR diff (1),
.BR \*(S)admin (1),
.BR \*(S)cdc (1),
.BR \*(S)comb (1),
.BR \*(S)delta (1),
.BR \*(S)get (1),
.BR \*(S)help (1),
.BR \*(S)prs (1),
.BR \*(S)rmdel (1),
.BR \*(S)sact (1),
.BR \*(S)sccsdiff (1),
.BR \*(S)unget (1),
.BR \*(S)val (1),
.BR sed (1V),
.BR what (1),
.BR sccsfile (5)
.LP
.TX PUL
.SH BUGS
There is no
.B sact
subcommand to invoke
.B /usr/sccs/sact
(see
.BR \*(S)sact (1)).
However, the
.B info
subcommand performs an equivalent function.
ted,
.BR delta
prompts for a comment.  A
.SM NULL
.I comment 
results in an emp./share/man/man1/sccsdiff.1                                                                            755       0      12           76  4424740720  10515                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-sccsdiff.1
.\" @(#)sccsdiff.1 1.4 89/04/17 SMI;
 screendump.1  u    v  screenload.1  v    w  script.1      x   scrolldefaults.1       y  sdiff.1      z  sed.1v      {  selection_svc.1   (  |  set.1 1   <  }  setenv.1  <  P  ~  	setkeys.1 P  `    sh.1  t.  t    shelltool.1       shift.1       
shift_lines.1       size.1       sleep.1       snap.1        soelim.1        sort.1v       	sort./share/man/man1/screenblank.1                                                                         755       0      12         3603  4424740720  11257                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)screenblank.1 1.11 89/03/26 SMI;
.TH SCREENBLANK 1 "22 March 1989"
.SH NAME
screenblank \- turn off the screen when the mouse and keyboard are idle
.SH SYNOPSIS
.B screenblank
.RB [ " \-m " ]
.RB [ " \-k " ]
.RB [ " \-d "
.IR "interval " ]
.RB [ " \-e "
.IR "interval " ]
.RB [ " \-f "
.IR "frame-buffer " ]
.LP
.SH DESCRIPTION
.IX "screenblank command" "" "\fLscreenblank\fR \(em turn of idle screen"
.LP
.B screenblank
turns off the display when the mouse and keyboard are idle
for an extended period (the default is 10 minutes).
.B screenblank
will continue to run until killed by hand,
using 
.RB ` "kill"
.IR processid '.
.SH OPTIONS
.TP
.B \-m
Do not check whether the mouse has been idle.
.TP
.B \-k
Do not check whether the keyboard has been idle.
.TP
.BI \-d " interval"
Disable after
.I interval
seconds.
.I interval
is a number of the form
.IB xxx . xxx
where each
.I x
is a decimal digit.   The default is 600 seconds (10 minutes).
.TP
.BI \-e " interval"
Enable within
.I interval
seconds.
.I interval
is the time between successive polls for keyboard or mouse
activity.  If a poll detects keyboard or
mouse activity, the display is resumed.
.I interval
is a number of seconds, of the form
.IB xxx . xxx
where each
.I x
is a  decimal digit.  The default is 0.25 seconds.
.TP
.BI \-f " frame-buffer"
.I frame-buffer
is the path name of the frame-buffer on which video disabling/enabling
applies.  The defaults is
.BR /dev/fb .
.SH FILES
.PD 0
.TP 20
.B /dev/fb
.PD
.SH "SEE ALSO"
.BR lockscreen (1),
.BR sunview (1)
.SH BUGS
.LP
.B screenblank
only checks 
.B /dev/console
for activity; it does not check non-window programs from 
.B /dev/tty
which bypass
.B /dev/console .
Consequently,
.B screenblank
will turn off the display if
.B /dev/tty
programs (for example, pixrect-based programs) are
the only ones running.
.LP
When not running
.BR sunview (1),
only the
.SM RETURN
key resumes video display.
lias.1 1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1 e./share/man/man1/screendump.1                                                                          755       0      12         6155  4424740720  11142                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)screendump.1 1.24 89/03/26 SMI;
.TH SCREENDUMP 1 "25 March 1989"
.SH NAME
screendump \- dump a frame-buffer image to a file
.SH SYNOPSIS
.B screendump
.RB [ " \-cCeo " ]
.RB [ " \-f "
.IR frame-buffer " ]"
.RB [ " \-t "
.IR type " ]"
.RB [ " \-xyXY "
.IR value " ]"
.RI [ " filename " ]
.SH DESCRIPTION
.IX  "screendump command"  ""  "\fLscreendump\fP \(em dump frame buffer image"
.IX  "dump frame buffer image"  ""  "dump frame buffer image \(em \fLscreendump\fP"
.LP
.B screendump
reads the contents of a frame buffer and writes the display image to
.I filename
(the default is the standard output ) in Sun standard
rasterfile format.
.LP
If the frame buffer has both an overlay plane and color planes,
.B screendump
examines the overlay enable plane and tries to make the output file
represent what is visible on the screen.  It maps the overlay plane
foreground and background colors into the closest values present in the
color map for the color planes.
.SH OPTIONS
.TP 15
.B \-c
Dump the frame-buffer contents directly without making a temporary copy
in a memory pixrect.  Saves time and memory but lengthens the time the
frame-buffer must be inactive to guarantee a consistent screen dump.
.TP
.B \-C
Dump the frame-buffer color planes only (ignored if the
display does not have color planes).
.TP
.B \-e
Set the output rasterfile type to 2,
.SM RT_BYTE_ENCODED\s0.
For most images this saves a significant amount
of space compared to the standard format.
.TP
.B \-o
Dump the frame-buffer overlay plane only (ignored if the
display does not have an overlay plane).
.TP
.BI \-f " frame-buffer"
Dump the specified frame-buffer device (default is
.BR /dev/fb ).
.TP
.BI \-t " type"
Set the output rasterfile type (default 1,
.SM RT_STANDARD\s0).
.TP
.PD 0
.BI \-x " value"
.TP
.BI \-y " value"
.PD
Set the x or y coordinate of the upper left corner of the area to be
dumped to the given value.
.TP
.PD 0
.BI \-X " value"
.TP
.BI \-Y " value"
.PD
Set the width or height of the area to be dumped to the given value.
.SH EXAMPLES
.LP
The command:
.IP
.B example% screendump save.this.image
.LP
writes the current contents of the console frame buffer into the file
.BR save.this.image ,
.LP
while the command:
.IP
.B example% screendump \-f /dev/cgtwo save.color.image
.LP
writes the current contents of the color frame buffer
.B /dev/cgtwo
into the file
.BR save.color.image .
.LP
The command:
.IP
.B example% screendump  |  lpr \-Pversatec \-v
.LP
sends a rasterfile containing the current
frame-buffer to the lineprinter,
selecting the printer
.B versatec
and the
.B v
output filter
(see
.BR /etc/printcap ).
The printer must support an appropriate imaging model such as
PostScript in order to print the image.
.SH FILES
.PD 0
.TP 24
.B /usr/include/rasterfile.h
definition of rasterfile format
.TP
.B /usr/lib/rasfilters/*
filters for non-standard rasterfile formats
.TP
.B /dev/fb
default frame buffer device
.TP
.B /etc/printcap
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR rastrepl (1),
.BR screenload (1),
.BR rasfilter8to1 (1)
.LP
.TX PIXRCT
.SH BUGS
The output file or the screen may be corrupted if the frame-buffer
contents are modified while the dump is in progress.
ent checked-in version by default.
The
.B diffs
subcommand accepts the same options as
.BR diff ,
with the exception that the
.B \-c
option to
.BR diff
must be specified as
.BR \-C .
.RS
.RS
.TP
.B \-C
Pass the
.B \-c
option to
.BR diff .
.br
.ne 5
.TP
.BI \-c date-time
Use the most recent version checked in before the
indicated date and time for comparison.
.I date-time
takes the form:
.IR yy [ mm [./share/man/man1/screenload.1                                                                          755       0      12        11250  4424740720  11124                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)screenload.1 1.26 89/03/26 SMI;
.TH SCREENLOAD 1 "22 March 1989"
.SH NAME
screenload \- load a frame-buffer image from a file
.SH SYNOPSIS
.B screenload
.RB [ " \-bgnw " ]
.RB [ " \-dopr " ]
.RB [ " \-f "
.IR frame-buffer " ]"
.if n .ti 5n
.RB [ " \-h "
.IR "count data " ".\|.\|. ]"
.RB [ " \-i "
.IR color " ]"
.RB [ " \-xyXY "
.IR value " ]"
.if n .ti 5n
.if t .ti +.5i
.RI [ " filename " ]
.SH DESCRIPTION
.IX  "screenload command"  ""  "\fLscreenload\fP \(em load frame buffer image"
.IX  "restore frame buffer image"  ""  "restore frame buffer image \(em \fLscreenload\fP"
.IX  "load frame buffer image"  ""  "load frame buffer image \(em \fLscreenload\fP"
.LP
.B screenload
reads a Sun standard rasterfile (see
.BR rasterfile (5))
and displays it on a frame-buffer.
.B screenload
is able to display monochrome images on a color display, but cannot
display color images on a monochrome display.  If the input file
contains a color image, a frame-buffer has not been explicitly
specified, and
.B /dev/fb
is a monochrome frame-buffer,
.B screenload
looks for a color frame-buffer with one of the standard device names.
.LP
If the image contained in the input file is larger than the actual
resolution of the display,
.B screenload
clips the right and bottom
edges of the image.  If the input image is smaller than the
display (for example, loading an 1152-by-900 image on a 1600-by-1280
high resolution display),
.B screenload
centers the image on the display surface and fills the border
area with solid black (by default).  Various options may be used to
change the image location, or to change or disable the fill pattern.
.SH OPTIONS
.TP 15
.BI \-d
Print a warning message if the display size does not match the
rasterfile image size.
.TP
.BI \-o
Load the image on the overlay plane of the display (ignored if the
display does not have an overlay plane).
.TP
.BI \-p
Wait for a
.SM NEWLINE
to be typed on the standard input before exiting.
.TP
.BI \-r
Reverse the foreground and background of the output image.
Useful when loading a screendump made from a reverse video screen.
.TP
.BI \-f " frame-buffer"
Display the image on the specified frame-buffer device (default
.BR /dev/fb ).
.TP
.PD 0
.BI \-x " value"
.TP
.BI \-y " value"
.PD
Set the x or y coordinate of the upper left corner of the image on the
display to the given value.
.TP
.PD 0
.BI \-X " value"
.TP
.BI \-Y " value"
.PD
Set the maximum width or height of the displayed image to the given value.
.TP
.BI \-b
Fill the border area with a pattern of solid ones (default).  On a
monochrome display this results in a black border; on a color display
the color map value selected by the
.B \-i
option determines the
border color.
.TP
.BI \-g
Fill the border area with a pattern of ``desktop grey''.
On a monochrome display this results in
a border matching the default background pattern used
by SunView; on a color display the color map value
selected by the
.B \-i
option determines the foreground border
color, though the pattern is the same as on a monochrome display.
.TP
.BI \-n
Do not fill the border area.
.TP
.BI \-w
Fill the border area with a pattern of solid zeros.
On a monochrome display
this results in a white border; on a color display the color map value
at index 0 determines the border color.
.TP
.BI \-h " count data .\|.\|."
Fill the border area with the bit pattern described by the following
.I count
16-bit hexadecimal constants.  Note: a \(lq1\(rq bit is black and a
``0'' bit is white on the monochrome display; on a color display the
color map value selected by the
.B \-i
option determines the border
foreground color.  The number of hex constants in the pattern is
limited to 16.
.TP
.BI \-i " color"
Fill the border area with the given color value (default 255).
.SH EXAMPLES
.LP
The command:
.IP
.B example% screenload saved.display.image
.LP
loads the raster image contained in the file
.B saved.display.image
on the display type indicated by the rasterfile header in that file.
.LP
.The command:
.IP
.B example% screenload \-f /dev/cgtwo monochrome.image
.LP
reloads the raster image in the file
.B monochrome.image
on the color frame-buffer device
.BR /dev/cgtwo .
.LP
The command:
.IP
.B example% screenload \-h1 ffff small.saved.image
.LP
is equivalent to the
.B \-b
option (fill border with black), while
.IP
.B
example% screenload \-h4 8888 8888 2222 2222 small.saved.image
.LP
is equivalent to the
.B \-g
option (fill border with desktop grey).
.SH FILES
.PD 0
.TP 24
.B /usr/include/rasterfile.h
definition of rasterfile format
.TP
.B /usr/lib/rasfilters/*
filters for non-standard rasterfile formats
.TP
.B /dev/fb
default frame buffer device
.PD
.SH "SEE ALSO"
.BR rasfilter8to1 (1),
.BR rastrepl (1),
.BR screendump (1),
.BR screenload (1)
.LP
.TX PIXRCT
elta to remove.  The indicated delta
must be the most recent (leaf) delta in its branch.
Use
.B fix
with caution since it does not leave an audit trail of
differences (although
the previous commentary is retained within the history file).
.br
.ne 10
.HP
.B  get
.RB [ \-ekmps ]
.RB [ \-c\c
.IR date-time ]
.RB [ \-r\c
.IR sid ]
.br
Retrieve a v./share/man/man1/script.1                                                                              755       0      12         2462  4424740720  10276                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)script.1 1.10 89/03/26 SMI; from UCB 4.1
.TH SCRIPT 1 "9 September 1987"
.SH NAME
script \- make typescript of a terminal session
.SH SYNOPSIS
.B script
[
.B \-a
] [
.I filename
]
.SH DESCRIPTION
.IX  "script command"  ""  "\fLscript\fP \(em make script of terminal session"
.IX  "create" "script of terminal session \(em \fLscript\fP"
.IX  login  "make script of session"  ""  "make script of session \(em \fLscript\fP"
.IX  terminal  "make script of session"  ""  "make script of session \(em \fLscript\fP"
.LP
.B script
makes a typescript of everything printed on your terminal.
The typescript is written to
.IR filename ,
or appended to
.IR filename
if the
.B \-a
option is given.  It can be sent to the line printer later with
.BR lpr (1).
If no file name is given, the typescript is saved in the file
.BR typescript .
.LP
The script ends when the forked shell exits.
.SH OPTIONS
.TP
.B \-a
Append the script to the specified file instead of writing over it.
.  \".LP
.  \"This program is useful when using a crt and a hard-copy
.  \"record of the dialog is desired, as for a student handing
.  \"in a program that was developed on a crt when hard-copy
.  \"terminals are in short supply.
.SH SEE ALSO
.BR lpr (1)
.SH BUGS
.LP
.B script
places
.I everything
in the log file.  This is not
what the naive user expects.
it.1 t       textedit_filters.1   ,    tftp.1c   <    then.1   L    time.1v   \    tip.1c   t    toolplaces.1 c       touch.1v s.1      tput.1v       tr.1./share/man/man1/scrolldefaults.1                                                                      755       0      12          103  4424740721  11767                                                                                                                                                                                                                                                                                                                                                                      .so man1/defaultsedit.1
.\" @(#)scrolldefaults.1 1.5 89/03/26 SMI;
.1v f    {  selection_svc.1   (  |  set.1 sv  <  }  setenv.1  io  P  ~  	setkeys.1 t.  `    sh.1 ys.  t    shelltool.1       shift.1       
shift_lines.1       size.1 .      sleep.1       snap.1 e      soelim.1 1       sort.1v       	sortbib.1 v       source.1  rt  (    sparc.1   8    spell.1   L    	spellin.1 1   `    
spellout.1 l  t    	./share/man/man1/sdiff.1                                                                               755       0      12         4732  4424740721  10070                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sdiff.1 1.11 89/03/26 SMI; from S5R2 6.2
.TH SDIFF 1  "21 December 1987"
.SH NAME
sdiff \- contrast two text files by displaying them side-by-side
.SH SYNOPSIS
.B sdiff
[
.B \-l
] [
.BI \-o " outfile"
] [
.B \-s
] [
.BI \-w " n"
]
.I filename1
.I filename2
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "sdiff command"  ""  "\fLsdiff\fP \(em side-by-side compare"
.IX files  "side-by-side compare"
.IX compare  "files side-by-side"
.B sdiff
uses the output of
.BR diff
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 filename1 ,
a
.B >
in the gutter
if the line only exists in
.IR filename2 ,
and a
.B |
for lines that are different.
See
.SM EXAMPLES\s0.
.SH OPTIONS
.TP
.BI \-w "  n"
Use
.IR n
as the width of the output line.
The default line length is 130 characters.
.TP
.B \-l
Only print the left side of any identical lines.
.TP
.BR \-s
Silent.  Do not print identical lines.
.TP
.BI \-o "  outfile"
Use the next argument,
.IR output ,
as the name of an output file created as
an interactively controlled merging of
.I filename1
and
.IR filename2 .
Identical lines of
.I filename1
and
.I filename2
are copied to
.IR output .
Sets of differences, as produced by
.BR diff ,
are printed; where a set of differences share a
common gutter character.
After printing each set of differences,
.B sdiff
prompts with a
.B %
and waits for you to type one of the following commands:
.RS
.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
.BR ed (1)
with the left column.
.TP
.B e r
Call
.BR ed (1)
with the right column.
.TP
.B e b
Call
.BR ed (1)
with the concatenation of left and right columns.
.TP
.B e
Call
.BR ed (1)
with a zero length file.
.IP
On exit from
.BR ed (1),
the resulting file is concatenated to the named output file.
.TP
.B q
Exit from the program.
.RE
.SH EXAMPLES
.LP
A sample output of
.B sdiff
would look like this:
.RS
.IP
.nf
.ft B
.cs B 20
     x    |    y
     a         a
     b    <
     c    < 
     d         d
          >    c
.fi
.cs B
.ft R
.RE
.SH SEE ALSO
.BR diff (1),
.BR ed (1)
EXAMPLES\s0.
.SH OPTIONS
.TP
.BI \-w "./share/man/man1/sed.1v                                                                                755       0      12        27271  4424740721   7761                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sed.1v 1.29 89/03/26 SMI; from UCB 4.3 and S5R2
.tr ##
.TH SED 1V  "25 March 1989"
.SH NAME
sed \- stream editor
.SH SYNOPSIS
.LP
.B sed
[
.B \-n
] [
.BI \-e " script"
] [
.BI \-f " sfilename"
] [
.IR filename " ].\|.\|."
.SH DESCRIPTION
.IX "System V commands" "\fLsed\fR"
.IX  "sed command"  ""  "\fLsed\fP \(em stream editor"
.IX  "stream editor"  ""  "stream editor \(em \fLsed\fP"
.IX  "text editing"  sed   ""  "\fLsed\fP \(em stream editor"
.IX  "editing text"  sed   ""  "\fLsed\fP \(em stream editor"
.IX  display "selected lines from file \(em \fLsed\fP"
.LP
.B sed
copies the 
.IR filename s
(standard input default) to the
standard output, edited according to a script of commands.
.SH OPTIONS
.TP 15
.B \-n
Suppress the default output.
.TP
.BI \-e " script"
.I script
is an edit command for
.BR sed .
If there is just one
.B \-e
option and no
.B \-f 
options, the
.B \-e
flag may be omitted.
.TP
.BI \-f " sfilename"
Take the script from
.IR sfilename .
.SH USAGE
.SS "sed Scripts"
.LP
.B sed " scripts"
consist of editing commands, one per line, of the
following form:
.IP
[ \fIaddress\fR [\fB,\fR \fIaddress\fR ] ] \fIfunction\fR [ \fIarguments\fR ]
.LP
In normal operation
.B sed
cyclically copies a line of input into a
\fIpattern space\fP (unless there is something left after a
.B D
command),
sequentially applies all commands with 
.I addresses
matching that pattern
space until reaching the end of the script, copies the pattern space
to the standard output (except under
.BR \-n ),
and finally, deletes the pattern space.
.LP
Some commands use a
.I hold space
to save all or part of the pattern space
for subsequent retrieval.
.LP
An 
.I address
is either:
.IP
a decimal number linecount, which is cumulative across input files;
.IP
a
.BR $ ,
which addresses the last input line;
.IP
or a context address, which is a
.BI / "regular expression" /
in the style of
.BR ed (1);
.LP
with the following exceptions:
.RS
.TP
\fB\e\fP\fI?\fPRE\fI?\fP
In a context address, the construction
.I \e ?regular expression?\fR,
where
.I ?
is any character,
is identical to
.BI / "regular expression" /\fR.
Note: in the context address
.BR \exabc\exdefx ,
the second
.B x
stands for itself, so that the
regular expression is
.BR abcxdef .
.TP
.B \en
Matches a 
.SM NEWLINE 
embedded in the pattern space.
.TP
.B .
Matches any character except the 
.SM NEWLINE 
ending the pattern space.
.TP
.I null
A command line with no address selects every pattern space.
.TP
.I address
Selects each pattern space that matches.
.TP
.I address1 ,\|address2
Selects the inclusive range from the first
pattern space matching 
.I addrress1
to the first pattern space matching 
.IR address2 .
Selects only one line if 
.I address1
is greater than or equal to 
.IR address2 .
.RE
.br
.ne 10
.SS Comments
If the first nonwhite character in a line is a 
.RB ` # '
(pound sign),
.B sed
treats that line as a comment, and ignores it.  If, however, the
first such line is of the form:
.IP
.B #n
.LP
.B sed
runs as if the 
.B \-n
flag were specified.
.SS Functions
The maximum number of permissible addresses
for each function is indicated in parentheses in the list below.
.LP
An argument denoted 
.I text
consists of one or more lines,
all but the last of which end with
.B \e
to hide the 
.SM NEWLINE\s0.
Backslashes in text are treated like backslashes in the replacement string
of an
.B s
command, and may be used to protect initial 
.SM SPACE
and
.SM TAB
characters
against the stripping that is done on every script line.
.LP
An argument denoted 
.I rfilename
or 
.I wfilename
must terminate the command
line and must be preceded by exactly one 
.SM SPACE\s0. 
Each 
.I wfilename
is created before processing begins.  There can be at most 10 distinct
.I wfilename
arguments.
.TP 12
.RB (1) a\e
.PD 0
.TP
.I text
.PD
Append: place 
.I text
on the output before reading the next input line.
.TP
.RI (2)\|\fBb\fP " label"
Branch to the
.RB ` : '
command bearing the
.IR label .
Branch to the end of the script if 
.I label
is empty.
.TP
.PD 0
(2)\|\fBc\e\fP
.TP
.I text
.PD
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)\|\fBd\fP
Delete the pattern space.  Start the next cycle.
.TP
(2)\|\fBD\fP
Delete the initial segment of the 
pattern space through the first 
.SM NEWLINE\s0.
Start the next cycle.
.TP
(2)\|\fBg\fP
Replace the contents of the pattern space by the contents of the hold space.
.TP
(2)\|\fBG\fP
Append the contents of the hold space to the pattern space.
.TP
(2)\|\fBh\fP
Replace the contents of the hold space by the contents of the pattern space.
.TP
(2)\|\fBH\fP
Append the contents of the pattern space to the hold space.
.TP
.PD 0
(1)\|\fBi\e\fP
.TP
.I text
.PD
Insert: place 
.I text
on the standard output.
.TP
(2)\|\fBl\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)\|\fBn\fP
Copy the pattern space to the standard output.
Replace the pattern space with the next line of input.
.TP
(2)\|\fBN\fP
Append the next line of input to the pattern space
with an embedded newline.  (The current line number changes.)
.TP
(2)\|\fBp\fP
Print: copy the pattern space to the standard output.
.TP
(2)\|\fBP\fP
Copy the initial segment of the pattern space through
the first 
.SM NEWLINE 
to the standard output.
.TP
(1)\|\fBq\fP
Quit: branch to the end of the script.  Do not start a new cycle.
.TP
.RI (2)\|\fBr\fP " rfilename"
Read the contents of
.IR rfilename .
Place them on the output before reading
the next input line.
.br
.ne 14
.TP
.RI (2)\|\fBs\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
.RB ` / '.
For a fuller description see
.BR ed (1).
.I flags
is zero or more of:
.RS
.TP 12
.I n
\fIn\fP= 1 \- 512.
Substitute for just the 
.IR n th 
occurrence of the
.IR regular expression .
.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 " wfilename"
Write: append the pattern space to 
.I wfilename
if a replacement was made.
.RE
.TP 12
.RI (2)\|\fBt\fP " label"
Test: branch to the
.RB ` : '
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)\|\fBw\fP " wfilename"
Write: append the pattern space to
.IR wfilename .
.TP
.RI (2)\|\fBx\fP
Exchange the contents of the pattern and hold spaces.
.TP
.RI (2)\|\fBy\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)\fB!\fP " function"
Do not: apply the 
.I function
(or group, if 
.I function
is
.RB ` { '\|)
only to lines 
.I not
selected by the address(es).
.TP
.RI (0)\|\fB:\fP " label"
This command does nothing; it bears a 
.I label
for
.B b
and
.B t
commands to branch to.
Note: the maximum length of 
.I label
is seven characters.
.TP
(1)\|\fB=\fP
Place the current line number on the standard output as a line.
.TP
(2)\|\fB{\fP
Execute the following commands through a matching
.RB ` } '
only when the pattern space is selected.  Commands are separated by
.RB ` ; '.
.TP
(0)\|
An empty command is ignored.
.SS System V sed Scripts
Initial 
.SM SPACE
and
.SM TAB
characters are
.I not
stripped from text lines.
.SH DIAGNOSTICS
.TP
.B Too many commands
The command list contained more than 200 commands.
.TP
.B Too much command text
The command list was too big for
.B sed
to handle.  Text in the
.BR a ,
.BR c ,
and
.B i
commands, text read in by
.B r
commands, addresses, regular expressions and replacement strings in
.B s
commands, and translation tables in
.B y
commands all require
.B sed
to store data internally.
.TP
.B Command line too long
A command line was longer than 4000 characters.
.TP
.B Too many line numbers
More than 256 decimal number linecounts were specified as addresses in the
command list.
.TP
.B Too many files in w commands
More than 10 different files were specified in
.B w
commands or
.B w
options for
.B s
commands in the command list.
.TP
.B Too many labels
More than 50 labels were specified in the command list.
.TP
.B Unrecognized command
A command was not one of the ones recognized by
.BR sed .
.TP
.B Extra text at end of command
A command had extra text after the end.
.br
.ne 4
.TP
.B Illegal line number
An address was neither a decimal number linecount, a
.BR $ ,
nor a context address.
.TP
.B Space missing before filename
There was no space between a
.B r
or
.B w
command, or the
.B w
option for a
.B s
command, and the filename specified for that command.
.TP
.B "Too many {'s"
There were more
.B {
than
.B }
in the list of commands to be executed.
.TP
.B "Too many }'s"
There were more
.B }
than
.B {
in the list of commands to be executed.
.TP
.B No addresses allowed
A command that takes no addresses had an address specified.
.TP
.B Only one address allowed
A command that takes one address had two addresses specified.
.TP
.B \(lq\edigit\(rq out of range
The number in a
.BI \e n
item in a regular expression or a replacement string in a
.B s
command was greater than 9.
.TP
.B Bad number
One of the endpoints in a range item in a regular expression (that is, an item
of the form \fB{\fIn\fB}\fR or \fB{\fIn\fB,\fIm\fB}\fR) was not a number.
.TP
.B Range endpoint too large
One of the endpoints in a range item in a regular expression was greater than
255.
.TP
.B "More than 2 numbers given in \e{ \e}"
More than two endpoints were given in a range expression.
.TP
.B } expected after \e
A
.B \e
appeared in a range expression and was not followed by a
.BR } .
.TP
.B "First number exceeds second in \e{ \e}"
The first endpoint in a range expression was greater than the second.
.TP
.B Illegal or missing delimiter
The delimiter at the end of a regular expression was absent.
.TP
.B \e( \e) imbalance
There were more
.B \e(
than
.BR \e) ,
or more
.B \e)
than
.BR \e( ,
in a regular expression.
.TP
.B [ ] imbalance
There were more
.B [
than
.BR ] ,
or more
.B ]
than
.BR [ ,
in a regular expression.
.TP
.B First RE may not be null
The first regular expression in an address or in a
.B s
command was null (empty).
.TP
.B Ending delimiter missing on substitution
The ending delimiter in a
.B s
command was absent.
.TP
.B Ending delimiter missing on string
The ending delimiter in a
.B y
command was absent.
.TP
.B Transform strings not the same size
The two strings in a
.B y
command were not the same size.
.TP
.B Suffix too large - 512 max
The suffix in a
.B s
command, specifying which occurrence of the regular expression should be
replaced, was greater than 512.
.TP
.B Label too long
A label in a command was longer than 8 characters.
.TP
.B Duplicate labels
The same label was specified by more than one
.B :
command.
.TP
.B File name too long
The filename specified in a
.B r
or
.B w
command, or in the
.B w
option for a
.B s
command, was longer than 1024 characters.
.TP
.B Output line too long.
An output line was longer than 4000 characters long.
.TP
.BI "Too many appends or reads after line" " n"
More than 20
.B a
or
.B r
commands were to be executed for line
.IR n .
.TP
.B Hold space overflowed.
More than 4000 characters were to be stored in the
.IR "hold space" .
.SH SEE ALSO
.BR awk (1),
.BR ed (1),
.BR grep (1V),
.BR lex (1)
.LP
.TX TEXT
.SH BUGS
There is a combined limit of 200 
.B \-e
and
.B \-f
arguments.  In addition, there are various internal size limits which,
in rare cases, may overflow.  To overcome these limitations, either
combine or break out scripts, or use a pipeline of
.B sed
commands.

ith
.B \e
to hide the 
.SM NEWLINE\s0.
Backslashes in text are treated like backslashes in the replacement string
of an
.B s
command, and may be used to protect initial 
.SM SPACE
and
.SM TAB
characters
against the stripping that is done on every script line.
.LP
An argument denoted 
.I rfilename
or 
.I wfilename
must termina./share/man/man1/selection_svc.1                                                                       755       0      12         2320  4424740721  11624                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)selection_svc.1 1.12 89/03/26 SMI;
.TH SELECTION_SVC 1 "22 March 1989"
.SH NAME
selection_svc \- SunView selection service
.SH SYNOPSIS
.B selection_svc
.RB [ " \-d " ]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "selection_svc" "" "\fLselection_svc\fR"
.LP
The SunView selection service handles the
state and rank of various selections
for its client programs.  A selection service
is started automatically by
.BR sunview (1).
However, you can also start one explicitly using the
.B selection_svc
command.
.SH OPTIONS
.TP
.B \-d
Debug a client program.  Use the alternate
socket provided for testing and
debugging a client program.   The second selection
service invoked with the
.B \-d
handles a different set of selections, and
can co-exist with one started in
the normal fashion.  Each service responds
only to requests directed to its
own socket.  The client to be debugged
can be directed to use the ``debugging''
service by using the
.B seln_use_test_service()
procedure, as described in the
.TX SVSPG .
.SH SEE ALSO
.TP
.BR sunview (1)
.LP
.TX SVBG
.LP
.TX SVSPG
edit.1         textedit_filters.1   ,    tftp.1c   <    then.1    L    time.1v   \    tip.1c    t    toolplaces.1        touch.1v        tput.1v       tr.1v v       trace.1       
traffic.1c       troff.1       true.1      ./share/man/man1/set.1                                                                                 755       0      12           71  4424740721   7520                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)set.1 1.8 89/03/26 SMI; 
etkeys.1 .1  `    sh.1 etk  t    shelltool.1       shift.1       
shift_lines.1 1       size.1 i      sleep.1       snap.1       soelim.1 nap      sort.1v       	sortbib.1 rt      source.1 ib.  (    sparc.1   8    spell.1   L    	spellin.1 el  `    
spellout.1 .  t    	spline.1g ut      split.1       stop.1       	strings.1 op      strip.1   ./share/man/man1/setenv.1                                                                              755       0      12           74  4424740721  10234                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)setenv.1 1.8 89/03/26 SMI; 
sh.1  .1  t    shelltool.1       shift.1       
shift_lines.1       size.1        sleep.1       snap.1        soelim.1        sort.1v       	sortbib.1       source.1    (    sparc.1   8    spell.1   L    	spellin.1 L  `    
spellout.1 `  t    	spline.1g t      split.1       stop.1        	strings.1       strip.1       stty.1v   ./share/man/man1/setkeys.1                                                                             755       0      12           73  4424740722  10417                                                                                                                                                                                                                                                                                                                                                                      .so man1/old-setkeys.1
.\" @(#)setkeys.1 1.4 89/04/11 SMI;
lltool.1       shift.1       
shift_lines.1       size.1 .      sleep.1       snap.1 e      soelim.1 1        sort.1v       	sortbib.1 v       source.1    (    sparc.1   8    spell.1   L    	spellin.1 1   `    
spellout.1 L  t    	spline.1g  `      split.1       stop.1 i      	strings.1         strip.1       stty.1v      $ stty_from_defaul./share/man/man1/sh.1                                                                                  755       0      12       121045  4424740722   7445                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sh.1 1.43 89/03/26 SMI; from S5R3
.ds OK [\|
.ds CK \|]
.tr $$
.TH SH 1 "25 March 1989"
.SH NAME
sh \- shell, the standard UNIX system command interpreter and command-level language
.SH SYNOPSIS
.B sh
[
.\".B \-acefhiknrstuvx
.B \-acefhiknstuvx
] [ 
.I arguments
]
.IX  "sh command"  ""  "\fLsh\fP command, Bourne shell"  ""  PAGE START
.IX  "Bourne shell"  ""  "Bourne shell, \fLsh\fP"  ""  PAGE START
.SH DESCRIPTION
.BR sh ,
the Bourne shell, is the standard 
.SM UNIX\s0-system
command interpreter.  It executes commands read from a terminal or a 
file.
.SS Definitions
A
.I blank
is a 
.SM TAB
or a 
.SM SPACE
character.
A
.I name
is a sequence of letters, digits, or underscores beginning with a letter
or underscore.  A
.I parameter
is a name, a digit, or any of the characters
.BR \(** ,
.BR @ ,
.BR # ,
.BR ? ,
.BR \- ,
.BR $ ,
and
.BR !\ .
.SS Invocation
If the shell is invoked through
.BR execve (2),
.BR execv (3),
or
.BR execl (3),
and the first character of argument zero
is
.RB ` \- ',
commands are initially read from
.B /etc/profile
and from
.BR \s-1$HOME\s0/.profile ,
if such files exist.
Thereafter, commands are read as described below, which
is also the case when the shell is invoked as
.BR sh .
.SH OPTIONS
The options below are interpreted by the shell on invocation only; 
unless the 
.B \-c
or
.B \-s
option is specified, the first argument is assumed to be the
name of a file containing commands, and the remaining
arguments are passed as positional parameters
for use with the commands that file contains.
.TP 15
.B \-i
If the
.B \-i
option is present or
if the shell input and output are attached to a terminal,
this shell is
.IR interactive .
In this case
.SM TERMINATE
is ignored (so that
.RB ` "kill 0" '
does not kill an interactive shell) and
.SM INTERRUPT
is caught and ignored (so that
.B wait
is interruptible).
In all cases,
.SM QUIT
is ignored by the shell.
.TP
.B \-s
If the
.B \-s
option is present or if no arguments remain
commands are read from the standard input.
Any remaining arguments specify the positional parameters.
Shell output (except for 
.BR "Special Commands" )
is written to file descriptor 2.
.TP
.BI \-c " string"
If the
.B \-c
option is present
commands are read from
.IR string .
.LP
The remaining options and arguments are described under the
.B set
command, under
.BR "Special Commands" ,
below.
.SH USAGE
Refer to 
.TX DMBG
for more information about using the shell as a programming
language.
.SS Commands
A
.I simple command
is a sequence of nonblank
.I words
separated by
.IR blanks .
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 command.
The command name is passed as argument 0 (see
.BR execve (2)).
The
.I value
of a
.I simple command
is its exit status
if it terminates normally, or (octal)
.RI 200+ status
if it terminates abnormally (see
.BR sigvec (2)
for a list of status values).
.LP
A
.I pipeline
is a sequence of one or more
.I commands
separated by
.RB ` | '
(or, for historical compatibility, by
.RB ` \s+2^\s0 ').
The standard output of each command but the last
is connected by a
.B pipe
(see
.BR pipe (2))
to the standard input of the next command.
Each command is run as a separate process;
the shell normally waits for the last command to terminate
before prompting for or accepting the next input line.
The exit status of a pipeline is the exit status of its last command.
.LP
A
.I list
is a sequence of one or more
.IR "simple command" s
or pipelines, separated by
.RB ` ; ',
.RB ` & ',
.RB ` && ',
or
.RB ` |\|| ',
and optionally terminated by
.RB ` ; '
or
.RB ` & '.
Of these four symbols,
.RB ` ; '
and
.RB ` & '
have equal precedence, which is lower than that of
.RB ` && '
and
.RB ` |\|| '.
The symbols
.RB ` && '
and
.RB ` |\|| '
also have equal precedence.
A semicolon
.RB ( ; )
sequentially executes the preceding pipeline; an ampersand
.RB ( & )
asynchronously executes the preceding pipeline (the shell does
.I not
wait for that pipeline to finish).  The symbols
.B &&
and
.B |\||
are used to indicate conditional execution of the list that follows.
With
.B && ,
.I list
is executed only if the preceding pipeline (or
command) returns a zero exit status.  With
.BR |\|| ,
.I list
is executed only if the preceding pipeline (or
command) returns a nonzero exit status.  
An arbitrary number of 
.SM NEWLINE
characters may appear in a
.IR list ,
instead of semicolons, to delimit commands.
.LP
.IX  "commands" "Bourne shell"  ""  ""  PAGE MAJOR
A
.I command
is either a
.I simple command
or one of the following 
constructions.  Unless otherwise stated, the value returned by a 
command is that of the last
.I simple command
executed in the construction.
.LP
.HP
.BI for " name \fR\*(OK " in " word \fR.\|.\|. \*(CK "
.BI do " list " done
.br
.IX  "for command"  ""  "\fLfor\fP command"
.IX  "Bourne shell commands"  "for command"  ""  "\fLfor\fP command"
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
.B do
.I list
once for each positional parameter
.IX  "do command"  ""  "\fLdo\fP command"
.IX  "Bourne shell commands"  "do command"  ""  "\fLdo\fP command"
.IX  "done command"  ""  "\fLdone\fP command"
.IX  "Bourne shell commands"  "done command"  ""  "\fLdone\fP commmand"
that is set (see
.B "Parameter Substitution"
below).
Execution ends when there are no more words in the list.
.HP
.BI case " word " in 
.RI \*(OK pattern \*(OK 
.B |
.IR pattern "\*(CK .\|.\|. "
.B )
.IB list " ;; "
.RB "\*(CK .\|.\|. " esac
.br
A
.B case
.IX  "case command"  ""  "\fLcase\fP command"
.IX  "Bourne shell commands"  "case command"  ""  "\fLcase\fP command"
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 
.BR "Filename Generation" )
except that a slash, a leading dot, or a dot immediately
following a slash need not be matched explicitly.
.IX  "esac command"  ""  "\fLesac\fP command"
.IX  "Bourne shell commands"  "esac command"  ""  "\fLesac\fP command"
.HP
.BI if " list " then " list \fR\*(OK "
.BI elif " list " then " list \fR\*(CK .\|.\|. \*(OK "
.BI else " list \fR\*(CK " fi
.br
The
.IX  "if command"  ""  "\fLif\fP command"
.IX  "Bourne shell commands"  "if command"  ""  "\fLif\fP command"
.I list
following
.B if
is executed and, if it returns a zero exit status, the
.I list
following the first
.B then
.IX  "then command"  ""  "\fLthen\fP command"
.IX  "Bourne shell commands"  "then command"  ""  "\fLthen\fP command"
is executed.  Otherwise, the
.I list
following 
.B elif
.IX  "elif command"  ""  "\fLelif\fP command"
.IX  "Bourne shell commands"  "elif command"  ""  "\fLelif\fP command"
is executed and, if its value is zero, the
.I list
following the next
.B then
is executed.  Failing that, the
.B else
.IX  "else command"  ""  "\fLelse\fP command"
.IX  "Bourne shell commands"  "else command"  ""  "\fLelse\fP command"
.I list
is executed.  If no
.B else
.I list
or
.B then
.I list
is executed, then the
.B if
command returns a zero exit status.
.IX  "fi command"  ""  "\fLfi\fP command"
.IX  "Bourne shell commands"  "fi command"  ""  "\fLfi\fP command"
.TP
.BI while " list " do " list " done
A
.B while
.IX  "while command"  ""  "\fLwhile\fP command"
.IX  "Bourne shell commands"  "while command"  ""  "\fLwhile\fP command"
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
.IX  "until command"  ""  "\fLuntil\fP command"
.IX  "Bourne shell commands"  "until command"  ""  "\fLuntil\fP command"
may be used in place of
.B while
to negate the loop termination test.
.ne 4
.TP
.BI ( \|list\| )
Execute
.I list
in a subshell.
.TP
.BI { \|list ;}
.I list
is simply executed.
.TP
.IB name " () {" list ;}
.IX  "functions, Bourne shell"
.IX  "Bourne shell functions"
.IX  "shell functions, Bourne"
Define a function which is referenced by
.IR name .
The body of the function is the
.I list
of commands between
.BR { " and " } "."
Execution of functions is described below (see
.BR Execution ).
.LP
The following words
are only recognized as the first word of a command and when not quoted:
.if t .RS
.LP
.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 #
and all the following characters up to a 
.SM NEWLINE
are ignored.
.SS Command Substitution
.LP
The shell reads commands from the string between two grave accents
(\fB``\fP)
and the standard output from these commands may
be used as all or part of a word.  Trailing
.SM NEWLINE
characters from the standard output are removed.
.LP
No interpretation is done on the string before the string is
read, except to remove backslashes
.RB ( \|\e\| )
used to escape other characters.  Backslashes
may be used to escape a grave accent
(\fB`\fP)
or another backslash
.RB ( \|\e\| )
and are removed before the command string is read.
Escaping grave accents allows nested command substitution.
If the command substitution lies within a pair of double
quotes
(\fB" .\|.\|.\|` .\|.\|.\|` .\|.\|. "\fP),
a backslash used to escape a double quote
(\fB\e"\fP)
will be removed; otherwise, it will be left intact.
.LP
If a backslash is used to escape a
.SM NEWLINE
character
(\fB\e\s-1NEWLINE\s0\fP),
both the backslash and the
.SM NEWLINE
are removed
(see
.BR Quoting ,
later).
In addition, backslashes used to escape dollar signs
(\fB\e$\fP)
are removed.
Since no interpretation is done on the command string before
it is read, inserting a backslash to escape a dollar
sign has no effect.
Backslashes that precede characters other than
.BR \e ,
.BR ` ,
\fB"\fP,
.BR \s-1NEWLINE\s0 ,
and
.B $
are left intact when the command string is read.
.SS Parameter Substitution
The character
.B $
is used to introduce substitutable 
.IR parameters .
There are two types of parameters,
positional and keyword.
If
.I parameter
is a digit, it is a positional parameter.
Positional parameters may be assigned values by
.BR set .
Keyword parameters (also known as variables)
may be assigned values by writing:
.RS
.LP
.IB name = value
\*(OK
.IB name = value
\*(CK .\|.\|.
.RE
.LP
Pattern-matching is not performed on
.IR value .
There cannot be a function and a variable with the same
.IR name .
.LP
.PD 0
.TP
.BI ${ \|parameter\| }
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.
If
.I parameter
is
.RB ` \(** '
or
.RB ` @ ',
all the positional
parameters, starting with
.BR $1 ,
are substituted
(separated by
.SM SPACE
characters).
Parameter
.B $0
is set from argument zero when the shell
is invoked.
.LP
If the colon
.RB ( : )
is omitted from the following expressions, the
shell only checks whether 
.I parameter
is set or not.
.TP
.BI ${ parameter :\- word }
If
.I parameter
is set and is nonnull, substitute its value;
otherwise substitute
.IR word .
.TP
.BI ${ parameter := word }
If
.I parameter
is not set or is null
set it to
.IR word ;
the value of the parameter is substituted.
Positional parameters may not be assigned to
in this way.
.TP
.BI ${ parameter :? word }
If
.I parameter
is set and is nonnull, substitute its value;
otherwise, print
.I word
and exit from the shell.
If
.I word
is omitted, the message
.RB ` "parameter null or not set" '
is printed.
.TP
.BI ${ parameter :+ word }
If
.I parameter
is set and is nonnull, substitute
.IR word ;
otherwise substitute nothing.
.PD
.LP
In the above,
.I word
is not evaluated unless it is
to be used as the substituted string,
so that, in the following example,
.B pwd
is executed only if
.B d
is not set or is null:
.RS
.LP
.BI "echo \|${" d ":\-`pwd`}"
.RE
.LP
The following parameters
are automatically set by the shell:
.RS
.TP
.B #
The number of positional parameters in decimal.
.PD 0
.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
.IX  "Bourne shell variables" "" "" "" PAGE START
.IX  "shell variables, in Bourne shell"  ""  ""  ""  PAGE START
.IX  variables "in Bourne shell"  ""  ""  ""  PAGE START
.LP
The following parameters
are used by the shell:
.RS
.TP 15
.SB HOME
.IX  "HOME variable"  ""  "\fLHOME\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "HOME variable"  ""  "\fLHOME\fP variable"
The default argument (home directory) for the
.B cd
command.
.TP
.SB PATH
.IX  "PATH variable"  ""  "\fLPATH\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "PATH variable"  ""  "\fLPATH\fP variable"
The search path for commands (see
.B Execution
below).
.\"The user may not change
.\".B \s-1PATH\s0
.\"if executing under
.\".IR rsh .
.TP
.SB CDPATH
.IX  "CDPATH variable"  ""  "\fLCDPATH\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "CDPATH variable"  ""  "\fLCDPATH\fP variable"
The search path for the
.B cd
command.
.TP
.SB MAIL
.IX  "MAIL variable"  ""  "\fLMAIL\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "MAIL variable"  ""  "\fLMAIL\fP variable"
If this parameter is set to the name of a mail file
.I and
the 
.SB MAILPATH
parameter is not set, the shell informs the user of the arrival of mail 
in the specified file.
.TP
.SB MAILCHECK
.IX  "MAILCHECK variable"  ""  "\fLMAILCHECK\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "MAILCHECK variable"  ""  "\fLMAILCHECK\fP variable"
This parameter specifies how often 
(in seconds) the shell
will check for the arrival of mail in the files specified by the
.SB MAILPATH
or
.SB MAIL
parameters.
The default value is 600 seconds (10 minutes).
If set to 0, the shell will check before each primary prompt.
.TP
.SB MAILPATH
.IX  "MAILPATH variable"  ""  "\fLMAILPATH\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "MAILPATH variable"  ""  "\fLMAILPATH\fP variable"
A colon 
.RB ( : )
separated list of filenames.
If this parameter is set, the shell informs the user of the arrival of mail
in any of the specified files. 
Each filename can be followed by 
.B %
and a message that will be printed when the 
modification time changes.
The default message is
.RB ` "you have mail" '.
.TP
.B \s-1PS\s01
.IX  "PS1 variable"  ""  "\fLPS1\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "PS1 variable"  ""  "\fLPS1\fP variable"
Primary prompt string, by default
.RB ` "$ \|" '.
.TP
.SB PS2
.IX  "PS2 variable"  ""  "\fLPS2\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "PS2 variable"  ""  "\fLPS2\fP variable"
Secondary prompt string, by default
.RB ` "> \|" '.
.TP
.SB IFS
.IX  "IFS variable"  ""  "\fLIFS\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "IFS variable"  ""  "\fLIFS\fP variable"
Internal field separators, normally
.SM SPACE\*S,
.SM TAB\*S,
and
.SM NEWLINE\*S.
.TP
.SB SHELL
.IX  "SHELL variable"  ""  "\fLSHELL\fP variable \(em \fLsh\fP"
.IX  "Bourne shell variables"  "SHELL variable"  ""  "\fLSHELL\fP variable"
When the shell is invoked, it scans the environment (see
.B Environment
below) for this name.
.RE
.LP
The shell gives default values to
.BR \s-1PATH\s0 ,
.BR \s-1PS\s01 ,
.BR \s-1PS\s02 ,
.SB MAILCHECK
and
.BR \s-1IFS\s0 .
.SB HOME
and
.SB MAIL
are set by
.BR login (1).
.IX  "Bourne shell variables" "" "" "" PAGE END
.IX  "shell variables, in Bourne shell"  ""  ""  ""  PAGE END
.IX  variables "in Bourne shell"  ""  ""  ""  PAGE END
.SS Blank Interpretation
.LP
After parameter and command substitution,
the results of substitution are scanned for internal field separator
characters (those found in
.BR \s-1IFS\s0 )
and split into distinct arguments where such characters are found.
Explicit null arguments (\fB""\fP or \fB''\fP) are retained.
Implicit null arguments
(those resulting from
.I parameters
that have no values) are removed.
.SS Input/Output
.LP
A command's input and output
may be redirected using a special notation interpreted by the shell.
The following may appear anywhere in a
.I simple command
or may precede or follow a
.I command
and are
.I not
passed on to the invoked command.
Note: parameter and command substitution occurs before
.I word
or
.I digit
is used.
.LP
.TP 14
.BI < word
Use file
.I word
as standard input (file descriptor 0).
.TP
.BI > 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
.BI >\|> word
Use file
.I word
as standard output.
If the file exists output is appended to it (by first seeking to the
.SM EOF\s0);
otherwise, the file is created.
.TP
\fB<\|<\fP\*(OK\fB\-\fP\*(CK\fIword\fP
After parameter and command substitution is done on
.IR word ,
the shell input is read up to the first line that literally matches the resulting
.IR word ,
or to an
.SM EOF\s0.
If, however,
.RB ` \- '
is appended to:
.RS
.RS
.TP 4
\(bu
leading
.SM TAB
characters are stripped from
.I word
before the shell input is read
(but after parameter and command substitution is done on
.IR word ),
.TP
\(bu
leading
.SM TAB
characters are stripped from
the shell input as it is read and before each line is compared with
.IR word ,
and
.TP
\(bu
shell input is read up to the first line that literally matches the resulting
.IR word ,
or to an
.SM EOF\s0.
.RE
.RE
.IP
If any character of
.I word
is quoted,
(see 
.BR Quoting ,
later),
no additional processing is done to the shell input.
If no characters of
.I word
are quoted:
.RS
.RS
.TP 4
\(bu
parameter and command substitution occurs,
.TP
\(bu
(escaped)
.BR \e \s-1NEWLINE\s0
is ignored, and
.TP
\(bu
.RB ` \e '
must be used to quote the characters
.RB ` \e ',
.RB ` $ ',
and
.RB ` ` '.
.RE
.RE
.LP
The resulting document becomes
the standard input.
.TP
.BI <& digit
Use the file associated with file descriptor
.I digit
as standard input.
Similarly for the standard output using 
.BI >& digit\fR.
.TP
.B <&\-
The standard input is closed.
Similarly for the standard output using
.RB ` >&\- '.
.LP
If any of the above is preceded by a digit, the
file descriptor which will be associated with the file
is that specified
by the digit (instead of the default 0 or 1).
For example:
.RS
.LP
\&.\|.\|. \|2>&1
.RE
.LP
associates file descriptor 2 with the file currently associated with 
file descriptor 1.
.LP
The order in which redirections are specified is significant.
The shell evaluates redirections left-to-right.
For example:
.RS
.LP
\&.\|.\|. \|1>\fIxxx\fP 2>&1
.RE
.LP
first associates file descriptor 1 with file 
.IR xxx .
It associates file descriptor 2 with the file associated with file
descriptor 1 (namely, file
.IR xxx ).
If the order of redirections were reversed, file descriptor 2 would be associated 
with the terminal (assuming file descriptor 1 had been) and file descriptor 
1 would be associated with file 
.IR xxx .
.LP
Using the terminology introduced on the first page, under
.BR Commands ,
if a
.I command
is composed of several
.IR "simple commands" ,
redirection will be evaluated for the entire
.I command
before it is evaluated for each
.IR "simple command" .
That is, the shell evaluates redirection
for the entire
.IR list ,
then each
.I pipeline
within the
.IR list ,
then each
.I command
within each
.IR pipeline ,
then each
.I list
within each
.IR command .
.LP
If a command is followed by
.B &
the default standard input
for the command
is the empty file
.BR /dev/null .
Otherwise, the environment for the execution of a command contains the
file descriptors of the invoking shell as modified by
input/output specifications.
.SS Filename Generation
.LP
Before a command is executed,
each command
.I word
is scanned for the characters
.RB ` \(** ',
.RB ` ? ',
and
.RB ` \*(OK '.
If one of these characters appears
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,
the word is left unchanged.
The character
.RB ` . '
at the start of a filename
or immediately following a
.RB ` / ',
as well as the character
.RB ` / '
itself,
must be matched explicitly.
.LP
.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
.RB ` \- '
matches any
character lexically between the pair, inclusive.
If the first character following the opening 
.B \*(OK
is a
.B !
any character not enclosed is matched.
.PD
.RE
.SS Quoting
The following characters have a special meaning to the shell
and cause termination of a word unless quoted:
.RS
.LP
.B ";  &  (  )  |  ^  <  >  "
.SM NEWLINE\S*\ \ 
.SM SPACE\S*\ \ 
.SM TAB\S*\ \ 
.RE
.LP
A character may be
.I quoted
(made to stand for itself)
by preceding
it with a
backslash (\fB\e\fP) or inserting it between a pair of quote marks
(\fB''\fP or \fB""\fP).
During processing,
the shell may quote certain characters to prevent them from taking on
a special meaning.
Backslashes used to quote a single character are removed from the word before
the command is executed.
The pair
.BR \e \s-1NEWLINE\s0
is removed from a word before command and parameter substitution.
.LP
All characters enclosed between a pair of single quote marks (\fB''\fP),
except a single quote,
are quoted by the shell.
Backslash has no special meaning inside a pair of single quotes.
A single quote may be quoted inside a pair of double quote marks
(for example, \fB"'"\fP).
.LP
Inside a pair of double quote marks
(\fB""\fP),
parameter and command substitution occurs and
the shell quotes the results to avoid blank interpretation and file name
generation.
If
.B $\(**
is within a pair of double quotes,
the positional parameters are substituted and quoted,
separated by quoted spaces
(\fB"$1 \|$2\fP \|.\|.\|.\fB"\fP);
however,
if
.B $@
is within a pair of double quotes,
the positional parameters are substituted and quoted,
separated by unquoted spaces
.B
\fR(\fB"$1"\|
.B
"$2"\|
\&.\|.\|.\| ).
.B \e
quotes the characters
.BR \e ,
.BR ` ,
\fB"\fP,
and
.BR $ .
The pair 
.BR \e \s-1NEWLINE\s0
is removed before parameter and command substitution.
If a backslash precedes characters other than
.BR \e ,
.BR ` ,
\fB"\fP,
.BR $ ,
and
.SM NEWLINE\*S,
then the backslash itself is quoted by the shell.
.SS Prompting
When used interactively,
the shell prompts with the value of
.B \s-1PS\s01
before reading a command.
If at any time a 
.SM RETURN
is typed and further input is needed
to complete a command, the secondary prompt
(the value of
.BR \s-1PS\s02)
is issued.
.SS Environment
The
.I environment
(see
.BR environ (5V))
is a list of name-value pairs that is passed to
an executed program in the same way as a normal argument list.
The shell interacts with the environment in several ways.
On invocation, the shell scans the environment
and creates a parameter for each name found,
giving it the corresponding value.
If the user modifies the value of any of these parameters
or creates new parameters,
none of these affects the environment
unless the
.B export
command is used to bind the shell's
parameter to the environment (see also 
.RB ` "set \-a" ').
A parameter may be removed from the environment
with the 
.B unset
command.
The environment seen by any executed command is thus composed
of any unmodified name-value pairs originally inherited by the shell,
minus any pairs removed by
.BR unset ,
plus any modifications or additions,
all of which must be noted in
.B export
commands.
.LP
The environment for any
.I simple command
may be augmented by prefixing it with one or more assignments to
parameters.
Thus:
.IP
.BI \s-1TERM\s0=450 \|cmd
.LP
and
.IP
.BI "(export \|\s-1TERM\s0; \|\s-1TERM\s0=450;" \|cmd )
.LP
are equivalent (as far as the execution of
.I cmd
is concerned).
.LP
If the
.B \-k
option is set,
.I all
keyword arguments are placed in the environment,
even if they occur after the command name.
The following
first prints
.B "a=b c"
and
.BR c :
.LP
.RS
.nf
.ft B
echo \|a=b \|c
set \|\-k
echo \|a=b \|c
.ft R
.fi
.RE
.SS Signals
The
.SM INTERRUPT
and
.SM QUIT
signals for an invoked
command are ignored if the command is followed by
.BR & ;
otherwise signals have the values
inherited by the shell from its parent
(but see also
the
.B trap
command below).
.SM INTERRUPT
is handled asynchronously.
.SS Execution
Each time a command is executed, the above substitutions are
carried out.
If the command name matches one of the 
.B "Special Commands"
listed below, it is executed in the shell process.
If the command name does not match a
.BR "Special Command" ,
but matches the name of a defined function, the function is executed 
in the shell process
(note how this differs from the execution of shell procedures).
The positional parameters
.BR $1 ,
.BR $2 ,
\&.\|.\|.\|.
are set to the arguments of the function.
If the command name matches neither a
.B "Special Command"
nor the name of a defined function,
a new process is created and an attempt is made to
execute the command using
.BR execve (2).
.LP
The shell parameter
.SB PATH
defines the search path for
the directory containing the command.
Alternative directory names are separated by
a colon
.RB ( : ).
The default path is
.B :/usr/ucb:/bin:/usr/bin
(specifying
.BR /usr/ucb ,
.BR /bin ,
and
.BR /usr/bin ,
in addition to the current directory).
Directories are searched in order.  The
current directory is specified by a null path name,
which can appear immediately after the equal sign
.RB ( \s-1PATH\s0=: \|.\|.\|.\|),
between the colon delimiters 
.RB (\|.\|.\|. \|:\|:\| \|.\|.\|.\|)
anywhere else in the path list,
or at the end of the path list
.RB (\|.\|.\|. \|:).
If the command name contains a
.B /
the search path is not used.
Otherwise, each directory in the path is searched for an executable 
file.  If the file has execute permission but is not an
binary executable (see
.BR a.out (5)
for details) or an executable script (with a first line beginning
with
.BR #! )
it is assumed to be a file containing shell commands,
and a subshell is spawned to read it.
A parenthesized command is also executed in
a subshell.
.LP
The location in the search path where a command was found is remembered by the
shell
(to help avoid unnecessary
.BR exec s
later).
If the command was found in a relative directory, its location must be 
re-determined whenever the current directory changes.
The shell forgets all remembered locations whenever the
.SB PATH
variable is changed or the
.RB ` "hash \-r" '
command is executed (see below).
.SS Special Commands
.IX  "Bourne shell commands"  "" "" "" PAGE MAJOR
.IX  "commands" "Bourne shell"  ""  ""  ""  PAGE START
.LP
Input/output redirection is now permitted for these commands.
File descriptor 1 is the default output location.
.LP
.TP 15
.B :
.IX  ": command" "" "\fL:\fR null command"
.IX  "Bourne shell commands"  ": command"  ""  "\fL:\fP command"
No effect; the command does nothing.  A zero exit code is returned.
.TP
.BI ".\| " filename
.IX  ". command" "" "\fL.\fP (dot) command"
.IX  "Bourne shell commands"  ". command"  ""  "\fL.\fP command"
Read and execute commands from
.I filename
and return.  The search path specified by
.SB PATH
is used to find the directory containing
.IR filename .
.TP
.BR break " \*(OK \fIn\fP \*(CK"
Exit from the enclosing
.B for
or
.IX  "break command"  ""  "\fLbreak\fP command"
.IX  "Bourne shell commands"  "break command"  ""  "\fLbreak\fP command"
.B while
loop, if any.  If
.I n
is specified break
.I n
levels.
.br
.ne 5
.TP
.BR continue " \*(OK \fIn\fP \*(CK"
.IX  "continue command"  ""  "\fLcontinue\fP command"
.IX  "Bourne shell commands"  "continue command"  ""  "\fLcontinue\fP command"
Resume the next iteration of the enclosing
.B for
or
.B while
loop.
If
.I n
is specified resume at the
.IR n 'th
enclosing loop.
.TP
.BR cd "[ \fIarg\fP ]"
.IX   "cd command" "" "\fLcd\fP command"
.IX  "Bourne shell commands"  "cd command"  ""  "\fLcd\fP command"
Change the current directory to
.IR argument .
The shell
parameter
.SB HOME
is the default
.IR argument .
The shell parameter
.SB CDPATH
defines the search path for
the directory containing 
.IR argument .
Alternative directory names are separated by
a colon
.RB ( : ).
The default path is
.SM NULL
(specifying the current directory).
Note: the current directory is specified by a null path name,
which can appear immediately after the equal sign
or between the colon delimiters anywhere else in the path list.
If 
.I argument
begins with a
.B /
the search path is not used.
Otherwise, each directory in the path is
searched for
.IR argument .
.\"The
.\".B cd
.\"command may not be executed by
.\".BR rsh .
.br
.ne 2.1v
.TP
.BR echo " \*(OK \fIargument\fP .\|.\|. \*(CK"
.IX  "echo command"  ""  "\fLecho\fP command"
.IX  "Bourne shell commands"  "echo command"  ""  "\fLecho\fP command"
Echo arguments. See
.BR echo (1V) 
for usage and description.
.TP
.BR eval " \*(OK \fIargument\fP .\|.\|. \*(CK"
.IX  "eval command" "" "\fLeval\fP command"
.IX  "Bourne shell commands"  "eval command"  ""  "\fLeval\fP command"
The arguments are read as input to the shell
and the resulting command(s) executed.
.TP
.BR exec " \*(OK \fIargument\fP .\|.\|. \*(CK"
.IX  "exec command" "" "\fLexec\fP command"
.IX  "Bourne shell commands"  "exec command"  ""  "\fLexec\fP command"
The command specified by
the arguments is executed in place of this shell
without creating a new process.
Input/output arguments may appear and, if no other
arguments are given, modify the shell's
input/output.
.TP
.BR exit " \*(OK \fIn\fP \*(CK"
.IX  "exit command"  ""  "\fLexit\fP command"
.IX  "Bourne shell commands"  "exit command"  ""  "\fLexit\fP command"
Exit a shell with the exit status specified by
.IR n .
If
.I n
is omitted the exit status is that of the last command executed
(an
.SM EOF
will also cause the shell to exit.)
.TP
.BR export " \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "export command"  ""  "\fLexport\fP command"
.IX  "Bourne shell commands"  "export command"  ""  "\fLexport\fP command"
The given
.IR name s
are marked
for automatic export to the
.I environment
of subsequently-executed commands.
If no arguments are given,
variable names that have been marked for export during the current shell's execution
are listed.
(Variable names exported from a parent shell are listed only if they
have been exported again during the current shell's execution.)
Function names are
.I not
exported.
.TP
.B getopts
Use in shell scripts to
parse positional parameters and check for legal options.
See
.BR getopts (1)
for usage and description.
.TP
.BR hash " \*(OK " \-r " \*(CK \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "hash command"  ""  "\fLhash\fP command"
.IX  "Bourne shell commands"  "hash command"  ""  "\fLhash\fP command"
For each 
.IR name ,
the location in the search path of the command specified by 
.I name
is determined and remembered by the shell.
The 
.B \-r
option causes the shell to forget all remembered locations.
If no arguments are given, information about remembered commands is
presented.
.I hits
is the number of times a command has been invoked by the shell process.
.I cost
is a measure of the work required to locate a
command in the search path.
If a command is found in a \(lqrelative\(rq directory in the search path,
after changing to that directory,
the stored location
of that command is recalculated.
Commands for which this will be done are indicated by an asterisk (\fB\(**\fR)
adjacent to the
.I hits
information.
.I cost
will be incremented when the recalculation is done.
.TP
.BR login " \*(OK \fIargument\fP .\|.\|. \*(CK"
.IX  "login command"  ""  "\fLlogin\fP command"
.IX  "Bourne shell commands"  "login command"  ""  "\fLlogin\fP command"
Equivalent to
.RB ` "exec login \fIargument\fP" .\|.\|.\|.'
See
.BR login (1)
for usage and description.
.TP
.BR newgrp " \*(OK \fIargument\fP .\|.\|. \*(CK"
.IX  "newgrp command"  ""  "\fLnewgrp\fP command"
.IX  "Bourne shell commands"  "newgrp command"  ""  "\fLnewgrp\fP command"
Equivalent to
.RB ` "exec newgrp \fIargument\fP" .\|.\|.\|.'
See
.BR newgrp (1)
for usage and description.
.TP
.B pwd
.IX  "pwd command"  ""  "\fLpwd\fP command"
.IX  "Bourne shell commands"  "pwd command"  ""  "\fLpwd\fP command"
Print the current working directory.
See
.BR pwd (1)
for usage and description.
.TP
.BR read " \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "read command"  ""  "\fLread\fP command"
.IX  "Bourne shell commands"  "read command"  ""  "\fLread\fP command"
One line is read from the standard input and,
using the internal field separator,
.SB IFS
(normally a
.SM SPACE
or
.SM TAB
characater),
to delimit word boundaries, the first
word is assigned to the first
.IR name ,
the second word
to the second
.IR name ,
etc., with leftover words assigned to the last
.IR name .
Lines can be continued using
.BR \e \s-1NEWLINE\s0.
Characters other than
.SM NEWLINE
can be quoted by preceding them with a backslash.
These backslashes are removed before words are assigned to
.IR names ,
and no interpretation is done on the character that follows the backslash.
The return code is
.B 0
unless an
.SM EOF
is encountered.
.br
.ne 5
.TP
.BR readonly " \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "readonly command"  ""  "\fLreadonly\fP command"
.IX  "Bourne shell commands"  "readonly command"  ""  "\fLreadonly\fP command"
The given
.IR name s
are marked
.I readonly
and the values of the these
.IR name s
may not be changed by subsequent assignment.
If no arguments are given, a list of all
.I readonly
names is printed.
.br
.ne 4
.TP
.BR return " \*(OK \fIn\fP \*(CK"
.IX  "return command"  ""  "\fLreturn\fP command"
.IX  "Bourne shell commands"  "return command"  ""  "\fLreturn\fP command"
Exit a function with the return value specified by
.IR n .
If
.I n 
is omitted, the return status is that of the last command executed.
.TP
.BR set " \*(OK " \-aefhkntuvx\- " \*(OK \fIargument\fP .\|.\|. \*(CK \*(CK"
.IX  "set command"  ""  "\fLset\fP command"  ""
.IX  "Bourne shell commands"  "set command"  ""  "\fLset\fP command"
.RS
.TP
.B \-a
Mark variables which are modified or created for export.
.TP
.B \-e
Exit immediately if a command
exits with a nonzero exit status.
.TP
.B \-f
Disable filename generation.
.TP
.B \-h
Locate and remember function commands as functions are defined 
(function commands are normally located when the function is executed).
.TP
.B \-k
All keyword arguments are placed in the environment for a command,
not just those that precede the command name.
.TP
.B \-n
Read commands but do not execute them.
.TP
.B \-t
Exit after reading and executing one command.
.TP
.B \-u
Treat unset variables as an error when substituting.
.TP
.B \-v
Print shell input lines as they are read.
.TP
.B \-x
Print commands and their arguments as they are executed.
.TP
.B \(em
Do not change any of the options; useful in setting
.B $1
to
.RB ` \- '.
.LP
Using
.RB ` \+ '
rather than
.RB ` \- '
turns off these options.
These options can also be used upon invocation of the shell.
The current set of options may be found in
.RB ` $\- '.
The remaining arguments are positional
parameters and are assigned, in order, to
.BR $1 ,
.BR $2 ,
and so on.  If no arguments are given, the values
of all names are printed.
.RE
.
.TP
.BR shift " \*(OK \fIn\fP \*(CK"
.IX  "shift command"  ""  "\fLshift\fP command"
.IX  "Bourne shell commands"  "shift command"  ""  "\fLshift\fP command"
The positional parameters are shifted to the left, from position
.IR n +1
to position 1, and so on.  Previous values for 
.B $1
through
.BI $ n
are discarded.
If
.I n
is not given, it is assumed to be 1.
.TP
.B test
.IX  "test command"  ""  "\fLtest\fP command"
.IX  "Bourne shell commands"  "test command"  ""  "\fLtest\fP command"
Evaluate conditional expressions. See
.BR test (1V)
for usage and description.
.TP
.B times
.IX  "times command"  ""  "\fLtimes\fP command"
.IX  "Bourne shell commands"  "times command"  ""  "\fLtimes\fP command"
Print the accumulated user and system times for processes
run from the shell.
.TP
.BR trap " \*(OK \fIarg\fP \*(CK \*(OK \fIn\fP \*(CK .\|.\|."
.IX  "trap command"  ""  "\fLtrap\fP command"
.IX  "Bourne shell commands"  "trap command"  ""  "\fLtrap\fP command"
The command
.I arg
is to be read and executed when the shell
receives signal(s)
.IR n .
(Note:
.I arg
is scanned once when
the trap is set and once when the trap
is taken.)
Trap commands are executed in order of signal number.
Any attempt to set a trap on a signal that
was ignored on entry to the current shell
is ineffective.
If
.I arg
is absent all trap(s)
.I n
are reset to their original values.
If
.I arg
is the null
string this signal is ignored by the shell and by the commands
it invokes.
If
.I n
is 0 the command
.I arg
is executed
on exit from the shell.
The
.B trap
command
with no arguments prints a list
of commands associated with each signal number.
.TP
.BR type " \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "type command"  ""  "\fLtype\fP command"
.IX  "Bourne shell commands"  "type command"  ""  "\fLtype\fP command"
For each
.IR name ,
indicate how it would be interpreted if used as a command name.
.TP
.BR umask " \*(OK \fIooo\fP \*(CK"	
.IX  "umask command"  ""  "\fLumask\fP command"
.IX  "Bourne shell commands"  "umask command"  ""  "\fLumask\fP command"
The user file-creation mode mask is set to
.I ooo
(see
.BR csh (1)).
The three octal digits refer to read/write/execute permissions for
.IR owner ,
.IR group ,
and
.IR others ,
respectively.
The value of each specified digit is subtracted from the corresponding
\(lqdigit\(rq specified by the system for the creation of a file.  For example,
.B "umask 022"
removes
.I group
and
.I others
write permission (files normally created with mode
.B 777
become mode
.BR 755 ;
files created with mode
.B 666
become mode
.BR 644 ).
The current value of the mask is printed if
.I ooo
is omitted.
.TP
.BR unset " \*(OK \fIname\fP .\|.\|. \*(CK"
.IX  "unset command"  ""  "\fLunset\fP command"
.IX  "Bourne shell commands"  "unset command"  ""  "\fLunset\fP command"
For each 
.IR name , 
remove the corresponding variable or function.
The variables 
.BR \s-1PATH\s0 ,
.BR \s-1PS\s01,
.BR \s-1PS\s02,
.BR \s-1MAILCHECK\s0
and
.BR \s-1IFS\s0
cannot be unset.
.TP
.BR wait " \*(OK \fIn\fP \*(CK"
.IX  "wait command"  ""  "\fLwait\fP command"
.IX  "Bourne shell commands"  "wait command"  ""  "\fLwait\fP command"
Wait for the background process whose process
.SM ID
is
.I n
and report its termination status.
If
.I n
is omitted,
all the shell's currently active background processes are waited for
and the return code will be zero.
.PD
.LP
.IX  "commands" "Bourne shell"  ""  ""  ""  PAGE END
.LP
.SH EXIT STATUS
Errors detected by the shell, such as syntax errors,
return a nonzero exit status.
If the shell is being used noninteractively
execution of the shell file is abandoned.
Otherwise, the shell returns the exit status of
the last command executed (see also the
.B exit
command above).
.SH FILES
.PD 0
.TP 20
.B /etc/profile
.TP
.B \s-1$HOME\s0/\fB.\fPprofile
.TP
.B /tmp/sh\(**
.TP
.B /dev/null
.PD
.SH SEE ALSO
.BR csh (1),
.BR cd (1),
.BR echo (1V),
.BR env (1),
.BR getopts (1),
.BR login (1),
.BR newgrp (1),
.BR pwd (1),
.BR test (1V),
.BR wait (1),
.BR dup (2),
.BR fork (2),
.BR execve (2),
.BR pipe (2),
.BR sigvec (2),
.BR wait (2),
.BR execl (3),
.BR a.out (5),
.BR environ (5V)
.LP
.TX DMBG
.SH WARNINGS
.LP
Words used for filenames in input/output redirection
are not interpreted for filename generation
(see
.BR "File Name Generation" ,
above).
For example,
.RB ` "cat file1 > a\(**" '
will create a file named
.RB ` a\(** '.
.LP
Because commands in pipelines are run as separate processes,
variables set in a pipeline have no effect on the parent shell.
.LP
If you get the error message
.RB ` "cannot fork, too many processes" ',
try using the
.BR wait (1)
command to clean up your background processes.
If this does not help,
the system process table is probably full or you have too many active
foreground processes.
There is a limit to the number of process
.SM ID\*Ss
associated with your login,
and to the number the system can keep track of.
.SH BUGS
.LP
If a command is executed, and a command with the same name is installed
in a directory in the search path before the directory where the
original command was found, the shell will continue to
.B exec
the original command.  Use the
.B hash
command to correct this situation.
.LP
If you move the current directory or one above it,
.B pwd
may not give the correct response.  Use the
.B cd
command with a full path name to correct this situation.
.LP
Not all the processes of a 3- or more-stage
pipeline are children of the shell, and
thus cannot be waited for.
.LP
For
.B wait
.IR n ,
if
.I n
is not an active process
.SM ID\s0,
all the shell's currently active background processes are waited for
and the return code will be zero.
.IX  "sh command"  ""  "\fLsh\fP command, Bourne shell"  ""  PAGE END
.IX  "Bourne shell"  ""  "Bourne shell, \fLsh\fP"  ""  PAGE END
r each 
.IR name ,
the location in the search path of the command specified by 
.I name
is determined and remembered by the shell.
The 
.B \-r
option causes the shell to forget all remembered locations.
If no arguments are given, information about remembered commands is
presented.
.I hits
is the number of times a command has been invoked by the shell process.
.I cost
is a measure of the work required to locate a
command in the search path.
If a command is found in a \(lq./share/man/man1/shelltool.1                                                                           755       0      12        24466  4424740722  11031                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shelltool.1 1.29 89/03/26 SMI;
.TH SHELLTOOL 1 "22 March 1989"
.SH NAME
shelltool \- run a shell (or other program) in a SunView terminal window
.SH SYNOPSIS
.B shelltool
[
.B \-C
]
[
.B \-B
.I boldstyle
]
[
.B \-I
.I command
]
[
.I generic-tool-arguments
]
[
.I program 
[
.I arguments
] ]
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX shelltool "" "\fLshelltool\fR \(em shell terminal window"
.IX "shell window" "\fLshelltool\fR"
.LP
.B shelltool
is a standard SunView facility for shells or other programs
that may use a standard tty-based interface.
.LP
When invoked, 
.B shelltool
runs a program, (usually a shell) in an interactive terminal emulator
based on a tty subwindow.
Keyboard input is passed to that program.
If the program is a shell, it
accepts commands and runs programs in the usual way.
.LP
.BR cmdtool (1),
which provides moused-based editing, logging, and scrolling
capabilities, also supports shell-level programs.
See 
.TX SVBG
for more information.
.LP
To run graphics programs, use 
.BR gfxtool (1).
.SH OPTIONS
.TP 15
.B \-C
Redirect system console output to this 
.BR shelltool .
.TP
.BI \-B " boldstyle"
Set the style for displaying bold text to
.IR boldstyle .
.I boldstyle
can be a string specifying one of the choices for the
.B /Tty/Bold_style
default, see
.BR "Defaults Options" ,
below, or it may be a numerical value for one of those choices,
from 0 to 8, corresponding to the placement of the choice in the list.
.TP
.BI \-I " command"
Pass
.I command
to the shell. 
.SM SPACE
characters within the command must be escaped.
.TP
.I generic-tool-arguments
.B shelltool
accepts the generic tool arguments
listed in
.BR sunview (1).
.LP
If a
.I program
argument is present,
.B shelltool
runs it.
If no
.I program
is given,
.B shelltool
runs the program indicated by the
.SB SHELL
environment variable, or
.B /usr/bin/sh
by default.
.SH USAGE
.SS Defaults Options
These options are available through
.BR defaultsedit (1).
.TP
.B /Tty/Bold_style
Select a style for emphasized text:
.RS
.TP 20
.B None
Disable emphasis.
.PD 0
.TP
.B Offset_X
Thicken characters horizontally.
.TP
.B Offset_Y
Thicken characters vertically.
.TP
.B Offset_X_and_Y
Thicken characters both horizontally and vertically.
.TP
.B Offset_\s-1XY\s0
Thicken characters diagonally.
.TP
.B Offset_X_and_\s-1XY\s0
Thicken character both horizontally and diagonally.
.TP
.B Offset_Y_and_\s-1XY\s0
Thicken characters both vertically and diagonally.
.TP
.B Offset_X_and_Y_and_\s-1XY\s0
Thicken characters horizontally, vertically and diagonally.
.TP
.B Invert
Display emphasis as inverse video (the standard default).
.PD
.RE
.TP
.B /Tty/Inverse_mode
Select a style for inverse video display:
.RS
.TP 20
.B Enable
Enable inverse mode for inverted text.
.PD 0
.TP
.B Disable
Disable inverse mode for inverted text.
.TP
.B Same_as_bold
Display inverted text as bold text.
.PD
.RE
.br
.ne 5
.TP
.B /Tty/Underline_mode
Select a style for underlined text:
.RS
.TP  20
.B Enable
Enable underline mode for underlined text.
.PD 0
.TP
.B Disable
Disable underline mode for underlined text.
.TP
.B Same_as_bold
Display underlined text as bold text.
.PD
.RE
.TP
.B /Tty/Retained
When set to \(lqYes\(rq, hidden tty subwindow areas are retained in memory.
This enhances the speed of repainting the screen at the expense
of memory area.  \(lqNo\(rq is the standard default; it specifies that tty
subwindows are not retained.
.SS The Terminal Emulator
.LP
The tty subwindow is a terminal emulator.
Whenever a tty subwindow is created, the startup file
.B ~/.ttyswrc
is read for initialization parameters that are specific to the
tty subwindow.
.SS The .ttyswrc File
A sample
.B \&.ttyswrc
file can be found in
.BR /usr/lib/ttyswrc .
The command format for this file is:
.LP
.RS
.PD 0
.TP 20
.B #
Comment.
.TP
.BI set " variable"
Turn on the specified variable.
.TP
.BI mapi " key text"
When
.I key
is typed pretend
.I text
was input.
.TP
.BI mapo " key text"
When
.I key
is typed pretend
.I text
was output.
.PD
.RE
.LP		       
The only currently defined variable is 
.BR pagemode .
.I key
is one of L1-L15, F1-F15, T1-T15, R1-R15,
.SM LEFT\s0,
or
.SM RIGHT 
(see note below).
.I text
may contain escapes such as \eE, \en, ^X, etc. 
(\s-1ESC\s0,
.SM RETURN\s0,
and
.SM CTRL-X\s0,
respectively).  
See 
.BR termcap (5) 
for the format of the string escapes that are recognized.
Note: 
.B mapi
and
.B mapo
may be replaced by another keymapping mechanism in the future.
.LP
When using the default kernel keyboard tables, the keys
L1,
.SM LEFT\s0,
.SM RIGHT\s0,
.SM BREAK\s0,
R8, R10, R12, and R14
cannot be mapped in this way; they send special values
to the tty subwindow.
Also, when using the default kernel keyboard tables,
L1-L10 are now used by SunView.
See 
.BR input_from_defaults (1)
and
.BR kbd (4S) 
for more information on how to change the behavior of the keyboard.
.LP		
It is possible to have terminal-based programs drive
the tool in which its tty subwindow resides by sending
special escape sequences.
These escape sequences may also
be sent by typing a key appropriately mapped
using the
.B mapo
function described above.
The following functions pertain to the tool in which the tty
subwindow resides, not the tty subwindow itself. 
.LP
.RS
.PD 0
.TP 20
.B \eE[1t
\- open
.TP
.B \eE[2t
\- close (become iconic)
.TP
.B \eE[3t
\- move, with interactive feedback
.TP
.B \eE[3;\s-1TOP\s0;\s-1LEFT\s0t
\- move, to
.SB TOP LEFT
(pixel coordinates)
.TP
.B \eE[4t
\- stretch, with interactive feedback
.TP
.B \eE[4;\s-1HT\s0;\s-1WIDTH\s0t
\- stretch, to
.SB HT WIDTH
size (in pixels)
.TP
.B \eE[5t
\- front
.TP
.B \eE[6t
\- back
.TP
.B \eE[7t
\- refresh
.TP
.B \eE[8;\s-1ROWS\s0;\s-1COLS\s0t
\- stretch, to
.SB ROWS COLS
size (in characters)
.TP
.B \eE[11t
\- report if open or iconic by sending
.B \eE[1t\fP or \fB\eE[2t
.TP
.B \eE[13t
\- report position by sending
.B \eE[3;\s-1TOP\s0;\s-1LEFT\s0t
.TP
.B \eE[14t
\- report size in pixels by sending
.B \eE[4;\s-1HT\s0;\s-1WIDTH\s0t
.TP
.B \eE[18t
\- report size in characters by sending
.B \eE[8;\s-1ROWS\s0;\s-1COLS\s0t
.TP
.B \eE[20t
\- report icon label by sending
.B \eE]Llabel\eE\e
.TP
.B \eE[21t
\- report tool header by sending
.B \eE]llabel\eE\e
.TP
.B \eE]ltext\eE\e
\- set tool header to
.RB text 
.TP
.B \eE]Ifile\eE\e
\- set icon to the icon contained in
.RB file ;
.RB file
must be in
.I iconedit
output format
.TP
.B \eE]Llabel\eE\e
\- set icon label to
.RB label
.TP
.B \eE[>\s-1OPT\s0;\|.\|.\|.h
\- turn
SB OPT
on
.RB ( \s-1OPT\s0
= 1 => pagemode), for example,
.B \eE[>1;3;4h
.TP
.B \eE[>\s-1OPT\s0;\|.\|.\|.k
\- report
.BR \s-1OPT\s0 ;
sends
.B \eE[>\s-1OPT\s0l
or
.B \eE[>\s-1OPT\s0h
for each
.SB OPT
.TP
.B \eE[>\s-1OPT\s0;\|.\|.\|.l
\- turn
.SB OPT
off
.RB ( \s-1OPT\s0
= 1 => pagemode), for example,
.B \eE[>1;3;4l
.PD
.RE
.LP
See
.SB EXAMPLES
for an example of using this facility.
.SS Selections
.LP
Terminal subwindows support a selection facility that allows you
to capture a block of text, move it between windows, and
replicate it. 
You can make a selection by clicking the left
button on the mouse at the top-left character of the block to
capture, and then clicking the middle
button on the bottom-right character.
The selected text is highlighted.
Multiple clicks of the
.SM LEFT
mouse button capture:
.RS
.TP 10
.PD 0
1 click
a character
.TP
2 clicks
a word
.TP
3 clicks
a line
.TP
4 clicks
a screenful
.PD
.RE
.LP
You can also make a selection by moving the mouse while holding
the select button, and then releasing it.
The selection is deselected if you type any key or new output
is written to the window that holds the selection.
.SS Menu
To manipulate your selection, press the menu button over the terminal
subwindow.  
A
.I ttysw
menu appears with the menu items discussed
below:
.\"
.TP 20
.B Copy, then Paste
When there is a selection in any window,
the entire item is active.  Selecting it copies the selection both to
the clipboard and to the insertion point (cursor).
It copies selections in tty, text, command, and panel subwindows, and
It is intended to bridge the gap between
.B Stuff
and the selection facility (see
.TX SVBG .
When there is no selection but there is text
on the clipboard, only
.B Paste
is active.  In this case, the contents of the clipboard are
copied to the insertion point (cursor).
When there is no selection and nothing on the clipboard,
this item is inactive.
.\"
.TP
.B Enable Page Mode
.PD 0
.TP
.B Disable Page Mode
.PD
Toggle page mode on and off.
Page mode prevents output from scrolling off the screen.  It is an
alternative to
.BR more (1).
When page mode is on, the cursor changes to resemble a tiny stop-sign
when ever a screenful of output is displayed.  To restart output, type
any key, or select the 
.B Continue
menu item that temporarily replaces 
.BR "Enable Page Mode" .
.TP
.B Stuff
is provided for backward compatibility.  It 
copies the selection to the insertion point (cursor)
as though they had been typed from the keyboard.
.B Stuff
can only handle selections made in a tty subwindow.
.TP
.B Flush Input
Occasionally the input buffer fills up and the terminal emulator
appears to freeze.  If this happens, the 
.RB ` "Flush Input" '
appears in the menu; choosing it clears the buffer and
allows you to continue.
.SH EXAMPLES
.LP
The following aliases can be put into your
.B ~/.cshrc
file:
.RS
.sp .5
.nf
.ft B
# dynamically set the name stripe of the tool:
alias header 'echo \-n "\eE]l\e!*\eE\e"'
# dynamically set the label on the icon:
alias iheader 'echo \-n "\eE]L\e!*\eE\e"'
# dynamically set the image on the icon:
alias icon 'echo \-n "\eE]I\e!*\eE\e"'
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B ~/.ttyswrc
.TP
.B /usr/lib/ttyswrc
.TP
.B /usr/bin/shelltool
.TP
.B /usr/bin/sunview
.TP
.B /usr/demo/*
.PD
.SH "SEE ALSO"
.LP
.BR cmdtool (1),
.BR defaultsedit (1),
.BR gfxtool (1),
.BR input_from_defaults (1),
.BR more (1),
.BR rlogin (1C),
.BR sunview (1),
.BR kbd (4S),
.BR termcap (5)
.LP
.TX SVBG
.SH BUGS
If more than 256 characters are input to a terminal emulator subwindow
without an intervening
.SM NEWLINE\s0,
the terminal emulator may hang.
If this occurs, an alert will come up with a message saying
.RB ` "Too many keystrokes in input buffer" '.
Choosing the
.B "Flush Input Buffer"
menu item may correct the problem.
This is a bug for a terminal emulator subwindow running on top of or
.BR rlogin (1C)
to a machine with pre-4.0 release kernel.
n a tty subwindow.
Keyboard input is passed to that program.
If the program is a shell, it
accepts commands and runs programs in the usual way.
.LP
.BR cmdtool (1),
which provides moused-based editing, ./share/man/man1/shift.1                                                                               755       0      12           73  4424740722  10045                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)shift.1 1.8 89/03/26 SMI; 
size.1 .      sleep.1       snap.1 e      soelim.1 1        sort.1v       	sortbib.1 v       source.1    (    sparc.1   8    spell.1   L    	spellin.1 1   `    
spellout.1 L  t    	spline.1g  `      split.1       stop.1 i      	strings.1         strip.1       stty.1v      $ stty_from_defaults.1 $        su.1 s.1      sum.1v 1       sun.1 m../share/man/man1/shift_lines.1                                                                         755       0      12          104  4424740722  11252                                                                                                                                                                                                                                                                                                                                                                      .so man1/textedit_filters.1
.\" @(#)shift_lines.1 1.4 89/03/26 SMI;
      snap.1        soelim.1        sort.1v       	sortbib.1       source.1    (    sparc.1   8    spell.1   L    	spellin.1 L  `    
spellout.1 `  t    	spline.1g t      split.1       stop.1        	strings.1       strip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 $       sum.1v 1       sun.1  1  4    
suntools./share/man/man1/size.1                                                                                755       0      12         4063  4424740723   7746                                                                                                                                                                                                                                                                                                                                                                      .TH SIZE 1 "22 March 1989"
.\" @(#)size.1 1.14 89/03/26 SMI; from UCB 4.1
.SH NAME
size \- display the size of an object file
.SH SYNOPSIS
.B size
[
.I object-file .\|.\|.
]
.SH Sun386i SYNOPSIS
.BR /usr/bin/size
.RB [ \-n ]
.RB [ \-f ]
.RB [ \-o ]
.RB [ \-x ]
.RB [ \-V ]
.I filename .\|.\|.
.SH DESCRIPTION
.IX  "size command"  ""  "\fLsize\fP \(em find object file size"
.IX  find "object file size"  ""  "find object file size \(em \fLsize\fP"
.IX  "programming tools"  size  ""  "\fLsize\fP \(em find object file size"
.IX  "object file"  size  ""  "\fLsize\fP \(em find object file size"
.B size
prints the (decimal) number of bytes required by the text, data, and
bss portions, and their sum in hex and decimal, of each
.I object-file
argument.  If no file is specified,
.B a.out
is used.
.SH Sun386i DESCRIPTION
The Sun386i version of the System V compatibility package includes
.BR /usr/bin/size ,
which allows the System V options to be used, and creates the same
output as the System V
.BR size (1)
command; it
produces section size information in bytes for each 
loaded section in
.SM COFF
files.
The size of the text, data, and bss (uninitialized data) sections is
printed, as well as the sum of the sizes of these sections.  If an
archive file is given, it displays the information for all archive
members.
.SH Sun386i OPTIONS
.TP
.B \-n
Includes
.SB NOLOAD
sections in the size.
.TP
.B \-f 
Produces full output, that is, it prints 
the size of every loaded section, followed by the section name
in parentheses.
.TP
.B \-o
Print numbers in octal, instead of the default which is decimal.
.TP
.B \-x
Print numbers in hexadecimal.
.TP
.B \-V
Supply version information.
.SH "Sun386i DIAGNOSTICS"
.TP
.BI "size: " name ": cannot open"
.I name
cannot be read.
.TP
.BI "size: " name ": bad magic"
.I name
is not an appropriate common object file.
.SH "Sun386i WARNINGS"
Since the size of bss sections is not known until
link-edit time, this command
does not give the true total
size of pre-linked objects.
.SH "SEE ALSO"
.BR cc (1V),
.BR size (1),
.BR a.out (5),
.BR coff (5),
.BR ar (5) 
l    	uustat.1c .1  |    uux.1c t      
vacation.1 .      val.1 ca      vax.1        vfontinfo.1       vgrind.1 inf      vi.1 gri        view.1 vi.1 .1         view.1 1        view.1 1 characters both horizontally and vertically.
.TP
.B Offset_\s-1XY\s0
Thicken characters diagonally.
.TP
.B Offset_X_and_\s-1XY\s0
Thicken character both horizontally and diagonally.
.TP
.B Offset_Y_and_\s-1XY\s0
Thicken./share/man/man1/sleep.1                                                                               755       0      12         1246  4424740723  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sleep.1 1.11 89/03/26 SMI; from UCB 4.2
.TH SLEEP 1  "9 September 1987"
.SH NAME
sleep \- suspend execution for a specified interval
.SH SYNOPSIS
.B sleep
.I time
.IX  "sleep command"  ""  "\fLsleep\fP \(em suspend execution"
.IX  "suspend execution"  ""  "suspend execution \(em \fLsleep\fP"
.SH DESCRIPTION
.B sleep
suspends execution for
.I time
seconds.
It is used to execute a command after a certain amount of time as in:
.IP
.B (sleep 105; command)&
.LP
or to execute a command every so often, as in:
.RS
.nf
.ft B
while true
do
.RS
.ft B
command
sleep 37
.RE
.B done
.fi
.RE
.SH "SEE ALSO"
.BR sleep (3)
.SH BUGS
.I time
must be less than 2,147,483,647 seconds.
  t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D    tail.1    T    talk.1   d    tar.1    t    tbl.1        tcopy.1       tcov.1        tee.1        tek.1g       	tektool.1       	telnet.1c       test.1v        
text./share/man/man1/snap.1                                                                                755       0      12         7706  4424740723   7744                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)snap.1 1.11 89/03/26 SMI; 
.TH SNAP 1 "19 February 1988"
.SH NAME
snap \- SunView application for system and network administration
.SH SYNOPSIS
.B snap
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "snap command" "" "\fLsnap\fR command"  
.B snap 
simplifies the execution of a variety of system administration tasks in 
the user-friendly environment of a SunView window. 
.B snap
eases the following tasks: personal or centralized backup and restoration 
of files, management of users accounts and user groups, 
software installation, network administration, and management of
devices such as printers, terminals, modems, and the peripheral box containing
disk and tape drives.
.PP
Anyone can use
.BR snap ,
but the operations allowed
depend on the secondary group membership of the user at the time that
snap is invoked.  There are four secondary user groups specifically 
recognized by 
.BR snap , 
membership in which bestows various powers over the corresponding 
area of system administration. These are:
.TP 10
.B accounts
users and user groups.
.TP
.B devices
printers, terminals, modems, and peripheral box.
.TP
.B operator
centralized backup and restoration of files, and installation of software.
.TP
.B networks
domains and systems, including the New User Accounts feature and
Automatic System Installation features.
.LP
A user's
.B snap
privileges depend upon which of these four groups he or she belongs to.
If they get an account through New User Accounts, or if an administrator
adds them using the defaults, new users become 
members of the primary group
.IR users ,
and are given all
.B snap
privileges. This can be changed by changing the secondary group membership
of the primary group
.I users
with 
.BR snap .
Note: this does not change the 
group membership of existing users, but only of new users.
The secondary group membership of existing users must be changed individually.
.SS Accounts
.LP
An administrator using
.B snap
can create new user accounts and remove existing ones, change a user's
.B snap
privileges, and control users' access to their accounts.
New users can create their own accounts as they first login if the
New User Accounts feature is activated as described under Networks below.
.SS Devices
.LP
Epson and Epson-like printers (most printers using the Centronics parallel 
interface), text serial printers, and HP Laserjet and compatible printers 
can be administered with
.B snap .  
The supported terminal types are 
.B vt-100 
and 
.B wyse. 
The supported modem types
are Hayes Smartmodem or a modem that is compatible with Hayes Smartmodem. 
For all other types of terminals, modems, or printers, the software must 
be configured manually. See
.TX ADMIN
for details.
.LP
.B snap
can add or remove, display and change
information about, or disable or enable either a printer, a terminal, a 
modem, or the peripheral box containing disk and tape drives. 
Devices not added using
.B snap
can not be manipulated with
.BR snap .
.SS Operator
.LP
Regardless of the primary or secondary group membership of users, they
can backup and restore their own files with 
.BR snap .
.LP
Backup and removal of all files can be done by members of the
.B operator
group.
.SS Networks
.LP
Much of the network setup must be done when the first machine in the network,
the master server, is started up, and when each client is connected and booted
for the first time. Some of this information can never be changed.
.LP
Once the master and slave servers are installed,
.B snap
can be used to add and assign diskless clients to servers, remove them,
modify their network roles,
and perform all the functions listed above under Accounts, Devices, and Operator
on any system in the network.
.LP
If desired, you can also enable or disable the feature that allows a user to 
create his own
account while logging in (New User Accounts), and the automatic system installation feature, two possible security loopholes.
.SH SEE ALSO
.LP
.I "Sun386i System and Network Administration
.br
.TX ADMIN
r accounts and remove existing ones, change a user's
.B sn./share/man/man1/soelim.1                                                                              755       0      12         3562  4424740723  10267                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)soelim.1 1.15 89/03/26 SMI; from UCB 4.2
.TH SOELIM 1 "9 September 1987"
.SH NAME
soelim \- resolve and eliminate .so requests from nroff or troff input
.SH SYNOPSIS
.B soelim
[
.I filename
\&.\|.\|. ]
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "soelim command"  ""  "\fLsoelim\fP \(em eliminate \&.so's from nroff input"
.IX  "eliminate sos from nroff input"  ""  "eliminate \&.so's from nroff input \(em \fLsoelim\fP"
.IX  "document production"  soelim  ""  "\fLsoelim\fP \(em eliminate \&.so's from nroff input"
.IX "nroff utilities" soelim "\fLnroff\fR utilities" "\fLsoelim\fR \(em eliminate \fL.so\fR's, incorporate sourced-in files"
.IX "troff utilities" soelim "\fLtroff\fR utilities" "\fLsoelim\fR \(em eliminate \fL.so\fR's, incorporate sourced-in files"
.LP
.B soelim
reads the specified files or the standard input and
performs the textual inclusion implied by the
.BR nroff (1)
directives of the form
.IP
.BI \&.so " somefile"
.LP
when they appear at the beginning of input lines.
This is useful since programs such as
.BR tbl (1)
do not normally do this; it allows the placement of individual tables
in separate files to be run as a part of a large document.
.LP
An argument consisting of
.RB ` \- '
is taken to be a file name corresponding to the standard input.
.LP
Note: inclusion can be suppressed by using
.RB `\| \' \|'
instead of
`\|\fB\.\fP\|',
that is,
.IP
.B \' so /usr/share/lib/tmac.s
.SH EXAMPLE
.LP
A sample usage of
.B soelim
would be
.IP
.B soelim exum?.n | tbl | nroff \-ms | col | lpr
.SH SEE\ ALSO
.BR colcrt (1),
.BR more (1),
.BR nroff (1),
.BR tbl (1)
.\".SH BUGS
.\"The format of the source commands must involve no strangeness \-
.\"exactly one space must precede and no spaces follow the file name.
 uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c  0  D    	uuname.1c D  X    	uusend.1c X  l    	./share/man/man1/sort.1v                                                                               755       0      12        21067  4424740723  10174                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sort.1v 1.21 89/03/26 SMI; from UCB 4.3 BSD and S5R2 6.3 9/2/83
.TH SORT 1 "22 March 1989"
.SH NAME
sort \- sort and collate lines
.SH SYNOPSIS
.B sort
[
.B \-bdf\|iMnr
]
[
.BI \-t c
]
[
.I sort-field
\&\|.\|.\|.\|]
[
.B \-cmu
]
[
.BR \-o [\0]\c
.I output-file
]
[
.BI \-T " directory"
]
.if t .ti +.5i
 [
.BI \-y " kmem"
] 
[
.BI \-z " recsz"
]
.IR filename .\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/sort
[
.B \-bdf\|iMnr
]
[
.BI \-t c
]
[
.I sort-field
\&\|.\|.\|.\|]
[
.B \-cmu
]
[
.BR \-o [\0]\c
.I output-file
]
[
.BI \-T " directory"
]
.if t .ti +.5i
[
.BI \-y " kmem"
]
[
.BI \-z " recsz"
]
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  "sort command"  ""  "\fLsort\fP \(em sort and collate lines"
.IX  "sort or merge files"  ""  "sort and collate lines \(em \fLsort\fP"
.IX  "merge files"  ""  "sort and collate lines \(em \fLsort\fP"
.IX  files  sort  ""  "\fLsort\fP \(em sort and collate lines"
.IX  "text processing utilities"  sort  ""  "\fLsort\fP \(em sort and collate lines"
.IX "System V commands" "\fLsort\fR"
.LP
The
.B sort
program sorts and collates lines contained in the named files,
and writes the result onto the standard output.  If no
.I filename
argument is given, or if
.RB ` \-  '
appears as an argument,
.B sort
accepts input from the standard input.
.LP
Output lines are normally sorted on a character-by-character basis,
from left to right within a line.  The default collating sequence
is the
.SM ASCII
character set.  Lines can also be sorted
according to the contents of one or more fields specified by a
.IR sort-field ,
specification, using the
.BI + sw
(starting-word),
.BI \- ew
(end-at-word), and the
.BI \-t c
(set-\s-1TAB\s0-character/word
delimiter) options, as described under
.SM OPTIONS
below.  When no word delimiter is specified, one or more adjacent
white-space characters (\s-1SPACE\s0 and
.SM TAB\s0)
signify the end of the previous word; the lines:
.RS
.sp .5
.nf
.ft B
^^^\0xyz
^^^\0\0\0xyz
.ft R
.fi
.RE
.LP
are collated as:
.RS
.sp .5
.ft B
.nf
^^^\0\0\0xyz
^^^\0xyz
.fi
.RE
.LP
Each
.I sort-field
is evaluated in command-line order; later fields
are applied to the sorting sequence only when all earlier
fields compare equally.  When all specified fields compare equally
between two or more lines, that subset of lines is sorted on a
character-by-character basis, from left to right.
.SH SYSTEM V DESCRIPTION
.LP
When no fields are specified in the command line, the System V
version of
.BR sort
treats leading blanks as significant, even with the
.B \-n
(numeric collating sequence) option;
the lines:
.RS
.sp .5
.nf
.ft B
123
\0\023
.ft R
.fi
.RE
.LP
are collated as:
.RS
.sp .5
.nf
.ft B
\0\023
123
.ft R
.fi
.RE
.SH OPTIONS
.SS Collating Flags
.TP
.B \-b
Ignore leading
.SM SPACE
characters when determining the starting and ending
positions of a field.
.TP
.B \-d
Dictionary order.  Only letters, digits and
the white-space characters
.SM SPACE
and
.SM TAB
are significant in comparisons.
.TP
.B \-f
Fold in lower case.  Treat upper- and lower-case letters equally
in collating comparisons.
.TP
.B \-i
Ignore characters outside the
.SM ASCII
range 040-0176
in non-numeric comparisons.
.TP
.B \-M
Month order.
The first three non-blank characters of the field are folded to upper
case and collated according to the sequence:
.SB JAN FEB
\&.\|.\|.
.BR \s-1DEC\s0 .
Field values outside this range appear earlier than
.BR \s-1JAN\s0 .
The
.B \-M
option implies the
.BR \-b
option.
.TP
.B \-n
Numeric collating sequence.
An initial numeric string, consisting of optional blanks, optional
minus signs, and zero or more digits with an optional decimal point,
is sorted by arithmetic value.  The
.B \-n
option implies the
.B \-b
option, but only when at least one
.I sort-field
is specified on the command line.
.TP
.B \-r
Reverse the current collating sequence.
.SS Field Specification Options
.TP 5
.BI \-t c
Use
.I c
as the word delimiter character; unlike white-space characters,
adjacent delimiters indicate word breaks; if
.B :
is the delimiter character,
.B ::
delimits an empty word.
.TP
.I sort-field
This is a combination of options that specifies a field, within
each line, to sort on.  A
.I sort-field
specification can take either of the following forms:
.RS
.RS
.BI + sw\c
.RI [ cf ]
.br
.BI + sw
.BI \- ew\c
.RI [ cf ]
.RE
.RE
.IP
where
.I sw
is the number of the starting word (beginning with `0') to include
in the field,
.I ew
is the number of the word before which to end the field, and
.I cf
is a string containing collating flags (without a
leading
.RB ` \- '.)
When included in a
.I sort-field
specification, these flags apply only to the field being specified,
and when given, override other collating flags given in separate
arguments (which otherwise apply to an entire line).
.IP
If the
.BI \- ew
option is omitted, the field continues to the end of a line.
.IP
You can apply a character offset to
.I sw
and
.I ew
to indicate that a field is to start or end a given number of
characters within a word, using the notation:
.RI ` w . c '.
A starting position specified in the form:
.RB ` "+\fIw\fP.\fIc\fP" '
indicates the character in position
.I c
(beginning with
.B 0
for the first character), within word
.I w
.RB ( 1
and
.B 1.0
are equivalent).  An ending position specified in the form:
.RB ` "\-\fIw\fP.\fIc\fP" '
indicates that the field ends at the character just prior to position
.I c
(beginning with
.B 0
for the delimiter just prior to the first
character), within word
.IR w .
If the
.B \-b
flag is in effect,
.I c
is counted from the first non-white-space or non-delimiter character
in the field, otherwise, delimiter characters are counted.
.SS Other Options
.TP
.B \-c
Check that the input file is sorted according to the ordering rules;
give no output unless the file is out of sort.
.TP
.B \-m
Merge only, the input files are already sorted.
.TP
.B \-u
Unique.  Emit only the first line in each set of lines for which
all sorting fields compare equally.
.TP
.PD 0
.BI \-o output-file
.TP
.BI \-o " output-file"
.PD
Direct output to the file specified as
.IR output-file ,
instead of the standard output.
This file may be the same as one of the input files.
.TP
.BI \-y " kmem"
The amount of main memory used by the sort
has a large impact on its performance.
Sorting a small file in a large amount
of memory is a waste.
If this option is omitted,
.B sort
begins using a system default memory size,
and continues to add space as needed.
If this option is given
.B sort
starts with
.IR kmem ,
kilobytes of memory, if allowed, or as close to that amount as
possible.  Supplying
.B \-y0
guarantees that
.B sort
starts with a minimum of memory.
By convention,
.B \-y
(with no argument) starts with maximum memory.
.TP
.BI \-z " recsz"
The size of the longest line read is recorded
in the sort phase so that buffers can be allocated
during the merge phase.
If the sort phase is omitted because either of the
.B \-c
or
.B \-m
options is in effect, a default size of 1024 bytes is used.
Lines longer than the buffer size terminate
.B sort
abnormally.
Supplying the actual number of bytes in the longest line
to be merged (or some larger value)
avoids this.
.TP
.BI \-T " directory"
The
.I directory
argument is the name of a directory in which to place temporary files.
.SH EXAMPLES
.LP
Sort the contents of
.B input-file
with word number 1 (the second word) as the sort key:
.IP
.B "sort +1 \-2 input-file"
.LP
Sort, in reverse order, the contents of
.B input-file1
and
.BR input-file2 ,
placing the output in
.B output-file
and using the first character of the second field
as the sort key:
.IP
.B "sort \-r \-o output-file +1.0 \-1.1 input-file1 input-file2"
.LP
Sort, in reverse order, the contents of
.B input-file1
and
.B input-file2
using the first non-blank character of the second field
as the sort key:
.IP
.B "sort \-r +1.0b \-1.1b input-file1 input-file2"
.LP
Print the password file
.RB ( passwd (5))
sorted by the numeric user
.SM ID
(the third colon-separated field):
.IP
.B "sort \-t: +2n \-3 /etc/passwd"
.LP
Print the lines of the already sorted file
.BR input-file ,
suppressing all but the first occurrence of lines
having the same third field
(the options
.B \-mu
with just one input file make the choice of a unique
representative from a set of equal lines predictable):
.IP
.B "sort \-mu +2 \-3 input-file"
.SH FILES
.PD 0
.TP 20
.B /usr/tmp/stm???
.PD
.SH SEE ALSO
.BR comm (1),
.BR join (1),
.BR rev (1),
.BR uniq (1)
.PD
.SH DIAGNOSTICS
.LP
Comments and exits with non-zero status for various trouble
conditions (such as when input lines are too long),
and for disorders discovered under the
.B \-c
option.
.LP
When the last line of an input file is missing a
.SM NEWLINE\s0,
.B sort
appends one, prints a warning message, and continues.
etic value.  The
.B \-n
option implies the
.B \-b
option, but only when at least one
.I sort-field
is specified on the command line.
.TP
.B \-r
Reverse the current collating sequence.
.SS Field Specification Options
.TP 5
.BI \-t c
Use
.I c
as the word delimiter character; unlike white-space characters,
adjacent delimiters indicate word breaks; if
.B :
is the delimiter character,
.B ::
delimits an empty word.
.TP
.I sort-field
This is a combination of o./share/man/man1/sortbib.1                                                                             755       0      12         5375  4424740723  10447                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sortbib.1 1.19 89/03/26 SMI;
.TH SORTBIB 1 "21 December 1987"
.SH NAME
sortbib \- sort a bibliographic database
.SH SYNOPSIS
.B sortbib
[
.BI \-s \s-1KEYS\s0
]
.IR database .\|.\|.
.SH AVAILABILITY
.LP
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "sortbib command"  ""  "\fLsortbib\fP \(em sort bibliographic database"
.IX  "sort bibliographic database"  ""  "sort bibliographic database \(em \fLsortbib\fP"
.IX  "document production"  sortbib  ""  "\fLsortbib\fP \(em sort bibliographic database"
.IX  "bibliography"  sortbib  ""  "\fLsortbib\fP \(em sort bibliographic database"
.LP
.B sortbib
sorts files of records containing
.B refer
key-letters by user-specified keys.
Records may be separated by blank lines,
or by
.RB ` \&.[ '
and
.RB ` \&.] '
delimiters, but the two styles may not be mixed together.
This program reads through each
.I database
and pulls out key fields, which are sorted separately.
The sorted key fields contain the file pointer,
byte offset, and length of corresponding records.
These records are delivered using disk seeks and reads, so
.B sortbib
may not be used in a pipeline to read standard input.
.LP
By default,
.B sortbib
alphabetizes by the first
.B %A
and the
.B %D
fields, which contain the senior author and date.
The
.B \-s
option is used to specify new
.IR \s-1KEYS\s0 .
For instance,
.B \-s\s-1ATD\s0
will sort by author, title, and date, while
.B \-sA+D
will sort by all authors, and date.
Sort keys past the fourth are not meaningful.
No more than 16 databases may be sorted together at one time.
Records longer than 4096 characters will be truncated.
.LP
.B sortbib
sorts on the last word on the
.B %A
line, which is assumed to be the author's last name.
A word in the final position, such as
.RB ` jr. '
or
.RB ` ed. ',
will be ignored if the name beforehand ends with a comma.
Authors with two-word last names or unusual constructions
can be sorted correctly by using the
.B nroff
convention
.RB  ` \e0 '
in place of a blank.
A
.B %Q
field is considered to be the same as
.BR %A ,
except sorting begins with the first, not the last, word.
.B sortbib
sorts on the last word of the
.B %D
line, usually the year.
It also ignores leading articles (like
.RB  ` A '
or
.RB ` The ')
when sorting by titles in the
.B %T
or
.B %J
fields;
it will ignore articles of any modern European language.
If a sort-significant field is absent from a record,
.B sortbib
places that record before other records containing that field.
.SH SEE ALSO
.BR addbib (1),
.BR indxbib (1),
.BR lookbib (1),
.BR refer (1),
.BR roffbib (1)
.LP
.B refer
in
.TX DOCS
.SH BUGS
.LP
Records with missing author fields should probably be sorted by title.
er
.SM ID
(the third colon-separated field):
.IP
.B "sort \-t: +2n \-3 /etc/passwd"
.LP
Print the lines of the already sorted file
.BR input-file ,
suppressing all but the first occurrence of lines
having the same third field
(the options
.B \-mu
with just on./share/man/man1/source.1                                                                              755       0      12           74  4424740724  10233                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)source.1 1.8 89/03/26 SMI; 
l.1   L    	spellin.1 1   `    
spellout.1 L  t    	spline.1g  `      split.1       stop.1 i      	strings.1         strip.1       stty.1v      $ stty_from_defaults.1 $        su.1 s.1      sum.1v 1       sun.1 m.  4    
suntools.1 1  H    	sunview.1  4  \    	suspend.1 H  l    swin.1 .      switch.1 1 H      
switcher.1       
symorder.1       ./share/man/man1/sparc.1                                                                               755       0      12           64  4424740724  10042                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)sparc.1 1.3 89/03/26 SMI;
spellin.1 1   `    
spellout.1    t    	spline.1g  L      split.1       stop.1 i      	strings.1  i      strip.1       stty.1v      $ stty_from_defaults.1 $        su.1 s.1      sum.1v 1       sun.1 m.  4    
suntools.1 .  H    	sunview.1  1  \    	suspend.1  4  l    swin.1 .      switch.1 1 .      
switcher.1 H      
symorder.1       sync.1 r      syse./share/man/man1/spell.1                                                                               755       0      12         6743  4424740724  10123                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)spell.1 1.15 89/03/26 SMI;
.TH SPELL 1  "5 January 1988"
.SH NAME
spell, spellin, spellout \- report spelling errors
.SH SYNOPSIS
.B spell
[
.B \-bvx
] [
.B \-d
.I hlist
] [
.B \-s
.I hstop
] [
.B \-h
.I spellhist
] [
.I filename
] .\|.\|.
.LP
.B spellin
[
.I inlist
]
.LP
.B spellout
[
.B \-d
]
.I outlist
.SH DESCRIPTION
.IX  "spell command"  ""  "\fLspell\fP \(em check spelling"
.IX  "spellin command"  ""  "\fLspellin\fP \(em check spelling"
.IX  "spellout command"  ""  "\fLspellout\fP \(em check spelling"
.IX  "check spelling"  ""  "check spelling \(em \fLspell\fP"
.IX  "document production"  spell  ""  "\fLspell\fP \(em check spelling"
.IX  "text processing utilities"  spell  ""  "\fLspell\fP \(em check spelling"
.LP
.B spell
collects words from the named files, and looks them up in a hashed
spelling list derived from the system dictionary.  Words that do not
appear in the list, or cannot be derived from those that do appear
by applying certain inflections, prefixes or suffixes, are displayed
on the standard output.
.LP
If there are no
.I filename
arguments, words to check are collected from the standard input.
.B spell
ignores most
.BR troff (1),
.BR tbl (1),
and
.BR eqn (1)
constructs.
Copies of all output words are accumulated in the history file, and a
.I stop
list filters out misspellings (for example, thier=thy\-y+ier) that
would otherwise pass.
.LP
The standard spelling list is based on many sources,
and while more haphazard than
an ordinary dictionary, is also more
effective in respect to proper names
and popular technical words.  Coverage of
the specialized vocabularies of
biology, medicine and chemistry is light.
.LP
.B spellin
adds words from the standard input to a hashed spelling list,
and writes the resulting hashed list to the standard output.
If an
.I inlist
argument is supplied, the input words are hashed together with that
existing spelling list.  If not, 
.B spellin
creates a new list from scratch.
.LP
.B spellout
looks up each word from the standard input, compares them with
.IR outlist ,
and displays those that are missing from that list.  With the
.BR \-d 
option,
.B spellout
displays input words that appear in the list.
.SH OPTIONS
.TP
.B \-b
Check British spelling.  Besides preferring
``centre'',
``colour'',
``travelled'',
and so on, this option insists upon
.I -ise
in words like
.IR standardize ,
despite what Fowler and the
.SM OED
say.
.TP
.B \-v
Print all words not literally in the spelling list, as well as plausible
derivations from spelling list words.
.TP
.B \-x
Print every plausible stem with
.RB ` = '
for each word.
.TP
.BI  \-d " hlist"
Use the file
.I hlist
as the hashed spelling list.
.TP
.BI  \-s " hstop"
Use
.I hstop
as the hashed stop list.
.TP
.BI \-h " spellhist"
Place misspelled words with a user/date stamp in file
.IR spellhist .
.SH FILES
.PD 0
.TP 20
.B /usr/dict/hlist[ab]
hashed spelling lists, American & British
.TP
.B /usr/dict/hstop
hashed stop list
.TP
.B /usr/dict/words
system dictionary\(em\&list of properly spelled words and roots
.TP
.B /usr/lib/spell
program called by the
.B /usr/bin/spell
shell script
.PD
.SH NOTE
Misspelled words can be monitored by default by setting the
.B H
variable in
.B /usr/bin/spell
to the name of a file that has permission mode 666.
.SH "SEE ALSO"
.BR deroff (1),
.BR sed (1V),
.BR sort (1V),
.BR tee (1)
.br
.ne 8
.SH BUGS
The spelling list's coverage is uneven;
new installations may wish to monitor the output for several months
to gather local additions.
.LP
British spelling was done by an American.
ing a
.SM NEWLINE\s0,
.B sort./share/man/man1/spellin.1                                                                             755       0      12           66  4424740724  10402                                                                                                                                                                                                                                                                                                                                                                      .so man1/spell.1
.\" @(#)spellin.1 1.7 89/03/26 SMI; 
  	spline.1g t      split.1       stop.1        	strings.1       strip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 tty      sum.1v        sun.1  1  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	syswait.1       ./share/man/man1/spellout.1                                                                            755       0      12           67  4424740724  10604                                                                                                                                                                                                                                                                                                                                                                      .so man1/spell.1
.\" @(#)spellout.1 1.7 89/03/26 SMI; 
  split.1       stop.1 i      	strings.1         strip.1       stty.1v      $ stty_from_defaults.1 $        su.1 s.1      sum.1v 1       sun.1 m.  4    
suntools.1 1  H    	sunview.1  4  \    	suspend.1 H  l    swin.1 .      switch.1 1 \      
switcher.1       
symorder.1       sync.1 r      sysex.1       	syswait.1 1       t300.1g        t300./share/man/man1/spline.1g                                                                             755       0      12         7335  4424740724  10443                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)spline.1g 1.13 89/03/26 SMI;
.TH SPLINE 1G  "9 September 1987"
.SH NAME
spline \- interpolate smooth curve
.SH SYNOPSIS
.B spline
[
.B \-aknpx
] .\|.\|.
.SH DESCRIPTION
.IX  "spline command"  ""  "\fLspline\fP \(em interpolate smooth curve"
.IX  "interpolate smooth curve"  ""  "interpolate smooth curve \(em \fLspline\fP"
.IX  "curve fitting, \fLspline\fP"
.IX  graphics  spline  ""  "\fLspline\fP \(em interpolate smooth curve"
.IX  "smoothing, interpolate curve \(em \fLspline\fP"
.LP
.B spline
takes pairs of numbers from the standard
input as abcissas and ordinates
of a function.
It produces a similar set, which is approximately equally spaced and
includes the input set, on the standard output.
The cubic spline output (R. W. Hamming,
.ft I
Numerical Methods for Scientists and Engineers,
.ft R
2nd ed., 349ff) has two continuous derivatives,
and sufficiently many points to look smooth when plotted, for
example by
.BR graph (1G).
.SH OPTIONS
.TP 5
.B  \-a
Supply abscissas automatically (they are missing from
the input); spacing is given by the next
argument, or is assumed to be
.B 1
if next argument is not a number.
.TP 5
.B  \-k
The constant
.IR k ""
used in the boundary value computation
.IP
.if n .ig
.ti +1.5i
.ds ' \h'-\w'\(fm\(fm'u'
.  \".EQ
.nr 99 \n(.s
.nr 98 \n(.f
'ps 10
.ft I
.ds 11 "y\(fm\(fm
.nr 11 \w'\*(11'
.ds 12 "\*'
.nr 12 \w'\*(12'
'ps 8
.ds 13 "\fR0\fP
.nr 13 \w'\*(13'
.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
'ps 10
.nr 12 \n(12+\n(13+\w'\s8\|'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|=\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "ky\(fm\(fm
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\*'
.nr 12 \w'\*(12'
'ps 8
.ds 13 "\fR1\fP
.nr 13 \w'\*(13'
.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
'ps 10
.nr 12 \n(12+\n(13+\w'\s8\|'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 ",
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "y\(fm\(fm
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\*'
.nr 12 \w'\*(12'
'ps 8
.ds 13 "n
.nr 13 \w'\*(13'
.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
'ps 10
.nr 12 \n(12+\n(13+\w'\s8\|'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|=\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\|\|
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "ky\(fm\(fm
.nr 12 \w'\*(12'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 12 "\*'
.nr 12 \w'\*(12'
'ps 8
.ds 13 "n\|\(mi\|\fR1\fP
.nr 13 \w'\*(13'
.as 12 \v'18u'\s8\*(13\|\s10\v'-18u'
'ps 10
.nr 12 \n(12+\n(13+\w'\s8\|'
.as 11 "\*(12
.nr 11 \w'\*(11'
.ds 11 \x'0'\fI\*(11\s\n(99\f\n(98
.ne 78u
\*(11
'ps \n(99
.ft \n(98
.  \".EN
..
.if t .ig
.IP
.ft B
(2nd deriv. at end) = k*(2nd deriv. next to end)
..
.ft R
.IP
is set by the next argument.
By default
.IR k ""
= 0.
.TP 5
.B  \-n
Space output points so that approximately
.I n
intervals occur between the lower and upper
.I x
limits.  (Default
.I n
= 100.)
.TP 5
.B  \-p
Make output periodic, that is, match derivatives at ends.
First and last input values should normally agree.
.TP 5
.B  \-x
Next 1 (or 2) arguments are lower (and upper)
.I x
limits.  Normally these limits are calculated from the data.
Automatic abcissas start at lower limit (default 0).
.SH "SEE ALSO"
.BR graph (1G)
.LP
R. W. Hamming,
.IR "Numerical Methods for Scientists and Engineers" ,
2nd ed.
.SH DIAGNOSTICS
When data is not strictly monotonic in
.I x,
.B spline
reproduces the input without interpolating extra points.
.SH BUGS
A limit of 1000 input points is enforced silently.
llating sequence.
.SS Field Specification Options
.TP 5
.BI \-t c
Use
.I c
as the word delimiter character; unlike white-space characters,
adjacent delimiters indicate word breaks; if
.B :
is the delimiter character,
.B ::
delimits an empty word.
.TP
.I sort-field
This is a combination of o./share/man/man1/split.1                                                                               755       0      12         1715  4424740725  10132                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)split.1 1.12 89/03/26 SMI;
.TH SPLIT 1  "9 September 1987"
.SH NAME
split \- split a file into pieces
.SH SYNOPSIS
.B split
[
.BI \- number
] [
.I infile
[
.I outfile
] ]
.SH DESCRIPTION
.IX  "split command"  ""  "\fLsplit\fP \(em split file into pieces"
.IX  file  "split into pieces"  ""  "split into pieces \(em \fLsplit\fP"
.IX  "text processing utilities"  split  ""  "\fLsplit\fP \(em split file into pieces"
.B split
reads
.I infile
and writes it in
.IR n -line
pieces (default 1000) onto a set of output files (as many files as
necessary).  The name of the first output file is
.I outfile
with
.B aa
appended, the second file is
.IB outfile \|ab ,
and so on lexicographically.
.LP
If no
.I outfile
is given,
.B x
is used
as default (output files will be called
.BR xaa ,
.BR xab ,
etc.).
.LP
If no
.I infile
is given, or if
.RB ` \- '
is given in its stead, then the standard input file is used.
.SH OPTIONS
.TP
.BI \- number
Number of lines in each piece.
     tr.1v ut      trace.1       
./share/man/man1/stop.1                                                                                755       0      12           72  4424740725   7717                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)stop.1 1.8 89/03/26 SMI; 
rip.1       stty.1v      $ stty_from_defaults.1 tty       su.1 $       sum.1v 1       sun.1  1  4    
suntools.1 4  H    	sunview.1 H  \    	suspend.1 \  l    swin.1 1      switch.1        
switcher.1       
symorder.1       sync.1 \      sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs./share/man/man1/strings.1                                                                             755       0      12         2400  4424740725  10460                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)strings.1 1.16 89/03/26 SMI; from UCB 4.1
.TH STRINGS 1 "9 September 1987"
.SH NAME
strings \- find printable strings in an object file or binary
.SH SYNOPSIS
.B strings
[
.B \-
] [
.B \-o
] [
.BI \- number
]
.I filename .\|.\|.
.SH DESCRIPTION
.IX  "strings command"  ""  "\fLstrings\fP \(em find printable strings in binary file"
.IX  find "printable strings in binary file"  ""  "find printable strings in binary file \(em \fLstrings\fP"
.IX  "programming tools"  strings  ""  "\fLstrings\fP \(em find printable strings in binary file"
.IX  "object file"  "find printable strings in"  ""  "find printable strings in \(em \fLstrings\fP"
.B strings
looks for
.SM ASCII
strings in a binary file.
A string is any sequence of 4 or more
printing characters ending with a
.SM NEWLINE
or a
.SM NULL\s0.
.LP
.B strings
is useful for identifying random object files and many other things.
.SH OPTIONS
.TP
.B \-
Look everywhere in the file for strings.  If this flag is omitted,
.B strings
only looks in the initialized data space of object files.
.TP
.B \-o
Precede each string by its
offset in the file.
.TP
.BI \- number
Use
.I number
as the minimum string length rather than 4.
.SH "SEE ALSO"
.BR od (1V)
.SH BUGS
The algorithm for identifying strings is extremely primitive.
        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc../share/man/man1/strip.1                                                                               755       0      12         2032  4424740725  10131                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)strip.1 1.15 89/03/26 SMI; from UCB 4.2
.TH STRIP 1  "22 March 1989"
.SH NAME
strip \- remove symbols and relocation bits from an object file
.SH SYNOPSIS
.B strip
.IR filename .\|.\|.
.SH DESCRIPTION
.IX  "strip command"  ""  "\fLstrip\fP \(em strip symbols and relocation bits"
.IX  "programming tools"  strip  ""  "\fLstrip\fP \(em strip symbols and relocation bits"
.IX  "object file"  strip  ""  "\fLstrip\fP \(em strip symbols and relocation bits"
.LP
.B strip
removes the symbol
table and relocation bits ordinarily attached to the output
of the assembler and linker.
This is useful to save space after a program has been
debugged.
.LP
The effect of
.B strip
is the same as use of the
.B \-s
option of
.BR ld (1).
.SH SEE ALSO
.BR ld (1),
.BR a.out (5)
.SH BUGS
.LP
Unstripped 2.0 binary files will not run if stripped by the 3.0
version.  A message of the form:
.IP
.B pid
.IB xxx :
.B killed due to swap problems in getxfile:
.B
.SM I/O
.B error mapping page.
.LP
when attempting to run a program indicates that this is the problem.
1       tty.1 or  ,    u370.1 .  <    u3b.1 70  L    u3b15.1   \    u3b2.1 1  l    u3b5.1 2  |    ul.1 3b5      umask.1       	unalias.1 1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1 e      unhash.1 1    (    	unifdef.1   8    units.1   L    
unix2dos.1    `    	unlimit.1  L  t    unload.1  `      	unloadc.1 t      unpack.1./share/man/man1/stty.1v                                                                               755       0      12        25735  4424740725  10220                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stty.1v 1.18 89/03/26 SMI; from S5R3
.TH STTY 1V "25 March 1989"
.SH NAME
stty \- set or alter the options for a terminal
.SH SYNOPSIS
.B stty
[
.B \-ag
]
[
.I option 
] .\|.\|.
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/stty
[
.B \-ag
]
[
.I option 
] .\|.\|.
.SH DESCRIPTION
.IX "stty command" "" "\fLstty\fR command"  
.IX  set "terminal characteristics \(em \fLstty\fP"
.IX  terminal  "set characteristics"  ""  "set characteristics \(em \fLstty\fP"
.IX  "tty, set characteristics \(em \fLstty\fP"
.LP
.B stty
sets certain terminal
.SM I/O
options for the device that is the current standard output.
Without arguments, it reports the settings of certain terminal
options for the device that is the standard output; the settings are
reported on the standard error.
.LP
Detailed information about the modes listed
in the first five groups below may be found in
.BR termio (4).
Options in the last group are implemented using options in the previous
groups.
Note: many combinations of options make no sense, but no sanity
checking is performed.
.SH SYSTEM V DESCRIPTION
.LP
.B stty
sets or reports terminal options for the device that is
the current standard input; the settings are
reported on the standard output.
.SH OPTIONS
.TP 12
.B \-a
Report all of the option settings.
.TP
.B \-g
Report current settings in a form that can be used as an argument
to another
.B stty
command.
.SS Special Requests
.TP 12
.B speed
The terminal speed alone is printed on the standard output.
.TP
.B size
The terminal (window) sizes are printed on the standard output,
first rows and then columns.
.IP
.B size
and
.B speed
always report on the settings of 
.BR /dev/tty ,
and always report the settings to the standard output.
.SS Control Modes
.TP 12
.RB [ \- ] parenb
Enable parity generation and detection.
With a
.RB ` \- ',
disable parity checking.
.TP
.RB [ \- ] parodd
Select odd parity.
With a
.RB ` \- ',
select even parity.
.TP
.B "cs5 cs6 cs7 cs8"
Select character size.
.TP
.B 0
Hang up phone line immediately.
.TP
.B "50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 19200 exta 38400 extb"
Set terminal baud rate to the number given, if possible.
(Not all speeds are supported by all hardware interfaces.)
.TP
.RB [ \- ] hupcl
Hang up connection on last close.
With a
.RB ` \- ',
do not hang up connection.
.TP
.RB [ \- ] hup
Same as
.BR hupcl .
.TP
.RB [ \- ] cstopb
Use two stop bits per character.
With a
.RB ` \- ',
use one stop bit per character.
.TP
.RB [ \- ] cread
Enable the receiver.
With a
.RB ` \- ',
disable the receiver.
.TP
.RB [ \- ] clocal
Assume a line without modem control.
With a
.RB ` \- ',
assume a line with modem control.
.SS Input Modes
.TP 12
.RB [ \- ] ignbrk
Ignore break on input.
With a
.RB ` \- ',
do not ignore a break on input.
.TP
.RB [ \- ] brkint
Signal
.SB SIGINT
on break.  With a
.RB ` \- ',
do not signal.
.TP
.RB [ \- ] ignpar
Ignore parity errors.
With a
.RB ` \- ',
do not ignore parity errors.
.TP
.RB [ \- ] parmrk
Mark parity errors
With a
.RB ` \- ',
do not mark parity errors.
.TP
.RB [ \- ] inpck
Enable input parity checking.
With a
.RB ` \- ',
disable input parity checking.
.TP
.RB [ \- ] istrip
Strip input characters to seven bits.
With a
.RB ` \- ',
do not strip input characters.
.TP
.RB [ \- ] inlcr
Map
.SM NEWLINE
to
.SM RETURN
on input.
With a
.RB ` \- ',
do not map on input.
.TP
.RB [ \- ] igncr
Ignore
.SM RETURN
on input.
With a
.RB ` \- ',
do not ignore
.SM RETURN
on input.
.TP
.RB [ \- ] icrnl
Map
.SM RETURN
to
.SM NEWLINE
on input.
With a
.RB ` \- ',
do not map.
.TP
.RB [ \- ] iuclc
Map upper-case alphabetics to lower case on input.
With a
.RB ` \- ',
do not map.
.TP
.RB [ \- ] ixon
Enable
.BR \s-1START\s0 / \s-1STOP\s0
output control.
With a
.RB ` \- ',
disable output control.
When enabled, output is stopped by sending a
.SB STOP
character and started by sending a
.SB START
character.
.TP
.RB [ \- ] ixany
Allow any character to restart output.
With a
.RB ` \- ',
only restart with a
.SB START
character.
.TP
.RB [ \- ] decctlq
Same as
.BR \-ixany .
.TP
.RB [ \- ] ixoff
Request that the system send
.BR \s-1START\s0 / \s-1STOP\s0
characters when the input queue is nearly empty/full.
With a
.RB ` \- ',
request that the system not send
.BR \s-1START\s0 / \s-1STOP\s0
characters.
.TP
.RB [ \- ] tandem
Same as
.BR ixoff .
.TP
.RB [ \- ] imaxbel
Request that the system send a
.SM BEL
character to your terminal, and not to flush the input queue,
if a character received when the input queue is full.
With a
.RB ` \- ',
request that it flush the input queue and not send a
.SM BEL
character.
.SS Output Modes
.TP 12
.RB [ \- ] opost
Post-process output.
With a
.RB ` \- ',
do not post-process output; ignore all other output modes.
.TP
.RB [ \- ] olcuc
Map lower-case alphabetics to upper case on output.
With a
.RB ` \- ',
do not map.
.TP
.RB [ \- ] onlcr
Map
.SM NEWLINE
to
.SM RETURN-NEWLINE
on output.
With a
.RB ` \- ',
do not map.
.TP
.RB [ \- ] ocrnl
Map
.SM RETURN
to
.SM NEWLINE
on output.
With a
.RB ` \- ',
do not map.
.TP
.RB [ \- ] onocr
Do not place
.SM RETURN
characters at column zero.
With a
.RB ` \- ',
do place
.SM RETURN
characters
at column zero.
.TP
.RB [ \- ] onlret
On the terminal
.SM NEWLINE
performs the
.SM RETURN
function.
With a
.RB ` \- ',
.SM NEWLINE
does not perform the
.SM RETURN
function.
.TP
.RB [ \- ] ofill
Use fill characters for delays.
With a
.RB ` \- ',
use timing for delays.
.TP
.RB [ \- ] ofdel
Fill characters are
.SM DEL
characters.
With a
.RB ` \- ',
fill characters are
.SM NUL
characters.
.TP
.B "cr0 cr1 cr2 cr3"
Select style of delay for
.SM RETURN
characters.
.TP
.B "nl0 nl1"
Select style of delay for
.SM LINEFEED
characters.
.TP
.B "tab0 tab1 tab2 tab3"
Select style of delay for horizontal
.SM TAB
characters.
.TP
.B "bs0 bs1"
Select style of delay for
.SM BACKSPACE
characters.
.TP
.B "ff0 ff1"
Select style of delay for form
.SM FORMFEED
characters.
.TP
.B "vt0 vt1"
Select style of delay for vertical
.SM TAB
characters.
.SS Local Modes
.TP 12
.RB [ \- ] isig
Enable the checking of characters against the special characters
.SB INTR
and
.BR \s-1QUIT\s0 .
With a
.RB ` \- ',
disable this checking.
.TP
.RB [ \- ] icanon
Enable canonical input (\c
.BR \s-1ERASE\s0 ,
.BR \s-1KILL\s0 ,
.BR \s-1WERASE\s0 ,
and
.SB \s-1RPRNT
processing).
With a
.RB ` \- ',
disable canonical input.
.TP
.RB [ \- ] cbreak
Same as
.BR \-icanon .
.TP
.RB [ \- ] xcase
Perform canonical upper/lower-case presentation.
With a
.RB ` \- ',
do not perform canonical upper/lower-case presentation.
.TP
.RB [ \- ] echo
Echo back every character typed.
With a
.RB ` \- ',
do not echo back.
.TP
.RB [ \- ] echoe
Echo the
.SB ERASE
character as a sequence of
.SM BACKSPACE-SPACE-BACKSPACE\s0.
With a
.RB ` \- ',
echo the
.SB ERASE
character as itself.
.TP
.RB [ \- ] crterase
Same as
.BR echoe .
.TP
.RB [ \- ] echok
Echo
.SM NEWLINE
after echoing a
.SB KILL
character.
With a
.RB ` \- ',
do not echo
.SM NEWLINE
after echoing a
.SB KILL
character.
.TP
.BR lfkc
Same as
.BR echok ;
obsolete.
.TP
.RB [ \- ] echonl
Echo
.SM NEWLINE\s0,
even if
.B echo
is not set.
With a
.RB ` \- ',
do not echo
.SM NEWLINE
if
.B echo
is not set.
.TP
.RB [ \- ] noflsh
Disable flush after
.SB INTR
or
.BR \s-1QUIT\s0 .
With a
.RB ` \- ',
enable flush.
.TP
.RB [ \- ] tostop
Stop background jobs that attempt to write to the terminal.
With a
.RB ` \- ',
allow background jobs to write to the terminal.
.TP
.RB [ \- ] echoctl
Echo control characters as
.B x
(and delete as
.RB ` ? '.)
Print two
.SM BACKSPACE
characters following the
.SB EOF
character (default
.SM CTRL-D\s0).
With a
.RB ` \- ',
echo control characters as themselves.
.TP
.RB [ \- ] ctlecho
Same as
.BR echoctl .
.TP
.RB [ \- ] echoprt
Echo erased characters backwards within
.RB ` \e '
and
.RB ` / ';
used on printing
terminals.
With a
.RB ` \- ',
echo erased characters as indicated by
.BR echoe .
.TP
.RB [ \- ] prterase
Same as
.BR echoprt .
.TP
.RB [ \- ] echoke
Echo the
.SB KILL
character by erasing each character on the line as
indicated by
.B echoprt
and
.BR echoe .
With a
.RB ` \- ',
echo the
.SB KILL
character as indicated by
.B echoctl
and
.BR echok .
.TP
.RB [ \- ] crtkill
Same as
.BR echoke .
.TP
.SS Control Assignments
.TP 12
.I "control-character c"
Set
.I control-character
to
.IR c ,
where
.I control-character
is one of
.BR erase ,
.BR kill ,
.BR intr ,
.BR quit ,
.BR eof ,
.BR eol ,
.BR eol2 ,
.BR start ,
.BR stop ,
.BR susp ,
.BR rprnt ,
.BR flush ,
.BR werase ,
or
.BR lnext .
If
.I c
is preceded by a caret
.RB ( ^ ),
(escaped from the shell)
then the value used is the corresponding
.SM CTRL
character
(for instance,
.RB ` ^D '
is a
.SM CTRL-D\s0);
.RB ` ^? '
is interpreted as
.SM DEL
and
.RB ` ^\- '
is interpreted as undefined.
.TP
.BI min " i"
Set the
.SB MIN
value to
.IR i .
.TP
.BI time " i"
Set the
.SB TIME
value to
.IR i .
.TP
.BI rows " n"
Set the recorded number of rows on the terminal to
.IR i .
.TP
.BI columns " i"
Set the recorded number of columns on the terminal to
.IR i .
.TP
.BI cols " i"
An alias for
.BI columns " i"\fR.
.SS Combination Modes
.TP 12
.B cooked
Process the
.BR \s-1ERASE\s0 ,
.BR \s-1WERASE\s0 ,
.BR \s-1KILL\s0 ,
.BR \s-1INTR\s0 ,
.BR \s-1QUIT\s0 ,
.BR \s-1EOF\s0 ,
.BR \s-1EOL\s0 ,
.BR \s-1EOL2\s0 ,
.BR \s-1STOP\s0 ,
.BR \s-1START\s0 ,
.BR \s-1SUSP\s0 ,
.BR \s-1RPRNT\s0 ,
.BR \s-1FLUSH\s0 ,
and
.BR LNEXT \s0,
characters specially, and perform output post-processing.
.TP
.BR evenp " or " parity
Enable
.BR parenb " and " cs7 .
.TP
.B oddp
Enable
.BR parenb ", " cs7 ", and " parodd .
.TP
.BR \-parity ", " \-evenp ", or " \-oddp
Disable
.BR parenb ,
and set
.BR cs8 .
.TP
.RB [ \- ] raw
Enable raw input and output.  With a
.RB ` \- ',
disable raw
.SM I/O\s0.
In raw mode, there is no special processing of the
.BR \s-1ERASE\s0 ,
.BR \s-1WERASE\s0 ,
.BR \s-1KILL\s0 ,
.BR \s-1INTR\s0 ,
.BR \s-1QUIT\s0 ,
.BR \s-1EOF\s0 ,
.BR \s-1EOL\s0 ,
.BR \s-1EOL2\s0 ,
.BR \s-1STOP\s0 ,
.BR \s-1START\s0 ,
.BR \s-1SUSP\s0 ,
.BR \s-1RPRNT\s0 ,
.BR \s-1FLUSH\s0 ,
nor
.SB LNEXT
characters, nor is there any output post-processing.
.br
.ne 5
.TP
.RB [ \- ] nl
Unset
.BR icrnl ", " onlcr .
With a
.RB ` \- ',
set them.
In addition
.B \-nl
unsets
.BR inlcr ,
.BR igncr ,
.BR ocrnl ,
and
.BR onlret .
.TP
.RB [ \- ] lcase
Set
.BR xcase ,
.BR iuclc ,
and
.BR olcuc .
With a
.RB ` \- ',
unset them.
.TP
.RB [ \- ] \s-1LCASE\s+1
Same as
.BR lcase " (" \-lcase ).
.TP
.PD 0
.RB [ \- ] tabs
.TP
.B tab3
.PD
Preserve
.SM TAB
characters
when printing. With a
.RB ` \- ',
or with
.BR tab3 ,
expand
.SM TAB
characters to
.SM SPACE
characters.
.TP
.B ek
Reset the
.SB ERASE
and
.SB KILL
characters back to normal:
.SB DEL
and
.RB \s-1CTRL\s+1 -U ).
.TP
.B sane
Reset all modes to some reasonable values.
.TP
.B crt
Set options for a
.SM CRT
.RB ( echoe ,
.BR echoctl ,
and, if >= 1200 baud,
.BR echoke .)
.TP
.B dec
Set all modes suitable for Digital Equipment Corp. operating systems
users
.RB ( \s-1ERASE\s0 ,
.BR \s-1KILL\s0 ,
and
.SB INTR
characters to
.BR ^? ,
.BR ^U ,
and
.BR ^C ,
.BR decctlq ,
and
.BR crt .)
.TP
.B term
Set all modes suitable for the
terminal type
.BR term ,
where
.B term
is one of
.BR tty33 ", " tty37 ", " vt05 ", "
.BR tn300 ", " ti700 ", or " tek .
.SH "SEE ALSO"
.BR ioctl (2),
.BR termio (4)
d panel subwindows, and
It is inten./share/man/man1/stty_from_defaults.1                                                                  755       0      12         3326  4424740726  12715                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stty_from_defaults.1 1.17 89/03/26 SMI;
.TH STTY_FROM_DEFAULTS 1 "21 December 1987"
.SH NAME
stty_from_defaults \- set terminal editing characters from the defaults database
.SH SYNOPSIS
.B stty_from_defaults
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "stty_from_defaults command" "" "\fLstty_from_defaults\fR \(em set terminal from SunView defaults"
.LP
.B stty_from_defaults
is a utility provided with the
.I SunView
environment.
.LP
.B stty_from_defaults
sets the three editing characters (to erase a
character, erase a word, and kill a line) according
to the choices in your defaults database.
It does not set any other tty options.
If you run
.BR stty (1V)
in your
.B \&.login
or
.B rc.local
files, you may want to run
.B stty_from_defaults
immediately after
it.
This will override any settings of
.IR stty erase ,
.IR stty werase ,
or
.IR stty kill ,
so that you will have the same
character-editing behavior with SunView
application programs.
.LP
To specify the editing characters
.B stty_from_defaults
will set, run
.BR defaultsedit (1)
and select the "Text" category.
The editing characters are called Edit_back_char, Edit_back_word,
and Edit_back_line.
Type the value you want to the right of each item.
To specify
.SM CTRL\s0-X,
type
.RB ` \^X '\(em
that is, the three characters
.RB ` \e ',
.RB ` ^ ',
and
.RB ` X '.
To specify
.SM DEL\s0,
type
.RB ` \^? '.
.LP
If you do not specify your own values, the default values are
.SM DEL\s0,
.RB \s-1CTRL\s0 -W ,
and
.RB \s-1CTRL\s0 -U ,
respectively.
.SH SEE ALSO
.BR defaultsedit (1),
.BR stty (1V),
.BR sunview (1)
.LP
.TX SVBG
ts
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "stty_from_defaults command" "" "\fLstty_from_defaults\fR \(em set terminal from SunView defaults./share/man/man1/su.1                                                                                  755       0      12         6620  4424740726   7427                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)su.1 1.27 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SU 1 "25 March 1989"
.SH NAME
su \- super-user, temporarily switch to a new user ID
.SH SYNOPSIS
.B su
[
.B \-
]
[
.B \-f
]
[
.I username
[
.IR arg .\|.\|.
]
]
.SH DESCRIPTION
.IX  "su command"  ""  "\fLsu\fP \(em substitute user id"
.IX  "substitute user id \(em \fLsu\fP"
.IX  "super-user command"  ""  "super-user command  \(em \fLsu\fP"
.IX  "user ID"  "substitute \(em \fLsu\fP"
.LP
.B su
creates a new shell process that has the user
.SM ID
for the specified
.I username
as its real and effective user
.SM ID\s0.
.B su
asks for the password, just as if you were logging in as
.IR username ,
and, if the password is given, changes the real and effective user
.SM ID\s0s
and group
.SM ID\s0s
and group set to those of
.I username
and invokes
the shell specified in the password file for that
.IR username ,
without
changing the current directory.
The user environment is thus unchanged except for
.SB HOME
and
.BR \s-1SHELL\s0 ,
which are taken from the password file
for the user being substituted (see
.BR environ (5V)).
If
.I username
is not
.BR root ,
.SB USER
is changed to
.IR username .
The new user
.SM ID
stays in force until the shell exits.
.LP
The new shell will not be a login shell, so it will not read
.IR username 's
.B .login
or
.B .profile
files, but it will read any other configuration files for that user
(for instance, the
.B .cshrc
file for the C shell) just as if that user had invoked a new shell.
.LP
If no
.I username
is specified,
.B root
is assumed.  If the
.B wheel
group (group 0) does not contain a NULL user
list and has members, only they can
.B su
to
.BR root ,
even with the root password.
To remind the super-user of his responsibilities,
the shell substitutes
.RB ` # '
for
.RB ' $ '
or
.RB ' % '
in its usual prompt.
If
.IR arg s
are given,
they are passed to
.IR username 's
shell.
.LP
Any additional arguments given on the command line are
passed to the program invoked as the shell.
When using programs like
.BR sh (1)
and
.BR csh (1),
an
.I arg
of the form
.B \-c
.I string
executes
.I string
via the shell.
.SH OPTIONS
.TP 15
.B \-
Perform a complete login.
Remove all variables from the environment except for
.BR \s-1TERM\s0 ,
set
.SB USER
to
.IR username ,
set
.SB HOME
and
.SB SHELL
as specified above, set
.SB PATH
to
.BR :/usr/ucb:/bin:/usr/bin ,
change directories to
.IR username 's
home directory, and tell the shell to read
.IR username 's
.B \&.login
or
.B \&.profile
file.
.TP
.B \-f
Perform a fast
.B su
by passing the
.B \-f
flag to the shell.  This flag is only meant for use with the C shell; it will
prevent the C shell from reading
.IR username 's
.B \&.cshrc
file.
If it is used with the Bourne shell,
it will disable filename generation.
.SH FILES
.PD 0
.TP 20
.B \&.cshrc
.TP
.B \&.login
.TP
.B \&.profile
.PD
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR environ (5V)
.SH BUGS
.LP
.B su
fails when run from within a subdirectory of a directory that
.I username
either cannot search, or cannot read (that is,
.I username
does not have both read and execute permission).
.LP
.B su
fails to reset the user
.SM ID
to root when the current working
directory is in an
.SM NFS\s0-mounted
file system, and does not
have its search permission set for \(lqother\(rq users.

very character typed.
With a
.RB ` \- ',
do not echo back.
.TP
.RB [ \- ] echoe
Echo the
.SB ERASE
character as ./share/man/man1/sum.1v                                                                                755       0      12         3133  4424740726   7766                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sum.1v 1.12 89/03/26 SMI; from S5
.TH SUM 1  "9 September 1987"
.SH NAME
sum \- calculate a checksum for a file
.SH SYNOPSIS
.B sum
.I filename
.SH SYSTEM V SYNOPSIS
.B /usr/5bin/sum
[
.B \-r
]
.I filename
.SH DESCRIPTION
.IX "System V commands" "\fLsum\fR"
.IX  "sum command"  ""  "\fLsum\fP \(em sum and count blocks in file"
.IX  file  sum  ""  "\fLsum\fP \(em sum and count blocks in file"
.IX  "count blocks in file"  ""  "count blocks in file \(em \fLsum\fP"
.IX  "blocks, count, in file \(em \fLsum\fP"
.B sum
calculates and displays a 16-bit checksum for the named file,
and also displays the size of the file in kilobytes.
It is typically used to look for bad spots, or
to validate a file communicated over
some transmission line.
The checksum is calculated by an algorithm which may yield different results
on machines with 16-bit
.BR int s
and machines with 32-bit
.BR int s,
so it cannot
always be used to validate that a file
has been transferred between machines
with different-sized
.BR int s.
.SH SYSTEM V DESCRIPTION
.B sum
calculates and prints a 16-bit checksum for the named file,
and also prints the number of 512-byte blocks in the file.
It is typically used to look for bad spots, or
to validate a file communicated over
some transmission line.
This algorithm is independent of the size of
.BR int s
on the machine.
.SH SYSTEM V OPTIONS
The option
.B \-r
causes the (machine-dependent) algorithm used by the non-System V
.B sum
to be used in computing the checksum.
.SH "SEE ALSO"
.BR wc (1)
.SH DIAGNOSTICS
.B Read error
is indistinguishable from
.SM EOF
on most devices; check the block count.
D    	uuname.1c D  X    	uusend.1c X  l    	uustat.1c l  |    uux.1c 	      
vacation.1       val.1        vax.1       vfontinfo.1       vgrind.1        vi.1          view.1 rd.
To remind the super-user of his responsibilities,
the shell substitutes
.RB ` # '
for
.RB ' $ '
or
.RB ' % '
in its usual prompt.
If
.IR arg s
are given,
they are passed to
.IR./share/man/man1/sun.1                                                                                 755       0      12           63  4424740726   7540                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)sun.1 1.10 89/03/26 SMI;
  	sunview.1 H  \    	suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D    tail.1    T    talk.1    d    tar.1  4  t    tbl.1  D      tcopy.1       tcov.1        tee.1         tek../share/man/man1/suntools.1                                                                            755       0      12           71  4424740726  10620                                                                                                                                                                                                                                                                                                                                                                      .so man1/sunview.1
.\" @(#)suntools.1 1.50 89/03/26 SMI;
 	suspend.1 \  l    swin.1 \      switch.1        
switcher.1       
symorder.1       sync.1       sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D    tail.1    T    talk.1    d    tar.1     t    tbl.1  4      tcopy.1       tcov.1        tee.1         tek.1g        	tekt./share/man/man1/sunview.1                                                                             755       0      12        65572  4424740727  10534                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sunview.1 1.17 89/03/26 SMI;
.TH SUNVIEW 1 "22 March 1989"
.\"		following line used to xref generic tool args
.if \n(zZ .ig zZ
.SH NAME
sunview \- the SunView window environment
.SH SYNOPSIS
.B sunview
[
.B \-i
]
[
.B \-p
]
[
.BR \-B \||\| \-F \||\| \-P
]
[
.B \-S
]
[
.B \-8bit_color_only
]
[
.B \-overlay_only
]
[
.B \-toggle_enable
]
.if t .ti +.5i
[
.B \-b
.I red green blue
] 
[
.B \-d
.I display-device
] 
[
.B \-f
.I red green blue
] 
[
.B \-k
.I keyboard-device
] 
.if t .ti +.5i
[
.B \-m
.I mouse-device
] 
[
.BR \-n \||\| \-s
.I startup-filename
] 
[
.B \-background
.I raster-filename
] 
.if t .ti +.5i
[
.B \-pattern
.BR on \||
.BR off \||
.BR gray \||
.I iconedit-filename
]
.SH DESCRIPTION
.IX "SunView" "start up environment"
.IX  "sunview command"  ""  "\fLsunview\fP \(em Suntools window environment"
.IX  "window environment"  ""  "window environment \(em \fLsunview\fP"
.LP
.B sunview
starts up the SunView environment and (unless you have specified
otherwise) a default layout of a few useful \(lqtools,\(rq or window-based
applications.
.LP
See
.B Start-up Processing
below to learn how to specify your own
initial layout of tools.
Some of the behavior of 
.B sunview
is controlled by settings in your defaults database; see 
.B SunView Defaults
below, and 
.BR defaultsedit (1)
for more information.
.LP
To exit
.B sunview
use the 
.B Exit SunView
menu item. In an emergency, type
.SM CTRL-D 
then
.SM CTRL-Q
(there is no confirmation in this case).
.SH OPTIONS
.TP 15
.B \-i
Invert the background and foreground colors used on the screen.
On a monochrome monitor, this option provides a video reversed image.
On a color monitor, colors that are not used as the background and foreground
are not affected.
.TP
.B \-p
Print to the standard output the name of the window device used for
the 
.B sunview
background.
.TP
.B \-B
Use the \(lqbackground color\(rq
.RB ( " \-b " )
for the background.
.TP
.B \-F
Use the \(lqforeground color\(rq
.RB ( " \-f " )
for the background.
.TP
.B \-P
Use a stipple pattern for the background.
This option is assumed unless
.B \-F
or
.B \-B
is specified.
.TP
.B \-S
Set
.B Click-to-type
mode, allowing you to select a window by clicking in it.
Having done so, input is directed to
that window regardless of the position of the pointer,
until you click to select some other window.
.TP
.B \-8bit_color_only
For multiple plane group frame buffers, only let windows be created
in the 8 bit color plane group.
This frees up the black and white
overlay plane to have a separate desktop running on it.
This option is usually used with the 
.B \-toggle_enable
option .
See
.BR "Multiple Desktops on the Same Screen" ,
below.
.TP
.B \-overlay_only
For multiple plane group frame buffers, only let windows be created
in the black and white overlay plane group. 
This frees up the 8 bit
color plane group to have a separate desktop running in it.
This option is usually used with the 
.B \-toggle_enable
option.
See
.BR "Multiple Desktops on the Same Screen" ,
below.
.TP
.B \-toggle_enable
For multiple plane group frame buffers, when sliding the pointer
between different desktops running within different plane groups
on the same screen, change the enable plane to allow viewing of
the destination desktop.
See
.BR "Multiple Desktops on the Same Screen" ,
below.
.TP
.BI \-b " red green blue"
Specify values for the 
.IR red ,
.I green
and
.I blue
components of the background color.
If this option is not specified,
each component of the background color is 255 (white).
Sun 3/110 system users that use this option should use the
.B \-8bit_color_only
option as well.
.TP
.BI \-d " display-device"
Use 
.I display-device
as the output device, rather than
.B /dev/fb 
the default frame buffer device.
.br
.ne 3
.TP
.BI \-f " red green blue"
Specify values for the 
.IR red ,
.I green
and
.I blue
components of the foreground color.
If this option is not specified,
each component of the foreground color is 0 (black).
Sun 3/110 system users that use this option should use the
.B \-8bit_color_only
option as well.
.TP
.BI \-k " keyboard-device"
Accept keyboard input from
.IR keyboard-device ,
rather than
.BR /dev/kbd ,
the default keyboard device.
.TP
.BI \-m " mouse-device"
Use 
.I mouse-device
as the system pointing device (locator), rather than
.BR /dev/mouse ,
the default mouse device.
.TP
.B \-n
Bypass startup processing by ignoring the 
.B /usr/lib/.sunview
and
.B ~/.sunview
(and 
.BR ~/.suntools )
files.
.TP
.BI \-s " startup-filename
Read startup commands from 
.I startup-filename
instead of 
.B /usr/lib/.sunview
or 
.BR ~/.sunview ).
.TP
.BI \-background " raster-filename"
Use the indicated raster file as the image in your background.
The raster file can be created with
.BR screendump (1).
Screen dumps produced on color monitors currently do not work as
input to this option.
Small images are centered on the screen.
.HP
.BI \-pattern
.BR on \||
.BR off \||
.BR gray \|| 
.I iconedit-filename
.br
Use the indicated \(lqpattern\(rq to cover the background.
.B on
means to use the default desktop gray pattern.
.B off
means to not use the default desktop gray pattern.
.B gray
means to use a 50% gray color on color monitors.
.I iconedit-filename
is the name of a file produced with
.BR iconedit (1)
which contains an image that is to be replicated over the background.
.SH USAGE
.SS Windows
.LP
The SunView environment always has one window open, 
referred to as the background, which covers the whole screen.
A solid color or pattern is its only content.
Each application is given its own window which lies on top of
some of the background (and possibly on top of other applications).
A window obscures any part of another window which lies below it.
.SS Input to Windows
.LP
Mouse input is always directed to the window that the pointer
is in at the time.
Keyboard input can follow mouse input or, it can remain within a
designated window using the
.B Click-to-Type
default setting.
If you are not using
.BR Click-to-Type ,
and the pointer is on the background, keyboard input is discarded.
Input actions (mouse
motions, button clicks, and keystrokes)
are synchronized, which
means that you can \(lqtype-ahead\(rq and \(lqmouse-ahead,\(rq
even across windows.
.SS Mouse Buttons
.TP 20
\s-1LEFT\s0 mouse button
Click to select or choose objects.
.TP
\s-1MIDDLE\s0 mouse button
In text, click once to shorten or lengthen your selection.
In graphic applications or on the desktop, press
and hold to move objects.
.TP
\s-1RIGHT\s0 mouse button
Press and hold down to invoke menus.
.PD
.SS Menus
.LP
.B sunview
provides pop-up menus.
There are two styles of pop-up menus:
an early style, called \(lqstacking menus,\(rq and a newer style,
called \(lqwalking menus\(rq (also known as \(lqpull-right menus\(rq).
In the current release, walking menus are the default; stacking
menus are still available as a defaults option.
.LP
Usually, a menu is invoked by pressing and holding the
.SM RIGHT
mouse button.
The menu remains on the screen as long as you hold the
.SM RIGHT
mouse button down.  To choose a menu item,
move the pointer onto it (it is then highlighted),
then release the
.SM RIGHT
mouse button.
.LP
Another available option is \(lqstay-up menus.\(rq
A stay-up menu is invoked by pressing and releasing the
.SM RIGHT
mouse button.
The menu appears on the screen after you release the
.SM RIGHT
mouse button.
To choose a menu item,
move the pointer onto it (it is then highlighted),
then press and release the
.SM RIGHT
mouse button a second time.
Stay-up menus are an option in your defaults database; see
.B SunView Defaults
below. 
.LP
With walking menus, any menu item can have an arrow pointing
.RB ( \(rh )
to the right.
Moving the pointer onto this arrow pops up a \(lqsub-menu,\(rq
with additional items.
Choosing the item with an arrow (the \(lqpull-right item\(rq)
invokes the first item on the sub-menu.
.SS The SunView Menu
.LP
You can use the default SunView menu to
start SunView applications and perform
some useful functions.  
To invoke it, hold down the
.SM RIGHT
mouse button
when the pointer is anywhere in the background.
.LP
The default SunView menu is defined in the file
.BR /usr/lib/.rootmenu .
It consists of four sub-menus,
labeled
.BR Shells ,
.BR Editors ,
.BR Tools ,
and
.BR Services , 
along with an 
.B Exit
SunView item.
These sub-menus contain the following items:
.RS
.TP
.B Shells
.RS
.TP 15
.B Command Tool
Bring up a 
.BR cmdtool (1),
a scrollable window-based terminal emulator that supports a shell.
.TP
.B Shell Tool
Bring up a
.BR shelltool (1),
an tty-based terminal emulator that supports a shell.
.TP
.B Graphics Tool
Bring up a
.BR gfxtool (1),
for running graphics programs.
.TP
.B Console
Bring up a Console window, a
.BR cmdtool
with the
.B \-C
flag, to act as the system console.
Since many system messages
can be directed to the console, there should always be a console
window on the screen.
.RE
.TP
.B Editors
.RS
.TP 15
.B Text Editor
Bring up a
.BR textedit (1),
for reading and editing text files.
.TP
.B Defaults Editor
Bring up a
.BR defaultsedit (1),
for browsing or changing your defaults settings.
.TP
.B Icon Editor
Bring up a new
.BR iconedit (1).
.TP
.B Font Editor
Bring up a
.BR fontedit (1).
.RE
.TP
.B Tools
.RS
.TP 15
.B Mail Tool
Bring up a
.BR mailtool (1),
for reading and sending mail.
.TP
.B Dbx (Debug) Tool
Bring up a
.BR dbxtool (1),
a window-based source debugger.
.TP
.B Performance Meter
Bring up a
.BR perfmeter (1)
to monitor system performance.
.TP
.B Clock
Bring up a new
.BR clock (1).
.RE
.TP
.B Services
.RS
.TP 15
.B Redisplay All
Redraw the entire screen.
Use this to repair damage done by processes that wrote to the screen
without consulting the SunView system. 
.TP
.B Printing
There are two items on this submenu, 
.B "Check Printer Queue"
and
.BR "Print Selected Text" .
.B "Check Printer Queue"
displays the printer queue in your console;
.B  "Print Selected Text"
sends selected text to the standard printer.
.br
.ne 5
.TP
.B Remote Login
There are two items on this submenu,
.RB ` "Command Tool" '
and
.RB ` "Shell Tool" '.
Each creates a terminal emulator that
prompts for a machine name
and then starts a shell on that machine.
.TP
.B Save Layout
Writes out a
.B ~/.sunview
file that
.B sunview
can then use when starting up again. 
An existing
.B ~/.sunview
file is saved as
.BR ~/.sunview\- .
.TP
.B Lock Screen
Completely covers the screen with a graphics display, and \(lqlocks\(rq
the workstation until you type your password.
When you \(lqunlock\(rq the workstation, the screen is restored as it was
when you locked it.
See
.BR lockscreen (1)
for details.
.TP
.B Exit SunView
Exit from
.BR sunview ,
including all windows, and kill processes associated with them.
You return to the shell from which you started
.BR sunview .
.RE
.RE
.LP
You can specify your own SunView menu; see 
.B SunView Defaults
below for details.
.SS The Frame Menu
.LP
A small set of universal functions are available through the Frame menu.
There are also accelerators for some of these functions,
described under
.BR "Frame Menu Accelerators" ,
below.
.LP
You can invoke the Frame menu when the cursor is over a part of the
application that does not provide an application-specific menu,
such as the frame header (broad stripe holding the application's name),
the border stripes of the window, and the icon.
.TP 15
.B Close
.PD 0
.TP
.B Open
.PD
Toggle the application between closed (iconic) and open state.
Icons are placed on the screen according to the icon policy in your
defaults database; see
.B SunView Defaults
below.
When a window is closed, its underlying processes continue to run.  
.TP
.B Move
Moves the application window to another spot on the screen.
.B Move
has a sub-menu with two items:
.B Unconstrained
and
.BR Constrained .
.RS
.TP 15
.B Unconstrained
Move the window both horizontally and vertically.
.TP
.B Constrained
Moves are either vertical or horizontal, but not both.
.IP
Choosing
.B Move
invokes an
.B Unconstrained
move.
.RE
.TP
.B Resize
Shrink or stretch the size of a window on the screen.
.B Resize
has a sub-menu containing:
.RS
.TP 15
.B Unconstrained
Resize the window both horizontally and vertically.
.TP
.B Constrained
Resize vertically or horizontally, but not both.
.IP
Choosing
.B Resize
invokes an
.B Unconstrained
resize.
.TP
.B UnZoom
.TP
.B Zoom
.B Zoom
expands a window vertically to the full height of the screen.
.B UnZoom
undoes this.
.TP
.B FullScreen
Make a window the full height and width of the screen.
.RE
.TP
.B Front
Bring the window to \(lqthe top of the pile.\(rq
The whole window becomes visible, and hides any window it happens to
overlap on the screen.
.TP
.B Back
Put the window on the \(lqbottom of the pile\(rq.
The window is hidden by any window which overlaps it.
.TP
.B Props
Display the property sheet.
(Only active for applications that provide a property sheet.)
.TP
.B Redisplay
Redraw the contents of the window.
.TP
.B Quit
Notify the application to terminate gracefully.  Requires confirmation.
.br
.ne 7
.SS Frame Menu Accelerators
.LP
Accelerators are provided for some Frame menu functions.
You can invoke these functions by pushing a single button
in the window's frame header or outer border.
See the
.B SunView Beginner's Guide
for more details.
.TP 18
.B Open
Click the
.SM LEFT
mouse button when the pointer is over the icon.
.TP
.B Move
Press and hold the
.SM MIDDLE
mouse button
while the pointer is in the frame header or outer border.
A bounding box that tracks the mouse is displayed while
you hold the button down.  When you release the button, the window
is redisplayed within the bounding box.
If the pointer is near a corner, the move is
.BR Unconstrained .
If it is in the center third of an edge, the move is
.BR Constrained .
.TP
.B Resize
Hold the
.SM CTRL
key and press and hold the
.SM MIDDLE
mouse button
while the pointer is in the frame header or outer border.
A bounding box is displayed, and one side or corner tracks the mouse.
If the pointer is near a corner when you press the mouse button,
the resize is 
.BR Unconstrained ;
if in the middle third of an edge, the resize is
.BR Constrained .
.TP
.B Zoom
.PD 0
.TP
.B UnZoom
.PD
Hold the
.SM CTRL
key and click the
.SM LEFT
mouse button
while the pointer is in the frame header or outer border.
.TP
.B Front
Click the
.SM LEFT
mouse button
while the pointer is on the frame header or outer border.
.TP
.B Back
Hold the 
.SM SHIFT
key and click the
.SM LEFT
mouse button
while the pointer is on the frame header or outer border.
.LP
In addition, you can use two function keys as even faster accelerators.
To expose a window that is partially hidden, press the
.B Front
function key (normally L5)
while the pointer is anywhere in that window.
Or, if the window is completely exposed, use the
.B Front
key to hide it.
Similarly, to close an open window, press the
.B Open
key (normally L7) while the pointer is anywhere
in that window.
If the window is iconic, use the
.B Open
key to open it.
.LP
In applications with multiple windows, you can often adjust the border
between two windows up or down, without changing the overall size
of the application:
hold the
.SM CTRL
key, press the
.SM MIDDLE
mouse button over the boundary
between the two windows, and adjust
the size of the (bounded) subwindow as with 
.BR Resize .
.SS "Startup Processing:  The .sunview File"
.LP
Unless you override it,
.B sunview
starts up with a predefined layout of windows.
The default layout is specified in the file
.BR /usr/lib/.sunview .
If there is a file called
.B \&.sunview
in your home directory, it is used instead.
For compatibility with earlier releases, if there is no
.B \&.sunview
file in your home directory, but a 
.B \&.suntools
file instead, the latter file is used.
.LP
.SS SunView Defaults
.LP
SunView allows you to customize the behavior of applications and packages
by setting options in a defaults database (one for each user).
Use
.BR defaultsedit (1)
to browse and edit your defaults database.
Select the \(lqSunView\(rq category to see the following items (and
some others):
.TP 18
.B Walking_menus
If enabled, the SunView menu, the Frame menu, and many applications
will use walking menus.
Applications that have not been converted will still use stacking menus.
If disabled, applications will use stacking menus.
The default value is \(lqEnabled.\(rq
.TP
.B Click_to_Type
If enabled, keyboard input will stay in a window until you click the
.SM LEFT
or
.SM MIDDLE
mouse button in another window.
If disabled, keyboard input will follow the mouse.
The default value is \(lqDisabled.\(rq
.br
.ne 7
.TP
.B Font
You can change the SunView default font by giving the full pathname
of the font you want to use.
Some alternate fonts are in the directory
.BR /usr/lib/fonts/fixedwidthfonts .
The default font from the Sun\s-1OS\s0 2.0 release was
.BR /usr/lib/fonts/fixedwidthfonts/screen.r.13 .
The default value is null, which has the same effect as specifying
.BR /usr/lib/fonts/fixedwidthfonts/screen.r.11 .
.TP
.B Rootmenu_filename
You can change the SunView menu by giving the full pathname
of a file that specifies your own menu.
See
.B The SunView Menu File
below for details.
The default value is null, which gives you the menu found in
.BR /usr/lib/.rootmenu .
.TP
.B Icon_gravity
Determine which edge of the screen (\(lqNorth\(rq, \(lqSouth\(rq,
\(lqEast\(rq, or \(lqWest\(rq) icons will place themselves against.
The default value is \(lqNorth.\(rq
.TP
.B Audible_bell
If enabled, the \(lqbell\(rq command will produce a beep.
The default value is \(lqEnabled.\(r
.TP
.B "Visible_bell
If enabled, the \(lqbell\(rq command will cause the screen to flash.
The default value is \(lqEnabled.\(rq
.TP
.B Root_Pattern
Used to specify the \(lqpattern\(rq that covers the background.
\(lqon\(rq means to use the default desktop gray pattern.
\(lqoff\(rq means to not use the default desktop gray pattern.
\(lqgray\(rq means to use a 50% gray color on color monitors.
Anything else is the name of a file produced with
.BR iconedit (1)
which contains an image that is replicated all over the background.
The default value is \(lqon.\(rq
.LP 
After you have set the options you want in the \(lqSunView\(rq category,
click on the
.B Save
button in
.BR defaultsedit ;
then exit
.B sunview
and restart it.
.LP
Select the \(lqMenu\(rq category to see the following items (and some others):
.TP 18
.B Stay_up
If enabled, menus are invoked by pressing and releasing the
.SM RIGHT
mouse button; the menu appears after you release the
.SM RIGHT
mouse button. To choose a menu item, point at it,
then press and release the
.SM RIGHT
mouse button a second time.  The default value is \(lqFalse\(rq.
.TP
.B Items_in_column_major
If enabled, menus that have more than one column are presented in
\(lqcolumn major\(rq order (the way
.BR ls (1)
presents file names).
This may make a large menu easier to read.
The default value is \(lqFalse.\(rq
.LP
After you have set the options you want in the \(lqMenu\(rq category,
click on the
.B Save
button in
.BR defaultsedit .
Any applications you start after saving your changes will be affected by
your new choices.
For all defaults categories except for \(lqSunView\(rq, you do
.I not
need to exit
.B sunview
and restart it.
.SS "The SunView Menu File"
.LP
The file called
.B /usr/lib/.rootmenu
contains the specification of the default SunView menu.
You can change the SunView menu by creating your own file and
giving its name in the
.B Rootmenu_filename
item in the SunView Defaults.
.LP
Lines in the file have the following format:
The left side is a menu item to be displayed, and
the right side is a command to be executed when that menu item
is chosen.
You can also include comment lines (beginning with a `\fB#\fP\^')
and blank lines.
.LP
The menu item can be a string, or the
full pathname of an icon file delimited by angle brackets
(unless
.B Walking_menus
is disabled in the SunView defaults).
Strings with embedded blanks must be delimited by double quotes.
.LP
There are four reserved-word commands that can appear on the right side.
.RS
.TP 15
.SB EXIT
Exit 
.BR sunview
(requires confirmation).
.TP
.SB REFRESH
Redraw the entire screen.
.TP
.SB MENU
This menu item is a pull-right item with a submenu.
If a full pathname follows the
.SB MENU
command, the submenu contents are taken from that file.
Otherwise, all the lines between a
.SB MENU
command and a matching
.SB END
command are added to the submenu.
.TP
.SB END
Mark the end of a nested submenu.
The left side of this line should match the left side of a line
with a
.SB MENU
command.
.RE
.LP
If the command is not one of these four reserved-word commands, it is
treated as a command line and executed.
No shell interpretation is done, although you can run a shell as a
command.
.LP
Here is a menu file that demonstrates some of these features:
.RS
.TP 20n
.B Quit
\s-1EXIT\s0
.TP
.B "Mail reader"
mailtool
.TP
.B "My\ tools"
\s-1MENU\s0  /home/me/mytools.menu
.TP
.B "Click to type"
swin \-c
.TP
.B "Follow mouse"
swin \-m
.TP
.B "Print selection"
sh \-c get_selection | lpr
.TP
.B "Nested menu"
\s-1MENU\s0
.RS 5
.TP 15
.B Command Tool
cmdtool
.TP
.B Shell Tool
shelltool
.RE
.TP 20
.B "Nested menu"
\s-1END\s0
.TP
.B "Icon menu"
\s-1MENU\s0
.RS 5
.LP 
.B /usr/include/images/textedit.icon   	textedit
.LP
.B /usr/include/images/dbxtool.icon   	dbxtool
.RE
.TP 20
.B "Icon menu"
\s-1END\s0
.RE
.SS "Multiple Screens"
.LP
The 
.B sunview
program runs on either a monochrome or color screen.
Each screen on a machine with multiple screens may have a separate
.B sunview
running.
The keyboard and mouse input devices can be shared between
screens. 
Using 
.BR adjacentscreens (1)
you can set up the pointer to slide from one screen to another
when you move it off the edge of a screen.
.LP
To set up an instance of 
.B sunview
on two screens:
.IP \(bu 4
Invoke
.B sunview
on the first display as you normally would.
This starts an instance of
.B sunview
on the default frame buffer 
.RB ( /dev/fb ).
.IP \(bu
In a 
.BR shelltool ,
run: 
.RS
.IP
.B "sunview \-d"
.I device
.B &
.RE
.IP
This starts another device. (A typically choice might be
.BR /dev/cgone ).
.IP \(bu
In that same 
.BR shelltool ,
run:
.RS
.IP
.B "adjacentscreens /dev/fb \-r"
.I device
.RE
.IP
This sets up the cursor to switch between screens as it crosses
the right or left edge of the respective screens.
.SS Multiple Desktops on the Same Screen
.LP
Machines that support multiple plane groups, such as the Sun-3/110
system, can support independent
.B sunview
processes on each plane group. 
They can share keyboard and
mouse input in a manner similar to that for multiple screens.
To set up two plane groups:
.IP \(bu 4
Invoke
.B sunview
in the color plane group by running:
.RS
.IP
.B "sunview \-8bit_color_only \-toggle_enable"
.RE
.IP
This starts 
.B sunview
on the default frame buffer named
.BR /dev/fb ,
but limits access to the color plane group.
.IP \(bu
In a 
.BR shelltool ,
run:
.RS
.IP
.B "sunview \-d /dev/bwtwo0 \-toggle_enable \-n &"
.RE
.IP
This starts
.B sunview
in the overlay plane accessed by
.BR /dev/bwtwo0 .
.IP \(bu
Run:
.RS
.IP
.B "adjacentscreens \-c /dev/fb \-l /dev/bwtwo0"
.RE
.IP
This sets up the pointer to switch between desktops as it
crosses the right or left edge of the respective desktops.
.LP
Pre-3.2 applications cannot be run on the 
.B \-8bit_color_only
desktop, because they do not write to the overlay plane.
.LP
.BR switcher (1),
another application for switching between desktops, uses some amusing
video wipe animation.  It can also be used to toggle
the enable plane.  See
.BR switcher (1)
for details.
.\"		following line used to xref generic tool args
.zZ
.SS Generic Tool Arguments
.LP
Most window-based tools take the following arguments
in their command lines:
.TS
cb cb cb cb
lb lb l l .
\s-1FLAG\s0	(\s-1LONG FLAG\s0)	\s-1ARGUMENTS	NOTES\s0
\-Ww 	(\-width)   	columns
\-Wh 	(\-height)  	lines
\-Ws 	(\-size)    	\fIx y\fP	\fIx\fP and \fIy\fP are in pixels
\-Wp 	(\-position) 	\fIx y\fP	\fIx\fP and \fIy\fP are in pixels
\-WP 	(\-icon_position)	\fIx y\fP	\fIx\fP and \fIy\fP are in pixels
\-Wl 	(\-label)   	\fIstring\fP
\-Wi 	(\-iconic)  		makes the application start iconic (closed)
\-Wt 	(\-font)	\fIfilename\fP
\-Wn 	(\-no_name_stripe)
\-Wf 	(\-foreground_color)	\fBred green blue\fP	0-255 (no color-full color)
\-Wb 	(\-background_color) 	\fBred green blue\fP	0-255 (no color-full color)
\-Wg 	(\-set_default_color)		(apply color to subwindows too)
\-\s-1WI\s0 	(\-icon_image)	\fIfilename\fP	(for applications with non-default icons)
\-\s-1WL\s0 	(\-icon_label)	\fIstring\fP	(for applications with non-default icons)
\-\s-1WT\s0 	(\-icon_font)	\fIfilename\fP	(for applications with non-default icons)
\-\s-1WH\s0	(\-help)		print this table
.TE
.sp
.LP
Each flag option may be specified in either its short form or its long
form; the two are completely synonymous.
.\"             following line used to xref generic tool args
.if \n(zZ .ig zZ
.SS SunView Applications
Some of the applications that run in the SunView environment:
.IP
.BR clock (1),
.BR cmdtool (1),
.BR dbxtool (1),
.BR defaultsedit (1),
.BR fontedit (1),
.BR gfxtool (1),
.BR iconedit (1),
.br
.BR lockscreen (1),
.BR mailtool (1),
.BR overview (1),
.BR perfmeter (1),
.BR shelltool (1),
.br
.BR tektool (1),
.BR textedit (1),
.BR traffic (1)
.LP
Some of the utility programs that run in or with the SunView environment:
.IP
.BR adjacentscreens (1),
.BR clear_functions (1),
.BR get_selection (1),
.BR stty_from_defaults (1),
.br
.BR swin (1),
.BR switcher (1),
.BR toolplaces (1)
.\" .LP
.SH ENVIRONMENT
.TP 20
.SB DEFAULTS_FILE
The value of this environment variable indicates the file from which
SunView defaults are read.  When it is undefined, defaults are read
from the
.B .defaults
file in your home directory.
.SH FILES
.PD 0
.TP
.B ~/.sunview
.TP
.B /usr/lib/.sunview
.TP
.B /usr/bin/sunview
.TP
.B /usr/lib/.rootmenu
.TP
.B /usr/lib/fonts/fixedwidthfonts/*
.TP
.B /dev/win\fIx\fP
.TP
.B /dev/ptyp\fIx\fP
.TP
.B /dev/ttyp\fIx\fP
.TP
.B /dev/fb 
.TP
.B /dev/kbd 
.TP
.B /dev/mouse
.TP
.B /etc/utmp
.PD
.SH SEE ALSO
.BR adjacentscreens (1),
.BR clear_functions (1),
.BR clock (1),
.BR cmdtool (1),
.BR dbxtool (1),
.BR defaultsedit (1),
.BR fontedit (1),
.BR get_selection (1),
.BR gfxtool (1),
.BR iconedit (1),
.BR lockscreen (1),
.BR mailtool (1),
.BR overview (1),
.BR perfmeter (1),
.BR screendump (1),
.BR shelltool (1),
.BR stty_from_defaults (1),
.BR swin (1),
.BR switcher (1),
.BR tektool (1),
.BR textedit (1),
.BR toolplaces (1),
.BR traffic (1)
.SH BUGS
.LP
Console messages ignore window boundaries unless redirected to a
console window. 
This can disrupt the 
.B sunview
desktop display.
The display can be restored using the
.B Redisplay All
item on the SunView menu. 
To prevent this, use the 
.B Console
item to start a console window.
.LP
With an optical mouse, sometimes the arrow-shaped cursor does not move
at start-up; moving the mouse in large circles on its pad
normally brings it to life.
.LP
.B sunview
requires that the
.B /etc/utmp
file be given read and write permission for all users.
.LP
On a color display, colors may \(lqgo strange\(rq when the cursor is in
certain windows that request a large number of colors.
.LP
When running multiple desktops, only one console window can be used.
.LP
In
.B Click-to-type
mode, it is impossible to exit from 
.B sunview
by typing
.SM CTRL-D
\s-1CTRL-Q\s0.
.\"		following line used to xref generic tool args
.zZ
/lib/.rootmenu .
.TP
.B Icon_gravity
Determine which edge of the screen (\(lqNorth\(rq, \(lqSouth\(rq,
\(lqEast\(rq, or \(lqWest\(rq) ./share/man/man1/suspend.1                                                                             755       0      12           76  4424740727  10421                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)suspend.1 1.10 89/03/26 SMI; 
.1 1 .      
switcher.1 \      
symorder.1       sync.1 r      sysex.1       	syswait.1 1       t300.1g        t300s.1g 1g       t4013.1g 1g   $    t450.1g   4    tabs.1v   D    tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1       tcov.1 p      tee.1 ov      tek.1g .      	tektool.1  .      	telnet.1c         test./share/man/man1/swin.1                                                                                755       0      12        13067  4424740727  10004                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)swin.1 1.17 89/03/26 SMI;
.TH SWIN 1 "21 December 1987"
.SH NAME
swin \- set or get SunView user input options
.SH SYNOPSIS
.B swin
[
.B \-cghm
]
[
.B \-r
.I event
.I value
.I shift_state
]
[
.B \-s
.I event
.I value
.I shift_state
]
[
.B \-t
.I seconds
]
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX swin "" "\fLswin\fR \(em set window input behavior"
.LP
The
.B swin
(set window; analogous to
.BR stty (1V))
command lets you change some of the input behavior of your SunView
environment.
By default, your keyboard input follows your pointer.
This means that in order to type to a window you position the 
pointer over the window.  This is called
.I keyboard-follows-mouse
mode.
.LP
You can specify that the keyboard
input continues to go to the same window,
regardless of the pointer position,
until you take some specific action, like clicking the mouse.
When this is done, you can roam around the screen with the 
pointer and not change the window to which keyboard input is directed.
Running SunView like this is said to be operating in
.I click-to-type
mode.
.LP
When running in click-to-type mode, one user action
.I sets
the type-in point in the window that you want to receive keyboard input.
The default user action to do this is the clicking of the
.SM LEFT
mouse button while positioning the pointer
over the new type-in point.
This user action can be changed.
.LP
Another user action
.I restores
the previous type-in point in the window that
you want to receive keyboard input.
The default user action to do this is the clicking of the
.SM MIDDLE
mouse button while positioning the pointer
over the window.  This user action can be changed.
.SH OPTIONS
.TP
.B \-c
Turn on click-to-type mode using the default user actions: the
.SM LEFT
mouse button sets the type-in point and the
.SM MIDDLE
mouse button restores
the type-in point.  You can use the
.BR defaultsedit (1)
program to set
click-to-type on permanently; see the
.B Click_to_Type
option of
.BR sunview (1).
.TP
.B \-g
Get the state of the user input options controlled by
.BR swin .
If no arguments are supplied to
.B swin
then
.B \-g
is implied.
.TP
.B \-h
Print out a help message that briefly describes the options to
.BR swin .
.TP
.B \-m
Run in keyboard-follows-mouse mode.
.TP
.BI \-s " event value shift_state"
Set the user action that sets the type-in point and
sets the keyboard input window.  The
.I event
identifies the particular user action and is one of:
.RS
.TP
.SM LOC_WINENTER
pointer entering a window
.TP
.SM MS_LEFT
.SM LEFT
mouse button
.TP
.SM MS_MIDDLE
.SM MIDDLE
mouse button
.TP
.SM MS_RIGHT
.SM RIGHT
mouse button
.TP
.I decimal_number
place the decimal number of a firm event here;
see list of events in
.B /usr/include/sundev/vuid_event.h
(avoid function keys, normally unused control-ascii
characters are
.SM OK\s0,
normally unused
.SM SHIFT
keys are
.SM OK\s0).
.LP
.I value
identifies the transition of the
.I event
and is one of:
.TP
.SM ENTER
the pointer entering a window (use with
.SM LOC_WINENTER\s0)
.TP
.SM DOWN
the button associated with
.I event
went down
.TP
.SM UP
the button associated with
.I event
went up (avoid this)
.br
.ne 6
.LP
The
.I shift_state
identifies the state of the 
.SM SHIFT
keys at the time of the
.IR event / value
pair in order for that pair to be used to
control the keyboard input window.  The
.I shift_state
is one of:
.TP
.SM SHIFT_DONT_CARE
Ignore the state of the 
.SM SHIFT
keys
.TP
.SM SHIFT_ALL_UP
All the 
.SM SHIFT
keys must be up
.TP
.SM SHIFT_LEFT
The left
.SM SHIFT
key must be down (not the key labeled
.SM LEFT\s0)
.TP
\s-1SHIFT_RIGHT\s0
the right 
.SM SHIFT
key must be down (not the key labeled
\s-1RIGHT\s0)
.TP
\s-1SHIFT_LEFTCTRL\s0
the left 
.SM CTRL
key must be down
.TP
\s-1SHIFT_RIGHTCTRL\s0
the right 
.SM CTRL
key must be down
.RE
.TP
.BI \-r " event value shift_state"
Set the user action that restores the type-in point and
sets the keyboard input window.
This user action is swallowed so that the application that owns the window
does not see it.  However, if the window already has keyboard input or
if the window refuses keyboard input then
this user action is passed on through to the application.
The parameters to this command are like those for
.BR \-s .
The following example shows modifying the default click-to-type user
actions so that a
.SM SHIFT
left is required for the restore user event:
.RS
.IP
.B
example% swin -c -r \s-1MS_MIDDLE DOWN SHIFT_LEFT\s0
.RE
.TP
.BI \-t " seconds"
SunView synchronizes input so that it does not hand out the next user
action until the application fielding the current user action finishes
its processing.  This allows type-ahead and mouse-ahead.
If an application does not finish processing within a given
length of time (process virtual time; not wall clock time),
the next user action is handed out anyway.
This avoids any one application from hanging the workstation.
The
.B \-t
command sets this time limit.
A
.I seconds
value of 0 tells SunView to run unsynchronized;
beware of race conditions in this mode.  The default seconds value
is 2 and the
.B \-c
command makes it 10 seconds.
.SH FILES
.PD 0
.TP 20
.B /usr/include/sundev/vuid_event.h
list of event codes
.PD
.SH SEE ALSO
.BR defaultsedit (1),
.BR stty (1V),
.BR sunview (1)
.LP
.TX SVBG
.SH DIAGNOSTICS
.TP
.B "swin not passed parent window in environment"
.B swin
does not work unless SunView is started already.
.br
.ne 5
.SH BUGS
.LP
.B swin
gets you no help in preventing you from specifying
.B \-r
or
.B \-s
parameters that are not sensible.
(for applications with non-default icons)
\-\s-1WT\s0 	(\-icon_font)	\fIfilename\fP	(for applications with non-default icons)
\-\s-1WH\s0	(\-help)		print this table
.TE
.sp
.LP
Each flag option may be specified in either its short form or its long
form; the two are completely synonymous.
.\"             following line used to xref generic tool args
.if \n(zZ .ig zZ
.SS SunView Applications
Some of the applications that run in the SunView environment:
.I./share/man/man1/switch.1                                                                              755       0      12           74  4424740727  10237                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)switch.1 1.8 89/03/26 SMI; 
symorder.1       sync.1 \      sysex.1       	syswait.1       t300.1g        t300s.1g         t4013.1g    $    t450.1g   4    tabs.1v   D    tail.1    T    talk.1 s  d    tar.1  l  t    tbl.1 lk      tcopy.1       tcov.1        tee.1  p      tek.1g v      	tektool.1       	telnet.1c       test.1v        
textedit.1         text./share/man/man1/switcher.1                                                                            755       0      12         7450  4424740727  10633                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)switcher.1 1.16 89/03/26 SMI;
.TH SWITCHER 1 "22 March 1989"
.SH NAME
switcher \- switch attention between multiple SunView desktops on the same physical screen
.SH SYNOPSIS
.B switcher
[
.B \-d
.I frame-buffer
] [
.BR \-s
.BR n \||\|\c
.BR l \||\|\c
.BR r \||\|\c
.BR i \||\|\c
.BR o \||\|\c
.B f
]
.if n .br
[
.B \-m
.I x y
] [
.B \-n
] [
.B \-e
.BR 0 \||\|\c
.B 1
]
.SH AVAILABILITY
.LP
This command is available for Sun-2, Sun-3 and Sun-4 systems with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  switcher  ""  "\fLswitcher\fP"
.IX  "window management"  "switcher utility"  ""  "\fLswitcher\fP utility"
.LP
.B switcher
is used as an alternative to
.BR adjacentscreens (1)
for getting between desktops on the Sun-3/110.
Clicking the switcher icon
gets you to another desktop using some amusing video-wipe animation.
When using walking menus, a menu is available to invoke the switch as well.
.B switcher
can also be used to simply set the enable
plane
to 0 or 1 should it get out of wack.
.LP
.SH OPTIONS
.TP
.BI \-d " frame-buffer"
The
.I frame buffer
is a frame buffer device name, such as
.BR /dev/fb ,
.B /dev/cgfour
or
.BR /dev/bwtwo0 ,
on which the desktop that you
want to get to resides.  This name is the same one supplied to
.B sunview
.
The
.B \-d
flag is optional; if not specified,
the default device is
.B /dev/fb
.
.HP
.B \-s
.BR n \||\|\c
.BR l \||\|\c
.BR r \||\|\c
.BR i \||\|\c
.BR o \||\|\c
.B f
.br
The
.B \-s
flag specifies the type of animation used when switching:
.B n
(now),
.B l
(left wipe),
.B r
(right  wipe),
.B i
(tunnel in),
.B o
(tunnel out),
or
.B f
(fade).
The
.B \-s
flag is optional because if not specified,
the default animation is to switch immediately.
.B n
(now) mode.
.TP
.BI \-m "x y"
The
.B \-m
indicates what the mouse position should be on the
destination desktop after the switch.
An
.RI ( x
.IR y )
value-pair of (\-1 \-1) says to use the position
of the mouse on the desktop at the time of the switch as the mouse
position on the destination desktop.
The
.B \-m
flag is optional; if not specified,
the default is (\-1 \-1).
.TP
.B \-n
The
.B \-n
flag
means no switcher icon is wanted so do the switch right now and exit
.B switcher
after the switch.  This is handy if you want to
switch
from a root menu command.
.TP
.BR "\-e 0" \||\| 1
The
.B \-e
flag causes the overlay enable plane of the device specified
with the
.B -d
flag to be set to either 0 (show color) or
1 (show black and white).
.B switcher
run with this option has
nothing to do with SunView, only the enable plane is set.
.LP
.SH EXAMPLE
.LP
A common multiple desktop configuration
for the Sun-s/110 is one monochrome
and one color desktop.   You could set up an instance of
.BR sunview (1)
on each plane group in the following way:
.TP
1.
Invoke
.B sunview
in the color plane group by running:
.RS
.IP
.B "example% sunview \-8bit_color_only \-toggle_enable"
.RE
.IP
This starts
.B sunview
on the default frame buffer named
.B /dev/fb
but limits access to the color plane
group.
.TP
2.
In a
.BR shelltool (1),
run:
.RS
.IP
.B "example% sunview \-d /dev/bwtwo0 \-toggle_enable &"
.RE
.IP
This starts
.B sunview
in the overlay plane that is accessed by
.BR /dev/bwtwo0 .
.TP
3.
In a
.B shelltool
on the original desktop run:
.RS
.IP
.B "example% switcher \-d /dev/bwtwo0 \-s i &"
.RE
.IP
Clicking on the switcher icon when it is visible moves you to the
.B /dev/bwtwo0
desktop.
.TP
4.
In a
.B shelltool
on the
.B /dev/bwtwo0
desktop run:
.RS
.IP
.B example% switcher \-s o &
.RE
.IP
Clicking on the switcher icon when it is
visible moves you back to the
.B /dev/fb
desktop.
.SH FILES
.PD 0
.TP 20
.B /usr/bin/switcher
.TP
.B /dev/bwtwo0
.TP
.B /dev/fb
.TP
.B /dev/cgfour
.PD
.SH "SEE ALSO"
.BR adjacentscreens (1),
.BR shelltool (1),
.BR sunview (1)
s long
form; the two are completely synonymous.
.\"             following line used to xref generic tool args
.if \n(zZ .ig zZ
.SS SunView Applications
Some of the applications that run in the SunView environment:
.I./share/man/man1/symorder.1                                                                            755       0      12         2367  4424740727  10651                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)symorder.1 1.13 89/03/26 SMI;
.TH SYMORDER 1 "22 March 1989"
.SH NAME
symorder \- rearrange a list of symbols
.SH SYNOPSIS
.B symorder
[
.B \-s
]
.I orderlist symbolfile
.SH DESCRIPTION
.IX symorder "" "\fLsymorder\fR \(em update symbol table ordering"
.LP
.I sysmfile 
is a file containing symbols to be found in objectfile,
1 symbol per line.
.LP
.I objectfile
is updated in place to put the requested symbols first
in the symbol table, in the order specified.  This is done
by swapping the old symbols in the required spots with the
new ones.  If all of the order symbols are not found, an
error is generated.
.LP
This program was specifically designed to cut down on the
overhead of getting symbols from
.BR /vmunix .
.SH Sun386i DESCRIPTION
.LP
Symbols specified on the command
line are moved to the beginning of the output symbol table, not swapped.
Therefore, the symbols specified on the command line will appear in
order at the beginning of the output symbol table, followed by the
original symbol table with the gaps created by the moved symbols closed.
.SH OPTIONS
.TP
.B \-s
Work silently, that is, display nothing except error messages.
This is useful for checking the error status.
.SH FILES
.PD 0
.TP 20
.B /vmunix
.PD
.SH "SEE ALSO"
.BR nlist (3)
  unset.1       
unsetenv.1        uptime.1 1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c c   X    	uusend.1c 0  l    	uustat.1c D  |    uux.1c 1./share/man/man1/sync.1                                                                                755       0      12         1220  4424740730   7736                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sync.1 1.12 89/03/26 SMI; from UCB 4.2
.TH SYNC 1  "9 September 1987"
.SH NAME
sync \- update the super block; force changed blocks to the disk
.SH SYNOPSIS
.B sync
.SH DESCRIPTION
.IX  "sync command"  ""  "\fLsync\fP \(em update super block"
.IX  "update super block"  ""  "update super block \(em \fLsync\fP"
.IX  "flush disk activity"  ""  "flush disk activity \(em \fLsync\fP"
.B sync
forces any information on its way to the disk to be written out
immediately.
.B sync
can be called to ensure that all disk writes are completed before the
processor is halted abnormally.
.SH "SEE ALSO"
.BR cron (8),
.BR fsck (8),
.BR halt (8),
.BR reboot (8)
  
traffic.1c        troff.1       true.1 f      tset.1 e      tsort.1       tty.1 or  ,    u370.1 .  <    u3b.1 70  L    u3b15.1   \    u3b2.1 1  l    u3b5.1 2  |    ul.1 3b5      umask.1       	unalias.1 1       uname.1v  1       uncompress.1        
unexpand.1       ./share/man/man1/sysex.1                                                                               755       0      12        11266  4424740730  10170                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sysex.1	1.13 89/03/26 SMI
.TH SYSEX 1  "11 February 1988" 
.SH NAME 
sysex \- invoke the system exerciser
.SH SYNOPSIS
.B sysex
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "sysex command" "" "\fLsysex\fR command"  
.LP
.B sysex
is the system exerciser for Sun386i systems.  
.LP
This program is designed to run under the SunView 
environment, 
but a dumb terminal interface is provided.  
The program tests subsystems of a Sun386i system,
printing information to the console and log files.
Most commands are accessible by way of buttons, toggle switches, or menus. 
A startup file
.BR .sysexrc ,
can be created by experienced users to set runtime parameters. 
.SH USAGE
.SS Subwindows
.TP 15
Control Panel 
Tells which version of the exerciser is running. User controls 
.B sysex 
executions through the toggles, buttons, and sliders in this panel.
.TP
Perfmon window
Graphically displays system statics. The standard SunView
.BR perfmeter (1).
.TP
Console window 
Displays the system messages and 
.B sysex 
error messages.
.TP
Status Window
Displays pass counts and error counts for all tests that are currently selected.
Also displays system pass count, and total system errors.  Elapsed time 
signifies time since start button is pressed.
.SS Load Sliders
These slide bars allow the user to modulate the load on the system.
.TP
\s-1I/O-CPU\s0 Load
Moving this slider changes the balance between I/O-intensive and
compute-intensive tests that are running.
.TP
.SM "SYSTEM LOAD"
Moving this slider increases and decreases the system activity
generated by 
.B sysex.
.SS Test Toggles
Each test selection on the control panel is selectable
by moving the cursor over to the toggle and
pressing the left mouse button.  
.LP
The tests are displayed by device groups in the control panel.
A test is enabled when a check mark is seen in the box.
Clicking left on the group label
acts as a group enable/disable for all     Wed tests in that device group.  Currently
there are tests for physical memory and virtual memory, fixed disk, diskette,
Ethernet, 
.\"floating point, 
and color frame buffer.
.SS Command Buttons
Command buttons exist for the following commands:
.LP
.TP 15
.B Quit Sysex
Stop all current tests and exit the exerciser.  All logs will be saved.
.TP
.B Log Files
Display menu for choosing a log to view, reset, or print.
.TP
.B Options
Display window through which 
.B .sysexrc
parameters can be modified.
.TP
.B Print Screen
Take screendump of the current screen.
.TP
.B Start Tests
Start all test from pass0 that have been selected.  Resets pass count. Toggles to Stop Tests. Begin elapsed time count.
.TP
.B Stop Tests
Stop all tests that are running.  Toggles to Start Tests. 
.TP
.B Pause
Pause tests by issuing 
.SM SIGSTP.
.TP
.B Continue
Continue testing from the stopped state without resetting pass count. 
Toggles to Pause,leaves pass counts intact.  Will continue 
elapsed time count if Continued from a Pause.
.SS Logs
When the user selects the
.SM DISPLAY LOGS
button and chooses
from the log menu, a scrollable pop-up window
will display the log, which can be one of
.BR /var/sysex/sysex.info ,
.BR /var/sysex/sysex.error ,
or 
.BR /etc/adm/messages .
Logs contain messages classified as
.SM INFO,
.SM WARNING,
.SM ERROR,
or
.SM FATAL.
The
.SM INFO
file contains all messages; the
.SM ERROR
file contains only error and fatal messages.  
.SS Variables
The 
.B sysex
program has several variables than can be set in the
.B .sysexrc
file. Some of the variables pertain to only one test 
and others are global to all tests.  Clicking Done will save changes
to the
.B .sysexrc
file.  Clicking
.B Cancel
leaves options unchanged.  
.LP
.TP
.B verbose
Display messages about what is currently taking place.
.TP
.B verify 
Run through a cursory pass of tests to see all subsystems present.
.TP
.B run_on_err
Halt subsystem testing when an error occurs.
.TP
.B sysex_halt_on_err
Stop 
.B sysex
if an error occurs in any subsystem.
.TP
.B core
Create core dump in 
.IR /var/sysex .
.TP
.B single_pass
Run one pass of each selected device test.
.LP
For the expert user, more commands are available by clicking the
manufacturing cycle to Enabled.  This displays the following
options:
.LP
.TP 10
.B fdc_wait
Variable wait time between executions of the diskette test.
.TP
.B vmem_wait
Variable delay between successive executions of the virtual memory test.
.TP
.B debug
Display all messsages to aid analysis of problem systems.
.TP
.B check_eeprom
Read 
.SM NVRAM 
configuration information and display values.
.TP
.B intervention
Turn on or off the confirmer for all destructive tests, or for tests requiring media.  
.SH FILES
.PD 0
.TP 20
.B /usr/sysex/sysex
.TP
.B /var/sysex/core
.TP
.B /var/sysex/sysex.info
.TP
.B /var/sysex/sysex.error
.PD
are read
from the
.B .defaults
file in your home directory.
.SH FILES
.PD 0
.TP
.B ~/.sunview
.TP
.B /usr/lib/.sunview
.TP
.B /usr/bin/sunview
.TP
.B /usr/lib/.rootmenu
.TP
.B /usr/lib/fonts/fixedwidthfonts/*
.TP
.B /dev/win\fIx\fP
.TP
.B /dev/ptyp\fIx\fP
.TP
.B /dev/ttyp\fIx\fP
.TP
.B /dev/fb 
.TP
.B /dev/kbd 
.TP
.B /dev/mouse./share/man/man1/syswait.1                                                                             755       0      12         1444  4424740730  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)syswait.1 1.6 89/03/26 SMI; 
.TH SYSWAIT 1 "19 February 1988"
.SH NAME
syswait \- execute a command, suspending termination until user input
.SH SYNOPSIS
.B syswait
.I message
.I command
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX syswait "" "\fLsyswait\fR \(em execute a command"
.LP
.B syswait
executes a specified command, suspending termination until the
user types any character.
.I message
is the message prompting the user to type a character to terminate the
command.  
.I command
is the command to be executed.
.SH EXAMPLE
.LP
The following example invokes a cmdtool and executes
.RB ` "ls *.c" ',
but waits for the user to type a character
before terminating the
.B ls
and closing the cmdtool window.
.IP
\fBcmdtool syswait "Press any key to quit\|.\|.\|." "ls *.c" &\fR
u3b2.1    l    u3b5.1    |    ul.1 1 1      umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        ./share/man/man1/t300.1g                                                                               755       0      12           63  4424740730   7563                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)t300.1g 1.4 89/03/26 SMI;
  t4013.1g     $    t450.1g   4    tabs.1v   D    tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1       tcov.1 p      tee.1 ov      tek.1g .      	tektool.1  p      	telnet.1c       test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1 p  L    time.1v   \    tip.1c e  t    toolplaces.1  t      ./share/man/man1/t300s.1g                                                                              755       0      12           64  4424740730   7747                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)t300s.1g 1.4 89/03/26 SMI;
    t450.1g   4    tabs.1v   D    tail.1    T    talk.1 s  d    tar.1  l  t    tbl.1 lk      tcopy.1       tcov.1        tee.1  p      tek.1g v      	tektool.1       	telnet.1c       test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1    L    time.1v   \    tip.1c    t    toolplaces.1        touch.1v      ./share/man/man1/t4013.1g                                                                              755       0      12           64  4424740730   7651                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)t4013.1g 1.4 89/03/26 SMI;
  tabs.1v   D    tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1       tcov.1 p      tee.1 ov      tek.1g .      	tektool.1  v      	telnet.1c       test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1 p  L    time.1v   \    tip.1c e  t    toolplaces.1  t      touch.1v        tput.1v       ./share/man/man1/t450.1g                                                                               755       0      12           63  4424740731   7572                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)t450.1g 1.4 89/03/26 SMI;
tail.1 s  T    talk.1 l  d    tar.1 lk  t    tbl.1 r.      tcopy.1       tcov.1 p      tee.1 ov      tek.1g .      	tektool.1  .      	telnet.1c  v      test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1 p  L    time.1v   \    tip.1c e  t    toolplaces.1  t      touch.1v  t      tput.1v       tr.1v ut      trac./share/man/man1/tabs.1v                                                                               755       0      12         7501  4424740731  10112                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tabs.1v 1.9 89/03/26 SMI; from S5R3
.TH TABS 1V "7 January 1988"
.SH NAME
tabs \- set tab stops on a terminal
.SH SYNOPSIS
.B /usr/5bin/tabs
[
.I tabspec
] [
.BI \-T type
] [
.BI +m n
]
.SH AVAILABILITY
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "tabs command" "" "\fLtabs\fR command"  
.LP
.B tabs
can be used to specify
.SM TAB 
stops on terminals that support
remotely-settable hardware
.SM TAB
characters.
.SM TAB
stops are set according to the
.I tabspec
option, as described below, and previous settings are erased.
.LP
Four types of tab specification are accepted for
.IR tabspec .
They are:
.LP
.TP 8
.BI \- code
Set the
.SM TAB
stops according to the canned
.SM TAB
setting specified by
.IR code ,
as given by
.BR fspec (5).
.TP 8
.BI \- n
Set the
.SM TAB
stops at intervals of
.I n
columns, that is, at
.RI 1+ n ,
.RI 1+2\(** n ,
and so on, as per the
.BI \- n
specification as given by
.BR fspec (5).
.TP
.IR n1 , n2 ,\|.\|.\|.
Set the
.SM TAB
stops at positions
.IR n1 ,
.IR n2 ,
and so on, as per the
.IR n1 , n2 ,\|.\|.\|.
specification as given by
.BR fspec (5).
.TP
.BI \-\|\- file
Read the first line of the file specified by
.IR file ,
searching for a format specification as given by
.BR fspec (5).
If this line contains a format specification, set the
.SM TAB
stops accordingly,
otherwise set them to every 8 columns.
This type of specification may be used to make sure that a file containing a
.SM TAB
specification is displayed with correct
.SM TAB 
settings.  For example, it can be used with the
.BR pr (1V)
command:
.RS
.IP
.B "tabs \-\|\-file; pr file"
.RE
If no
.I tabspec
is given, the default value
is
.BR \-8 ,
the standard default
.SM TAB
setting. The
lowest column number is 1. Note: for
.BR tabs ,
column 1 always refers to the leftmost column on a
terminal, even one whose column markers begin at 0,
(such as the
.SM DASI
300,
.SM DASI
300s,
and
.SM DASI
450).
.SM TAB
and margin setting is performed by echoing to the proper
sequences to the standard output.
.SH OPTIONS
.TP
.BI \-T type
.B tabs
usually needs to know the type of terminal in
order to set
.SM TAB
characters, and always needs to know
to set margins.
.I type
is a name listed in
.BR term (5).
If no
.B \-T
flag is supplied,
.B tabs
uses the value of the environment variable
.SM
.BR TERM .
If
.SB TERM
is not defined in the environment (see
.BR environ (5V)),
.B tabs
tries a default sequence that will work for many terminals.
.TP
.BI +m n
The margin argument may be used for some terminals.
It moves all
.SM TAB
stops over
.I n
columns by making column
.IR n +1
the left margin. If
.B +m
is given without a value of
.IR n ,
the value assumed is 10. For
a TermiNet, the first value in the tab list should
be 1, or the margin will move even further to the
right. The normal (leftmost) margin on most terminals
is obtained by
.BR +m0 .
The margin for most terminals is reset only when the
.B +m
flag is given explicitly.
.\".SH DIAGNOSTICS
.\".TP
.\".B illegal tabs
.\".SM TAB
.\"characters are ordered incorrectly in the specification.
.\".TP
.\".B illegal increment
.\"A missing or zero increment is found in the specification.
.\".TP
.\".B unknown tab code
.\"An invalid predefined code was specified.
.\".TP
.\".B can't open
.\"The file named in the 
.\".BI \-\|\- file
.\"option could not be opened.
.\".TP
.\".B file indirection
.\"The
.\".BI \-\|\- file
.\"option was used and the specification in the file points to another file.
.\".SH SEE ALSO
.BR pr (1V),
.BR tput (1V),
.BR fspec (5),
.BR terminfo (5V),
.BR environ (5V),
.BR term (5)
.SH BUGS
There is no consistency between different terminals regarding
ways of clearing tabs and setting the left margin.
.LP
.B tabs
clears only 20 tabs (on terminals requiring a long
sequence), but is willing to set 64.
sysex_halt_on_err
Stop 
.B sysex
if an error occurs in any subsystem.
.TP
.B core
Create core dump in 
.IR /var/sysex .
.TP
.B single_pass
Run one pass of each selected device test.
.LP
For t./share/man/man1/tail.1                                                                                755       0      12         5152  4424740731   7724                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tail.1 1.12 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH TAIL 1  "9 September 1987"
.SH NAME
tail \- display the last part of a file
.SH SYNOPSIS
.B tail
\fB+\|\fR|\fB\|\-\c
.I number
[
.B lbc
] [
.B fr
] [
.I filename
]
.IX  "tail command"  ""  "\fLtail\fP \(em display last part of file"
.IX  display "last part of file \(em \fLtail\fP"
.IX  file  "display last part of"  ""  "display last part of \(em \fLtail\fP"
.IX  "text processing utilities"  tail  ""  "\fLtail\fP \(em display last part of file"
.SH DESCRIPTION
.B tail
copies
.I filename
to the standard output beginning at a
designated place.  If no file is named, the standard input is used.
.SH OPTIONS
.LP
Options are all jammed together, not specified separately with their
own
.RB ` \- '
signs.
.TP
.BI \+ number
Begin copying at distance
.I number
from the beginning of the file.
.I number
is counted in units of lines, blocks or
characters,
according to the appended option
.BR l ,
\fBb\fP, or
.BR c .
When no units are specified, counting is by lines.
If
.I number
is not specified, the value 10 is used.
.TP
.BI \- number
Begin copying at distance
.I number
from the end of the file.
.I number
is counted in units of lines, blocks or
characters,
according to the appended option
.BR l ,
\fBb\fP, or
.BR c .
When no units are specified, counting is by lines.
If
.I number
is not specified, the value 10 is used.
.TP
.B l
.I number
is counted in units of lines.
.TP
.B b
.I number
is counted in units of blocks.
.TP
.B c
.I number
is counted in units of characters.
.TP
.B r
Copy lines from the end of the file in
reverse order.  The default
for
.B r
is to print the entire file in reverse order.
.TP
.B f
If the input file is not a pipe,
do not terminate after the line of the input
file has been copied, but enter an endless loop,
sleeping for a second and then attempting to read and copy
further records from the input file.
This option may be used to monitor the growth of a file that is
being written by some other process.
For example, the command:
.RS
.IP
.B tail \|\-f \|fred
.RE
.IP
will print the last ten lines of the file
.BR fred ,
followed by any lines that are appended to
.B fred
between the time
.B tail
is initiated and killed.
As another example, the command:
.RS
.IP
.B tail \|\-15cf \|fred
.RE
.IP
will print the last 15 characters of the file
.BR fred ,
followed by any lines that are appended to
.B fred
between the time
.B tail
is initiated and killed.
.SH "SEE ALSO"
.BR dd (1)
.SH BUGS
Data for a tail relative to the end of the file is stored in a buffer,
and thus is limited in size.
.LP
Various kinds of anomalous behavior may happen with character special
files.
 used with the
.BR pr (1V)
command:
.RS
.IP
.B "tabs \-\|\-file; pr file"
.RE
If no
.I tabspec
is given, the default value
is
.BR \-8 ,
the standard default
.SM TAB
setting. The
lowest column number is 1. Note: for
.BR tabs ,
column 1 always refers to the leftmost column on a
terminal, even one whose column markers begin at 0,
(such as the
.SM DASI
300,
.SM DASI
300s,
and
.SM DASI
450).
.SM TAB
and marg./share/man/man1/talk.1                                                                                755       0      12         4406  4424740731   7727                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)talk.1 1.15 89/03/26 SMI;
.TH TALK 1 "22 March 1989"
.SH NAME
talk \- talk to another user
.SH SYNOPSIS
.B talk
.I username
[
.I ttyname
]
.IX  "talk command"  ""  "\fLtalk\fP \(em talk to another user"
.IX  communications  talk  ""  "\fLtalk\fP \(em talk to another user"
.IX  user  "talk to another"  ""  "talk to another \(em \fLtalk\fP"
.SH DESCRIPTION
.LP
.B talk
is a visual communication program which
copies lines from your terminal
to that of another user.
.LP
If you wish to talk to someone on your own machine, then
.I username
is just the person's login name. If you wish to talk to
a user on another host, then
.I username
is one of the following forms :
.RS
.nf
.IB host ! user
.IB host . user
.IB host : user
.IB user @ host
.fi
.RE
though
.IB user @ host
is perhaps preferred.
.LP
If you want to talk to a user who is logged in more than once, the
.I ttyname
argument may be used to indicate the appropriate terminal name.
.LP
When first called,
.B talk
sends the message:
.RS
.IP
.nf
.BI "Message from TalkDaemon@" his_machine  at time .\|.\|.
.BI "talk: connection requested by " "your_name" @ "your_machine" .
.BI "talk: respond with: talk " your_name @ your_machine
.fi
.RE
to the user you wish to talk to.
At this point, the recipient of the
message should reply by typing:
.IP
.BI "example% talk " your_name @ your_machine
.LP
It does not matter from which machine the
recipient replies, as long as their login name
is the same.  Once communication is established, the two
parties may type simultaneously, with their output appearing in
separate windows.  Typing
.SM CTRL\s0\c
.B \-L
redraws the screen,
while your erase, kill, and word kill characters will work in
.B talk
as normal.  To exit, just type your interrupt character;
.B talk
then moves the cursor to the bottom
of the screen and restores the terminal.
.LP
Permission to talk may be denied or granted by use of the
.B mesg
command.  At the outset talking is allowed.
Certain commands, in particular
.BR nroff (1)
and
.BR pr (1V)
disallow messages in order to prevent messy output.
.LP
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
to find the recipient's machine
.TP
.B /etc/utmp
to find the recipient's tty
.PD
.SH "SEE ALSO"
.BR mail (1),
.BR mesg (1),
.BR nroff (1),
.BR pr (1V),
.BR who (1),
.BR write (1),
.BR talkd (8C)
ed in
.BR term (5).
If no
.B \-T
flag is supplied,
.B tabs
uses the value of the environment variable
.SM
.BR TERM .
If
.SB TERM
is not defined in the environment (see
.BR environ (5V)),
.B tabs
tries a default sequence that will work for many termin./share/man/man1/tar.1                                                                                 755       0      12        27430  4424740731   7604                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tar.1 1.38 89/03/26 SMI;
.TH TAR 1 "22 March 1989"
.SH NAME
tar \- create tape archives, and add or extract files
.SH SYNOPSIS
.B tar
[
.B \-
]
.B c\||\|r\||\|t\||\|u\||\|x
[
.B bBefFhilmopvwX014578
]
[
.I tarfile
]
[
.I blocksize
]
.if n .ti +.5i
[
.I exclude-file
]
.if n .ti +.5i
[
.B \-I
.I include-file
]
.if t .ti +0.5i
.I filename1 filename2
\&.\|.\|.
.if n .ti +.5i
.B \-C
.I directory filenameN
\&.\|.\|.
.IX  "tar command"  ""  "\fLtar\fP \(em tape archiver"
.IX  "tape archives"  ""  "tape archives \(em \fLtar\fP"
.IX  "archive tapes" "" "archive tapes \(em \fLtar\fP"
.SH DESCRIPTION
.LP
.B tar
archives and extracts multiple files onto a single
.BR tar ,
file archive, called a
.IR tarfile .
A tarfile is usually a magnetic tape, but it can be any file.
.BR tar 's
actions are controlled by the first argument, the
.IR key ,
a string
of characters containing exactly one function letter from the set
.BR crtux ,
and one or more of the optional function
modifiers listed below.  Other
arguments to
.B tar
are file or directory names that specify which
files to archive or extract.  In all cases, the appearance of a
directory name refers recursively to the files and subdirectories
of that directory.
.SH "FUNCTION LETTERS"
.TP
.B c
Create a new
.I tarfile
and write the named files onto it.
.TP
.B r
Write the named files on the end of the
.IR tarfile .
Note: this option
.I "does not work"
with quarter-inch archive tapes.
.TP
.B t
List the table of contents of the
.IR tarfile .
.TP
.B u
Add the named files to the
.I tarfile
if they are not there or if they have been modified since they
were last archived.  Note: this option
.I "does not work"
with quarter-inch archive tapes.
.TP
.B x
Extract the named files from the
.IR tarfile .
If a named file
matches a directory with contents written onto the tape, this
directory is (recursively) extracted.
The owner, modification time, and mode
are restored (if possible).  If no
.I filename
arguments are given, all files in the archive are extracted.  Note:
if multiple entries specifying the same file are on the tape, the
last one overwrites all earlier versions.
.SH "FUNCTION MODIFIERS"
.TP
.B b
Use the next argument as the blocking factor for tape records.
The default blocking factor is 20 blocks.  The block size is determined
automatically when reading tapes (key letters
.B x
and
.BR t ).
This determination of the blocking factor
may be fooled when reading from a
pipe or a socket (see the
.B B
key letter below).  The maximum
blocking factor is determined only by the amount of memory available to
.B tar
when it is run.  Larger blocking factors result in
better throughput, longer blocks on nine-track
tapes, and better media utilization.
.TP
.B B
Force
.B tar
to perform multiple reads (if necessary) so as to read exactly enough
bytes to fill a block.  This option exists so that
.B tar
can work across the Ethernet, since pipes and sockets return partial
blocks even when more data is coming.
.TP
.B e
If any unexpected errors occur
.B tar
will exit immediately with a
positive exit status.
.TP
.B f
Use the next argument as the name of the
.IR tarfile .
If
.B f
is omitted, use the device indicated by the 
.SB TAPE
environment variable, if set.  Otherwise, use
.BR /dev/rmt8 
by default.
If 
.I tarfile
is given as
.RB ` \- ',
.B tar
writes to the standard output or reads from
the standard input, whichever is appropriate.  Thus,
.B tar
can be used as the head or tail of a filter chain.
.B tar
can also be used
to copy hierarchies with the command:
.RS
.IP
.B
example% cd fromdir; tar cf \- . | (cd todir; tar xfBp \-)
.RE
.TP
.B F
With one
.B F
argument specified, exclude
all directories named
.SM SCCS
from
.IR tarfile .
With two arguments
.BR FF ,
exclude all directories named
.SM SCCS\s0,
all files with
.B \&.o
as as their suffix,
and all files named
.BR errs ,
.BR core ,
and
.BR a.out .
.TP
.B h
Follow symbolic links as if they were
normal files or directories.  Normally,
.B tar
does not follow symbolic links.
.TP
.B i
Ignore directory checksum errors.
.TP
.B l
Display error messages if all links to
archived files cannot be resolved.  If
.B l
is not used, no error messages are printed.
.TP
.B m
Do not extract modification times of extracted files.
The modification time
will be the time of extraction.
.TP
.B o
Suppress information specifying owner and modes of
directories which
.B tar
normally places in the archive.
Such information makes former versions of
.B tar
generate an error message like:
.RS
.IP
.BI < filename ">/: cannot create"
.RE
.IP
when they encounter it.
.TP
.B p
Restore the named files to their original modes, ignoring the present
.BR umask (2).
Set\s-1UID\s0
and sticky information are also extracted if you are
the super-user.  This option is only useful with the
.B x
key letter.
.TP
.B v
Verbose.
Normally
.B tar
does its work silently; this
option displays the name of each file
.B tar
treats, preceded by the function
letter.  When used with the
.B t
function,
.B v
displays the
.I tarfile
entries in a form similar to
.RB ` "ls\ \-l" '.
.TP
.B w
Wait for user confirmation before taking
the specified action.  If you use
.BR w ,
.B tar
displays the action to be taken followed by the
file name, and then waits for a
.B y
response to proceed.  No action is
taken on the named file if you type
anything other than a line beginning with
.BR y .
.TP
.B X
Use the next argument as a file containing a list of named files
(or directories) to be excluded from the
.I tarfile
when using the key letters
.BR c ,
.BR x ,
or
.BR t .
Multiple
.B X
arguments may be used, with one
.I exclude file
per argument.
.TP
.B 014578
Select an alternate drive on which the tape is mounted.  The numbers
.BR 2 ,
.BR 3 ,
.BR 6 ,
and
.B 9
do not specify valid drives.  The default is
.BR /dev/rmt8 .
.LP
If a file name is preceded by
.BR \-I
then the filename is opened.
A list filenames, one per line, is treated
as if each appeared separately on the command line.
Be careful of trailing white space in both include and exclude file lists.
.LP
In the case where excluded files (see
.B X
option)
also exist, excluded files take
precedence over all included files.
So, if a file is specified in both the
include and exclude files (or on the command line),
it will be excluded.
.LP
If a file name is preceded by
.BR \-C
in a
.B c
(create) or
.B r
(replace) operation,
.B tar
will perform a
.B chdir
(see
.BR csh (1))
to that file name.  This allows multiple directories not
related by a close common parent to be archived using short
relative path names. See
.SB EXAMPLES
below.
.LP
Note: the
.B \-C
option only applies to
.I one
following directory name and
.I one
following file name.
.SH EXAMPLES
.LP
To archive files from
.B /usr/include
and from
.BR /etc ,
one might use:
.IP
.B
example% tar c \-C /usr  include \-C /etc  .
.LP
If you get a table of contents from the resulting
.IR tarfile ,
you will see something like:
.RS
.sp .5
.nf
.B include/
.B include/a.out.h
.IB "and all the other files in " "/usr/include \fR.\|.\|.\fP/chown"
.IB "and all the other files in " /etc
.fi
.RE
.LP
Here is a simple example using
.B tar
to create an archive of your
home directory on a tape mounted on drive
.BR /dev/rmt0 :
.RS
.sp .5
.nf
.B example% cd	
.B example% tar cvf /dev/rmt0 .
.IB "messages from " tar
.fi
.RE
.LP
The
.B c
option means create the archive; the
.B v
option makes
.B tar
tell you what it is doing as it works;  the
.B f
option
means that you are specifically naming the file onto which the archive
should be placed (\c
.B /dev/rmt0
in this example).
.LP
Now you can read the table of contents from the archive like this:
.RS
.sp .5
.nf
.ta \w'.B example%'u+2n  +\w'\fBtar  cvf  /dev/rmt0\fP'u+12n
.BI "example% tar  tvf  /dev/rmt0	" "display table of contents of the archive"
.ta 28n +8n +12
(\fIaccess  user-id/group-id	size 	mod. date 	filename\fP)
.B "rw-r--r-- 1677/40 	2123	Nov  7 18:15:1985	./archive/test.c"
\&.\|.\|.
.B example%
.fi
.RE
.LP
You can extract files from the archive like this:
.RS
.sp .5
.nf
.ta \w'.B example%'u+2n  +\w'\fBtar  xvf  /dev/rmt0\fP'u+12n
.BI "example% tar  xvf  /dev/rmt0	" "extract files from the archive"
.IB "messages from " tar
.B example%
.fi
.RE
.LP
If there are multiple archive files on a tape, each is separated
from the following one by an 
.SM EOF
marker.
.B tar
does not read the
.SM EOF
mark on the tape after it finishes reading an
archive file because
.B tar
looks for a special header to decide
when it has reached the end of the archive.  Now if you try to use
.B tar
to read the next archive file from the tape,
.B tar
does not know enough to skip over the
.SM EOF
mark and tries to read the
.SM EOF
mark as an archive instead.  The result of this is an
error message from
.B tar
to the effect:
.IP
.B tar: blocksize=0
.LP
This means that to read another archive from the tape, you must
skip over the
.SM EOF
marker before starting another
.B tar
command.  You can accomplish this using the
.BR mt (1)
command, as shown
in the example below.  Assume that you are reading from
.BR /dev/nrmt0 .
.RS
.sp .5
.nf
.BI "example% tar xvfp /dev/nrmt0" " 	read first archive from tape"
.IB "messages from " tar
.BI "example% mt fsf 1" "	skip over the end-of-file marker"
.BI "example% tar xvfp /dev/nrmt0" " 	read second archive from tape"
.IB "messages from " tar
.B example%
.fi
.RE
.LP
Finally, here is an example using
.B tar
to transfer files across the Ethernet.
First, here is how to archive files
from the local machine (\c
.BR example )
to a tape on a remote system (\c
.BR host ):
.RS
.sp .5
.nf
.BI "example% tar cvfb  \-  20" " filenames " "| rsh " host " dd of=/dev/rmt0  obs=20b"
.IB "messages from " tar
.B example%
.fi
.RE
.LP
In the example above, we are
.I creating
a
.I tarfile
with the
.B c
key letter, asking for
.I verbose
output from
.B tar
with the
.B v
option, specifying the name of the output
.I tarfile
using the
.B f
option (the standard output is where the
.I tarfile
appears, as indicated
by the
.RB ` \- '
sign), and specifying the blocksize (20) with the
.B b
option.
If you want to change the blocksize, you must change the blocksize
arguments both on the
.B tar
command
.I and
on the
.B dd
command.
.LP
Now, here is how to use
.B tar
to get files from a tape on the remote system back to the
local system:
.RS
.B example% rsh  \-n host  dd
.B "if=/dev/rmt0  bs=20b | tar xvBfb  \- 20"
.I filenames
.br
.IB "messages from " tar
.br
.B example%
.RE
.LP
In the example above, we are
.I extracting
from the
.I tarfile
with the
.B x
key letter, asking for
.I verbose output from
.B tar
with the
.B v
option, telling
.B tar
it is reading from a pipe with the
.B B
option, specifying the name of the input
.I tarfile
using the
.B f
option (the standard input is where the
.I tarfile
appears, as indicated
by the
.RB ` \- '
sign), and specifying the blocksize (20) with the
.B b
option.
.SH FILES
.PD 0
.TP 20
.B /dev/rmt?
half-inch magnetic tape interface
.TP
.B /dev/rar?
quarter-inch magnetic tape interface
.TP
.B /dev/rst?
.SM SCSI
tape interface
.TP
.B /tmp/tar*
.PD
.SH ENVIRONMENT
.TP 10
.SB TAPE
If specified, in the environment, the value of 
.SB TAPE
indicates the default tape device.
.SH SEE ALSO
.BR cpio (1),
.BR csh (1),
.BR mt (1),
.BR umask (2),
.BR tar (5),
.BR dump (8),
.BR restore (8)
.SH BUGS
.LP
Neither the
.B r
option nor the
.B u
option can be used with quarter-inch archive tapes, since these tape
drives cannot backspace.
.LP
There is no way to ask for the
.IR n th
occurrence of a file.
.LP
Tape errors are handled ungracefully.
.LP
The
.B u
option can be slow.
.LP
There is no way selectively to follow symbolic links.
.LP
When extracting tapes created with the
.B r
or
.B u
options, directory modification times may not be set correctly.
.LP
Files with names longer than 100 characters cannot be processed.
.LP
Filename substitution wildcards do not work for extracting
files from the archive.  To get around this, use a command of
the form:
.IP
.BI "tar xvf.\|.\|. /dev/rst0 `tar tf.\|.\|. /dev/rst0 | grep '" pattern \|'`
ant in the \(lqSunView\(rq category,
click on the
.B Save
button in
.BR defaultsedit ;
then exit
.B sunview
and restart it.
.LP
Select the \(lqMenu\(rq category to see the following items (and some others):
.TP 18
.B Stay_up
If enab./share/man/man1/tbl.1                                                                                 755       0      12        12467  4424740732   7604                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tbl.1 1.20 89/03/26 SMI; from UCB 4.2
.TH TBL 1 "22 March 1989"
.SH NAME
tbl \- format tables for nroff or troff
.SH SYNOPSIS
.B tbl
[
.B \-ms
] [
.B \-mm
] [
.I filename
] .\|.\|.
.IX  "tbl"  "table formatter"
.IX  "format tables"  ""  "format tables \(em \fLtbl\fP"
.IX  "document production"  tbl  ""  "\fLtbl\fP \(em table formatter"
.SH AVAILABILITY
.LP
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B tbl
is a preprocessor for formatting tables for
.BR nroff (1)
or
.BR troff (1).
The input
.IR filename s
are copied to the standard output, except that lines
between
.B .\s-1TS\s0
and
.B .\s-1TE\s0
command lines are assumed to describe tables
and are reformatted.  Details are given in
.TX DOCS .
.LP
If no arguments are given,
.B tbl
reads the standard input, so
.B tbl
may be used as a filter.  When
.B tbl
is used with
.BR eqn (1)
or
.B neqn 
the
.B tbl
command should be first, to minimize the
volume of data passed through pipes.
.SH OPTIONS
.TP
.B \-ms
Copy the
.B \-ms
macro package to the front of the output file.
.TP
.B \-mm
Copy the
.B \-mm
macro package to the front of the output file.
.SH EXAMPLE
.LP
As an example, letting
.B \et
represent a
.SM TAB
(which should be typed as a genuine
.SM TAB\s0)
the input
.RS
.LP
.nf
.ft B
""
\&.\s-1TS\s0
c s s
c c s
c c c
l n n.
Household\etPopulation
Town\etHouseholds
\etNumber\etSize
Bedminster\et789\et3.26
Bernards Twp.\et3087\et3.74
Bernardsville\et2018\et3.30
Bound Brook\et3425\et3.04
Branchburg\et1644\et3.49
Bridgewater\et7897\et3.81
Far Hills\et240\et3.19
\&.\s-1TE\s0
.ft R
.fi
.RE
.LP
yields
.ne 10
.RS
.nf
.ft B
.  \".TS
.nr 35 \n(.u
.nr 79 0n
.nr 80 \n(79
.nr 40 \n(79
.nr 38 \n(79+\w!Town!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Bedminster!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Bernards Twp.!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Bernardsville!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Bound Brook!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Branchburg!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Bridgewater!
.if \n(80<\n(38 .nr 80 \n(38
.nr 38 \n(79+\w!Far Hills!
.if \n(80<\n(38 .nr 80 \n(38
.nr 81 \n(80
.nr 41 \n(80
.nr 38 \n(80+\w!Number!
.if \n(81<\n(38 .nr 81 \n(38
.nr 31 0
.nr 32 0
.nr 38 \w!789!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3087!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!2018!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3425!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!1644!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!7897!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!240!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!!
.if \n(32<\n(38 .nr 32 \n(38
.nr 61 \n(80+\n(31
.nr 38 \n(61+\n(32
.if \n(38>\n(81 .nr 81 \n(38
.if \n(38<\n(81 .nr 61 +(\n(81-\n(38)/2
.nr 82 \n(81
.nr 42 \n(81
.nr 38 \n(81+\w!Size!
.if \n(82<\n(38 .nr 82 \n(38
.nr 31 0
.nr 32 0
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.26!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.74!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.30!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.04!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.49!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.81!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.19!
.if \n(32<\n(38 .nr 32 \n(38
.nr 62 \n(81+\n(31
.nr 38 \n(62+\n(32
.if \n(38>\n(82 .nr 82 \n(38
.if \n(38<\n(82 .nr 62 +(\n(82-\n(38)/2
.nr 38 \n(79+\w!Household Population!-\n(82
.if \n(38>0 .nr 38 \n(38/2
.if \n(38<0 .nr 38 0
.nr 61 +1*\n(38
.nr 81 +1*\n(38
.nr 41 +1*\n(38
.nr 62 +2*\n(38
.nr 82 +2*\n(38
.nr 42 +2*\n(38
.nr 38 \n(80+\w!Households!-\n(82
.if \n(38>0 .nr 38 \n(38/1
.if \n(38<0 .nr 38 0
.nr 62 +1*\n(38
.nr 82 +1*\n(38
.nr 42 +1*\n(38
.nr 38 1n
.nr 41 +3*\n(38
.nr 81 +3*\n(38
.nr 61 +3*\n(38
.if n .if \n(61%24>0 .nr 61 +12u
.nr 42 +6*\n(38
.nr 82 +6*\n(38
.nr 62 +6*\n(38
.if n .if \n(62%24>0 .nr 62 +12u
.nr TW \n(82
.fc ! :
.ta \n(82u
\&!:Household Population:!
.ta \n(80u \n(82u
\&\h'|\n(40u'!:Town:!\h'|\n(41u'!:Households:!
.ta \n(80u \n(81u \n(82u
\&\h'|\n(40u'!::!\h'|\n(41u'!:Number:!\h'|\n(42u'!:Size:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Bedminster:!\h'|\n(41u'!:789!\h'|\n(42u'!:3!!.26:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Bernards Twp.:!\h'|\n(41u'!:3087!\h'|\n(42u'!:3!!.74:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Bernardsville:!\h'|\n(41u'!:2018!\h'|\n(42u'!:3!!.30:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Bound Brook:!\h'|\n(41u'!:3425!\h'|\n(42u'!:3!!.04:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Branchburg:!\h'|\n(41u'!:1644!\h'|\n(42u'!:3!!.49:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Bridgewater:!\h'|\n(41u'!:7897!\h'|\n(42u'!:3!!.81:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Far Hills:!\h'|\n(41u'!:240!\h'|\n(42u'!:3!!.19:!
.fc
.mk ##
.nr ## -1v
.if \n(35>0 .fi
.  \".TE
.fi
.ft R
.RE
.br
.ne 5
.SH SEE ALSO
.BR eqn (1),
.BR nroff (1),
.BR troff (1)
.LP
.TX DOCS
t files from the archive like this:
.RS
.sp .5
.nf
.ta \w'.B example%'u+2n  +\w'\fBtar  xvf  /dev/rmt0\fP'u+12n
.BI "example% tar  xvf  /dev/rmt0	" "extract files from the archive"
.IB "messages from "./share/man/man1/tcopy.1                                                                               755       0      12         2313  4424740732  10126                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)tcopy.1 1.7 89/03/26 SMI; from UCB 4.3 BSD 6.1
.\"
.TH TCOPY 1 "9 September 1987"
.SH NAME
tcopy \- copy a magnetic tape
.SH SYNOPSIS
.B tcopy
.I source
[
.I destination
]
.SH DESCRIPTION
.IX  "magnetic tape"  "copy"  ""    "copy \(em \fLtcopy\fP"
.IX  "magnetic tape"  "scan"  ""    "scan \(em \fLtcopy\fP"
.IX  tape  "copy, blocking preserved"  ""    "copy, blocking preserved \(em \fLtcopy\fP"
.IX  "tape"  "scan"  ""    "scan \(em \fLtcopy\fP"
.LP
.B tcopy
copies the magnetic tape mounted on the tape drive specified by the
.IR source
argument.  The only assumption made about the contents of a tape is
that there are two tape marks at the end.
.LP
When only a source drive is specified,
.B tcopy
scans the tape, and displays information about the sizes of records
and tape files.  If a destination is specified,
.B tcopy
makes a copies the source tape onto the
.I destination
tape, with blocking preserved.  As it copies,
.B tcopy
produces the same output as it does when only scanning a tape.
.SH "SEE ALSO"
.BR mt (1)
	uustat.1c l  |    uux.1c l      
vacation.1       val.1        vax.1        vfontinfo.1       vgrind.1        vi.1          view.1 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr 38 \w!.04!
.if \n(32<\n(38 .nr 32 \n(38
.nr 38 \w!3!
.if \n(31<\n(38 .nr 31 \n(38
.nr./share/man/man1/tcov.1                                                                                755       0      12         5471  4424740732   7753                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tcov.1 1.15 89/03/26 SMI; from UCB 4.2
.TH TCOV 1 "18 February 1988"
.SH NAME
tcov \- construct test coverage analysis and statement-by-statement profile
.SH SYNOPSIS
.B tcov
[
.B \-a
] [
.BI \- n
]
.IR srcfile .\|.\|.
.SH AVAILABILITY
Sun-2, Sun-3, and Sun-4 systems only.
.SH DESCRIPTION
.IX  "tcov command"  ""  "\fLtcov\fP \(em code coverage tool"
.IX  "code coverage tool"  ""  "code coverage tool \(em \fLtcov\fP"
.IX  "programming tools"  tcov  ""  "\fLtcov\fP \(em code coverage tool"
.IX  "C programming language"  tcov  ""  "\fLtcov\fP \(em code coverage tool"
.IX  languages  tcov  ""  "\fLtcov\fP \(em code coverage tool"
.LP
.B tcov
produces a test coverage analysis and
statement-by-statement profile of a C or
.SM FORTRAN
program.
When a program in a file named
.IB file .c
or
.IB file .f
is
compiled with the
.B \-a
option, a corresponding
.IB file .d
file is created.
Each time the program is executed, test coverage information is
accumulated in
.IB file .d.
.LP
.B tcov
takes source files as arguments.
It reads the corresponding
.IB file .d
file and produces an annotated listing of
the program with coverage data in
.IB file .tcov.
Each straight-line segment of code (or each line if the
.B \-a
option to
.B tcov
is specified) is prefixed with the number of times it has been
executed; lines which have not been executed are prefixed with
.BR ##### .
.LP
Note: the profile produced includes only the number of times each
statement was executed, not execution times;
to obtain times for routines use
.BR gprof (1)
or
.BR prof (1).
.SH OPTIONS
.TP
.B \-a
Display an execution count for each statement; if
.B \-a
is not specified, an execution count
is displayed only for the first statement
of each straight-line segment of code.
.TP
.BI \- n
Display table of the line numbers of the
.I n
most frequently executed statements and their execution counts.
.SH "EXAMPLES"
.LP
The command:
.IP
.B example% cc -a -o prog prog.c
.LP
compiles with the
.B -a
option
.B \(em
produces
.B prog.d
.LP
The command:
.B example% prog
.LP
executes the program
.RB ` \- '
accumulates data in
.B prog.d
.LP
The command:
.IP
.B example% tcov prog.c
produces an annotated listing in file
.B prog.tcov
.SH FILES
.PD 0
.TP 20
.B file.c
input C program file
.TP
.B file.f
input
.SM FORTRAN
program file
.TP
.B file.d
input test coverage data file
.TP
.B file.tcov
output test coverage analysis listing file
.\".TP
.\".B /usr/bin/count
.\"preprocessor for test coverage analysis for C program
.TP
.B /usr/lib/bb_link.o
entry and exit routines for test coverage analysis
.SH "SEE ALSO"
.BR cc (1V),
.BR gprof (1),
.BR prof (1),
.BR exit (2)
.SH DIAGNOSTICS
.TP
.B "premature end of file"
Issued for routines containing no statements.
.SH BUGS
.LP
The analyzed program must call
.BR exit (2)
or return normally for
the coverage information to be saved in the
.BI . d
file.
62u \n(82u
\&\h'|\n(40u'!Bound Brook:!\h'|\n(41u'!:3425!\h'|\n(42u'!:3!!.04:!
.ta \n(80u \n(61u \n(62u \n(82u
\&\h'|\n(40u'!Branchburg:!\h'|\n(41u'!:1644!\h'|\n(42u'!:3!!.49:!
.ta \n(80u \n(61u \n(62./share/man/man1/tee.1                                                                                 755       0      12         1351  4424740732   7546                                                                                                                                                                                                                                                                                                                                                                      .TH TEE 1  "22 March 1989"
.\" @(#)tee.1 1.11 89/03/26 SMI; from UCB 4.2
.SH NAME
tee \- replicate the standard output
.SH SYNOPSIS
.B tee
[
.B \-ai
] [
.I filename
] .\|.\|.
.IX  "tee command"  ""  "\fLtee\fP \(em copy standard output to many files"
.IX  "copy" "standard output to many files \(em \fLtee\fP"
.IX  "standard output, copy to many files"  ""  "standard output, copy to many files \(em \fLtee\fP"
.IX  files  "copy standard output to many"  ""  "copy standard output to many \(em \fLtee\fP"
.SH DESCRIPTION
.B tee
transcribes the standard input to the
standard output and makes copies in the
.IR filename s.
.SH OPTIONS
.TP
.B \-a
Append the output to the
.IR filename s
rather than overwriting them.
.TP
.B \-i
Ignore interrupts.
ut to many files"
.IX  "copy" "standard output to many files \(em \fLtee\fP"
.IX  "standard output, copy to many files"  ""  "standard output, copy to many files \(em \fLtee\fP"
.IX  files  "copy standard output to many"  ""  "copy standard output to many \(em \fLtee\fP"
.SH DES./share/man/man1/tek.1g                                                                                755       0      12           62  4424740732   7661                                                                                                                                                                                                                                                                                                                                                                      .so man1/plot.1g
.\" @(#)tek.1g 1.4 89/03/26 SMI;
  	telnet.1c       test.1v        
textedit.1         textedit_filters.1   ,    tftp.1c   <    then.1    L    time.1v   \    tip.1c    t    toolplaces.1        touch.1v        tput.1v       tr.1v v       trace.1       
traffic.1c       troff.1       true.1        tset.1        tsort.1       tty.1 1   ,    u370.1    <    u3b.1     L    ./share/man/man1/tektool.1                                                                             755       0      12        12433  4424740733  10476                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tektool.1 1.38 89/03/26 SMI;
.TH TEKTOOL 1 "25 March 1989"
.SH NAME
tektool \- SunView Tektronix 4014 terminal-emulator window
.SH SYNOPSIS
.LP
.B tektool
[
.B \-s\c
[
.B lcdeg\c
[
.B ce
]\c
.B m\c
[
.B 12
] ] [
.B \-\c
[
.B cr
]
.I command-line
] [
.B \-f
.I fontdir
]
.IX  "tektool command"  ""  "\fLtektool\fP \(em emulate Tektronix 4014"
.IX  "emulate Tektronix 4014"  ""  "emulate Tektronix 4014 \(em \fLtektool\fP"
.IX  "Tektronix 4014, emulate \(em \fLtektool\fP"
.LP
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B tektool
emulates a Tektronix 4014 terminal with the enhanced graphics
module.
It does this in much the same way as shelltool (see
.BR shelltool (1))
emulates a regular glass tty.  When
.B tektool
is invoked, a command (usually a shell) is started up,
its output and input are connected to the emulator, and a new
window is formed.
The default window is the entire screen.
When the emulator is running, keys
.SM TF\s0(1)
through
.SM TF\s0(3),
(usually function keys F1-F3 (see
.BR kbd (4S))
have special meaning.
.TP 15
.SM TF\s0 (1)
Unshifted, this is the 4014
.SB PAGE
button.
Shifted, this is the 4014
.SB RESET
button.
.TP
.SM TF\s0 (2)
Copy screen.
The raster image
.RB  ( /usr/include/rasterfile.h )
of the 4014 screen is piped
to a command found in the
.SB TEKCOPY
environment variable.
If
.SB TEKCOPY
is not found in the environment,
.RB ` "lpr \-v" '
is used.
The copy button is unaffected by window manipulations, and will transmit
the contents of the 4014 screen only.
.TP
.SM TF\s0 (3)
Release page full condition.
.LP
These functions are also available through the tool menu.
When in graphics input (\s-1GIN\s0) mode
and the 4014 crosshairs are visible,
the left hand mouse button may be used as
the space bar to terminate
.SM GIN
mode.
.SH OPTIONS
.TP 15
.B \-s
Specifies the Tektronix 4014 strap options with the following modifiers:
.IP
.RS
.PD 0
.TP 4
l
Received
.SM LINEFEED 
characters also generate 
.SM RETURN 
characters.
.TP
c
Received 
.SM RETURN 
characters also generate 
.SM LINEFEED 
characters.
.TP
d
Received
.SM DELETE
characters are used as low order Y axis (
.SM LOY
) addresses.
.TP
e
Echo keyboard input.
.TP
g
Graphic input mode 
(\s-1GIN\s0) terminator
specification. If this strap is followed by a
.BR c ,
.SM GIN
mode data is terminated by a 
.SM RETURN 
character.
If it is followed by a
.BR e ,
.SM GIN
mode data is terminated by a
.SM RETURN 
character followed by an
.SM EOT
character.  If this strap is not present, no
characters are sent after
.SM GIN
mode data.
.TP
m
Page full control specification.
If this strap is followed by a
.BR 1 ,
.B tektool
will stop accepting tty input when a 
.SM LINEFEED
character is done past the last line in margin 1.
This is the 4014 page full condition.
The page full condition it released by a
.SB PAGE
or a
.SB RELEASE
or any 
.SM ASCII 
keyboard input.
If this strap is followed by a
.BR 2 ,
the page full condition happens at
the end of margin 2.
If this strap is not present, the page full condition never occurs.
.PD
.IP
If the
.B \-s
option is not given, the environment is searched for the
.SB TEKSTRAPS
variable which provides the modifiers.
The straps may also be set by the property sheet available by selecting the
.SB PROPS
menu item.
If no straps are specified the
.B d
strap is assumed.
.RE
.TP 15
.BI \-c " command-line"
Take terminal emulator input from a shell which in turn runs the
.I command-line
following the
.B \-c
option.
.br
.ne 10
.TP
.BI \-f " fontdir"
Look for fonts in the directory specified by
.IR fontdir .
The fonts must be called
.BR tekfont 0
through
.BR tekfont 3.
Fonts must be in
.BR vfont (5)
format.  If this option is not given,
the font directory is obtained from the
.SM TEKFONTS
environment variable (if it exists).
If no font directory is specified,
.B /usr/lib/fonts/tekfonts
is used.
.TP
.BI \-r " command-line"
Run
.I command-line
to provide input to the terminal emulator.
This must be the last option, since the remainder of the arguments are used
by the command.
.br
.ne 8
.br
.ne 4
.SH FILES
.PD 0
.TP 20
.B /usr/lib/fonts/tekfonts/tekfont[0-3]
.PD
.SH "SEE ALSO"
.LP
.BR sunview (1),
.BR shelltool (1),
.BR kbd (4S),
.BR vfont (5)
.LP
.TX INSTALL
.\".br
.\"Tektronix 4014 and 4014-1 Computer Display Terminal User's Manual (070-1647-00)
.SH BUGS
.LP
Special point plot mode is not supported.
.LP
Z-axis stuff, except for defocusing, is not supported.
.LP
Defocused alpha characters are not supported.
.SH DIAGNOSTICS
.LP
.TP 20
.B copy command failed
The copy command in the
.SB TEKCOPY
environment variable or in the property sheet could not be executed.
.LP
.SH CAVEATS
Like all 4014 emulators, this does not duplicate every nuance of the 4014.
For instance, certain programs redraw stuff already on the screen in
order to highlight things with the storage flash.
This will not work here.
Also, even though the emulator supports the full 4096 point addressing of the
4014, it cannot display this on the screen.
All points will be rounded to the nearest available pixel.
This may cause some funny effects.
.LP
The
.B tektool
window may be treated just like other windows;
it can be overlaid, moved, reshaped etc.
However, when the window is reshaped, the contents will not scale.
sign), and specifying the blocksize (20) with the
.B b
option.
If you want to change the blocksize, you must change the blocksize
arguments both on the
.B tar
command
.I and
on the
.B dd
command.
.LP
Now, here is how to use
.B ta./share/man/man1/telnet.1c                                                                             755       0      12        27204  4424740733  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)telnet.1c 1.17 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH TELNET 1C "22 March 1989"
.SH NAME
telnet \- user interface to a remote system using the TELNET protocol
.SH SYNOPSIS
.B telnet
[
.I host
[
.I port
] ]
.IX  "telnet command"  ""  "\fLtelnet\fP \(em TELNET interface"
.IX  communications  telnet  ""  "\fLtelnet\fP \(em TELNET interface"
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B telnet
communicates with another host using the
.SM TELNET
protocol.  If
.B telnet
is invoked without arguments, it enters command mode, indicated by its
prompt (\c
.BR telnet> ).
In this mode, it accepts and executes the
commands listed below.  If it is
invoked with arguments, it performs an
.B open
command (see below) with those arguments.
.LP
Once a connection has been opened,
.B telnet
enters input mode.  In this mode, text
typed is sent to the remote host.
The input mode entered will be either
\*(lqcharacter at a time\*(rq
or \*(lqline by line\*(rq
depending on what the remote system supports.
.LP
In \*(lqcharacter at a time\*(rq mode, most
text typed is immediately sent to the remote host for processing.
.LP
In \*(lqline by line\*(rq mode, all text is echoed locally,
and (normally) only completed lines are sent to the remote host.
The \*(lqlocal echo character\*(rq (initially
.RB ` ^E ')
may be used
to turn off and on the local echo
(this would mostly be used to enter passwords
without the password being echoed).
.LP
In either mode, if the
.I localchars
toggle is
.SM TRUE
(the default in line mode; see below),
the user's
.BR quit ,
.BR intr ,
and
.B flush
characters are trapped locally, and sent as
.SM TELNET
protocol sequences to the remote side.
There are options (see
.B toggle
.B autoflush
and
.B toggle
.B autosynch
below)
which cause this action to flush subsequent output to the terminal
(until the remote host acknowledges the
.SM TELNET
sequence) and flush previous terminal input
(in the case of
.B quit
and
.BR intr ).
.LP
While connected to a remote host,
.B telnet
command mode may be entered by typing the
.B telnet
\(lqescape character\(rq (initially
.RB ` ^] ',
(control-right-bracket)).
When in command
mode, the normal terminal editing conventions are available.
.SH USAGE
.SS Telnet Commands
.LP
The following commands are available.
Only enough of each command to uniquely identify it need be typed
(this is also true for arguments to the
.BR mode ,
.BR set ,
.BR toggle ,
and
.B display
commands).
.LP
.TP
.B open \fIhost\fP \fR[\fP \fIport\fP \fR]\fP
Open a connection to the named host.  If no port number
is specified,
.B telnet
will attempt to contact a
.SM TELNET
server at the default port.
The host specification may be either a host name (see
.BR hosts (5))
or an Internet address specified in the \*(lqdot notation\*(rq (see
.BR inet (3N)).
.TP
.B close
Close a
.SM TELNET
session and return to command mode.
.TP
.B quit
Close any open
.SM TELNET
session and exit
.BR telnet .
An
.SM EOF
(in command mode) will also close a session and exit.
.TP
.B z
Suspend
.BR telnet .
This command only works when the user is using a shell that supports
job control, such as
.BR csh (1).
.TP
.B mode \fItype\fP
.I type
is either
.B line
(for \*(lqline by line\*(rq mode)
or
.I character
(for \*(lqcharacter at a time\*(rq mode).
The remote host is asked for permission to go into the requested mode.
If the remote host is capable of entering that mode, the requested
mode will be entered.
.TP
.B status
Show the current status of
.BR telnet .
This includes the peer one is connected to, as well
as the current mode.
.br
.ne 8
.TP
.B display \fR[\fP \fIargument...\fP \fR]\fP
Display all, or some, of the
.B set
and
.B toggle
values (see below).
.TP
.B ? \fR[\fP \fIcommand\fP \fR]\fP
Get help.  With no arguments,
.B telnet
prints a help summary.
If a command is specified,
.B telnet
will print the help information for just that command.
.TP
.B send \fIarguments\fP
Send one or more special character sequences to the remote host.
The following are the arguments which may be specified
(more than one argument may be specified at a time):
.RS
.TP
.I escape
Send the current
.B telnet
escape character (initially
.RB ` ^] ').
.TP
.I synch
Send the
.SM TELNET
.B SYNCH
sequence.
This sequence causes the remote system to discard all previously typed
(but not yet read) input.
This sequence is sent as
.SM TCP
urgent data (and may not work if the remote system is a 4.2
.SM BSD
system -- if it does not work, a lower
case \*(lqr\*(rq may be echoed on the terminal).
.TP
.B brk
Send the
.SM TELNET
.B
.SM BRK
(Break) sequence, which may have significance to the remote
system.
.TP
.B ip
Send the
.SM TELNET
.B \s-1IP\s0
(Interrupt Process) sequence, which should cause the remote
system to abort the currently running process.
.TP
.I ao
Sends the
.SM TELNET
.B
.SM AO
(Abort Output) sequence, which should cause the remote system to flush
all output
.B from
the remote system
.B to
the user's terminal.
.TP
.I ayt
Sends the
.SM TELNET
.B
.SM AYT
(Are You There)
sequence, to which the remote system may or may not choose to respond.
.TP
.B ec
Sends the
.SM TELNET
.B
.SM EC
(Erase Character)
sequence, which should cause the remote system to erase the last character
entered.
.TP
.I el
Sends the
.SM TELNET
.B
.SM EL
(Erase Line)
sequence, which should cause the remote system to erase the line currently
being entered.
.TP
.I ga
Sends the
.SM TELNET
.B
.SM GA
(Go Ahead)
sequence, which likely has no significance to the remote system.
.TP
.I nop
Sends the
.SM TELNET
.B
.SM NOP
(No Operation)
sequence.
.TP
.I ?
Prints out help information for the
.B send
command.
.RE
.TP
.B set \fIargument value\fP
Set any one of a number of
.B telnet
variables to a specific value.
The special value \*(lqoff\*(rq turns off the function associated with
the variable.
The values of variables may be interrogated with the
.B display
command.
The variables which may be specified are:
.RS
.TP
.B echo
This is the value (initially
.RB ` ^E ')
which, when in
\*(lqline by line\*(rq mode, toggles between doing local echoing
of entered characters (for normal processing), and suppressing
echoing of entered characters (for entering, say, a password).
.TP
.I escape
This is the
.B telnet
escape character (initially
.RB ` ^[ ')
which causes entry into
.B telnet
command mode (when connected to a remote system).
.TP
.I interrupt
If
.B telnet
is in
.I localchars
mode (see
.B toggle
.I localchars
below)
and the
.I interrupt
character is typed, a
.SM TELNET
.B
.SM IP
sequence (see
.B send
.B ip
above)
is sent to the remote host.
The initial value for the interrupt character is taken to be
the terminal's
.B intr
character.
.TP
.I quit
If
.B telnet
is in
.I localchars
mode (see
.B toggle
.I localchars
below)
and the
.I quit
character is typed, a
.SM TELNET
.B
.SM BRK
sequence (see
.B send
.B brk
above)
is sent to the remote host.
The initial value for the quit character is taken to be
the terminal's
.B quit
character.
.br
.ne 5
.TP
.I flushoutput
If
.B telnet
is in
.I localchars
mode (see
.B toggle
.I localchars
below)
and the
.I flushoutput
character is typed, a
.SM TELNET
.B
.SM AO
sequence (see
.B send
.I ao
above)
is sent to the remote host.
The initial value for the flush character is taken to be
the terminal's
.B flush
character.
.TP
.I erase
If
.B telnet
is in
.I localchars
mode (see
.B toggle
.I localchars
below),
.B and
if
.B telnet
is operating in \*(lqcharacter at a time\*(rq mode, then when this
character is typed, a
.SM TELNET
.B
.SM EC
sequence (see
.B send
.B ec
above)
is sent to the remote system.
The initial value for the erase character is taken to be
the terminal's
.B erase
character.
.TP
.B kill
If
.B telnet
is in
.I localchars
mode (see
.B toggle
.I localchars
below),
.B and
if
.B telnet
is operating in \*(lqcharacter at a time\*(rq mode, then when this
character is typed, a
.SM TELNET
.B
.SM EL
sequence (see
.B send
.I el
above)
is sent to the remote system.
The initial value for the kill character is taken to be
the terminal's
.B kill
character.
.TP
.I eof
If
.B telnet
is operating in \*(lqline by line\*(rq mode, entering this character
as the first character on a line will cause this character to be
sent to the remote system.
The initial value of the eof character is taken to be the terminal's
.B eof
character.
.RE
.TP
.B toggle \fIarguments...\fP
Toggle (between
.SM TRUE
and
.SM FALSE\s0)
various flags that control how
.B telnet
responds to events.
More than one argument may be specified.
The state of these flags may be interrogated with the
.B display
command.
Valid arguments are:
.RS
.TP
.I localchars
If this is
.SM TRUE\s0,
then the
.BR flush ,
.BR interrupt ,
.BR quit ,
.BR erase ,
and
.B kill
characters (see
.B set
above) are recognized locally, and
transformed into (hopefully) appropriate
.SM TELNET
control sequences
(respectively
.IR ao ,
.IR ip ,
.IR brk ,
.IR ec ,
and
.IR el ;
see
.B send
above).
The initial value for this toggle is
.SM TRUE
in \*(lqline by line\*(rq mode, and
.SM FALSE
in \*(lqcharacter at a time\*(rq mode.
.TP
.I autoflush
If
.I autoflush
and
.I localchars
are both
.SM TRUE\s0,
then when the
.IR ao ,
.IR intr ,
or
.I quit
characters are recognized (and transformed into
.SM TELNET
sequences; see
.B set
above for details),
.B telnet
refuses to display any data on the user's terminal
until the remote system acknowledges (via a
.SM TELNET
.I Timing Mark
option)
that it has processed those
.SM TELNET
sequences.
The initial value for this toggle is
.SM TRUE
if the terminal user had not
done an "stty noflsh", otherwise
.SM FALSE
(see
.BR stty(1V)).
.TP
.I autosynch
If
.I autosynch
and
.I localchars
are both
.SM TRUE\s0,
then when either the
.I intr
or
.I quit
characters is typed (see
.B set
above for descriptions of the
.I intr
and
.I quit
characters), the resulting
.SM TELNET
sequence sent is followed by the
.SM TELNET
.B
.SM SYNCH
sequence.
This procedure
.B should
cause the remote system to begin throwing away all previously
typed input until both of the
.SM TELNET
sequences have been read and acted upon.
The initial value of this toggle is
.SM FALSE\s0.
.TP
.I crmod
Toggle carriage return mode.
When this mode is enabled, most carriage
return characters received from
the remote host will be mapped into a carriage return followed by
a line feed.
This mode does not affect those characters typed by the user, only
those received from the remote host.
This mode is not very useful unless the remote host
only sends carriage return, but never line feed.
The initial value for this toggle is
.SM FALSE\s0.
.TP
.I debug
Toggle socket level debugging (useful only to the
super-user).
The initial value for this toggle is
.SM FALSE\s0.
.TP
.I options
Toggle the display of some internal
.B telnet
protocol processing (having to do with
.SM TELNET
options).
The initial value for this toggle is
.SM FALSE\s0.
.TP
.I netdata
Toggle the display of all network data (in hexadecimal format).
The initial value for this toggle is
.SM FALSE\s0.
.TP
.I ?
Display the legal
.B toggle
commands.
.RE
.SH SEE ALSO
.BR csh (1),
.BR rlogin (1C),
.BR stty (1V)
.BR inet (3N),
.BR hosts (5)
.SH BUGS
.LP
There is no adequate way for dealing with flow control.
.LP
On some remote systems, echo has to be turned off manually when in
\*(lqline by line\*(rq mode.
.LP
There is enough settable state to justify a
.B .telnetrc
file.
.LP
No capability for a
.B .telnetrc
file is provided.
.LP
In \*(lqline by line\*(rq mode, the terminal's
.SM EOF
character is only recognized (and sent to the remote system)
when it is the first character on a line.
RE
.LP
If the command is not one of these four reserved-word commands, it is
treated as a command line and executed.
No shell interpretation is done, although you can run a shell as a
command.
.LP
Here is a menu file that demonstrates some of these features:
.RS
.TP 20n
.B Quit
\s-1EXIT\s0
.TP
.B "Mail reader"
mailtool
.TP
.B "My\ tools"
\s-1MENU\s0  /home/me/mytools.menu
.TP
../share/man/man1/test.1v                                                                               755       0      12        10312  4424740733  10154                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)test.1v 1.24 89/03/26 SMI; from UCB 4.3 BSD and S5
.TH TEST 1V  "25 March 1989"
.SH NAME
test \- return true or false according to a conditional expression
.SH SYNOPSIS
.B test
.I expression
.LP
[
.I expression
]
.SH DESCRIPTION
.IX "System V commands" "\fLtest\fR"
.IX  "test command"  ""  "\fLtest\fP \(em condition command"
.B test
evaluates the expression
.I expression
and, if its value is true, returns a zero (true)
exit status; otherwise, a
non-zero (false) exit status is returned.
.B test
returns a non-zero exit if there are no arguments.
.SH USAGE
.SS Primitives
.LP
The following primitives are used to construct
.IR expression .
.TP 9n
.BI \-b " filename"
True if
.I filename
exists and is a block special device.
.TP
.BI \-c " filename"
True if
.I filename
exists and is a character special device.
.TP
.BI \-d " filename"
True if
.I filename
exists and is a directory.
.TP
.BI \-f " filename"
True if
.I filename
exists and is not a directory.
.TP
.BI \-g " filename"
True if
.I filename
exists and its set-group-\c
.SM ID
bit is set.
.TP
.BI \-h " filename"
True if
.I filename
exists and is a symbolic link.
.TP
.BI \-k " filename"
True if
.I filename
exists and its sticky bit is set.
.TP
.BI \-l " string"
the length of the string.
.TP
.BI \-n " s1"
True if the length of the string
.I s1
is non-zero.
.TP
.BI \-p " filename"
True if
.I filename
exists and is a named pipe (\c
.SM FIFO\s0).
.TP
.BI \-r " filename"
True if
.I filename
exists and is readable.
.TP
.BI \-s " filename"
True if
.I filename
exists and has a size greater than zero.
.TP
\fB\-t\fR\ [\fI\ fildes\ \fR]
True if the open file whose file descriptor number is
.I fildes
(1 by default)
is associated with a terminal device.
.TP
.BI \-u " filename"
True if
.I filename
exists and its set-user-\c
.SM ID
bit is set.
.TP
.BI \-w " filename"
True if
.I filename
exists and is writable.
.TP
.BI \-x " filename"
True if
.I filename
exists and is executable.
.TP
.BI \-z " s1"
True if the length of string
.I s1
is zero.
.TP
.IB s1 " = " s2
True
if the strings
.I s1
and
.I s2
are equal.
.TP
.IB s1 " != " s2
True
if the strings
.I s1
and
.I s2
are not equal.
.TP
.I s1
True if
.I s1
is not the null string.
.TP
.IB n1 " \-eq " n2
True if the integers
.I n1
and
.I n2
are numerically equal.
.TP
.IB n1 " \-ne " n2
True if the integer
.I n1
is not numerically equal to the integer
.IR n2 .
.TP
.IB n1 " \-gt " n2
True if the integer
.I n1
is numerically greater than the integer
.IR n2 .
.TP
.IB n1 " \-ge " n2
True if the integer
.I n1
is numerically greater than or equal to the integer
.IR n2 .
.TP
.IB n1 " \-lt " n2
True if the integer
.I n1
is numerically less than the integer
.IR n2 .
.TP
.IB n1 " \-le " n2
True if the integer
.I n1
is numerically less than or equal to the integer
.IR n2 .
.ne 4
.SS Operators
.LP
The above primaries may be combined with the
following operators:
.RS
.TP
.B  !
Unary negation operator.
.TP
.B  \-a
Binary
.I and
operator.
.TP
.B  \-o
Binary
.I or
operator.
.TP
.BI ( expression )
Parentheses for grouping.
.RE
.LP
.B \-a
has higher precedence than
.B \-o.
Notice that all the operators and flags are separate
arguments to
.BR test .
Notice also that parentheses are meaningful
to the Shell and must be escaped.
.SH SYSTEM V USAGE
The actions of the System V version of
.B test
are the same, except for the following primitives:
.TP 12
.BI \-f " filename"
True if
.I filename
exists and is a regular file.
.TP
.BI \-l " string"
Not supported.
.SH "SEE ALSO"
.BR find (1),
.BR sh (1)
.SH WARNING
In the second form of the command (that is, the one that uses
.BR [\|] ,
rather than the word
.BR test ),
the square brackets must be delimited by blanks.
.LP
Some
.SM UNIX
systems do not recognize the second form of the command.
.SH NOTE
The
.B test
command is built into the Bourne shell, which chooses the 4.2
.SM BSD
or the System V version of
.BR test ,
depending on whether
.B /usr/5bin
appears before
.B /usr/bin
in the shell's
.B
.SM PATH
variable.  This is consistent with the behavior of other
commands present in both
.B /usr/bin
and
.BR /usr/5bin .
.LP
The fact that
.B test
is built into the shell also means that a program named
.B test
cannot be run without specifying a pathname; if the program is in the
current directory,
.B .\|/\|test
will suffice.


\*(rq mode, toggles between doing local echoing
of entered characters (for normal processing), and suppressing
echoing of entered characters (for entering, say, a password).
.TP
.I escape
This is the
.B telnet
escape character (initially
.RB ` ^[ ')
which causes entry into
.B telnet
command mode (when connect./share/man/man1/textedit.1                                                                            755       0      12        34713  4424740733  10654                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)textedit.1 1.30 89/03/26 SMI;
.TH TEXTEDIT 1 "22 March 1989"
.SH NAME
textedit \- SunView window- and mouse-based text editor
.SH SYNOPSIS
.B textedit
[
.I generic-tool-arguments
] 
[
.B "\-Ea on\|" |\| off 
] 
[
.B \-adjust_is_pending_delete
]
[
.B "\-Ei on\|" |\| off 
] 
.if t .ti +0.5i
[
.B \-auto_indent
]
[
.B "\-Eo on\|" |\| off 
] 
[
.B \-okay_to_overwrite
]
[
.B "\-Er on\|" |\| off 
] 
[
.B \-read_only
]
.if t .ti +0.5i
[
.BI \-Ec " N"
] 
[
.BI \-checkpoint " count"
]
[
.BI \-\s-1EL\s0 " lines"
] 
[
.BI \-lower_context " lines"
]
[
.BI \-Em " pixels"
] 
.if t .ti +0.5i
[
.BI \-margin " pixels"
]
[
.BI \-En " N"
] 
[
.BI \-number_of_lines " lines"
]
[
.BI \-Es " N"
] 
[
.BI \-scratch_window " lines"
]
.if t .ti +0.5i
[
.BI \-\s-1ES\s0 " N"
] 
[
.BI \-multi_click_space " radius"
]
[
.BI \-Et " N"
] 
[
.BI \-tab_width " tabstop"
]
[
.BI \-\s-1ET\s0 " N"
] 
.if t .ti +0.5i
[
.BI \-multi_click_timeout " intrvl"
]
[
.BI \-Eu " N"
] 
[
.BI \-history_limit " max"
]
[
.BI \-\s-1EU\s0 " N"
] 
.if t .ti +0.5i
[
.BI \-upper_context " lines"
]
.I filename 
.SH AVAILABILITY
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX textedit "" "\fLtextedit\fR \(em SunView text editor"
.IX tools textedit "" "\fLtextedit\fR"
.LP
.B textedit
is a mouse-oriented text editor that runs within the
SunView environment.
It creates a window containing two text subwindows.
The top subwindow (referred to as the \(lqscratch\(rq window)
can be used to store small pieces of text.
The bottom subwindow (referred to as the \(lqedit\(rq
window) displays the contents of
.IR filename ,
if given.
.LP
The name of the file currently being edited
is displayed in the left-hand portion of the frame header.
The name of the current working directory
is displayed in the right-hand portion.
.
.SH OPTIONS
.LP
.TP 12
.I generic-tool-arguments
.B textedit
accepts the SunView generic tool arguments listed in
.BR sunview (1).
.
.TP 
.BR "\-Ea on" \||\| off
.PD 0
.TP
.B \-adjust_is_pending_delete
.PD
Choose whether or not an adjustment to a selection makes the
selection \(lqpending-delete.\(rq  The default is off.
This option corresponds to, and overrides, the 
.B adjust_is_pending_delete
Text defaults entry.
.
.TP 
.PD 0
.BR "\-Ei on" \||\| off
.TP
.B \-auto_indent
.PD
Choose whether or not to automatically indent newly-opened
lines.  The default is off.  Corresponds to the
.BR auto_indent 
Text default.
.
.TP 
.BR "\-Eo on" \||\| off
.PD 0
.TP 
.B \-okay_to_overwrite
.PD
Set behavior to the 
.B "Store as New File"
menu item.  If 
.B on
a
.B "Store as New File"
to the current file is treated as a
.BR "Save Current File" .
If 
.BR off
(the standard default),
.B "Store as New File"
operations using the current filename 
result in an error message.
Corresponds to
.BR Store_self_is_save .
.TP 
.PD 0
.BR "\-Er on" \||\| off
.TP
.B \-read_only
.PD
Turn read-only mode on or off.
When on, text cannot be modified.
.
.TP
.BI \-Ec " N"
.PD 0
.TP
.BI \-checkpoint " count"
.PD
Checkpoint after every
.I count
editing operations.
If 
.I count 
is 0 (the standard default), no checkpointing takes place.
Each character typed, each
.BR Paste ,
and each
.B Cut
counts as an editing operation.  Corresponds to 
.BR checkpoint_frequency .
.
.TP 
.BI \-EL " lines"
.PD 0
.TP
.BI \-lower_context " lines"
.PD
Specify the minimum number of lines to keep between the caret
and the bottom of the text subwindow.
The default is 2.
Corresponds to
.BR lower_context .
.
.br
.ne 6
.TP 
.BI \-Em " pixels"
.PD 0
.TP
.BI \-margin " pixels"
.PD
Set the scrollbar margin width in pixels. 
The default is 4.
Corresponds to
.BR left_margin .
.
.TP 
.BI \-En " N"
.PD 0
.TP
.BI \-number_of_lines " lines"
.PD
Set the number of lines in the bottom subwindow.
The default is 45.
.
.TP 
.BI \-Es " N"
.PD 0
.TP
.BI \-scratch_window " lines"
.PD
Set the number of lines in the scratch window.
A zero value means that there is no scratch window. 
The standard default is 1.
Corresponds to
.BR scratch_window .
.
.TP 
.BI \-ES " N"
.PD 0
.TP
.BI \-multi_click_space " radius"
.PD
Set the radius, in pixels, within which clicks must
occur to be treated as a multi-click selection.
The default is 3 pixels. 
Corresponds to 
.BR multi_click_space .
.
.TP
.BI \-Et " N"
.PD 0
.TP
.BI \-tab_width " tabstop"
.PD
Set the number of
.SM SPACE
characters displayed per
.SM TAB
stop. 
The default is 8.
This option has no effect on the characters in the file.
Corresponds to 
.BR tab_width .
.
.TP 
.BI \-ET " N"
.PD 0
.TP
.BI \-multi_click_timeout " intrvl"
.PD
Set the interval, in milliseconds,
within which any two clicks must occur to be treated as a 
multi-click selection.
The default is 390 milliseconds.
Corresponds to 
.BR multi_click_timeout .
.TP
.BI \-Eu " N"
.PD 0
.TP
.BI \-history_limit " max"
.PD
Set the maximum number of editing operations that can be
undone or replayed.
The default is 50.
Corresponds to
.BR history_limit .
.
.TP
.B \-EU " N"
.PD 0
.TP
.BI \-upper_context " lines"
.PD
Set the minimum number of lines to keep between the caret and
the top of the text subwindow.
The default is 2.
Corresponds to
.BR upper_context .
.
.SH USAGE
For a description of how to use the facilities of the
text subwindows, see the
.TX SVBG .
.SS Signal Processing
.LP
If
.B textedit
hangs, for whatever reason, you can send a
.SB SIGHUP
signal to its process
.SM ID\s0,
which forces it to write any changes
(if possible):
.IP
.BI "kill \-\s-1HUP\s0 " pid
.LP
The edits are written to the file 
.BI textedit. pid
in its working directory.
If that fails,
.B textedit
successively tries to write to a file by that name in
.BR /var/tmp ,
and then
.BR /tmp .
In addition, whenever
.B textedit
catches a fatal signal, such as 
.BR \s-1SIGILL\s0 ,
it tries to write out the edits before aborting.
.SS Defaults Options
.LP
There are several dozen user-specified defaults that affect
the behavior of the text-based facilities.  See 
.BR defaultsedit (1)
for a complete description.
Important defaults entries in the
.B Text
category are:
.TP 18
.B Edit_back_char
Set the character for erasing to the left of the caret.
The standard default is
\fB\s-1DELETE\s0\fP.
Note: the tty erase character-setting has no effect on
.BR textedit .
Text-based tools refer only to the defaults database key
settings.
.TP 
.B Edit_back_word
Set the character for erasing the word to the left of the
caret.
The standard default is 
\s-1CTRL-W\s0.
.br
.ne 5
.TP 
.B Edit_back_line
Set the character for erasing all characters to the left of the
caret.
The standard default is
\s-1CTRL-U\s0.
.TP 
.B Checkpoint_frequency
If set to
.B 0
(the standard default) no checkpointing is done.
For any value greater than zero,
a checkpoint is made each time the indicated number of
editing operations has been performed since the last checkpoint.
Each character typed, each
.BR Paste ,
and each
.B Cut
counts as an editing operation.
The checkpoint file has a name of the form:
.IB filename %%\fR,
where
.I filename
is the name of the file being edited.
.SS Making a selection
.LP
In
.BR textedit ,
the mouse is used to specify a selection, which
is a character span to operate on.
The mouse is also used to position
the insertion point and to invoke a menu of commands.
.LP
The assignment of commands to the mouse buttons is:
.RS
.TP 20
.B Mouse button
.B Description
.TP
.SM LEFT
Starts a new selection and moves the insertion 
point to the end of the selection nearest the 
mouse cursor.
.TP
.SM MIDDLE
Extends a selection, and moves the insertion 
point.
.TP
.SM RIGHT
Displays a menu of operations, explained below.
.RE
.LP
There are two types of selections: a primary selection is indicated
by video-inversion of the span of characters, and tends to persist.
A secondary selection is indicated by underlining the span of
characters and only exists while one of the four function keys
corresponding to the commands
.BR Cut ,
.BR Find ,
.BR Paste ,
or
.BR Copy ,
is depressed.
.LP
In addition, a  selection can be \(lqpending-delete,\(rq as indicated
by overlaying the span of characters with a light gray pattern.
A selection is made pending-delete by holding the
.SM CTRL
key while clicking the
.SM LEFT
or
.SM MIDDLE
mouse buttons.
If a primary selection is pending-delete, it is only deleted when
characters are inserted, either by type-in or by 
.B Paste
or
.BR Copy .
If a secondary selection is pending-delete,
it is deleted when the function key is released, except in the case
of the 
.BR Find ,
which deselects the secondary selection.
.LP
You can make adjusted selections switch to pending-delete using the
.B adjust_is_pending_delete
defaults entry, or the
.B \-Ea
option. 
In this case,
\s-1CTRL\s0-Middle
makes the selection
.I not
pending-delete.
.LP
Commands that operate on the primary selection do so even if the
primary selection is not in the window that issued the command.
.SS "Inserting Text and Command Characters"
.LP
For the most part, typing any of the standard
keys either inserts the corresponding character
at the insertion point, or erases characters.
However, certain key combinations are treated as commands.
.\"A complete list can be found in
.\".BR sunview (5).
Some of the most useful are:
.LP
.ta 20n 40n
.nf
.B Command	Character	Description
.sp
\fBCut-Primary\fR	\s-1META\s0-X 	Erases, and moves to the Clipboard, the primary selection.
\fBFind-Primary\fR	\s-1META\s0-F	Searches the text for the pattern specified by the primary
		selection or by the Clipboard, if there is no primary selection.
\fBCopy-to-Clipboard\fR	\s-1META\s0-C	Copies the primary selection to the 	Clipboard. 
\fBPaste-Clipboard\fR	\s-1META\s0-V	Inserts the Clipboard contents at the insertion point.
\fBCopy-then-Paste\fR	\s-1META\s0-P	Copies the primary selection to the insertion point (through
		the Clipboard).
\fBGo-to-\s-1EOF\s0\fR	\s-1CTRL\s0-\s-1RETURN\s0	Moves the insertion point to the end of the text, positioning
		the text so that the insertion point is visible.
.fi
.br
.ne 8
.SS Function Keys
.LP
The commands indicated by use of the function keys are:
.LP
.ta 20n 40n
.nf
\fBCommand\fP	\fBSun-2\||\|3 Key\fP	\fBDescription\fP
.sp
\fBStop\fR	L1	Aborts the current command.
\fBAgain\fR	L2	Repeats the previous editing sequence since a 
		primary selection was made.
\fBUndo\fR	L4	Undoes a prior editing sequence.
\fBFront\fR	L5	Makes the window completely visible (or 
		hides it, if it is already exposed).
\fBCopy\fR	L6	Copies the primary selection, either to the 
		Clipboard or at the closest end of the secondary 
		selection.
\fBOpen\fR	L7	Makes the window iconic (or normal, if it is already 
		iconic).
\fBPaste\fR	L8	Copies either the secondary selection or the Clipboard at 
		the insertion point.
\fBFind\fR	L9	Searches for the pattern specified by, in order, the 
		secondary selection, the primary selection, or the Clipboard.
\fBCut\fR	L10	Erases, and moves to the Clipboard, either the primary or 
		the secondary selection.
\fB\s-1CAPSLOCK\s0\fR	F1	Forces all subsequently typed alphabetic characters 
		to be upper-case.
\&	\&	This key is a toggle; striking it a second time undoes the
		effect of the first strike.
.fi
.LP
.B Find
usually searches the text forwards, towards the end.
Holding down the 
.SM SHIFT
key while invoking
.B Find
searches backward through the text, towards the beginning.
If the pattern is not found before the search encounters
either extreme, it \(lqwraps around\(rq and
continues from the other extreme.
.B Find
starts the search at the appropriate end of the primary selection,
if the primary selection is in the subwindow that the search is made in;
otherwise it starts at the insertion point, unless the subwindow cannot
be edited, in which case it starts at the beginning of the text.
.LP
\s-1CTRL\s0-Find
invokes the
.B Find and Replace
pop-up frame.
.LP
The default assignment of function keys can be modified using
.BR defaultsedit (1).
.br
.ne 10
.SS Menu Items
.LP
.TP 10
.B File
A pull-right menu item for file operations.
.TP
.B Edit
A pull-right menu item equivalent of the editing function keys.
The
.B Edit
submenu provides
.BR Again ,
.BR Undo ,
.BR Copy ,
.BR Paste ,
and
.B Cut
(same as function keys L2, L4, L6, L8, and L10).
.TP
.B Display
A pull-right menu item for controlling the way
text is displayed and line display format.
.TP
.B Find
A pull-right menu item for find and delimiter matching operations.
.TP
.B Extras
A user definable pull-right menu item.  The
.B Extras
standard submenu is controlled by
.BR /usr/lib/text_extras_menu .
This file has the same syntax as
.B \&.rootmenu
file.
See
.BR sunview (1).		
.LP
Only those items that are active appear as normal text in the menu;
inactive items (which are inappropriate at the time) are \(lqgrayed out\(rq.
.SS User Defined Commands
.LP
The file
.B /usr/lib/text_extras_menu
specifies filter programs that are included in the text subwindow
.B Extras
pull-right menu item.  
The file 
.B ~/.textswrc
specifies filter programs that are assigned to (available)
function keys.
These filters are applied to the contents of the primary selection.
Their output is entered at the caret.
.LP
The file
.B /usr/lib/textswrc
is a sample containing a set of useful filters.
It is not read automatically.
.SH FILES
.PD 0
.TP 25
.B ~/.textswrc
specifies bindings of filters to function keys
.TP
.B /usr/lib/text_extras_menu
specifies bindings of filters for the extras menu pull-right items
.TP
.B /usr/bin
contains useful filters, including \fBshift_lines\fP and \fBcapitalize\fP.
.TP
.IB filename %
prior version of
.I filename
is available here after a
.B Save Current File
menu operation
.TP
.BI textedit. pid
edited version of
.IR filename ;
generated in response to fatal internal errors
.TP
.B /tmp/Text*
editing session logs
.PD
.SH "SEE ALSO"
.BR defaultsedit (1),
.BR kill (1),
.BR sunview (1)
.\".BR sunview (5),
.\".BR textswrc (5)
.LP
.TX SVBG
.SH DIAGNOSTICS
.TP 35
.B "Cannot open file '\fIfilename\fP', aborting!"
.I filename
does not exist or cannot be read.
.LP
.B textedit
produces the following exit status codes:
.LP
.PD 0
.RS
.TP
0
normal termination
.TP
1
standard SunView help message was printed
.TP
2
help message was requested and printed
.TP
3
abnormal termination in response to a signal, usually due to an internal error
.TP
4
abnormal termination during initialization,
usually due to a missing file or running out of swap space
.PD
.RE
.SH BUGS
Multi-click to change the current selection does not work for
.BR "Adjust Selection" .
.LP
Handling of long lines is incorrect in certain scrolling situations.
.LP
There is no way to replay any editing sequence except the most recent.
.LP
.RB ` "textedit\fI newfile\fP" '
fails if
.I newfile
does not exist.
 "My\ tools"
\s-1MENU\s0  /home/me/mytools.menu
.TP
../share/man/man1/textedit_filters.1                                                                    755       0      12         6651  4424740733  12364                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)textedit_filters.1 1.18 89/03/26 SMI;
.TH TEXTEDIT_FILTERS 1 "22 March 1989"
.SH NAME
textedit_filters, align_equals, capitalize, insert_brackets, shift_lines \- filters provided with textedit(1)
.SH SYNOPSIS
.B align_equals
.LP
.B capitalize
.RB [ " \-u"
.RB | " \-l"
.RB | " \-c" " ]"
.LP
.BI insert_brackets " l  r "
.LP
.BI shift_lines
[
.B \-t
]
.I n
.SH DESCRIPTION
.IX align_equals "" "\fLalign_equals\fR \(em \fLtextedit\fR selection filter"
.IX capitalize "" "\fLcapitalize\fR \(em \fLtextedit\fR selection filter"
.IX insert_brackets "" "\fLinsert_brackets\fR \(em \fLtextedit\fR selection filter"
.IX shift_lines "" "\fLshift_lines\fR \(em \fLtextedit\fR selection filter"
.LP
Each of these filters is designed to operate on pending-delete selections in
text subwindows.
You can use them from within text subwindows either by
mapping them to function keys in your
.B .textswrc
file or adding them to the text `Extras' menu in your
.B .text_extras_menu
file.
See the
.TX SVBG
for details.
When a filter is used as a command (perhaps in a pipeline),
it is applied to the standard input and the filtered text appears
on standard output.
.LP
.B align_equals
lines up the
.RB ` = '
(equal signs) in C
assignment statements.
Some programmers feel that this makes for improved readability.
It aligns all equal signs with the rightmost equal sign in the
selection (or the standard input), by padding with spaces between
the sign and the previous nonwhite character; it replaces
the selection with the aligned text (or writes this text to the
standard output).
For instance:
.RS
.nf
.ft B
.cs B 20
big_long_expression = x;
shorter_expr = y;
z += 1;
.fi
.cs B
.ft R
.RE
becomes:
.RS
.nf
.ft B
.cs B 20
big_long_expression = x;
shorter_expr        = y;
z                  += 1;
.fi
.cs B
.ft R
.RE
.LP
.B capitalize
changes the capitalization of the selection (or the standard input)
and replaces it (or writes to the standard output).
The
.B \-l
option converts all characters to lower case;
.B \-c
converts the first letter of each word to upper case;
and
.B \-u
converts all characters to upper case.
If no option is specified, then
.B capitalize
consults its input to determine what to do.
If the text is all capitals, it is converted to all lower case.
If the text is all lower case or of mixed cases and contains no white
space (such as a
.SM NEWLINE\s0,
.SM SPACE\s0,
or
.SM TAB\*S),
it is converted to all capitals.  If there is white space,
then the case of the first character in each word is inverted.
.LP
.B insert_brackets
surrounds the selection (or the standard input)
with the specified character sequences.
.I l
and
.I r
are the left- and right-bracketing characters, respectively.
.LP
.B shift_lines
adjusts indention of the the selection (or the standard input) by
.I n
spaces, and replaces the selection with the adjusted text (or
writes to the standard output).
.B shift_lines
adjusts to the left when
.I n
is negative.
If
.B \-t
is specified, the lines are shifted left or right by
.I n
tab stops.
The default is 8 spaces per tab stop,
but if the first line of the selection (or the standard input)
begins with white space,
then the tab stops are set to four spaces.
.SH FILES
.PD 0
.TP 30
.BI /tmp/Cap. pid
temporary file used by
.B capitalize
.TP
.BI /tmp/Ins. pid
temporary file used by
.B insert_brackets
.TP
.B /usr/lib/.text_extras_menu
default `Extras' menu
.TP
.B /usr/lib/.textswrc
sample function-key mappings
.PD
.SH SEE ALSO
.BR textedit (1)
.LP
.TX SVBG
q as indicated
by overlaying the span of characters with a light gray pattern.
A select./share/man/man1/tftp.1c                                                                               755       0      12         7472  4424740734  10125                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1986 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)tftp.1c 1.19 89/03/26 SMI; from UCB 4.3 BSD
.\"
.TH TFTP 1C "26 February 1988"
.SH NAME
tftp \- trivial file transfer program
.SH SYNOPSIS
.B tftp
[
.I host
]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "tftp command" "" "\fLtftp\fR command"  
.IX files  transfer
.IX "file transfer protocol"  "trivial, \fLtftp\fP command" 
.LP
.B tftp
is the user interface to the Internet
.SM TFTP
(Trivial File Transfer Protocol),
which allows users to transfer files to and from a remote machine.
The remote
.I host
may be specified on the command line, in which case
.B tftp
uses
.I host
as the default host for future transfers (see the
.B connect
command below).
.SH USAGE
.SS Commands
Once
.B tftp
is running, it issues the prompt:
.B tftp>
and recognizes the following commands:
.TP
.BI connect " host-name " [ " port " ]
Set the
.I host
(and optionally
.IR port )
for transfers.
Note: the
.SM TFTP
protocol, unlike the
.SM FTP
protocol, does not maintain connections between transfers; thus, the
.B connect
command does not actually create a connection,
but merely remembers what host is to be used for transfers.
You do not have to use the
.B connect
command; the remote host can be specified as part of the
.B get
or
.B put
commands.
.TP
.BI mode " transfer-mode"
Set the mode for transfers;
.I transfer-mode
may be one of
.BR ascii
or
.BR binary .
The default is
.BR ascii .
.TP
.BI put " filename"
.PD 0
.TP
.BI put " localfile remotefile"
.TP
.PD
\fBput\fP \fIfilename1 filename2 .\|.\|. filenameN remote-directory\fP
Transfer a file, or a set of files, to the specified
remote file or directory.  The destination
can be in one of two forms:
a filename on the remote host if the host has already been specified,
or a string of the form
.RS
.IP
.IB host : filename
.RE
.IP
to specify both a host and filename at the same time.
If the latter form is used,
the specified host becomes the default for future transfers.
If the remote-directory form is used, the remote host is
assumed to be running the
.SM UNIX
system.
.PD 0
.TP
.BI get " filename"
.TP
.BI get " remotename"
.I localname
.TP
.PD
\fBget\fP \fIfilename1 filename2\fP .\|.\|. \fI filenameN\fR
Get a file or set of files from the specified remote
.IR sources .
.I source
can be in one of two forms:
a filename on the remote host if the host has already been specified,
or a string of the form
.RS
.IP
.IB host : filename
.RE
.IP
to specify both a host and filename at the same time.
If the latter form is used,
the last host specified becomes the default for future transfers.
.TP
.B quit
Exit
.BR tftp .
An
.SM EOF
also exits.
.TP
.B verbose
Toggle verbose mode.
.TP
.B trace
Toggle packet tracing.
.TP
.B status
Show current status.
.TP
.BI rexmt " retransmission-timeout"
Set the per-packet retransmission timeout, in seconds.
.br
.ne 5
.TP
.BI timeout " total-transmission-timeout"
Set the total transmission timeout, in seconds.
.TP
.B ascii
Shorthand for
.BR "mode ascii" .
.TP
.B binary
Shorthand for
.BR "mode binary" .
.TP
.BI "? [ " command-name " .\|.\|. ]"
Print help information.
.SH WARNING
.LP
The default
.I transfer-mode
is
.BR ascii .
This differs from pre-4.0 Sun (and pre-4.3
.SM BSD\s0)
releases, so explicit action must now be taken
when transferring non-\c
\s-2ASCII\s0
files such as executable commands.
.SH BUGS
.LP
Because there is no user-login or validation within
the
.SM TFTP
protocol, many remote sites restrict file access in various ways.
Approved methods for file access are specific to each site, and
therefore cannot be documented here.
the function key is released, except in the case
of the 
.BR Find ,
which deselects the secondary selection.
.LP
You can make adjusted selections switch to pending-delete using the
.B adjust_is_pend./share/man/man1/then.1                                                                                755       0      12           72  4424740734   7670                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)then.1 1.8 89/03/26 SMI; 
    t    toolplaces.1        touch.1v        tput.1v       tr.1v v       trace.1       
traffic.1c       troff.1       true.1        tset.1       tsort.1       tty.1 1   ,    u370.1   <    u3b.1    L    u3b15.1   \    u3b2.1    l    u3b5.1   |    ul.1 1       umask.1       	unalias.1       uname.1v        uncompress.1  ./share/man/man1/time.1v                                                                               755       0      12         5020  4424740734  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)time.1v 1.11 89/03/26 SMI; from UCB 4.1
.TH TIME 1V  "22 December 1987"
.SH NAME
time \- time a command
.SH SYNOPSIS
.B time
[
.I command
]
.IX  "time command"  ""  "\fLtime\fP \(em time command"
.IX  "performance monitoring"  time  ""  "\fLtime\fP \(em time command"
.IX  "programming tools"  time  ""  "\fLtime\fP \(em time command"
.SH DESCRIPTION
.IX "System V commands" "\fLtime\fR"
.LP
There are three distinct versions of
.BR time :
it is built in to the C shell, and is an
executable program available in
.B /usr/bin/time
and
.B /usr/5bin/time
when using the Bourne shell.
In each case, times are displayed on the diagnostic output stream.
.LP
In the case of the C shell, a
.B time
command with no
.I command
argument simply displays a summary of
time used by this shell and its children.
When arguments are given the specified simple
.I command
is timed and the C shell displays a time
summary as described in
.BR csh (1).
.LP
The
.B time
commands in
.B /usr/bin/time
and
.B /usr/5bin/time
time the given
.IR command ,
which must be specified, that is,
.I command
is not optional as it is in the C shell's timing facility.  When the
command is complete,
.B time
displays the elapsed time during the command, the time
spent in the system, and the time spent in execution of the command.
Times are reported in seconds.
The only difference between the versions in
.B /usr/bin/time
and
.B /usr/5bin/time
is between their output formats;
.B /usr/bin/time
prints all three times on the same line, while
.B /usr/5bin/time
prints them on separate lines.
.SH EXAMPLES
.LP
The three examples here show the differences between the
.B csh
version of
.B time
and the versions in
.B /usr/bin/time
and
.BR /usr/bin/time .
The example assumes that
.B csh
is the shell in use.
.RS
.sp .5
.nf
.ft B
example% time wc /usr/share/man/man1/csh.1
1876   11223   65895 /usr/share/man/man1/csh.1
2.7u 0.9s 0:03 91% 3+5k 19+2io 1pf+0w
example%/usr /bin/time wc /usr/share/man/man1/csh.1
1876   11223   65895 /usr/share/man/man1/csh.1
4.3 real         2.7 user         1.0 sys
example% /usr/5bin/time wc /usr/share/man/man1/csh.1
1876   11223   65895 /usr/share/man/man1/csh.1
real        4.3
user        2.7
sys         1.0
example%
.ft R
.fi
.RE
.SH "SEE ALSO"
.BR csh (1)
.SH BUGS
.LP
Elapsed time is accurate to the second, while the
.SM CPU
times are measured to the 50th second.  Thus the sum of the
.SM CPU
times can be up to a
second larger than the elapsed time.
.SH BUGS
.LP
When the command being timed is interrupted, the timing values
displayed may not always be accurate.
sources .
.I source
can be in one of two forms:
a filename on the remote host if the host has already been specified,
or a string of the form
.RS
.IP
.IB host : filename
.RE
.IP
to specify both a host and filename at the same time.
If the latter form is used,
the last host specified becomes the default for future transfers.
.TP
.B quit
Exit
.BR tftp .
An
.SM EOF
also exits.
.TP
.B verbose
Toggle verbose mode.
.TP
.B trace
Toggle packet tracing.
.TP
.B status
Show current status.
.TP
.BI rexm./share/man/man1/tip.1c                                                                                755       0      12        47723  4424740734   7767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tip.1c 1.28 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH TIP 1C "19 January 1988"
.SH NAME
tip, cu \- terminal emulator, telephone connection to a remote system
.SH SYNOPSIS
.B tip
[
.B \-v
]
[
.BI \- speed-entry
]
.I hostname
|
.I phone-number
.LP
.B cu
.I phone-number
[
.B \-t
]
[
.B \-s
.I speed
]
[
.B \-a
.I acu
]
[
.B \-l
.I line
]
[
.B \-#
]
.IX  "cu command"  ""  "\fLcu\fP \(em connect to remote system"
.IX  "tip command"  ""  "\fLtip\fP \(em connect to remote system"
.IX  "connect to remote system"  "\fLcu\fP"
.IX  "connect to remote system"  "\fLtip\fP"
.IX  "remote system"  "connect to \(em \fLcu\fP"
.IX  "remote system"  "connect to \(em \fLtip\fP"
.IX  communications  cu  ""  "\fLcu\fP \(em connect to remote system"
.IX  communications  tip  ""  "\fLtip\fP \(em connect to remote system"
.SH DESCRIPTION
.LP
.B tip
establishes a full-duplex terminal connection to a remote host.
Once the connection is established, a remote session using 
.B tip
behaves like an interactive session on a local terminal.
.LP
The preferred interface for remote connections is
.BR tip ;
.B cu
is included for those who are familiar with the \(lqcall
.SM UNIX\s0\(rq
command of the version 7
.SM UNIX
system.  This manual page describes only
.BR tip .
.LP
The
.I remote
file (described in the
.BR remote (5)
manual page)
contains entries describing remote systems and line speeds used by
.BR tip .
.LP
Each host has a default baud rate for the connection, or you can
specify a speed with the
.BI \- speed-entry
command line argument.
.LP
When
.I phone-number
is specified,
.B tip
looks for an entry in the
.I remote
file of the form:
.IP
.BI " tip\ \-" speed-entry
.LP
When it finds such an entry, it sets the connection speed
accordingly.  If it finds no such entry,
.B tip
interprets 
.BI \- speed-entry
as if it were a system name, resulting in an error message.
.LP
If you omit 
.BI \- speed-entry\fR, 
.B tip
uses the
.B tip0
entry to set a speed for the connection.
.LP
When establishing the connection
.B tip
sends a connection message to the remote system.  The default value for
this message can be found in the 
.I remote
file.
.LP
When
.B tip
attempts to connect to a remote system, it opens the
associated device with an exclusive-open
.BR ioctl (2)
call.  Thus only one user at a time may access a device.
This is to prevent multiple
processes from sampling the terminal line.  In addition,
.B tip
honors the locking protocol used by
.BR uucp (1C).
.LP
When 
.B tip
starts up it reads commands from the file
.B \&.tiprc
in your home directory.
.SH OPTIONS
.TP
.B \-v 
Display commands from the
.B \&.tiprc
file as they are executed.
.SH USAGE
.LP
Typed characters are normally transmitted directly to the remote
machine (which does the echoing as well).
.LP
At any time that
.B tip
prompts for an argument (for example, during setup of
a file transfer) the line typed may be edited with the standard
erase and kill characters.  A null line in response to a prompt,
or an interrupt, aborts the dialogue and returns you to the remote machine.
.SS Commands
.LP
A tilde (\s+2\|~\|\s0) appearing as the first character of a line is an escape
signal which directs
.B tip
to perform some special action.
.B tip
recognizes the following escape sequences:
.TP
.PD 0
.B ~^D
.TP
.B ~.
.PD
Drop the connection and exit (you may still be logged in on the remote
machine).
.HP
.B ~c
.RI [ name ]
.br
Change directory to
.I name
(no argument implies change to your home directory).
.TP
.B ~!
Escape to a shell (exiting the shell returns you to
.BR tip ).
.TP
.B ~>
Copy file from local to remote.
.TP
.B ~<
Copy file from remote to local.
.HP
.BI ~p " from"
.RI [ " to " ]
.br
Send a file to a remote host running the
.SM UNIX
system.  When you use the put command, the remote
system runs the command string
.RS
.IP
.BI "cat > " to
.RE
.IP
while
.B tip
sends it the
.I from
file.  If the
.I to
file is not specified, the
.I from
file name is used.  This command is actually a
.SM UNIX\s0-system-specific
version of the
.RB ` ~> '
command.
.HP
.BI ~t " from"
.RI [ " to " ]
.br
Take a file from a remote host running the
.SM UNIX
system.  As in the put command the
.I to
file defaults to the
.I from
file name if it is not specified.
The remote host executes the command string
.RS
.IP
.BI "cat " from "\|;  echo ^A"
.RE
.IP
to send the file to
.BR tip .
.TP
.B ~|
Pipe the output from a remote command to a local process. 
The command string sent to the local
system is processed by the shell.
.TP
.B ~C
Connect a program to the remote machine.
The command string sent to
the program is processed by the shell.  The program inherits file
descriptors 0 as remote line input, 1 as remote line output, and 2 as
tty standard error.
.TP
.B ~$
Pipe the output from a local process to the remote host.
The command string sent to the local system is processed by the shell.
.TP
.B ~#
Send a
.SM BREAK
to the remote system.
.TP
.B ~s
Set a variable (see the discussion below).
.TP
.B ~^Z
Stop
.B tip
(only available when run under a shell that supports job control,
such as the C shell).
.TP
.B ~^Y
Stop only the \(lqlocal side\(rq of
.B tip
(only available when run under a shell that supports job control,
such as the C shell);
the \(lqremote side\(rq of
.BR tip ,
the side that displays output from the remote host, is left running.
.TP
.B ~?
Get a summary of the tilde escapes.
.LP
Copying files requires some cooperation on the part of the remote host.
When a
.B ~>
or
.B ~<
escape is used to send a file,
.B tip
prompts for a file name (to be transmitted or received) and a command
to be sent to the remote system, in case the file is being transferred
from the remote system.  The default end of transmission string for
transferring a file from the local system to the remote is specified as the
.B oe
capability in the
.BR remote (5)
file, but may be changed by the set command.  While
.B tip
is transferring a file the number of lines transferred will be continuously
displayed on the screen. A file transfer may be aborted with an interrupt.
.SH "AUTO-CALL UNITS"
.LP
.B tip
may be used to dial up remote systems using a number of auto-call unit's
(\s-1ACU\s0's). 
When the remote system description contains the
.B du
capability,
.B tip
uses the call-unit
.RB ( cu ),
.SM ACU
type
.RB ( at ),
and phone numbers
.RB ( pn )
supplied.  Normally
.B tip
displays verbose messages as it dials.  See
.BR remote (5)
for details of the remote host specification.
.LP
Depending on the type of auto-dialer being used to establish a connection
the remote host may have garbage characters sent to it upon connection.
The user should never assume that the first characters typed to
the foreign host are the first ones presented to it.  The recommended
practice is to immediately type a
.B kill
character upon establishing a connection (most
.SM UNIX
systems either support
.B @
or
.SM CTRL-U
as the initial kill character).
.LP
.B tip
currently supports the Ventel
.SM MD\s0-212+
modem and
.SM DC
Hayes-compatible modems.
.\"currently supports the
.\".SM DF\s002,
.\"and
.\".SM DF\s003
.\"interfaces,
.\"Bizcomp 1031 and 1032 interfaces.
.br
.ne 5
.SH "REMOTE HOST DESCRIPTIONS"
.LP
Descriptions of remote hosts are normally located in the system-wide file
.BR /etc/remote .
However, a user may maintain personal description files (and phone numbers)
by defining and exporting the
.SM REMOTE
shell variable.  The
.I remote
file must be readable by
.BR tip ,
but a secondary file describing phone numbers may be maintained readable only
by the user.  This secondary phone number file is
.BR /etc/phones ,
unless the shell variable
.SM PHONES
is defined and exported.  As described in
.BR remote (5),
the
.I phones
file is read when the host description's phone number(s) capability is
an
.RB ` @ '.
The phone number file contains lines of the form:
.IP
.I system-name    phone-number
.LP
Each phone number found for a system is tried until either a connection
is established, or an end of file is reached.  Phone numbers are
constructed from
.RB ` 0123456789\-=* ',
where the
.RB ` = '
and
.RB ` * '
are used to indicate a second dial tone should be waited for
(\s-1ACU\s0 dependent).
.LP
.SH "TIP INTERNAL VARIABLES"
.LP
.B tip
maintains a set of variables which are used in normal operation.
Some of these variables are read-only to normal users (root is allowed
to change anything of interest).  Variables may be displayed
and set through the
.B ~s
escape.  The syntax for variables is patterned after
.BR vi (1)
and
.BR mail (1).
Supplying
.B all
as an argument to the
.B ~s
escape displays all variables
that the user can read.  Alternatively, the user may request display of a
particular variable by attaching a
.B ?
to the end.  For example
.RB ` "~s escape?" '
displays the current escape character.
.LP
Variables are numeric, string, character, or Boolean values.  Boolean
variables are set merely by specifying their name.  They may be reset
by prepending a
.B !
to the name.  Other variable types are set by appending an
.B =
and the value. 
The entire assignment must not have any blanks in it.
A single set command may be used to interrogate as
well as set a number of variables.
.LP
Variables may be initialized at run time by placing set commands (without
the
.B ~s
prefix) in a
.B \&.tiprc
file in one's home directory.  The
.B \-v
option makes
.B tip
display the sets as they are made.
Comments preceded by a
.B #
sign can appear in the 
.B \&.tiprc
file.
.LP
Finally, the variable names must either be completely specified or
an abbreviation may be given.  The following list details those
variables known to
.BR tip .
.TP
.B beautify
(bool) Discard unprintable characters when a session is being scripted;
abbreviated 
.BR be .
If the
.B nb
capability is present,
.B beautify
is initially set to
.IR off ;
otherwise,
.B beautify
is initially set to
.IR on .
.TP
.B baudrate
(num) The baud rate at which the connection was established;
abbreviated
.BR ba .
If a baud rate was specified on the command line,
.B baudrate
is initially set to the specified value;
otherwise, if the
.B br
capability is present,
.B baudrate
is initially set to the value of that capability; otherwise,
.B baudrate
is set to 300 baud.
Once
.B tip
has been started,
.B baudrate
can only changed by the super-user.
.TP
.B dialtimeout
(num) When dialing a phone number, the time (in seconds)
to wait for a connection to be established; abbreviated
.BR dial .
.B dialtimeout
is initially set to 60 seconds, and can only changed by the super-user.
.TP
.B disconnect
(str) The string to send to the remote host to disconnect from it;
abbreviated
.BR di .
If the
.B di
capability is present,
.B disconnect
is initially set to the value of that capability; otherwise,
.B disconnect
is set to a null string (\fB""\fR).
.TP
.B echocheck
(bool) Synchronize with the remote host during file transfer by
waiting for the echo of the last character transmitted; abbreviated
.BR ec .
If the
.B ec
capability is present,
.B echocheck
is initially set to
.IR on ;
otherwise,
.B echocheck
is initially set to
.IR off .
.br
.ne 5
.TP
.B eofread
(str) The set of characters which signify an
.SM EOT
during a
.B ~<
file transfer command; abbreviated
.BR eofr .
If the
.B ie
capability is present,
.B eofread
is initially set to the value of that capability; otherwise,
.B eofread
is set to a null string (\fB""\fR).
.TP
.B eofwrite
(str) The string sent to indicate 
.SM EOT
during a
.B ~>
file transfer command; abbreviated
.BR eofw .
If the
.B oe
capability is present,
.B eofread
is initially set to the value of that capability; otherwise,
.B eofread
is set to a null string (\fB""\fR).
.TP
.B eol
(str) The set of characters which indicate an end-of-line.
.B tip
will recognize escape characters only after an end-of-line.
If the
.B el
capability is present,
.B eol
is initially set to the value of that capability; otherwise,
.B eol
is set to a null string (\fB""\fR).
.TP
.B escape
(char) The command prefix (escape) character; abbreviated
.BR es .
If the
.B es
capability is present,
.B escape
is initially set to the value of that capability; otherwise,
.B escape
is set to
.RB ` \|\s+2~\s0\| '.
.TP
.B etimeout
(num) The amount of time, in seconds, that
.B tip
should wait for the echo-check response when
.B echocheck
is set; abbreviated
.BR et .
If the 
.B et
capability is present,
.B etimeout
is initially set to the value of that capability; otherwise,
.B etimeout
is set to 10 seconds.
.TP
.B exceptions
(str) The set of characters which should not be discarded
due to the beautification switch; abbreviated
.BR ex .
If the
.B ex
capability is present,
.B exceptions
is initially set to the value of that capability; otherwise,
.B exceptions
is set to
.RB ` \et\en\ef\eb '.
.TP
.B force
(char) The character used to force literal data transmission;
abbreviated
.BR fo .
If the
.B fo
capability is present,
.B force
is initially set to the value of that capability; otherwise,
.B force
is set to
.B \e377
(which disables it).
.TP
.B framesize
(num) The amount of data (in bytes) to buffer between file system
writes when receiving files; abbreviated
.BR fr .
If the
.B fs
capability is present,
.B framesize
is initially set to the value of that capability; otherwise,
.B framesize
is set to 1024.
.TP
.B halfduplex
(bool) Do local echoing because the host is half-duplex; abbreviated
.BR hdx .
If the
.B hd
capability is present,
.B halfduplex
is initially set to
.IR on ;
otherwise,
.B halfduplex
is initially set to
.IR off .
.TP
.B host
(str) The name of the host to which you are connected; abbreviated
.BR ho .
.B host
is permanently set to the name given on the command line or in the
.SM HOST
environment variable.
.TP
.B localecho
(bool) A synonym for
.BR halfduplex ;
abbreviated
.BR le .
.TP
.B log
(str) The name of the file to which to log information about outgoing phone
calls.
.B log
is initially set to
.BR /var/adm/aculog ,
and can only be inspected or
changed by the super-user.
.TP
.B parity
(str) The parity to be generated and checked when talking to the
remote host; abbreviated
.BR par .
The possible values are:
.RS
.TP
.PD 0
.B none
.TP
.B zero
.PD
Parity is not checked on input, and the parity bit is set to zero on
output.
.TP
.B one
Parity is not checked on input, and the parity bit is set to one on
output.
.TP
.B even
Even parity is checked for on input and generated on output.
.TP
.B odd
Odd parity is checked for on input and generated on output.
.RE
.IP
If the
.B pa
capability is present,
.B parity
is initially set to the value of that capability; otherwise,
.B parity
is set to 
.BR none .
.br
.ne 8
.TP
.B phones
The file in which to find hidden phone numbers.
If the environment variable
.SM PHONES
is set,
.B phones
is set to the value of
.SM PHONES\s0;
otherwise,
.B phones
is set to
.BR /etc/phones .
The value of
.B phones
cannot be changed from within
.BR tip .
.TP
.B prompt
(char) The character which indicates an end-of-line on the remote
host; abbreviated
.BR pr .
This value is used to synchronize during data transfers.  The count of
lines transferred during a file transfer command is based on receipt of
this character.  If the
.B pr
capability is present,
.B prompt
is initially set to the value of that capability; otherwise,
.B prompt
is set to
.BR \en .
.TP
.B raise
(bool) Upper case mapping mode; abbreviated 
.BR ra .
When this mode is enabled, all lower case letters will be mapped to
upper case by
.B tip
for transmission to the remote machine.
If the
.B ra
capability is present,
.B raise
is initially set to
.IR on ;
otherwise,
.B raise
is initially set to
.IR off .
.TP
.B raisechar
(char) The input character used to toggle upper case mapping mode;
abbreviated
.BR rc .
If the
.B rc
capability is present,
.B raisechar
is initially set to the value of that capability; otherwise,
.B raisechar
is set to
.B \e377
(which disables it).
.TP
.B rawftp
(bool) Send all characters during file transfers; do not filter non-printable
characters, and do not do translations like
.B \en
to
.BR \er .
Abbreviated
.BR raw .
If the
.B rw
capability is present,
.B rawftp
is initially set to
.IR on ;
otherwise,
.B rawftp
is initially set to
.IR off .
.TP
.B record
(str) The name of the file in which a session script is recorded;
abbreviated
.BR rec .
If the
.B re
capability is present,
.B record
is initially set to the value of that capability; otherwise,
.B record
is set to
.BR tip.record .
.TP
.B remote
The file in which to find descriptions of remote systems.
If the environment variable
.SM REMOTE
is set,
.B remote
is set to the value of
.SM REMOTE\s0;
otherwise,
.B remote
is set to
.BR /etc/remote .
The value of
.B remote
cannot be changed from within
.BR tip .
.TP
.B script
(bool) Session scripting mode; abbreviated
.BR sc .
When
.B script
is 
.IR on ,
.B tip
will record everything transmitted by the remote machine in
the script record file specified in
.BR record .
If the
.B beautify
switch is on, only printable
.SM ASCII
characters will be included in
the script file (those characters between 040 and 0177).  The
variable
.B exceptions
is used to indicate characters which are an exception to the normal
beautification rules.
If the
.B sc
capability is present,
.B script
is initially set to
.IR on ;
otherwise,
.B script
is initially set to
.IR off .
.TP
.B tabexpand
(bool) Expand
.SM TAB
characters to
.SM SPACE
characters during file transfers; abbreviated
.BR tab .
When 
.B tabexpand
is
.IR on ,
each tab is expanded to 8
.SM SPACE
characters.
If the
.B tb
capability is present,
.B tabexpand
is initially set to
.IR on ;
otherwise,
.B tabexpand
is initially set to
.IR off .
.TP
.B tandem
(bool) Use
.SM XON/XOFF
flow control to limit the rate that data is sent
by the remote host; abbreviated
.BR ta .
If the 
.B nt
capability is present,
.B tandem
is initially set to
.IR off ;
otherwise,
.B tandem
is initially set to
.IR on .
.TP
.B verbose
(bool) Verbose mode; abbreviated
.BR verb ;
When verbose mode is enabled, 
.B tip
prints messages while dialing, shows the current number
of lines transferred during a file transfer operations,
and more.
If the
.B nv
capability is present,
.B verbose
is initially set to
.IR off ;
otherwise,
.B verbose
is initially set to
.IR on .
.TP
.B SHELL
(str) The name of the shell to use for the
.B ~!
command; default value is
.BR /bin/sh ,
or taken from the environment.
.TP
.B HOME
(str) The home directory to use for the
.B ~c 
command; default
value is taken from the environment.
.br
.ne 20
.SH EXAMPLES
.LP
An example of the dialogue used to transfer files is given below.
.RS
.nf
.ft B
arpa% tip monet
[connected]
\&.\|.\|.(\fIassume we are talking to a \s-1UNIX\s0 system).\|.\|\fP
ucbmonet login: sam
Password:
monet% cat > sylvester.c
~> Filename: sylvester.c
32 lines transferred in 1 minute 3 seconds
monet%
monet% ~< Filename: reply.c
List command for remote host: cat reply.c
65 lines transferred in 2 minutes
monet%
\&.\|.\|.(\fIor, equivalently).\|.\|\fP
monet% ~p sylvester.c
\&.\|.\|.(\fIactually echoes as ~[put] sylvester.c).\|.\|\fP
32 lines transferred in 1 minute 3 seconds
monet%
monet% ~t reply.c
\&.\|.\|.(\fIactually echoes as ~[take] reply.c).\|.\|\fP
65 lines transferred in 2 minutes
monet%
\&.\|.\|.(\fIto print a file locally).\|.\|\fP
monet% ~|Local command: pr \-h sylvester.c | lpr
List command for remote host: cat sylvester.c
monet% ~^D
[EOT]
\&.\|.\|.(\fIback on the local system).\|.\|.\fP
.ft R
.fi
.RE
.SH ENVIRONMENT
.LP
The following environment variables are read by
.BR tip .
.TP 10
.SB REMOTE
The location of the
.I remote
file.
.TP
.SB PHONES
The location of the file containing private phone numbers.
.TP
.SB HOST
A default host to connect to.
.TP
.SB HOME
One's log-in directory (for chdirs).
.TP
.SB SHELL
The shell to fork on a `~!' escape.
.SH FILES
.PD 0
.TP 20
.B ~/.tiprc
initialization file
.TP
.B /var/spool/uucp/\s-1LCK\s0.\|.*
lock file to avoid conflicts with
.SM UUCP
.TP
.B /var/adm/aculog
file in which outgoing calls are logged
.TP
.B /etc/phones
.TP
.B /etc/remote
.PD
.SH "SEE ALSO"
.BR mail (1),
.BR uucp (1C),
.BR vi (1),
.BR ioctl (2),
.BR phones (5),
.BR remote (5)
.SH BUGS
.LP
There are two additional variables
.B chardelay
and 
.B linedelay
that are currently not implemented.
e,
.B baudrate
is initially set to the specif./share/man/man1/toolplaces.1                                                                          755       0      12         5123  4424740735  11142                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)toolplaces.1 1.17 89/03/26 SMI;
.TH TOOLPLACES 1 "12 January 1988"
.SH NAME
toolplaces \- display current SunView window locations, sizes, and other attributes
.SH SYNOPSIS
.B toolplaces
[
.B \-o|O|u
]
[
.B \-help
]
.SH AVAILABILITY
.LP
This command is available with the
.I SunView 1 User's
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX toolplaces "" "\fLtoolplaces\fR \(em show current window info"
.LP
.B toolplaces
generates position, size, label, and program attributes
for the windows running on a SunView screen at the time of
execution.
.RB ( toolplaces
does not work when SunView is not running.)
.LP
Many people redirect standard output from
.B toolplaces
to the
.B \&.sunview
file, so as to reuse the current window system
attributes each time they execute
.BR sunview (1).
.LP
For each window on the screen at execution time,
.B toolplaces
shows:
.LP
.nf
.RS
the tool name
the \(lqopen\(rq window position
the size of the window in pixels
the \(lqclosed,\(rq or icon, window position
an indicator of whether the window is open or closed
the label at the top of the window
the name of the program running in the window, if a
.RS
program is running there
.RE
any flags or options to a program running in the window
.RE
.fi
.LP
.B toolplaces
describes each window
on one output line, as long as necessary,
using the current
.B sunview
format.
.LP
Current
.B sunview
format consists of window tool descriptions,
one per line, as in this example (the
.B \e
indicates that the current line
continues on the next line):
.LP
.RS
.nf
.ft B
shelltool  \-Wp  491 795 \-Ws 580  87 \-WP    0 836 \-C 
clock  \-Wp  120 120 \-Ws 122  55 \-WP 1086 826 \-Wi \e
	\-Wl " open clock" \-S \-r \-d wdm 
shelltool  \-Wp  491 166 \-Ws 650 567 \-WP  702 836 \\
	\-Wl due rlogin due 
shelltool  \-Wp    0   0 \-Ws 650 525 \-WP   64 836 \\
	\-Wl "Small Window: /usr/bin/csh" 
shelltool  \-Wp  501   0 \-Ws 650 812 \-WP  128 836 \\
	\-Wl "Big Window: /usr/bin/csh"
.ft R
.fi
.RE
.SH OPTIONS
.TP
.B \-o
Show window tool information in the old
.B suntools
format for window attributes, but specifies
the appropriate tool names for each tool.
.TP 
.B \-O
Show window tool information in the old
.B suntools
format for window attributes, specifying
.B toolname
as the name for each tool.
.TP
.B \-u
Show the updated window tool information in the order that you
originally specified it.
.TP
.B \-help
Show help information preceding tool attributes.
.SH FILES
.PD 0
.TP 20
.B ~/.sunview
format file for 
.BR sunview (1)
.PD
.br
.ne 5
.SH SEE ALSO
.BR sunview (1)
.LP
.TX SVBG
ester.c
monet% ~^D
[EOT]
\&.\|.\|.(\fIback on the local system).\|.\|.\fP
.ft R
.fi
.RE
.SH ENVIRONMENT
.LP
The following environment variables are read by
.BR tip .
.TP 10
.SB REMOTE
The location of the
.I remote
file.
.TP
.SB PHONES
The location of the file containing private phone numbers.
.TP
.SB HOST
A default host to connect to.
.TP
.SB HOME
One's log-in directory (for chdirs).
.TP
.SB SHELL
The shell to fork on a `~!' ./share/man/man1/touch.1v                                                                              755       0      12         4554  4424740735  10314                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)touch.1v 1.13 89/03/26 SMI; from 4.2 BSD and S5R2 6.2 9/2/83
.TH TOUCH 1V  "25 March 1989"
.SH NAME
touch \- update the access and modification times of a file
.SH SYNOPSIS
.B touch
[
.B \-c
] [
.B \-f
]
.IR filename .\|.\|.
.SH SYSTEM V SYNOPSIS
.B touch
[
.BR \-acm
] [
.IR date-time
]
.IR filename .\|.\|.
.SH DESCRIPTION
.IX "System V commands" "\fLtouch\fR"
.IX  "touch command"  ""  "\fLtouch\fP \(em update last modified date of file"
.IX  "update last modified date of file"  ""  "update last modified date of file \(em \fLtouch\fP"
.IX  file  "update last modified date of"  ""  "update last modified date of \(em \fLtouch\fP"
.IX  "programming tools"  touch  ""  "\fLtouch\fP \(em update last modified date of file"
.B touch
sets the access and modification times of each
argument to the current time.
A file is created if it does not already exist.
.LP
.B touch
is valuable when used in conjunction with
.BR make (1),
where, for instance, you might want to force a complete rebuild of a
program composed of many pieces.  In such a case, you might type:
.RS
.IP
.nf
.B example% \fBtouch  *.c\fP
.B example% \fBmake\fP
.fi
.RE
.LP
.BR make (1)
would then see that all the
.B .c
files were more
recent than the corresponding
.B .o
files, and would start
the compilation from scratch.
.SH OPTIONS
.TP
.B \-c
Do not create
.I filename
if it does not exist.
.TP
.B \-f
Attempt to force the touch in spite of read and write permissions on
.IR filename .
.SH SYSTEM V OPTIONS
.LP
Options must be grouped to form the first argument.  The
.I date-time
argument takes the form:
.IP
.IR mmddhhmm [ yy ]
.LP
and updates the modification time to that specified, rather than the
current time.
The first
.I mm
is the month,
.B dd
is the day of the month,
.I hh
is the hour, and the second
.I mm
is the minute.  If
.I yy
is specified, it is the last two digits
of the year.  If omitted, the current year is assumed.
.TP
.B \-a
Update only the access time.
.TP
.B \-c
Do not create
.I filename
if it does not exist.
.TP
.B \-m
Update only the modification time.
.SH SEE ALSO
.BR make (1),
.BR utimes (2)
.SH BUGS
It is difficult to touch a file whose name
consists entirely of digits in
the System V
.BR touch ,
as it will interpret the first such non-flag
argument as a time.  You must
ensure that there is a character in the
name which is not a digit, by
specifying it as
.BI .\|/ name
rather than
.IR name .
e order that you
originally specified it.
.TP
.B \-help
Show help information preceding tool attributes.
.SH FILES
.PD 0
.TP 20
.B ~/.sunview
format./share/man/man1/tput.1v                                                                               755       0      12        13307  4424740735  10202                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tput.1v 1.15 89/03/26 SMI; from S5R3
.TH TPUT 1V "20 January 1988"
.SH NAME
tput \- initialize a terminal or query the terminfo database
.SH "SYNOPSIS"
.B /usr/5bin/tput
[
.BI \-T type
]
.I capability
[
.I parameter
\&.\|.\|. ]
.LP
.B /usr/5bin/tput
[
.BI \-T type
]
.BR init
.LP
.B /usr/5bin/tput
[
.BI \-T type
]
.BR longname
.LP
.B /usr/5bin/tput
[
.BI \-T type
]
.B reset
.SH AVAILABILITY
.LP
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH "DESCRIPTION"
.IX "tput command" "" "\fLtput\fR command"  
.LP
.B tput
uses the
.BR terminfo (5V)
database to make the values of
terminal-dependent capabilities and information available to
the shell, to initialize or reset the terminal,
or return the long name of the requested terminal type.
Normally, the terminal type is taken from the environment variable
.BR \s-1TERM\s0 ;
if the
.BI \-T type
option is specified, the terminal type is taken from that option.
.LP
.B tput
displays a string if the given
.I capability
is a string capability, or an integer if it is an integer
capability; it displays no output if the capability is
a boolean.
.LP
If
.I capability
is a boolean,
.B tput
returns true (0) if that capability is set, or false (1) otherwise.
If
.I capability
is a string,
.B tput
returns true (0)
if that capability is set, or false (1) otherwise.
If
.I capability
is an integer, a value of true (0) is returned
.I whether or not
the capability is set for the terminal.  To determine if an integer
capability is set, you must examine the standard output.
.LP
For a complete list of capabilities and the
.I capability
associated with each, see
.BR terminfo (5V).
.LP
If
.I capability
is a string capability that takes parameters, the
.I parameter
arguments
are instantiated into the string.
An all-numeric
.I parameter
argument is passed to the attribute as a number.
.SH OPTIONS
.TP
.BI \-T type
Indicate the
.I type
of terminal.
If this option is supplied, the environment variables
.SB LINES
and
.SB COLUMNS
are not used.
.TP
.B init
If the
.B terminfo
database is present and an entry for the user's terminal
exists, emit the terminal's initialization strings,
set up any delays specified, and turn the expansion of
.SM TAB
characters on or off, as specified by the terminal's entry in the
.B terminfo
database.  If the terminal has a
.SM TAB
character, and either has a capability for setting
.SM TAB
characters or initially has its
.SM TAB
characters set every 8
.SM SPACE
characters, expansion of
.SM TAB
characters is turned off, otherwise expansion of
.SM TAB
characters is turned on.
If expansion of
.SM TAB
characters is turned on, and the terminal has a capability for setting
.SM TAB
characters,
.SM TAB
stops are set to every eight
columns.
If an entry does not contain the information
needed for any of these actions,
that action is silently skipped.
.TP
.B reset
Emit the terminal's reset strings, and set up delays and
.SM TAB
characters as specified.
If the reset strings are not present,
but initialization strings are, the initialization
strings are used.
.TP
.B longname
If the
.B terminfo
database is present and an entry for the user's
terminal exists, emit the long name of the terminal.
The long name is the last name in the first line of
the terminal's description in the
.B terminfo
database.
.SH EXIT CODES
.TP
0
The boolean or string capability is set, or the capability is
an integer type and is present.
.TP
1
The
.I capability
is not set.
.TP
2
Usage error.
.TP
3
The terminal is of an unknown type, or the
.B terminfo
database is not present.
.TP
4
Unknown
.B terminfo
capability.
.TP
\-1
The integer capability is not defined for this terminal type.
.SH EXAMPLES
.TP 20 
.B tput init
Initialize the terminal according to the
type of terminal in the environmental variable
.BR \s-1TERM\s0 .
This command can be included in a
.B \&.profile
or
.B \&.login
file.
.TP
.B tput \-Tsun reset
Reset a Sun workstation console,
.BR shelltool (1)
window, or
.BR cmdtool (1)
window, overriding the type of terminal in the environmental variable
.BR \s-1TERM\s+1 .
.TP
.B tput cup 0 0
Send the sequence to move the cursor to row
.BR 0 ,
column
.B 0
(the upper left corner of the screen,
usually known as the \(lqhome\(rq cursor position).
.TP
.B tput clear
Echo the clear-screen sequence for the current terminal.
.TP
.B tput cols
Print the number of columns for the current terminal.
.TP
.B tput \-Tsun cols
Print the number of columns for the Sun workstation console or subwindow.
.TP
.B bold=`tput smso`
.TP
.B offbold=`tput rmso`
Set the shell variables
.BR bold ,
to begin stand-out mode sequence,
and
.BR offbold ,
to end standout mode sequence,
for the current terminal.
This might be followed by a prompt:
.RS
.IP
.ft B
echo "${bold}Please type in your name: ${offbold}\\c"
.ft R
.RE
.TP
.B tput hc
Set exit code to indicate if the current terminal is a hardcopy terminal.
.TP
.B tput cup 23 4
Send the sequence to move the cursor to row 23, column 4.
.TP
.B tput longname
Print the long name from the
.B terminfo
database for the type of terminal
specified in the environmental variable
.BR \s-1TERM\s0 .
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/?/\(**
compiled terminal description database
.TP
.B /usr/5include/curses.h
.BR curses (3X)
header file
.TP
.B /usr/5include/term.h
.BR terminfo (5V)
header file
.TP
.B /usr/share/lib/tabset/\(**
.SM TAB
settings for some terminals, in a format appropriate to be
output to the terminal (escape sequences that set margins and
.SM TAB
characters);
for more information, see the
.B Tabs and Initialization
section of
.BR terminfo (5V).
.TP
.B \&.login
.TP
.B \&.profile
.PD
.SH "SEE ALSO"
.BR cmdtool (1),
.BR shelltool (1),
.BR stty (1V),
.BR curses (3X),
.BR terminfo (5V)
eviated
.BR et .
If the 
.B et
capability is present,
.B etimeout
is initially set to the value of that capability; otherwise,
.B etimeout
is set to 10 seconds.
.TP
.B exceptions
(str) The set of characters which should not be discarded
due to the beautification switch; abbreviated
.BR ex .
If the
.B ex
capabili./share/man/man1/tr.1v                                                                                 755       0      12         6117  4424740735   7614                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tr.1v 1.13 89/03/26 SMI; from 4.3 BSD and S5R2 6.2 9/2/83
.TH TR 1V  "9 September 1987"
.SH NAME
tr \- translate characters
.SH SYNOPSIS
.B tr
.RB [ " \-cds " ]
[
.I string1
[
.I string2
] ]
.IX  "tr command"  ""  "\fLtr\fP \(em translate characters"
.IX  "translate characters"  ""  "translate characters \(em \fLtr\fP"
.IX  "character translation"  ""  "character translation \(em \fLtr\fP"
.IX  "text processing utilities"  tr  ""  "\fLtr\fP \(em translate characters"
.SH DESCRIPTION
.IX "System V commands" "\fLtr\fR"
.B tr
copies the standard input to the standard output with substitution or
deletion of selected characters.  The arguments
.I string1
and
.I string2
are considered sets of
characters.
Any input character found in
.I string1
is mapped into the character in the corresponding position within
.IR string2 .
When
.I string2
is short, it is padded to the length of
.I string1
by duplicating its last character.
.LP
In either string the notation:
.RS
.IB a \- b
.RE
.LP
denotes a range of characters from
.I a
to
.I b
in increasing
.SM ASCII
order.
The character
.BR \e\| ,
followed by 1, 2 or 3 octal digits stands for the character whose
.SM ASCII
code is given by those digits.
As with the shell, the escape character
.BR \e\| ,
followed by any other character, escapes any special meaning for that
character.
.SH SYSTEM V DESCRIPTION
When
.I string2
is short, characters in
.I string1
with no corresponding character in
.I string2
are not translated.
.LP
In either string the following abbreviation conventions
introduce ranges of characters or repeated characters into
the strings.  Note: in the System V version, square brackets are
required to specify a range.
.TP 8
.BI [ a \- z ]
Stands for the string of characters whose
.SM ASCII
codes run
from character
.I a
to character
.IR z ,
inclusive.
.TP
.BI [ a \(** n ]
Stands for
.I n
repetitions of
.IR a .
If the first digit of
.I n
is
.BR 0 ,
.I n
is considered octal; otherwise,
.I n
is taken to be decimal.
A zero or missing
.I n
is taken to be huge;
this facility is useful for padding
.IR string2 .
.SH OPTIONS
Any combination of the options
.BR \-c ,
.BR \-d ,
or
.B \-s
may be used:
.TP
.B \-c
Complement the set of characters
in
.I string1
with respect to the universe of characters whose
.SM ASCII
codes are 01
through 0377 octal;
.TP
.B \-d
Delete all input characters
in
.IR string1 .
.TP
.B \-s
Squeeze all strings of repeated output characters that are in
.I string2
to single characters.
.SH EXAMPLE
.LP
The following example creates a list of all the words in
.I filename1
one per line in
.IR filename2 ,
where a word is taken to be a maximal string of alphabetics.
The second string is quoted to protect
.RB ` \|\e\| '
from the shell.
012 is the
.SM ASCII
code for
.SM NEWLINE\s0.
.IP
.BI "tr \-cs A\-Za\-z \'\e012\' <\|" filename1 >\| filename2
.LP
In the System V version, this would be specified as:
.IP
.BI "tr \-cs \'[A\-Z][a\-z]\' \'[\e012\(**]\' <\|" filename1 >\| filename2
.SH "SEE ALSO"
.BR ed (1),
.BR expand (1),
.BR ascii (7)
.SH BUGS
.LP
Will not handle
.SM ASCII NUL
in
.I string1
or
.I string2.
.B tr
always deletes
.SM NUL
from input.
 September 1987"
.SH NAME
tr \- translate characters
.SH SYNOPSIS
.B tr
.RB [ " \-cds " ]
[
.I string1
[
.I string2
] ]
.IX  "tr command"  ""  "\fLtr\fP \(em translate characters"
.IX  "translate characters"  ""  "translate characters \(em \fLtr\fP"
.IX  "character translation"  ""  "character translation \(em \fLtr\fP"
.IX  "text processing utilities"  tr  ""  "\fLtr\fP \(em translate characters"
.SH DESCRIPTION
.IX "System V co./share/man/man1/trace.1                                                                               755       0      12         5174  4424740735  10101                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)trace.1 1.8 89/03/26 SMI;
.TH TRACE 1 "9 September 1987"
.SH NAME
trace \- trace system calls and signals
.SH SYNOPSIS
.B trace
[
.B \-ct
] [
.B \-o
.I filename
]
.I \ command
.LP
.B trace
[
.B \-ct
] [
.B \-o
.I filename
]
.B \-p
.I pid
.SH DESCRIPTION
.IX "trace command" "" "\fLtrace\fR command"  
.LP
.B trace
intercepts the system calls and signals of a process.
The name of the system call, its arguments and result
are listed on the standard output or on the file given
as an argument to the
.B \-o
option.
The
.B \-c
option can be used to get a quick summary of system call
and signal counts instead of having a full trace.
.LP
Given a
.I command
it runs the command tracing all system calls until
.BR exit (2).
.LP
Given a process
.SM ID
using the
.B \-p
option, it ``attaches'' itself to the process and begins tracing.
The trace may be terminated
at any time by a keyboard interrupt signal (\c
.SM CTRL\s0-C).
.B trace
will respond by detaching itself from the traced process
leaving it to continue running.
.LP
Each line in the trace contains the system call name, followed
by its arguments in parentheses and its result.
Error returns (result = \-1) have the error name and error message
appended.
Signals are printed as a signal name followed by the signal number.
The
.B \-t
option prefixes each line of the trace with the time of day.
Arguments are printed according to their type.
Structure pointers are always printed as hex addresses.
Character pointers are dereferenced and printed as a
quoted string.
Non-printing characters in strings are represented by escape codes.
Only the first 32 bytes of strings are printed;
longer strings have two dots appended following the closing quote.
.IP
.B "The quick brown fox jumps over t" \|.\|.
.LP
Strings with more than 50% non-printing characters are assumed
to contain binary data and are represented by a
.SM NULL
string followed by two dots.
.IP
.B ""..
.SH EXAMPLE
.nf
.B "example% trace date"
.ft B
gettimeofday (0x21474, 0x2147c) = 0
gettimeofday (0x21474, 0) = 0
gettimeofday (0xefffc78, 0x214ac) = 0
ioctl (1, 0x40067408, 0xefffa10) = -1 \s-1ENOTTY\s0 (Inappropriate ioctl for device)
fstat (1, 0xefffa30) = 0
getpagesize () = 8192
brk (0x27640) = 0
close (0) = 0
Thu Dec  4 14:16:36 PST 1986
write (1, "Thu Dec  4 14:16:36 PST 1986\en", 29) = 29
close (1) = 0
close (2) = 0
exit (0) = ?
example%
.ft R
.fi
.SH "SEE ALSO"
.BR exit (2),
.BR ptrace (2)
.br
.ne 8
.SH BUGS
Programs that use the
.I setuid
bit do not have
effective user
.SM ID
privileges while being traced.
.LP
Child processes of a traced process are not traced.
.LP
A traced process ignores
.SM SIGSTOP\s0.
.LP
A traced process runs slowly.
 quoted to protect
.RB ` \|\e\| '
from the shell.
012 is the
.SM ASCII
code for
.SM NEWLINE\s0.
.IP
.BI "tr \-cs A\-Za\-z \'\e012\' <\|" filename1 >\| filename2
.LP
In the System V version, this would be specified as:
.IP
.BI "tr \-cs \'[A\-Z][a\-z]\' \'[\e012\(**]\' <\|" filename1 >\| filename2
.SH "SEE ALSO"
.BR ed (1),
.BR expand (1),
.BR ascii (7)
.SH BUGS
.LP
Will not handle
.SM A./share/man/man1/traffic.1c                                                                            755       0      12         7214  4424740736  10562                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)traffic.1c 1.14 89/03/26 SMI;
.TH TRAFFIC 1C "22 March 1989"
.SH NAME
traffic \- SunView program to display Ethernet traffic
.SH SYNOPSIS
.B traffic
[
.B \-h
.I host
] [
.B \-s
.I subwindows
]
.SH AVAILABILITY
This command is available when both the
.I Networking Tools and Programs
and the
.I SunView 1 User's
software options are installed.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX traffic "" "\fLtraffic\fR \(em show Ethernet traffic"
.B traffic
graphically displays ethernet traffic.  It gets statistics from
.BR etherd (8C),
running on machine
.IR host .
The tool is divided into subwindows,
each giving a different view of network traffic.
.SH OPTIONS
.TP 15
.BI \-h " host"
Specify a host from which to get statistics.
The default value of
.I host
is the machine that
.BR traffic
is running on.
.TP
.BI \-s \ subwindows
Specify the number of subwindows to display initially.
The default value of
.I subwindows
is 1.
.SH SUBWINDOWS
.LP
To the right of each subwindow is a panel that selects what
the subwindow is viewing.  When
.I Size
is checked,
than the size distribution of packets is displayed.
.I Proto
is for protocol,
\fISrc\fP is for source of packet, and
.I Dst
is for destination of packet.  Since it is not possible to
show all possible sources, when
.I Src
is selected, only the
8 highest sources are displayed (and similarly for
.I Dst
).
.LP
For each of these choices, the distribution is displayed by
a histogram.  The panel above each subwindow controls characteristics
of the histograms.  At the left of the panel is a shaded square,
corresponding to one of the two shades of bars in the histogram.
You can switch the shade by either clicking on the square with the
left button, or bringing up a menu over the square with the right mouse
button.
When the light colored square is visible, then
the slider in the center of the panel controls how often the
light colored bars are updated.  When the dark square is visible,
then the slider refers to the dark bars of the histogram.  To the
right of the slider is a choice of
.I Abs
versus
.IR Rel .
This selects whether the height of the histogram is
.I Absolute
in packets per second, or
.I Relative
in percent of total packets
on the ethernet.  Next in the panel are three small horizontal bars.
When selected (that is, when a check mark appears to the left of
the three bars),
a horizontal grid appears on the histogram.
Finally the button marked
.I Delete Me
will delete the subwindow.
.LP
The right hand panel also has a choice for
.I Load
Load is
represented as a strip chart, rather than a histogram.
The maximum value of the
graph represents a load of 100%, that is 10 megabits per second
on the ethernet.  When
.I Load
is selected, there is only one
slider, and no
.I Rel
versus
.I Abs
choice.
.LP
At the very top of the tool is a panel that contains filters, as
well as a
.I Split
button that splits the tool and creates
a new subwindow, and a
.I Quit
button that exits the tool.
The filters apply to all the subwindows.  When a filter is selected,
a check mark appears to the left of the word
.IR Filter .
There can be
more than one filter active at the same time.
The meaning of each filter is as follows.
.I Src
is
a host or net, which can be specified either by name or address
(similarly for
\fIDst\fP).
.I Proto
is an ip protocol, and
can either be a name (such as
.IR udp ,
.IR icmp )
or a number.
.I Lnth
is either a packet length, or a range of
lengths
separated by a dash.
.SH "SEE ALSO"
.BR etherd (8C)
.SH BUGS
If multiple copies of
.B traffic
are using the same copy of
.BR etherd ,
and one of them invokes a filter,
then all the copies of
.B traffic
will be filtered.
ot defined for this terminal type.
.SH EXAMPLES
.TP 20 
.B tput init
Initialize the terminal according to the
type of terminal in the environmental variable
.BR \s-1TERM\s0 .
This command can be included in a
.B \&.profile
or
.B \&.login
file.
.TP
.B tput \-Tsun reset
Reset a Sun workstation console,
.BR shelltool (1)
window, or
.BR cmdtool (1)
window, overriding the ty./share/man/man1/troff.1                                                                               755       0      12        11450  4424740736  10136                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)troff.1 1.29 89/03/26 SMI;
.TH TROFF 1 "21 December 1987"
.SH NAME
troff \- typeset or format documents
.SH SYNOPSIS
.B troff
[
.B \-abfiqtwz
] [
.BI \-m package
] [
.BI \-n N
] [
.BI \-o pagelist
]
.if n .ti +0.5i
[
.BI \-p N
] [
.BI \-r aN
]
.if t .ti +0.5i 
[
.BI \-s N
] [
.I filenames
] .\|.\|.
.IX  "troff command"  ""  "\fLtroff\fP \(em typeset documents"
.IX  "typeset documents"  ""  "typeset documents \(em \fLtroff\fP"
.IX  "document production"  troff  ""  "\fLtroff\fP \(em typeset documents"
.SH AVAILABILITY
This command is available with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B troff
formats text in the 
.IR filename s.
For historical reasons, output goes to a CAT/4 phototypesetter attached to
.BR /dev/cat ,
but nobody uses a CAT/4 anymore.
Ordinarily, postprocessing software converts output to a form
that can be printed on newer typesetters or laser printers.
Default font width tables correspond to Times Roman on PostScript\(tm printers.
See also the
.BR nroff (1)
manual page, which describes a formatter for typewriter-like devices.
.LP
Input to 
.B troff
is expected to consist of text interspersed with formatting
requests and macros.  If no
.I filename
argument is present,
.B troff
reads standard input.  A
.RB ` \- '
as a
.IR filename
argument indicates that standard input is to be read at that point in
the list of input files;
.B troff
reads the files named ahead of the
.RB ` \- '
in the arguments list, then text from the standard input, and then text
from the files named after the
.RB ` \- '.
.LP
If the file
.B /etc/adm/tracct
is writable,
.B troff
keeps printer accounting records there.
The integrity of that file may be secured by making
.B troff
a \(lqset-user-ID\(rq program (see 
.BR chmod (1V)
for details on the
.B setuid
permission bit.)
.SH OPTIONS
.LP
Options may appear in any order, but they all must appear before the
first
.IR filename .
.RS
.TP
.B \-a
Send a printable
.SM ASCII
approximation of the results to the standard output.
.TP
.B \-i
Read the standard input after the input files are exhausted.
.TP
.B \-q
Disable echoing during a
.B .rd
request.
.TP
.B \-t
Direct output to the standard output instead of the printer.
Since this output is non-\c
.SM ASCII
it is generally redirected to
.BR "lpr \-t" .
.TP
.BI \-m package
Prepend the macro file
.BI /usr/lib/tmac/tmac. package
to the input
.IR filename s.
(Note that most references to macro packages include 
the leading \(lq\fBm\fP\(rq as part of the name; the
.BR man (7)
macro package resides in
.BR /usr/lib/tmac/tmac.an ).
.TP
.BI \-n N
Number first generated page
.IR N .
.TP
.BI \-o list
Print only pages whose page numbers appear in the comma-separated
.I list
of numbers and ranges.  A range
.IB N \- M
means pages
.I N
through
.IR M ;
an initial
.BI \- N
means from the beginning to page
.IR N ;
and a final
.IB N \-
means from
.I N
to the end.
.TP
.BI \-r aN
Set register
.I a
(one-character) to
.IR N .
.RE
.LP
Some options of
.B troff
only apply if you have a CAT/4 typesetter attached to your system.
These options remain present for backward compatibility.
However, this version of
.B troff
does not support this typesetter by default.
.RS
.TP
.B \-b
Report whether the typesetter is busy or available.
No text processing is done.
.TP
.B \-f
Refrain from feeding paper out and stopping
at the end of the print job on the typesetter.
.TP
.B \-w
Wait until typesetter is available, if currently busy.
.TP
.B \-z
Suppress all formatted output.  Display only terminal messages
produced by
.B .tm
requests and diagnostics.
.br
.ne 7
.TP
.BR \-p N
Print all characters in point size
.I  N
while retaining all prescribed spacings and motions,
to reduce elasped time on the typesetter.
.TP
.BI \-s N
Stop the phototypesetter every
.I N
pages.
.B troff
produces a trailer so you can change cassettes; resume by
pressing the typesetter's start button.
.RE
.SH FILES
.PD 0
.TP 20
.B /tmp/ta*
temporary file
.TP
.B /usr/lib/tmac/tmac.*
standard macro files
.TP
.B /usr/lib/term/*
terminal driving tables for
.B nroff
.TP
.B /usr/lib/font/*
font width tables for alternate mounted
.B troff
fonts
.TP
.B /dev/cat
phototypesetter
.TP
.B /etc/adm/tracct
accounting statistics for
.B /dev/cat
.PD
.SH "SEE ALSO"
.LP
.BR checknr (1), 
.BR chmod (1V),
.BR eqn (1),
.BR lpr (1),
.BR nroff (1),
.BR tbl (1),
.BR col (1V),
.BR printcap (5),
.BR man (7),
.BR me (7),
.BR ms (7),
.BR lpd (8)
.LP
.TX DOCS
.LP
.TX TROFF
.SH DIAGNOSTICS
.TP
.B "No /dev/cat: try \-t or \-a"
The CAT/4 typesetter is not accessible from your machine.
Combine the
.B \-t
option of
.B troff
with the
.B \-t
option of
.BR lpr (1)
to get output on a laser printer or typesetter.
For information on how to inform
.BR lpd (8)
of a PostScript printer attached to a remote host, see
.BR printcap (5).

.BR \s-1TERM\s0 .
This command can be included in a
.B \&.profile
or
.B \&.login
file.
.TP
.B tput \-Tsun reset
Reset a Sun workstation console,
.BR shelltool (1)
window, or
.BR cmdtool (1)
window, overriding the ty./share/man/man1/true.1                                                                                755       0      12         1365  4424740736   7761                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)true.1 1.11 89/03/26 SMI; from UCB 4.2
.TH TRUE 1 "9 September 1987"
.SH NAME
true, false \- provide truth values
.SH SYNOPSIS
.B true
.LP
.B false
.IX  "true command"  ""  "\fLtrue\fP \(em provide truth values"
.IX  "provide truth values"  ""  "provide truth values \(em \fLtrue\fP"
.SH DESCRIPTION
.B true
and
.B false
are usually used in a Bourne shell script.
They test for the appropriate status \(lqtrue\(rq
or \(lqfalse\(rq before running
(or failing to run) a list of commands.
.SH EXAMPLE
.LP
The following Bourne shell script will
be executed while the case status is \(lqtrue\(rq.
.RS
.nf
.B while true
.B do
.RS
.B command list
.RE
.B done
.fi
.RE
.SH "SEE ALSO"
.BR csh (1),
.BR sh (1)
.SH DIAGNOSTICS
.LP
.B true
has exit status zero.
   	uusend.1c X  l    	uustat.1c l  |    uux.1c X      
vacation.1       val.1  l      vax.1 on      vfontinfo.1       vgrind.1        vi.1 .1         view.1 1first
.IR filename .
.RS
.TP
.B \-a
Send a printable./share/man/man1/tset.1                                                                                755       0      12        37223  4424740736  10003                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tset.1 1.37 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"-m in options
.TH TSET 1 "22 March 1989"
.SH NAME
tset, reset  \- establish or restore terminal characteristics
.SH SYNOPSIS
.B tset
[
.B \-InQrsS
] [
.BI \-e c
] [
.BI \-k c
] [
.B \-m
.RI [ port "\-ID" 
.if n .ti +0.5i 
[
.IR baudrate "] : " type
.RI "] .\|.\|. ] [" type ]
.LP
.B reset
[
.B \-
] [
.BI \-e c
] [
.B \-I
] [
.BI \-k c
]
[
.B \-n
] 
.if n .ti +0.5i
[
.B \-Q
] [
.B \-r
] [
.B \-s
] [
.B \-S
]
.if t .ti +0.5i
.B \-m
[
.I indent
]
.if n .ti +0.5i
[
.I test
.I baudrate
]:
.I type
] .\|.\|. [
.I type
]
.SH DESCRIPTION
.IX  "reset command"  ""  "\fLreset\fP \(em reset terminal bits"
.IX  "reset terminal bits"  ""  "reset terminal bits \(em \fLreset\fP"
.IX  terminal  "reset bits"  ""  "reset bits \(em \fLreset\fP"
.IX  "tset command"  ""  "\fLtset\fP \(em set terminal characteristics"
.IX  set "terminal characteristics \(em \fLtset\fP"
.IX  terminal  "set characteristics"  ""  "set characteristics \(em \fLtset\fP"
.IX  "login environment"  tset  ""  "\fLtset\fP \(em set terminal characteristics"
.IX  environment  tset  ""  "\fLtset\fP \(em set terminal characteristics for"
.IX  "tty, set characteristics \(em \fLtset\fP"
.LP
.B tset
sets up your terminal, typically  when you first log in.
It does terminal dependent processing such as setting
erase and kill characters, setting or resetting delays,
sending any sequences needed to properly initialized the terminal,
and the like.
.B tset
first determines the
.I type
of terminal involved,
and then does necessary initializations and mode settings.
The type of terminal attached to each
port is specified in the
.B /etc/ttytab
database.  Type names for terminals may be found in
the
.BR termcap (5)
database.
If a port is not wired permanently to a
specific terminal (not hardwired)
it is given an appropriate generic identifier such as
.BR dialup .
.LP
.B reset
clears the terminal settings by turning off 
.SM CBREAK
and 
.SM RAW
modes, output delays and parity checking, turns on
.SM NEWLINE
translation, echo and
.SM TAB
expansion, and restores undefined special characters
to their default state.   It then sets the modes as usual, based on
the terminal type (which will probably override some of the above).
(See
.BR stty (1V)
for more information.) All arguments to
.B tset
may be used with
.BR reset .
.B reset
also uses the
.B rs=
and
.B rf=
(reset string and file)
instead of the initialization string and file from
.BR /etc/termcap .
This is useful after a program dies and leaves the terminal in a funny
state.  Often in this situation,
characters will not echo as you type them.
You may have to type
.RB ` \s-1LINEFEED\s0\|reset\|\s-1LINEFEED\s0 '
since
.RB ` \s-1RETURN\s0 '
may not work.
.LP
When no arguments are specified,
.B tset
reads the terminal type from the
.B
.SM TERM
environment variable
and re-initializes the terminal, and
performs initialization of mode, environment and other options at login
time to determine the terminal type and set up terminal modes.
.LP
When used in a startup script
.RB ( \&.profile
for
.BR sh (1)
users or
.B \&.login
for
.BR csh (1)
users) it is desirable to give information about the type of terminal
you will usually use on ports that are not hardwired.
These ports are identified in
.B /etc/ttyab
as
.B dialup
or
.BR plugboard ,
etc.
.\".BR arpanet ,
.\"etc.
.\"To specify what terminal type you usually use on these ports, the
.\".B \-m
.\" (map) option flag is followed by the appropriate port type identifier,
.\"an optional baud rate specification, and the terminal type.
.\"(The effect is to \(lqmap\(rq from some conditions to a terminal type,
.\"that is, to tell
.\".I tset
.\"\(lqIf I'm on this kind of port, guess that I'm on that kind of terminal\(rq.)
.\"If more than one mapping is specified, the first applicable mapping prevails.
.\"A missing port type identifier matches all identifiers.
.\" from comments by Bill Joy
Any of the alternate generic names given in
.B /etc/termcap
may be used for the identifier.
Refer to the
.B \-m
option under
\s-1OPTIONS\s0
for more information.
.\".LP
.\"A 
.\".I baudrate
.\"is specified as with
.\".IR stty ,
.\"and is compared with the
.\"speed of the diagnostic output (which should be the control terminal).
.\"The 
.\".I test
.\"portion of the optional
.\".I baudrate
.\"specifier may be any
.\"combination of:
.\".BR > ,
.\".BR @ ,
.\".BR < ,
.\"and
.\".BR ! ;
.\".B @
.\"means \(lqat\(rq and
.\".B !
.\"inverts the sense of the test.  To avoid problems with metacharacters, it
.\"is best to place the entire argument to
.\".B \-m
.\"within single-quote (') characters; users of
.\".I csh
.\"must also put a \(lq\e\(rq before any \(lq!\(rq used here.
.\".LP
.\".KS
.\"Thus, the command
.\".IP
.\".B
.\"tset \-m \'dialup>300:adm3a\' -m dialup:dw2 -m \'plugboard:?adm3a\'
.\".KE
.\".LP
.\"sets the terminal type to
.\".B adm3a
.\"if the port in use is a dialup at a speed greater than 300 baud; to a
.\".B dw2
.\"if the port is (otherwise) a dialup (that is, at 300 baud or less).
.\"(NOTE: some of the examples given here appear to take up more than
.\"one line, for text processing reasons.  When you type in real
.\".I tset
.\".\"commands, you must enter them entirely on one line.)
.\".LP
.\"If the
.\".I type
.\"finally determined by
.\".I tset
.\"begins with a question mark,
.\"the user is asked if he really wants that type.
.\"A null response means to use that type;
.\"otherwise, another type can be entered which will be used instead.
.\"Thus, in the above case, the user is queried on a plugboard port
.\"as to whether she is actually using an
.\".BR adm3a .
.\".LP
If no mapping applies and a final
.I type
option, not preceded by a
.BR \-m ,
is given on the command line then that type is used;
otherwise the type found in the
.B /etc/ttytab
database is used as the terminal type.
This should always be the case for hardwired ports.
.LP
It is usually desirable to return the
terminal type, as finally determined by
.BR tset ,
and information about the terminal's capabilities,
to a shell's environment.  This can be done using the
.BR \- ,
.BR \-s ,
or
.B \-S
options.  (Refer to
\s-1OPTIONS\s0
for more information.)
.LP
For the Bourne shell, put this command in your
.B .profile
file:
.IP
.B eval \`tset \-s
.IB options... \`
.LP
or using the C shell, put this command in your
.B .login
file:
.IP
.B eval \`tset \-s
.IB options... \`
.LP
With the C shell, it is also convenient to make an alias in your
.B .cshrc
file:
.IP
.B alias tset \'eval \`tset \-s \e!*\`\'
.LP
This also allows the command:
.IP
.B tset 2621
.LP
to be invoked at any time to set the terminal and environment.
.I Note to Bourne Shell users:
It is
.I not
possible to get this aliasing effect with a shell script,
because shell scripts cannot set the environment of their parent.
If a process could set its parent's environment,
none of this nonsense would be necessary in the first place.
.LP
Once the terminal type is known,
.B tset
sets the terminal driver mode.
This normally involves sending an initialization sequence to the
terminal, setting the single character erase (and optionally
the line-kill (full line erase)) characters,
and setting special character delays.
.SM TAB
and
.SM NEWLINE
expansion are turned off during transmission of
the terminal initialization sequence.
.LP
On terminals that can backspace but not overstrike (such as a
\s-1CRT\s0),
and when the erase character is
.RB ` # ',
the erase character is changed as if
.B -e
had been used.
.SH OPTIONS
.TP
.B \-
The name of the terminal finally decided
upon is output on the standard output.
This is intended to be captured by the shell and placed in the
.B
.SM TERM
environment variable.
.TP
.BI \-e c
Set the erase character to be the named character
.I c
on all terminals.
Default is the backspace key on the keyboard, usually
.BR ^H " (\s-1CTRL\s0-H)."
The character
.I c
can either be typed directly, or entered using
the circumflex-character notation used here.
.TP
.BI \-i c
Set the interrupt character to be the named character
.I c
on all terminals.
Default is
.BR ^C " (\s-1CTRL\s0-C)."
The character
.I c
can either be typed directly, or entered using
the circumflex-character notation used here.
.TP
.B \-I
Suppress transmitting terminal-initialization strings.
.TP
.BI \-k c
Set the line kill character to be the named character
.I c
on all terminals.
Default is
.BR ^U " (\s-1CTRL\s0-U)."
The kill character is left alone if
.B \-k
is not specified.
Control characters can be specified by prefixing the alphabetical
character with a circumflex (as in \s-1CTRL\s0-U)
instead of entering the
actual control key itself.  This allows you to specify control keys
that are currently assigned.
.TP
.B \-n
.\"On systems with the Berkeley 4BSD tty driver,
Specify that the new tty driver modes should be initialized for this
terminal.  Probably useless since
.B stty new
is the default.
.\"For a \s-2CRT\s0,
.\"the CRTERASE and CRTKILL modes are set only if the baud rate is 1200 or greater.
.TP
.B \-Q
Suppress printing the
.RB ` "Erase set to" '
and
.RB ` "Kill set to" '
messages.
.TP
.B \-r
In addition to other actions, reports the terminal type.
.TP
.B \-s
Output commands to set and export
.B
.SM TERM
and
.B
.SM TERMCAP\s0\fR.
This can be used with
.RS 
.RS
.nf
.ft B
set noglob
eval \`tset \-s .\|.\|.\`
unset noglob
.ft R
.fi
.RE
.RE
.IP
to bring the terminal information into the environment.
Doing so makes programs such as
.BR vi (1)
start up faster.
If the
.B
.SM SHELL
environment variable ends with
.BR csh ,
C shell commands are output, otherwise Bourne
shell commands are output.
.TP
.B \-S
.ne 7
Similar to the
.B \-s
option, but produces two strings containing
suitable values for the (environment) variables
.B
.SM TERM
and
.B
.SM TERMCAP\s0\fR,
respectively, and can be used as follows:
.RS 
.RS
.nf
.ft B
set noglob
set t=(\`tset \-S .\|.\|.\`)
setenv \s-1TERM\s0 $t[1]
setenv \s-1TERMCAP\s0 "$t[2]"
unset t
unset noglob
.ft R
.RE
.RE
.fi
.IP
Since
.B \-s
loads these values, its use is preferred.  If the
.B
.SM SHELL
environment variable does not end with
.BR csh ,
.B \-S
produces the same Bourne shell commands that
.B \-s
does.
.br
.ne 11
.TP
\fB\-m\fR [\fIport\fR-ID[\fIbaudrate\fR]\fB:\fItype\fR] .\|.\|.
Specify (map) a terminal type when connected to a generic port
(such as
.I dialup
or
.IR plugboard )
identified by
.IR port-ID.
The
.I baudrate
argument can be used to
check the baudrate of the port and set the terminal type
accordingly.  The target rate is prefixed
by any combination of the following operators
to specify the conditions under which the mapping is made:
.RS
.RS
.TP
.B >
Greater than
.TP
.B @
Equals or ``at''
.TP
.B <
Less than
.TP
.B !
It is not the case that (negates the above operators)
.TP
.B ?
Prompt for the terminal type.  If no response is given, then
.I type
is selected by
default.
.RE
.RE
.IP
In the following example, the terminal type is set to
.B adm3a
if the port
is a dialup with a speed of greater than 300 or to
.I dw2
if the port is
a dialup at 300 baud or less.
In the third case, the question mark preceding
the terminal type indicates that the user is to verify the
type desired.  A
.SM NULL
response indicates that the
named type is correct.
Otherwise, the user's response is taken to be the type desired.
.RS
.IP
.na
.ft B
tset \-m 'dialup>300:adm3a' \-m 'dialup:dw2' \-m 'plugboard:?adm3a'
.ft R
.LP
To prevent interpretation as metacharacters, the entire argument to
.B \-m
should be enclosed in single quotes.   When using the
C shell,
exclamation points should be preceded by a backslash (\e).
.RE
.SH EXAMPLES
.LP
These examples all use the 
.RB ` \- '
option.  A typical use of
.B tset
in a
.B .profile
or
.B .login
will also use the
.B \-e
and
.B \-k
options, and often the
.B \-n
or
.B \-Q
options as well.
These options have been omitted here to keep the examples short.
.LP
To select a 2621, you might put the following sequence of commands in
your
.B .login
file (or
.B .profile
for Bourne shell users).
.RS 10
.nf
.ft B
set noglob
eval \`tset \-s 2621\`
unset noglob
.ft R
.fi
.RE
.LP
If you have an h19 at home which you dial up on, but your office
terminal is hardwired and known in
.BR /etc/ttytab ,
you might use:
.RS 10
.nf
.ft B
set noglob
eval \`tset \-s \-m dialup:h19\`
unset noglob
.ft R
.fi
.RE
.LP
If you have a switch which connects to various ports (making
it impractical to identify which port you may be connected to),
and use various terminals from time to time, you can select from
among those terminals according to the
.I speed
or baud rate.
In the example below,
.B tset
will prompt you for a terminal type if the baud rate
is greater than 1200 (say, 9600 for a terminal connected by an
RS-232 line), and use a Wyse 50 by default.  If the baud rate is
less than or equal to 1200, it will select a 2621.
Note the placement of the question mark, and the quotes
to protect the
.B >
and
.B ?
from interpretation by the shell.
.RS 10
.nf
.ft B
set noglob
eval \`tset \-s \-m 'switch>1200:?wy' \-m 'switch<=1200:2621'\`
unset noglob
.ft R
.fi
.RE
.LP
All of the above entries will fall back on the terminal type
specified in
.B /etc/ttytab
if none of the conditions hold.
The following entry is appropriate if
you always dial up, always at the same baud rate,
on many different kinds of terminals, and the terminal you use
most often is an adm3a.
.RS 10
.nf
.ft B
set noglob
eval \`tset \-s \?adm3a\`
unset noglob
.ft R
.fi
.RE
.LP
If the file
.B /etc/ttytab
is not properly set up and you want
to make the selection based only on the baud rate, you might use
the following:
.RS 10
.nf
.ft B
set noglob
eval \`tset \-s \-m '>1200:wy' 2621\`
unset noglob
.ft R
.fi
.RE
.LP
The following example quietly sets the erase character to
.SM BACKSPACE,
and kill to
.SM CTRL-U.
If the port is switched, it selects a Concept 100 for speeds less than
or equal to 1200, and asks for the terminal type otherwise
(the default in this case is a Wyse 50).  If the port is a
direct dialup, it selects Concept 100 as the terminal type.  If
logging in over the
.SM ARPANET\s0,
the terminal type selected is a
Datamedia 2500 terminal or emulator.  (Note the backslash
escaping the
.SM NEWLINE
at the end of the first line in the example.)
.IP
.ft B
set noglob
.br
eval \`tset \-e \-k^U \-Q \-s \-m 'switch<=1200:concept100' \-m \e
	'switch:?wy' \-m dialup:concept100 \-m arpanet:dm2500\`
.br
unset noglob
.ft R
.SH FILES
.PD 0
.TP 20
.B /etc/ttytab
port name to terminal type mapping database
.TP
.B /etc/termcap
terminal capability database
.TP
.B /usr/share/lib/tabset/*
.SM TAB
setting sequences for various terminals.  Pointed to by
.B termcap
entries.
.TP
.B \&.login
.TP
.B \&.profile
.PD
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR vi (1),
.BR stty (1V),
.BR ttytab (5),
.BR termcap (5),
.BR environ (5V)
.SH NOTES
Once the terminal's size has been initialized,
further invocations of
.B tset
will not affect it.
To correct this, do the following:
.IP
.B example% stty rows 0 colums 0
.LP
and then run
.B tset
normally.
.SH BUGS
.LP
The
.B tset
command is one of the first commands a user must master
when getting started on a
.SM UNIX
system.
Unfortunately, it is one of the most complex,
largely because of the extra effort the user must go through
to get the environment of the login shell set.
Something needs to be done to make all this simpler, either the
.B login
program should do this stuff, or a default shell alias should be made,
or a way to set the environment of the parent should exist.
.LP
This program cannot intuit personal choices for erase, interrupt
and line kill characters, so it leaves these set to the local system
standards.
.LP
It could well be argued that the shell should
be responsible for ensuring that
the terminal remains in a sane state;
this would eliminate the need for the
.B reset
program.
y using an
.\".BR adm3a .
.\".LP
If no mapping applies and a final
.I type
option, not preceded by a
.BR \-m ,
is given on the command line then that type is used;
otherwise the type found in the
.B /etc/ttytab
database is used as the terminal type.
This should always be the case for hardwired ports.
.LP
It is usually desirable to return the
terminal type, as fin./share/man/man1/tsort.1                                                                               755       0      12         1760  4424740736  10154                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tsort.1 1.10 89/03/26 SMI; from UCB 4.2
.TH TSORT 1  "9 September 1987"
.SH NAME
tsort \- topological sort
.SH SYNOPSIS
.B tsort
[
.I filename
]
.IX  "tsort command"  ""  "\fLtsort\fP \(em topological sort"
.IX  "topological sort"  ""  "topological sort \(em \fLtsort\fP"
.IX  "sort topologically"  ""  "sort topologically \(em \fLtsort\fP"
.IX  "text processing utilities"  tsort  ""  "\fLtsort\fP \(em topological sort"
.SH DESCRIPTION
.B tsort
produces on the standard output a totally ordered list of items
consistent with a partial ordering of items
mentioned in the input
.IR filename .
If no
.I filename
is specified, the standard input is understood.
.LP
The input consists of pairs of items (nonempty strings)
separated by
.SM SPACE
characters.
Pairs of different items indicate ordering.
Pairs of identical items indicate presence, but not ordering.
.SH "SEE ALSO"
.BR lorder (1)
.SH BUGS
Uses a quadratic algorithm; not worth
fixing for the typical use of ordering
a library archive file.
tely, it is one ./share/man/man1/tty.1                                                                                 755       0      12         1246  4424740737   7621                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tty.1 1.10 89/03/26 SMI; from UCB 4.2
.TH TTY 1 "9 September 1987"
.SH NAME
tty \- display the name of the terminal
.SH SYNOPSIS
.B tty
[
.B \-s
]
.IX  "tty command"  ""  "\fLtty\fP \(em get terminal name"
.IX  get "terminal name \(em \fLtty\fP"
.IX  terminal  "get name of"  ""  "get name of \(em \fLtty\fP"
.IX  "login environment"  tty  ""  "\fLtty\fP \(em get terminal name"
.SH DESCRIPTION
.B tty
prints the pathname of the user's terminal unless the
.B \-s
(silent) option is given. In either case, the
exit value is zero if the
standard input is a terminal, and one if it is not.
.SH OPTIONS
.TP
.B \-s
Silent. Does not print the pathname of the user's terminal.
 	uuname.1c D  X    	uusend.1c X  l    	uustat.1c l  |    uux.1c l      
vacation.1       val.1        vax.1        vfontinfo.1       vgrind.1        vi.1          view.1 a quadratic algorithm; not worth
fixing for the typical use of ordering
a library archive file.
tely, it is one ./share/man/man1/u370.1                                                                                755       0      12           63  4424740737   7433                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)u370.1 1.4 89/03/26 SMI;
u3b15.1   \    u3b2.1    l    u3b5.1    |    ul.1 1        umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1 ./share/man/man1/u3b.1                                                                                 755       0      12           62  4424740737   7425                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)u3b.1 1.4 89/03/26 SMI;
 u3b2.1    l    u3b5.1    |    ul.1 1        umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1./share/man/man1/u3b15.1                                                                               755       0      12           64  4424740737   7575                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)u3b15.1 1.4 89/03/26 SMI;
u3b5.1    |    ul.1 1        umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        user./share/man/man1/u3b2.1                                                                                755       0      12           63  4424740737   7510                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)u3b2.1 1.4 89/03/26 SMI;
ul.1 1        umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        users.1       uucp./share/man/man1/u3b5.1                                                                                755       0      12           63  4424740740   7505                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)u3b5.1 1.4 89/03/26 SMI;
umask.1       	unalias.1       uname.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        users.1       uucp.1c       uude./share/man/man1/ul.1                                                                                  755       0      12         3202  4424740740   7405                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ul.1 1.11 89/03/26 SMI; from UCB 4.2
.TH UL 1 "9 September 1987"
.SH NAME
ul \- do underlining
.SH SYNOPSIS
.B ul
[
.B \-i
] [
.B \-t
.I terminal
] [
.IR filename .\|.\|.
]
.IX  "ul command"  ""  "\fLul\fP \(em underline text"
.IX  "underline text"  ""  "underline text \(em \fLul\fP"
.IX  "text processing utilities"  ul  ""  "\fLul\fP \(em underline text"
.SH DESCRIPTION
.LP
.B ul
reads the named
.IR filename s
(or the standard input if none are given)
and translates occurrences of underscores to the sequence
which indicates underlining for the terminal in use, as specified
by the environment variable
.B
.SM TERM\s0\fR.
.B ul
uses the
.B /etc/termcap
file to determine the appropriate
sequences for underlining.
If the terminal is incapable of underlining,
but is capable of a standout mode then that is used instead.
If the terminal can overstrike, or handles underlining automatically,
.B ul
degenerates to
.BR cat (1V).
If the terminal cannot underline, underlining is ignored.
.SH OPTIONS
.TP
.BI \-t " terminal"
Override the terminal kind specified in the environment.
If the terminal cannot underline, underlining is ignored.
.TP
.B \-i
Indicate underlining by a separate
line containing appropriate dashes
.RB ` \- ';
this is useful when you want to
look at the underlining which is present in an
.BR nroff (1)
output stream on a
.SM CRT\s0-terminal.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
.PD
.SH "SEE ALSO"
.BR cat (1V),
.BR colcrt (1),
.BR man (1),
.BR nroff (1)
.SH BUGS
.B nroff
usually generates a series of backspaces and underlines
intermixed
with the text to indicate underlining.
.B ul
makes attempt to optimize
the backward motion.
B reset
program.
y using an
.\".BR adm3a .
.\".LP
If no mapping applies and a final
.I type
option, not preceded by a
.BR \-m ,
is given on the command line then that type is used;
otherwise the type found in the
.B /etc/ttytab
database is used as the terminal type.
This should always be the case for hardwired ports.
.LP
It is usually desirable to return the
terminal type, as fin./share/man/man1/umask.1                                                                               755       0      12           73  4424740740  10050                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)umask.1 1.9 89/03/26 SMI; 
me.1v        uncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0  ./share/man/man1/unalias.1                                                                             755       0      12           75  4424740740  10366                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)unalias.1 1.8 89/03/26 SMI; 
ncompress.1        
unexpand.1       unget.1        uniq.1        unhash.1    (    	unifdef.1 (  8    units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c  0  D./share/man/man1/uname.1v                                                                              755       0      12         1542  4424740740  10265                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uname.1v 1.10 89/03/26 SMI; from S5R2 6.2 9/2/83
.TH UNAME 1V "24 September 1987"
.SH NAME
uname \- display the name of the current system
.SH SYNOPSIS
.B uname
[
.B \-mnrsva
]
.SH DESCRIPTION
.IX "System V commands" "\fLuname\fR"
.IX uname "" "\fLuname\fR \(em print hostname"
.LP
Note:
Optional Software (System V Option).  Refer  to
.TX INSTALL
for information on how to install this command.
.B uname
prints the current system name of the
system on the standard output.
.SH OPTIONS
.TP
.B \-m
Print the machine hardware name.
.TP
.B \-n
Print the nodename (the nodename may be a name that the system is
known by to a communications network).
.TP
.B \-r
Print the operating system release.
.TP
.B \-s
Print the system name (default).
.TP
.B \-v
Print the operating system version.
.TP
.B \-a
Print all the above information.
.SH "SEE ALSO"
.BR uname (2V)
or handles underlining automatically,
.B ul
degenerates to
.BR cat (1V).
If the terminal cannot underline, underlining is ignored.
.SH OPTIONS
.TP
.BI \-t " t./share/man/man1/uncompress.1                                                                          755       0      12           74  4424740740  11127                                                                                                                                                                                                                                                                                                                                                                      .so man1/compress.1
.\" @(#)uncompress.1 1.7 89/03/26 SMI; 
  unget.1        uniq.1 e      unhash.1 1 e  (    	unifdef.1     8    units.1   L    
unix2dos.1    `    	unlimit.1     t    unload.1   L      	unloadc.1 `      unpack.1  t      unset.1       
unsetenv.1        uptime.1 1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c c   X    	uusend.1c 0  l./share/man/man1/unexpand.1                                                                            755       0      12           70  4424740741  10550                                                                                                                                                                                                                                                                                                                                                                      .so man1/expand.1
.\" @(#)unexpand.1 1.7 89/03/26 SMI; 
uniq.1       unhash.1 niq  (    	unifdef.1 .1  8    units.1   L    
unix2dos.1 t  `    	unlimit.1 os  t    unload.1 it.      	unloadc.1 .1      unpack.1 dc.      unset.1       
unsetenv.1 e      uptime.1 env      users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c ode  D    	uuname.1c 1c  X    	uusend.1c .1  l    	uustat.1c .1  |  ./share/man/man1/unget.1                                                                               755       0      12           70  4424740741  10050                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-unget.1
.\" @(#)unget.1 1.3 89/03/26 SMI;
sh.1 1   (    	unifdef.1 iq  8    units.1   L    
unix2dos.1    `    	unlimit.1  t  t    unload.1  os      	unloadc.1 t.      unpack.1  .1      unset.1       
unsetenv.1        uptime.1 1 e      users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c de  X    	uusend.1c 1c  l    	uustat.1c .1  |    uux.1c 1      
./share/man/man1/uniq.1                                                                                755       0      12         3226  4424740741   7750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uniq.1 1.11 89/03/26 SMI; from UCB 4.2
.TH UNIQ 1  "9 September 1987"
.SH NAME
uniq \- remove or report adjacent duplicate lines
.SH SYNOPSIS
.B uniq
[
.B \-cdu
[
.BR + \||\| \-\fIn\fP
]
[
.I inputfile
[
.I outputfile
] ]
.IX  "uniq command"  ""  "\fLuniq\fP \(em remove repeated lines"
.IX  remove "repeated lines \(em \fLuniq\fP"
.IX  delete "repeated lines \(em \fLuniq\fP"
.IX  "sorted file"  "remove repeated lines"  ""  "remove repeated lines \(em \fLuniq\fP"
.IX  "text processing utilities"  uniq  ""  "\fLuniq\fP \(em remove repeated lines"
.SH DESCRIPTION
.LP
.B uniq
reads the input file comparing adjacent lines.
In the normal case, the second and succeeding
copies of repeated lines are
removed; the remainder is written on the output file.
Note: repeated lines must be adjacent in order to be found; see
.BR sort (1V).
.SH OPTIONS
.TP
.B \-c
Supersede
.B \-u
and
.B \-d
and generate an output report in default style
but with each line preceded by a count of the number of times it occurred.
.LP
The normal output of
.B uniq
is the union of the
.B \-u
and
.B \-d
options.
.TP
.B \-d
Write one copy of just the repeated lines.
.TP
.B \-u
Copy only those lines which are
.I not
repeated in the original file.
.LP
The
.I n
arguments specify skipping an initial portion of each line in the comparison:
.TP 8
.BI + n
The first
.IR n
characters are ignored.  Fields are skipped before characters.
.TP
.BI \- n
The first
.IR n
fields together with any blanks before each are ignored.
A field is defined as a string of non-\s-1SPACE\s0,
non-\s-1TAB\s0
characters separated by
.SM SPACE
and
.SM TAB
characters from its neighbors.
.SH "SEE ALSO"
.BR comm (1),
.BR sort (1V)
ining by a separate
line containing appropriate dashes
.RB ` \- ';
this is useful when you want to
look at the underlining which is present in an
.BR nroff (1)
output stream on a
.SM CRT\s0-terminal.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
.PD
.SH "SEE ALSO"
.BR cat (1V),
.BR colcrt (1),
.BR man (1),
.BR nroff (1)
.SH BUGS
.B nroff
usually generates a series of./share/man/man1/unhash.1                                                                              755       0      12           74  4424740741  10220                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)unhash.1 1.8 89/03/26 SMI; 
units.1   L    
unix2dos.1 L  `    	unlimit.1 `  t    unload.1  t      	unloadc.1       unpack.1        unset.1       
unsetenv.1       uptime.1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c  0  D    	uuname.1c D  X    	uusend.1c X  l    	uustat.1c l  |    uux.1c l      
vacation.1       val.1      ./share/man/man1/unifdef.1                                                                             755       0      12         5434  4424740741  10417                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)unifdef.1 1.11 89/03/26 SMI; from 4.3 BSD
.TH UNIFDEF 1 "22 March 1989"
.SH NAME
unifdef \- resolve and remove ifdef'ed lines from cpp input
.SH SYNOPSIS
.B unifdef
[
.B \-c
.B l
.B t
] [
.BI \-D name
] [
.BI \-U name
] [
.BI \-iD name
] [
.BI \-iU name
] .\|.\|. [
.I filename
]
.SH DESCRIPTION
.IX  "unifdef command"  ""  "\fLunifdef\fP \(em eliminate \fL#ifdef\fR's from C input"
.IX  "eliminate ifdefs from C input"  ""  "eliminate \fL#ifdef\fR's from C input \(em \fLunifdef\fP"
.IX  "programming tools"  unifdef  ""  "\fLunifdef\fP \(em eliminate \fL#ifdef\fR's from C input"
.LP
.B unifdef
removes
.BR ifdef ed
lines from a file while otherwise leaving the file alone.
It is smart enough to deal with the nested
.BR ifdef s,
comments, single and double quotes of
.B C
syntax, but it does not do any including or interpretation of macros.
Neither does it strip out comments,
though it recognizes and ignores them.
You specify which symbols you want defined with
.B \-D
options, and which you want undefined with
.BI \-U
options.  Lines within those
.BR ifdef s
will be
copied to the output, or removed, as appropriate.
Any
.BR ifdef ,
.BR ifndef ,
.BR else ,
and
.B endif
lines associated with
.I filename
will also be removed.
.LP
.BR ifdef s
involving symbols you do not specify are untouched and copied out
along with their associated
.BR ifdef ,
.BR  else ,
and
.B endif
lines.
.LP
If an
.BI ifdef X
occurs nested inside another
.BI ifdef X\fR,
then the inside
.B ifdef
is treated as if it were an unrecognized symbol.
If the same symbol appears in more than one argument, only the first
occurrence is significant.
.LP
.B unifdef
copies its output to the standard output
and will take its input from the standard input
if no
.I filename
argument is given.
.SH OPTIONS
.TP
.B \-c
Complement the normal operation.
Lines that would have been removed or blanked
are retained, and vice versa.
.TP
.B \-l
Replace \(lqlines removed\(rq lines with blank lines.
.TP
.B \-t
Plain text option.
.B unifdef
refrains from attempting to recognize
comments and single and double quotes.
.TP
.BI \-iD name
Ignore, but print out, lines associated with the defined symbol
.I filename.
If you use
.BR ifdef s
to delimit non-C
lines, such as comments or code which is
under construction, then you must tell
.B unifdef
which symbols are used for that purpose so that it won't try to parse
for quotes and comments within them.
.TP
.BI \-iU name
Ignore, but print out, lines associated with the undefined symbol
.IR filename .
.SH "SEE ALSO"
.BR cpp (1),
.BR diff (1)
.SH DIAGNOSTICS
.TP 10
.B Premature \s-1EOF\s0
Inappropriate
.B else
or
.BR endif .
.LP
Exit status is 0 if output is exact copy of input,
1 if not, 2 if trouble.
.SH BUGS
.LP
Does not know how to deal with
.BR cpp (1)
constructs such as
.IP
.nf
.B #if	defined(X) || defined(Y)
.fi
e shell scripts cannot set the environment of their parent.
If a process could set its parent's environment,
none of this nonsense would be necessary in the first place.
.LP
Once the terminal type is known,
.B tset
sets the term./share/man/man1/units.1                                                                               755       0      12         3673  4424740742  10145                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)units.1 1.14 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH UNITS 1 "9 September 1987"
.SH NAME
units \- conversion program
.SH SYNOPSIS
.B units
.IX  "units command"  ""  "\fLunits\fP \(em convert units"
.IX  "convert units"  ""  "convert units \(em \fLunits\fP"
.SH DESCRIPTION
.B units
converts quantities expressed
in various standard scales to
their equivalents in other scales.
It works interactively in this fashion:
.LP
.nf
.RS
.RB "You have:\ \ " inch
.RB "You want:\ \ " cm
.RS
\(** 2.540000e+00
\(sl 3.937008e\-01
.RE
.fi
.RE
.LP
A quantity is specified as a multiplicative combination of
units optionally preceded by a numeric multiplier.
Powers are indicated by suffixed positive integers,
division by the usual sign:
.LP
.nf
.RS
.RB "You have:\ \ " "15 lbs force/in2"
.RB "You want:\ \ " atm
.RS
\(** 1.020689e+00
\(sl 9.797299e\-01
.RE
.fi
.RE
.LP
.B units
only does multiplicative scale changes.
Thus it can convert Kelvin to Rankine, but not Celsius to
Fahrenheit.
Most familiar units,
abbreviations, and metric prefixes are recognized,
together with a generous leavening of exotica
and a few constants of nature including:
.RS
.PD 0
.TP "\w'water\ \ \ \ 'u"
.B pi
Ratio of circumference to diameter,
.TP
.B c
Speed of light,
.TP
.B e
Charge on an electron,
.TP
.B g
Acceleration of gravity,
.TP
.B force
Same as
.BR g ,
.TP
.B mole
Avogadro's number,
.TP
.B water
Pressure head per unit height of water,
.TP
.B au
Astronomical unit.
.PD
.RE
.B pound
is not recognized as a unit of
mass;
.B lb
is.
.B pound
refers to a British pound.
Compound names are run together (for instance,
.BR lightyear ).
British units that differ from their
.SM U\s+1\&.\s-1S\s0\&.
counterparts are prefixed thus:
.BR brgallon .
Currency is denoted
.BR belgiumfranc ,
.BR britainpound ", .\|.\|."
For a complete list of units, type:
.LP
.RS
.B cat /usr/lib/units
.RE
.SH FILES
.PD 0
.TP 20
.B /usr/lib/units
.PD
.SH BUGS
Do not base your
financial plans on the currency conversions.
-t
Plain text option.
.B unifdef
refrains from attempting to recogniz./share/man/man1/unix2dos.1                                                                            755       0      12         4210  4424740742  10542                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)unix2dos.1	1.8 89/03/26 SMI;
.TH UNIX2DOS 1 "19 February 1988"
.SH NAME
unix2dos \- convert text file from SunOS format to DOS format
.SH SYNOPSIS
.B unix2dos
[
.B \-iso
]
[
.B \-7
]
.I originalfile 
.I convertedfile
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX unix2dos "" "\fLunix2dos\fR \(em convert text file from DOS format to SunOS format"
.LP
.B unix2dos
adds carriage returns and converts end of file characters in SunOS format text files to conform to
.SM DOS
requirements.
.LP
This command may be invoked from either
.SM DOS
or SunOS.
However, the filenames must conform to
the conventions of the environment in which the command is invoked.  
.LP
If the original file and the converted file are the same, 
.B unix2dos
will rewrite the original file after converting it.
.SH OPTIONS
.TP 
.B \-iso
Convert ISO standard characters to the corresponding 
character in the DOS extended character set.
.TP 
.B \-7
Convert 8 bit SunOS characters to 7 bit DOS characters.
.SH DIAGNOSTICS
.TP
.B "File \fIfilename\fP not found, or no read permission
The input file you specified does not
exist, or you do not have read permission (check with the SunOS command ls -l).
.TP
.B "Bad output filename \fIfilename\fP, or no write permission
The output file you specified
is either invalid, or you do not have write permission for that
file or the directory that contains it.  Check also that the drive or diskette 
is not write-protected.
.TP
.B "Error while writing to temporary file
An error occurred while converting your file, possibly because 
there is not enough space on the current drive.  Check the amount of
space on the current drive using the DIR command.  Also be certain that
the default diskette or drive is write-enabled (not write-protected).
Note that when this error occurs, the original file remains intact.
.TP
.B "Could not rename tmpfile to \fIfilename\fP.
.PD 0
.
.TP
.B "Translated tmpfile name = \fIfilename\fP.
The program could not perform the final step in converting your
file. Your converted file is stored under the name indicated on the
second line of this message.
.SH SEE ALSO
.I Sun386i Advanced Skills
.br
.I DOS Reference Manual
'water\ \ \ \ 'u"
.B pi
Ratio of circumference to diameter,
.TP
.B c
Speed of light,
.TP
.B e
Charge on an electron,
.TP
.B g
Acceleration of gravity,
.TP
.B force
Same as
.BR g ,
.TP
.B mole
Avogadro's number,
.TP
.B water
Pressure head per unit height of water,
.TP
.B au
Astronomical unit.
.PD
.RE
.B pound
is not recognized as a unit of
mass;
.B lb
is.
.B pound
refers to ./share/man/man1/unlimit.1                                                                             755       0      12           75  4424740742  10415                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)unlimit.1 1.8 89/03/26 SMI; 
nloadc.1 t      unpack.1        unset.1       
unsetenv.1        uptime.1 1       users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c 0  X    	uusend.1c D  l    	uustat.1c X  |    uux.1c 1      
vacation.1 D      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        ./share/man/man1/unload.1                                                                              755       0      12         5133  4424740742  10256                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)unload.1	1.12 89/03/26 SMI
.TH UNLOAD 1 "19 February 1988"
.SH NAME
unload, unloadc \- unload Application SunOS or Developer's Toolkit optional clusters
.SH SYNOPSIS
.B unload
.IR filename .\|.\|.
.LP
.B unloadc
.IR cluster .\|.\|.
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "unload command" "" "\fLunload\fR command"  
.LP
.B unload
unloads the Application Sun\s-1OS\s0 or Developer's Toolkit clusters that
contain the specified file arguments.
.B unloadc
unloads the specified Application Sun\s-1OS\s0 or Developer's Toolkit clusters.
.LP
Without arguments,
.B unload
and
.B unloadc
display a summary of the clusters in the Application Sun\s-1OS\s0 and
Developer's Toolkit, including the load state and size of each cluster.
.SH EXAMPLES
.LP
To unload the cluster that contains the 
.B spell
command:
.LP
.RS
.nf
.ft B
example% unload spell
About to unload the spellcheck cluster, confirm (y/n): y
Unloading the spellcheck cluster ...
The spellcheck cluster has been unloaded.
space used by clusters: 5358K bytes
total space remaining: 20962K bytes
example%
.fi
.RE
.LP
To display a summary of the clusters in the Application Sun\s-1OS\s0 and
Developer's Toolkit:
.LP
.RS
.nf
.ta \w'    available 'u +\w'advanced_admin   'u +\w'diskette  'u
.nf
.ft B
example% unload
Application Sun\s-1OS\s0 Clusters:
\&    available	cluster	size (bytes)
\&    ---------	-------	----
\&      yes	accounting	265K
\&      no	advanced_admin	501K
\&      .\|.\|.
.sp
Developer's Toolkit Clusters:
\&    available	cluster	size (bytes)
\&    ---------	-------	----
\&      no	base_devel	6907K
\&      .\|.\|.
.sp
space used by clusters: 6021K bytes
total space remaining: 20432K bytes
.ft
.fi
.RE
.SH FILES
.PD 0
.TP
.B /export/loaded/appl
where Application Sun\s-1OS\s0 clusters are loaded (or mounted)
.TP
.B /export/loaded/devel
where Developer's Toolkit clusters are loaded (or mounted)
.TP
.B /usr/lib/load/*
data files
.fi
.SH "SEE ALSO"
.BR cluster (1),
.BR load (1),
.BR toc (5)
.LP
.B Sun386i Setup and Maintenance
.SH DIAGNOSTICS
.TP
.BI "The file " filename " is not in any of the optional software clusters."

The specified file is not part of the Application Sun\s-1OS\s0 or Developer's
Toolkit.
.TP
.BI "The cluster " cluster " is not loaded."
The specified cluster is not loaded on disk.
.TP
.BI "There is no " cluster " cluster."
The specified cluster is not part of the Application Sun\s-1OS\s0 or Developer's
Toolkit.
.TP
.B "The Application Sun\s-1OS\s0 (and/or) Developer's Toolkit are mounted."

The Application Sun\s-1OS\s0 or Developer's Toolkit or both
are mounted across the network
and can not be loaded or unloaded.
xit status is 0 if output is exact copy of input,
1 if not, 2 if trouble.
.SH BUGS
.LP
Does not know how to deal with
.BR cpp (1)
constructs such as
.IP
.nf
.B #if	defined(X) || defined(Y)
.fi
e shell scripts cannot set the environment of their parent.
If a process could set its parent's environment,
none of this nonsense would be necessary in the first place.
.LP
Once the terminal type is known,
.B tset
sets the term./share/man/man1/unloadc.1                                                                             755       0      12           66  4424740742  10361                                                                                                                                                                                                                                                                                                                                                                      .so man1/unload.1
.\" @(#)unloadc.1 1.4 89/03/26 SMI;
  unset.1       
unsetenv.1        uptime.1 1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c c   X    	uusend.1c c   l    	uustat.1c 0  |    uux.1c 1      
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1.
.B unloadc
unloads the specified Appli./share/man/man1/unpack.1                                                                              755       0      12           64  4424740743  10214                                                                                                                                                                                                                                                                                                                                                                      .so man1/pack.1
.\" @(#)unpack.1 1.7 89/03/26 SMI; 
  
unsetenv.1        uptime.1 1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c c   X    	uusend.1c c   l    	uustat.1c c   |    uux.1c 1      
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 d.1        view.1 1.
.B unloadc
unloads the specified Appli./share/man/man1/unset.1                                                                               755       0      12           73  4424740743  10071                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)unset.1 1.8 89/03/26 SMI; 
ime.1 1        users.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c 1c   D    	uuname.1c c   X    	uusend.1c c   l    	uustat.1c c   |    uux.1c 1      
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 d.1        view.1 1 d.1        view.1 1.
.B unloadc
unloads the specified Appli./share/man/man1/unsetenv.1                                                                            755       0      12           76  4424740743  10605                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)unsetenv.1 1.8 89/03/26 SMI; 
ers.1       uucp.1c       uudecode.1c       uuencode.1c   0    uulog.1c  0  D    	uuname.1c D  X    	uusend.1c X  l    	uustat.1c l  |    uux.1c        
vacation.1       val.1  1      vax.1 on      vfontinfo.1       vgrind.1        vi.1 .1         view.1 1        view.1 1 d.1        view.1 1 d.1        view.1 1.
.B unloadc
unloads the specified Appli./share/man/man1/uptime.1                                                                              755       0      12         1304  4424740743  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uptime.1 1.10 89/03/26 SMI; from UCB 4.2
.TH UPTIME 1 "9 September 1987"
.SH NAME
uptime \- show how long the system has been up
.SH SYNOPSIS
.B uptime
.IX  "uptime command"  ""  "\fLuptime\fP \(em display system up time"
.IX  display "system up time \(em \fLuptime\fP"
.SH DESCRIPTION
.B uptime
prints the current time, the length
of time the system has been up,
and the average number of jobs in
the run queue over the last 1, 5 and 15 minutes.
It is, essentially, the first line of a
.BR w (1)
command.
.SH EXAMPLE
.RS
.nf
.ft B
example% uptime
6:47am  up 6 days, 16:38,  1 users,  load average: 0.69, 0.28, 0.17
example%
.ft R
.fi
.RE
.SH FILES
.B /vmunix
system name list
.SH SEE ALSO
.BR w (1)
uding the load state and size of each cluster.
.SH EXAMPLES
.LP
To unload the cluster that contains the 
.B spell
command:
.LP
.RS
.nf
.ft B
example% unload spell
About to unload the spellcheck cluster, confirm (y/n): y
Unloading the spellcheck cluster ...
The spellcheck cluster has been unloaded.
space used by clu./share/man/man1/users.1                                                                               755       0      12         1003  4424740743  10126                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)users.1 1.11 89/03/26 SMI;
.TH USERS 1 "9 September 1987"
.SH NAME
users \- display a compact list of users logged in
.SH SYNOPSIS
.B users
.IX  "users command"  ""  "\fLusers\fP \(em display users on system"
.IX  display "users on system \(em \fLusers\fP"
.SH DESCRIPTION
.B users
lists the login names of the users
currently on the system in a compact,
one-line format:
.RS
.nf
.ft B
example% users
paul george ringo
example%
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.PD
.SH SEE ALSO
.BR who (1)
SH EXAMPLE
.RS
.nf
.ft B
example% uptime
6:47am  up 6 days, 16:38,  1 users,  load average: 0.69, 0.28, 0.17
example%
.ft R
.fi
.RE
.SH FILES
.B /vmunix
system name list
.SH SEE ALSO
.BR w (1)
uding the load state and size of each cluster.
.SH EXAMPLES
.LP
To unload the cluster that contains the 
.B spell
command:
.LP
.RS
.nf
.ft B
example% unload spell
About to unload the spellcheck cluster, confirm (y/n): y
Unloading the spellcheck cluster ...
The spellcheck cluster has been unloaded.
space used by clu./share/man/man1/uucp.1c                                                                               755       0      12        12242  4424740744  10134                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uucp.1c 1.25 89/03/26 SMI; from UCB 4.2 BSD
.TH UUCP 1C "22 December 1987"
.SH NAME
uucp, uulog, uuname \- system to system copy
.SH SYNOPSIS
.B uucp
[
.B \-acCdfmr
] [
.BI \-e system
] [
.BI \-n username
] [
.BI \-g grade
]
.if n .ti +5
[
.BI \-s spool
] [
.BI \-x debug
]
.I source-file
\&.\|.\|.
.if t .ti +.5i
.I destination-file
.LP
.B uulog
[
.BI \-s system
] [
.BI \-u username
]
.LP
.B uuname
.RB [ " \-l " ]
.SH AVAILABILITY
.LP
This command is available with the
.B uucp
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "uucp command"  ""  "\fLuucp\fP \(em system to system copy"
.IX  "uulog command"  ""  "\fLuulog\fP \(em UUCP log"
.IX  "uuname command"  ""  "\fLuuname\fP \(em UUCP list of names"
.IX  "system to system copy"  ""  "system to system copy \(em \fLuucp\fP"
.IX  "UUCP log"  ""  "UUCP log \(em \fLuulog\fP"
.IX  communications  uucp  ""  "\fLuucp\fP \(em system to system copy"
.IX  communications  uulog  ""  "\fLuulog\fP \(em UUCP log"
.IX  communications  uuname  ""  "\fLuuname\fP \(em UUCP list of names"
.LP
.B uucp
copies each
.I source-file
to the named
.I destination-file.
A filename may be a path name on your machine, or may have
the form
.IP
.IB system-name ! pathname
.LP
where
.I system-name
is taken from a list of system names that
.B uucp
knows about.  Shell metacharacters
.BR ? ,
.BR * ,
and
.BR [\ ]
appearing in the pathname part will be expanded on the appropriate system.
.LP
Pathnames may be one of:
.RS
.TP
\(bu
a full pathname;
.TP
\(bu
a pathname preceded by
.IR ~username/ ;
where
.I username
is a username on the specified system and is replaced by that user's
login directory;
.TP
\(bu
a pathname preceded by
.BR ~/ ;
such a pathname will be replaced by the
\(lqpublic uucp\(rq directory on the remote machine;
.TP
\(bu
anything else is prefixed by the pathname of the current directory.
.RE
.LP
If the result is an erroneous pathname for the remote system, the copy
will fail.  If the
.I destination-file
is a directory, the last component of the
.I source-file
name is used.
.LP
.B uucp
preserves execute permissions across the transmission and gives 0666
read and write permissions (see
.BR chmod (2)).
.LP
.B uulog
maintains a summary log of
.B uucp
and
.BR uux (1C)
transactions in the file
.BR /var/spool/uucp/\s-1LOGFILE\s0 ,
by gathering information from partial log files named
.BR /var/spool/uucp/\s-1LOG\s0.*.? .
It removes the partial log files.
.LP
.B uuname
lists the
.B uucp
names of systems that can be accessed using
.B uucp.
.SH OPTIONS
.SS uucp Options
.TP
.B \-a
Avoid doing a
.BR getwd (3)
to find the current directory.
This is sometimes used for efficiency.
.TP
.B \-c
Use the source file when copying out rather than
copying the file to the spool directory.  This is the default.
.TP
.B \-C
Make a copy of outgoing files in the
.B uucp
spool directory,
rather than copying the source file directly to the target system.
This lets you remove the source file after issuing the
.B uucp
command.
.TP
.B \-d
Make all necessary directories for the file copy.
.TP
.B \-f
Do not make intermediate directories for the file copy.
.TP
.B \-m
Send mail to the requester when the copy is complete.
.TP
.B \-r
Do not start the transfer, just queue the job.
.br
.ne 3
.TP
.BI \-e system
Send the
.B uucp
command to the system
.I system
to be executed there.  This works only when the remote machine
allows
.B uucp
to be executed by
.BR  /usr/lib/uucp/uuxqt .
.TP
.BI \-n username
Notify
.I username
on remote system (by mail) that a file was sent.
.TP
.BI \-g grade
.I grade
is a single letter or number; lower
.SM ASCII
values
transmit a job earlier during a particular conversation.
The default
.I grade
is
.BR n .
By way of comparison,
.BR uux (1C)
defaults to
.RB ` A ';
mail is usually sent at grade
.RB ` C '.
.TP
.BI \-s spool
Use
.I spool
as the spool directory instead of the default.
.TP
.BI \-x debug
Turn on the debugging at level
.IR debug .
.SS uulog Options
.TP
.BI \-s system
Print information about work involving system
.IR system .
.TP
.BI \-u username
Print information about work done for the specified
.IR username .
.SS uuname options
.TP
.B \-l
Display the local system-name.
.\".TP
.\".B \-v
.\"Verbose.  Display a description of each known system.
.SH FILES
.PD 0
.TP 20
.B /var/spool/uucp
spool directory
.TP
.B /usr/lib/uucp/\s-1ADMIN\s0
list of known systems and descriptions
.TP
.B /usr/lib/uucp/*
other data and program files
.TP
.B /var/spool/uucp/\s-1LOGFILE\s0
.PD
.SH SEE ALSO
.BR mail (1),
.BR uux (1C),
.BR chmod (2),
.BR getwd (3)
.LP
.TX ADMIN
.SH WARNING
.LP
The domain of remotely accessible files can (and for obvious security
reasons, usually should) be severely restricted.  You will very likely
not be able to fetch files by pathname; ask a responsible person on the
remote system to send them to you.  For the same reasons you will
probably not be able to send files to arbitrary pathnames.
.SH BUGS
.LP
All files received by
.B uucp
will be owned by the user
.SM ID
.BR uucp .
.LP
The
.B \-m
option will only work sending files or receiving a single file.
Receiving multiple files specified by special shell characters
.BR ? ,
.BR * ,
and
.B [\ ]
will not activate the
.B \-m
option.
 to set and export
.B
.SM TERM
and
.B
.SM TERMCAP\s0\fR.
This can be used with
.RS 
.RS
.nf
.ft B
set noglob
eval \`tset \-s .\|.\|.\`
unset noglob
.ft R
.fi
.RE
.RE
.IP
to bring the terminal information into the environment.
Doing so makes programs such as
.BR vi (1)
start up faster.
If the
.B
.SM SHELL
environment variable ends with
.BR csh ,
C s./share/man/man1/uudecode.1c                                                                           755       0      12           74  4424740744  10675                                                                                                                                                                                                                                                                                                                                                                      .so man1/uuencode.1c
.\" @(#)uudecode.1c 1.5 89/03/26 SMI; 
uulog.1c  0  D    	uuname.1c D  X    	uusend.1c X  l    	uustat.1c l  |    uux.1c l      
vacation.1       val.1        vax.1  1      vfontinfo.1       vgrind.1        vi.1          view.1   +.5i
.I destination-file
.LP
.B uulog
[
.BI \-s system
] [
.BI \-u username
]
.LP
.B uuname
.RB [ " \-l " ]
.SH AVAILABILITY
.LP
This command is available with the
.B uucp
software installation o./share/man/man1/uuencode.1c                                                                           755       0      12         6305  4424740744  10752                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)uuencode.1c 1.20 89/03/26 SMI; from UCB 4.3 BSD
.TH UUENCODE 1C "23 November 1987"
.SH NAME
uuencode, uudecode \- encode a binary file, or decode its ASCII representation
.SH SYNOPSIS
.B uuencode
[
.I source-file
]
.I file-label
.LP
.B uudecode
[
.I encoded-file
]
.IX  "uuencode command"  ""  "\fLuuencode\fP \(em encode binary file"
.IX  "uudecode command"  ""  "\fLuudecode\fP \(em decode binary file"
.IX  "encode binary file"  ""  "encode binary file \(em \fLuuencode\fP"
.IX  "decode binary file"  ""  "decode binary file \(em \fLuudecode\fP"
.IX  communications  uuencode  ""  "\fLuuencode\fP \(em encode binary file"
.IX  communications  uudecode  ""  "\fLuudecode\fP \(em decode binary file"
.IX  "binary file transmission"  uuencode  ""  "\fLuuencode\fP \(em encode binary file"
.IX  "binary file transmission"  uudecode  ""  "\fLuudecode\fP \(em decode binary file"
.SH DESCRIPTION
.B uuencode
converts a binary file into an
.SM ASCII\s0-encoded
representation that can be sent using
.BR mail (1).
It encodes the contents of
.IR source-file ,
or the standard input if no
.I source-file
argument is given.  The
.I file-label
argument is required.  It is included in the encoded file's
header as the name of the file into which
.B uudecode
is to place the binary (decoded) data.
.B uuencode
also includes the ownership and permission modes of
.I source-file,
so that
.I file-label
is recreated with those same ownership and permission modes.
.LP
If the remote host is a
.SM UNIX
system with the
.BR sendmail (8)
mail-message delivery daemon, you can pipe the output of
.B uuencode
through
.BR mail (1)
to the recipient named
.B decode
on the remote host.  This recipient is typically an alias for the
.B uudecode
program (see
.BR aliases (5)
for details), which allows a binary file to be
decoded (extracted) from a mail message automatically.
If this alias is absent on a particular host, the encoded
file can be mailed to a user, who can run it through
.B uudecode
manually.
.LP
.I uudecode
reads an
.IR encoded-file ,
strips off any leading and trailing lines
added by mailer programs, and recreates the original binary data
with the filename and the mode and owner specified in the header.
.LP
The encoded file is an ordinary
.SM ASCII
text file; it can be edited by any text editor.  But it is best
only to change the mode or file-label in the header to avoid
corrupting the decoded binary.
.SH SEE\ ALSO
.BR mail (1),
.BR uucp (1C),
.BR uusend (1C),
.BR uux (1C),
.BR aliases (5),
.BR uuencode (5),
.BR sendmail (8)
.SH BUGS
The encoded file's size is expanded by 35% (3 bytes become 4, plus
control information), causing it to take longer to transmit than the
equivalent binary.
.LP
The user on the remote system who is invoking
.B uudecode
(typically
.BR uucp )
must have write permission on the file specified in the
.IR file-label .
.LP
Since both
.B uuencode
and 
.B uudecode
run with user ID set to
.BR uucp ,
.B uudecode
can fail with ``permission denied'' when attempted in a directory that
does not have write permission allowed for ``other.''
start the transfer, just queue the job.
.br
.ne 3
.TP
.BI \-e system
Send the
.B uucp
command to the system
.I system
to be executed there.  This works only when the remote machine
allows
.B uucp
to be executed by
.BR  /usr/lib/uucp/uuxqt .
.TP
.BI \-n username
Notify
.I username
on remote system (by mail) that a ./share/man/man1/uulog.1c                                                                              755       0      12           65  4424740744  10233                                                                                                                                                                                                                                                                                                                                                                      .so man1/uucp.1c
.\" @(#)uulog.1c 1.5 89/03/26 SMI; 
   	uusend.1c 0  l    	uustat.1c D  |    uux.1c 1      
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 November 1987"
.SH NAME
uuencode, uudecode \- encode a binary file, or decode its ASCII representation
.SH SYNOPSIS
.B uuencode
[
.I source-file
]
.I file-label
.LP
.B uudecode
[
.I encoded-file
]
.IX  "uuencode command"  ""  "\fLuuencode\fP \./share/man/man1/uuname.1c                                                                             755       0      12           66  4424740744  10373                                                                                                                                                                                                                                                                                                                                                                      .so man1/uucp.1c
.\" @(#)uuname.1c 1.9 89/03/26 SMI; 
  	uustat.1c 0  |    uux.1c 1      
vacation.1 1      val.1 on      vax.1 l.      vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1 d.1        view.1 1 November 1987"
.SH NAME
uuencode, uudecode \- encode a binary file, or decode its ASCII representation
.SH SYNOPSIS
.B uuencode
[
.I source-file
]
.I file-label
.LP
.B uudecode
[
.I encoded-file
]
.IX  "uuencode command"  ""  "\fLuuencode\fP \./share/man/man1/uusend.1c                                                                             755       0      12         3411  4424740744  10441                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uusend.1c 1.15 89/03/26 SMI;
.TH UUSEND 1C "21 December 1987"
.SH NAME
uusend \- send a file to a remote host
.SH SYNOPSIS
.B uusend
[
.B \-m
.I mode
]
.I sourcefile
.IB sys1 ! sys2 !\c
.RB \&.\|.\|. !\c
.I remotefile
.IX  "uusend command"  ""  "\fLuusend\fP \(em send file to remote host"
.IX  send "file to remote host \(em \fLuusend\fP"
.IX  "remote host"  "send file to"  ""  "send file to \(em \fLuusend\fP"
.IX  communications  uusend  ""  "\fLuusend\fP \(em send file to remote host"
.IX  file  "send to remote host"  ""  "send to remote host \(em \fLuusend\fP"
.SH AVAILABILITY
This command is available with the
.B uucp
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B uusend
sends a file to a given location on a remote system.  The system need
not be directly connected to the local system, but a chain of
.BR uucp (1C)
links needs to connect the two systems.
.LP
The sourcefile can be
.RB ` \- ',
meaning to use the standard input.  Both
of these options are primarily intended for internal use of
.BR uusend .
.LP
The remotefile can include the
.BI ~ username
or
.B ~/
syntax.
.SH OPTIONS
.TP
.BI \-m " mode"
Take the mode of the file on the remote end
from the octal number specified as
.IR mode .
The mode of the input file is used if the
.B \-m
option is not specified.
.SH SEE\ ALSO
.BR uucp (1C),
.BR uuencode (1C),
.BR uux (1C)
.SH BUGS
This command should not exist, since
.B uucp
should handle it.
.LP
All systems along the line must have the
.B uusend
command available and allow remote execution of it.
.LP
Some
.SM UUCP
systems have a bug where binary files cannot be the
input to a
.B uux
command.
If this bug exists in any system along the line,
the file will show up severely corrupted.
R mail (1)
to the recipient named
.B decode
on the remote host.  This recipient is typically an alias for the
.B uudecode
program (see
.BR aliases (5)
for details), which allows a binary file to be
decoded (extracted) from a mail message automatic./share/man/man1/uustat.1c                                                                             755       0      12         7245  4424740745  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uustat.1c 1.6 89/03/26 SMI;
.TH UUSTAT 1C "23 December 1987"
.SH NAME
uustat \- uucp status inquiry and job control
.SH SYNOPSIS
.B uustat
.BR \-a \||\| \-m \||\| \-p \||\| \-q
.RB \||\| \-k\c
.IR jobid " ]"
.RB \||\| \-r\c
.IR jobid " ]"
.LP
.B uustat
.RB "[ " \-s\c
.IR system " ]"
.RB "[ " \-u\c
.IR user " ]"
.SH AVAILABILITY
This command is available with the
.L uucp
software  installation  option.   Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "uustat command" "" "\fLuustat\fR command"  
.LP
.B uustat
displays the status of, or cancels, previously
specified 
.BR uucp (1C)
commands.  It also reports the status of
.B uucp
connections to other systems.
When no options are given,
.B uustat
displays the status of  all
.B uucp
requests issued by the current user.
.SH OPTIONS
Only one of the following options can be specified at a time:
.TP
.B \-a
Output all jobs in queue.
.TP
.B \-m
Report  the  status  of   accessibility   of   all machines.
.TP
.B \-p
Execute a 
.B ps \-flp
for all the
.SM PID\s0s
listed in the lock files.
.TP
.B \-q
List the jobs  queued  for  each  machine.   If  a
status file exists for the machine, its date, time
status information are reported.  In addition,
if  a number appears in parentheses next to the number of
.B C
or
.B X
files, it is the age in days  of  the  oldest
.B C./X.
file  for  that  system.   The
.B Retry
field represents the number of hours until the next possible  call.
The
.B Count
is the number of failure attempts.   For  systems  with  a  moderate
number  of  outstanding  jobs,  this could take 30
seconds or more to  execute.   An example of the output from
.B \-q
is:
.RS
.IP
.nf
.ft B
eagle  3C  04/07\-11:07NO DEVICES AVAILABLE
mh3bs3 2C  07/07\-10:42SUCCESSFUL
.ft R
.fi
.RE
.IP
This indicates the number of command  files that are  waiting
for  each  system.   Each command file may have zero or more
files to be sent (zero means to call the system and  see  if
work  is to be done).  The date and time refer to the previous
interaction with the system followed by  the  status  of the
interaction.
.TP
.BI \-k jobid
Kill the
.B uucp
request with job identification of
.IR jobid .
You must either own the job to be killed, or be the super-user.
.TP
.BI \-r jobid
Rejuvenate
.IR jobid .
The files associated with
.I jobid
are touched so that their modification time is set
to the current time.  This  prevents  the  cleanup
daemon from deleting the job until the jobs modification
time reaches  the  next limit  imposed  by  the daemon.
.LP
The following  options  can  be  specified separately or
together:
.TP
.BI \-s sys
Report the status of all
.B uucp
requests for  remote system
.IR sys .
.TP
.BI \-u user
Report the status of all
.B uucp
requests  issued  by user.
.IP
Output for both the
.B \-s
and
.B \-u
options has the following format:
.IP
.ft B
.nf
eaglen0000 4/07\-11:01:03(POLL)
eagleN1bd7 4/07\-11:07Seagledan522 /usr/dan/A
eagleC1bd8 4/07\-11:07Seagledan59 D.3b2al2ce4924
4/07\-11:07Seagledanrmail mike
.fi
.ft R
.LP
The first field is the job ID.
This is followed by the date and time.  The next field
is either an
.B S
or
.B R
depending on whether the job  is  to
send  or request a file.  This is followed by the user ID of
the user who queued the job.  The next  field  contains  the
size  of  the  file,  or in the case of a remote execution
request, the name  of  the
command.  When the size appears in this field, the file name
is also given.  This can either be the  name  given  by  the
user,  or  an  internal  name 
created for data files  associated  with  remote  executions
.RB ( rmail
in this example).
.SH FILES
.B /var/spool/uucp/*
.B uucp
spool directories
.SH SEE ALSO
.BR uucp (1C)
il (8)
.SH BUGS
The encoded file's size is expanded by 35% (3 bytes become 4, plus
control information), causing it to take longer to transmit than the
equivalent binary.
.LP
The user on the remote system who is invoking
.B uudecode
(typically
.BR uucp )
must have write permission on the file specified in the
.IR file-label .
.LP
Since both
.B u./share/man/man1/uux.1c                                                                                755       0      12         6325  4424740745   7767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uux.1c 1.20 89/03/26 SMI;
.TH UUX 1C "21 December 1987"
.SH NAME
uux \- remote system command execution
.SH SYNOPSIS
.B uux
[
.B \-
]
[
.B \-nrz
]
[
.BI \-g x
]
[
.BI \-x n
]
.I command-string
.IX  "uux command"  ""  "\fLuux\fP \(em system to system command execution"
.IX  "system to system command execution"  ""  "system to system command execution \(em \fLuux\fP"
.IX  communications  uux  ""  "\fLuux\fP \(em system to system command execution"
.SH AVAILABILITY
.LP
This command is available with the
.B uucp
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B uux
will gather 0 or more files from various systems,
execute a command on a specified system
and send the standard output to a file on a specified
system.
.LP
The
.I command-string
is made up of one or more arguments that look
like a shell command line,
except that the command and file names
may be prefixed by
.RI ` "system-name\fB!\fP" '.
A null system-name is interpreted as the local system.
.LP
File names may be one of:
.RS
.TP 10
\(bu
a full pathname;
.TP
\(bu
a pathname preceded by
.IR ~xxx/ ;
where
.I xxx
is a username on the specified system
and is replaced by that user's login directory;
.TP
\(bu
a pathname preceded by
.RB ` ~/ ';
such a pathname is replaced by the
\(lqpublic uucp\(rq directory on the remote machine;
.TP
\(bu
anything else is prefixed by the current directory.
.RE
.LP
The
.RB ` \- '
option sends the standard input to the
.B uux
command as the standard input to the command-string.
.LP
Any special shell characters such as
.BR <\|> ,
.BR ; ,
and
.B |
should be quoted either
by quoting the entire command-string, or quoting the special
characters as individual arguments.
.SH OPTIONS
.TP
.B \-n
Do not return any indication by
.BR mail (1)
of success or failure of the job.
.TP
.B \-r
Do not start
.BR uucico ,
just queue the job.
.TP
.B \-z
Return an indication by
.B mail
only if the job fails.
.TP
.BI \-g x
Set service grade or classification to
.IR x .  The default is
.BR A .
.TP
.BI \-x n
Set debugging level to
.IR n .
(5, 7, and 9 are good numbers to try;
they give increasing amounts of detail.)
.SH EXAMPLE
.LP
The command
.IP
.ft B
uux "!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !fi.diff"
.ft R
.LP
will get the
.B f1
files from the
.B usg
and
.B pwba
machines, execute a
.B diff
command and put the results in
.B f1.diff
in the local directory.
.SH FILES
.PD 0
.TP 20
.B /var/spool/uucp
spool directory
.TP
.B /usr/lib/uucp/*
other data and programs
.PD
.SH SEE ALSO
.BR mail (1),
.BR uucp (1C),
.BR sendmail (8)
.LP
.TX ADMIN
.br
.ne 5
.SH WARNING
.LP
An installation may, and for security reasons
generally will, limit the list of
commands executable on behalf of an incoming request from
.BR uux .
Typically, a restricted site will permit little other than
the receipt of mail using
.BR uux .
.PD
.SH BUGS
.LP
Only the first command of a shell pipeline may have a
.RI ` "system-name\fB!\fP" '.
All other commands are executed on the system of the first
command.
.LP
The use of the shell metacharacter
.B *
will probably not do what you want it to do.
.LP
The shell tokens
.B <<
and
.B >>
are not implemented.
.LP
There is no notification of denial of execution
on the remote machine.
er, just queue the job.
.br
.ne 3
.TP
.BI \-e system
Send the
.B uucp
command to the system
.I system
to be executed there.  This works only when the remote machine
allows
.B uucp
to be executed by
.BR  /usr/lib/uucp/uuxqt .
.TP
.BI \-n username
Notify
.I username
on remote system (by mail) that a ./share/man/man1/vacation.1                                                                            755       0      12         7250  4424740745  10605                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vacation.1 1.22 89/03/26 SMI;
.hw precedence
.TH VACATION 1 "22 March 1989"
.SH NAME
vacation \- reply to mail automatically
.SH SYNOPSIS
.B vacation
[
.B \-I
]
.br
.B vacation
[
.B \-j
]
[
.BI \-a " alias"
]
[
.BI \-t N
]
.I username
.SH DESCRIPTION
.IX vacation "" "\fLvacation\fR \(em automatic mail replies"
.LP
.B vacation
automatically replies to incoming mail.  The reply is
contained in the file
.BR .vacation.msg ,
that you create in your home directory.
.\"(or the file
.\".B /usr/lib/vacation.def
.\"by default).
.LP
This file should include a header with at least a
.RB ` Subject: '
line (it should not include a
.RB ` From: '
or a
.RB ` To: '
line).
For example:
.RS
.sp .5
.nf
.ft B
Subject: I am on vacation
I am on vacation until July 22.  If you have something urgent,
please contact Joe Jones (jones@f40).
	--John
.ft R
.fi
.RE
.LP
If the string
.SB $SUBJECT
appears in the
.B \&.vacation.msg
file, it is replaced with the subject of the original message when the
reply is sent; thus, a
.B \&.vacation.msg
file such as
.RS
.sp .5
.nf
.ft B
Subject: I am on vacation
I am on vacation until July 22.
Your mail regarding "$\s-1SUBJECT\s0" will be read when I return.
If you have something urgent, please contact Joe Jones (jones@f40).
	--John
.ft R
.fi
.RE
.LP
will include the subject of the message in the reply.
.LP
No message is sent if the
.RB ` To: '
or the
.RB ` Cc: '
line does not list the user to whom the original message was sent or
one of a number of aliases for them,
if the initial
.B From
line includes the string
.BR \-\s-1REQUEST\s0@ ,
or if a
.RB ` "Precedence: bulk" '
or
.RB ` "Precedence: junk" '
line is included in the header.
.SH OPTIONS
.TP
.B \-I
Initialize the
.B \&.vacation.pag
and
.B \&.vacation.dir
files and start
.BR vacation .
.LP
If the
.B \-I
flag is not specified, and a
.I user
argument is given,
.B vacation
reads the first line from the standard input
(for a
.RB ` From: '
line, no colon).
If absent, it produces an error message.  The following options may be
specified:
.TP
.BI \-a alias
Indicate that
.I alias
is one of the valid aliases for the user running
.BR vacation ,
so that mail addressed to that alias generates a reply.
.TP
.B \-j
Do not check whether the recipient appears in the
.RB ` To: '
or the
.RB ` Cc: '
line.
.TP
.BI \-t N
Change the interval between repeat replies to the same sender.
The default is 1 week.
A trailing
.BR s ,
.BR m ,
.BR h ,
.BR d ,
or
.B w
scales
.I N
to seconds, minutes, hours, days, or weeks respectively.
.SH USAGE
.LP
To start
.BR vacation ,
create a
.B \&.forward
file in your home directory containing a line of the form:
.IP
\fB\e\fIusername\fB, "|/usr/ucb/vacation \fIusername\fB"\fR
.LP
where
.I username
is your login name.
.LP
Then type in the command:
.IP
.B vacation \-I
.LP
To stop
.BR vacation ,
remove the
.B \&.forward
file, or move it to a new name.
.LP
If
.B vacation
is run with no arguments, it will permit you to interactively turn
.B vacation
on or off.  It will create a
.B \&.vacation.msg
file for you, or edit an existing one, using the editor specified by the
.SB VISUAL
or
.SB EDITOR
environment variable, or
.BR vi (1)
if neither of those environment variables are set.  If a
.B \&.forward
file is present in your home directory, it will ask whether you want
to remove it and turn off
.BR vacation .
If it is not present in your home directory, it creates
it for you, and automatically performs a
.RB ` "vacation \-I" '
function, turning on
.BR vacation .
.SH FILES
.PD 0
.TP 20
.B .forward
.\".TP
.\".B /usr/lib/vacation.def
.TP
.B $\s-1HOME\s0/.vacation.mesg
.PD
.LP
A list of senders is kept in the files
.B \&.vacation.pag
and
.B \&.vacation.dir
in your home directory.
.SH SEE ALSO
.BR vi (1),
.BR sendmail (8)
 you have something urgent, please contact Joe Jones (jones@f40).
	--John
.ft R
.fi
.RE
.LP
will include the subject of the message in the reply.
.LP
No message is sent if the
.RB ` To: '
or the
.RB ` Cc: '
line does not list the user to whom the original message was sent or
one of a number of aliases for them,
if the initial
.B From
line inc./share/man/man1/val.1                                                                                 755       0      12           64  4424740745   7517                                                                                                                                                                                                                                                                                                                                                                      .so man1/sccs-val.1
.\" @(#)val.1 1.3 89/03/26 SMI;
vfontinfo.1       vgrind.1 .1       vi.1 d.1        view.1 1ame\fB"\fR
.LP
where
.I username
is your login name.
.LP
Then type in the command:
.IP
.B vacation \-I
.LP
To stop
.BR vacation ,
remove the
.B \&.forward
file, or move it to a new name.
.LP
If
.B vacation
is run with no arguments, it will permit you to interactively turn
.B vacation
on or off.  It will create a
.B \&.vacation.msg
file for you, or edit an existing one, using the ed./share/man/man1/vax.1                                                                                 755       0      12           63  4424740745   7532                                                                                                                                                                                                                                                                                                                                                                      .so man1/machid.1
.\" @(#)vax.1 1.11 89/03/26 SMI;
  vgrind.1        vi.1 .1         view.1 1        view.1 1ame\fB"\fR
.LP
where
.I username
is your login name.
.LP
Then type in the command:
.IP
.B vacation \-I
.LP
To stop
.BR vacation ,
remove the
.B \&.forward
file, or move it to a new name.
.LP
If
.B vacation
is run with no arguments, it will permit you to interactively turn
.B vacation
on or off.  It will create a
.B \&.vacation.msg
file for you, or edit an existing one, using the ed./share/man/man1/vfontinfo.1                                                                           755       0      12         3017  4424740746  11007                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vfontinfo.1 1.24 89/03/26 SMI; from UCB 4.2
.TH VFONTINFO 1 "22 March 1989"
.UC 4
.SH NAME
vfontinfo \- inspect and print out information about fonts
.SH SYNOPSIS
.B /usr/lib/vfontinfo
[
.B \-mvz
]
.I fontname
[
.I characters
]
.IX  "vfontinfo command"  ""  "\fLvfontinfo\fP \(em examine font files"
.IX  "document production"  vfontinfo  ""  "\fLvfontinfo\fP \(em examine font files"
.SH AVAILABILITY
This command is available with the
.I Versatec Printer
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B vfontinfo
allows you to examine a font in the
.SM UNIX
system format.  It prints out
all the information in the font header and information about every
non-null (width > 0) glyph.
This can be used to make sure the font
is consistent with the format.
.LP
The
.I fontname
argument is the name of the font you wish to inspect.
It writes to the standard output.
If it cannot find the file in your working directory, it looks in
.B /usr/lib/vfont
(the place most of the fonts are kept).
.LP
The
.IR characters ,
if given, specify certain characters to show.
If omitted, the entire font is shown.
.SH OPTIONS
.TP
.B \-m
Display header.
.TP
.B \-v
Verbose.  Display bits of the glyph using commas, periods, and pipe
.RB (` | ')
symbols.
.TP
.B \-z
Zoom.  Display bits of the glyph as an array of M and
.SM SPACE
characters.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/vfont
.TP
.B /usr/lib/vpd
Versatec daemon
.PD
.SH "SEE ALSO"
.BR vswap (1),
.BR vwidth (1),
.BR vfont (5)
g
.BR \-\s-1REQUEST\s0@ ,
or if a
.RB ` "Precedence: bulk" '
or
.RB ` "Precedence: junk" '
line is included in the header.
.SH OPTIONS
.TP
.B \-I
Initialize the
.B \&.vacation.pag
and
.B \&.vacation.dir
files and start
.BR vacation .
.LP
If the
.B \-I
flag is not specified, and a
.I user
argument is given,
.B vacation
reads the first line from the standard input
(for a
.RB ` From: '
line, no colon).
If absent, it produces an error message.  The following options may be
specified:
.TP
.BI \-a ./share/man/man1/vgrind.1                                                                              755       0      12        14666  4424740746  10324                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)vgrind.1 1.24 89/03/26 SMI; from UCB 6.2 5/5/86
.\"
.TH VGRIND 1 "22 March 1989"
.SH NAME
vgrind \- grind nice program listings
.SH SYNOPSIS
.B vgrind
[
.B \-fntwWx 
]
[
.BI \-d "\ defs-file"
]
[
.BI \-h "\ header"
]
[
.BI \-l language
]
[
.BI \-s n
]
[
.BI \-o pagelist
]
[
.BI \-P printer
]
.br
.if t .ti +.5i
[
.BI \-T output-device
]
.IR filename .\|.\|.
.SH AVAILABILITY
.LP
This command is available for Sun-2, Sun-3 and Sun-4 systems with the
.I Text Processing Tools
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "code formatter" "\fLvgrind\fR \(em \fLtroff\fR preprocessor for listings"
.IX  "vgrind command"  ""  "\fLvgrind\fP \(em make formatted listings"
.IX  "programming languages"  vgrind  ""  "\fLvgrind\fP \(em make formatted listings"
.IX  "C programming language"  vgrind  ""  "\fLvgrind\fP \(em make formatted listings"
.IX  "pretty printer"  vgrind  ""  "\fLvgrind\fP \(em make formatted listings"
.LP
.B vgrind
formats the program sources named by the
.I filename
arguments in a nice style using
.BR troff (1).
Comments are placed in italics, keywords in bold face,
and as each function is encountered
its name is listed on the page margin.
.LP
.B vgrind
runs in two basic modes, filter mode or regular mode.  In filter mode
.B vgrind
acts as a filter in a manner similar to
.BR tbl (1).
The standard input is passed directly to the standard output except for
lines bracketed by the
.BR troff -like
macros:
.RS
.TP
.B \&.vS
starts processing
.TP
.B \&.vE
ends processing
.RE
.LP
These lines are formatted as described above.
The output from this filter can be passed to
.B troff
for output. 
There need be no particular ordering with
.BR eqn (1)
or
.BR tbl .
.LP
In regular mode
.B vgrind
accepts input
.IR filename s,
processes them, and passes them to
.B troff
for output.
If no
.I filename
is given, or if the
.RB ` \- '
argument is given,
.B vgrind
reads from the standard input (default if
.B \-f
is specified).
.LP
In both modes
.B vgrind
passes any lines beginning with a decimal point without conversion.
.SH OPTIONS
.LP
Note: the syntax of options with arguments is important. 
Some require a
.SM SPACE
between the option name and the argument,
while those that do not have a
.SM SPACE
below will not tolerate one.
.TP
.B \-f
Force filter mode.
.TP
.B \-n
Do not make keywords boldface.
.TP
.B \-x
Output the index file in a \(lqpretty\(rq format.  The index file itself
is produced whenever
.B vgrind
is run with a file called
.B index
present in the current directory.
The index of function definitions can then be run off by giving
.B vgrind
the
.B \-x
option and the file
.B index
as argument.
.TP
.B \-w
Consider
.SM TAB
characters
to be spaced four columns apart instead of the usual eight.
.TP
.BI \-d "\ defs-file"
Specify an alternate language definitions file (default is
.BR /usr/lib/vgrindefs ).
.TP
.BI \-h "\ header"
Specify a header to appear in the center of every output page.
.TP
.BI \-l language
Specify the language to use.
Among the languages currently known are:
Bourne shell
.RB ( \-lsh ),
C
.RB ( \-lc ,
the default), C shell
.RB ( \-lcsh ),
emacs
.SM ML\s0isp,
.RB ( \-lml ),
.SM FORTRAN
.RB ( \-lf),
Icon
.RB ( \-lI ),
.SM ISP
.RB ( \-i ),
.SM LDL
.RB ( \-l\s-1LDL\s0 ),
Model
.RB ( \-lm ),
Pascal
.RB ( \-lp ),
and
.SM RATFOR
.RB ( \-lr ).
.TP
.BI \-s n
Specify a point size to use on output (exactly
the same as the argument of a
.B troff
.B .ps
point size request).
.LP
.B vgrind
passes the following options to the formatter specified by the
.SB TROFF
environment variable, see
.SM ENVIRONMENT
below.
.TP
.B \-t
Similar to the same option in
.BR troff ;
that is, formatted text goes to the standard output.
.TP
.BI \-o pagelist
Print only those pages whose page numbers appear in the comma-separated
.I pagelist
of numbers and ranges. 
A range
.I N\-M
means pages
.I N
through
.IR M ;
an initial
.I \-N
means from the beginning to page
.IR N ;
and a final
.I N\-
means from
.I N
to the end.
.TP
.BI \-P printer
Send output to the named
.IR printer .
.TP
.BI \-T output-device
Format output for the specified
.IR output-device .
.TP
.B \-W
Force output to the (wide) Versatec printer
rather than the (narrow) Varian.
.BR vtroff (1)
only.
.br
.ne 5
.SH ENVIRONMENT
.LP
In regular mode
.B vgrind
feeds its intermediate output to the text formatter
given by the value of the
.SB TROFF
environment variable, or to
.B troff
if this variable is not defined in the environment.
This mechanism allows for local variations in
.BR troff 's
name.
.SH FILES
.PD 0
.TP 30
.B index
file where source for index is created
.TP
.B /usr/lib/vgrindefs
language descriptions
.TP
.B /usr/lib/vfontedpr
preprocessor
.ne 2
.TP
.B /usr/share/lib/tmac/tmac.vgrind
macro package
.PD
.SH "SEE ALSO"
.\".BR ctags (1),
.\".BR eqn (1),
.\".BR tbl (1),
.BR troff (1),
.BR vtroff (1),
.BR vgrindefs (5)
.SH BUGS
.LP
.B vgrind
assumes that a certain programming style is followed:
.TP 10
C
Function names can be preceded on a line only by
.SM SPACE\s0,
.SM TAB\s0,
or an asterisk.
The parenthesized arguments must also be on the same line.
.TP
.SM FORTRAN
Function names need to appear on the same line as the keywords
.I function
or
.IR subroutine .
.TP
.SM ML\s0isp
Function names should not appear on the same line
as the preceding
.IR defun .
.TP
Model
Function names need to appear on the same line as the keywords
.IR "is beginproc" .
.TP
Pascal
Function names need to appear on the same line as the keywords
.I function
or
.IR procedure .
.LP
If these conventions are not followed,
the indexing and marginal function
name comment mechanisms will fail.
.LP
More generally, arbitrary formatting styles
for programs mostly look bad.
The use of
.SM SPACE
characters to align source code
fails miserably; if you plan to
.B vgrind
your program you should use
.SM TAB
characters.
This is somewhat inevitable since the fonts
.B vgrind
uses are variable width.
.LP
The mechanism of
.BR ctags (1)
in recognizing functions should be used here.
.LP
The
.B \-w
option is a crock,
but there is no other way to achieve the desired effect.
.LP
The macros defined in
.B tmac.vgrind
do not coexist gracefully with those of other macro packages,
making filter mode difficult to use effectively.
.LP
.B vgrind
does not process certain special characters in
.BR csh (1)
scripts correctly.
al eight.
.TP
.BI \-d "\ defs-file"
Specify an alternate language definiti./share/man/man1/vi.1                                                                                  755       0      12         7345  4424740746   7425                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vi.1 1.22 89/03/26 SMI; from UCB 4.2
.TH VI 1 "22 March 1989"
.SH NAME
vi, view \- visual display editor based on ex(1)
.SH SYNOPSIS
.B vi
[
.B \-lrRx
]
[
.B \-t
.I tag
]
[
.BI \-w nnn
]
[
.BI + command
]
.IR filename .\|.\|.
.LP
.BR view .\|.\|.
.IX  "vi command"  ""  "\fLvi\fP \(em visual editor"
.IX  "screen-oriented editor"  ""  "screen-oriented editor \(em \fLvi\fP"
.IX  "display editor"  ""  "display editor \(em \fLvi\fP"
.IX  "visual editor"  ""  "visual editor \(em \fLvi\fP"
.IX  "text editing"  vi  ""  "\fLvi\fP \(em visual editor"
.SH DESCRIPTION
.LP
.B vi
(visual) is a display oriented text editor based on
.BR ex (1).
.B ex
and
.B vi
are, in fact, the same text editor; it is
possible to get to the command mode of
.B ex
from within
.B vi
and vice-versa.
.LP
The
.B view
command runs
.B vi
with the
.B readonly
variable set.  With
.BR view ,
you can browse through files interactively without making any changes.
.SH OPTIONS
.TP
.B \-l
Set up for editing
.SM LISP
programs.
.TP
.B \-r
Recover the named files after a crash.
.TP
.B \-R
Edit files in read only state.  This has the same effect as the
.B view
command.
.TP
.B \-x
Prompt for a key with which to encrypt the file or files being edited.
.TP
.BI \-t " tag"
Edit the file containing
.IR tag .
There must be a tags database in the directory, built by
.BR ctags (1),
that contains a reference to
.IR tag .
.TP
.BI + command
Start the editing session by executing
.IR command .
.SH ENVIRONMENT
.LP
The editor recognizes the environment variable
.SB EXINIT
as a command (or list of commands separated by
.B |
characters) to run when it starts up.  If this variable is
undefined, the editor checks for startup commands in the file
.B ~/.exrc
file, which you must own.  However, if there is a
.B \&.exrc
owned by you in the current directory, the editor takes its
startup commands from this file \(em overriding both the
file in your home directory and the environment variable.
.SH SEE ALSO
.BR ctags (1),
.BR ex (1)
.LP
.TX TEXT
.br
.TX GSBG
.SH BUGS
.LP
Software
.SM TAB
characters using
.SM CTRL-T
work only immediately after the
.BR autoindent .
.LP
.SM SHIFT\s0-left
and
.SM SHIFT\s0-right
on intelligent terminals do not make use of
insert and delete character operations in the terminal.
.LP
The
.B wrapmargin
option can be fooled since it looks at output columns when blanks are
typed.  If a long word passes through the margin and onto the next line
without a break, then the line will not be broken.
.LP
Repeating a change which wraps over the margin when
.B wrapmargin
is in effect does not generally work well:
sometimes it just makes a mess
of the change, and sometimes even leaves you in insert mode.  A
way to work around the problem is to replicate the changes using
.B y
(yank)
and
.B p
(put).
.LP
Insert/delete within a line can be slow if
.SM TAB
characters are present on intelligent
terminals, since the terminals need help in doing this correctly.
.LP
Saving text on deletes in the named buffers is somewhat inefficient.
.LP
The
.I source
command does not work when executed as
.RB ` :source ';
there is no way to use the
.RB ` :append ',
.RB ` :change ',
and
.RB ` :insert '
commands, since it is not possible to give
more than one line of input to a
.RB ` : '
escape.  To use these on a
.RB ` :global '
you must
.B Q
to
.I ex
command mode,
execute them, and then reenter the screen editor with
.B vi
or
.BR open .
.LP
When using the
.B \-r
option to recover a file, you must write the recovered
text before quitting or you will lose it.
.B vi
does not prevent you
from exiting without writing unless you make changes.
.LP
.B vi
does not adjust when the SunView window in which it runs is
resized.
.SH RESTRICTIONS
.LP
The encryption facilities of
.B vi
are not available on software
shipped outside the U.S.
o
.RB ` A ';
mail is usually sent at grade
.RB ` C '.
.TP
.BI \-s spool
Use
.I spool
as the spool directory instead of the default.
.TP
.BI \-x debug
Turn on the debugging at level
.IR debug .
.SS uulog Options
.TP
.BI \-s system
Print information about work involving system
.IR sys./share/man/man1/view.1                                                                                755       0      12           60  4424740746   7704                                                                                                                                                                                                                                                                                                                                                                      .so man1/vi.1
.\" @(#)view.1 1.12 89/03/26 SMI;
 VI 1 "22 March 1989"
.SH NAME
vi, view \- visual display editor based on ex(1)
.SH SYNOPSIS
.B vi
[
.B \-lrRx
]
[
.B \-t
.I tag
]
[
.BI \-w nnn
]
[
.BI + command
]
.IR filename .\|.\|.
.LP
.BR view .\|.\|.
.IX  "vi command"  ""  "\fLvi\fP \(em visual editor"
.IX  "screen-oriented editor"  ""  "screen-oriented editor \(em \fLvi\fP"
.IX  "display editor"  ""  "display editor \(em \fLvi\fP"
.IX  "visual editor"  ""  "visual editor \(em \fLvi\fP"
.IX  "text editi./share/man/man1/vplot.1                                                                               755       0      12         2247  4424740746  10147                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vplot.1 1.17 89/03/26 SMI; from UCB 4.2
.TH VPLOT 1 "21 December 1987"
.SH NAME
vplot \- plot graphics for a Versatec printer
.SH SYNOPSIS
.B vplot
[
.B \-VW
] [
.B \-b
.I lpr-argument
]
.I filename
.SH AVAILABILITY
This command is available with the
.I Versatec Printer 
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "vplot command"  ""  "\fLvplot\fP \(em plot on Versatec"
.IX  "plot on Versatec"  ""  "plot on Versatec \(em \fLvplot\fP"
.IX  graphics  vplot  ""  "\fLvplot\fP \(em plot on Versatec"
.IX  Versatec  ""  "plot graphics on \(em \fLvplot\fP"
.LP
.B vplot
reads
.BR plot (5)
format graphics input from the file specified by
.I filename
(the standard input if no
.I filename
is specified) and produces a plot on the Varian or Versatec
printer.
.SH OPTIONS
.TP
.B \-V
Force output to the standard Versatec printer.
.TP
.B \-W
Force output to the (wide) Versatec printer rather than the standard
Versatec printer.
.TP
.BI \-b " lpr-argument"
.I argument
(the next argument on the command line)
specifies
extra arguments to
.BR lpr (1).
.SH "SEE ALSO"
.BR lpr (1),
.BR plot (1G),
.BR plot (5)
 [
.B \-b
.I lpr-argument
]
.I filename
.SH AVAILABILITY
This command is available with the
.I Versatec Printer 
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "vplot command"  ""  "\fLvplot\fP \(em plot on Versatec"
.IX  "plot on Versatec"  ""  "plot on Versatec \(./share/man/man1/vswap.1                                                                               755       0      12         3715  4424740747  10145                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vswap.1 1.19 89/03/26 SMI; from UCB 4.2
.TH VSWAP 1 "10 January 1988"
.SH NAME
vswap \- convert a foreign font file
.SH SYNOPSIS
.B /usr/lib/vswap
[
.B \-r
]
.SH AVAILABILITY
This command is available with the
.I Versatec Printer
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "vswap command"  ""  "\fLvswap\fP \(em convert foreign font files"
.IX  "convert foreign font files"  ""  "convert foreign font files \(em \fLvswap\fP"
.IX  "font" "files, convert foreign \(em \fLvswap\fP"
.LP
Without the
.B -r
option,
.B vswap
translates its standard input (which must be a
.BR vfont (5)
file in the reversed-byte order) into a locally correct
.I vfont
file on its standard output.  With the
.B -r
option,
.B vswap
translates its standard input (which must be a
.B vfont
file in the local-byte order) into a byte-reversed
.B vfont
file on its
standard output.
.LP
The
.SM UNIX
system 
.B vfont
representation for fonts is a binary file
containing machine-dependent elements \(em short (16-bit)
integers, in particular.
There are (at least) two common ways of representing a 16-bit integer.
A program compiled
on a
.SM VAX
will expect the
.SM VAX
format, while the same program compiled
on a machine using a Motorola 68000-family processor or a SPARC processor
will expect the reverse format.
.B vswap
can be used to convert font files created on a
.SM VAX
to the format
required to use them on Suns.  (All Suns use the same
.B vfont
format, regardless of the native byte order of the processor, including
Suns that use the Intel 80386 processor.  Programs that will be run on Suns
that use the Intel 80386 processor must be aware of this, and convert the
machine-dependent elements when they read or write
.B vfont
files.)
It can also convert Sun-format font files to
.SM VAX
format (with the
.B \-r
option).
.SH "SEE ALSO"
.BR troff (1),
.BR vfont (5)
.SH BUGS
A machine-independent font format should be defined.

.LP
.TX TEXT
.br
.TX GSBG
.SH BUGS
.LP
Software
.S./share/man/man1/vtroff.1                                                                              755       0      12         5172  4424740747  10312                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vtroff.1 1.22 89/03/26 SMI; from UCB 4.2
.TH VTROFF 1 "21 December 1987"
.UC 4
.SH NAME
vtroff \- troff to a raster plotter
.SH SYNOPSIS
.B vtroff
[
.B \-wx
]
[
.B \-F
.I majorfont
]
[
.BI \-l length
]
[
.B \-123
.I minorfont
]
.I troff-arguments
.SH AVAILABILITY
.LP
This command is available with the
.I Versatec Printer 
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "vtroff command"  ""  "\fLvtroff\fP \(em format document for raster printer"
.IX  "format document for raster printer"  ""  "format document for raster printer \(em \fLvtroff\fP"
.IX  "document production"  vtroff  ""  "\fLvtroff\fP \(em format document for raster printer"
.LP
.B vtroff
runs
.BR troff (1)
sending its output through various programs
to produce typeset output on a raster plotter
such as a Benson-Varian or or a Versatec.
.SH OPTIONS
.TP
.B \-w
Specify that a wide output device be used; the default
is to use a narrow device.
.TP
.B \-x
Simulate photo-typesetter output exactly.
As with,  using the width tables for the C.A.T. photo-typesetter.
.TP
.BI \-F " fontname"
Specify
.I fontname
as the desired font.
This will place normal, italic and
bold versions of the font on positions 1, 2, and 3.
The default font is a Hershey font. 
argument and then the font name.
.TP
.BI \-l length
Split the output
onto successive pages every
.I length
inches rather than the default 11 inches.
.TP
.BI \-123 " minorfont"
Place a font only on a single position specified by
.BI \- n
(where
.I n
is
.BR 1 ,
.BR 2,
or
.BR 3 )
and the minor font name.  A
.B \&.r
will be added to the minor font name if needed. 
Thus
.RS
.RS
.B vtroff\ \-ms\ paper
.RE
.RE
.IP
will set a paper in the Hershey font, while
.RS
.RS
.B vtroff\ \-F\ nonie\ \-ms\ paper
.RE
.RE
.IP
will set the paper in the (sans serif) nonie font.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/tmac/tmac.vcat
default font mounts and bug fixes
.TP
.B /usr/lib/fontinfo/*
fixes for other fonts
.TP
.B /usr/lib/vfont
directory containing fonts
.PD
.SH SEE ALSO
.BR troff (1),
.BR vfont (5)
.SH BUGS
.LP
Since some macro packages work correctly only if the fonts
named R, I, B, and S are mounted, and since the Versatec fonts
have different widths for individual characters than the fonts
found on the typesetter, the following dodge was necessary:
If you do not use the
.B \&.fp
.B troff
directive
then you get the widths of the standard typesetter fonts
suitable for shipping the output of
troff over the network to the computer
center A machine for phototypesetting.
If, however, you remount the R, I, B and S fonts, then you get
the width tables for the Versatec.
 insert mode.  A
way to work around the problem is to replicate the changes using
.B y
(yank)
and
.B p
(put).
.LP
Insert/delete within a line can be slow if
.SM TAB
characters are present on intelligent
terminals, since the terminals need help in doing this correctly.
.LP
Saving text on deletes in the named buffers is somewhat inefficient.
.LP
The
.I source
command does not work when exe./share/man/man1/vwidth.1                                                                              755       0      12         4150  4424740747  10304                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vwidth.1 1.27 89/03/26 SMI; from UCB 4.2
.TH VWIDTH 1 "21 December 1987"
.UC
.SH NAME
vwidth \- make a troff width table for a font
.SH SYNOPSIS
.B /usr/lib/vwidth
\fIfontfile pointsize\fB >
ft\fIxx\fP.c\fR
.LP
.B cc -c ft\fIxx\fP.c
.LP
.B mv ft\fIxx\fP.o /usr/lib/font/ft\fIxx\fP
.SH AVAILABILITY
This command is available with the
.I Versatec Printer
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "vwidth command"  ""  "\fLvwidth\fP \(em make font width table"
.IX  "create" "font width table \(em \fLvwidth\fP"
.IX  "document production"  vwidth  ""  "\fLvwidth\fP \(em make font width table"
.IX  font  vwidth  ""  "\fLvwidth\fP \(em make font width table"
.LP
.B vwidth
translates from the width information stored in the
.B vfont
style format to the format expected by
.BR troff (1)
\(em an object file in
.BR a.out (5)
format.
.B troff
should look directly in the font file but it doesn't.
.LP
.B vwidth
should be used after editing a font with
.BR fontedit (1).
It is not necessary to use 
.B vwidth
unless you have made a change
that would affect the width tables.
Such changes include numerically editing the width field,
adding a new character,
and moving or copying a character to a new position.
It is
.I not
always necessary to use
.B vwidth
if the physical width of the glyph
(for instance the number of columns in the
bit matrix) has changed, but if it has changed much
the logical width should probably be changed and
.B vwidth
run.
.LP
.B vwidth
produces a
.B C
program on its standard output.
This program should be run through the
.B C
compiler and the object (that is, the
.B .o
file) saved.
The resulting file should be placed in
.B /usr/lib/font
in the file
.RI ft xx
where
.I xx
is a one or two letter code that is the logical (internal to
.BR troff )
font name.  This name can be found by looking in the file
.BI /usr/lib/fontinfo/ fname *
where
.I fname
is the external name of the font.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/font
.TP
.B a.out
.PD
.SH "SEE ALSO"
.BR troff (1),
.BR vtroff (1),
.BR fontedit (1),
.BR a.out (5),
.BR vfont (5)
rectly only if the fonts
named R, I, B, and S are mounted, and since the Versatec fonts
have different widths for individual characters than the fonts
found on the typesetter, the following dodge was necessary:
If you do not use the
.B \&.fp
.B troff
directive
then you get the widths of the standard typesetter fonts
suitable for shipping the output of
troff over the network to the computer
center A machin./share/man/man1/wait.1                                                                                755       0      12         1372  4424740747   7746                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)wait.1 1.10 89/03/26 SMI; from UCB 4.1
.TH WAIT 1  "9 September 1987"
.SH NAME
wait \- wait for a process to finish
.SH SYNOPSIS
.B wait
.IX  "wait command"  ""  "\fLwait\fP \(em wait process completion"
.IX  process  wait  ""  "\fLwait\fP \(em wait process completion"
.SH DESCRIPTION
Wait until all processes started with
.B &
or
.B bg
have completed,
and report on abnormal terminations.
.LP
Because the
.BR wait (2)
system call must be executed in the parent process,
the shell itself executes
.BR wait ,
without creating a new process.
.SH "SEE ALSO"
.BR csh (1),
.BR sh (1),
.BR wait (2)
.SH BUGS
Not all the processes of a 3- or more-stage
pipeline are children of the shell, and thus cannot be waited for.
This bug does not apply to
.BR csh (1).

translates from the width information stored in the
.B vfont
style format to the format expected by
.BR troff (1)
\(em an object file in
.BR a.out (5)
format.
.B troff
should look directly in the font file but it doesn't.
.LP
.B vwidth
should be used after edit./share/man/man1/wall.1                                                                                755       0      12         2031  4424740750   7724                                                                                                                                                                                                                                                                                                                                                                      .TH WALL 1 "9 September 1987"
.\" @(#)wall.1 1.14 89/03/26 SMI; from UCB 5.3
.SH NAME
wall \- write to all users logged in
.SH SYNOPSIS
.B wall
[
.B \-a
]
.RI [ " filename " ]
.IX  "wall command"  ""  "\fLwall\fP \(em write to all users"
.IX  "write to all users"  ""  "write to all users \(em \fLwall\fP"
.IX  users  "write to all"  ""  "write to all \(em \fLwall\fP"
.SH DESCRIPTION
.B wall
reads the standard input until an
.SM EOF\s0.
It then sends this message, preceded by
.RB ` "Broadcast Message .\|.\|." ',
to all logged in users.  If
.I filename
is given, then the message is read in from that file.
Normally, pseudo-terminals that do not correspond to
rlogin sessions are ignored.
Thus when in
.BR sunview (1),
the message appears only on the console window.  However,
.B \-a
will send the message even to such
pseudo-terminals.
.LP
The sender should be super-user to override
any protections the users may have invoked.
.SH FILES
.PD 0
.TP 20
.B /dev/tty?
.TP
.B /etc/utmp
.PD
.SH "SEE ALSO"
.BR mesg (1),
.BR sunview (1),
.BR write (1)
dit (1).
It is not necessary to use 
.B vwidth
unless you have made a change
that would affect the width tables.
Such changes include numerically editing the width field,
adding a new character,
and moving or copying a character to a new position.
It is
.I not
always necessary to use
.B vwidth
if the physical width of the glyph
(for instance the number of columns in the
bit matrix) has changed, but if it has changed much
the logical width should probably be changed and
.B vwidth
run./share/man/man1/wc.1                                                                                  755       0      12         2665  4424740750   7413                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)wc.1 1.14 89/03/26 SMI; from S5R2 6.2 83/09/02
.TH WC 1  "9 September 1987"
.SH NAME
wc \- display a count of lines, words and characters
.SH SYNOPSIS
.B wc
[
.B \-lwc
] [
.I filename
\&.\|.\|.
]
.IX  "wc command"  ""  "\fLwc\fP \(em count lines, words, characters in file"
.IX  "count lines, words, characters in file"  ""  "count lines, words, characters in file \(em \fLwc\fP"
.IX  lines "count \(em \fLwc\fP"
.IX  "words in file, count \(em \fLwc\fP"
.IX  "characters in file, count \(em \fLwc\fP"
.IX  file  "count lines, words, characters in"  ""  "count lines, words, characters in \(em \fLwc\fP"
.SH DESCRIPTION
.B wc
counts lines, words, and characters in
.IR filename s,
or in the standard input if no
.I filename
appears.  It also keeps a total count for all named files.
A word is a string of characters delimited by
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE\s0
characters.
.SH OPTIONS
.LP
When
.IR filename s
are specified on the command line,
their names will be printed along with the counts.
.LP
The default is
.B \-lwc
(count lines, words, and characters).
.TP
.B l
Count lines.
.TP
.B w
Count words.
.TP
.B c
Count characters.
.SH EXAMPLE
.RS
.nf
.ft B
example%
wc /usr/share/man/man1/{csh.1,sh.1,telnet.1}
.if t .ta +8nR +8nR +8nR +2n
.if n .ta 8R 16R 24R 26
	1876	11223	65895	/usr/share/man/man1/csh.1
	674	3310	20338	/usr/share/man/man1/sh.1
	260	1110	6834	/usr/share/man/man1/telnet.1
	2810	15643	93067	total
example%
.fi
.ft R
.RE
changed much
the logical width should probably be changed and
.B vwidth
run./share/man/man1/what.1                                                                                755       0      12         3103  4424740750   7731                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)what.1 1.21 89/03/26 SMI; from UCB 4.2
.TH WHAT 1 "24 September 1987"
.SH NAME
what \- identify the version of files under SCCS
.SH SYNOPSIS
.B what
.I filename
.IX  "what command"  ""  "\fLwhat\fP \(em identify file version"
.IX  "identify file version"  ""  "identify file version \(em \fLwhat\fP"
.IX  file  "identify version"  ""  "identify version \(em \fLwhat\fP"
.IX  "version of file \(em \fLwhat\fP"
.SH DESCRIPTION
.LP
.B what
searches the given
.IR filename s
for all occurrences of the pattern that
.BR get (1)
substitutes for
.B %\&Z%
(this is
.BR @ ( # )
at this printing)
and prints out what follows until the first
.BR ~ ,
.BR > ,
.SM NEWLINE\s0,
.BR \e ,
or
.SM NULL
character.  For example, if the C program in file
.B program.c
contains
.IP
.ft B
char ident[\|] = "\|@(#)identification information\|";
.ft R
.LP
and
.B program.c
is compiled to yield
.B program.o
and
.BR a.out ,
the command
.RS
.ft B
what f.c f.o a.out
.ft R
.RE
.LP
will print
.RS
.TP
.BR f.c :
identification information
.TP
.BR f.o :
identification information
.TP
.BR a.out :
identification information
.RE
.LP
.B what
is intended to be used in conjunction with the \*(S) command
.BR get (1),
which automatically inserts identifying information,
but it can also be used where the information is inserted manually.
.SH SEE ALSO
.BR file (1),
.BR get (1),
.BR help (1),
.BR sccs (1)
.LP
.TX PUL
.SH DIAGNOSTICS
.LP
Use
.BR help (1)
for explanations.
.SH BUGS
.LP
It is possible that an unintended occurrence of the pattern
.B @(#)
could be found just by chance, but this
causes no harm in nearly all cases.
s program should be run through the
.B C
compiler and the object (that is, the
.B .o
file) saved.
The resulting file should be placed in
.B /usr/lib/font
in the file
.RI ft xx
where
.I xx
is a one or two letter code that is the logical (internal to
.BR troff )
font name.  This name can be found by looking in the file
.BI /usr/lib/fontinfo/ fname *
where
.I fname
is the external name of the font.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/font
.TP
.B./share/man/man1/whatis.1                                                                              755       0      12         2057  4424740750  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)whatis.1 1.13 89/03/26 SMI; from UCB 4.2
.TH WHATIS 1 "9 September 1987"
.SH NAME
whatis \- display a one-line summary about a keyword
.SH SYNOPSIS
.B whatis
.IR command .\|.\|.
.IX  "whatis command"  ""  "\fLwhatis\fP \(em describe command"
.IX  "describe command"  ""  "describe command \(em \fLwhatis\fP"
.IX  command  describe  ""  "describe \(em \fLwhatis\fP"
.IX  "manual pages"  "describe command"  ""  "describe command \(em \fLwhatis\fP"
.SH DESCRIPTION
.LP
.B whatis
looks up a given
.I command
and displays the header line
from the manual section.  You can then run the
.BR man (1)
command to get more information.  If the line starts
.RB ` "name(\fIsection\fP)\ " .\|.\|.'
you can do
.RB ` "man\ \ \fIsection\fP\ \ name" '
to get the documentation for it.  Try
.RB ` "whatis\ \ ed" '
and then you should do
.RB ` "man\ \ 1\ \ ed" '
to get the manual page for
.BR ed (1).
.LP
.B whatis
is actually just the
.B \-f
option to the
.BR man (1)
command.
.SH FILES
.PD 0
.TP 20
.B /usr/share/man/whatis
data base
.PD
.SH SEE ALSO
.BR man (1),
.BR catman (8)
 :
identification information
.RE
.LP
.B what
is intended to be used in conjunction with the \*(S) command
.BR get (1),
which automatically inserts identifying information,
but it can also be used where the information is inserted manually.
.SH SEE ALSO
.BR file (1),
.BR get (1),
.BR help (1),
.BR sccs (1)
.LP
.TX PUL
.SH DIAGNOSTICS
.LP
Use
.BR help (1)
for explanations.
.SH BUGS
.LP
It is possible that an unintended occurrence of the pattern
.B @(#)
could be ./share/man/man1/whereis.1                                                                             755       0      12         4544  4424740750  10446                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)whereis.1 1.18 89/03/26 SMI; from UCB 4.2
.TH WHEREIS 1 "9 September 1987"
.SH NAME
whereis \- locate the binary, source, and manual page files for a command
.SH SYNOPSIS
.B whereis
[
.B \-bmsu
] [
.B \-BMS
.IR directory .\|.\|.
.B \-f
]
\fIfilename\fP\|
\&.\|.\|.
.IX  "whereis command"  ""  "\fLwhereis\fP \(em find program"
.IX  find "program \(em \fLwhereis\fP"
.IX  "locate program"  ""   "locate program \(em \fLwhereis\fP"
.IX  command  locate  ""   "locate \(em \fLwhereis\fP"
.SH DESCRIPTION
.B whereis
locates source/binary and manuals sections for specified
files.
The supplied names are first stripped of leading pathname components
and any (single) trailing extension of the form
.BI . ext,
for example,
.BR .c .
Prefixes of
.B s.
resulting from use of source code control are also dealt with.
.B whereis
then attempts to locate the desired program in
a list of standard places:
.IP
.nf
.ft B
/usr/bin
/usr/bin
/usr/5bin
/usr/games
/usr/hosts
/usr/include
/usr/local
/usr/etc
/usr/lib
/usr/share/man
/usr/src
/usr/ucb
.ft R
.fi
.SH OPTIONS
.TP
\fB\-b
Search only for binaries.
.TP
.B \-m
Search only for manual sections.
.TP
.B \-s
Search only for sources.
.TP
.B \-u
Search for unusual entries.  A file is said to be unusual if it does
not have one entry of each requested type.
Thus
.RB ` "whereis\ \ \-m\ \ \-u\ \ *" '
asks for those files in the current
directory which have no documentation.
.TP
.B \-B
Change or otherwise limit the places where
.B whereis
searches for binaries.
.TP
.B \-M
Change or otherwise limit the places where
.B whereis
searches for
manual sections.
.TP
.B \-S
Change or otherwise limit the places where
.B whereis
searches for sources.
.TP
.B \-f
Terminate the last directory list and signals the start of file names,
and
.I must
be used when any of the
.BR \-B ,
.BR \-M ,
or
.B \-S
options are used.
.SH EXAMPLE
Find all files in
.B /usr/bin
which are not documented
in
.B /usr/share/man/man1
with source in
.BR /usr/src/cmd :
.IP
.nf
.ft B
example% cd /usr/ucb
example% whereis \-u \-M /usr/share/man/man1 \-S /usr/src/cmd \-f *
.fi
.ft R
.SH FILES
.PD 0
.TP 20
.B /usr/src/*
.TP
.B /usr/{doc,man}/*
.TP
.B /etc, /usr/{lib,bin,ucb,old,new,local}
.PD
.SH SEE ALSO
.BR chdir (2)
.SH BUGS
Since
.B whereis
uses
.BR chdir (2)
to run faster, pathnames given with the
.BR \-M ,
.BR \-S ,
or
.B \-B
must be full; that is, they must begin with a
.RB ` / '.
irective
then you get the widths of the standard typesetter fonts
suitable for shipping the output of
troff over the network to the computer
center A machin./share/man/man1/which.1                                                                               755       0      12         2345  4424740751  10100                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)which.1 1.12 89/03/26 SMI; from UCB 4.2
.TH WHICH 1 "9 September 1987"
.SH NAME
which \- locate a command; display its pathname or alias
.SH SYNOPSIS
.B which
[
.I filename
] .\|.\|.
.IX  "which command"  ""  "\fLwhich\fP \(em find program file"
.SH DESCRIPTION
.B which
takes a list of names and looks for the files which would be
executed had these names been given as commands.
Each argument is expanded if it is aliased,
and searched for along the user's path.
Both aliases and path are taken from the user's
.B \&.cshrc
file.
.SH FILES
.PD 0
.TP 20
.B ~/\&.cshrc
source of aliases and path values
.PD
.SH SEE ALSO
.BR csh (1)
.SH DIAGNOSTICS
A diagnostic is given for names which
are aliased to more than a single word,
or if an executable file with the
argument name was not found in the path.
.SH BUGS
Only aliases and paths from
.B ~/\&.cshrc
are used; importing from the current
environment is not attempted.
Must be executed by
.BR csh (1),
since only
.B csh
knows about aliases.
.LP
To compensate for
.B ~/.cshrc
files in which aliases depend upon the
.B prompt
variable being set,
.B which
sets this variable.  If the
.B ~/.cshrc
produces output or prompts for input when
.B prompt
is set,
.B which
may produce some strange results.
does
not have one entry of each requested type.
Thus
.RB ` "whereis\ \ \-m\ \ \-u\ \ *" '
asks for those files in the current
directory which have no documentation.
.TP
.B \-B
Change or otherwise limit the places where
.B whereis
searches for binaries.
.TP
.B \-M
Change or otherwise./share/man/man1/while.1                                                                               755       0      12           73  4424740751  10042                                                                                                                                                                                                                                                                                                                                                                      .so man1/csh_builtins.1
.\" @(#)while.1 1.8 89/03/26 SMI; 
1     !    whois.1   !    write.1   !$    xargs.1   !4    xget.1    !D    xsend.1   !T    xstr.1    !d  d  yacc.1 n  !t  e  yes.1  r  !  f  ypcat.1   !  g  	ypmatch.1 !  !  h  
yppasswd.1   !  i  	ypwhich.1 !  "   j  zcat.1  be
executed had these names been given as commands.
Each argument is expanded if it is aliased,
and searched for along the user's path.
Both aliases and path are taken from th./share/man/man1/who.1                                                                                 755       0      12         3312  4424740752   7567                                                                                                                                                                                                                                                                                                                                                                      .TH WHO 1  "23 September 1987"
.\" @(#)who.1 1.20 89/03/26 SMI;
.SH NAME
who \- who is logged in on the system
.SH SYNOPSIS
.B who
[
.B who-file
] [
.B am i
]
.IX  "who command"  ""  "\fLwho\fP \(em who is logged in"
.IX  users  who  ""  "\fLwho\fP \(em who is logged in"
.IX  login  who  ""  "\fLwho\fP \(em who is logged in"
.SH DESCRIPTION
Used without arguments,
.B who
lists the login name, terminal name, and
login time for each current user.
.B who
gets this information
from the
.B /etc/utmp
file.
.LP
If a filename argument is given, the named
file is examined instead of
.BR /etc/utmp .
Typically the named file is
.BR /var/adm/wtmp ,
which contains a record of all logins
since it was created.  In this case,
.B who
lists logins, logouts, and crashes.  Each login is listed
with user name, terminal name (with
.B /dev/
suppressed), and date and time.
Logouts produce a similar line without a user name.
Reboots produce a line
with
.RB ` \s+2~\s0 '
in place of the device name, and a fossil time indicating when the
system went down.  Finally, the adjacent pair of entries
.RB ` |'
and
.RB ` } '
indicate the system-maintained time just before and after a
.B date
command changed the system's idea of the time.
.LP
With two arguments, as in
.RB ` "who am i" '
(and also
.RB ` "who is who" '),
.B who
tells who you are logged in as:  it displays your
hostname,
login name, terminal name, and login time.
.SH EXAMPLES
.LP
.RS
.nf
.ft B
example% who am i
example!ralph	ttyp0	Apr 27 11:24
example%
.sp
example% who
mktg	  ttym0	Apr 27 11:11
joe	  ttyp0	Apr 27 11:25
ralph	  ttyp1	Apr 27 11:30
example%
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.TP
.B /var/adm/wtmp
.PD
.SH "SEE ALSO"
.BR w (1),
.BR whoami (1),
.BR utmp (5)
ignals the start of file names,
and
.I must
be used when any of the
.BR \-B ,
.BR \-M ,
or
.B \-S
options are used.
.SH EXAMPLE
Find all files in
.B /usr/bin
which are not documented
in
.B /usr/share/man/man1
with source in
.BR /usr/src/cmd :
.IP
.nf
.ft B
example% cd /usr/ucb
example% whereis \-u \-M /usr/sh./share/man/man1/whoami.1                                                                              755       0      12         2024  4424740752  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)whoami.1 1.15 89/03/26 SMI;
.TH WHOAMI 1 "25 March 1989"
.SH NAME
whoami \- display the effective current username
.SH SYNOPSIS
.B whoami
.IX  "whoami command"  ""  "\fLwhoami\fP \(em display effective user name"
.IX  display "effective user name \(em \fLwhoami\fP"
.IX  user  "display effective name"  ""   "display effective name \(em \fLwhoami\fP"
.IX  login  "display effective user name"  ""   "display effective user name \(em \fLwhoami\fP"
.SH DESCRIPTION
.B whoami
displays the login name corresponding to the current
effective uer
.SM ID\s0.
If you have used
.BR su (1)
to temporarily adopt another user,
.B whoami
will report the login name associated with
that user
.SM ID\s0.
.B whoami
gets its information from the
.B geteuid()
and
.B getpwuid()
library routines (see
.BR getuid (2)
and
.BR getpwent (3),
respectively).
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
username data base
.TP
.B /etc/utmp
database of users currently logged in
.PD
.SH "SEE ALSO"
.BR su (1),
.BR who (1),
.BR getuid (2),
.BR getpwent (3),
.BR utmp (5)
 Finally, the adjacent pair of entries
.RB ` |'
and
.RB ` } '
indicate the system-maintained time just before and after a
.B date
command changed the system's idea of the time.
.LP
With two arguments, as in
.RB ` "who am i" '
(and also
.RB ` "who is who" '),
.B who
tells who you are logged in as:  it displays your
hostname,
login name, terminal name, and login time.
.SH EXAMPLES
.LP
.RS
.nf
.ft B
example% who am i
example!ralph	ttyp0	Apr 27 11:24
example%
.sp
example% who
mktg	  ttym0	Ap./share/man/man1/whois.1                                                                               755       0      12         3007  4424740753  10125                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)whois.1 1.14 89/03/26 SMI; from UCB 4.2
.TH WHOIS 1 "22 March 1989"
.SH NAME
whois \- DARPA Internet user name directory service
.SH SYNOPSIS
.B whois
[
.B \-h
.I host
]
.I identifier
.IX  "whois command"  ""  "\fLwhois\fP \(em Internet directory service"
.IX  Internet "directory service \(em \fLwhois\fP"
.IX  DARPA "Internet directory service \(em \fLwhois\fP"
.SH DESCRIPTION
.B whois
searches for an
.SM ARPANET
directory entry for an
.I identifier
which is either a name
(such as \(lqSmith\(rq) or a handle (such as \(lq\s-1SRI-NIC\s0\(rq).
You can force a name-only search by preceding the name with a period;
you can force a handle-only search by preceding the handle with an
exclamation point. See
.SM EXAMPLES\s0.
.LP
If you are searching for a group or
organization entry, you can have the
entire membership list of the group displayed with the record by
preceding the argument with
.RB ` * '
( an asterisk).
.LP
You may of course use an exclamation point and asterisk, or a period
and asterisk together.
.SH EXAMPLES
.IP
.B example% whois Smith
.LP
looks for name or handle
.BR \s-1SMITH\s0 .
.IP
.B example% whois \e!\s-1SRI-NIC\s0
.LP
looks for handle
.SM SRI-NIC
only.
.TP
.IP
.B example% whois '.Smith, John'
.LP
looks for name
``John Smith''
only.
.LP
Adding
.RB ` .\|.\|. '
to the name or handle argument will match anything from
that point; that is,
`\fB\s-1ZU\s0\fP.\|.\|.'
will match
\fB\s-1ZUL\s0\fP,
\fB\s-1ZUM\s0\fP,
etc.
.\".SH FILES
.\"/usr/doc/local/netinfo/rfc812
.\".SH SEE ALSO
.\"RFC 812:  NICNAME/WHOIS
:11
joe	  ttyp0	Apr 27 11:25
ralph	  ttyp1	Apr 27 11:30
example%
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.TP
.B /var/adm/wtmp
.PD
.SH "SEE ALSO"
.BR w (1),
.BR whoami (1),
.BR utmp (5)
ignals the start of file names,
and
.I must
be used when any of the
.BR \-B ,
.BR \-M ,
or
.B \-S
options are used.
.SH EXAMPLE
Find all files in
.B /usr/bin
which are not documented
in
.B /usr/share/man/man1
with source in
.BR /usr/src/cmd :
.IP
.nf
.ft B
example% cd /usr/ucb
example% whereis \-u \-M /usr/sh./share/man/man1/write.1                                                                               755       0      12         7017  4424740753  10133                                                                                                                                                                                                                                                                                                                                                                      .TH WRITE 1  "9 September 1987"
.\" @(#)write.1 1.15 89/03/26 SMI; from UCB 4.2
.SH NAME
write \- write a message to another user
.SH SYNOPSIS
.B write
.I username
[
.I ttyname
]
.IX  "write command"  ""  "\fLwrite\fP \(em write to another user"
.IX  user  "write to another"  ""  "write to another \(em \fLwrite\fP"
.IX  communications  write  ""  "\fLwrite\fP \(em write to another user"
.SH DESCRIPTION
.LP
.B write
copies lines from your standard input to
.IR user 's
screen.
.LP
When you type a
.B write
command, the person you are writing to sees
a message like this:
.IP
.BI "Message from " hostname ! yourname " on " yourttyname " at hh:mm .\|.\|."
.LP
After typing the
.B write
command, enter the text of your
message.  What you type appears line-by-line on the other user's
screen.  Conclude by typing an
.SM EOF
indication (\s-1CTRL-D\s0)
or an interrupt.  At this point
.B write
displays
.SM EOT
on your recipient's
screen and exits.
.LP
To write to a user who is logged in more than once, use the
.I ttyname
argument to indicate the appropriate terminal name.
.LP
You can grant or deny other users permission
to write to you by using the
.B mesg
command (default allows writing).  Certain commands,
.BR nroff (1)
and
.BR pr (1V)
in particular, do not allow anyone to write to you while you are using
them in order to prevent messy output.
.LP
If
.B write
finds the character
.RB ` ! '
at the beginning of a line, it
calls the shell to execute the rest of the line as a command.
.LP
Two people can carry on a conversation by
\(l1writing\(rq to each other.
When the other person receives the message
indicating you are writing to him, he can then
.B write
back to you if he wishes.
However, since you are now simultaneously typing and receiving
messages, you end up with garbage on your screen unless you work out
some sort of scheduling scheme with your partner.  You might try the
following conventional protocol:
when you first write to another user, wait
for him to write back before starting to send.
Each person should end each message with a distinctive signal \(em
.B -o-
(for \(l1over\(rq) is standard \(em so that the other
knows when to begin a reply.
To end your conversation, type
.B -oo-
(for \(l1over and out\(rq) before
finishing the conversation.
.SH EXAMPLE
.LP
Here is an example of a short dialog between two people on different
terminals.  Two users called \(l1Horace\(rq and
\(l1Eudora\(rq are logged in on a system
called \(l1jones\(rq.  To illustrate
the process, both users' screens are shown side-by-side:
.nf
.ta 10n +\w'\fBHow about the beach on Sunday? -o-'u+6n
Eudora's Terminal	Horace's Terminal
.ta \w'\fBThen how about the beach on Sunday? -o-'u+2n
	\fIHorace is staring at his screen\fP
.ft B
jones% write  horace
how about a squash game tonight? -o-
	Message from jones!eudora on tty09 at 17:05 ...
	how about a squash game tonight? -o-
	jones% write  eudora
	I'm playing tiddlywinks with Carmeline -o-
Message from jones!horace on tty03 at 17:06 ...
I'm playing tiddlywinks with Carmeline -o-
How about the beach on Sunday? -o-
	How about the beach on Sunday? -o-
	Sorry, I'm washing my tent that day -o-
Sorry, I'm washing my tent that day -o-
See you when I get back from Peru -oo-
	See you when I get back from Peru -oo-
^D
jones%	\s-1EOF\s0
.ft B
	I hear rack of llama is very tasty -oo-
	^D
I hear rack of llama is very tasty -oo-
\s-1EOF\s0	\fBjones%
.ft R
.fi
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
to find user
.TP
.B /usr/bin/sh
to execute
.B !
.PD
.SH "SEE ALSO"
.BR mail (1),
.BR mesg (1),
.BR pr (1V),
.BR talk (1),
.BR troff (1),
.BR who (1)
nless you make changes.
.LP
.B vi
does not adjust when the SunView window in which it runs is
resized.
.SH RESTRICTIONS
.LP
The encryption facilities of
.B vi
are not available on software
shipped outside the U.S.
o
.RB ` A ';
mail is usually sent at grade
.RB ` C '.
.TP
.BI \-s spool
Use
.I spool
as the spool directory instead of the default.
.TP
.BI \-x debug
Turn on the debugging at level
.IR debug .
.SS uulog Options
.TP
.BI \-s system
Print information about work involving system
.IR sys./share/man/man1/xargs.1                                                                               755       0      12        14407  4424740753  10146                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xargs.1 1.11 89/03/26 SMI; from S5R2 6.2 9/2/83
.TH XARGS 1 "22 March 1989"
.SH NAME
xargs \- construct the arguments list(s) and execute a command
.SH SYNOPSIS
.B xargs
[
.B \-ptx
] [
.BI \-e eofstr
] [
.BI \-i replstr
] [
.BI \-l number
] [
.BI \-n number
] [
.BI \-s size
]
.if t .ti +.5i
[
.I command
[\|\fIinitial-arguments\fR
] ]
.SH AVAILABILITY
.LP
This command is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX xargs "" "\fLxargs\fR \(em construct and use initial arguments lists"
.LP
.B xargs
combines the fixed
.I initial-arguments
with arguments read from the standard input, to execute the specified
.I command
one or more times.
The number of arguments read for each
.I command
invocation, and the manner in which they are combined
are determined by the options specified.
.LP
.IR command ,
which may be a shell file,
is searched for using one's
.BR \s-1$PATH\s+1 .
If
.I command
is omitted,
.B /usr/bin/echo
is used.
.LP
Arguments read in from the standard input are defined to be contiguous
strings of characters delimited by white space.
Empty lines are always discarded.
Blanks and tabs may be embedded as part of an argument if they
are escaped or quoted.
Characters enclosed in quotes (single or double) are taken literally,
and the delimiting quotes are removed.  Outside of quoted strings,
a
.RB ` \e '
(backslash) will escape the character it precedes.
.LP
Each arguments-list is constructed starting with the
.IR initial-arguments ,
followed by some number of arguments read from the standard input
(Exception: see the
.B \-i
option).
Options
.BR \-i ,
.BR \-l ,
and
.BR \-n
determine how arguments are selected for each command invocation.
When none of these options are coded, the
.I initial-arguments
are followed by arguments read continuously from the standard input
until an internal buffer is full, and then
.I command
is executed with the accumulated arguments.
This process is repeated until there are none left.
When there are option conflicts (for instance,
.B \-l
versus
.BR \-n "),"
the last option takes precedence.
.LP
.B xargs
will terminate if it receives a return code of
.BR \-1 ,
or if it cannot execute
.IR command .
When
.I command
is a shell script,
it should explicitly
.B exit
(see
.BR sh (1))
with an appropriate value to avoid accidentally returning with
.BR \-1 .
.SH OPTIONS
.TP 15
.B \-p
Prompt mode.
The user is asked whether to execute
.I command
each invocation.
Trace mode
.RB ( \-t )
is turned on to print the command instance to be executed,
followed by a
.B ?\|.\|.\|.
prompt.
A reply of
.B y
(optionally followed by anything) will execute the command;
anything else, including
just a
.SM return\s0,
skips that particular invocation of
.IR command .
.TP
.B \-t
Trace mode.
The
.I command
and each constructed argument list are echoed to file
descriptor 2 just prior to their execution.
.TP
.B \-x
Terminate
.B xargs
if any argument list would be greater than
.I size
characters;
.B \-x
is forced by the options
.B \-i
and
.BR \-l .
When neither of the options
.BR \-i ,
.BR \-l ,
or
.B \-n
are coded, the total length of all
arguments must be within the
.I size
limit.
.TP
.BI \-e eofstr
.I eofstr
is taken as the logical
.SM EOF
string.
.RB ` _ '
(underbar) is assumed for
the logical
.B \s-1EOF\s+1
string if
.B \-e
is not coded.  The value
.B \-e
with no
.I eofstr
coded turns off the logical
.B \s-1EOF\s+1
string capability
(underbar is taken literally).
.B xargs
reads the standard input until either
.SM EOF
or the logical
.B \s-1EOF\s+1
string is encountered.
.TP
.BI \-i replstr
Insert mode:
.I command
is executed for each line from the standard input,
taking the entire line as a single argument, inserting it in
.I initial-arguments
for each occurrence of
.IR replstr .
A maximum of 5 arguments in
.I initial-arguments
may each contain one or more instances of
.IR replstr .
.SM SPACE
and
.SM TAB
characters at the beginning of each line are thrown away.
Constructed arguments may not grow
larger than 255 characters, and option
.B \-x
is also forced.
.B "{\|}"
is assumed for
.I replstr
if not specified.
.TP
.BI \-l number
.I command
is executed for each nonempty
.I number
lines of arguments from the standard input.
The last invocation of
.I command
will be with fewer lines of arguments if fewer than
.I number
remain.
A line is considered to end with the first
.SM NEWLINE
.I unless
the last character of the line is a
.SM SPACE
or a
.SM TAB\s0;
a trailing
.SM SPACE
or
.SM TAB
signals continuation through the next non-empty line.
If
.I number
is omitted, 1 is assumed.
The
.B \-x
option is forced.
.ne 6
.TP
.BI \-n number
Execute
.I command
using as many standard input arguments as possible, up to
.I number
arguments maximum.
Fewer arguments will be used if their total size is greater than
.I size
characters, and for the last invocation if there are fewer than
.I number
arguments remaining.
If option
.B \-x
is also coded, each
.I number
arguments must fit in the
.I size
limitation, else
.B xargs
terminates execution.
.TP
.BI \-s size
The maximum total size of each argument list is set to
.I size
characters;
.I size
must be a positive integer less than or equal to 470. If
.B \-s
is not coded, 470 is taken as the default.
Note: the character count for
.I size
includes one extra character for each
argument and the count of characters in the command name.
.SH EXAMPLES
.LP
The following will move all files from directory
.B $1
to directory
.BR $2 ,
and echo each move command just before doing it:
.LP
.RS
.B "ls \|$1 \|| \|xargs \|\-i \|\-t \|mv \|$1/{\|} \|$2/{\|}"
.RE
.LP
The following will combine the output of
the parenthesized commands onto one line,
which is then echoed to the end of file
.BR log :
.LP
.RS
.B
(logname; \|date; \|echo \|$0 \|$\(**) \|| \|xargs \|>>log
.RE
.LP
The user is asked which files in the
current directory are to be archived
and archives them into
.BR arch (1)
one at a time,
or many at a time.
.LP
.RS
.TP \(bu
.B "ls \|| \|xargs \|\-p \|\-l \|ar \|r \|arch"
.PD 0
.TP \(bu
.B "ls \|| \|xargs \|\-p \|\-l \|| \|xargs \|ar \|r \|arch"
.PD
.RE
.LP
The following will execute
.BR diff (1)
with successive
pairs of arguments originally typed as shell arguments:
.IP
.B "echo \|$\(** \|| \|xargs \|\-n2 \|diff"
.SH "SEE ALSO"
.BR arch (1),
.BR diff (1),
.BR sh (1)
at grade
.RB ` C '.
.TP
.BI \-s spool
Use
.I spool
as the spool directory instead of the default.
.TP
.BI \-x debug
Turn on the debugging at level
.IR debug .
.SS uulog Options
.TP
.BI \-s system
Print information about work involving system
.IR sys./share/man/man1/xget.1                                                                                755       0      12           63  4424740753   7702                                                                                                                                                                                                                                                                                                                                                                      .so man1/xsend.1
.\" @(#)xget.1 1.5 89/03/26 SMI; 
xstr.1    !d  d  yacc.1    !t  e  yes.1     !  f  ypcat.1   !  g  	ypmatch.1 !  !  h  
yppasswd.1   !  i  	ypwhich.1 !  "   j  zcat.1 n\s0,
skips that particular invocation of
.IR command .
.TP
.B \-t
Trace mode.
The
.I command
and each constructed argument list are echoed to file
descriptor 2 just prior to their execution.
.TP
.B \-x
Terminate
.B xargs
if any argument list would be greater than
.I size
characters;
.B \-x
is force./share/man/man1/xsend.1                                                                               755       0      12         4605  4424740753  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xsend.1 1.16 89/03/26 SMI; from UCB 6.1 4/29/85
.TH XSEND 1 "9 September 1987"
.SH NAME
xsend, xget, enroll \- send or receive secret mail
.SH SYNOPSIS
.B xsend
.I username
.LP
.B xget
.LP
.B enroll
.IX  "xsend command"  ""  "\fLxsend\fP \(em send secret mail"
.IX  "xget command"  ""  "\fLxget\fP \(em receive secret mail"
.IX  "enroll command"  ""  "\fLenroll\fP \(em enroll for secret mail"
.IX  send "secret mail \(em \fLxsend\fP"
.IX  "receive secret mail"  ""  "receive secret mail \(em \fLenroll\fP"
.IX  "secret mail"  send  ""  "send \(em \fLxsend\fP"
.IX  "secret mail"  receive  ""  "receive \(em \fLenroll\fP"
.IX  "secret mail"  "enroll for"  ""  "enroll for \(em \fLenroll\fP"
.IX  mail  "send secret"  ""  "send secret mail \(em \fLxsend\fP"
.IX  mail  "receive secret"  ""  "receive secret mail \(em \fLenroll\fP"
.IX  mail  "enroll for secret"  ""  "enroll for secret \(em \fLenroll\fP"
.IX  "encrypted mail"  send  ""  "send \(em \fLxsend\fP"
.IX  "encrypted mail"  receive  ""  "receive \(em \fLenroll\fP"
.IX  "encrypted mail"  "enroll for"  ""  "enroll for \(em \fLenroll\fP"
.IX  communications  xsend  ""  "\fLxsend\fP \(em send secret mail"
.IX  communications  xget  ""  "\fLxget\fP \(em receive secret mail"
.IX  communications  enroll  ""  "\fLenroll\fP \(em enroll for secret mail"
.SH DESCRIPTION
These commands implement a secure communication
channel, which is like
.BR mail (1),
but no one can read the messages except the intended recipient.
The method embodies a public-key cryptosystem using knapsacks.
.LP
To receive messages, use
.BR enroll ;
it asks you for a password that you must subsequently quote
in order to receive secret mail.
.LP
To receive secret mail, use
.BR xget .
It asks for your password, then gives you the messages.
.LP
To send secret mail, use
.BR xsend
in the same manner as the ordinary mail command.
Unlike
.BR mail ,
.B xsend
accepts only one target.
A message announcing the receipt of secret mail is also sent
by ordinary mail.
.SH FILES
.PD 0
.TP 25
.B /var/spool/secretmail/*.key
keys
.TP
.B /var/spool/secretmail/*.[0-9]
messages
.PD
.SH SEE ALSO
.BR mail (1)
.SH BUGS
.LP
The knapsack public-key cryptosystem is known to be breakable.
.LP
Secret mail should be integrated with ordinary mail.
.LP
The announcement of secret mail makes \(lqtraffic analysis\(rq possible.
.SH RESTRICTIONS
.LP
These facilities are not available on software shipped outside the U.S.
 option
.B \-x
is also coded, each
.I number
arguments must fit in the
.I size
limitation, else
.B xargs
terminates executi./share/man/man1/xstr.1                                                                                755       0      12         6401  4424740753   7775                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xstr.1 1.12 89/03/26 SMI; from UCB 4.2
.TH XSTR 1 "22 February 1988"
.SH NAME
xstr \- extract strings from C programs to implement shared strings
.SH SYNOPSIS
.B xstr
[
.B \-
] [
.B \-cv
]
[
.BR \-l " array"
] [
.I filename
]
.IX  "xstr command"  ""  "\fLxstr\fP \(em extract strings from C code"
.IX  "extract strings from C code"  ""  "extract strings from C code \(em \fLxstr\fP"
.IX  "programming languages"  xstr  ""  "\fLxstr\fP \(em extract strings from C code"
.IX  languages  xstr  ""  "\fLxstr\fP \(em extract strings from C code"
.IX  "C programming language"  xstr  ""  "\fLxstr\fP \(em extract strings from C code"
.SH DESCRIPTION
.B xstr
maintains a file called
.B strings
into which strings in component parts of a large program are hashed.
These strings are replaced with references to this common area.
This serves to implement shared constant strings, which are most useful
if they are also read-only.
.LP
The command
.IP
.B xstr \-c name
.LP
extracts the strings from the C source in name, replacing
string references by expressions of the form
.BI &xstr[ number ]
for some number.  An appropriate declaration of
.B xstr
is prepended to the file.  The resulting C text is placed in the file
.B x.c,
to then be compiled.  The strings from
this file are placed in the
.B strings
data base if they are not there already.
Repeated strings and strings which are suffixes of existing strings
do not cause changes to the data base.
.LP
After all components of a large program have been compiled a file
.B xs.c
declaring the common
.B xstr
space can be created by a command of the form
.IP
.B xstr
.LP
This
.B xs.c
file should then be compiled and loaded with the rest
of the program.  If possible, the array can be
made read-only (shared) saving space and swap overhead.
.LP
.B xstr
can also be used on a single file.  A
command
.IP
.B xstr
name
.LP
creates files
.B x.c
and
.B xs.c
as before, without using or affecting any
.B strings
file in the same directory.
.LP
It may be useful to run
.B xstr
after the C preprocessor if any macro definitions yield strings
or if there is conditional code which contains strings
which may not, in fact, be needed.
.B xstr
reads from the standard input when the argument
.RB ` \- '
is given.
An appropriate command sequence for running
.B xstr
after the C preprocessor
is:
.IP
.nf
.ft B
cc \-E name.c | xstr \-c \-
cc \-c x.c
mv x.o name.o
.ft R
.fi
.LP
.B xstr
does not touch the file
.B strings
unless new items are added; thus
.BR make (1)
can avoid remaking
.B xs.o
unless truly necessary.
.SH OPTIONS
.TP
.BI \-c\fP  filename
Take C source text from
.IR filename .
.TP
.B \-v
Verbose: display a progress report indicating where new or
duplicate strings were found.
.TP
.BI \-l " array"
Specify the named 
.I array
in program references to abstracted strings.  The default array
name is
.BR xstr .
.SH FILES
.PD 0
.TP 20
.B strings
data base of strings
.TP
.B x.c
massaged
.B C
source
.TP
.B xs.c
C source for definition of array ``xstr''
.TP
.B /tmp/xs*
temp file when "xstr name" doesn't touch
.B strings
.PD
.SH "SEE ALSO"
.BR make (1),
.BR mkstr (1)
.SH BUGS
If a string is a suffix of another string in the data base,
but the shorter string is seen first by
.B xstr
both strings will be placed in the data base, when just
placing the longer one there would do.
ecret mail, use
.BR xsend
in the same manner as the ordinary mail command.
Unlike
.BR mail ,
.B xsend
accepts only one target.
A message announcing the receipt of secret mail is also sent
by ordinary mail.
.SH FILES
.PD 0
.TP 25
.B /var/spool/secretmail/*./share/man/man1/yacc.1                                                                                755       0      12         4506  4424740754   7721                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yacc.1 1.20 89/03/26 SMI; from UCB 4.2
.TH YACC 1  "26 March 1989"
.SH NAME
yacc \- yet another compiler-compiler: parsing program generator
.SH SYNOPSIS
.B yacc
[
.B \-dv
]
.I grammar
.IX  "yacc command"  ""  "\fLyacc\fP \(em parser generator"
.IX  "compiler generators"  yacc ""  "\fLyacc\fP \(em parser generator"
.IX  "programming tools"  yacc  ""  "\fLyacc\fP \(em parser generator"
.IX  "parser generator"  ""  "parser generator \(em \fLyacc\fP"
.SH DESCRIPTION
.B yacc
converts a context\-free grammar into a set of tables for a simple
automaton which executes an
.SM LR\s0(\&1)
parsing algorithm.  The grammar may
be ambiguous,
in which case specified precedence
rules may be used to break those ambiguities.
.LP
The output file,
.BR y.tab.c ,
must be compiled by the C compiler to produce a function named
.BR yyparse (\|).
The
.BR yyparse  (\|)
function must be loaded with the lexical analyzer
.BR yylex (\|),
as well as
.BR main (\|)
and
the error handling routine
.BR yyerror (\|).
These routines must be supplied by the user;
.BR lex (1)
is useful for creating lexical analyzers usable by
.BR yacc \-produced
parsers.
.SH OPTIONS
.TP
.B \-d
Generate the file
.B y.tab.h
with the
.B define
statements that associate the
.BR yacc \-assigned
\(lqtoken codes\(rq with the user\-declared \(lqtoken names\(rq
so that source files other than
.B y.tab.c
can access the token codes.
.TP
.B \-v
Prepare the file
.B y.output
containing a description of the parsing tables
and a report on conflicts generated by ambiguities in the grammar.
.SH FILES
.PD 0
.TP 20
.B y.output
description of parsing tables and conflict report
.TP
.B y.tab.c
output parser
.TP
.B y.tab.h
defines for token names
.TP
.B yacc.tmp, yacc.acts
temporary files
.TP
.B /usr/lib/yaccpar
parser prototype for C programs
.PD
.SH "SEE ALSO"
.BR lex (1)
.LP
.TX PUL
.  \".I "YACC \- Yet Another Compiler Compiler"
.  \"by S. C. Johnson.
.br
.I "LR Parsing"
by A. V. Aho and S. C. Johnson, Computing Surveys, June, 1974
.SH DIAGNOSTICS
The number of reduce\-reduce and shift\-reduce conflicts
is reported on the standard output; a more detailed report is
found in the
.B y.output
file.  Similarly, it is also reported 
if some rules are not reachable from the
start symbol.
.SH BUGS
Because file names are fixed, no more than one 
.B yacc
process should be active in a given directory at a time.
ilities are not available on software shipped outside the U.S.
 option
.B \-x
is also coded, each
.I number
arguments must fit in the
.I size
limitation, else
.B xargs
terminates executi./share/man/man1/yes.1                                                                                 755       0      12          602  4424740754   7553                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yes.1 1.11 89/03/26 SMI; from UCB 4.2
.TH YES 1  "9 September 1987"
.SH NAME
yes \- be repetitively affirmative
.SH SYNOPSIS
.B yes
[
.I expletive
]
.IX  "yes command"  ""  "\fLyes\fP \(em be repetitively affirmative"
.SH DESCRIPTION
.LP
.B yes
repeatedly outputs
.BR y ,
or if
.I expletive
is given, that is output repeatedly.  Termination is by typing an
interrupt character.
enerator"
.IX  "parser generator"  ""  "parser generator \(em \fLyacc\fP"
.SH DESCRIPTION
.B yacc
converts a context\-free gra./share/man/man1/ypcat.1                                                                               755       0      12         3405  4424740754  10117                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypcat.1 1.10 89/03/26 SMI
.TH YPCAT 1 "22 March 1989"
.SH NAME
ypcat - print values in a YP data base
.SH SYNOPSIS
.B ypcat
[
.B \-kt
] [
.B \-d
.I  domainname
]
.I  mname
.LP
.B ypcat
.B \-x
.IX  "ypcat command"  ""  "\fLypcat\fP \(em print values from YP database"
.IX  print "values from YP database \(em \fLypcat\fP"
.IX  "Yellow Pages"  "print values from database"  ""  "print values from database \(em \fLypcat\fP"
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.B ypcat
prints out values in a Yellow Pages (\s-1YP\s0) map specified by
.IR mname ,
which may be either a
map name or a map nickname .
Since
.B ypcat
uses the
.SM YP
network services, no
.SM YP
server is specified.
.LP
To look at the network-wide password database,
.BR passwd.byname ,
(with the nickname
.BR passwd ).
type in:
.IP
.B ypcat passwd
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.B \-k
Display the keys for those maps in which the values are null
or the key is not part of the value.
.TP
.B \-t
Inhibit translation of
.I mname
to
map name.
For example,
.RB ` "ypcat \-t passwd" '
will fail because there is no map named
.BR passwd ,
whereas
.B ` "ypcat passwd" '
will be translated to
.BR ` "ypcat passwd.byname" '.
.TP
.BI \-d " domainname"
Specify a domain other than the default domain.
The default domain is returned by
.IR domainname.
.TP
.B \-x
Display the map nickname table.
This lists the nicknames
.RI ( mname s)
the command knows of, and indicates the
.I mapname
associated with each nickname.
.SH "SEE ALSO"
.BR domainname (1),
.BR ypmatch (1),
.BR ypfiles (5),
.BR ypserv (8)
rams
.PD
.SH "SEE ALSO"
.BR lex (1)
.LP
.TX PUL
.  \".I "YACC \- Yet Another Compiler Compiler"
.  \"by S. C. Johnson.
.br
.I "LR Parsing"
by A. V. Aho and S. C. Johnson, Computing Surveys, June, 1974
.SH DIAGNOSTICS
The number of reduce\-reduce and s./share/man/man1/ypmatch.1                                                                             755       0      12         3302  4424740754  10440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypmatch.1 1.13 89/03/26 SMI
.TH YPMATCH 1 "17 December 1987"
.SH NAME
ypmatch - print the value of one or more keys from a YP map
.SH SYNOPSIS
.B ypmatch
[
.B \-d
.I domain
] [
.B \-k
] [
.B \-t
]
.I key
\&.\|.\|.
.I mname
.LP
.B ypmatch
.B \-x
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX ypmatch "" "\fLypmatch\fR \(em match YP keys"
.LP
.B ypmatch
prints the values associated with one or more keys from the
Yellow Pages (\s-1YP\s0) map  specified by
.IR mname ,
which may be either a
.I mapname
or an map nickname.
.LP
Multiple keys can be specified; the same map will be searched for all .
The keys must be exact values insofar as capitalization and length
are concerned.  No pattern matching is available.
If a key is not matched, a diagnostic message is produced.
.SH OPTIONS
.TP
.B \-d
Specify a domain other than the default domain.
.TP
.B \-k
Before printing the value of a key,
print the key itself, followed by a
.RB ` : '
colon .  This is useful only if the keys are not duplicated in the
values, or you've specified so many keys that the output could
be confusing.
.TP
.B \-t
Inhibit translation of nickname to
.IR mapname .
For example,
.RB ` "ypmatch \-t zippy passwd " '
will fail because there is no map named
.BR passwd ,
while
.RB ` "ypmatch zippy passwd " '
will be translated to
.BR ` "ypmatch zippy passwd.byname " '.
.TP
.B \-x
Display the map nickname table.
This lists the nicknames
.BR  (\fImnames\fR)
the command knows of, and indicates the
.I mapname
associated with each nickname.
.SH "SEE ALSO"
.BR ypcat (1),
.BR ypfiles (5)
eys can be specified; the same map will be searched for all .
The keys must be exact values insofar as capitalization and length
are concerned.  No pattern matching is available.
If a key is not matched, a diagnostic message is produced.
.SH OPTIONS
.TP
.B \-d
Specify a domain other than the default domain.
.TP
.B \-./share/man/man1/yppasswd.1                                                                            755       0      12         3777  4424740754  10665                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yppasswd.1 1.15 89/03/26 SMI;
.TH YPPASSWD 1 "17 December 1987"
.SH NAME
yppasswd \- change your network password in the Yellow Pages
.SH SYNOPSIS
.B yppasswd
.RI [ " name " ]
.SH AVAILABILITY
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "yppasswd command"  ""  "\fLyppasswd\fP \(em change login password in Yellow Pages"
.IX  "change" "login password in Yellow Pages \(em \fLyppasswd\fP"
.IX  "Yellow Pages"  "change login password in"  ""  "change login password in \(em \fLyppasswd\fP"
.IX  "password"  "change in Yellow Pages"  ""  "change in Yellow Pages \(em \fLyppasswd\fP"
.IX  "login password"  "change in Yellow Pages"  ""  "change in Yellow Pages \(em \fLyppasswd\fP"
.B yppasswd
changes (or installs) a network password associated with the user
.IR name
(your own name by default)
in the Yellow Pages.  The Yellow Pages password may be different
from the one on your own machine.
.LP
.B yppasswd
prompts for the old Yellow Pages password, and then for the new one.
You must type in the old password correctly for the change to
take effect.  The new password must be typed twice, to forestall
mistakes.
.LP
New passwords must be at least four characters long, if they use
a sufficiently rich alphabet, and at least six characters long
if monocase.  These rules are relaxed if you are insistent enough.
Only the owner of the name or the super-user may change a password;
in either case you must prove you know the old password.
.LP
The Yellow Pages password daemon,
.BR yppasswdd (8C)
must be running on your
.SM YP
server in order for the new password
to take effect.
.SH "SEE ALSO"
.BR passwd (1),
.BR ypfiles (5),
.BR yppasswdd (8C)
.SH BUGS
The update protocol passes all the information to the server in
one
.SM RPC
call, without ever looking at it.  Thus if you
type in your old password incorrectly, you will not be notified until
after you have entered your new password.
s./share/man/man1/ypwhich.1                                                                             755       0      12         4240  4424740754  10450                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypwhich.1 1.15 89/03/26 SMI
.TH YPWHICH 1 "22 March 1989"
.SH NAME
ypwhich \- which host is the YP server or map master?
.SH SYNOPSIS
.B ypwhich
[
.B \-d
[
.I domain
] ] [
.B \-V1
|
.B \-V2
] [
.I hostname
]
.br
.B ypwhich
[
.B \-t
.I mapname
] [
.B \-d
.I domain
]
.B \-m
[
.I mname
]
.br
.B ypwhich
.B \-x
.SH AVAILABILITY
.LP
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ypwhich command"  ""  "\fLypwhich\fP \(em who is Yellow Pages server"
.LP
.B ypwhich
tells which
.SM YP
server supplies Yellow Pages services to a
.SM YP
client, or which is the master for a map.
If invoked without arguments, it gives the
.SM YP
server for the local machine.  If
.I hostname
is specified, that machine is queried
to find out which
.SM YP
master it is using.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.B \-d
Use
.I domain
instead of the default domain.
.TP
.B \-V1
Which server is serving v.1
.SM YP
protocol-speaking client processes.
.TP
.B \-V2
Which server is serving v.2
.SM YP
protocol client processes.
.IP
If neither version is specified,
.B ypwhich
attempts to locate the server that supplies the
(current) v.2 services.  If there is no v.2 server currently
bound,
.B ypwhich
then attempts to locate the server supplying the v.1 services.
Since
.SM YP
servers and
.SM YP
clients are both backward compatible,
the user need seldom be concerned about
which version is currently in use.
.TP
.BI \-t  " mapname"
Inhibit nickname translation;
useful if there is a
.I mapname
identical to a nickname.
This is not true of any Sun-supplied map.
.TP
.B \-m
Find the master
.SM YP
server for a map.  No
.I hostname
can be specified with
.BR \-m .
.I mname
can be a mapname, or a nickname for a map.  When
.I mname
is omitted, produce a list available maps.
.TP
.B \-x
Display the map nickname table.
This lists the nicknames
.RI ( mnames )
the command knows of, and indicates the
.I mapname
associated with each
nickname.
.SH "SEE ALSO"
.BR ypfiles (5),
.BR rpcinfo (8C),
.BR ypserv (8),
.BR ypset (8)
es are not reachable from the
start symbol.
.SH BUGS
Because file names are fixed, no more than one 
.B yacc
process should be active in a given directory at a time.
ilities are not available on software shipped outside the U.S.
 option
.B \-x
is also coded, each
.I number
arguments must fit in the
.I size
limitation, else
.B xargs
terminates executi./share/man/man1/zcat.1                                                                                755       0      12           66  4424740755   7701                                                                                                                                                                                                                                                                                                                                                                      .so man1/compress.1
.\" @(#)zcat.1 1.7 89/03/26 SMI; 
March 1989"
.SH NAME
ypwhich \- which host is the YP server or map master?
.SH SYNOPSIS
.B ypwhich
[
.B \-d
[
.I domain
] ] [
.B \-V1
|
.B \-V2
] [
.I hostname
]
.br
.B ypwhich
[
.B \-t
.I mapname
] [
.B \-d
.I domain
]
.B \-m
[
.I mname
]
.br
.B ypwhich
.B \-x
.SH AVAILABILITY
.LP
This command is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.S./share/man/man2/                                                                                      775       0      12            0  4425702373   6622                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man2/Intro.2                                                                               755       0      12       110533  4424740771  10134                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.2 1.41 89/03/26 SMI; from UCB 4.3 and S5
.TH INTRO 2 "25 March 1989"
.de en
.HP
.if '\\$2'unused' \\$1  \fI\\$2\fP  \\$3
.if !'\\$2'unused' \\$1  \s-1\\$2\s0  \\$3
.br
.if !'\\$2'unused' .IX  "\\$2 error number"  ""  "\fL\\$2\fP error number"
..
.SH NAME
intro \- introduction to system calls and error numbers
.SH SYNOPSIS
.B #include <errno.h>
.IX  "system calls, introduction to"  ""  ""  "" PAGE START
.IX  "introduction"  "system calls"  ""  ""  PAGE START
.SH DESCRIPTION
.LP
This section describes all of the system calls.
A `(2V)' heading indicates that the system call performs differently 
when called from programs that use the System V libraries (programs 
compiled using
.BR /usr/5bin/cc ).
On these pages, both the regular behavior and the System V behavior is 
described.
.LP
Most of these calls have one or more error returns.
An error condition is indicated by an otherwise impossible return
value.  This is almost always
.RB ` \-1 ';
the individual descriptions specify the details.
An error number is also made available
in the external variable
.BR errno .
.B errno
is not cleared on successful calls, so it should be tested only
after an error has been indicated.
Note: a number of system calls overload the meanings of these
error numbers, and the meanings must be interpreted according
to the type and circumstances of the call.
.LP
As with normal arguments, all return codes and values from
functions are of type integer unless otherwise noted.
.LP
Each system call description attempts to
list all possible error numbers.
The following is a complete list of the error numbers and their
names as given in
.BR <errno.h> .
.IX  "system error numbers, introduction to"  ""  "" "" PAGE START
.IX  "introduction"  "system error numbers"  ""  ""  PAGE START
.TP
Error 0
Unused.
.en 1 EPERM "Not owner"
Typically this error indicates an attempt to modify a file in some way
forbidden except to its owner or super-user.
It is also returned for attempts
by ordinary users to do things allowed only to the super-user.
.en 2 ENOENT "No such file or directory"
This error occurs when a filename is specified
and the file should exist but does not, or when one
of the directories in a pathname does not exist.
.en 3 ESRCH "No such process"
The process or process group whose number was given
does not exist, or any such process is already dead.
.en 4 EINTR "Interrupted system call"
An asynchronous signal (such as interrupt or quit)
that the process has elected to catch occurred during a system call.
If execution is resumed after processing the signal,
and the system call is not restarted,
it will appear as if the interrupted system call
returned this error condition.
.en 5 EIO "I/O error"
Some physical I/O error occurred.
This error may in some cases occur
on a call following the one to which it actually applies.
.en 6 ENXIO "No such device or address"
I/O on a special file refers to a subdevice that does not exist,
or beyond the limits of the device.
It may also occur when, for example, a tape drive
is not on-line or no disk pack is loaded on a drive.
.en 7 E2BIG "Arg list too long"
An argument list longer than 1,048,576 bytes is presented to
.BR execve (2)
or a routine that called
.BR execve(\|) .
.en 8 ENOEXEC "Exec format error"
A request is made to execute a file
which, although it has the appropriate permissions,
does not start with a valid magic number (see
.BR a.out (5)).
.en 9 EBADF "Bad file number"
Either a file descriptor refers to no open file,
or a read (respectively, write) request is made to
a file that is open only for writing (respectively, reading).
.en 10 ECHILD "No children"
A
.BR wait (2)
was executed by a process that had no existing or unwaited-for child processes.
.en 11 EAGAIN "No more processes"
A
.BR fork (2)
failed because the system's process table is full
or the user is not allowed to create any more processes,
or a system call failed because of insufficient resources.
.en 12 ENOMEM "Not enough memory"
During an
.BR execve (2),
.BR sbrk(\|) ,
or
.BR brk (2),
a program asks for more address space or swap space than the system is
able to supply,
or a process size limit would be exceeded.
A lack of swap space is normally a temporary condition; however,
a lack of address space is not a temporary condition.
The maximum size
of the text, data, and stack segments is a system parameter.
Soft limits may be increased to their corresponding hard limits.
.en 13 EACCES "Permission denied"
An attempt was made to access a file in a way forbidden
by the protection system.
.en 14 EFAULT "Bad address"
The system encountered a hardware fault in attempting to
access the arguments of a system call.
.en 15 ENOTBLK "Block device required"
A file that is not a block device was mentioned where a block device was
required, for example, in
.BR mount (2).
.en 16 EBUSY "Device busy"
An attempt was made to mount a file system that was already mounted or
an attempt was made to dismount a file system
on which there is an active file
(open file, mapped file, current directory, or mounted-on directory).
.en 17 EEXIST "File exists"
An existing file was mentioned in an inappropriate context,
for example,
.BR link (2).
.en 18 EXDEV "Cross-device link"
A hard link to a file on another file system was attempted.
.en 19 ENODEV "No such device"
An attempt was made to apply an inappropriate
system call to a device (for example, an attempt to read a write-only device)
or an attempt was made to use a device not configured by the system.
.en 20 ENOTDIR "Not a directory"
A non-directory was specified where a directory is required,
for example, in a path prefix or as an argument to
.BR chdir (2).
.en 21 EISDIR "Is a directory"
An attempt was made to write on a directory.
.en 22 EINVAL "Invalid argument"
A system call was made with an invalid argument; for example, dismounting
a non-mounted file system, mentioning an unknown signal in
.B sigvec(\|)
or
.BR kill(\|) ,
reading or writing a file for which
.B lseek(\|)
has generated a negative pointer,
or some other argument inappropriate for the call.  Also set by math
functions, see 
.BR intro (3).
.en 23 ENFILE "File table overflow"
The system's table of open files is full, and temporarily no more
.BR open(\|)
calls can be accepted.
.en 24 EMFILE "Too many open files"
A process tried to have more open files than the system allows a process to
have.
The customary configuration limit is 64 per process.
.en 25 ENOTTY "Inappropriate ioctl for device"
The code used in an
.B ioctl(\|)
call is not supported by the object that the file descriptor in the call
refers to.
.en 26 unused
.en 27 EFBIG "File too large"
The size of a file exceeded the maximum file size (1,082,201,088 bytes).
.en 28 ENOSPC "No space left on device""
A
.B write(\|)
to an ordinary file, the creation of a
directory or symbolic link, or the creation of a directory
entry failed because no more disk blocks are available
on the file system, or the allocation of an inode for a newly
created file failed because no more inodes are available on the file system.
.en 29 ESPIPE "Illegal seek"
An
.B lseek(\|)
was issued to a socket or pipe.
This error may also be issued for
other non-seekable devices.
.en 30 EROFS "Read-only file system"
An attempt to modify a file or directory was made on a file system mounted
read-only.
.en 31 EMLINK "Too many links"
An attempt was made to make more than 32767 hard links to a file.
.en 32 EPIPE "Broken pipe"
An attempt was made to write on a pipe or socket for which there is no
process to read the data.
This condition normally generates a signal;
the error is returned if the signal is caught or ignored.
.en 33 EDOM "Math argument"
The argument of a function in the math library (as described in section 3M)
is out of the domain of the function.
.en 34 ERANGE "Result too large"
The value of a function in the math library (as described in section 3M)
is unrepresentable within machine precision.
.en 35 EWOULDBLOCK "Operation would block"
An operation that would cause a process to block was attempted
on an object in non-blocking mode (see
.BR ioctl (2)).
.en 36 EINPROGRESS "Operation now in progress"
An operation that takes a long time to complete (such as a
.BR connect (2))
was attempted on a non-blocking object (see
.BR ioctl (2)).
.en 37 EALREADY "Operation already in progress"
An operation was attempted on a non-blocking object that already
had an operation in progress.
.en 38 ENOTSOCK "Socket operation on non-socket"
Self-explanatory.
.en 39 EDESTADDRREQ "Destination address required"
A required address was omitted from an operation on a socket.
.en 40 EMSGSIZE "Message too long"
A message sent on a socket was larger than the internal message buffer.
.en 41 EPROTOTYPE "Protocol wrong type for socket"
A protocol was specified that does not support the semantics of the
socket type requested. For example, you cannot use the
.SM ARPA
Internet
.SM UDP
protocol with type
.SM SOCK_STREAM\s0.
.en 42 ENOPROTOOPT "Option not supported by protocol
A bad option was specified in a
.B setsockopt(\|)
or
.BR getsockopt (2)
call.
.en 43 EPROTONOSUPPORT "Protocol not supported"
The protocol has not been configured into the
system or no implementation for it exists.
.en 44 ESOCKTNOSUPPORT "Socket type not supported"
The support for the socket type has not been configured into the
system or no implementation for it exists.
.en 45 EOPNOTSUPP "Operation not supported on socket"
For example, trying to
.I accept
a connection on a datagram socket.
.en 46 EPFNOSUPPORT "Protocol family not supported"
The protocol family has not been configured into the
system or no implementation for it exists.
.en 47 EAFNOSUPPORT "Address family not supported by protocol family"
An address incompatible with the requested protocol was used.
For example, you should not necessarily expect to be able to use
.SM PUP
Internet addresses with
.SM ARPA
Internet protocols.
.en 48 EADDRINUSE "Address already in use"
Only one usage of each address is normally permitted.
.en 49 EADDRNOTAVAIL "Can't assign requested address"
Normally results from an attempt to create a socket with an
address not on this machine.
.en 50 ENETDOWN "Network is down"
A socket operation encountered a dead network.
.en 51 ENETUNREACH "Network is unreachable"
A socket operation was attempted to an unreachable network.
.en 52 ENETRESET "Network dropped connection on reset"
The host you were connected to crashed and rebooted.
.en 53 ECONNABORTED "Software caused connection abort"
A connection abort was caused internal to your host machine.
.en 54 ECONNRESET "Connection reset by peer"
A connection was forcibly closed by a peer.  This normally
results from the peer executing a
.BR shutdown (2)
call.
.en 55 ENOBUFS "No buffer space available"
An operation on a socket or pipe was not performed because
the system lacked sufficient buffer space.
.en 56 EISCONN "Socket is already connected"
A
.B connect(\|)
request was made on an already connected socket; or, a
.B sendto(\|)
or
.B sendmsg(\|)
request on a connected socket specified a destination
other than the connected party.
.en 57 ENOTCONN "Socket is not connected"
An request to send or receive data was disallowed because
the socket is not connected.
.en 58 ESHUTDOWN "Can't send after socket shutdown"
A request to send data was disallowed because the socket
had already been shut down with a previous
.BR shutdown (2)
call.
.en 59 unused
.en 60 ETIMEDOUT "Connection timed out"
A
.I connect
request or an
.SM NFS
request failed because the party to which the request
was made did not properly respond after a period of time.
(The timeout period is dependent on the communication protocol.)
.en 61 ECONNREFUSED "Connection refused"
No connection could be made because the target machine actively
refused it. 
This usually results from trying to connect
to a service that is inactive on the foreign host.
.en 62 ELOOP "Too many levels of symbolic links"
A pathname lookup involved more than 20 symbolic links.
.en 63 ENAMETOOLONG "File name too long"
A component of a pathname exceeded 255 characters, or an entire
pathname exceeded 1024 characters.
.en 64 EHOSTDOWN "Host is down"
A socket operation failed because the destination host was down.
.en 65 EHOSTUNREACH "Host is unreachable"
A socket operation was attempted to an unreachable host.
.en 66 ENOTEMPTY "Directory not empty"
An attempt was made to remove a directory with entries other than
.RB ` \&. '
and
.RB ` \&.\|. '
by performing a
.B rmdir(\|)
system call or a
.B rename(\|)
system call with that directory specified as the target directory.
.en 67 unused
.en 68 unused
.en 69 EDQUOT "Disc quota exceeded"
A
.B write(\|)
to an ordinary file, the creation of a directory or symbolic link, or
the creation of a directory entry failed because
the user's quota of disk blocks was
exhausted, or the allocation of an inode for a newly
created file failed because the user's quota of inodes was exhausted.
.en 70 ESTALE "Stale NFS file handle"
An
.SM NFS
client referenced a file that it had opened but that had since been
deleted.
.en 71 EREMOTE "Too many levels of remote in path"
An attempt was made to remotely mount a file system into a path that
already has a remotely mounted component.
.en 72 ENOSTR "Not a stream device"
A
.BR putmsg (2)
or
.BR getmsg (2)
system call was attempted on a file descriptor that is not a
.SM STREAMS
device.
.en 73 ETIME "Timer expired"
The timer set for a
.SM STREAMS
.BR ioctl (2)
call has expired.
The cause of this error is device
specific and could indicate either a hardware
or software failure, or perhaps a timeout value
that is too short for the specific operation.
The status of the
.BR ioctl (2)
operation is indeterminate.
.en 74 ENOSR "Out of stream resources"
During a
.SM STREAMS
.BR open (2V),
either no
.SM STREAMS
queues or no
.SM STREAMS
head data structures were available.
.en 75 ENOMSG "No message of desired type
An attempt was made to receive a message of a type
that does not exist on the specified message queue; see
.BR msgop (2).
.en 76 EBADMSG "Not a data message"
During a
.BR read (2),
.BR getmsg (2),
or
.BR ioctl (2)
.SM I_RECVFD
system call to a
.SM STREAMS
device, something has come to the head of the queue
that cannot be processed. 
That something depends on the system call:
.RS
.RS
.PD 0
.TP 10
.BR read (2) 
control information or a passed file descriptor.
.TP
.BR getmsg (2)
passed file descriptor.
.TP
.BR ioctl (2)
control or data information.
.PD
.RE
.RE
.en 77 EIDRM "Identifier removed
This error is returned to processes that resume execution due to the removal
of an identifier from the
.en 78 unused
.en 79 ENOLCK "No locks available"
A system-imposed limit on the number of simultaneous file and record locks
was reached and no more were available at that time.
.SM IPC
system's name space (see
.BR msgctl (2),
.BR semctl (2),
and
.BR shmctl (2)).
.IX  "system error numbers, introduction to"  ""  "" "" PAGE END
.IX  "introduction"  "system error numbers"  ""  ""  PAGE END
.SH DEFINITIONS
.SS Descriptor
.LP
An integer assigned by the system when a file is referenced by
.BR open (2V),
.BR dup (2),
or 
.BR pipe (2)
or a socket is referenced by
.BR socket (2)
or
.BR socketpair (2)
that uniquely identifies an access path to that file or socket from
a given process or any of its children.
.SS Directory
.LP
A directory is a special type of file that contains entries
that are references to other files.
Directory entries are called links.  By convention, a directory
contains at least two links,
.RB ` \&. '
and
.RB ` \&.\|. ' ,
referred to as
.I dot
and
.I dot-dot
respectively.
Dot refers to the directory itself and
dot-dot refers to its parent directory.
.SS "Effective User \s-1ID\s0, Effective Group \s0ID\s0, and Access Groups"
.LP
Access to system resources is governed by three values:
the effective user
.SM ID\s0,
the effective group
.SM ID\s0,
and the group access list.
.PP
The effective user
.SM ID
and effective group
.SM ID
are initially the process's real user
.SM ID
and real group
.SM ID
respectively.  Either
may be modified through execution of a set-user-\s-1ID\s0
or set-group-\s-1ID\s0
file (possibly by one of its ancestors) (see
.BR execve (2)).
.LP
The group access list is an additional set of group
.SM ID\s0's
used only in determining resource accessibility.  Access checks
are performed as described below in
.BR "File Access Permissions" .
.SS "File Access Permissions"
.LP
Every file in the file system has a set of access permissions.
These permissions are used in determining whether a process
may perform a requested operation on the file (such as opening
a file for writing).  Access permissions are established at the
time a file is created.  They may be changed at some later time
through the 
.BR chmod (2)
call. 
.LP
File access is broken down according to whether a file may be: read,
written, or executed.  Directory files use the execute
permission to control if the directory may be searched. 
.LP
File access permissions are interpreted by the system as
they apply to three different classes of users: the owner
of the file, those users in the file's group, anyone else.
Every file has an independent set of access permissions for
each of these classes.  When an access check is made, the system
decides if permission should be granted by checking the access
information applicable to the caller.
.LP
Read, write, and execute/search permissions on
a file are granted to a process if:
.IP
The process's effective user
.SM ID
is that of the super-user.
.IP
The process's effective user
.SM ID
matches the user
.SM ID
of the owner of the file and the owner permissions allow the access.
.IP
The process's effective user
.SM ID
does not match the user
.SM ID
of the owner of the file, and either the process's effective group
.SM ID
matches the group
.SM ID
of the file, or the group
.SM ID
of the file is in the process's group access list,
and the group permissions allow the access.
.IP
Neither the effective user
.SM ID
nor effective group
.SM ID
and group access list of the process
match the corresponding user
.SM ID
and group
.SM ID
of the file, but the permissions for \(lqother users\(rq allow access.
.LP
Otherwise, permission is denied.
.SS File Name
.LP
Names consisting of up to 255 characters may be used to name
an ordinary file, special file, or directory.
.LP
These characters may be selected from the set of all
.SM ASCII
character excluding \e0 (null) and the
.SM ASCII
code for
.B /
(slash).  (The parity bit,
bit 8, must be 0.)
.LP
Note: it is generally unwise to use
.BR * ,
.BR ? ,
.BR [ ,
or
.B ]
as part of filenames because of the special meaning attached to these
characters by the shell.
See
.BR sh (1).
Although permitted, it is advisable to avoid the use of unprintable
characters in filenames.
.SS "Message Queue Identifier"
A message queue identifier
(msqid)
is a unique positive integer created by a
.BR msgget (2)
system call.
Each msqid has a message queue and a data structure associated with it.
The data structure is referred to as
.B msqid_ds(\|)
and contains the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBstruct	ipc_perm msg_perm;\fR	/\(** operation permission struct \(**/
\fBushort	msg_qnum;\fR	/\(** number of msgs on q \(**/
\fBushort	msg_qbytes;\fR	/\(** max number of bytes on q \(**/
\fBushort	msg_lspid;\fR	/\(** pid of last msgsnd operation \(**/
\fBushort	msg_lrpid;\fR	/\(** pid of last msgrcv operation \(**/
\fBtime_t	msg_stime;\fR	/\(** last msgsnd time \(**/
\fBtime_t	msg_rtime;\fR	/\(** last msgrcv time \(**/
\fBtime_t	msg_ctime;\fR	/\(** last change time \(**/
		/\(** Times measured in secs since \(**/
		/\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/
.fi
.RE
.LP
.B msg_perm(\|)
is an ipc_perm structure that
specifies the message operation permission (see below).
This structure includes the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBushort	cuid;\fR	/\(** creator user id \(**/
\fBushort	cgid;\fR	/\(** creator group id \(**/
\fBushort	uid;\fR	/\(** user id \(**/
\fBushort	gid;\fR	/\(** group id \(**/
\fBushort	mode;\fR	/\(** r/w permission \(**/
.LP
.fi
.RE
.B msg_qnum
is the number of messages currently on the queue.
.B msg_qbytes
is the maximum number of bytes allowed on the queue.
.B msg_lspid
is the process ID of the last process that performed a
.BR msgsnd " operation."
.B msg_lrpid
is the process ID of the last process that performed a
.BR msgrcv " operation."
.B msg_stime
is the time of the last
.I msgsnd
operation,
.B msg_rtime
is the time of the last
.I msgrcv
operation, and
.B msg_ctime
is the time of the last
.BR msgctl (2)
operation that changed a member of the above structure.
.SS "Message Operation Permissions"
In the
.BR msgop (2)
and
.BR msgctl (2)
system call descriptions, the permission required
for an operation is given as "{token}", where \(lqtoken\(rq is the type
of permission needed interpreted as follows:
.LP
.RS 0.75i
.PD 0
.TP 28
00400
Read by user
.TP
00200
Write by user
.TP
00060
Read, Write by group
.TP
00006
Read, Write by others
.RE
.PD
.LP
Read and Write permissions on a msqid are
granted to a process if one or more of the following are true:
.IP
The effective user
.SM ID
of the process is super-user.
.IP
The effective user
.SM ID
of the process matches
.B msg_perm.[c]uid
in the data structure associated with
.I msqid
and the appropriate bit of the
\(lquser\(rq portion (0600) of
.B msg_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B msg_perm.[c]uid
and the effective group
.SM ID
of the process matches
.B msg_perm.[c]gid
and the appropriate bit of the \(lqgroup\(rq portion
(060) of
.B msg_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B msg_perm.[c]uid
and the effective group
.SM ID
of the process does not match
.B msg_perm.[c]gid
and the appropriate bit of the \(lqother\(rq portion (06) of
.B msg_perm.mode
is set.
.LP
Otherwise, the corresponding permissions are denied.
.SS "Parent Process \s-1ID\s0"
A new process is created by a currently active process (see
.BR fork (2)).
The parent process
.SM ID
of a process is the process
.SM ID
of its creator.
.SS "Path Name and Path Prefix"
A pathname is a null-terminated character string starting with an
optional slash
.RB ( / ),
followed by zero or more directory names separated
by slashes, optionally followed by a filename.
The total length of a pathname must be less than {\s-1MAXPATHLEN\s0}
(1024) characters.
.LP
More precisely, a pathname is a null-terminated character string
constructed as follows:
.LP
.RS
.nf
.BI < path-name ">::=<" file-name ">\|\(bv<" path-prefix\fB><\fIfile-name\fB>\|\(bv/
.BI < path-prefix ">::=<" rtprefix ">\|\(bv/<" rtprefix\fB>
.BI < rtprefix ">::=<" dirname ">/\|\(bv<" rtprefix\fB><\fIdirname\fB>/
.fi
.RE
.LP
where
.BI < file-name >
is a string of 1 to 255
characters other than the
.SM ASCII
slash and null, and
.BI < dirname >
is a string of 1 to 255 characters
(other than the
.SM ASCII
slash and null) that names a directory.
.LP
If a pathname begins with a slash, the search begins at the
.I root
directory.
Otherwise, the search begins at the current working directory.
.LP
A slash, by itself, names the root directory.  
A dot
.RB ( \|.\|)
names the current working directory.
.LP
A null pathname also refers to the current directory. However, this
is not true of all 
.SM UNIX
systems.  
(On such systems, accidental use of a null pathname in
routines that do not check for it may corrupt the current
working directory.)
For portable code, specify the current directory explicitly using
`\fB"."\fR',
rather than
`\fB""\fR'.
.SS "Process Group \s-1ID\s0"
Each active process is a member of a process group that is identified by
a positive integer called the process group
.SM ID\s0.
This
.SM ID
is the process
.SM ID
of the group leader. 
This grouping permits the signaling of related processes (see
.BR killpg (2))
and the job control mechanisms of
.BR csh (1).
.SS "Process \s-1ID\s0"
Each active process in the system is uniquely identified by a positive
integer called a process
.SM ID\s0.
The range of this
.SM ID
is from 0 to 30000.
.SS "Real User \s-1ID\s0 and Real Group \s-1ID\s0"
Each user on the system is identified by a positive integer
termed the real user
.SM ID\s0.
.LP
Each user is also a member of one or more groups. 
One of these groups is distinguished from others and
used in implementing accounting facilities.  The positive
integer corresponding to this distinguished group is termed 
the real group
.SM ID\s0.
.LP
All processes have a real user
.SM ID
and real group
.SM ID\s0.
These are initialized from the equivalent attributes
of the process that created it.
.SS "Root Directory and Current Working Directory"
.LP
Each process has associated with it a concept of a root directory
and a current working directory for the purpose of resolving path
name searches.  A process's root directory need not be the root
directory of the root file system.
.SS "Semaphore Identifier"
.LP
A semaphore identifier (semid) is a unique positive integer created by a
.BR semget (2)
system call.
Each semid has a set of semaphores and a data structure associated with it.
The data structure is referred to as
.B semid_ds
and contains the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBstruct	ipc_perm sem_perm;\fR	/\(** operation permission struct \(**/
\fBushort	sem_nsems;\fR	/\(** number of sems in set \(**/
\fBtime_t	sem_otime;\fR	/\(** last operation time \(**/
\fBtime_t	sem_ctime;\fR	/\(** last change time \(**/
		/\(** Times measured in secs since \(**/
		/\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/
.fi
.RE
.br
.ne 8
.LP
.B sem_perm
is an
.B ipc_perm
structure that
specifies the semaphore operation permission (see below).
This structure includes the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBushort	cuid;\fR	/\(** creator user id \(**/
\fBushort	cgid;\fR	/\(** creator group id \(**/
\fBushort	uid;\fR	/\(** user id \(**/
\fBushort	gid;\fR	/\(** group id \(**/
\fBushort	mode;\fR	/\(** r/a permission \(**/
.LP
.fi
.RE
The value of
.B sem_nsems
is equal to the number of semaphores in the set.
Each semaphore in the set is referenced by a positive integer
referred to as a
.BR sem_num .
.B sem_num
values run sequentially from 0 to the value of
.B sem_nsems
minus 1.
.B sem_otime
is the time of the last
.BR semop (2)
operation, and
.B sem_ctime
is the time of the last
.BR semctl (2)
operation that changed a member of the above structure.
.LP
A semaphore is a data structure that contains the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBushort	semval;\fR	/\(** semaphore value \(**/
\fBshort	sempid;\fR	/\(** pid of last operation  \(**/
\fBushort	semncnt;\fR	/\(** # awaiting semval > cval \(**/
\fBushort	semzcnt;\fR	/\(** # awaiting semval = 0 \(**/
.fi
.RE
.LP
.B semval
is a non-negative integer.
.B sempid
is equal to the process
.SM ID
of the last process that performed a semaphore operation on this semaphore.
.B semncnt
is a count of the number of processes that are currently suspended
awaiting this semaphore's semval to become greater than its current value.
.B semzcnt
is a count of the number of processes that are currently suspended
awaiting this semaphore's semval to become zero.
.SS "Semaphore Operation Permissions"
In the
.BR semop (2)
and 
.BR semctl (2)
system call descriptions, the permission required
for an operation is given as "{token}", where \(lqtoken\(rq is the type
of permission needed interpreted as follows:
.LP
.RS
.PD 0
.TP 28
00400
Read by user
.TP
00200
Alter by user
.TP
00060
Read, Alter by group
.TP
00006
Read, Alter by others
.RE
.PD
.LP
Read and Alter permissions on a semid are
granted to a process if one or more of the following are true:
.IP
The effective user
.SM ID
of the process is super-user.
.IP
The effective user
.SM ID
of the process matches
.B sem_perm.[c]uid
in the data structure associated with
.I semid
and the appropriate bit of the
\(lquser\(rq portion (0600) of
.B sem_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B sem_perm.[c]uid
and the effective group
.SM ID
of the process matches
.B sem_perm.[c]gid
and the appropriate bit of the \(lqgroup\(rq portion
(060) of
.B sem_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B sem_perm.[c]uid
and the effective group
.SM ID
of the process does not match
.B sem_perm.[c]gid
and the appropriate bit of the \(lqother\(rq portion (06) of
.B sem_perm.mode
is set.
.LP
Otherwise, the corresponding permissions are denied.
.br
.ne 16
.SS "Shared Memory Identifier"
A shared memory identifier (shmid) is a unique positive integer created by a
.BR shmget (2)
system call.
Each shmid has a segment of memory (referred to as a shared memory segment)
and a data structure associated with it.
The data structure is referred to as
.B shmid_ds
and contains the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBstruct	ipc_perm shm_perm;\fR	/\(** operation permission struct \(**/
\fBint	shm_segsz;\fR	/\(** size of segment \(**/
\fBushort	shm_cpid;\fR	/\(** creator pid \(**/
\fBushort	shm_lpid;\fR	/\(** pid of last operation \(**/
\fBshort	shm_nattch;\fR	/\(** number of current attaches \(**/
\fBtime_t	shm_atime;\fR	/\(** last attach time \(**/
\fBtime_t	shm_dtime;\fR	/\(** last detach time \(**/
\fBtime_t	shm_ctime;\fR	/\(** last change time \(**/
		/\(** Times measured in secs since \(**/
		/\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/
.fi
.RE
.LP
.B shm_perm
is an
.B ipc_perm
structure that
specifies the shared memory operation permission (see below).
This structure includes the following members:
.LP
.RS
.ta 8n 28n
.nf
\fBushort	cuid;\fR	/\(** creator user id \(**/
\fBushort	cgid;\fR	/\(** creator group id \(**/
\fBushort	uid;\fR	/\(** user id \(**/
\fBushort	gid;\fR	/\(** group id \(**/
\fBushort	mode;\fR	/\(** r/w permission \(**/
.LP
.fi
.RE
.B shm_segsz
specifies the size of the shared memory segment.
.B shm_cpid
is the process
.SM ID
of the process that created the shared memory identifier.
.B shm_lpid
is the process
.SM ID
of the last process that performed a
.BR shmop (2)
operation.
.B shm_nattch
is the number of processes that currently have this segment attached.
.B shm_atime
is the time of the last
.I shmat
operation,
.B shm_dtime
is the time of the last
.I shmdt
operation, and
.B shm_ctime
is the time of the last
.BR shmctl (2)
operation that changed one of the members of the above structure.
.SS "Shared Memory Operation Permissions"
In the
.BR shmop (2)
and 
.BR shmctl (2)
system call descriptions, the permission required
for an operation is given as "{token}", where \(lqtoken\(rq is the type
of permission needed interpreted as follows:
.LP
.RS
.PD 0
.TP 28
00400
Read by user
.TP
00200
Write by user
.TP
00060
Read, Write by group
.TP
00006
Read, Write by others
.RE
.PD
.LP
Read and Write permissions on a shmid are
granted to a process if one or more of the following are true:
.IP
The effective user
.SM ID
of the process is super-user.
.IP
The effective user
.SM ID
of the process matches
.B shm_perm.[c]uid
in the data structure associated with
.I shmid
and the appropriate bit of the
\(lquser\(rq portion (0600) of
.B shm_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B shm_perm.[c]uid
and the effective group
.SM ID
of the process matches
.B shm_perm.[c]gid
and the appropriate bit of the \(lqgroup\(rq portion
(060) of
.B shm_perm.mode
is set.
.IP
The effective user
.SM ID
of the process does not match
.B shm_perm.[c]uid
and the effective group
.SM ID
of the process does not match
.B shm_perm.[c]gid
and the appropriate bit of the \(lqother\(rq portion (06) of
.B shm_perm.mode
is set.
.LP
Otherwise, the corresponding permissions are denied.
.SS "Sockets and Address Families"
A socket is an endpoint for communication between processes.
Each socket has queues for sending and receiving data.
.LP
Sockets are typed according to their communications properties.
These properties include whether messages sent and received
at a socket require the name of the partner, whether communication
is reliable, the format used in naming message recipients, etc.
.LP
Each instance of the system supports some
collection of socket types; consult
.BR socket (2)
for more information about the types available and
their properties.
.LP
Each instance of the system supports some number of sets of
communications protocols.  Each protocol set supports addresses
of a certain format.  An Address Family is the set of addresses
for a specific group of protocols.  Each socket has an address
chosen from the address family in which the socket was created.
.br
.ne 5
.SS "Special Processes"
.LP
The processes with a process
.SM ID\s0's
of 0, 1, and 2 are special.
Process 0 is the scheduler. 
Process 1 is the initialization process
.BR init ,
and is the ancestor of every other process in the system.
It is used to control the process structure.
Process 2 is the paging daemon.
.SS "Super-user"
A process is recognized as a
.I super-user
process and is granted special privileges if its effective user
.SM ID
is 0.
.SS "Tty Group ID"
Each active process can be a member of a terminal group that is identified
by a positive integer called the tty group
.SM ID\s0.  This grouping is used
to arbitrate between multiple jobs contending for the same terminal
(see
.BR csh (1),
and
.BR termio (4),
and to terminate a group of related processes upon termination
of one of the processes in the group (see
.BR exit (2)
and
.BR sigvec (2)).
.SH \fB\s-1STREAMS\s0\fP
A set of kernel mechanisms that support the development of
network services and data communication
.IR driver s.
It defines interface standards for character input/output
within the kernel and between the kernel and user level processes.
The
.SM STREAMS
mechanism is composed of utility routines,
kernel facilities and a set of data structures.
.SS Stream
A stream is a full-duplex data path within the kernel 
between a user process and driver routines.
The primary components are a stream head,
a
.I driver
and zero or more
.I modules
between the stream head and
.IR driver .
A stream
is analogous to a Shell pipeline except that data flow and
processing are bidirectional.
.SS Stream Head
In a stream, the stream head
is the end of the stream
that provides the interface between the stream
and a user process.
The principle functions of the stream head
are processing
.SM STREAMS\s0-related
system calls, and passing data and information between a user
process and the stream.
.SS Driver
In a stream, the
.I driver
provides the interface between
peripheral hardware and the stream.
A
.I driver
can also be a
.RI pseudo- driver ,
such as a
.I multiplexor
or
.IR emulator ,
and need not be associated with a hardware device.
.SS Module
A module is an entity containing processing
routines for input and output data.
It always exists in the middle of a stream,
between the stream's head
and a
.IR driver .
A
.I module
is the
.SM STREAMS
counterpart to the commands
in a Shell pipeline except that a module contains a pair
of functions which allow independent bidirectional
.RI ( downstream
and
.IR upstream )
data flow and processing.
.SS Downstream
In a stream, the direction from stream head to
.IR driver .
.SS Upstream
In a stream, the direction from
.I driver
to stream head.
.SS Message
In a stream,
one or more blocks of data or information, with associated
.SM STREAMS
control structures.  Messages
can be of several defined types, which identify the message
contents. 
Messages are the only means of transferring data and communicating
within a stream.
.SS Message Queue
In a stream,
a linked list of
.I messages
awaiting processing by a
.I module
or
.IR driver .
.SS Read Queue
In a stream, the
.I message queue
in a
.I module
or
.I driver
containing
.I messages
moving
.IR upstream .
.SS Write Queue
In a stream, the
.I message queue
in a
.I module
or
.I driver
containing
.I messages
moving
.IR downstream .
.SS Multiplexor
A multiplexor is a driver that allows
.SM STREAMS
associated with several user processes to be
connected to a single
.IR driver ,
or several
.I drivers
to be connected to a single user process.
.SM STREAMS
does not provide a general multiplexing
.IR driver ,
but does provide the facilities for
constructing them, and for connecting multiplexed
configurations of
.SM STREAMS\s0.
.IX  "system calls, introduction to"  ""  ""  "" PAGE END
.IX  "introduction"  "system calls"  ""  ""  PAGE END
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR brk (2),
.BR chdir (2),
.BR chmod (2),
.BR connect (2),
.BR dup (2),
.BR execve (2),
.BR exit (2),
.BR fork (2),
.BR getmsg (2),
.BR getsockopt (2),
.BR ioctl (2),
.BR killpg (2),
.BR link (2),
.BR mount (2),
.BR msgctl (2),
.BR msgget (2),
.BR msgop (2),
.BR open (2V),
.BR pipe (2),
.BR putmsg (2),
.BR read (2),
.BR semctl (2),
.BR semget (2),
.BR semop (2),
.BR setsockopt (2),
.BR shmctl (2),
.BR shmget (2),
.BR shmop (2),
.BR shutdown (2),
.BR sigvec (2),
.BR socket (2),
.BR socketpair (2),
.BR wait (2),
.BR intro(3),
.BR perror(3)
.BR termio (4),
.BR a.out (5)
.br
.ne 50
.SH "LIST OF SYSTEM CALLS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
\fBName	Appears on Page	Description\fR
.sp
.nr zZ 1
.so /usr/man/man2/List.2
.nr zZ 0
.fi
that are currently suspended
awaiting this semaphore's semval to become greater than its current value.
.B semzcnt
is a count of the number of processes that are cur./share/man/man2/List.2                                                                                755       0      12        23265  4424740771   7741                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.2 1.9 89/03/26 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 2 "18 January 1988"
.SH LIST OF SYSTEM CALLS
.nf
.sp
.ta 20n; +20n
\fBName 	Appears on Page	Description\fR
.sp
.zZ
\fB_exit(\|)\fR	\fBexit\fR(2)	 terminate a process
\fBaccept(\|)\fR	\fBaccept\fR(2)	 accept a connection on a socket
\fBaccess(\|)\fR	\fBaccess\fR(2)	 determine accessibility of file
\fBacct(\|)\fR	\fBacct\fR(2)	 turn accounting on or off
\fBadjtime(\|)\fR	\fBadjtime\fR(2)	 correct the time to allow synchronization of the system clock
\fBasync_daemon(\|)\fR	\fBnfssvc\fR(2)	 NFS daemons
\fBaudit(\|)\fR	\fBaudit\fR(2)	 write a record to the audit log
\fBauditon(\|)\fR	\fBauditon\fR(2)	 manipulate auditing
\fBauditsvc(\|)\fR	\fBauditsvc\fR(2)	 write audit records to specified file descriptor
\fBbind(\|)\fR	\fBbind\fR(2)	 bind a name to a socket
\fBbrk(\|)\fR	\fBbrk\fR(2)	 change data segment size
\fBchdir(\|)\fR	\fBchdir\fR(2)	 change current working directory
\fBchmod(\|)\fR	\fBchmod\fR(2)	 change mode of file
\fBchown(\|)\fR	\fBchown\fR(2)	 change owner and group of a file
\fBchroot(\|)\fR	\fBchroot\fR(2)	 change root directory
\fBclose(\|)\fR	\fBclose\fR(2)	 delete a descriptor
\fBconnect(\|)\fR	\fBconnect\fR(2)	 initiate a connection on a socket
\fBcreat(\|)\fR	\fBcreat\fR(2)	 create a new file
\fBdup2(\|)\fR	\fBdup\fR(2)	 duplicate a descriptor
\fBdup(\|)\fR	\fBdup\fR(2)	 duplicate a descriptor
\fBexecve(\|)\fR	\fBexecve\fR(2)	 execute a file
\fBfchmod(\|)\fR	\fBchmod\fR(2)	 change mode of file
\fBfchown(\|)\fR	\fBchown\fR(2)	 change owner and group of a file
\fBfcntl(\|)\fR	\fBfcntl\fR(2V)	 file control
\fBflock(\|)\fR	\fBflock\fR(2)	 apply or remove an advisory lock on an open file
\fBfork(\|)\fR	\fBfork\fR(2)	 create a new process
\fBfstat(\|)\fR	\fBstat\fR(2)	 get file status
\fBfsync(\|)\fR	\fBfsync\fR(2)	 synchronize a file's in-core state with that on disk
\fBftruncate(\|)\fR	\fBtruncate\fR(2)	 set a file to a specified length
\fBgetauid(\|)\fR	\fBgetauid\fR(2)	 get and set user audit identity
\fBgetdents(\|)\fR	\fBgetdents\fR(2)	 gets directory entries in a filesystem independent format
\fBgetdirentries(\|)\fR	\fBgetdirentries\fR(2)	 gets directory entries in a filesystem independent format
\fBgetdomainname(\|)\fR	\fBgetdomainname\fR(2)	 get/set name of current domain
\fBgetdtablesize(\|)\fR	\fBgetdtablesize\fR(2)	 get descriptor table size
\fBgetegid(\|)\fR	\fBgetgid\fR(2)	 get group identity
\fBgeteuid(\|)\fR	\fBgetuid\fR(2)	 get user identity
\fBgetgid(\|)\fR	\fBgetgid\fR(2)	 get group identity
\fBgetgroups(\|)\fR	\fBgetgroups\fR(2)	 get or set group access list
\fBgethostid(\|)\fR	\fBgethostid\fR(2)	 get unique identifier of current host
\fBgethostname(\|)\fR	\fBgethostname\fR(2)	 get/set name of current host
\fBgetitimer(\|)\fR	\fBgetitimer\fR(2)	 get/set value of interval timer
\fBgetmsg(\|)\fR	\fBgetmsg\fR(2)	 get next message off a stream
\fBgetpagesize(\|)\fR	\fBgetpagesize\fR(2)	 get system page size
\fBgetpeername(\|)\fR	\fBgetpeername\fR(2)	 get name of connected peer
\fBgetpgrp(\|)\fR	\fBsetpgrp\fR(2V)	 set and/or return the process group of a process
\fBgetpid(\|)\fR	\fBgetpid\fR(2)	 get process identification
\fBgetppid(\|)\fR	\fBgetpid\fR(2)	 get process identification
\fBgetpriority(\|)\fR	\fBgetpriority\fR(2)	 get/set program scheduling priority
\fBgetrlimit(\|)\fR	\fBgetrlimit\fR(2)	 control maximum system resource consumption
\fBgetrusage(\|)\fR	\fBgetrusage\fR(2)	 get information about resource utilization
\fBgetsockname(\|)\fR	\fBgetsockname\fR(2)	 get socket name
\fBgetsockopt(\|)\fR	\fBgetsockopt\fR(2)	 get and set options on sockets
\fBgettimeofday(\|)\fR	\fBgettimeofday\fR(2)	 get or set the date and time
\fBgetuid(\|)\fR	\fBgetuid\fR(2)	 get user identity
\fBioctl(\|)\fR	\fBioctl\fR(2)	 control device
\fBkill(\|)\fR	\fBkill\fR(2V)	 send a signal to a process or a group of processes
\fBkillpg(\|)\fR	\fBkillpg\fR(2)	 send signal to a process group
\fBlink(\|)\fR	\fBlink\fR(2)	 make a hard link to a file
\fBlisten(\|)\fR	\fBlisten\fR(2)	 listen for connections on a socket
\fBlseek(\|)\fR	\fBlseek\fR(2)	 move read/write pointer
\fBlstat(\|)\fR	\fBstat\fR(2)	 get file status
\fBmincore(\|)\fR	\fBmincore\fR(2)	 determine residency of memory pages
\fBmkdir(\|)\fR	\fBmkdir\fR(2)	 make a directory file
\fBmknod(\|)\fR	\fBmknod\fR(2)	 make a special file
\fBmmap(\|)\fR	\fBmmap\fR(2)	 map pages of memory
\fBmount(\|)\fR	\fBmount\fR(2)	 mount file system
\fBmprotect(\|)\fR	\fBmprotect\fR(2)	 set protection of memory mapping
\fBmsgctl(\|)\fR	\fBmsgctl\fR(2)	 message control operations
\fBmsgget(\|)\fR	\fBmsgget\fR(2)	 get message queue
\fBmsgop(\|)\fR	\fBmsgop\fR(2)	 message operations
\fBmsgrcv(\|)\fR	\fBmsgop\fR(2)	 message operations
\fBmsgsnd(\|)\fR	\fBmsgop\fR(2)	 message operations
\fBmsync(\|)\fR	\fBmsync\fR(2)	 synchronize memory with physical storage
\fBmunmap(\|)\fR	\fBmunmap\fR(2)	 unmap pages of memory.
\fBnfssvc(\|)\fR	\fBnfssvc\fR(2)	 NFS daemons
\fBopen(\|)\fR	\fBopen\fR(2V)	 open or create a file for reading or writing
\fBpipe(\|)\fR	\fBpipe\fR(2)	 create an interprocess communication channel
\fBpoll(\|)\fR	\fBpoll\fR(2)	 STREAMS input/output multiplexing
\fBprofil(\|)\fR	\fBprofil\fR(2)	 execution time profile
\fBptrace(\|)\fR	\fBptrace\fR(2)	 process trace
\fBputmsg(\|)\fR	\fBputmsg\fR(2)	 send a message on a stream
\fBquotactl(\|)\fR	\fBquotactl\fR(2)	 manipulate disk quotas
\fBread(\|)\fR	\fBread\fR(2V)	 read input
\fBreadlink(\|)\fR	\fBreadlink\fR(2)	 read value of a symbolic link
\fBreadv(\|)\fR	\fBread\fR(2V)	 read input
\fBreboot(\|)\fR	\fBreboot\fR(2)	 reboot system or halt processor
\fBrecv(\|)\fR	\fBrecv\fR(2)	 receive a message from a socket
\fBrecvfrom(\|)\fR	\fBrecv\fR(2)	 receive a message from a socket
\fBrecvmsg(\|)\fR	\fBrecv\fR(2)	 receive a message from a socket
\fBrename(\|)\fR	\fBrename\fR(2)	 change the name of a file
\fBrmdir(\|)\fR	\fBrmdir\fR(2)	 remove a directory file
\fBsbrk(\|)\fR	\fBbrk\fR(2)	 change data segment size
\fBselect(\|)\fR	\fBselect\fR(2)	 synchronous I/O multiplexing
\fBsemctl(\|)\fR	\fBsemctl\fR(2)	 semaphore control operations
\fBsemget(\|)\fR	\fBsemget\fR(2)	 get set of semaphores
\fBsemop(\|)\fR	\fBsemop\fR(2)	 semaphore operations
\fBsend(\|)\fR	\fBsend\fR(2)	 send a message from a socket
\fBsendmsg(\|)\fR	\fBsend\fR(2)	 send a message from a socket
\fBsendto(\|)\fR	\fBsend\fR(2)	 send a message from a socket
\fBsetaudit(\|)\fR	\fBsetuseraudit\fR(2)	 set the audit classes for a specified user ID
\fBsetauid(\|)\fR	\fBgetauid\fR(2)	 get and set user audit identity
\fBsetdomainname(\|)\fR	\fBgetdomainname\fR(2)	 get/set name of current domain
\fBsetgroups(\|)\fR	\fBgetgroups\fR(2)	 get or set group access list
\fBsethostname(\|)\fR	\fBgethostname\fR(2)	 get/set name of current host
\fBsetitimer(\|)\fR	\fBgetitimer\fR(2)	 get/set value of interval timer
\fBsetpgrp(\|)\fR	\fBsetpgrp\fR(2V)	 set and/or return the process group of a process
\fBsetpriority(\|)\fR	\fBgetpriority\fR(2)	 get/set program scheduling priority
\fBsetregid(\|)\fR	\fBsetregid\fR(2)	 set real and effective group IDs
\fBsetreuid(\|)\fR	\fBsetreuid\fR(2)	 set real and effective user IDs
\fBsetrlimit(\|)\fR	\fBgetrlimit\fR(2)	 control maximum system resource consumption
\fBsetsockopt(\|)\fR	\fBgetsockopt\fR(2)	 get and set options on sockets
\fBsettimeofday(\|)\fR	\fBgettimeofday\fR(2)	 get or set the date and time
\fBsetuseraudit(\|)\fR	\fBsetuseraudit\fR(2)	 set the audit classes for a specified user ID
\fBshmat(\|)\fR	\fBshmop\fR(2)	 shared memory operations
\fBshmctl(\|)\fR	\fBshmctl\fR(2)	 shared memory control operations
\fBshmdt(\|)\fR	\fBshmop\fR(2)	 shared memory operations
\fBshmget(\|)\fR	\fBshmget\fR(2)	 get shared memory segment identifier
\fBshmop(\|)\fR	\fBshmop\fR(2)	 shared memory operations
\fBshutdown(\|)\fR	\fBshutdown\fR(2)	 shut down part of a full-duplex connection
\fBsigblock(\|)\fR	\fBsigblock\fR(2)	 block signals
\fBsigpause(\|)\fR	\fBsigpause\fR(2)	 atomically release blocked signals and wait for interrupt
\fBsigsetmask(\|)\fR	\fBsigsetmask\fR(2)	 set current signal mask
\fBsigstack(\|)\fR	\fBsigstack\fR(2)	 set and/or get signal stack context
\fBsigvec(\|)\fR	\fBsigvec\fR(2)	 software signal facilities
\fBsocket(\|)\fR	\fBsocket\fR(2)	 create an endpoint for communication
\fBsocketpair(\|)\fR	\fBsocketpair\fR(2)	 create a pair of connected sockets
\fBstat(\|)\fR	\fBstat\fR(2)	 get file status
\fBstatfs(\|)\fR	\fBstatfs\fR(2)	 get file system statistics
\fBswapon(\|)\fR	\fBswapon\fR(2)	 add a swap device for interleaved paging/swapping
\fBsymlink(\|)\fR	\fBsymlink\fR(2)	 make symbolic link to a file
\fBsync(\|)\fR	\fBsync\fR(2)	 update super-block
\fBsyscall(\|)\fR	\fBsyscall\fR(2)	 indirect system call
\fBtell(\|)\fR	\fBlseek\fR(2)	 move read/write pointer
\fBtruncate(\|)\fR	\fBtruncate\fR(2)	 set a file to a specified length
\fBumask(\|)\fR	\fBumask\fR(2)	 set file creation mode mask
\fBuname(\|)\fR	\fBuname\fR(2V)	 get name of current system
\fBunlink(\|)\fR	\fBunlink\fR(2)	 remove directory entry
\fBunmount(\|)\fR	\fBunmount\fR(2)	 remove a file system
\fButimes(\|)\fR	\fButimes\fR(2)	 set file times
\fBvadvise(\|)\fR	\fBvadvise\fR(2)	 give advice to paging system
\fBvfork(\|)\fR	\fBvfork\fR(2)	 spawn new process in a virtual memory efficient way
\fBvhangup(\|)\fR	\fBvhangup\fR(2)	 virtually ``hangup'' the current control terminal
\fBwait3(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fBwait4(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fBwait(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fB\s-1WIFEXITED\s0(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fB\s-1WIFSIGNALED\s0(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fB\s-1WIFSTOPPED\s0(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fBwrite(\|)\fR	\fBwrite\fR(2V)	 write output
\fBwritev(\|)\fR	\fBwrite\fR(2V)	 write output
.fi
sion required
for an operation is given as "{token}", where \(lqtoken\(rq is the type
of permission needed interpreted as follows:
.LP
.RS
.PD 0
.TP 28
00400
Read by user
.TP
00200
Alter by user
.TP
00060
Read, Alter by group
.TP
00006
Read, Alter by others
.RE
.PD
.LP
Read and Alter permissions on a semid are
granted to a proces./share/man/man2/WIFEXITED.2                                                                           755       0      12           66  4424740772  10271                                                                                                                                                                                                                                                                                                                                                                      .so man2/wait.2
.\" @(#)WIFEXITED.2 1.4 89/03/26 SMI;
 |  8Z  WIFSTOPPED.2  8Z     8[  _exit.2      8\  accept.2        8]  access.2        8^  acct.2 i     8_  	adjtime.2       8`  async_daemon.2 `     8a  audit.2     8b  	auditon.2   (  8c  
auditsvc.2 (  8  8d  bind.2 i  H  8e  brk.2  i  X  8f  chdir.2   h  8g  chmod.2   x  8h  chown.2     8i  chroot.2      8j  close.2     8k  	connect.2     8l  creat.2     8m  dup.2 2     8n  dup2./share/man/man2/WIFSIGNALED.2                                                                         755       0      12           70  4424740772  10470                                                                                                                                                                                                                                                                                                                                                                      .so man2/wait.2
.\" @(#)WIFSIGNALED.2 1.4 89/03/26 SMI;
     8[  _exit.2      8\  accept.2 .2      8]  access.2        8^  acct.2 2     8_  	adjtime.2  i     8`  async_daemon.2      8a  audit.2     8b  	auditon.2 2   (  8c  
auditsvc.2   8  8d  bind.2 c  H  8e  brk.2 nd  X  8f  chdir.2   h  8g  chmod.2   x  8h  chown.2     8i  chroot.2 .2     8j  close.2     8k  	connect.2 2     8l  creat.2     8m  dup.2 ea    8n  dup2.2 .     8o  execve.2./share/man/man2/WIFSTOPPED.2                                                                          755       0      12           67  4424740772  10426                                                                                                                                                                                                                                                                                                                                                                      .so man2/wait.2
.\" @(#)WIFSTOPPED.2 1.4 89/03/26 SMI;
\  accept.2 exi     8]  access.2 t.2     8^  acct.2 e     8_  	adjtime.2 ct     8`  async_daemon.2 i     8a  audit.2     8b  	auditon.2 di  (  8c  
auditsvc.2 .  8  8d  bind.2 i  H  8e  brk.2    X  8f  chdir.2   h  8g  chmod.2   x  8h  chown.2     8i  chroot.2 how    8j  close.2     8k  	connect.2 os    8l  creat.2     8m  dup.2      8n  dup2.2      8o  execve.2 up2    8p  exit.2 c  $./share/man/man2/_exit.2                                                                               755       0      12           62  4424740772  10045                                                                                                                                                                                                                                                                                                                                                                      .so man2/exit.2
.\" @(#)_exit.2 1.5 89/03/26 SMI;
8]  access.2 t.2     8^  acct.2 e     8_  	adjtime.2 ct     8`  async_daemon.2 t     8a  audit.2     8b  	auditon.2 di  (  8c  
auditsvc.2 .  8  8d  bind.2 i  H  8e  brk.2    X  8f  chdir.2   h  8g  chmod.2   x  8h  chown.2     8i  chroot.2 how    8j  close.2     8k  	connect.2 os    8l  creat.2     8m  dup.2      8n  dup2.2      8o  execve.2 up2    8p  exit.2 c  $  8q  fchdir.2 xit  8  8r./share/man/man2/accept.2                                                                              755       0      12         5716  4424740772  10247                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)accept.2 1.15 89/03/26 SMI; from UCB 6.3 5/22/86
.TH ACCEPT 2 "22 March 1989"
.SH NAME
accept \- accept a connection on a socket
.SH SYNOPSIS
.\" This is a dummy comment
.ft B
.nf
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
accept(s, addr, addrlen)
int s;
struct sockaddr *addr;
int *addrlen;
.fi
.ft R
.IX  accept  ""  "\fLaccept\fP \(em connection on socket"
.IX  "socket operations, accept connection" "" "socket operations, accept connection \(em \fLaccept\fP"
.IX  "interprocess communication"  "accept connection \(em \fLaccept\fP"
.IX  "connection"  "accept on socket \(em \fLaccept\fR"
.SH DESCRIPTION
The argument
.I s
is a socket that has been created with
.BR socket (2),
bound to an address with
.BR bind (2),
and is listening for connections after a
.BR listen (2).
.B accept(\|)
extracts the first connection
on the queue of pending connections, creates
a new socket with the same properties of
.I s
and allocates a new file descriptor
for the socket.  If no pending connections are
present on the queue, and the socket is not marked
as non-blocking,
.B accept(\|)
blocks the caller until a connection is present.
If the socket is marked non-blocking and no pending
connections are present on the queue,
.B accept(\|)
returns an error as described below.
The accepted socket
is used to read and write data to and from the socket which connected
to this one; it is not used
to accept more connections.  The original socket
.I s
remains open for accepting further connections.
.LP
The argument
.I addr
is a result parameter that is filled in with
the address of the connecting entity,
as known to the communications layer.
The exact format of the
.I addr
parameter is determined by the domain in which the communication
is occurring.
The
.I addrlen
is a value-result parameter; it should initially contain the
amount of space pointed to by
.IR addr ;
on return it will contain the actual length (in bytes) of the
address returned.
This call
is used with connection-based socket types, currently with
.SB SOCK_STREAM\s0\fR.
.LP
It is possible to
.BR select (2)
a socket for the purposes of doing an
.B accept(\|)
by selecting it for read.
.SH RETURN VALUE
The call returns \-1 on error.  If it succeeds, it returns a non-negative
integer that is a descriptor for the accepted socket.
.SH ERRORS
The
.B accept(\|)
will fail if:
.TP 20
.SM EBADF
The descriptor is invalid.
.TP
.SM ENOTSOCK
The descriptor references a file, not a socket.
.TP
.SM EOPNOTSUPP
The referenced socket is not of type
.SB SOCK_STREAM\s0\fR.
.TP
.SM EFAULT
The
.I addr
parameter is not in a writable part of the
user address space.
.TP
.SM EWOULDBLOCK
The socket is marked non-blocking and no connections
are present to be accepted.
.SH SEE ALSO
.BR bind (2),
.BR connect (2),
.BR listen (2),
.BR select (2),
.BR socket (2)
pair.2  9  
  9  stat.2 2  
  9  statfs.2./share/man/man2/access.2                                                                              755       0      12         5177  4424740772  10252                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)access.2 1.19 89/03/26 SMI; from UCB 4.2
.TH ACCESS 2 "22 March 1989"
.SH NAME
access \- determine accessibility of file
.SH SYNOPSIS
.nf
.ft B
#include <sys/file.h>
.LP
.ft B
.ta 1.25i 1.6i
.LP
.ft B
access(path, mode)
char *path;
int mode;
.fi
.ft R
.IX  access  ""  \fLaccess\fP
.IX  "file system"  access  ""  \fLaccess\fP
.IX  file  "determine accessibility of"
.SH DESCRIPTION
.I path
points to a path name naming a file.
.B access(\|)
checks the named file
for accessibility according to
.IR mode ,
which is an inclusive or of the bits
.SB R_OK
(test for read permission),
.SB W_OK
(test for write permission)
and
.SB s-1X_OK
(test for execute or search permission).
Specifying
.I mode
as
.SB F_OK
(that is, 0)
tests whether the directories leading to the file can be
searched and the file exists.
.LP
The real user
.SM ID
and the group access list (including the real group
.SM ID\s0)
are used in verifying permission, so
this call is useful to set-\s-1UID\s0
programs.
.LP
The owner of a file has permission checked with
respect to the
.I owner
read, write, and execute mode bits,
members of the file's group other than the owner have permission
checked with respect to the
.B group
mode bits, and all
others have permissions checked with respect to the
.I other
mode bits.
.LP
Notice that only access bits are checked.  A directory may be indicated as writable by
.BR access ,
but an attempt to open it for writing will fail
(although files may be created there); a file may look executable, but
.B execve(\|)
will fail unless it is in proper format.
.SH RETURN VALUE
If
.I path
cannot be found or if any of the desired access modes would
not be granted, then a \-1 value is returned; otherwise
a 0 value is returned.
.SH ERRORS
.B access(\|)
to the file is denied if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file named by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EROFS
The file named by
.I path
is on a read-only file system and write access was requested.
.TP
.SM EACCES
Permission bits of the file mode do not permit the requested
access to the file named by
.IR path .
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH SEE ALSO
.BR chmod (2),
.BR stat (2)
useraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2   
  9  
sigpause.2    
,  9  sigsetmask.2  
,  
@  9  
sigstack.2   
T  9  sigvec.2 2 @  
h  9  socket.2  
T  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2 2  
  9  swapon.2./share/man/man2/acct.2                                                                                755       0      12         5372  4424740773   7721                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)acct.2 1.19 89/03/26 SMI; from UCB 4.2 and S5
.TH ACCT 2 "20 November 1987"
.SH NAME
acct \- turn accounting on or off
.SH SYNOPSIS
.nf
.ft B
int acct (path)
char \(**path;
.ft R
.fi
.IX  acct  "\fLacct\fP \(em process accounting on or off" "\fLacct\fR"
.IX  "system operation support"  "process accounting \(em \fLacct\fR"
.IX  accounting  "process accounting, turn on or off \(em \fLacct\fR"
.SH DESCRIPTION
.B acct(\|)
is used to enable or disable the process accounting.
If process accounting is enabled, an accounting record will be written on an
accounting file for each process that terminates.
Termination can be caused by one of two things: an
.B exit(\|)
call or a signal; see
.BR exit (2)
and
.BR sigvec (2).
The effective user
.SM ID
of the calling process must be super-user to use this call.
.LP
.I path
points to a path name naming the accounting file.
The accounting file format is given in
.BR acct (5).
.LP
The accounting routine is enabled if
.I path
is not a
.SM NULL
pointer and no errors occur during the system call.
It is disabled if
.I path
is a
.SM NULL
pointer and no errors occur during the system call.
.LP
If accounting is already turned on, and a successful
.B acct(\|)
call is made with a non-\s-1NULL\s0
.IR path ,
all subsequent accounting records will be written to the new accounting file.
.SH RETURN VALUE
The value \-1 is returned if an error occurs, and external variable
.B errno
is set to indicate the cause of the
error.
Otherwise the value 0 is returned.
.SH ERRORS
.B acct(\|)
will fail if one of the following is true:
.TP 20
.SM EPERM
The caller is not the super-user.
.TP
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM EINVAL
Support for accounting was not configured into the system.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The named file does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM EACCES
The file referred to by
.I path
is not a regular file.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating the path name.
.TP
.SM EROFS
The named file resides on a read-only file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR exit (2),
.BR sigvec (2),
.BR acct (5),
.BR sa (8)
.SH BUGS
No accounting is produced for programs running when a crash occurs.
In particular non-terminating programs are never accounted for.
.SH NOTES
Accounting is automatically disabled when the file system the
accounting file resides on runs out of space; it is enabled when
space once again becomes available.

   9  
sigblock.2    
  9  
sigpause.2   
,  9  sigsetmask.2  
,  
@  9  
sigstack.2 ,  
T  9  sigvec.2 2   
h  9  socket.2 2 @  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2 2  
  9  swapon.2 2 2  
  9  	symlink../share/man/man2/adjtime.2                                                                             755       0      12         4704  4424740773  10422                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adjtime.2 1.17 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH ADJTIME 2 "22 March 1989"
.SH NAME
adjtime \- correct the time to allow synchronization of the system clock
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h>
.LP
.ft B
int adjtime(delta, olddelta)
struct timeval \(**delta;
struct timeval \(**olddelta;
.fi
.SH DESCRIPTION
.IX  adjtime  ""  "\fLadjtime\fR \(em adjust time"
.IX  time  "adjust adjtime"  ""  "adjust \(em \fLadjtime\fR"
.B adjtime(\|)
adjusts the system's notion of the current time,
as returned by
.BR gettimeofday (2),
advancing or retarding it by the amount of time specified in the
.B struct timeval
(defined in
.BR /usr/include/sys/time.h )
pointed to by
.IR delta .
.LP
The adjustment is effected by speeding up (if that amount of time
is positive) or slowing down (if that amount of time is negative)
the system's clock by some small percentage, generally a fraction of
one percent.
Thus, the time is always
a monotonically increasing function.
A time correction from an earlier call to
.B adjtime(\|)
may not be finished when
.B adjtime(\|)
is called again.  If
.I olddelta
is not a
.SM NULL
pointer, then the structure it points to will contain, upon return, the
number of microseconds still to be corrected
from the earlier call.
If
.I olddelta
is a
.SM NULL
pointer, the corresponding information will not be returned.
.LP
This call may be used in time servers that synchronize the clocks
of computers in a local area network.
Such time servers would slow down the clocks of some machines
and speed up the clocks of others to bring them to the average network time.
.LP
Only the super-user may adjust the time of day.
.LP
The adjustment value will be silently rounded to the resolution
of the system clock.
.SH RETURN
A 0 return value indicates that the call succeeded.
A \-1 return value indicates an error occurred, and in this
case an error code is stored into the global variable
.BR errno .
.SH ERRORS
The following error codes may be set in
.BR errno :
.TP 15
.SM EFAULT
.I delta
or
.I olddelta
points outside the process's allocated address space, or
.I olddelta
points to a region of the process' allocated address space that is not
writable.
.TP
.SM EPERM
The process's effective user
.SM ID
is not that of the super-user.
.SH "SEE ALSO"
.BR date (1V),
.BR gettimeofday (2)
  	  9  
setregid.2   	  9  
setreuid.2   	0  9  ./share/man/man2/async_daemon.2                                                                        755       0      12           73  4424740773  11400                                                                                                                                                                                                                                                                                                                                                                      .so man2/nfssvc.2
.\" @(#)async_daemon.2 1.5 89/03/26 SMI;
	auditon.2 2   (  8c  
auditsvc.2   8  8d  bind.2 c  H  8e  brk.2 nd  X  8f  chdir.2   h  8g  chmod.2   x  8h  chown.2     8i  chroot.2 .2     8j  close.2     8k  	connect.2 2     8l  creat.2     8m  dup.2 ea    8n  dup2.2 .     8o  execve.2 2 a    8p  exit.2 2  $  8q  fchdir.2 2 .  8  8r  fchmod.2  $  L  8s  fchown.2  8  `  8t  	fchroot.2 L  t  8u  fcntl.2v  `    8v  flock.2   ./share/man/man2/audit.2                                                                               755       0      12         2326  4424740773  10111                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit.2 1.11 89/03/26 SMI;
.TH AUDIT 2 "22 March 1989"
.SH NAME
audit \- write a record to the audit log
.SH SYNOPSIS
.nf
.ft B
#include <sys/label.h>
#include <sys/audit.h>
.LP
.ft B
audit (record)
audit_record_t *record;
.fi
.SH DESCRIPTION
.IX "audit function" "" "\fLaudit()\fP function"
.LP
The
.B audit(\|)
system call is used to write a record to the system audit log file.
The data pointed to by
.I record
is written to the audit log file.
The data should be a well-formed audit record as described by
.BR audit.log (5).
The kernel sets the time stamp value in the record and performs
a minimal check on the data before writing it to the audit log file.
.LP
Only the super-user may successfully execute this call.
.SH "RETURN VALUE
If the call succeeds, a value of 0 is returned.
If an error occurs, the value \-1 is returned.
.SH ERRORS
.TP 15
.SM EPERM
The process's effective user
.SM ID
is not super-user.
.TP
.SM EINVAL
The length specified in the audit record is too short,
or more than
.SB MAXAUDITDATA\s0\fR.
.TP
.SM EFAULT
.I record
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR auditsvc (2),
.BR getauid (2),
.BR setuseraudit (2),
.BR audit_args (3),
.BR audit.log (5),
.BR auditd (8)
tuid.2 day    8  ioctl.2   (  8  kill.2v   <  8  killpg.2 ill  L  8  link.2 l  \  8  list.2   p  8  listen.2 ist    8  lseek.2     8  lstat.2     8  	mincore.2 ta    8  mkdir.2     8  mknod.2     8  mmap.2     8  mount.2      8  
mpro./share/man/man2/auditon.2                                                                             755       0      12         2760  4424740773  10450                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)auditon.2 1.8 89/03/26 SMI;
.TH AUDITON 2 "22 March 1989"
.SH NAME
auditon \- manipulate auditing
.SH SYNOPSIS
.nf
.ft B
#include <sys/label.h>
#include <sys/audit.h>
.LP
.ft B
auditon (condition)
int condition;
.fi
.SH DESCRIPTION
.IX "auditon function" "" "\fLauditon()\fP function"
.LP
The
.B auditon(\|)
system call sets system auditing to the requested
.I condition
if and only if the current state of auditing allows that transition.
Legitimate values for
.I condition
are:
.LP
.RS
.PD 0
.TP 20
.SB AUC_UNSET
on/off has not been decided yet
.TP
.SB AUC_AUDITING
auditing is to be done
.TP
.SB AUC_NOAUDIT
auditing is not to be done
.PD
.RE
.LP
The permitted transitions are:
.TP 3
\(bu
Any condition may be changed back to itself.
.TP 3
\(bu
.SB AUC_UNSET
may be changed to
.SB AUC_AUDITING
or
.SB AUC_NOAUDIT\s0\fR.
.TP 3
\(bu
.SB AUC_AUDITING
may be changed to
.SB AUC_NOAUDIT\s0\fR.
.TP 3
\(bu
.SB AUC_NOAUDIT
may be changed to
.SB AUC_AUDITING\s0\fR.
.LP
Once changed, it is not possible to get back to
.SB AUC_UNSET\s0\fR.
.LP
Only the super-user may successfully execute this call.
.SH "RETURN VALUE"
If the call succeeds the old audit condition value is returned.
If an error occurs, the value \-1 is returned.
.SH "ERRORS"
.TP 15
.SM EPERM
Neither of the process's effective or real user
.SM ID
is super-user.
.TP
.SM EINVAL
The
.I condition
specified is outside the range of valid values,
or the current condition precludes the requested change.
.SH "SEE ALSO"
.BR audit (2),
.BR setuseraudit (2)
.2      8  ./share/man/man2/auditsvc.2                                                                            755       0      12         6134  4424740773  10626                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)auditsvc.2 1.12 89/03/26 SMI;
.TH AUDITSVC 2 "22 March 1989"
.SH NAME
auditsvc \- write audit records to specified file descriptor
.SH SYNOPSIS
.nf
.ft B
auditsvc(fd, limit)
int fd;
int limit;
.fi
.SH DESCRIPTION
.IX "auditsvc function" "" "\fLauditsvc()\fP function"
.LP
The
.B auditsvc(\|)
system call specifies the audit log file to the kernel.
The kernel writes audit records to this file until an exceptional
condition occurs and then the call returns.
The parameter
.I fd
is a file descriptor that identifies the audit file.
Programs should open this file for writing before calling
.BR auditsvc .
The parameter
.I limit
specifies a value between 0 and 100, instructing
.B auditsvc(\|)
to return when the percentage of free disk space
on the audit filesystem drops below this limit.
Thus, the invoking program can take action
to avoid running out of disk space.  The
.B auditsvc(\|)
system call does not return until one of
the following conditions occurs:
.TP 3
\(bu
The process receives a signal that is not blocked or ignored.
.TP
\(bu
An error is encountered writing to the audit log file.
.TP
\(bu
The minimum free space (as specified by
.IR limit ),
has been reached.
.LP
Only processes with a real or effective user
.SM ID
of super-user may execute this call successfully.
.SH "RETURN VALUE
This call only returns on an error.
.SH ERRORS
.TP 20
.SM EPERM
The process's effective or real user
.SM ID
is not super-user.
.TP
.SM EBUSY
A second process attempted to perform this call.
.TP
.SM EBADF
.I fd
is not a valid descriptor open for writing.
.TP
.SM EPIPE
An attempt is made to write to a pipe that is not open
for reading by any process (or to a socket of type
.SB SOCK_STREAM
that is connected to a peer socket.)  Note: an attempted write of this
kind will also cause you to receive a
.SB SIGPIPE
signal from the
kernel.  If you've not made a special provision to catch or ignore this
signal, your process will die.
.TP
.SM EFBIG
An attempt was made to write a file that exceeds the process's
file size limit or the maximum file size.
.TP
.SM EINTR
The call is forced to terminate prematurely due to the arrival of a signal whose
.SB SV_INTERRUPT
bit in
.B sv_flags
is set  (see
.BR sigvec (2)).
.BR signal (3V),
in the System V compatibility library, sets this bit for any signal it catches.
.TP
.SM ENOSPC
There is no free space remaining on the file system containing the file.
.TP
.SM EDQUOT
The user's quota of disk blocks on the file system containing the
file has been exhausted.
.TP
.SM EDQUOT
Audit filesystem space is below the specified limit.
.TP
.SM EIO	
An I/O error occurred while reading from or writing to the file system.
.TP
.SM ENXIO
A hangup occurred on the
.I stream
being written to.
.TP
.SM EWOULDBLOCK
The file was marked for 4.2\s-1BSD\s0-style non-blocking I/O,
and no data could be written immediately.
.TP
.SM EAGAIN
The descriptor referred to a
.IR stream ,
was marked for System V-style non-blocking I/O,
and no data could be written immediately.
.TP
.SM EBUSY
A second process attempted to perform this call.
.SH "SEE ALSO"
.BR audit (2),
.BR sigvec (2),
.BR signal (3V),
.BR audit.log (5),
.BR auditd (8)
msync.2     9  munmap.2 .2     9  nfssvc.2      9  open.2v     9  pipe.2 n    9  poll.2 e    9  profil.2 2     9  ptrace.2      9  putmsg.2      9  
quotactl.2   (  9  read.2v   <  9  
readlink.2    P  9  readv.2v 2 <  d  9  reboot.2  P  t  9  recv.2 2    9  
recvfrom.2 v    9  	recvmsg.2      9  rename.2      9  rmdir.2   ./share/man/man2/bind.2                                                                                755       0      12         5546  4424740773   7726                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bind.2 1.18 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH BIND 2 "22 March 1989"
.SH NAME
bind \- bind a name to a socket
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
bind(s, name, namelen)
int s;
struct sockaddr *name;
int namelen;
.fi
.IX  bind  ""  \fLbind\fP
.IX  "socket operations"  bind  ""  \fLbind\fP
.IX  "interprocess communication"  bind  ""  \fLbind\fP
.SH DESCRIPTION
.B bind(\|)
assigns a name to an unnamed socket.
When a socket is created with
.BR socket (2)
it exists in a name space (address family)
but has no name assigned.
.B bind(\|)
requests that the name pointed to by
.I name
be assigned to the socket.
.SH RETURN VALUE
If the bind is successful, a 0 value is returned.
A return value of \-1 indicates an error, which is
further specified in the global
.BR errno .
.SH ERRORS
The
.B bind(\|)
call will fail if:
.TP 20
.SM EBADF
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
.I s
is a descriptor for a file, not a socket.
.TP
.SM EADDRNOTAVAIL
The specified address is not available from the local machine.
.TP
.SM EADDRINUSE
The specified address is already in use.
.TP
.SM EINVAL
.I namelen
is not the size of a valid address for the specified address family.
.TP
.SM EINVAL
The socket is already bound to an address.
.TP
.SM EACCES
The requested address is protected, and the current user
has inadequate permission to access it.
.TP
.SM EFAULT
The
.I name
parameter is not in a valid part of the user
address space.
.LP
The following errors are specific to
binding names in the
.SM UNIX
domain.
.TP 20
.SM ENOTDIR
A component of the path prefix of the path name in
.I name
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of the path name in
.I name
exceeds 255 characters,
or the length of the path name in
.I name
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of the path name in
.I name
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of the
path name in
.IR name .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating the path name in
.IR name .
.TP
.SM EIO
An I/O error occurred while making the directory entry or allocating the inode.
.TP
.SM EROFS
The inode would reside on a read-only file system.
.TP
.SM EISDIR
A null path name was specified.
.SH SEE ALSO
.BR connect (2),
.BR getsockname (2),
.BR listen (2),
.BR socket (2),
.BR unlink (2)
.SH NOTES
Binding a name in the
.SM UNIX
domain creates a socket in the file
system that must be deleted by the caller when it is no longer
needed (using
.BR unlink (2)).
.LP
The rules used in name binding vary between communication domains.
Consult the manual entries in section 4 for detailed information.
9  	symlink.2 
  
  9  sync.2 .  
  9  	syscall.2  .     9  tell.2 .    9  
truncate.2 .  $  9  umask.2   8  9  uname.2v .2   L./share/man/man2/brk.2                                                                                 755       0      12         5027  4424740774   7563                                                                                                                                                                                                                                                                                                                                                                      .\" 1008444
.\" @(#)brk.2 1.19 89/03/26 SMI; from UCB 4.2
.TH BRK 2 "22 March 1989"
.SH NAME
brk, sbrk \- change data segment size
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
.LP
.ft B
int brk(addr)
caddr_t addr;
.LP
.ft B
caddr_t sbrk(incr)
int incr;
.fi
.IX  brk  ""  "\fLbrk\fP \(em set data segment break"
.IX  "memory management"  brk  ""  "\fLbrk\fP \(em set data segment break"
.IX  sbrk  ""  "\fLsbrk\fP \(em change data segment size"
.IX  "memory management"  sbrk  ""  "\fLsbrk\fP \(em change data segment size"
.IX  "change" "data segment size \(em \fLsbrk\fR"
.IX  "data segment size, change \(em \fLsbrk\fR"
.SH DESCRIPTION
.B brk(\|)
sets the system's idea of the lowest data segment
location not used by the program (called the 
.IR break )
to
.I addr
(rounded up to the next multiple of the system's page size).
.LP
In the alternate function
.BR sbrk(\|) ,
.I incr
more bytes are added to the
program's data space and a pointer to the
start of the new area is returned.
.LP
When a program begins execution using
.B execve(\|)
the break is set at the
highest location defined by the program
and data storage areas.
.LP
The
.BR getrlimit (2)
system call may be used to determine
the maximum permissible size of the
.I data
segment; it will not be possible to set the break beyond the
.B rlim_max
value returned from a call to
.BR getrlimit(\|) ,
that is to say, \*(lq\fBetext + rlim.rlim_max\fR.\*(rq
(See
.BR end (3)
for the definition of
.BR etext .)
.SH RETURN VALUE
.B brk(\|)
returns 0 on success, while 
.B sbrk(\|)
returns the old break value.
If the break cannot be set,
.B brk(\|)
returns \-1;
.B sbrk(\|)
returns
.B (caddr_t) \-1
on error.
.SH ERRORS
.B brk(\|)
and
.B sbrk(\|)
will fail and no additional memory will be allocated if
one of the following are true:
.TP 15
.SM ENOMEM
The data segment size limit, as set by
.B setrlimit 
(see
.BR getrlimit (2)),
would be exceeded.
.TP
.SM ENOMEM
The maximum possible size of a data segment (compiled into the
system) would be exceeded.
.TP
.SM ENOMEM
Insufficient space exists in the swap area
to support the expansion.
.TP
.SM ENOMEM
Out of address space;
the new break value would extend into an area of the address
space defined by some previously established
mapping (see
.BR mmap (2).
.SH "SEE ALSO"
.BR execve (2),
.BR mmap (2),
.BR getrlimit (2),
.BR malloc (3),
.BR end (3)
.SH BUGS
Setting the break may fail due to a temporary lack of
swap space.  It is not possible to distinguish this
from a failure caused by exceeding the maximum size of
the data segment without consulting
.BR getrlimit(\|) .
  9  shmget.2  	  	  9  shmop.2   	  9  
shutdown.2   
   9  
sigblock.2    
  9  
sigpause.2   
,  9  sigsetmask.2  9  
@  9  
sigstack.2 @  
T  9  sigvec.2  
T  
h  9  socket.2  
h  
  9  socketpair.2  9  
  9  stat.2   
  9  statfs.2  
  
  9  swapon.2  
  
  9  	symlink.2 
  
  9  sync.2   
  9  	syscall.2 
     9  tell.2 .    9  
truncate.2   $  9  umask.2   8  9  uname.2v  8  L  9  unlink.2  L./share/man/man2/chdir.2                                                                               755       0      12         2566  4424740774  10103                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chdir.2 1.20 89/03/26 SMI; from 4.2 BSD
.TH CHDIR 2 "22 March 1989"
.SH NAME
chdir \- change current working directory
.SH SYNOPSIS
.nf
.ft B
int chdir(path)
char \(**path;
.LP
.ft B
int fchdir(fd)
int fd;
.ft R
.fi
.IX  chdir  ""  \fLchdir\fP
.IX  "file system"  chdir  ""  \fLchdir\fP
.IX  change  "current working directory"
.IX  "current directory"  change
.IX  "working directory"  change
.IX  directory  "change current"
.SH DESCRIPTION
.B chdir(\|)
and
.B fchdir(\|)
cause a directory
to become the current working directory, that is,
the starting point for pathnames not beginning with
.RB ` / '.
.LP
In order for a directory to become the current directory,
a process must have execute (search) access to the directory.
.LP
The
.I path
argument to
.B chdir(\|)
points to the pathname of a directory.  The
.I fd
argument to
.B fchdir(\|)
is the open file descriptor of a directory.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate
the error.
.SH WARNING
.B fchdir(\|)
is provided as a performance enhancement and is guaranteed to fail
under certain conditions.
In particular, if auditing is active the call will never succeed, and
.SM EINVAL
will be returned.
Applications which use this system call must be coded to detect this
failure and switch to using
.B chdir(\|)
from that point on.
D  8  
getpgrp.2v D  X  8  getpid.2  X  l  8  	getppid.2 l    8  
getpriority.2 8    8  getrlimit.2     8  getr./share/man/man2/chmod.2                                                                               755       0      12         7151  4424740774  10077                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chmod.2 1.26 89/03/26 SMI; from UCB 4.2
.TH CHMOD 2 "22 March 1989"
.SH NAME
chmod, fchmod \- change mode of file
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/stat.h>
.LP
.ft B
int chmod(path, mode)
char \(**path;
int mode;
.LP
.ft B
int fchmod(fd, mode)
int fd, mode;
.fi
.IX  chmod  ""  \fLchmod\fP
.IX  "file system"  chmod  ""  \fLchmod\fP
.IX  fchmod  ""  \fLfchmod\fP
.IX  "file system"  fchmod  ""  \fLfchmod\fP
.IX  "change" "file mode \(em \fLchmod\fR"
.IX  "sticky bit \(em \fLchmod\fP"
.SH DESCRIPTION
The file whose name is given by
.I path
or referenced by the descriptor
.I fd
has its mode changed to
.IR mode .
Modes are constructed by
\s-1OR\s0ing
together some combination of the following:
.LP
.RS
.ft B
.nf
\s-1S_ISUID \s0	04000 set user \s-1ID\s0 on execution
\s-1S_ISGID \s0	02000 set group \s-1ID\s0 on execution
\s-1S_ISVTX\s0	01000 save text image after execution (sticky bit)
\s-1S_IREAD\s0	00400 read by owner
\s-1S_IWRITE\s0	00200 write by owner
\s-1S_IEXEC\s0	00100 execute (search on directory) by owner
		00070 read, write, execute (search) by group
		00007 read, write, execute (search) by others
.ft R
.fi
.RE
.LP
These bit patterns are defined in
.BR /usr/include/sys/stat.h .
.LP
The effective user
.SM ID
of the process must match the owner of the file or be
super-user to change the mode of a file.
.LP
If the effective user
.SM ID
of the process is not super-user and the process
attempts to set the set group
.SM ID
bit on a file owned by a group
which is not in its group access list, mode bit 02000 (set group
.SM ID
on execution) is cleared.
.LP
If mode bit 01000 is set on a directory,
an unprivileged user may not delete or rename
files of other users in that directory.
.LP
If a user other than the super-user writes to a file, the set user
.SM ID
and set group
.SM ID
bits are turned off.  This makes the system somewhat more secure
by protecting set-user-\s-1ID\s0
(set-group-\s-1ID\s0)
files from remaining set-user-\s-1ID\s0
(set-group-\s-1ID\s0)
if they are modified, at the expense of a degree of
compatibility.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B chmod(\|)
will fail and the file mode will be unchanged if:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EPERM
The effective user
.SM ID
does not match the owner of the file and
the effective user
.SM ID
is not the super-user.
.TP
.SM EINVAL
.I fd
refers to a socket, not to a file.
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.LP
.B fchmod(\|)
will fail if:
.TP 20
.SM EBADF
The descriptor is not valid.
.TP
.SM EROFS
The file referred to by
.I fd
resides on a read-only file system.
.TP
.SM EPERM
The effective user
.SM ID
does not match the owner of the file and the
effective user
.SM ID
is not the super-user.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH FILES
.PD 0
.TP 20
.B /usr/include/sys/stat.h
.PD
.SH "SEE ALSO"
.BR chown (2),
.BR open (2V),
.BR stat (2),
.BR sticky (8)
\fR	\fBsocketpair\fR(2)	 create a pair of connected sockets
\fBstat(\|)\fR	\fBstat\fR(2)	 get file status
\fBstatfs(\|)\fR	\fBstatfs\fR(2)	 get file system statistics
\fBswapon(\|)\fR	\fBswapon\fR(2)	 add a swap device for interleaved paging/swapping
\fBsymlink(\|)\fR	\fBsymlink\fR(2)	 make symbolic link to a file
\fBsync(\|)\fR	\fBsync\fR(2)	 update super-block
\fBsyscall(\|)\fR	\fBsyscall\fR(2)	 indire./share/man/man2/chown.2                                                                               755       0      12         6776  4424740774  10137                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chown.2 1.23 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH CHOWN 2 "22 March 1989"
.SH NAME
chown, fchown \- change owner and group of a file
.SH SYNOPSIS
.nf
.ft B
int chown(path, owner, group)
char \(**path;
int owner, group;
.LP
.ft B
int fchown(fd, owner, group)
int fd, owner, group;
.fi
.IX  chown  ""  \fLchown\fP
.IX  "file system"  chown  ""  \fLchown\fP
.IX  fchown  ""  \fLfchown\fP
.IX  "file system"  fchown  ""  \fLfchown\fP
.IX  "change" "owner and group of file \(em \fLchown\fR"
.SH DESCRIPTION
The file
that is named by
.I path
or referenced by
.I fd
has its
.I owner
and
.I group
changed as specified.  Only the super-user
may change the owner of the file,
because if users were able to give files away,
they could defeat the file-space accounting procedures.
The owner of the file may change the group
to a group of which he is a member; the super-user may change the group
arbitrarily.
.LP
.B fchown(\|)
is particularly useful when used in conjunction
with the file locking primitives (see
.BR flock (2)).
.LP
If
.I owner
or
.I group
is specified as \-1, the corresponding
.SM ID
of the file is not changed.
.LP
If a process whose effective user
.SM ID
is not super-user successfully
changes the group
.SM ID
of a file, the set-user-\s-1ID\s0 and set-group-\s-1ID\s0
bits of the file mode, 04000 and 02000 respectively,
will be cleared.
.LP
If the final component of
.I path
is a symbolic link,
the ownership and group of the symbolic link is changed,
not the ownership and group of the file or directory to which it points.
.SH RETURN VALUE
Zero is returned if the operation was successful;
\-1 is returned, and a more specific error code is placed in the global
variable
.BR errno ,
if an error occurs.
.SH ERRORS
.B chown(\|)
will fail and the file will be unchanged if:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EPERM
The user
.SM ID
specified by
.I owner
is not the current owner
.SM ID
of the file, or the group
.SM ID
specified by
.I group
is not the current group
.SM ID
of the file and is not in the process'
group access list, and the effective user
.SM ID
is not the super-user.
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.LP
.B fchown(\|)
will fail if:
.TP 20
.SM EBADF
.I fd
does not refer to a valid descriptor.
.TP
.SM EINVAL
.I fd
refers to a socket, not a file.
.TP
.SM EPERM
The user
.SM ID
specified by
.I owner
is not the current owner
.SM ID
of the file, or the group
.SM ID
specified by
.I group
is not the current group
.SM ID
of the file and is not in the
group access list, and the effective user
.SM ID
is not the super-user.
.TP
.SM EROFS
The file referred to by
.I fd
resides on a read-only file system.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR chmod (2),
.BR flock (2)
0
./share/man/man2/chroot.2                                                                              755       0      12         6573  4424740774  10312                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chroot.2 1.23 89/03/26 SMI; from UCB 4.3
.TH CHROOT 2 "22 March 1989"
.SH NAME
chroot \- change root directory
.SH SYNOPSIS
.nf
.ft B
int chroot(dirname)
char \(**dirname;
.LP
.ft B
int fchroot(fd)
int fd;
.ft R
.fi
.IX  chroot  "" "\fLchroot\fP \(em change root directory"
.IX  change  "root directory \(em \fLchroot\fR"
.IX  "root directory, change \(em \fLchroot\fR"
.IX  directory  "change root \(em \fLchroot\fR"
.SH DESCRIPTION
.B chroot(\|)
and
.B fchroot(\|)
cause a directory to become the root directory,
the starting point for path names beginning with
.RB ` / '.
The current working directory is unaffected by this call.
This root directory setting is inherited across
.BR execve (2)
and by all children of this process created with
.BR fork (2)
calls.
.LP
In order for a directory to become the root directory
a process must have execute (search) access to the directory
and either the effective user
.SM ID
of the process must be super-user
or the target directory must be the system root or a loop-back mount of the
system root (see
.BR lofs (4S)).
.B fchroot(\|)
is further restricted in that while it is always possible to change
to the system root using this call, it is not guaranteed to succeed in
any other case, even should
.I fd
be in all respects valid.
.LP
The
.I dirname
argument to
.B chroot(\|)
points to a path name of a directory.  The
.I fd
argument to
.B fchroot(\|)
is the open file descriptor of the directory which is to become the
root.
.LP
The
.B .\|.
entry in the root directory is interpreted to mean the root directory
itself.  Thus,
.B .\|.
cannot be used to access files outside the subtree rooted at the root
directory.
Instead,
.B fchroot(\|)
can be used to set the root back to a directory which was opened before
the root directory was changed.
.SH WARNING
The only use of
.B fchroot(\|)
that is appropriate is to change back to the system root.
While it may succeed in some other cases, it is guaranteed to fail if
auditing is enabled.
Super-user processes are not exempt from this limitation.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of \-1 is returned and
.B errno
is set to indicate an error.
.SH ERRORS
.B chroot(\|)
will fail and the root directory will be unchanged if
one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I dirname
is not a directory.
.TP
.SM ENOTDIR
The file referred to by
.I dirname
is not a directory.
.TP
.SM EINVAL
.B fchroot(\|)
attempted to change to a directory which is not the system root and
external circumstances, such as auditing, do not allow this.
.TP
.SM ENAMETOOLONG
The length of a component of
.I dirname
exceeds 255 characters,
or the length of
.I dirname
exceeds 1023 characters.
.TP
.SM ENOENT
The directory referred to by
.I dirname
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR dirname .
.TP
.SM EACCES
Search permission is denied for the directory referred to by
.IR dirname .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR dirname .
.TP
.SM EPERM
The effective user
.SM ID
is not super-user.
.TP
.SM EFAULT
.I dirname
points outside the process's allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EBADF
The descriptor is not valid.
.SH "SEE ALSO"
.BR chdir (2),
.BR execve (2),
.BR fork (2),
.BR lofs (4S)
m.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR chmod (2),
.BR flock (2)
0
./share/man/man2/close.2                                                                               755       0      12         6523  4424740774  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)close.2 1.23 89/03/26 SMI; from UCB 4.3 and S5R3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH CLOSE 2 "22 March 1989"
.SH NAME
close \- delete a descriptor
.SH SYNOPSIS
.nf
.B "int close (des)"
.B "int des;"
.fi
.IX  close  ""  \fLclose\fP
.IX  descriptors  close  ""  \fLclose\fP
.IX  descriptors  delete
.IX  "delete descriptor"
.SH DESCRIPTION
The
.B close(\|)
call deletes a descriptor from the per-process object
reference table.
If this is the last reference to the underlying object, then
it will be deactivated.
For example, on the last close of a file
the current
.I seek
pointer associated with the file is lost;
on the last close of a
.BR socket (2)
associated naming information and queued data are discarded;
on the last close of a file holding an advisory lock
the lock is released (see
.BR flock (2)
for further information).
.B close(\|)
does
.IR not ,
however,
unmap memory mapped to
a descriptor
(see
.BR mmap (2),
.BR munmap (2)).
.LP
A close of all of a process's descriptors is automatic on
.BR exit ,
but since there is a limit on the number of active descriptors per process,
.B close(\|)
is necessary for programs that deal with many descriptors.
.LP
When a process forks (see
.BR fork (2)),
all descriptors for the new child process reference the same
objects as they did in the parent before the fork.
If a new process is then to be run using
.BR execve (2),
the process would normally inherit these descriptors.  Most
of the descriptors can be rearranged with
.BR dup (2)
or deleted with
.B close(\|)
before the
.B execve(\|)
is attempted, but if some of these descriptors will still
be needed if the
.B execve(\|)
fails, it is necessary to arrange for them to be closed if the
.B execve(\|)
succeeds.  The
.BR fcntl (2V)
operation
.SB F_SETFD
can be used to arrange that a descriptor will be closed
after a successful
.BR execve ,
or to restore the default behavior,
which is to not close the descriptor.
.LP
If a
.SM STREAMS
(see
.BR intro (2))
file is closed, and the calling process had
previously registered to receive a
.SB SIGPOLL
signal (see
.BR sigvec (2))
for events associated with that file (see
.SB I_SETSIG
in
.BR streamio (4)),
the calling process will be unregistered for events associated with the file.
The last
.B close(\|)
for a stream causes that stream to be dismantled.
If the descriptor is not marked for no-delay mode
and there have been no signals posted for the stream,
.B close(\|)
waits up to 15 seconds, for each module and driver, for any output to drain
before dismantling the stream.
If the descriptor is marked for no-delay mode or if there are any
pending signals,
.B close(\|)
does not wait for output to drain, and
dismantles the stream immediately.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and the global integer variable
.B errno
is set to indicate the error.
.SH ERRORS
.B close(\|)
will fail if:
.TP 15
.SM EBADF
.I des
is not an active descriptor.
.TP
.SM EINTR
A signal was caught before the close completed.
.SH "SEE ALSO"
.BR accept (2),
.BR dup (2),
.BR execve (2),
.BR fcntl (2V),
.BR flock (2),
.BR intro (2),
.BR open (2V),
.BR pipe (2),
.BR sigvec (2),
.BR socket (2),
.BR socketpair (2),
.BR streamio (4)
execve (2),
.BR fork (2),
.BR lofs (4S)
m.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR chmod (2),
.BR flock (2)
0
./share/man/man2/connect.2                                                                             755       0      12        10366  4424740775  10461                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)connect.2 1.20 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH CONNECT 2 "20 November 1987"
.SH NAME
connect \- initiate a connection on a socket
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
connect(s, name, namelen)
int s;
struct sockaddr *name;
int namelen;
.fi
.IX  connect  ""  \fLconnect\fP
.IX  "socket operations"  connect  ""  \fLconnect\fP
.IX  "interprocess communication"  connect  ""  \fLconnect\fP
.IX  initiate  "connection on socket \(em \fLconnect\fR"
.SH DESCRIPTION
The parameter
.I s
is a socket.
If it is of type
.SM
.BR SOCK_DGRAM \*S,
then this call specifies the peer with which the socket is to be associated;
this address is that to which datagrams are to be sent,
and the only address from which datagrams are to be received.
If it is of type
.SM
.BR SOCK_STREAM \*S,
then this call attempts to make a connection to
another socket.
The other socket is specified by
.I name
which is an address in the communications space of the socket.
Each communications space interprets the
.I name
parameter in its own way.
Generally, stream sockets may successfully
.B connect(\|)
only once; datagram sockets may use
.B connect(\|)
multiple times to change their association.
Datagram sockets may dissolve the association
by connecting to an invalid address, such as a null address.
.SH RETURN VALUE
If the connection or binding succeeds, then
0 is returned.
Otherwise a \-1 is returned, and a more specific error
code is stored in
.BR errno .
.SH ERRORS
The call fails if:
.TP 20
.SM EBADF
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
.I s
is a descriptor for a file, not a socket.
.TP
.SM EINVAL
.I namelen
is not the size of a valid address for the specified address family.
.TP
.SM EADDRNOTAVAIL
The specified address is not available on the remote machine.
.TP
.SM EAFNOSUPPORT
Addresses in the specified address family cannot be used with this socket.
.TP
.SM EISCONN
The socket is already connected.
.TP
.SM ETIMEDOUT
Connection establishment timed out without establishing a connection.
.TP
.SM ECONNREFUSED
The attempt to connect was forcefully rejected.
The calling program should
.BR close (2)
the socket descriptor, and issue another
.BR socket (2)
call to obtain a new descriptor before attempting another
.BR connect (2)
call.
.TP
.SM ENETUNREACH
The network is not reachable from this host.
.TP
.SM EADDRINUSE
The address is already in use.
.TP
.SM EFAULT
The
.I name
parameter specifies an area outside
the process address space.
.TP
.SM EINPROGRESS
The socket is non-blocking and the connection cannot
be completed immediately.  It is possible to
.BR select (2)
for completion by selecting the socket for writing.
.TP
.SM EALREADY
The socket is non-blocking
and a previous connection attempt
has not yet been completed.
.TP
.SM EINTR
The connection attempt was interrupted before
any data arrived by the delivery of a signal.
.LP
The following errors are specific to connecting names in the
.SM UNIX
domain.  These errors may not apply in future versions of the
.SM UNIX IPC
domain.
.TP 20
.SM ENOTDIR
A component of the path prefix of the path name in
.I name
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of the path name in
.I name
exceeds 255 characters,
or the length of the entire path name in
.I name
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of the path name in
.I name
does not exist.
.TP
.SM ENOENT
The socket referred to by the path name in
.I name
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of the
path name in
.IR name .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating the path name in
.IR name .
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM ENOTSOCK
The file referred to by
.I name
is not a socket.
.TP
.SM EPROTOTYPE
The file referred to by
.I name
is a socket of a type other than the type of
.I s
(e.g.,
.I s
is a
.SB SOCK_DGRAM
socket, while
.I name
refers to a
.SB SOCK_STREAM
socket).
.SH SEE ALSO
.BR accept (2),
.BR close (2),
.BR connect (2),
.BR getsockname (2),
.BR select (2),
.BR socket (2)
 setrlimit.2   	H  9  setsockopt.2  9  	`  9  settimeofday.2   	x  9  setuseraudit.2   	  9  shmat.2   	  9  shmctl.2  	  	  9  shmdt.2   	  9  shmget.2  	  	  9  shmop.2   	  9  
shutdown.2   
   9  
sigblock.2    
  9  
./share/man/man2/creat.2                                                                               755       0      12        11057  4424740775  10124                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)creat.2 1.23 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH CREAT 2 "22 November 1987"
.SH NAME
creat \- create a new file
.SH SYNOPSIS
.nf
.ft B
int creat(name, mode)
char \(**name;
int mode;
.ft R
.fi
.IX  creat  ""  \fLcreat\fP
.IX  file  "create new"
.SH DESCRIPTION
This interface is made obsolete by
.BR open (2V).
.LP
.B creat(\|)
creates a new ordinary file or prepares to rewrite an existing file
named by the path name pointed to by
.IR name .
If the file did not exist, it is given mode
.IR mode ,
as modified by the process's mode mask (see
.BR umask (2)).
Also see
.BR chmod (2)
for the construction of the
.I mode
argument.
.LP
If the file exists, its mode and owner remain unchanged,
but it is truncated to 0 length.
Otherwise, the file's owner
.SM ID
is set to the effective user
.SM ID
of the process.
.LP
The file's group
.SM ID
is set to either:
.TP 3
\(bu
the effective group
.SM ID
of the process, if the filesystem was not
mounted with the
.SM BSD
file-creation semantics flag (see
.BR mount (2))
and the set-gid bit of the parent directory is clear, or
.TP 3
\(bu
the group
.SM ID
of the directory in which the file is created.
.LP
The low-order 12 bits of the file mode are set to the value of
.IR mode ,
modified as follows:
.TP 3
\(bu
All bits set in the process's file mode creation mask are cleared.
See
.BR umask (2).
.TP 3
\(bu
The ``save text image after execution'' (sticky) bit of the mode is
cleared.  See
.BR chmod (2).
.TP 3
\(bu
The ``set group
.SM ID
on execution'' bit of the mode is cleared if the
effective user
.SM ID
of the process is not super-user and the process
is not a member of the group of the created file.
.LP
Upon successful completion, the file descriptor
is returned and the file is open for writing,
even if the mode does not permit writing.
The file pointer is set to the beginning of the file.
The file descriptor is set to remain open across
.BR execve (2)
system calls.  See
.BR fcntl (2V).
.SS NOTES
The
.I mode
given is arbitrary; it need not allow writing.
This feature has been used in the past by
programs to construct a simple exclusive locking
mechanism.  It is replaced by the
.SB O_EXCL
open mode, or
.BR flock (2)
facility.
.SH RETURN VALUE
The value \-1 is returned if an error occurs.  Otherwise,
the call returns a non-negative descriptor which only permits writing.
.SH ERRORS
.B creat(\|)
will fail and the file will not be created or truncated
if one of the following occur:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I name
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I name
exceeds 255 characters,
or the length of
.I name
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of
.I name
does not exist.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR name .
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR name .
.TP
.SM EACCES
The file referred to by
.I name
does not exist and the directory
in which it is to be created is not writable.
.TP
.SM EACCES
The file referred to by
.I name
exists, but it is unwritable.
.TP
.SM EISDIR
The file referred to by
.I name
is a directory.
.TP
.SM EMFILE
There are already too many files open.
.TP
.SM ENFILE
The system file table is full.
.TP
.SM ENOSPC
The directory in which the entry for the new file
is being placed cannot be extended because there is
no space left on the file system containing the directory.
.TP
.SM ENOSPC
There are no free inodes on the file system on which
the file is being created.
.TP
.SM EDQUOT
The directory in which the entry for the new file
is being placed cannot be extended because the
user's quota of disk blocks on the file system
containing the directory has been exhausted.
.TP
.SM EDQUOT
The user's quota of inodes on the file system on
which the file is being created has been exhausted.
.TP
.SM EROFS
The file referred to by
.I name
resides, or would reside, on a read-only file system.
.TP
.SM ENXIO
The file is a character special or block special file, and
the associated device does not exist.
.TP
.SM EIO
An I/O error occurred while making the directory entry
or allocating the inode.
.TP
.SM EFAULT
.I name
points outside the process's allocated address space.
.TP
.SM EOPNOTSUPP
The file was a socket (not currently implemented).
.SH "SEE ALSO"
.BR close (2),
.BR chmod (2),
.BR execve (2),
.BR fcntl (2V),
.BR flock (2),
.BR mount (2),
.BR open (2V),
.BR write (2V),
.BR umask (2)
efficient way
\fBvhangup(\|)\fR	\fBvhangup\fR(2)	 virtually ``hangup'' the current control terminal
\fBwait3(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fBwait4(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fBwait(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fB\s-1WIFEXITED\s0(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or stop
\fB\s-1WIFSIGNALED\s0(\|)\fR	\fBwait\fR(2)	 wait for process to terminate or st./share/man/man2/dup.2                                                                                 755       0      12         5056  4424740775   7600                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)dup.2 1.16 89/03/26 SMI; from UCB 6.3 5/13/86
.TH DUP 2 "22 March 1989"
.SH NAME
dup, dup2 \- duplicate a descriptor
.SH SYNOPSIS
.nf
.ft B
int dup(oldd)
int oldd;
.LP
.ft B
int dup2(oldd, newd)
int oldd, newd;
.fi
.IX  dup  ""  \fLdup\fP
.IX  "descriptors"  dup  ""  \fLdup\fP
.IX  dup2  ""  \fLdup2\fP
.IX  "descriptors"  dup2  ""  \fLdup2\fP
.IX  "duplicate descriptor"
.SH DESCRIPTION
.B dup(\|)
duplicates an existing object descriptor.
The argument
.I oldd
is a small non-negative integer index in
the per-process descriptor table.  The value must be less
than the size of the table, which is returned by
.BR getdtablesize (2).
The new descriptor returned by the call
is the lowest numbered descriptor that is
not currently in use by the process.
.LP
In the second form of the call, the value of the new descriptor
desired is specified.  If that descriptor is already
in use, the descriptor is first deallocated as if a
.BR close (2)
call had been done first.
.LP
The new descriptor has the following in common with the original:
.TP 3
\(bu
It refers to the same object that the old descriptor referred to.
.TP 3
\(bu
It uses the same file pointer as the old descriptor.
(that is, both file descriptors share one file pointer).
.TP 3
\(bu
It has the same access mode (read, write or read/write) as the old descriptor.
.LP
Thus if
.I newd
and
.I oldd
are duplicate references to an open file,
.BR read (2V),
.BR write (2V)
and
.BR lseek (2)
calls all move a single pointer into the file,
and append mode, non-blocking I/O and asynchronous I/O options
are shared between the references.
If a separate pointer into the file is desired, a different
object reference to the file must be obtained by issuing an
additional
.BR open (2V)
call.
The close-on-exec flag on the new file descriptor is unset.
.LP
The new file descriptor
is set to remain open across
.B exec
system calls.  See
.BR fcntl (2V).
.SH RETURN VALUE
The value \-1 is returned if an error occurs in either call.
The external variable
.B errno
indicates the cause of the error.
.SH ERRORS
.B dup(\|)
and
.B dup2(\|)
fail if:
.TP 20
.SM EBADF
.I oldd
or
.I newd
is not a valid active
descriptor.
.TP
.SM EMFILE
Too many descriptors are active.
.SH "SEE ALSO"
.BR accept (2),
.BR close (2),
.BR fcntl (2V),
.BR getdtablesize (2),
.BR lseek (2),
.BR open (2V),
.BR pipe (2),
.BR read (2V),
.BR socket (2),
.BR socketpair (2),
.BR write (2V)
eady
in use, the descriptor is first deallocated as if a
.BR close (2)
call had been done first.
.LP
The new descriptor has the following in common with the original:
.TP 3
\(bu
It refers to the same object that the old descriptor referred to.
.TP 3
\(bu
It uses the same file pointer as the old descriptor.
(that is, both file descriptors share one file pointer).
.TP 3
\(bu
It has the same access mode (read, write or read/write) as the old descriptor.
.LP
Thus if./share/man/man2/dup2.2                                                                                755       0      12           61  4424740775   7611                                                                                                                                                                                                                                                                                                                                                                      .so man2/dup.2
.\" @(#)dup2.2 1.9 89/03/26 SMI; 
 8p  exit.2    $  8q  fchdir.2  $  8  8r  fchmod.2  8  L  8s  fchown.2  L  `  8t  	fchroot.2 `  t  8u  fcntl.2v  t    8v  flock.2     8w  fork.2      8x  fstat.2     8y  	fstatfs.2     8z  fsync.2     8{  ftruncate.2     8|  	getauid.2     8}  
getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 `  t  8  	geteuid.2 t    8  getgid.2./share/man/man2/execve.2                                                                              755       0      12        16527  4424740775  10314                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)execve.2 1.27 89/03/26 SMI; from UCB 4.3
.\"
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH EXECVE 2 "22 March 1989"
.SH NAME
execve \- execute a file
.SH SYNOPSIS
.ft B
.nf
int execve(path, argv, envp)
char *path, **argv, **envp;
.fi
.IX  execve  ""  \fLexecve\fP
.IX  "processes and protection"  execve  ""  \fLexecve\fP
.IX  file  execute
.IX  "execute file"
.SH DESCRIPTION
.LP
.B execve(\|)
transforms the calling process into a new process.
The new process is constructed from an ordinary file,
whose name is pointed to by
.IR path ,
called the
.IR "new process file" .
This file is either an executable object file,
or a file of data for an interpreter.
An executable object file consists of an identifying header,
followed by pages of data representing the initial program (text)
and initialized data pages.  Additional pages may be specified
by the header to be initialized with zero data.  See
.BR a.out (5).
.LP
An interpreter file begins with a line of the form
.RB ` "#! \fIinterpreter\fP [\fIarg\fP]" ',
which is at most thirty-two characters.
When an interpreter file is
.BR execve 'd,
the system
.BR execve 's
the specified
.IR interpreter .
If the optional
.I arg
is specified, it becomes the first argument to the
.IR interpreter ,
and the name of the originally
.BR execve 'd
file becomes the second argument;
otherwise, the name of the originally
.BR execve 'd
file becomes the first argument. 
The original argument are shifted over to
become the subsequent arguments.
The zeroth argument, normally the name of the
.BR execve 'd
file, is left unchanged.
.LP
There can be no return from a successful
.B execve(\|)
because the calling core image is lost.
This is the mechanism whereby different process images become active.
.LP
The argument
.I argv
is a pointer to a
.SM NULL\s0-terminated
array of character pointers to
.SM NULL\s0-terminated
character strings.  These strings constitute
the argument list to be made available to the new
process.  By convention, at least one argument must be present in
this array, and the first element of this array should be
the name of the executed program (that is, the last component of
.IR path ).
.LP
The argument
.I envp
is also a pointer to a
.SM NULL\s0-terminated
array of character pointers to
.SM NULL\s0-terminated
strings.  These strings pass information to the
new process which are not directly arguments to the command (see
.BR environ (5V)).
.LP
Descriptors open in the calling process remain open in
the new process, except for those for which the close-on-exec
flag is set (see
.BR close (2)
and
.BR fcntl (2V)).
Descriptors which remain open are unaffected by
.BR execve .
.LP
Ignored signals remain ignored across an
.BR execve ,
but signals that are caught are reset to their default values.
Blocked signals remain blocked regardless of changes to the signal action.
The signal stack is reset to be undefined (see
.BR sigvec (2)
for more information).
.LP
Each process has a
.I real
user
.SM ID
and group
.SM ID
and an
.I effective
user
.SM ID
and group
.SM ID\s0.
The
.I real
.SM ID
identifies the person using the system; the
.I effective
.SM ID
determines their access privileges.
.B execve(\|)
changes the effective user or group
.SM ID
to the owner or group of the executed file if the file has the
\(lqset-user-\s-1ID\s0\(rq or \(lqset-group-\s-1ID\s0\(rq modes.  The
.I real
.SM UID
and 
.SM GID
are not affected.
.LP
The shared memory segments attached to the calling process will not be
attached to the new process (see
.BR shmop (2)).
.LP
Profiling is disabled for the new process; see
.BR profil (2).
.LP
The new process also inherits the following attributes from
the calling process:
.LP
.RS
.nf
.ta +2i
process \s-1ID\s0	see \c
.BR getpid (2)
parent process \s-1ID\s0	see \c
.BR getpid (2)
process group \s-1ID\s0	see \c
.BR setpgrp (2V)
access groups	see \c
.BR getgroups (2)
semadj values	see \c
.BR semop (2)
working directory	see \c
.BR chdir (2)
root directory	see \c
.BR chroot (2)
control terminal	see \c
.BR termio (4)
trace flag	see \c
.BR ptrace "(2), request 0"
resource usages	see \c
.BR getrusage (2)
interval timers	see \c
.BR getitimer (2)
resource limits	see \c
.BR getrlimit (2)
file mode mask	see \c
.BR umask (2)
signal mask	see \c
.BR sigvec (2), \c
.BR sigsetmask (2)
.fi
.RE
.LP
When the executed program begins, it is called as follows:
.LP
.RS
.ft B
.nf
main(argc, argv, envp)
int argc;
char **argv, **envp;
.ft R
.fi
.RE
.LP
where
.I argc
is the number of elements in
.I argv
(the \(lqarg count\(rq) and
.I argv
points to the array of character pointers
to the arguments themselves.
.LP
.I envp
is a pointer to an array of strings that constitute the
.I environment
of the process.
A pointer to this array is also stored in the global variable
.BR environ .
Each string consists of a name, an \(lq=\(rq, and a
.SM NULL\s0-terminated
value.  The array of pointers is terminated by a
.SM NULL
pointer.  The shell
.BR sh (1)
passes an environment entry for each global shell variable
defined when the program is called.  See
.BR environ (5V)
for some conventionally used names.
.SH RETURN VALUE
.LP
If
.B execve(\|)
returns to the calling process an error has occurred; the
return value will be \-1 and the global variable
.B errno
will contain an error code.
.SH ERRORS
.LP
.B execve(\|)
will fail and return to the calling process if one or more
of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of the new process file is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
One or more components of the path prefix of the new process file
does not exist.
.TP
.SM ENOENT
The new process file does not exist.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EACCES
Search permission is denied for a component of the new process file's
path prefix.
.TP
.SM EACCES
The new process file is not an ordinary file.
.TP
.SM EACCES
Execute permission is denied for the new process file.
.TP
.SM ENOEXEC
The new process file has the appropriate access
permission, but has an invalid magic number in its header.
.TP
.SM ENOMEM
The new process file requires more virtual memory than
is allowed by the imposed maximum
.RB ( getrlimit (2)).
.TP
.SM E2BIG
The number of bytes in the new process file's argument list
is larger than the system-imposed limit.
The limit in the system as released is 1,048,576 bytes
(\s-1\fBNCARGS\fR\s0
in
.BR /usr/include/sys/param.h ).
.TP
.SM EFAULT
The new process file is not as long as indicated by
the size values in its header.
.TP
.SM EFAULT
.IR path ,
.IR argv ,
or
.I envp
points to an illegal address.
.TP
.SM EIO
An I/O error occurred while reading from the file system.
.SH SEE ALSO
.BR sh (1),
.BR chdir (2),
.BR chroot (2),
.BR close (2),
.BR exit (2),
.BR fcntl (2V),
.BR fork (2),
.BR getgroups (2),
.BR getitimer (2),
.BR getpid (2),
.BR getrlimit (2),
.BR getrusage (2),
.BR profil (2),
.BR ptrace (2),
.BR semop (2),
.BR setpgrp (2V),
.BR shmop (2),
.BR sigvec (2),
.BR execl (3),
.BR termio (4),
.BR a.out (5),
.BR environ (5V)
.SH WARNINGS
.LP
If a program is
.B setuid(\|)
to a non-super-user, but is executed when
the real user
.SM ID
is super-user, then the program has some of the powers
of a super-user as well.
path, argv, envp)
char *path, **argv, **envp;
.fi
.IX  execve  ""  \fLexecve\fP
.IX  "processes and protection"  execve  ""  \fLexecve\fP
.IX  file  execute
.IX  "execut./share/man/man2/exit.2                                                                                755       0      12         4051  4424740775   7753                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)exit.2 1.15 89/03/26 SMI; from UCB 6.4 5/22/86
.TH EXIT 2 "25 September 1987"
.SH NAME
_exit \- terminate a process
.SH SYNOPSIS
.nf
.ft B
_exit(status)
int status;
.fi
.IX  exit  ""  \fLexit\fP
.IX  "processes and protection"  exit  ""  \fLexit\fP
.IX  process  terminate
.IX  "terminate process"
.SH DESCRIPTION
.B _exit(\|)
terminates a process with the following consequences:
.LP
All of the descriptors open in the calling process are closed.
This may entail delays, for example, waiting for output to drain;
a process in this state may not be killed, as it is already dying.
.LP
If the parent process of the calling process is executing a
.B wait(\|)
or is interested in the
.SB SIGCHLD
signal,
then it is notified of the calling process's termination and
the low-order eight bits of
.I status
are made available to it; see
.BR wait (2).
.LP
The parent process
.SM ID
of all of the calling process's existing child
processes are also set to 1.  This means that the initialization process
(see
.BR intro (2))
inherits each of these processes as well.
Any stopped children are restarted with
a hangup signal (\c
.SB SIGHUP\fR\s0).
.LP
Each attached shared memory segment is detached and the value of
.B shm_nattach
in the data structure associated with its shared memory identifier is
decremented by 1.
.LP
For each semaphore for which the calling process has set a
.I semadj
value (see
.BR semop (2)),
that
.I semadj
value is added to the
.I semval
of the specified semaphore.
.LP
If process accounting is enabled (see
.BR acct (2)),
an accounting record is written to the accounting file.
.LP
Most C programs will call the library routine
.BR exit (3)
which performs cleanup actions in the standard I/O library before
calling
.BR _exit .
.SH "RETURN VALUE"
This call never returns.
.SH "SEE ALSO"
.BR acct (2),
.BR fork (2),
.BR intro (2),
.BR semop (2),
.BR wait (2),
.BR exit (3)
etpgrp.2v      9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2   
  9  
sigpause.2    
,  9  sigsetmask.2  
,  
@  9  
sigstack.2   
T  9  sigvec.2 2 @  
h  9  socket.2./share/man/man2/fchdir.2                                                                              755       0      12           64  4424740775  10201                                                                                                                                                                                                                                                                                                                                                                      .so man2/chdir.2
.\" @(#)fchdir.2 1.3 89/03/26 SMI;
  8s  fchown.2  L  `  8t  	fchroot.2 `  t  8u  fcntl.2v  t    8v  flock.2     8w  fork.2      8x  fstat.2     8y  	fstatfs.2     8z  fsync.2     8{  ftruncate.2     8|  	getauid.2     8}  
getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 `  t  8  	geteuid.2 t    8  getgid.2      8  getgroups.2     8  gethostid.2     8  
./share/man/man2/fchmod.2                                                                              755       0      12           65  4424740776  10204                                                                                                                                                                                                                                                                                                                                                                      .so man2/chmod.2
.\" @(#)fchmod.2 1.9 89/03/26 SMI; 
 8t  	fchroot.2 L  t  8u  fcntl.2v  `    8v  flock.2     8w  fork.2 c    8x  fstat.2     8y  	fstatfs.2 2     8z  fsync.2     8{  ftruncate.2     8|  	getauid.2 2     8}  
getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 2   t  8  	geteuid.2 `    8  getgid.2  t    8  getgroups.2     8  gethostid.2     8  
gethostname.2     8./share/man/man2/fchown.2                                                                              755       0      12           65  4424740776  10230                                                                                                                                                                                                                                                                                                                                                                      .so man2/chown.2
.\" @(#)fchown.2 1.9 89/03/26 SMI; 
 8u  fcntl.2v  L    8v  flock.2     8w  fork.2 c    8x  fstat.2     8y  	fstatfs.2 2     8z  fsync.2     8{  ftruncate.2     8|  	getauid.2 2     8}  
getdents.2      8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 2   t  8  	geteuid.2 2     8  getgid.2  `    8  getgroups.2     8  gethostid.2     8  
gethostname.2     8  getitimer.2     8./share/man/man2/fchroot.2                                                                             755       0      12           66  4424740776  10411                                                                                                                                                                                                                                                                                                                                                                      .so man2/chroot.2
.\" @(#)fchroot.2 1.3 89/03/26 SMI;
8v  flock.2     8w  fork.2 c    8x  fstat.2     8y  	fstatfs.2 2     8z  fsync.2     8{  ftruncate.2     8|  	getauid.2 2     8}  
getdents.2      8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 2   t  8  	geteuid.2 2     8  getgid.2  2     8  getgroups.2     8  gethostid.2     8  
gethostname.2     8  getitimer.2     8  getmsg.2 .2      8./share/man/man2/fcntl.2v                                                                              755       0      12        26471  4424740776  10331                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fcntl.2v 1.29 89/03/26 SMI; from 4.2 BSD and S5
.TH FCNTL 2V "8 January 1988"
.SH NAME
fcntl \- file control
.SH SYNOPSIS
.nf
.ft B
#include <fcntl.h>
.ft R
.fi
.LP
.nf
.ft B
int fcntl (des, cmd, arg)
int des, cmd, arg;
.ft R
.fi
.IX  fcntl  ""  "\fLfcntl\fP \(em file control system call"
.IX  "file control" "system call \(em \fLfcntl\fR"
.IX  descriptors  fcntl  ""  \fLfcntl\fP
.IX "lock" "record" "lock" "record \(em \fLfcntl\fP"
.SH DESCRIPTION
.LP
.B fcntl(\|)
performs a variety of functions on open descriptors.
The argument
.I des
is an open descriptor to be operated on by
.I cmd
as follows:
.TP 20
.SB F_DUPFD
Return a new descriptor as follows:
.RS
.IP
Lowest numbered available descriptor greater than or equal to
.IR arg .
.IP
Refers to the same object as the original descriptor.
.IP
New descriptor shares the same file pointer if the object
was a file
(that is, both descriptors share one
file pointer).
.IP
Same access mode (read, write or read/write).
.IP
Same descriptor status flags (both descriptors
share the same descriptor status flags).
.IP
The close-on-exec flag associated with the new descriptor
is set to remain open across
.BR execve (2)
system calls.
.RE
.br
.ne 4
.TP
.SB F_GETFD
Get the close-on-exec flag associated with the descriptor
.IR des .
If the low-order bit is
.BR 0 ,
the file will remain open across
.BR execve ,
otherwise the file will be closed upon execution of
.BR execve .
.TP
.SB F_SETFD
Set the close-on-exec flag associated with
.I des
to the low order bit of
.I arg
.RB ( 0
or
.B 1
as above).  Note: this flag is a per-process and per-descriptor flag;
setting or clearing it for a particular descriptor will not affect the flag
on descriptors copied from it by a
.BR dup (2)
or
.SB F_DUPFD
operation, nor will it affect the flag on other processes instances of that
descriptor.
.TP
.SB F_GETFL
Get descriptor status flags (see
.BR fcntl (5)
for their definitions).
.TP
.SB F_SETFL
Set descriptor status flags (see
.BR fcntl (5)
for their definitions).  Only the following flags can have their values
changed:
.B \s-1O_APPEND\s0\fR,
.B \s-1O_SYNC\s0\fR,
and
.B \s-1O_NDELAY\s0\fR,
and the
.B \s-1FASYNC\s0\fR,
.B \s-1FNDELAY\s0\fR,
and
.B \s-1FNBIO\s0
flags defined in
.BR <sys/file.h> .
.IP
In the 4.2\s-1BSD\s0 environment, the
.B \s-1O_NDELAY\s0
and
.B \s-1FNDELAY\s0
flags are the same flag; in the System V environment, the
.B \s-1O_NDELAY\s0
and
.SB FNBIO
flags are the same flag.  The
.SB FNDELAY
and
.SB FNBIO
flags may be used in either
environment; the meaning of those flags is not dependent on the
environment in which a program is built.
.IP
As the descriptor status flags are shared with descriptors copied from a given
descriptor by a
.BR dup (2)
or
.SB F_DUPFD
operation, and by other processes instances of that descriptor, a
.SB F_SETFL
operation will affect those other descriptors and other instances of the given
descriptor as well.  In addition, setting or clearing the
.SB FNDELAY
flag on a descriptor will cause an
.SB FIONBIO
.BR ioctl (2)
to be performed on the object referred to by that descriptor, setting or
clearing non-blocking mode, and setting or clearing the
.SB FASYNC
flag on a descriptor will cause an
.SB FIOASYNC
.BR ioctl (2)
to be performed on the object referred to by that descriptor, setting or
clearing asynchronous mode.  Thus, all descriptors referring to that object
will be affected.
.TP
.SB F_GETLK
Get a description of the first lock that would block the lock specified
in the
.B flock(\|)
structure pointed to by
.IR arg .
The information retrieved overwrites the information
in the
.B flock(\|)
structure.  If no lock is found that
would prevent this lock from being created, then the structure is
passed back unchanged except for the lock type which will be set to
.SB F_UNLCK\s0\fR.
.TP
.B \s-1F_SETLK\s0
Set or clear an advisory record lock according to the
.B flock(\|)
structure pointed to by
.IR arg .
.B \s-1F_SETLK\s0
is used to establish shared (\c
.B \s-1F_RDLCK\s0\fR)
and exclusive (\c
.B \s-1F_WRLCK\s0\fR)
locks, or to remove either type of lock (\c
.B \s-1F_UNLCK\s0\fR).
If the specified lock cannot be applied,
.B fcntl(\|)
will return with an error value of \-1.
.TP
.SB F_SETLKW
This
.I cmd
is the same as
.SB F_SETLK
except that if a shared or exclusive
lock is blocked by other locks, the requesting process will sleep
until the lock may be applied.
.TP
.SB F_GETOWN
Get the process
.SM ID
or process group currently receiving
.SB SIGIO
and
.SB SIGURG
signals; process groups are returned
as negative values.
.TP
.SB F_SETOWN
Set the process or process group
to receive
.SB SIGIO
and
.SB SIGURG
signals; process groups are specified by supplying
.I arg
as negative, otherwise
.I arg
is interpreted as a process
.SM ID\s0.
.LP
The
.SB SIGIO
facilities are enabled by setting the
.SB FASYNC
flag with
.SB F_SETFL\s0\fR.
.SH NOTES
Advisory locks allow cooperating processes to perform
consistent operations on files, but do not guarantee
exclusive access (processes may still access files
without using advisory locks, possibly resulting in
inconsistencies).
.LP
The record locking mechanism allows two types of locks:
shared locks (\c
.SB F_RDLCK\s0\fR)
and exclusive locks (\c
.B \s-1F_WRLCK\s0\fR).
More than one process may hold a shared lock for a particular
segment of a file at any given time,
but multiple exclusive, or both shared and exclusive,
locks may not exist simultaneously on any segment.
.LP
In order to claim a shared lock, the
descriptor must have been opened with read access.  The
descriptor on which an exclusive lock is being placed must have been
opened with write access.
.LP
A shared lock may be
.I upgraded
to an exclusive lock, and vice versa, simply by specifying
the appropriate lock type with a
.I cmd
of
.SB F_SETLK
or
.SB F_SETLKW\s0\fR;
the previous lock will be released and the new lock applied (possibly
after other processes have gained and released the lock).
.LP
If the
.I cmd
is
.SB F_SETLKW
and the requested lock cannot be
claimed immediately (for instance, another process holds an exclusive lock
that partially or completely overlaps the current request) then the
calling process will block until the lock may be acquired.
Processes blocked awaiting a lock may be awakened by signals.
.LP
Care should be taken to avoid deadlock situations in applications
in which multiple processes perform blocking locks on a set of common
records.
.LP
The record that is to be locked or unlocked is described by the
.B flock(\|)
structure, which is defined
in
.B <fcntl.h>
and includes the following members:
.LP
.RS
.ta +\w'short\0'u +\w'l_whence;\0'u
.nf
.ft B
short	l_type;	/\(** \s-1F_RDLCK\s0, \s-1F_WRLCK\s0, or \s-1F_UNLCK\s0 \(**/
short	l_whence;	/\(** flag to choose starting offset \(**/
long	l_start;	/\(** relative offset, in bytes \(**/
long	l_len;	/\(** length, in bytes;  0 means lock to \s-1EOF\s0 \(**/
short	l_pid;	/\(** returned with \s-1F_GETLK\s0 \(**/
.fi
.ft R
.RE
.br
.ne 7
.LP
The
\fBflock\fP
structure describes the type
.RB ( l_type ),
starting offset
.RB ( l_whence ),
relative offset
.RB  ( l_start ),
and size
.RB  ( l_len )
of the segment of the file to be affected.
.B l_whence
must be set to 0, 1, or 2 to indicate that
the
relative offset will be measured from the start of the file,
current position, or end-of-file, respectively.
The process id field
.RB  ( l_pid )
is only used with the
.SB F_GETLK
.I cmd
to return
the description of a lock held by another process.
.LP
Locks may start and extend beyond the current end-of-file,
but may not be negative relative to the beginning of the file.
A lock may be set to always extend to the end-of-file by setting
.B l_len
to zero (0).  If such a lock also has
.B l_whence
and
.B l_start
set to zero (0), the entire file will be locked.
Changing or unlocking a segment from the middle of a larger locked
segment leaves two smaller segments at either end.  Locking a
segment that is already locked by the calling process causes the
old lock type to be removed and the new lock type to take affect.
All locks associated with a file for a given process are removed
when the file is closed or the process terminates.  Locks are not
inherited by the child process in a
.BR fork (2)
system call.
.LP
In order to maintain consistency in the network case, data must not
be cached on client machines.  For this reason, file buffering for
an
.SM NFS
file is turned off when the first lock is attempted on the file.
Buffering will remain off as long as the file is open.
Programs that do I/O buffering in the
user address space, however, may have inconsistent results (the standard
I/O package, for instance, is a common source of unexpected buffering).
.LP
The advisory record locking capabilities of
.B fcntl(\|)
are implemented throughout the network by the
\fBnetwork lock daemon\fP;
see
\fBlockd\fP (8C).
If the file server crashes and is rebooted, the lock daemon will attempt to
recover all locks that were associated with that server.  If a lock
cannot be reclaimed, the process that held the lock will be issued a
.SB SIGLOST
signal.
.SH "RETURN VALUE
Upon successful completion, the value returned depends on
.I cmd
as follows:
.PD 0
.TP 10
.SB F_DUPFD
A new descriptor.
.TP
.SB F_GETFD
Value of flag (only the low-order bit is defined).
.TP
.SB F_GETFL
Value of flags.
.TP
.SB F_GETOWN
Value of descriptor owner.
.TP
other
Value other than \-1.
.PD
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B fcntl(\|)
will fail if one or more of the following are true:
.TP 20
.SM EBADF
.I des
is not a valid open descriptor.
.TP
.SM EMFILE
.I cmd
is
.SB F_DUPFD
and the maximum allowed number of descriptors are currently
open.
.TP
.SM EINVAL
.I cmd
is
.SB F_DUPFD
and
.I arg
is negative or greater than the maximum allowable number
(see
.BR getdtablesize (2)).
.TP
.SM EFAULT
.I cmd
is
.B \s-1F_GETLK\s0\fR,
.B \s-1F_SETLK\s0\fR,
or
.B \s-1F_SETLKW\s0
and
.I arg
points to an invalid address.
.TP
.SM EINVAL
.I cmd
is
.B \s-1F_GETLK\s0\fR,
.B \s-1F_SETLK\s0\fR,
or
.B \s-1F_SETLKW\s0
and the data
.I arg
points to is not valid.
.TP
.SM EBADF
.I cmd
is
.SB F_SETLK
or
.SB F_SETLKW
and the process does not have the appropriate
read or write permissions on the file.
.TP
.SM EAGAIN
.I cmd
is
.SB F_SETLK\s0\fR,
the lock type
.BR  (\fBl_type\fP)
is
.SB F_RDLCK
(shared lock), and
the segment of the file to be locked already has an exclusive lock
held by another process.  This error will also be returned if the lock
type is
.SB F_WRLCK
(exclusive lock) and another process already has the
segment locked with either a shared or exclusive lock.
.TP
.SM EINTR
.I cmd
is
.SB F_SETLKW
and a signal interrupted the process while it was waiting
for the lock to be granted.
.TP
.SM ENOLCK
.I cmd
is
.SB F_SETLK
or
.SB F_SETLKW
and there are no more file lock entries available.
.br
.ne 5
.SH "SEE ALSO
.BR close (2),
.BR execve (2),
.BR flock (2),
.BR fork (2),
.BR getdtablesize (2),
.BR ioctl (2),
.BR open (2V),
.BR sigvec (2),
.BR lockf (3),
.BR fcntl (5),
.BR lockd (8C)
.SH "BUGS
File locks obtained through the
.B fcntl(\|)
mechanism do not interact
in any way with those acquired via
.BR flock (2).
They do, however,
work correctly with the exclusive locks claimed by
.BR lockf (3).
.LP
.SB F_GETLK
returns
.SB F_UNLCK
if the requesting process holds the specified lock.
Thus, there is no way for a process to determine if it is still holding a
specific lock after catching a
.SB SIGLOST
signal.
.LP
In a network environment, the value of
.B l_pid
returned by
.SB F_GETLK
is next to useless.
perm.[c]gid
and the appropriate bit of the \(lqother\(rq portion (06) of
.B shm_perm.mode
is set.
.LP
Otherwise, the corresponding permissions are denied.
.SS "Sockets and Address Families"
A socket ./share/man/man2/flock.2                                                                               755       0      12         6575  4424740776  10116                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)flock.2 1.20 89/03/26 SMI; from UCB 4.2
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH FLOCK 2 "22 March 1989"
.SH NAME
flock \- apply or remove an advisory lock on an open file
.SH SYNOPSIS
.nf
.ft B
#include <sys/file.h>
.LP
.ft B
.DT
#define	\s-1LOCK_SH\s0	1	/* shared lock */
#define	\s-1LOCK_EX\s0	2	/* exclusive lock */
#define	\s-1LOCK_NB\s0	4	/* don't block when locking */
#define	\s-1LOCK_UN\s0	8	/* unlock */
.LP
.ft B
flock(fd, operation)
int fd, operation;
.fi
.IX  flock  ""  \fLflock\fP
.IX  descriptors  flock "" \fLflock\fP
.IX  "lock" "file" "lock" "file \(em \fLflock\fP"
.SH DESCRIPTION
.B flock(\|)
applies or removes an
.I advisory
lock on the file associated with the file descriptor
.BR fd .
A lock is applied by specifying an
.I operation
parameter that is the inclusive
.SM OR
of
.SB LOCK_SH
or
.SB LOCK_EX
and, possibly,
\fB\s-1LOCK_NB\s0\fR.
To unlock
an existing lock, the
.I operation
should be
.SB LOCK_UN\s0\fR.
.LP
Advisory locks allow cooperating processes to perform
consistent operations on files, but do not guarantee
exclusive access (that is, processes may still access files
without using advisory locks, possibly resulting in
inconsistencies).
.LP
The locking mechanism allows two types of locks:
.I shared
locks and
.I exclusive
locks.
More than one process may hold a shared lock for a file at any given time,
but multiple exclusive, or both shared and exclusive,
locks may not exist simultaneously on a file.
.LP
A shared lock may be
.I upgraded
to an exclusive lock, and vice versa, simply by specifying
the appropriate lock type; the previous
lock will be released and the new lock applied (possibly
after other processes have gained and released the lock).
.LP
Requesting a lock on an object that is already locked
normally causes the caller to block until the lock may be
acquired.  If
.SB LOCK_NB
is included in
.IR operation ,
then this will not happen; instead the call will fail and
the error
.SM EWOULDBLOCK
will be returned.
.SH NOTES
Locks are on files, not file descriptors.  That is, file descriptors
duplicated through
.BR dup (2)
or
.BR fork (2)
do not result in multiple instances of a lock, but rather multiple
references to a single lock.  If a process holding a lock on a file
forks and the child explicitly unlocks the file, the parent will
lose its lock.
.LP
Processes blocked awaiting a lock may be awakened by signals.
.SH "RETURN VALUE
Zero is returned on success, \-1 on error,
with an error code stored in
.BR errno .
.SH ERRORS
The
.B flock(\|)
call fails if:
.TP 20
.SM EWOULDBLOCK
The file is locked and the
.SB LOCK_NB
option was specified.
.TP
.SM EBADF
The argument
.B fd
is an invalid descriptor.
.TP
.SM EOPNOTSUPP
The argument
.B fd
refers to an object other than a file.
.SH "SEE ALSO"
.BR close (2),
.BR dup (2),
.BR execve (2),
.BR fcntl (2V),
.BR fork (2),
.BR open (2V),
.BR lockf (3),
.BR lockd (8C)
.SH "BUGS
Locks obtained through the
.B flock(\|)
mechanism are known only
within the system on which they were placed.  Thus, multiple clients
may successfully acquire exclusive locks on the same remote file.
If this behavior is not explicitly desired, the
.BR fcntl (2V)
or
.BR lockf (3)
system calls should be used instead; these make use of
the services of the
.B network lock manager
(see
.BR lockd(8C)).
 been opened with read access.  The
descriptor on which an exclusive lock is being placed must have been
opened with write access.
./share/man/man2/fork.2                                                                                755       0      12         5050  4424740776   7744                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)fork.2 1.21 89/03/26 SMI; from UCB 6.4 5/22/86
.TH FORK 2 "22 March 1989"
.SH NAME
fork \- create a new process
.SH SYNOPSIS
.ft B
int fork()
.ft R
.IX  "fork a new process \(em \fLfork\fP"
.IX  "processes and protection"  fork  ""  \fLfork\fP
.IX  process  create
.IX  "create new process"
.SH DESCRIPTION
.LP
.B fork(\|)
creates a new process.  The new process (child process) is an exact copy of the
calling process except for the following:
.TP 3
\(bu
The child process has a unique process
.SM ID\s0.
.TP 3
\(bu
The child process has a different parent process
.SM ID
(that is, the process
.SM ID
of the parent process).
.TP 3
\(bu
The child process has its own copy of the parent's descriptors.
These descriptors reference the same underlying objects, so that,
for instance, file pointers in file objects are shared between
the child and the parent, so that an
.BR lseek (2)
on a descriptor in the child process can affect a subsequent
.BR read (2V)
or
.BR write (2V)
by the parent.  This descriptor copying is also used by the shell to
establish standard input and output for newly created processes
as well as to set up pipes.
.TP 3
\(bu
All
.I semadj
values are cleared; see
.BR semop (2).
.TP 3
\(bu
The child processes resource utilizations are set to 0; see
.BR setrlimit (2).
The
.B it_value
and
.B it_interval
values for the
.SB ITIMER_REAL
timer are reset to 0; see
.BR getitimer (2).
.SH "RETURN VALUE
Upon successful completion,
.B fork(\|)
returns a value
of 0 to the child process and returns the process
.SM ID
of the child
process to the parent process.  Otherwise, a value of \-1 is returned
to the parent process, no child process is created, and the global
variable
.B errno
is set to indicate the error.
.SH ERRORS
.B fork(\|)
will fail and no child process will be created if one or more of the
following are true:
.TP 15
.SM EAGAIN
The system-imposed limit on the total
number of processes under execution would be exceeded.
This limit is determined when the system is generated.
.TP
.SM EAGAIN
The system-imposed limit on the total number of processes under execution by
a single user would be exceeded.
This limit is determined when the system is generated.
.TP
.SM ENOMEM
There is insufficient swap space for the new process.
.SH "SEE ALSO"
.BR execve (2),
.BR getitimer (2),
.BR getrlimit (2),
.BR lseek (2),
.BR read (2V),
.BR semop (2),
.BR wait (2),
.BR write (2V)
truncate.2   $  9  umask.2   8  9  uname.2v  8  L  9  unlink.2  L  `  9  	unmount.2 `  t  9  utimes.2  t    9  	vadvise.2     9  vfork.2     9  	vhangup.2     9  wait.2      9  wait3.2     9  wait4.2      9  write.2v        9  	writev.2v  ile.
.SH "SEE ALSO"
.BR close (2),
.BR dup (2),
.BR execve (2),
.BR fcntl (2V),
.BR fork (2),
.BR open (2V),
.BR lockf (3),
.BR lockd (8C)
.SH "BUGS
Locks obtained thro./share/man/man2/fstat.2                                                                               755       0      12           63  4424740777  10064                                                                                                                                                                                                                                                                                                                                                                      .so man2/stat.2
.\" @(#)fstat.2 1.9 89/03/26 SMI; 
z  fsync.2     8{  ftruncate.2     8|  	getauid.2     8}  
getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 `  t  8  	geteuid.2 t    8  getgid.2      8  getgroups.2     8  gethostid.2     8  
gethostname.2 8    8  getitimer.2     8  getmsg.2       8  intro.2     8  
getpagesize.2 8  0  8  
getpeername.2 8  D  8  
getpgrp../share/man/man2/fstatfs.2                                                                             755       0      12           66  4424740777  10420                                                                                                                                                                                                                                                                                                                                                                      .so man2/statfs.2
.\" @(#)fstatfs.2 1.3 89/03/26 SMI;
 ftruncate.2     8|  	getauid.2     8}  
getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 `  t  8  	geteuid.2 t    8  getgid.2      8  getgroups.2     8  gethostid.2     8  
gethostname.2 8    8  getitimer.2     8  getmsg.2       8  intro.2     8  
getpagesize.2 8  0  8  
getpeername.2 8  D  8  
getpgrp.2v D  X  8  getp./share/man/man2/fsync.2                                                                               755       0      12         2556  4424740777  10136                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fsync.2 1.21 89/03/26 SMI; from UCB 4.3
.TH FSYNC 2 "25 March 1989"
.SH NAME
fsync \- synchronize a file's in-core state with that on disk
.SH SYNOPSIS
.B int fsync(fd)
.LP
.B int fd;
.IX  fsync  ""  "\fLfsync\fP \(em synchronize disk file with core image"
.IX  file   "synchronize state \(em \fLfsync\fR"
.IX  "synchronize file state \(em \fLfsync\fR"
.SH DESCRIPTION
.LP
.B fsync(\|)
moves all modified data and attributes of
.I fd
to a permanent storage device: all in-core modified copies
of buffers for the associated file have been written to a disk when
the call returns.  Note: this is different than
.BR sync (8)
which schedules disk I/O for all files (as though an
.B fsync(\|)
had been done on all files)
but returns before the I/O completes.
.LP
.B fsync(\|)
should be used by programs which require a file to be
in a known state; for example, a program which contains
a simple transaction facility might use it to ensure that all
modifications to a file or files caused by a transaction were
recorded on disk.
.SH RETURN VALUE
.LP
A 0 value is returned on success.  A \-1 value indicates an error.
.SH ERRORS
.LP
The
.B fsync(\|)
fails if:
.TP 15
.SM EBADF
.I fd
is not a valid descriptor.
.TP
.SM EINVAL
.I fd
refers to a socket, not a file.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR cron (8),
.BR sync (8)
8  	mincore.2 2     8  mkdir.2     8  mknod.2     8  mmap.2 o    8  mount.2      8  
mprotect.2      8  msgctl.2 2  ./share/man/man2/ftruncate.2                                                                           755       0      12           73  4424740777  10737                                                                                                                                                                                                                                                                                                                                                                      .so man2/truncate.2
.\" @(#)ftruncate.2 1.9 89/03/26 SMI; 

getdents.2     8~  getdirentries.2   4  8  getdomainname.2   L  8  getdtablesize.2   `  8  	getegid.2 `  t  8  	geteuid.2 t    8  getgid.2      8  getgroups.2     8  gethostid.2     8  
gethostname.2 8    8  getitimer.2     8  getmsg.2       8  intro.2     8  
getpagesize.2 8  0  8  
getpeername.2 8  D  8  
getpgrp.2v D  X  8  getpid.2  X  l  8  	getppid.2 l    8  
./share/man/man2/getauid.2                                                                             755       0      12         2445  4424740777  10433                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getauid.2 1.9 89/03/26 SMI;
.TH GETAUID 2 "22 March 1989"
.SH NAME
getauid, setauid \- get and set user audit identity
.SH SYNOPSIS
.nf
.ft B
.BR getauid()
.LP
.ft B
.BR setauid(auid)
.B int auid;
.fi
.SH DESCRIPTION
.IX "gatauid function"  "" "\fLgetauid()\fP function"
.IX "gatauid function"  "" "\fLsetauid()\fP function"
.LP
The
.B getauid(\|)
system call returns the audit user
.SM ID
for the current process.
This value is initially set at login time
and inherited by all child processes.
This value does not change when the real/effective user
.SM ID\s0s
change,
so it can be used to identify the logged-in user, even when running
a setuid program.
The audit user
.SM ID
governs audit decisions for a process.
.LP
The
.B setauid(\|)
system call sets the audit user
.SM ID
for the current process.
Only the super-user may successfully execute these calls.
.SH "RETURN VALUE"
The
.B getauid(\|)
call returns the audit user
.SM ID
of the current process on successful
operation, and returns \-1 for all errors.
.LP
The
.B getauid(\|)
call returns 0 on successful operation, and \-1 for all errors.
.SH ERRORS
.TP 15
.SM EPERM
The process's effective user
.SM ID
is not super-user.
.TP
.SM EINVAL
The parameter
.I auid
is not a valid uid.
.SH "SEE ALSO"
.BR getuid (2),
.BR setuseraudit (2),
.BR audit (8)
 <  9  
readlink.2    P  9  readv.2v 2 <  d  9  reboot.2  P  t  9  recv.2 2    9  
recvfrom.2 P    9  	recvmsg.2      9  rename.2      9  rmdir.2     9  sbrk.2 i    9  sele./share/man/man2/getdents.2                                                                            755       0      12         6616  4424740777  10632                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getdents.2 1.13 89/03/26 SMI; from UCB 4.3
.TH GETDENTS 2 "22 March 1989"
.SH NAME
getdents \- gets directory entries in a filesystem independent format
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/dirent.h>
.LP
.ft B
int getdents(fd, buf, nbytes)
int fd;
char \(**buf;
int nbytes;
.fi
.SH DESCRIPTION
.LP
.IX  getdents  ""  \fLgetdents\fP
.IX  "file system"  getdents  ""  \fLgetdents\fP
.IX  directory  "get entries"
.B getdents(\|)
attempts to put directory entries from the directory referenced by
the file descriptor
.I fd
into the buffer pointed to by
.IR buf ,
in a filesystem independent format.  Up to
.I nbytes
bytes of data will be transferred.
.LP
The data in the buffer is a series of
.B dirent
structures each containing the following entries:
.LP
.RS
.ta +\w'unsigned\0short\0'u +\w'd_name[MAXNAMLEN + 1];\0'u
.ft B
.nf
off_t	d_off;
u_long	d_fileno;
u_short	d_reclen;
u_short	d_namlen;
char	d_name[\s-1MAXNAMLEN\s0 + 1];	/* see below */
.fi
.ft R
.RE
.LP
The
.B d_off
entry contains a value which is interpretable only by the filesystem that
generated it.  It may be supplied as an offset to
.BR lseek (2)
to find the entry following the current one in a directory.
The
.B d_fileno
entry is a number which is unique for each distinct file in the filesystem.
Files that are linked by hard links (see
.BR link (2))
have the same
.BR d_fileno .
The
.B d_reclen
entry is the length, in bytes, of the directory record.
The
.B d_name
entry contains a null terminated file name.
The
.B d_namlen
entry specifies the length of the file name.
Thus the actual size of
.B d_name
may vary from 1 to
.BR \s-1MAXNAMLEN\s0 + 1 .
.LP
The structures are not necessarily tightly packed.
The
.B d_reclen
entry may be used as an offset from the beginning of a
.I dirent
structure to the next structure, if any.
.LP
Upon return, the actual number of bytes transferred is returned.
The current position pointer associated with
.I fd
is set to point to the directory entry following the last one returned.
The pointer is not necessarily incremented by the number of bytes returned by
.BR getdents .
If the value returned is zero, the end of the directory has been reached.
The current position pointer may be set and retrieved by
.BR lseek (2).
It is not safe to set the current position pointer to any value other than
a value previously returned by
.BR lseek (2),
or the value of a
.B d_off
entry in a
.B dirent
structure returned by
.BR getdents ,
or zero.
.SH RETURN VALUE
If successful, the number of bytes actually transferred is returned.
Otherwise, a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.B getdents(\|)
will fail if one or more of the following are true:
.TP 15
.SM EINVAL
.I nbytes
is not large enough for one directory
entry.
.TP
.SM EBADF
.I fd
is not a valid file descriptor open for
reading.
.TP
.SM ENOTDIR
The file referenced by 
.I fd
is not a 
directory.
.TP
.SM EFAULT
.I buf
points outside the allocated address
space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EINTR
A read from a slow device was interrupted before
any data arrived by the delivery of a signal.
.SH "SEE ALSO"
.BR link (2),
.BR lseek (2),
.BR open (2V),
.BR directory (3)
.SH NOTES
.LP
It is strongly recommended, for portability reasons, that programs that
deal with directory entries use the
.BR directory (3)
interface rather than directly calling
.BR getdents .
 read access.  The
descriptor on which an exclusive lock is being placed must have been
opened with write access.
./share/man/man2/getdirentries.2                                                                       755       0      12         7460  4424740777  11663                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getdirentries.2 1.21 89/03/26 SMI
.TH GETDIRENTRIES 2 "22 March 1989"
.SH NAME
getdirentries \- gets directory entries in a filesystem independent format
.SH SYNOPSIS
.nf
.LP
.ft B
int getdirentries(fd, buf, nbytes, basep)
int fd;
char *buf;
int nbytes;
long *basep;
.fi
.SH DESCRIPTION
.LP
.IX  getdirentries  ""  \fLgetdirentries\fP
.IX  "file system"  getdirentries  ""  \fLgetdirentries\fP
.IX  directory  "get entries"
.LP
This system call is now obsolete. It is superseded by the
.BR getdents (2)
system call, which returns directory entries in a new format specified in
.BR /usr/include/sys/dirent.h .
The file,
.BR /usr/include/sys/dir.h ,
has also been modified to use the new directory entry
format.
Programs which currently call
.B getdirentries(\|)
should be modified to use the new system call and the new include file
.B dirent.h
or, preferably, to use the
.BR directory (3)
library routines.  The
.B getdirentries(\|)
system call is retained in the current Sun\s-1OS\s0
release only for purposes of backwards binary compatibility and
will be removed in a future major release.
.LP
.B getdirentries(\|)
attempts to put directory entries from the directory referenced by
the file descriptor
.B fd
into the buffer pointed to by
.IR buf ,
in a filesystem independent format.  Up to
.I nbytes
bytes of data will be transferred.
.I nbytes
must be greater than or equal to the block size associated with the file, see
.BR stat(2) .
Sizes less than this may cause errors on certain filesystems.
.LP
The data in the buffer is a series of structures each containing the
following entries:
.LP
.RS
.ta +\w'unsigned\0short\0'u +\w'd_name[MAXNAMELEN + 1];\0'u
.ft B
.nf
unsigned long	d_fileno;
unsigned short	d_reclen;
unsigned short	d_namlen;
char    	d_name[\s-1MAXNAMELEN\s0 + 1];	/* see below */
.ft R
.fi
.RE
.LP
The
.B d_fileno
entry is a number which is unique for each distinct file in the filesystem.
Files that are linked by hard links (see
.BR link (2))
have the same
.BR d_fileno .
The
.B d_reclen
entry is the length, in bytes, of the directory record.
The
.B d_name
entry contains a null terminated file name.
The
.B d_namlen
entry specifies the length of the file name.
Thus the actual size of
.B d_name
may vary from 2 to
.BR \s-1MAXNAMELEN\s0 + 1 .
.LP
The structures are not necessarily tightly packed.
The
.B d_reclen
entry may be used as an offset from the beginning of a
.B direct
structure to the next structure, if any.
.LP
Upon return, the actual number of bytes transferred is returned.
The current position pointer associated with
.B fd
is set to point to the next block of entries.
The pointer is not necessarily incremented by the number of bytes returned by
.BR getdirentries .
If the value returned is zero, the end of the directory has been reached.
The current position pointer may be set and retrieved by
.BR lseek (2).
.B getdirentries(\|)
writes the position of the block read into the location pointed to by
.IR basep .
It is not safe to set the current position pointer to any value other than
a value previously returned by
.BR lseek (2)
or a value previously returned in the location pointed to by
.I basep
or zero.
.SH RETURN VALUE
If successful, the number of bytes actually transferred is returned.
Otherwise, a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.B getdirentries(\|)
will fail if one or more of the following are true:
.TP 15
.SM EBADF
.I fd
is not a valid file descriptor open for
reading.
.TP
.SM EFAULT
Either
\fIbuf\fP or
.I basep
point outside the allocated address space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EINTR
A read from a slow device was interrupted before
any data arrived by the delivery of a signal.
.SH "SEE ALSO"
.BR getdents (2),
.BR link (2),
.BR lseek (2),
.BR open (2V),
.BR stat (2),
.BR directory (3)
  	symlink.2    
  9  sync.2 .  
  9  	syscall.2  .     9  tell.2 .    9  
truncate.2 .  $  9  umask.2   8  9  uname.2v .2   L  9  unlink.2 .2   `  9  	unmount.2 2   t  9  ./share/man/man2/getdomainname.2                                                                       755       0      12         4025  4424741000  11571                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getdomainname.2 1.16 89/03/26 SMI;
.TH GETDOMAINNAME 2 "22 March 1989"
.SH NAME
getdomainname, setdomainname \- get/set name of current domain
.SH SYNOPSIS
.nf
.ft B
int getdomainname(name, namelen)
char \(**name;
int namelen;
.sp .5
.ft B
int setdomainname(name, namelen)
char \(**name;
int namelen;
.fi
.SH DESCRIPTION
.LP
.IX  getdomainname  ""  "\fLgetdomainname\fP \(em get process domain"
.IX  "processes and protection"  getdomainname  ""  \fLgetdomainname\fP
.IX  domain  "get name of current \(em \fLgetdomainname\fR"
.IX  get "process domain name \(em \fLgetdomainname\fR"
.IX  setdomainname  ""  "\fLsetdomainname\fP \(em set process domain"
.IX  "processes and protection"  setdomainname  ""  \fLsetdomainname\fP
.IX  domain  "set name of current \(em \fLsetdomainname\fR"
.IX  set "process domain name \(em \fLsetdomainname\fR"
.B getdomainname(\|)
returns the name of the domain for the current processor, as previously
set by
.BR getdomainname .
The parameter
.I namelen
specifies the size of the array pointed to by
.IR name .
The returned name is null-terminated unless insufficient space
is provided.
.LP
.B setdomainname(\|)
sets the domain of the host machine to be
.IR name ,
which has length
.IR namelen .
This call is restricted to the super-user and is normally used only
when the system is bootstrapped.
.LP
The purpose of domains is to enable two distinct networks that may have
host names in common to merge.  Each network would be distinguished by
having a different domain name.  At the current time, only the Yellow
Pages service and
.BR sendmail (8)
make use of domains.
.SH "RETURN VALUE
If the call succeeds a value of 0 is returned.  If the call fails, then
a value of \-1 is returned and an error code is placed in the global
location
.BR errno .
.SH ERRORS
The following errors may be returned by these calls:
.TP 15
.SM EFAULT
The
.I name
parameter gave an invalid address.
.TP
.SM EPERM
The caller was not the super-user.  This error only applies to
.BR setdomainname .
.SH NOTES
Domain names are limited to 64 characters.
2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2    
@  9  
sigstack.2 2  
T  9  sigvec.2 ack  
h  9  socket.2 c.2  
  9  socketpair.2 2   
  9  stat.2 a  
  9  statfs.2 tat  
  9  swapon.2 s.2  
  9  	symlink.2 .2  
  9  sync.2 l  
  9  	syscall.2 nc     9  tell.2 c    9  
truncate.2 l  $  9  umask.2   8  9  uname.2v mas  L  9  unlink.2 .2v  `  9  	unmount.2 .2  t  9  utimes.2 nt.    9  	vadv./share/man/man2/getdtablesize.2                                                                       755       0      12         1460  4424741000  11607                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)getdtablesize.2 1.13 89/03/26 SMI; from UCB 6.2 6/28/85
.TH GETDTABLESIZE 2 "22 March 1989"
.SH NAME
getdtablesize \- get descriptor table size
.SH SYNOPSIS
.nf
.ft B
getdtablesize(\|)
.fi
.ft R
.IX  getdtablesize  ""  \fLgetdtablesize\fP
.IX  descriptors  getdtablesize  ""  \fLgetdtablesize\fP
.SH DESCRIPTION
.LP
Each process has a fixed size descriptor table,
which is guaranteed to have at least 20 slots.  The entries in
the descriptor table are numbered with small integers starting at 0.
The call
.B getdtablesize(\|)
returns the size of this table.
.SH "SEE ALSO"
.BR close (2),
.BR dup (2),
.BR open (2V)
  mount.2      8  
mprotect.2 n    8  msgctl.2 ect  (  8  msgget.2 l.2  8  8  msgop.2   L  9  msgrcv.2 sgo  `  9  msgsnd.2 v.2  p  9  msync.2     9  munmap.2 syn    9  ./share/man/man2/getegid.2                                                                             755       0      12           67  4424741000  10333                                                                                                                                                                                                                                                                                                                                                                      .so man2/getgid.2
.\" @(#)getegid.2 1.9 89/03/26 SMI; 
  getgid.2 id.    8  getgroups.2     8  gethostid.2     8  
gethostname.2 2     8  getitimer.2     8  getmsg.2 ime     8  intro.2     8  
getpagesize.2 2   0  8  
getpeername.2 2   D  8  
getpgrp.2v .  X  8  getpid.2 rp.  l  8  	getppid.2 .2    8  
getpriority.2 .2    8  getrlimit.2     8  getrusage.2     8  
getsockname.2 2     8  getsockopt.2  2     8  gettimeofday.2      8./share/man/man2/geteuid.2                                                                             755       0      12           67  4424741000  10351                                                                                                                                                                                                                                                                                                                                                                      .so man2/getuid.2
.\" @(#)geteuid.2 1.9 89/03/26 SMI; 
  getgroups.2     8  gethostid.2     8  
gethostname.2     8  getitimer.2     8  getmsg.2 .2      8  intro.2     8  
getpagesize.2   0  8  
getpeername.2 0  D  8  
getpgrp.2v    X  8  getpid.2 v .  l  8  	getppid.2 p.    8  
getpriority.2     8  getrlimit.2     8  getrusage.2     8  
getsockname.2     8  getsockopt.2      8  gettimeofday.2     8  getuid.2 2      8./share/man/man2/getgid.2                                                                              755       0      12         1723  4424741000  10226                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getgid.2 1.16 89/03/26 SMI; from UCB 4.2
.TH GETGID 2 "27 January 1988"
.SH NAME
getgid, getegid \- get group identity
.SH SYNOPSIS
.nf
.ft B
gid = getgid()
int gid;
.LP
.ft B
egid = getegid()
int egid;
.fi
.IX  getgid  ""  "\fLgetgid\fP \(em get group ID"
.IX  "processes and protection"  getgid  ""  \fLgetgid\fP
.IX  getegid  ""  "\fLgetegid\fP \(em get effective group ID"
.IX  "processes and protection"  getegid  ""  \fLgetegid\fP
.IX  "group ID"  get
.IX  "group ID"  "get effective"
.IX  "effective group ID"  get
.SH DESCRIPTION
.B getgid(\|)
returns the real group
.SM ID
of the current process,
.B getegid(\|)
the effective group
.SM ID\s0.
.LP
The real
.SM GID
is specified at login time.
.LP
The effective
.SM GID
is more transient, and determines
additional access permission during execution of a
\(lqset\s-1GID\s0\(rq process, and it is for such processes
that
.B getgid(\|)
is most useful.
.SH "SEE ALSO"
.BR getuid (2),
.BR setregid (2),
.BR setuid (3)
IX  "group ID"  "get effective"
.IX  "effecti./share/man/man2/getgroups.2                                                                           755       0      12         4413  4424741000  11001                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getgroups.2 1.23 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETGROUPS 2 "22 March 1989"
.SH NAME
getgroups, setgroups \- get or set group access list
.SH SYNOPSIS
.nf
.ft B
#include <sys/param.h>
.LP
.ft B
int getgroups(gidsetlen, gidset)
int gidsetlen, \(**gidset;
.LP
.ft B
int setgroups(ngroups, gidset)
int ngroups, \(**gidset;
.fi
.SH DESCRIPTION
.IX  setgroups  ""  \fLsetgroups()\fP
.IX  "processes and protection"  setgroups  ""  \fLsetgroups()\fP
.IX  "groups access list, set \(em \fLsetgroups()\fR"
.IX  getgroups  ""  \fLgetgroups()\fP
.IX  "processes and protection"  getgroups  ""  \fLgetgroups()\fP
.IX  "groups access list, get \(em \fLgetgroups()\fR"
.SS getgroups
.LP
.B getgroups(\|)
gets the current group access list of the user process and stores it in
the array
.IR gidset .
The parameter
.I gidsetlen
indicates the number of entries that may be placed in
.IR gidset .
.B getgroups(\|)
returns the actual number of entries placed in the
.I gidset
array. No more than
.SM
.BR NGROUPS \s0,
as defined in
.BR /usr/include/sys/param.h ,
will ever be returned.
.SS setgroups
.B setgroups(\|)
sets the group access list of the current user process
according to the array
.IR gidset .
The parameter
.I ngroups
indicates the number of entries in the array and must be no
more than
.SM
.BR NGROUPS \s0,
as defined in
.BR param.h .
.LP
Only the super-user may set new groups.
.SH RETURN VALUE
.SS getgroups
A return value of greater than zero indicates the number of entries
placed in the array pointed to by
.IR gidset .
A return value of \-1 indicates that an error occurred, and the error
code is stored in the global variable
.BR errno .
.SS setgroups
A 0 value is returned on success, \-1 on error, with
a error code stored in
.BR errno .
.SH ERRORS
Either call fails if:
.TP 15
.SM EFAULT
The address specified for
.I gidset
is outside the process address space.
.LP
.B getgroups(\|)
fails if:
.TP 20
.SM EINVAL
The argument
.I gidsetlen
is smaller than the number of groups in the group set.
.LP
.B setgroups(\|)
fails if:
.TP 20
.SM EPERM
The caller is not the super-user.
.SH SEE ALSO
.BR initgroups (3)
sk.2   8  9  uname.2v .2   L  9  unlink.2 .2   `  9  	unmount.2 2   t  9  utimes.2  as    9  	vadvise.2 2v    9  vfork.2     9  	vhangup.2 2     9  wait.2 .    9  wait3.2     9  wait4.2      9  writ./share/man/man2/gethostid.2                                                                           755       0      12         1240  4424741001  10750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gethostid.2 1.16 89/03/26 SMI; from UCB 4.2
.TH GETHOSTID 2 "22 March 1989"
.SH NAME
gethostid \- get unique identifier of current host
.SH SYNOPSIS
.nf
.ft B
gethostid()
.fi
.IX  gethostid  ""  \fLgethostid\fP
.IX  "processes and protection"  gethostid  ""  \fLgethostid\fP
.IX  host  "get identifier of"
.IX  "current host, get identifier of \(em \fLgethostid\fR"
.IX  "identifier of current host, get \(em \fLgethostid\fR"
.SH DESCRIPTION
.B gethostid(\|)
returns the 32-bit identifier for the current host,
which should be unique across all hosts.
On a Sun workstation, this number is taken from the
.SM CPU
board's
.SM ID PROM\s0.
.SH SEE ALSO
.BR hostid (1)
  mmap.2 o    8  mount.2      8  
mprotect.2      8  msgctl.2 2    (  8  msgget.2 2    8  8  msgop.2   L  9  msgrcv.2 .2   `  9  msgsnd.2 .2   p  9  msync.2     9  munmap.2 .2     9  nfssvc.2 .2     9  open.2v     9  pipe.2 n    9  poll.2 e    9  profil.2 2 e    9  ptrace.2 2 e  ./share/man/man2/gethostname.2                                                                         755       0      12         3471  4424741001  11304                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gethostname.2 1.17 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETHOSTNAME 2 "22 March 1989"
.SH NAME
gethostname, sethostname \- get/set name of current host
.SH SYNOPSIS
.nf
.ft B
int gethostname(name, namelen)
char \(**name;
int namelen;
.LP
.ft B
int sethostname(name, namelen)
char \(**name;
int namelen;
.fi
.IX  gethostname  ""  \fLgethostname()\fP
.IX  "processes and protection"  gethostname  ""  \fLgethostname\fP
.IX  sethostname  ""  \fLsethostname()\fP
.IX  "processes and protection"  sethostname  ""  \fLsethostname\fP
.IX  host "get/set name \(em \fLgethostname()\fR"
.SH DESCRIPTION
.B gethostname(\|)
returns the standard host name for the current processor, as previously set by
.BR sethostname .
The parameter
.I namelen
specifies the size of the array pointed to by
.IR name .
The returned name is null-terminated unless insufficient
space is provided.
.LP
.B sethostname(\|)
sets the name of the host machine to be
.IR name ,
which has length
.IR namelen .
This call is restricted to the super-user and
is normally used only when the system is bootstrapped.
.SH "RETURN VALUE
If the call succeeds a value of 0 is returned.  If the call
fails, then a value of \-1 is returned and an error code is
placed in the global location
.BR errno .
.SH ERRORS
The following errors may be returned by these calls:
.TP 15
.SM EFAULT
The
.I name
or
.I namelen
parameter gave an
invalid address.
.TP
.SM EPERM
The caller was not the super-user.  Note that this error only applies to
.BR sethostname(\|) .
.SH SEE ALSO
.BR gethostid (2)
.SH NOTES
Host names are limited to
.SB MAXHOSTNAMELEN
(from
.BR /usr/include/sys/param.h )
characters, currently 64.
.2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause.2    
,  9  sigsetmask.2  
,  
@  9  
sigstack.2 ,  
T  9  sigvec.2 2 ,  
h  9  socket.2 2 ,  
./share/man/man2/getitimer.2                                                                           755       0      12        10132  4424741001  10767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getitimer.2 1.19 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETITIMER 2 "22 March 1989"
.SH NAME
getitimer, setitimer \- get/set value of interval timer
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h>
.LP
.ft B
int getitimer (which, value)
int which;
struct itimerval \(**value;
.LP
.ft B
int setitimer (which, value, ovalue)
int which;
struct itimerval \(**value, \(**ovalue;
.fi
.IX  getitimer  ""  \fLgetitimer\fP
.IX  "timing and statistics"  getitimer  ""  \fLgetitimer\fP
.IX  setitimer  ""  \fLsetitimer\fP
.IX  "timing and statistics"  setitimer  ""  \fLsetitimer\fP
.IX  "interval timers"  get
.IX  "interval timers"  set
.SH DESCRIPTION
The system provides each process with three interval timers, defined in
.BR /usr/include/sys/time.h .
The
.B getitimer(\|)
call stores the current value of the timer specified by
.B which
into the structure pointed to by
.IR value .
The
.B setitimer(\|)
call sets the value of the timer specified by
.B which
to the value specified in the structure pointed to by
.IR value ,
and if
.I ovalue
is not a
.SM NULL
pointer, stores the previous value of the timer in the
structure pointed to by
.IR ovalue .
.LP
A timer value is defined by the
.B itimerval
structure, which includes the following members:
.LP
.RS
.ta +\w'struct timeval\0'u +\w'it_interval;\0'u
.nf
.ft B
struct timeval	it_interval;	/\(** timer interval \(**/
struct timeval	it_value;	/\(** current value \(**/
.ft R
.fi
.RE
.LP
If
.B it_value
is non-zero, it indicates the time to the next timer expiration.  If
.B it_interval
is non-zero, it specifies a value to be used in reloading
.B it_value
when the timer expires.  Setting
.B it_value
to zero disables a timer; however,
.B it_value
and
.B it_interval
must still be initialized.  Setting
.B it_interval
to zero causes a timer to be disabled after its next expiration (assuming
.B it_value
is non-zero).
.LP
Time values smaller than the resolution of the
system clock are rounded up to this resolution.
.LP
The three timers are:
.TP 20
.SB ITIMER_REAL
Decrements in real time.  A
.SB SIGALRM
signal is delivered when this timer expires.
.TP
.SB ITIMER_VIRTUAL
Decrements in process virtual time.
It runs only when the process is executing.  A
.SB SIGVTALRM
signal is delivered when it expires.
.TP
.SB ITIMER_PROF
Decrements both in process virtual time and
when the system is running on behalf of the process.  It is designed
to be used by interpreters in statistically profiling the execution
of interpreted programs.
Each time the
.SB ITIMER_PROF
timer expires, the
.SB SIGPROF
signal is delivered.  Because this signal
may interrupt in-progress
system calls, programs using this timer must be prepared to
restart interrupted system calls.
.SH RETURN VALUE
If the calls succeed, a value of 0 is returned.  If an error occurs,
the value \-1 is returned, and a more precise error code is placed
in the global variable
.BR errno .
.SH ERRORS
The possible errors are:
.TP 15
.SM EFAULT
The
.I value
or
.I ovalue
parameter specified a bad address.
.TP
.SM EINVAL
The
.I value
parameter specified a time that was too large to be handled.
.SH "SEE ALSO"
.BR sigvec (2),
.BR gettimeofday (2)
.SH NOTES
Three macros for manipulating time values are defined in
.BR time.h .
.IX  timerclear  ""  "\fLtimerclear\fP \(em macro"
.IX  "timing and statistics"  timerclear  ""  "\fLtimerclear\fP \(em macro"
.IX  "interval timers"  timerclear  ""  "\fLtimerclear\fP \(em macro"
.B timerclear
sets a time value to zero,
.IX  timerisset  ""  "\fLtimerisset\fP \(em macro"
.IX  "timing and statistics"  timerisset  ""  "\fLtimerisset\fP \(em macro"
.IX  "interval timers"  timerisset  ""  "\fLtimerisset\fP \(em macro"
.B timerisset
tests if a time value is non-zero, and
.IX  timercmp  ""  "\fLtimercmp\fP \(em macro"
.IX  "timing and statistics"  timercmp  ""  "\fLtimercmp\fP \(em macro"
.IX  "interval timers"  timercmp  ""  "\fLtimercmp\fP \(em macro"
.B timercmp
compares two time values (beware that
.B >=
and
.B <=
do not work with this macro).

  9  sync.2 l  
  9  	syscall.2 nc     9  tell.2 c    9  
truncate.2 l  $  9  umask.2   8  9  uname.2v mas  L  9  unlink.2 .2v  `  9  	unmount.2 .2  t  9  utimes.2 nt.    9  	vadvise.2 .2    9  vfork.2     9  	vhangup.2 or    9  wait.2 n    9  wait3.2     9  wait4.2      9  write.2v ait     9  	writev.2v 2v .2      9  	writev.2v 2      9  	writ./share/man/man2/getmsg.2                                                                              755       0      12        12164  4424741001  10273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getmsg.2 1.13 89/03/26 SMI; from S5R3
.TH GETMSG 2 "22 March 1989"
.SH NAME
getmsg \- get next message from a stream
.SH SYNOPSIS
.B #include <stropts.h>
.LP
.nf
.B int getmsg(fd, ctlptr, dataptr, flags)
.B int fd;
.B struct strbuf *ctlptr;
.B struct strbuf *dataptr;
.B int *flags;
.fi
.SH DESCRIPTION
.IX "getmsg function" "" "\fLgetmsg()\fP function"
.LP
.B getmsg(\|)
retrieves the contents of a message
(see
.BR intro (2))
located at the
.B stream head
read queue from a
.SM STREAMS
file,
and places the contents into user specified buffer(s).
The message must contain either a data part, a control part or both.
The data and control parts of the message are placed into separate buffers, as described below.
The semantics of each part is defined by the
.SM STREAMS
module that generated the message.
.LP
.I fd
specifies a file descriptor referencing an open
.BR stream .
.I ctlptr
and
.I dataptr
each point to a
.B strbuf
structure that contains the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 2.5i
int maxlen;	/* maximum buffer length */
int len;  	/* length of data */
char *buf;	/* ptr to buffer */
.ft R
.fi
.DT
.RE
.LP
where
.B buf
points to a buffer in which the data or control information
is to be placed, and
.B maxlen
indicates the maximum number of bytes
this buffer can hold.  On return,
.B len
contains the number of bytes of data or control
information actually received,
or is 0 if there is a zero-length control or data part,
or is \-1 if no data or control information is present in the message.
.I flags
may be set to the values 0 or
.SB RS_HIPRI
and is used as described below.
.LP
.I ctlptr
is used to hold the control part from the message
and
.I dataptr
is used to hold the data part from the
message.
If
.I ctlptr
(or
.IR dataptr )
is a
.SM NULL
pointer or the
.B maxlen
field is \-1, the control (or data) part of the message is
not
processed and is left on the
.B stream head
read queue and
.B len
is set to \-1.  If the
.B maxlen
field is set to 0 and there is a zero-length control
(or data) part, that zero-length part is removed from the read queue and
.B len
is set to 0.  If the
.I maxlen
field is set to 0 and there are more than zero bytes of
control (or data) information,
that information is left on the read queue and
.B len
is set to 0.  If the
.I maxlen
field in
.I ctlptr
or
.I dataptr
is less than,
respectively, the control or data part of the message,
.I maxlen
bytes are retrieved.
In this case, the remainder of the message is left on the
.B stream head
read queue and a non-zero return value is provided, as described below under
.SM RETURN VALUE\s0.
If information is retrieved from a
.B priority
message,
.I flags
is set to
.SB RS_HIPRI
on return.
.LP
By default,
.B getmsg(\|)
processes the first priority or non-priority message
available on the
.B stream head
read queue.
However, a process may choose to retrieve only priority messages by setting
.I flags
to
.SM
.BR RS_HIPRI \s0.
In this case,
.B getmsg(\|)
will only process the next message if it is a
priority message.
.LP
If
.SB O_NDELAY
has not been set,
.B getmsg(\|)
blocks until a message,
of the type(s) specified by
.I flags
(priority or either), is available
on the
.B stream head
read queue.
If
.SB O_NDELAY
has been set and a message of the specified type(s) is
not present on the read queue,
.B getmsg(\|)
fails and sets
.B errno
to
.SM EAGAIN\s0.
.LP
If a hangup occurs on the
.B stream
from which messages are to be retrieved,
.B getmsg(\|)
will continue to operate normally, as described above,
until the
.B stream head
read queue is empty.
Thereafter, it will return 0 in the
.B len
fields of
.I ctlptr
and
.IR dataptr .
.SH RETURN VALUE
Upon successful completion, a non-negative value is returned.
A value of 0 indicates that a full message was read successfully.
A return value of
.SB MORECTL
indicates that more control information is waiting for retrieval.
A return value of
.SB MOREDATA
indicates that more data is waiting for retrieval.
A return value of
\s-1MORECTL\s0|\s-1MOREDATA\s0
indicates that both types of information remain.
Subsequent
.B getmsg(\|)
calls will retrieve the remainder of the message.
If an error occurred, a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.B getmsg(\|)
fails if one or more of the following are
true:
.TP 15
.SM EAGAIN
The
.SB O_NDELAY
flag is set, and no messages are available.
.TP
.SM EBADF
.I fd
is not a valid file descriptor open for
reading.
.TP
.SM EBADMSG
The queued message to be read is not valid for
.BR getmsg(\|) .
.TP
.SM EFAULT
.IR ctlptr ,
.IR dataptr ,
or
.I flags
points to a location
outside the allocated address space.
.TP
.SM EINTR
A signal was caught during the
.B getmsg(\|)
system call.
.TP
.SM EINVAL
An illegal value was specified in
.IR flags ,
or the
.B stream
referenced by
.I fd
is linked under a multiplexor.
.TP
.SM ENOSTR
A
\fBstream\fP is not associated with
.IR fd .
.LP
A
.B getmsg(\|)
can also fail if a
.SM STREAMS
error message had been
received at the
.B stream head
before the call to
.BR getmsg .
The error returned is the value contained in the
.SM STREAMS
error message.
.SH "SEE ALSO"
.BR intro (2),
.BR poll (2),
.BR putmsg (2),
.BR read (2),
.BR write (2)
current position, or end-of-file, respectively.
The process id field
.RB  ( l_pid )
is only used with the
.SB F_GETLK
.I cmd
to return
the description of a lock held by another process.
.LP
Locks may start and extend beyond the current end-of-file,
but may not be negative relative to the beginning of the file.
A lock may be set to always extend to the end-of-file by setting
.B l_len
to zero (0./share/man/man2/intro.2                                                                               755       0      12           63  4424741003  10055                                                                                                                                                                                                                                                                                                                                                                      .so man2/Intro.2
.\" @(#)intro.2 1.6 89/03/26 SMI;
0  8  
getpeername.2 0  D  8  
getpgrp.2v 0  X  8  getpid.2 v   l  8  	getppid.2  .    8  
getpriority.2     8  getrlimit.2     8  getrusage.2     8  
getsockname.2     8  getsockopt.2      8  gettimeofday.2     8  getuid.2 2     8  ioctl.2   (  8  kill.2v   <  8  killpg.2 2v   L  8  link.2 2  \  8  list.2 k  p  8  listen.2 2 k    8  lseek.2     8  lstat.2     8  	./share/man/man2/getpagesize.2                                                                         755       0      12         1245  4424741001  11272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpagesize.2 1.14 89/03/26 SMI; from UCB 4.2
.TH GETPAGESIZE 2 "22 March 1989"
.SH NAME
getpagesize \- get system page size
.SH SYNOPSIS
.nf
.ft B
getpagesize()
.ft R
.fi
.IX  getpagesize  ""  \fLgetpagesize\fP
.IX  "memory management"  getpagesize  ""  \fLgetpagesize\fP
.IX  "page size, get \(em \fLgetpagesize\fR"
.IX  "system page size, get \(em \fLgetpagesize\fR"
.SH DESCRIPTION
.B getpagesize(\|)
returns the number of bytes in a page.
Page granularity is the granularity of many of the memory
management calls.
.LP
The page size is a
.I system
page size and may not be the same as the underlying
hardware page size.
.SH SEE ALSO
.BR pagesize (1),
.BR sbrk (2)
 L  9  msgrcv.2  L  `  9  msgsnd.2  `  p  9  msync.2     9  munmap.2      9  nfssvc.2      9  open.2v     9  pipe.2      9  poll.2 n    9  profil.2      9  ptrace.2      9  putmsg.2      9  
quotactl.2   (  9  read.2v   <  9  
readlink.2 <  P  9  readv.2v  P  d  9./share/man/man2/getpeername.2                                                                         755       0      12         3005  4424741001  11253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpeername.2 1.16 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETPEERNAME 2 "20 November 1987"
.SH NAME
getpeername \- get name of connected peer
.SH SYNOPSIS
.nf
.LP
.ft B
int getpeername(s, name, namelen)
int s;
struct sockaddr \(**name;
int \(**namelen;
.fi
.IX  getpeername  ""  \fLgetpeername\fP
.IX  "socket operations"  getpeername  ""  \fLgetpeername\fP
.IX  "peer name, get \(em \fLgetpeername\fR"
.IX  "connected peer, get name of"
.SH DESCRIPTION
.LP
.B getpeername(\|)
returns the name of the peer connected to socket
.IR s .
The
.B int
pointed to by the
.I namelen
parameter should be initialized to indicate
the amount of space pointed to by
.IR name .
On return it contains the actual size of the name
returned (in bytes).
The name is truncated if the buffer provided is too small.
.SH DIAGNOSTICS
A 0 is returned if the call succeeds, \-1 if it fails.
.SH ERRORS
The call succeeds unless:
.TP 20
.SM EBADF
The argument
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
The argument
.I s
is a file, not a socket.
.TP
.SM ENOTCONN
The socket is not connected.
.TP
.SM ENOBUFS
Insufficient resources were available in the system
to perform the operation.
.TP
.SM EFAULT
The
.I name
parameter points to memory not in a valid part of the
process address space.
.SH "SEE ALSO"
.BR accept (2),
.BR bind (2),
.BR getsockname (2),
.BR socket (2)
 setrlimit.2   	H  9  setsockopt.2 .2   	`  9  settimeofday.2   	x  9  setuseraudit.2   	  9  shmat.2   	  9  shmctl.2 hma  	  9  shmdt.2   	  9  shmget.2 hmd  	  9  shmop.2   	  9  
shutdown.2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2   
@  9  
sigstack.2 2  
T  9  sigvec.2 ack  
h  9  socket.2 c.2  
  9  socketpair.2  
h  
  9  stat.2 a  
  9  statfs.2 tat  
  9  swapon.2 s.2  
  9  	symlink.2 .2  
  9./share/man/man2/getpgrp.2v                                                                            755       0      12           71  4424741002  10556                                                                                                                                                                                                                                                                                                                                                                      .so man2/setpgrp.2v
.\" @(#)getpgrp.2v 1.5 89/03/26 SMI;
 	getppid.2 .2    8  
getpriority.2 .2    8  getrlimit.2     8  getrusage.2     8  
getsockname.2 2     8  getsockopt.2  2     8  gettimeofday.2     8  getuid.2 day    8  ioctl.2   (  8  kill.2v   <  8  killpg.2 ill  L  8  link.2 l  \  8  list.2   p  8  listen.2 ist    8  lseek.2     8  lstat.2     8  	mincore.2 ta    8  mkdir.2     8  mknod.2     8  mmap.2   ./share/man/man2/getpid.2                                                                              755       0      12         2075  4424741002  10242                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)getpid.2 1.14 89/03/26 SMI; from UCB 6.3 5/13/86
.TH GETPID 2 "22 March 1989"
.SH NAME
getpid, getppid \- get process identification
.SH SYNOPSIS
.ft B
.nf
getpid(\|)
.LP
.ft B
getppid(\|)
.fi
.ft R
.IX  getpid  ""  \fLgetpid()\fP
.IX  "processes and protection"  getpid  ""  \fLgetpid()\fP
.IX  getppid  ""  \fLgetppid()\fP
.IX  "processes and protection"  getppid  ""  \fLgetppid()\fP
.IX  get "process identification \(em \fLgetpid()\fR"
.IX  get "parent process identification \(em \fLgetppid()\fR"
.IX  process "get identification \(em \fLgetpid()\fR"
.IX  "parent process identification, get \(em \fLgetppid()\fR"
.SH DESCRIPTION
.B getpid(\|)
returns the process
.SM ID
of the current process.  Most often it is used
to generate uniquely-named temporary files.
.LP
.B getppid(\|)
returns the process
.SM ID
of the parent of the current process.
.SH "SEE ALSO
.BR gethostid (2)
brk.2 i    9  select.2 2      9  semctl.2 brk    9  semget.2 t.2  $  9  semop.2   4  9  send.2 o  H  9  	sendmsg.2    \  9  sendto.2  nd  p  9  	setauid.2 g.    9  setdomainname.2     9  setgroups.2     9  
sethostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2 e  	  9  
setreuid.2 .  	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`./share/man/man2/getppid.2                                                                             755       0      12           67  4424741002  10361                                                                                                                                                                                                                                                                                                                                                                      .so man2/getpid.2
.\" @(#)getppid.2 1.9 89/03/26 SMI; 
  8  getrlimit.2     8  getrusage.2     8  
getsockname.2     8  getsockopt.2      8  gettimeofday.2     8  getuid.2 2     8  ioctl.2   (  8  kill.2v   <  8  killpg.2 2v   L  8  link.2 2  \  8  list.2 k  p  8  listen.2 2 k    8  lseek.2     8  lstat.2     8  	mincore.2 2     8  mkdir.2     8  mknod.2     8  mmap.2 o    8  mount.2      8  
mprotect.2      8./share/man/man2/getpriority.2                                                                         755       0      12         6652  4424741002  11354                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpriority.2 1.24 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETPRIORITY 2 "22 March 1989"
.SH NAME
getpriority, setpriority \- get/set program scheduling priority
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h>
#include <sys/resource.h>
.LP
.ft B
int getpriority(which, who)
int which, who;
.LP
.ft B
int setpriority(which, who, prio)
int which, who, prio;
.fi
.ft R
.SH DESCRIPTION
.IX  getpriority  ""  \fLgetpriority\fP
.IX  "resource controls"  getpriority  ""  \fLgetpriority\fP
.IX  setpriority  ""  \fLsetpriority\fP
.IX  "resource controls"  setpriority  ""  \fLsetpriority\fP
.IX  get "scheduling priority \(em \fLgetpriority\fR"
.IX  set "scheduling priority \(em \fLsetpriority\fR"
.IX  "scheduling priority"  get
.IX  "scheduling priority"  set
.IX  priority  get
.IX  priority  set
.LP
The scheduling
priority of the process, process group, or user, as indicated by
.I which
and
.I who
is obtained with the
.B getpriority(\|)
call and set with the
.B setpriority(\|)
call.
Priorities
are values in the range \-20 to 20.  The default priority is 0;
lower priorities cause more favorable scheduling.
.LP
.I which
is one of
.SM
.BR PRIO_PROCESS \s0,
.SM
.BR PRIO_PGRP \s0,
or
.SM
.BR PRIO_USER \s0,
and
.I who
is interpreted relative to
.I which
(a process identifier for
.SM
.BR PRIO_PROCESS \s0,
process group identifier for
.SM
.BR PRIO_PGRP \s0,
and a user
.SM ID
for
.SM
.BR PRIO_USER \s0).
A zero value of
.I who
denotes the current process, process group, or user.
.LP
The
.B getpriority(\|)
call returns the highest priority (lowest numerical value)
enjoyed by any of the specified processes.  The
.B setpriority(\|)
call sets the priorities of all of the specified processes
to the value specified by
.IR prio .
If 
.I prio
is less than \-20,
a value of \-20 is used; if it is greater than 20, a value of 20 is used.
Only the super-user may lower priorities.
.SH RETURN VALUE
Since
.B getpriority(\|)
can legitimately return the value \-1, it is necessary
to clear the external variable
.B errno
prior to the
call, then check it afterward to determine
if a \-1 is an error or a legitimate value.
The
.B setpriority(\|)
call returns 0 if there is no error, or
\-1 if there is.
.SH ERRORS
.B getpriority(\|)
and
.B setpriority(\|)
may return one of the following errors:
.TP 15
.SM ESRCH
No process was located using the
.I which
and
.I who
values specified.
.TP
.SM EINVAL
.I which
was not one of
.SM
.BR PRIO_PROCESS \s0,
.SM
.BR PRIO_PGRP \s0,
or
.SM
.BR PRIO_USER \s0.
.LP
In addition to the errors indicated above,
.B setpriority(\|)
may fail with one of the following errors returned:
.TP 15
.SM EPERM
A process was located, but neither its effective nor real user
.SM ID
matched the effective user
.SM ID
of the caller, and neither the effective
nor the real user
.SM ID
of the process executing the
.B setpriority(\|)
was super-user.
.TP
.SM EACCES
The call to
.B getpriority(\|)
would have changed a process' priority to a value lower than its current
value, and the effective user
.SM ID
of the process executing the call was
not that of the super-user.
.SH "SEE ALSO"
.BR fork (2),
.BR nice (1),
.BR renice (8)
.SH BUGS
It is not possible for the process executing
.B setpriority(\|)
to lower any other process down to its current priority, without
requiring super-user privileges.
cess identifier for
.SM
.BR PRIO_PROCESS \s0,
process group identifier for
.SM
.BR PRI./share/man/man2/getrlimit.2                                                                           755       0      12        10537  4424741002  11010                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getrlimit.2 1.19 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETRLIMIT 2 "22 March 1989"
.SH NAME
getrlimit, setrlimit \- control maximum system resource consumption
.SH SYNOPSIS
.ft B
.nf
#include <sys/time.h>
#include <sys/resource.h>
.LP
.ft B
int getrlimit(resource, rlp)
int resource;
struct rlimit \(**rlp;
.LP
.ft B
int setrlimit(resource, rlp)
int resource;
struct rlimit \(**rlp;
.fi
.ft R
.IX  getrlimit  ""  \fLgetrlimit\fP
.IX  "resource control"  getrlimit  ""  \fLgetrlimit\fP
.IX  setrlimit  ""  \fLsetrlimit\fP
.IX  "resource control"  setrlimit  ""  \fLsetrlimit\fP
.SH DESCRIPTION
.LP
Limits on the consumption of system resources by the current process
and each process it creates may be obtained with the
.B getrlimit(\|)
call, and set with the
.B setrlimit(\|)
call.
.LP
The
.I resource
parameter is one of the following:
.TP 20
.SB RLIMIT_CPU
the maximum amount of cpu time (in seconds) to be used by
each process.
.TP
.SB RLIMIT_FSIZE
the largest size, in bytes, of any single file that may be created.
.TP
.SB RLIMIT_DATA
the maximum size, in bytes, of the data segment for a process;
this defines how far a program may extend its break with the
.B sbrk(\|)
(see
.BR brk (2))
system call.
.TP
.SB RLIMIT_STACK
the maximum size, in bytes, of the stack segment for a process;
this defines how far a program's stack segment may be extended
automatically by the system.
.TP
.SB RLIMIT_CORE
the largest size, in bytes, of a
.B core
file that may be created.
.TP
.SB RLIMIT_RSS
the maximum size, in bytes, to which a process's resident set size may
grow.  This imposes a limit on the amount of physical memory
to be given to a process; if memory is tight, the system will
prefer to take memory from processes that are exceeding their
declared resident set size.
.LP
A resource limit is specified as a soft limit and a hard limit.
When a soft limit is exceeded a process may receive a signal
(for example, if the cpu time is exceeded), but it will be allowed
to continue execution until it reaches the hard limit (or modifies
its resource limit).  The
.B rlimit
structure is used to specify the hard and soft limits on a resource,
.LP
.nf
.RS
.DT
.ft B
struct rlimit {
	int	rlim_cur;	/* current (soft) limit */
	int	rlim_max;	/* hard limit */
};
.ft R
.RE
.fi
.LP
Only the super-user may raise the maximum limits.  Other users
may only alter
.B rlim_cur
within the range from 0 to
.B rlim_max
or (irreversibly) lower
.BR rlim_max .
.LP
An \*(lqinfinite\*(rq value for a limit is defined as
.SB RLIM_INFINITY
.BR  (0x7\&f\&f\&f\&f\&f\&f\&f).
.LP
Because this information is stored in the per-process information,
this system call must be executed directly by the shell if it
is to affect all future processes created by the shell;
.B limit
is thus a built-in command to
.BR csh (1).
.LP
The system refuses to extend the data or stack space when the limits
would be exceeded in the normal way: a
.B brk(\|)
or
.B sbrk(\|)
call will fail if the data space limit is reached, or the process will be
sent a 
.SB SIGSEGV
when the stack limit is reached
which will kill the process unless
.SB SIGSEGV
is handled on a separate signal stack (since the stack cannot be
extended, there is no way to send a signal!).
.LP
A file I/O operation which would create a file that is too large
generates a signal
.BR \s-1SIGXFSZ\s0 ;
this normally terminates
the process, but may be caught.
When the soft
.SM CPU
time limit is exceeded, a signal
.SB SIGXCPU
is sent to the offending process.
.SH RETURN VALUE
A 0 return value indicates that the call succeeded, changing
or returning the resource limit.   A return value of \-1 indicates
that an error occurred, and an error code is stored in the global
location
.BR errno .
.SH ERRORS
The possible errors are:
.TP 15
.SM EFAULT
The address specified by
.I rlp
is invalid.
.TP
.SM EINVAL
An invalid
.I resource
was specified; or in a
.B setrlimit(\|)
call, the new
.B rlim_cur
exceeds the new
.BR rlim_max .
.TP
.SM EPERM
The limit specified to
.B setrlimit(\|)
would have
raised the maximum limit value, and the caller is not the super-user.
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR brk (2)
.BR quotactl (2),
.SH BUGS
.LP
There should be
.B limit
and
.B unlimit
commands in
.BR sh (1)
as well as in
.BR csh (1).
ile descriptor open for
reading.
.TP
.SM EBADMSG
The queued message to be read is not valid for
.BR getmsg(\|) .
.TP
.SM EFAULT
.IR ctlptr ,
.IR dataptr ,
or
.I ./share/man/man2/getrusage.2                                                                           755       0      12        14354  4424741002  10777                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)getrusage.2 1.21 89/03/26 SMI; from UCB 6.4 5/13/86
.TH GETRUSAGE 2 "22 March 1989"
.SH NAME
getrusage \- get information about resource utilization
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h>
#include <sys/resource.h>
.LP
.ft B
getrusage(who, rusage)
int who;
struct rusage *rusage;
.ft R
.fi
.IX  getrusage  ""  \fLgetrusage\fP
.IX  "resource control"  getrusage  ""  \fLgetrusage\fP
.IX  "resource utilization, get information about \(em \fLgetrusage\fR"
.SH DESCRIPTION
.LP
.B getrusage(\|)
returns information about the resources utilized by the current
process, or all its terminated child processes.
The interpretation for some values reported, such as
.BR ru_idrss ,
are dependent on the clock tick interval.
This interval is an implementation dependent value; for example,
on Sun-3 sytems the clock tick interval is 1/50 of a second,
while on Sun-4 systems the clock tick interval is 1/100 of a second.
.LP
The
.I who
parameter is one of
.SB RUSAGE_SELF
or
.BR \s-1RUSAGE_CHILDREN\s0 .
The buffer to which
.I rusage
points will be filled in with
the following structure:
.LP
.nf
.RS
.DT
.ft B
struct	rusage {
	struct timeval ru_utime;		/* user time used */
	struct timeval ru_stime;		/* system time used */
	int	ru_maxrss;		/* maximum resident set size */
	int	ru_ixrss;		/* currently 0 */
	int	ru_idrss;		/* integral resident set size */
	int	ru_isrss;		/* currently 0 */
	int	ru_minflt;		/* page faults not requiring physical I/O */
	int	ru_majflt;		/* page faults requiring physical I/O */
	int	ru_nswap;		/* swaps */
	int	ru_inblock;		/* block input operations */
	int	ru_oublock;		/* block output operations */
	int	ru_msgsnd;		/* messages sent */
	int	ru_msgrcv;		/* messages received */
	int	ru_nsignals;		/* signals received */
	int	ru_nvcsw;		/* voluntary context switches */
	int	ru_nivcsw;		/* involuntary context switches */
};
.ft R
.RE
.fi
.LP
The fields are interpreted as follows:
.TP 15
.B ru_utime
The total amount of time spent executing in user mode.
Time is given in seconds and microseconds.
.TP
.B ru_stime
The total amount of time spent executing in system mode.
Time is given in seconds and microseconds.
.TP
.B ru_maxrss
The maximum resident set size. 
Size is given in pages (the size of a page, in bytes, is given by the
.BR getpagesize (2)
system call).  Also, see
.SM WARNINGS\s0.
.TP
.B ru_ixrss
Currently returns 0.
.br
.ne 5
.TP
.B ru_idrss
An \(lqintegral\(rq value indicating the amount of memory in use
by a process while the process is running.
This value is the sum of the resident set sizes of the
process running when a clock tick occurs.
The value is given in pages times clock ticks.
Note: it does not take sharing into account.
Also, see
.SM WARNINGS\s0.
.br
.ne 5
.TP
.B ru_isrss
Currently returns 0.
.TP
.B ru_minflt
The number of page faults serviced which did not
require any physical I/O activity.
Also, see
.SM WARNINGS\s0.
.TP
.B ru_majflt
The number of page faults serviced which required physical I/O activity.
This could include page ahead operations by the kernel.
Also, see
.SM WARNINGS\s0.
.TP
.B ru_nswap
The number of times a process was swapped out of main memory.
.TP
.B ru_inblock
The number of times the file system had to perform input in
servicing a
.BR read (2)
request.
.TP
.B ru_oublock
The number of times the file system had to perform output in
servicing a
.BR write (2)
request.
.TP
.B ru_msgsnd
The number of messages sent over sockets.
.TP
.B ru_msgrcv
The number of messages received from sockets.
.TP
.B ru_nsignals
The number of signals delivered.
.TP
.B ru_nvcsw
The number of times a context switch resulted due to a process
voluntarily giving up the processor before its time slice was
completed (usually to await availability of a resource).
.TP
.B ru_nivcsw
The number of times a context switch resulted due to a higher
priority process becoming runnable or because the current process
exceeded its time slice.
.SH RETURN VALUE
.LP
If successful, the value of the appropriate structure
is filled in, and 0 is returned.
If the call fails, a \-1 is returned.
.SH ERRORS
.LP
.B getrusage(\|)
will fail if:
.TP 12
.SM EINVAL
The
.I who
parameter is not a valid value.
.TP
.SM EFAULT
The address specified by the
.I rusage
argument is not in a valid portion of the process's address space.
.SH SEE ALSO
.BR gettimeofday (2),
.BR read (2),
.BR wait (2),
.BR write (2)
.SH WARNINGS
.LP
The numbers
.B ru_inblock
and
.B ru_oublock
account only for real I/O, and are approximate measures at best.
Data supplied by the caching mechanism is charged only
to the first process to read and the last process to write the data.
.LP
The way resident set size is calculated is an approximation,
and could misrepresent the true resident set size.
.LP
Page faults can be generated from a variety of sources and for
a variety of reasons.
The customary cause for a page fault is a direct reference
by the program to a page which is not in memory. 
Now, however, the kernel can generate page faults on
behalf of the user, for example, servicing
.BR read (2)
and
.BR write (2)
system calls. 
Also, a page fault can be caused by an absent hardware translation
to a page, even though the page is in physical memory.
.LP
In addition to hardware detected page faults, the kernel may
cause pseudo page faults in order to perform some housekeeping. 
For example, the kernel may generate page faults, even if the pages
exist in physical memory, in order to lock down pages involved
in a raw I/O request.
.LP
By definition,
.I major
page faults require physical I/O, while
.I minor
page faults do not require physical I/O.
For example, reclaiming the page from the free list would
avoid I/O and generate a minor page fault.
More commonly, minor page faults occur during process
startup as references to pages which are already in memory.
For example, if an address space faults on some \(lqhot\(rq
executable or shared library, this results in a minor
page fault for the address space.
Also, any one doing a
.BR read (2)
or
.BR write (2)
to something that is in the page cache will
get a minor page fault(s) as well.
.SH BUGS
.LP
There is no way to obtain information about a child process
which has not yet terminated.
 on a separate signal stack (since the stack cannot be
extended, there is no way to send a signal!).
.LP
A file I/O operation which would create a file that is too large
generates a signal
.BR \s-1SIGXFSZ\s0 ;
this normally terminates
the process, but may be caught.
When the ./share/man/man2/getsockname.2                                                                         755       0      12         2402  4424741002  11260                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getsockname.2 1.14 89/03/26 SMI; from UCB 4.2
.TH GETSOCKNAME 2 "22 March 1989"
.SH NAME
getsockname \- get socket name
.SH SYNOPSIS
.nf
.LP
.ft B
getsockname(s, name, namelen)
int s;
struct sockaddr *name;
int *namelen;
.fi
.IX  getsockname  ""  \fLgetsockname\fP
.IX  "socket operations"  getsockname  ""  \fLgetsockname\fP
.IX  "interprocess communication"  getsockname  ""  \fLgetsockname\fP
.SH DESCRIPTION
.B getsockname(\|)
returns the current
.I name
for the specified socket.  The
.I namelen
parameter should be initialized to indicate
the amount of space pointed to by
.IR name .
On return it contains the actual size of the name
returned (in bytes).
.SH DIAGNOSTICS
A 0 is returned if the call succeeds, \-1 if it fails.
.SH ERRORS
The call succeeds unless:
.TP 15
.SM EBADF
The argument
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
The argument
.I s
is a file, not a socket.
.TP
.SM ENOBUFS
Insufficient resources were available in the system
to perform the operation.
.TP
.SM EFAULT
The
.I name
parameter points to memory not in a valid part of the
process address space.
.SH "SEE ALSO"
.BR bind (2),
.BR getpeername (2),
.BR socket (2)
.SH BUGS
Names bound to sockets in the
.SM UNIX
domain are inaccessible;
.B getsockname(\|)
returns a zero length name.
  9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2    	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9./share/man/man2/getsockopt.2                                                                          755       0      12        15634  4424741003  11176                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getsockopt.2 1.16 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETSOCKOPT 2 "22 March 1989"
.SH NAME
getsockopt, setsockopt \- get and set options on sockets
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
int getsockopt(s, level, optname, optval, optlen)
int s, level, optname;
char \(**optval;
int \(**optlen;
.sp
int setsockopt(s, level, optname, optval, optlen)
int s, level, optname;
char \(**optval;
int optlen;
.fi
.IX  getsockopt  ""  \fLgetsockopt()\fR
.IX  "socket operations"  getsockopt  ""  \fLgetsockopt()\fR
.IX  "interprocess communication"  getsockopt  ""  \fLgetsockopt()\fR
.IX  setsockopt  ""  \fLsetsockopt()\fR
.IX  "socket operations"  setsockopt  ""  \fLsetsockopt()\fR
.IX  "interprocess communication"  setsockopt  ""  \fLsetsockopt()\fR
.IX  "socket options"  get
.IX  "socket options"  set
.IX  "options on sockets"  get
.IX  "options on sockets"  set
.IX  get "options on sockets \(em \fLgetsockopt()\fR"
.IX  "set options sockets"
.SH DESCRIPTION
.B getsockopt(\|)
and
.B setsockopt(\|)
manipulate
.I options
associated with a socket.  Options may exist at multiple
protocol levels; they are always present at the uppermost ``socket'' level.
.LP
When manipulating socket options the level at which the
option resides and the name of the option must be specified.
To manipulate options at the ``socket'' level,
.I level
is specified as
.SM
.BR SOL_SOCKET \s0.
To manipulate options at any
other level the protocol number of the appropriate protocol
controlling the option is supplied.  For example,
to indicate that an option is to be interpreted by the
.SM TCP
protocol,
.I level
should be set to the protocol number of
.SM TCP\s0;
see
.BR getprotoent (3N).
.LP
The parameters
.I optval
and
.I optlen
are used to access option values for
.BR setsockopt(\|) .
For
.B getsockopt(\|)
they identify a buffer in which the value for the
requested option(s) are to be returned.  For
.BR getsockopt ,
.I optlen
is a value-result parameter, initially containing the
size of the buffer pointed to by
.IR optval ,
and modified on return to indicate the actual size of
the value returned.  If no option value is to be supplied or returned,
.I optval
may be supplied as 0.
.LP
.I optname
and any specified options are passed uninterpreted to the appropriate
protocol module for interpretation.
The include file
.B /usr/include/sys/socket.h
contains definitions for ``socket'' level options, described below.
Options at other protocol levels vary in format and
name; consult the appropriate entries in section (4P).
.LP
Most socket-level options take an
.I int
parameter for
.IR optval .
For
.BR setsockopt(\|) ,
the parameter should non-zero to enable a boolean option,
or zero if the option is to be disabled.
.SB SO_LINGER
uses a
.B struct linger
parameter, defined in
.BR socket.h ,
which specifies the desired state of the option and the
linger interval (see below).
.LP
The following options are recognized at the socket level.
Except as noted, each may be examined with
.B getsockopt(\|)
and set with
.BR setsockopt(\|) .
.LP
.RS
.PD 0
.TP 20
.SB SO_DEBUG 	
toggle recording of debugging information
.TP
.SB SO_REUSEADDR
toggle local address reuse
.TP
.SB SO_KEEPALIVE
toggle keep connections alive
.TP
.SB SO_DONTROUTE
toggle routing bypass for outgoing messages
.TP
.SB SO_LINGER
linger on close if data present
.TP
.SB SO_BROADCAST
toggle permission to transmit broadcast messages
.TP
.SB SO_OOBINLINE
toggle reception of out-of-band data in band
.TP
.SB SO_SNDBUF
set buffer size for output
.TP
.SB SO_RCVBUF
set buffer size for input
.TP
.SB SO_TYPE
get the type of the socket (get only)
.TP
.SB SO_ERROR
get and clear error on the socket (get only)
.PD
.RE
.LP
.SB SO_DEBUG
enables debugging in the underlying protocol modules.
.SB SO_REUSEADDR
indicates that the rules used in validating addresses supplied
in a
.BR bind (2)
call should allow reuse of local addresses.
.SB SO_KEEPALIVE
enables the
periodic transmission of messages on a connected socket.  Should the
connected party fail to respond to these messages, the connection is
considered broken and processes using the socket are notified using a
.SB SIGPIPE
signal.
.SB SO_DONTROUTE
indicates that outgoing messages should
bypass the standard routing facilities.  Instead, messages are directed
to the appropriate network interface according to the network portion
of the destination address.
.LP
.SB SO_LINGER
controls the action taken when unsent messags are queued on socket and a
.BR close (2)
is performed.
If the socket promises reliable delivery of data and
.SB SO_LINGER
is set, the system will block the process on the
.B close(\|)
attempt until it is able to transmit the data or until it decides it
is unable to deliver the information (a timeout period, termed the
linger interval, is specified in the
.B setsockopt(\|)
call when
.SB SO_LINGER
is requested).  If
.SB SO_LINGER
is disabled and a
.B close(\|)
is issued, the system will process the close in a manner that allows
the process to continue as quickly as possible.
.LP
The option
.SB SO_BROADCAST
requests permission to send broadcast datagrams on the socket.
Broadcast was a privileged operation in earlier versions of the system.
With protocols that support out-of-band data, the
.SB SO_OOBINLINE
option requests that out-of-band data be placed in the normal data input queue
as received; it will then be accessible with
.B recv(\|)
or
.B read(\|)
calls without the
.SB MSG_OOB
flag.
.SB SO_SNDBUF
and
.SB SO_RCVBUF
are options to adjust the normal
buffer sizes allocated for output and input buffers, respectively.
The buffer size may be increased for high-volume connections,
or may be decreased to limit the possible backlog of incoming data.
The system places an absolute limit on these values.
Finally,
.SB SO_TYPE
and
.SB SO_ERROR
are options used only with
.BR getsockopt .
.SB SO_TYPE
returns the type of the socket, such as
.SM
.BR SOCK_STREAM \s0;
it is useful for servers that inherit sockets on startup.
.SB SO_ERROR
returns any pending error on the socket and clears
the error status.
It may be used to check for asynchronous errors on connected
datagram sockets or for other asynchronous errors.
.SH RETURN VALUE
A 0 is returned if the call succeeds, \-1 if it fails.
.SH ERRORS
The call succeeds unless:
.TP 20
.SM EBADF
The argument
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
The argument
.I s
is a file, not a socket.
.TP
.SM ENOPROTOOPT
The option is unknown at the level indicated.
.TP
.SM EFAULT
The address pointed to by
.I optval
is not in a valid part of the process address space.
For
.BR getsockopt ,
this error may also be returned if
.I optlen
is not in a valid part of the process address space.
.SH "SEE ALSO"
.BR ioctl (2),
.BR socket (2),
.BR getprotoent (3N)
.SH BUGS
Several of the socket options should be handled at lower levels of the system.
truct linger
parameter, defined in
.BR socket.h ,
which specifies the desired state of the option an./share/man/man2/gettimeofday.2                                                                        755       0      12        10443  4424741003  11466                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gettimeofday.2 1.21 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.hw gettimeofday
.TH GETTIMEOFDAY 2 "22 March 1989"
.SH NAME
gettimeofday, settimeofday \- get or set the date and time
.SH SYNOPSIS
.nf
.ft B
#include <sys/time.h>
.LP
.ft B
int gettimeofday(tp, tzp)
struct timeval \(**tp;
struct timezone \(**tzp;
.LP
.ft B
int settimeofday(tp, tzp)
struct timeval \(**tp;
struct timezone \(**tzp;
.fi
.IX  gettimeofday  ""  \fLgettimeofday()\fR
.IX  "timing and statistics"  gettimeofday  ""  \fLgettimeofday()\fR
.IX  "get date and time"
.IX  "time and date" "set \(em \fLsettimeof day\fR"
.IX  "date and time" "set \(em \fLsettimeofday\fR"
.IX  "time and date" "get \(em \fLgettimeof day\fR"
.IX  "date and time" "get \(em \fLgettimeofday\fR"
.IX  settimeofday  ""  \fLsettimeofday()\fR
.IX  "timing and statistics"  settimeofday  ""  \fLsettimeofday()\fR
.IX  set "date and time \(em \fLgettimeofday()\fR"
.SH DESCRIPTION
.LP
The system's notion of the current Greenwich time and
the current time zone is obtained with the
.B gettimeofday(\|)
call, and set with the
.B settimeofday(\|)
call.
The current time is expressed in elapsed seconds and microseconds
since 00:00
.SM GMT\s0,
January 1, 1970 (zero hour).  The resolution of the system
clock is hardware dependent; the time may be updated continuously,
or in \(lqticks.\(rq
.LP
.I tp
points to a
.B timeval
structure, which includes the following members:
.LP
.RS
.nf
.ft B
.ta +\w'long\0'u +\w'tv_usec;\0'u
long	tv_sec;	/\(** seconds since Jan. 1, 1970 \(**/
long	tv_usec;	/\(** and microseconds \(**/
.ft R
.fi
.DT
.RE
.LP
If
.I tp
is a
.SM NULL
pointer, the current time information is not returned or set.
.LP
.I tzp
points to a
.B timezone(\|)
structure, which includes the following members:
.LP
.RS
.nf
.ft B
.ta +\w'int\0'u +\w'tz_minuteswest;\0'u
int	tz_minuteswest;	/\(** of Greenwich \(**/
int	tz_dsttime;	/\(** type of dst correction to apply \(**/
.ft R
.fi
.DT
.RE
.LP
The
.B timezone(\|)
structure indicates the local time zone (measured in minutes
westward from Greenwich), and a flag that indicates the type of
Daylight Saving Time correction to apply.  Note: this flag
does
.I not
indicate whether Daylight Saving Time is currently in effect.
.LP
Also note that the offset of
the local time zone from
.SM GMT
may change over time, as may the rules
for Daylight Saving Time correction.  The
.B localtime(\|)
routine
(see
.BR ctime (3))
obtains this information from a file rather than from
.BR gettimeofday(\|) .
Programs should use
.B localtime(\|)
to convert dates and times; the
.B timezone(\|)
structure is filled in by
.B gettimeofday(\|)
for backward compatibility with existing programs.
.LP
The flag indicating the type of Daylight Saving Time correction
should have one of the following values (as defined in
.BR /usr/include/sys/time.h ):
.RS
.TP
0
.PD 0
\fB\s-1DST_NONE\s0\fR:
Daylight Savings Time not observed
.TP
1
\fB\s-1DST_USA\s0\fR:
United States
.SM DST
.TP
2
\fB\s-1DST_AUST\s0\fR:
Australian
.SM DST
.TP
3
\fB\s-1DST_WET\s0\fR:
Western European
.SM DST
.TP
4
\fB\s-1DST_MET\s0\fR:
Middle European
.SM DST
.TP
5
\fB\s-1DST_EET\s0\fR:
Eastern European
.SM DST
.TP
6
\fB\s-1DST_CAN\s0\fR:
Canadian
.SM DST
.TP
7
\fB\s-1DST_GB\s0\fR:
Great Britain and Eire
.SM DST
.TP
8
\fB\s-1DST_RUM\s0\fR:
Rumanian
.SM DST
.TP
9
\fB\s-1DST_TUR\s0\fR:
Turkish
.SM DST
.TP
10
\fB\s-1DST_AUSTALT\s0\fR:
Australian-style
.SM DST
with shift in 1986
.PD
.RE
.LP
If
.I tzp
is a
.SM NULL
pointer, the time zone information is not returned or set.
.LP
Only the super-user may set the time of day or the time zone.
.SH RETURN
A \-1 return value indicates an error occurred; in this
case an error code is stored in the global variable
.BR errno .
.SH ERRORS
.LP
The following error codes may be set in
.BR errno :
.TP 15
.SM EFAULT
An argument address referenced invalid memory.
.TP
.SM EPERM
A user other than the super-user attempted to set the time or time
zone.
.SH "SEE ALSO"
.BR date (1V),
.BR adjtime (2),
.BR ctime (3)
.SH BUGS
.LP
Time is never correct enough to believe the microsecond
values.  There should a mechanism by which, at least,
local clusters of systems might synchronize their clocks
to millisecond granularity.
B unlimit
commands in
.BR sh (1)
as well as in
.BR csh (1).
ile descriptor open for
reading.
.TP
.SM EBADMSG
The queued message to be read is not valid for
.BR getmsg(\|) .
.TP
.SM EFAULT
.IR ctlptr ,
.IR dataptr ,
or
.I ./share/man/man2/getuid.2                                                                              755       0      12         1714  4424741003  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getuid.2 1.14 89/03/26 SMI; from UCB 4.2
.TH GETUID 2 "22 March 1989"
.SH NAME
getuid, geteuid \- get user identity
.SH SYNOPSIS
.ft B
.nf
getuid(\|)
.LP
.ft B
geteuid(\|)
.ft
.fi
.IX  getuid  ""  "\fLgetuid\fP \(em get user ID"
.IX  "processes and protection"  getuid  ""  \fLgetuid\fP
.IX  "user ID"  get
.IX  "real user ID"  "get \(em \fLgetuid\fR"
.IX  geteuid  ""  "\fLgeteuid\fP \(em get effective user ID"
.IX  "processes and protection"  geteuid  ""  \fLgeteuid\fP
.IX  "effective user ID"  get
.SH DESCRIPTION
.B getuid(\|)
returns the real user
.SM ID
of the current process,
.B geteuid(\|)
the effective user
.SM ID\s0.
.LP
The real user
.SM ID
identifies the person who is logged in.
The effective user
.SM ID
gives the process additional permissions during
execution of \*(lqset-user-\s-1ID\s0\*(rq mode processes, which use
.B getuid(\|)
to determine the real-user-id of the process
that invoked them.
.SH "SEE ALSO"
.BR getgid (2),
.BR setreuid (2)
p.2   4  9  send.2   H  9  	sendmsg.2 nd  \./share/man/man2/ioctl.2                                                                               755       0      12         4454  4424741003  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ioctl.2 1.18 89/03/26 SMI; from UCB 4.2
.TH IOCTL 2 "22 March 1989"
.SH NAME
ioctl \- control device
.SH SYNOPSIS
.nf
.ft B
int ioctl(des, request, arg)
int des, request;
caddr_t arg;
.fi
.ft R
.IX  ioctl  ""  \fLioctl()\fR
.IX  "generic operations"  ioctl  ""  \fLioctl()\fR
.IX  "control devices \(em \fLioctl()\fR"
.IX  "device controls \(em \fLioctl()\fR"
.SH DESCRIPTION
.B ioctl(\|)
performs a special function on the object referred to by the open descriptor
.IR des .
The set of functions that may be performed depends on the object that
.I des
refers to.  For example, many operating
characteristics of character special files (for
instance, terminals)
may be controlled with
.B ioctl(\|)
requests.
The writeups in section 4 discuss how
.B ioctl(\|)
applies to various objects.
.LP
The
.I request
codes for particular functions
are specified in include files specific to objects or to families of
objects; the writeups in section 4 indicate which include files specify
which
.IR request s.
.LP
For most
.B ioctl(\|)
functions,
.I arg
is a pointer to data to be used by the function or to
be filled in by the function.
Other functions may ignore
.I arg
or may treat it directly as a data item; they may, for example, be passed an
.B int
value.
.SH "RETURN VALUE
If an error has occurred, a value of \-1 is returned and
.B errno
is set to indicate the error.
.LP
If no error has occurred, a value of 0 is returned by most functions.
Some specialized functions may return non-zero values on success; see
the description of the function in the writeup for the object.
.SH ERRORS
.B ioctl(\|)
will fail if one or more of the following are true:
.TP 15
.SM EBADF
.I des
is not a valid
descriptor.
.TP
.SM ENOTTY
The specified request does not apply to the kind
of object to which the descriptor
.I des
refers.
.TP
.SM EINVAL
.I request
or
.I arg
is not valid.
.TP
EFAULT
.I request
requires a data transfer to or from
a buffer pointed to by
.IR arg ,
but some part of the buffer is outside
the process's allocated space.
.PP
.B ioctl(\|)
will also fail if the object on which the function is being
performed detects an error. In this case, an error code specific to
the object and the function will be returned.
.SH "SEE ALSO"
.BR execve (2),
.BR fcntl (2V),
.BR filio (4),
.BR mtio (4),
.BR sockio (4),
.BR streamio (4),
.BR termio (4)
e whether Daylight Saving Time is currently in effect.
.LP
Also note that the offset of
the local time zone from
.SM GMT
may change over time, as may the rules
for Daylight Saving Time correction.  The
.B localti./share/man/man2/kill.2v                                                                               755       0      12         6557  4424741003  10121                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kill.2v 1.20 89/03/26 SMI; from UCB 4.2
.TH KILL 2V "22 March 1989"
.SH NAME
kill \- send a signal to a process or a group of processes
.SH SYNOPSIS
.B kill(pid, sig)
.LP
.B int pid, sig;
.IX  kill  ""  "\fLkill\fP \(em send signal to process"
.IX  signals  kill  ""  \fLkill\fP
.IX  process  "send signal to \(em \fLkill\fR"
.IX  send "signal to process \(em \fLkill\fR"
.SH DESCRIPTION
.B kill(\|)
sends the signal
.I sig
to a process or a group of processes.
The process or group of
processes to which the signal is to be sent is specified by
.IR pid .
.I sig
may be one of the signals specified in
.BR sigvec (2),
or it may be 0, in which case
error checking is performed but no
signal is actually sent.
This can be used to check the validity of
.IR pid .
.LP
The real or effective user
.SM ID
of the sending process must match the real or saved set-user
.SM ID
of the receiving process, unless the effective user
.SM ID
of the sending process is super-user.
A single exception is the signal
.SM
.BR SIGCONT \s0,
which may always be sent to any descendant of the current process.
.LP
In the following discussion, ``system processes'' are processes, such as
processes 0 and 2, that are not running a regular user program.
.LP
If
.I pid
is greater than zero, the signal is sent to the process whose process
.SM ID
is equal to
.IR pid .
.I pid
may equal 1.
.LP
If
.I pid
is 0, the signal is sent to all processes,
except system processes and process 1,
whose process group
.SM ID
is equal to the process group
.SM ID
of the sender; this is a variant of
.BR killpg (2).
.LP
If
.I pid
is \-1 and the effective user
.SM ID
of the sender is not super-user, the signal is sent to all processes,
except system processes, process 1, and the process sending the signal,
whose real or saved set-user
.SM ID
matches the real or effective
.SM ID
of the sender.
.LP
If
.I pid
is \-1 and the effective user
.SM ID
of the sender is super-user, the signal is sent to all processes
except system processes, process 1, and the process sending the signal.
.LP
If
.I pid
is negative but not \-1, the signal is sent to all processes,
except system processes, process 1, and the process sending the signal,
whose process group
.SM ID
is equal to the absolute value of
.IR pid ;
this is a variant of
.BR killpg (2).
.LP
Processes may send signals to themselves.
.SH SYSTEM V DESCRIPTION
If a signal is sent to a group of processes (as
with, if
.I pid
is 0 or negative), and if the process sending the signal is a member of that
group, the signal is sent to that process as well.
.LP
The signal
.SB SIGKILL
cannot be sent to process 1.
.SH "RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B kill(\|)
will fail and no signal will be sent if any of the following
occur:
.TP 15
.SM EINVAL
.I sig
is not a valid signal
number.
.TP
.SM ESRCH
No process can be found corresponding to that specified by
.IR pid .
.TP
.SM EPERM
The effective user
.SM ID
of the sending process is not super-user, and neither its real nor
effective user
.SM ID
matches the real or saved set-user
.SM ID
of the receiving process.
.SH SYSTEM V ERRORS
.B kill(\|)
will also fail, and no signal will be sent, if the following occurs:
.TP 15
.SM EINVAL
.I sig
is
.SM SIGKILL
and
.I pid
is 1.
.SH "SEE ALSO"
.BR getpid (2),
.BR killpg (2),
.BR setpgrp (2V),
.BR sigvec (2)
T
.TP
8
\fB\s-1DST_RUM\s0\fR:
Rumanian
.SM DST
.TP
9
\fB\s-1DST_TUR\s0\fR:
Turkish
.SM DST
.TP
10
\fB\s-1DST_AUSTALT\s0\fR:
Australian-style
.SM ./share/man/man2/killpg.2                                                                              755       0      12         3026  4424741004  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)killpg.2 1.18 89/03/26 SMI; from UCB 4.2
.TH KILLPG 2 "22 March 1989"
.SH NAME
killpg \- send signal to a process group
.SH SYNOPSIS
.ft B
int killpg(pgrp, sig)
.LP
int pgrp, sig;
.ft R
.IX  killpg  ""  "\fLkillpg\fP \(em send signal to process group"
.IX  signals  killpg  ""  "\fLkillpg\fP \(em send to process group"
.IX  "process group"  "send signal to \(em \fLkillpg\fR"
.IX  send "signal to process group \(em \fLkillpg\fR"
.SH DESCRIPTION
.B killpg(\|)
sends the signal
.I sig
to the process group
.IR pgrp .
See
.BR sigvec (2)
for a list of signals.
.LP
The real or effective user
.SM ID
of the sending process must match the real or saved set-user
.SM ID
of the receiving process, unless the effective user
.SM ID
of the sending process is super-user.
A single exception is the signal
.SM
.BR SIGCONT \s0,
which may always be sent to any descendant of the current process.
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.B killpg(\|)
will fail and no signal will be sent if any of
the following occur:
.TP 15
.SM EINVAL
.I sig
is not a valid signal number.
.TP
.SM ESRCH
No processes were found in the specified process group.
.TP
.SM EPERM
The effective user
.SM ID
of the sending process is not super-user, and neither its real nor
effective user
.SM ID
matches the real or saved set-user
.SM ID
of one or more of the target processes.
.SH "SEE ALSO"
.BR kill (2V),
.BR setpgrp (2V),
.BR sigvec (2)
 sigvec.2  
T  
h  9  socket.2  
h  
  9  socketpair.2  9  
  9  stat.2   
  9  statfs.2  
  
  9  swapon.2  
  
  9  	symlink.2 
  
  9  sync.2   
  9  	syscall.2 
     9  tell.2     9  
truncate.2   $  9  umask.2   8  9  uname.2v  8  L  9  unlink.2  L  `  9  	unmount.2 `  t  9  utimes.2  t    9  	vadvise.2     9  vfork.2     9  	vhangup.2     9  wait.2     9  wait3.2     9  wait4.2 ./share/man/man2/link.2                                                                                755       0      12         5450  4424741004   7725                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)link.2 1.16 89/03/26 SMI; from UCB 4.2
.TH LINK 2 "20 November 1987"
.SH NAME
link \- make a hard link to a file
.SH SYNOPSIS
.nf
.ft B
int link(name1, name2)
char \(**name1, \(**name2;
.fi
.ft R
.IX  link  ""  \fLlink\fP
.IX  "file system"  link  ""  \fLlink\fP
.IX  "make hard link to file"
.IX  file  "make hard link to"
.IX  "hard link to file \(em \fLlink\fR"
.SH DESCRIPTION
.I name1
points to a path name naming an existing file.
.I name2
points to a path name
naming a new directory entry to be created.
A hard link to the first file
is created; the link has the name pointed to by
.IR name2 .
The file named by
.I name1
must exist.
.LP
With hard links, both files
must be on the same file system.  Unless the caller is the super-user,
the file named by
.I name1
must not be a directory.  Both the old and the new
.B link(\|)
share equal access and rights to the underlying object.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B link(\|)
will fail and no link will be created if one or more of the following
are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I name1
or
.I name2
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I name1
or
.I name2
exceeds 255 characters,
or the length of
.I name1
or
.I name2
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of
.I name1
or
.I name2
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.I name1
or
.IR name2 .
.TP
.SM EACCES
The requested link requires writing in a directory for which
write permission is denied.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.I name1
or
.IR name2 .
.TP
.SM ENOENT
The file referred to by
.I name1
does not exist.
.TP
.SM EEXIST
The link referred to by
.I name2
does exist.
.TP
.SM EPERM
The file named by
.I name1
is a directory and the effective user
.SM ID
is not super-user.
.TP
.SM EXDEV
The link named by
.I name2
and the file named by
.I name1
are on different file systems.
.TP
.SM ENOSPC
The directory in which the entry for the new link
is being placed cannot be extended because there
is no space left on the file system containing the directory.
.TP
.SM EDQUOT
The directory in which the entry for the new link
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system
to make the directory entry.
.TP
.SM EROFS
The requested link requires writing in a directory on a read-only file system.
.TP
.SM EFAULT
One of the path names specified is outside the process's allocated address space.
.SH "SEE ALSO"
.BR symlink (2),
.BR unlink (2)
ves.
.SH SYSTEM V DESCRIPTION
If a signal is sent to a group of processes (as
with, if
.I pid
is 0 or negative), and if the process sending the signal is a member of that
group, the signal is sent to that process as ./share/man/man2/list.2                                                                                755       0      12           61  4424740772   7707                                                                                                                                                                                                                                                                                                                                                                      .so man2/List.2
.\" @(#)list.2 1.5 89/03/26 SMI;
 8  lseek.2     8  lstat.2     8  	mincore.2     8  mkdir.2     8  mknod.2     8  mmap.2      8  mount.2      8  
mprotect.2      8  msgctl.2    (  8  msgget.2  (  8  8  msgop.2   L  9  msgrcv.2  L  `  9  msgsnd.2  `  p  9  msync.2     9  munmap.2      9  nfssvc.2      9  open.2v     9  pipe.2      9  poll.2 n    9  profil.2      9  ptrace.2      9./share/man/man2/listen.2                                                                              755       0      12         2532  4424741004  10264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)listen.2 1.13 89/03/26 SMI; from UCB 4.2
.TH LISTEN 2 "22 March 1989"
.SH NAME
listen \- listen for connections on a socket
.SH SYNOPSIS
.nf
.ft B
listen(s, backlog)
int s, backlog;
.fi
.IX  listen  ""  \fLlisten\fP
.IX  "socket operations"  listen  ""  \fLlisten\fP
.IX  "interprocess communication"  listen  ""  \fLlisten\fP
.IX  connection "listen for on socket \(em \fLlisten\fR"
.SH DESCRIPTION
To accept connections, a socket
is first created with
.BR socket (2),
a backlog for incoming connections is specified with
.B listen(\|)
and then the connections are
accepted with
.BR accept (2).
The
.B listen(\|)
call applies only to sockets of type
.SB SOCK_STREAM
or
.SB SOCK_SEQPACKET\s0\fR.
.LP
The
.I backlog
parameter defines the maximum length the queue of
pending connections may grow to.
If a connection
request arrives with the queue full the client will
receive an error with an indication of
\s-1ECONNREFUSED\s0.
.SH "RETURN VALUE
A 0 return value indicates success; \-1 indicates an error.
.SH "ERRORS
The call fails if:
.TP 20
.SM EBADF
The argument
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
The argument
.I s
is not a socket.
.TP
.SM EOPNOTSUPP
The socket is not of a type that supports the operation
.BR listen .
.SH "SEE ALSO"
.BR accept (2),
.BR connect (2),
.BR socket (2)
.SH BUGS
The
.I backlog
is currently limited (silently) to 5.
 
shutdown.2   
   9  
sigblock.2    
  9  
sigpause.2   
,  9  sigsetmask.2  9  
@  9  
sigstack.2 @  
T  9  sigvec.2  
T  
h  9  socket.2  
h  
./share/man/man2/lseek.2                                                                               755       0      12         3766  4424741004  10103                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lseek.2 1.22 89/03/26 SMI; from UCB 4.2
.TH LSEEK 2 "25 March 1989"
.SH NAME
lseek, tell \- move read/write pointer
.SH SYNOPSIS
.nf
.ft B
.ta 1.25i 1.6i
#include <sys/types.h>
#include <sys/file.h>
.LP
.ft B
off_t lseek(des, offset, whence)
int des;
off_t offset;
int whence;
.fi
.ft R
.SH DESCRIPTION
.IX  lseek  ""  "\fLlseek\fP \(em move file position"
.IX  "file system"  lseek  ""  \fLlseek\fP
.IX  "file position, move \(em \fLlseek\fR"
.IX  "move file position \(em \fLlseek\fR"
.IX  "read/write pointer, move \(em \fLlseek\fR"
.IX  tell  ""  \fLtell\fP
.IX  "file system"  tell  ""  \fLtell\fP
.LP
The descriptor
.I des
refers to a file or device open for reading and/or writing.
.B lseek(\|)
sets the file pointer associated with
.I des
as follows:
.IP
If
.I whence
is
.SM
.BR L_SET \s0,
the pointer is set to
.I offset
bytes.
.IP
If
.I whence
is
.SM
.BR L_INCR \s0,
the pointer is set to its current location plus
.IR offset .
.IP
If
.I whence
is
.SM
.BR L_XTND \s0,
the pointer is set to the size of the
file plus
.IR offset .
.LP
Some devices are incapable of seeking.  The value of the pointer
associated with such a device is undefined.
.LP
The obsolete function
.B "tell(fildes)"
is identical to
.B "lseek(fildes, 0L, L_INCR)."
.SH RETURN VALUE
Upon successful completion, the resulting pointer location,
as measured in bytes from beginning of the file, is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate
the error.
.SH ERRORS
.B lseek(\|)
will fail and the file pointer will remain unchanged if:
.TP 15
EBADF
.I des
is not an open file descriptor.
.TP
.SM ESPIPE
.I des
is associated with a pipe or a socket.
.TP
.SM EINVAL
.I whence
is not a proper value, or the seek operation would result in an 
illegal file offset value for the file. (e.g. negative file 
offset for a regular file.)
.SH "SEE ALSO"
.BR dup (2),
.BR open (2V)
.SH NOTES
Seeking far beyond the end of a file, then writing,
may create a gap or \*(lqhole\*(rq, which occupies no
physical space and reads as zeros.
 	writev.2./share/man/man2/lstat.2                                                                               755       0      12           63  4424741004  10052                                                                                                                                                                                                                                                                                                                                                                      .so man2/stat.2
.\" @(#)lstat.2 1.9 89/03/26 SMI; 
  mkdir.2     8  mknod.2     8  mmap.2      8  mount.2      8  
mprotect.2      8  msgctl.2    (  8  msgget.2  (  8  8  msgop.2   L  9  msgrcv.2  L  `  9  msgsnd.2  `  p  9  msync.2     9  munmap.2      9  nfssvc.2      9  open.2v     9  pipe.2      9  poll.2 n    9  profil.2      9  ptrace.2      9  putmsg.2      9  
quotactl.2   (  9  read.2v   <./share/man/man2/mincore.2                                                                             755       0      12         2506  4424741004  10423                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mincore.2 1.10 89/03/26 SMI;
.TH MINCORE 2 "22 March 1989"
.SH NAME
mincore \- determine residency of memory pages
.SH SYNOPSIS
.nf
.ft B
mincore(addr, len, vec)
caddr_t addr; int len; result char *vec;
.fi
.SH DESCRIPTION
.IX "mincore function" "" "\fLmincore()\fP function"
.LP
.B mincore(\|)
returns the primary memory
residency status of pages in the address space
covered by mappings in the range
[\fIaddr\fP, \fIaddr\fP + \fIlen\fP).
The status is returned as a char-per-page in the character array referenced
by
.I *vec
(which the system assumes to be large enough to encompass
all the pages in the address range).  The least significant bit of each
character is set to 1 to indicate that the referenced page is in primary
memory, 0 if it is not.  The settings of other bits in each character is
undefined and may contain other information in the future.
.SH RETURN VALUE
.B mincore(\|)
returns 0 on success, \-1 on failure.
.SH ERRORS
.B mincore(\|)
will fail if:
.TP 20
.SM EFAULT
.I *vec
includes an out-of-range or otherwise inaccessible
address.
.TP
.SM EINVAL
.I addr
is not a multiple of the page size as returned by
.BR getpagesize (2).
.TP
.SM ENOMEM
Addresses in the range [\fIaddr, addr + len\fP\^)
are invalid for
the address space of a process, or specify one or more pages which are not
mapped.
.SH SEE ALSO
.BR mmap (2)
 sendto.2  \  p  9  	setauid.2 p    9  setdomainname.2     9  setgroups.2     9  
sethostname.2 9    9  setitimer.2     9  
setpgrp.2v     9  
setprior./share/man/man2/mkdir.2                                                                               755       0      12         6071  4424741004  10076                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkdir.2 1.21 89/03/26 SMI; from UCB 4.2
.TH MKDIR 2 "22 March 1989"
.SH NAME
mkdir \- make a directory file
.SH SYNOPSIS
.nf
.ft B
int mkdir(path, mode)
char \(**path;
int mode;
.fi
.ft R
.IX  mkdir  ""  \fLmkdir\fP
.IX  "file system"  mkdir  ""  \fLmkdir\fP
.IX  directory  make
.IX  "make directory"
.IX  "create directory"
.SH DESCRIPTION
.B mkdir(\|)
creates a new directory file with name
.IR path .
The mode of the new file is initialized from
.IR mode .
.LP
The low-order 9 bits of
.I mode
are modified such that all bits set in the process's file mode
creation mask are cleared (see
.BR umask (2)).
.LP
The set-\s-1GID\s0 bit of
.I mode
is ignored.  The set-\s-1GID\s0 bit of the new file is inherited from that of
the parent directory.
.LP
The directory's owner
.SM ID
is set to the process's effective user
.SM ID\s0.
.LP
The directory's group
.SM ID
is set to either:
.RS
.TP 3
\(bu
the effective group
.SM ID
of the process, if the filesystem was not
mounted with the
.SM BSD
file-creation semantics flag (see
.BR mount (2))
and the set-\s-1GID\s0 bit of the parent directory is clear, or
.TP 3
\(bu
the group
.SM ID
of the directory in which the file is created.
.RE
.SH RETURN VALUE
A 0 return value indicates success.  A \-1 return value
indicates an error, and an error code is stored in
.BR errno .
.SH ERRORS
.B mkdir(\|)
will fail and no directory will be created if:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EEXIST
The file referred to by
.I path
exists.
.TP
.SM ENOSPC
The directory in which the entry for the new file
is being placed cannot be extended because there
is no space left on the file system containing the directory.
.TP
.SM ENOSPC
The new directory cannot be created because there
is no space left on the file system which will contain the directory.
.TP
.SM ENOSPC
There are no free inodes on the file system on which the file is being created.
.TP
.SM EDQUOT
The directory in which the entry for the new file
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EDQUOT
The new directory cannot be created because the user's
quota of disk blocks on the file system which will
contain the directory has been exhausted.
.TP
.SM EDQUOT
The user's quota of inodes on the file system on
which the file is being created has been exhausted.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR chmod (2),
.BR mount (2),
.BR rmdir (2),
.BR stat (2),
.BR umask (2)
 ID
matches the real or saved set-user
.SM ID
of the receiving process.
.SH SYSTEM V ERRORS
.B kill(\|)
will also fail, and no signal will be sent, if the following occurs:
.TP 15
.SM EINVAL
.I sig
is
.SM SIGKILL
and
.I pid
is 1.
.SH "SEE ALSO"
.BR getpid (2),
.BR killpg (2),
.BR setpgrp (2V),
.BR sigvec (2)
T
.TP
8
\fB\s-1DST_RUM\s0\fR:
Rumanian
.SM DST
.TP
9
\fB\s-1DST_TUR\s0\fR:
Turkish
.SM DST
.TP
10
\fB\s-1DST_AUSTALT\s0\fR:
Australian-style
.SM ./share/man/man2/mknod.2                                                                               755       0      12         7502  4424741005  10101                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mknod.2 1.20 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH MKNOD 2 "22 March 1989"
.SH NAME
mknod \- make a special file
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/stat.h>
.LP
.ft B
int mknod(path, mode, dev)
char \(**path;
int mode, dev;
.fi
.ft R
.IX  mknod  ""  \fLmknod\fP
.IX  "file system"  mknod  ""  \fLmknod\fP
.IX  make "special file"
.IX  create "special file"
.IX  "special file"  make
.SH DESCRIPTION
.B mknod(\|)
creates a new file named by the path name pointed to by
.IR path .
The mode of the new file (including file type bits)
is initialized from
.IR mode .
The values of the file type bits which are permitted are:
.LP
.RS
.nf
.ta 1.6i 2.5i 3i
.ft B
#define\ \ \ \ \s-1S_IFCHR\s0	0020000	/* character special */
#define\ \ \ \ \s-1S_IFBLK\s0	0060000	/* block special */
#define\ \ \ \ \s-1S_IFREG\s0	0100000	/* regular */
#define\ \ \ \ \s-1S_IFIFO\s0	0010000	/* \s-1FIFO\s0 special */
.ft R
.fi
.RE
.LP
Values of
.I mode
other than those above are undefined
and should not be used.
.LP
The protection part of the mode
is modified by the process's mode mask (see
.BR umask (2)).
.LP
The owner
.SM ID
of the file is set to the effective user
.SM ID
of the process.
The group
.SM ID
of the file is set to either:
.RS
.TP 3
\(bu
the effective group
.SM ID
of the process, if the filesystem was not
mounted with the
.SM BSD
file-creation semantics flag (see
.BR mount (2))
and the set-gid bit of the parent directory is clear, or
.TP 3
\(bu
the group
.SM ID
of the directory in which the file is created.
.RE
.LP
If mode indicates a block or character special file,
.I dev
is a configuration dependent specification of a character or block
I/O device.  If
.I mode
does not indicate a block special or character special device,
.I dev
is ignored.
.LP
.B mknod(\|)
may be invoked only by the super-user for file types other than
.SM FIFO
special.
.SH RETURN VALUE
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B mknod(\|)
fails and the file mode remains unchanged if:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EPERM
An attempt was made to create a file of type other than
.SM FIFO
special and
the process's effective user
.SM ID
is not super-user.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EISDIR
The specified
.I mode
would have created a directory.
.TP
.SM ENOSPC
The directory in which the entry for the new file
is being placed cannot be extended because there is
no space left on the file system containing the directory.
.TP
.SM ENOSPC
There are no free inodes on the file system on which the file is being created.
.TP
.SM EDQUOT
The directory in which the entry for the new file
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EDQUOT
The user's quota of inodes on the file system on
which the node is being created has been exhausted.
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EEXIST
The file referred to by
.I path
exists.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR chmod (2),
.BR stat (2),
.BR umask (2)
ORS
.LP
The following error codes may be set in
.BR errno :
.TP 15
.SM EFAULT
An argument address referenced invalid memory.
.TP
.SM EPERM
A user other than the super-user attempted to set t./share/man/man2/mmap.2                                                                                755       0      12        16575  4424741005   7755                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mmap.2 1.28 89/03/26 SMI;
.TH MMAP 2 "25 March 1989"
.SH NAME
mmap \- map pages of memory
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/mman.h>
caddr_t mmap(addr, len, prot, flags, fd, off)
caddr_t addr;
int len, prot, flags, fd;
off_t off;
.ft R
.fi
.IX  mmap  ""  \fLmmap\fP
.IX  "memory management"  mmap  ""  \fLmmap\fP
.IX  "map memory pages \(em \fLmmap\fP"
.SH DESCRIPTION
.B mmap(\|)
establishes a mapping between the process's address space
at
an address
.I paddr
for
.I len
bytes to the memory object represented by
.I fd
at
.I off
for
.I len
bytes.  The value of
.I paddr
is an implementation-dependent function of the parameter
.I addr
and values of
.IR flags ,
further described below.
A successful
.B mmap(\|)
call returns
.I paddr
as its result.
The address ranges covered by
[\fIpaddr, paddr + len\fP\^)
and
[\fIoff, off + len\fP\^)
must be legitimate for the
address space of a process and the object in question, respectively.
.LP
The mapping established by
.B mmap(\|)
replaces any previous mappings for the
process's pages in the range
[\fIpaddr, paddr + len\fP\^).
.LP
The parameter
.I prot
determines whether read, execute, write,
or some combination of accesses are permitted to the
pages being mapped. The protection options are defined in
.B /usr/include/sys/mman.h
as:
.LP
.RS
.ta 25n 35n
.nf
.ft B
#define \s-1PROT_READ\s0	0x1	/* page can be read */
#define \s-1PROT_WRITE\s0	0x2	/* page can be written */
#define \s-1PROT_EXEC\s0	0x4	/* page can be executed */
#define \s-1PROT_NONE\s0	0x0	/* page can not be accessed */
.ft R
.fi
.RE
.LP
Not all implementations literally provide all possible combinations.
.SB PROT_WRITE
is often implemented as
.SB PROT_READ\^|\^PROT_WRITE
and
.SB PROT_EXECUTE
as
.SB PROT_READ\^|\^PROT_EXECUTE.
However, no implementation will permit a write to
succeed where
.SB PROT_WRITE
has not been set.  The behavior of
.SB PROT_WRITE
can be influenced by setting
.SB MAP_PRIVATE
in the
.I flags
parameter, described below.
.LP
The parameter
.I flags
provides other information about the handling of
the mapped pages.  The options are defined in
.B mman.h
as:
.LP
.RS
.ta 25n 35n
.nf
.ft B
#define \s-1MAP_SHARED\s0	1	/* Share changes */
#define \s-1MAP_PRIVATE\s0	2	/* Changes are private */
#define \s-1MAP_TYPE\s0	0xf	/* Mask for type of mapping */
#define \s-1MAP_FIXED\s0	0x10	/* Interpret addr exactly */
#define \s-1MAP_RENAME\s0	0x20	/* Assign page to file */
.\"#define \s-1MAP_INHERIT\s0    0x40     /* Mapping retained across exec */
.\"#define \s-1MAP_NORESERVE\s0  0x80     /* Do not reserve needed swap area */
.ft R
.fi
.RE
.LP
.SB MAP_SHARED
and
.SB MAP_PRIVATE
describe the disposition of write references to
the memory object.  If
.SB MAP_SHARED
is specified, write references will change
the memory object.  If
.SB MAP_PRIVATE
is specified, the initial write reference
will create a private copy of the memory object page and redirect the
mapping to the copy.  The mapping type is retained across a
.BR fork (2).
.LP
.SB MAP_FIXED
informs the system that the value of
.I paddr
must be
.IR addr ,
exactly.  The use of
.SB MAP_FIXED
is discouraged, as it may
prevent an implementation from making the most effective use of system
resources.
.LP
When
.SB MAP_FIXED
is not set, the system uses
.I addr
as a hint in an
implementation-defined manner to arrive at
\fIpaddr\fP.  The
.I paddr
so chosen will be an area of the address space which the system deems
suitable for a mapping of
.I len
bytes
to the specified object.  All implementations interpret
an
.I addr
value of zero as
granting the system complete freedom in selecting
.IR paddr ,
subject to constraints described below.  A non-zero value
of
.I addr
is taken to be a suggestion of a process address near which
the
mapping should be placed.
When the system selects a value for
.IR paddr ,
it will never place a mapping at address 0, nor will it
replace any extant mapping, nor map into areas considered part of the potential
data or stack ``segments''.
.LP
.SB MAP_RENAME
causes the pages currently mapped in the range
[\fIpaddr, paddr + len\fP\^)
to be effectively renamed to be the file pages at
[\fIoff, off + len\fP\^).
The currently mapped pages
must be mapped as
.SM
.BR MAP_PRIVATE \s0.
.SB MAP_RENAME
implies a
.SB MAP_FIXED
interpretation of
.IR addr .
.I fd
must be open for writing.
.SB MAP_RENAME
affects the size of the memory object
referenced by
\fIfd\fP:
the size is
max(\fIoff + len - 1, flen\fP\^)
(where
.I flen
was the previous length of the object).  After the pages
are
renamed, a mapping to them is reestablished with the parameters as specified
in the renaming
.BR mmap .
.LP
.\".SB MAP_INHERIT
.\"informs the system that the mapping
.\".I should
.\"be retained across an
.\".B exec
.\"system call.  The system will retain only those parts
.\"of the mapping that do not conflict with the address space requirements as
.\"described in the file being
.\"\fBexec\fP'ed.
.\".LP
The parameter
.I off
is constrained to be
aligned and sized according to the value returned by
\fBgetpagesize\fP (2).
When
.SB MAP_FIXED
is specified, the parameter
.I addr
must also meet these constraints.
The system performs mapping operations over whole pages. 
Thus, while the parameter
.I len
need not meet a size or alignment constraint, the
system will include in any mapping operation any partial page specified
by the range
[\fIpaddr, paddr + len\fP\^).
.LP
It should be noted that the system will always zero-fill any partial pages
at the end of an object.  Further, the system will never write out any
modified portions of the last page of an object which are beyond its end.
References to whole pages following the end of an object will result in the
delivery of a
.SB SIGBUS
signal.
.SB SIGBUS
signals may also be delivered on various
filesystem conditions, including quota exceeded errors.
.SH RETURN VALUE
A successful
.B mmap(\|)
returns the address at which the mapping was placed (\fIpaddr\fP\^).
A failing
.B mmap(\|)
returns \-1.
.SH ERRORS
.B mmap(\|)
will fail if:
.TP 15
.SM EBADF
.I fd
is not open.
.TP
.SM EACCES
.I fd
is not open for read and
.SB PROT_READ
or
.SB PROT_EXECUTE
were specified, or
.I fd
is not open for write and
.SB PROT_WRITE
was specified for a
.SB MAP_SHARED
type mapping.
.TP
.SM ENXIO
Addresses in the range
[\fIoff, off + len\fP\^)
are invalid for
.IR fd .
.TP
.SM EINVAL
The arguments
.I addr
(if
.SB MAP_FIXED
was specified)
and
.I off
are not multiples of the
page size as returned by
\fBgetpagesize\fP (2).
.TP
.SM EINVAL
The
.SB MAP_TYPE
field in
.I flags
is invalid (neither
.SB MAP_PRIVATE
or
.SM
.BR MAP_SHARED \s0).
.TP
.SM ENODEV
.I fd
refers to an object for which
.B mmap(\|)
is meaningless, such as a
terminal; or if the object does support
.B mmap(\|)
and
.SB MAP_RENAME
was specified then the object is
unable to support
.SB MAP_RENAME
(for instance,
.SB MAP_RENAME
to a frame buffer or other device).
.TP
.SM ENOMEM
.SB MAP_FIXED
was specified, and
the range
[\fIaddr, addr + len\fP\^)
exceeds that allowed for
the address space of a process;
.SM OR
.SB MAP_FIXED
was not specified and there is insufficient room in the address space
to effect the mapping.
.TP
.SM ENOSPC
.SB MAP_RENAME
was specified and there is no space left on the filesystem to
hold the pages.
.TP
.SM ETXTBSY
One or more pages specified by an
.B mmap(\|)
.SB MAP_RENAME
operation are not
mapped
.SM
.BR MAP_PRIVATE \s0.
.SH SEE ALSO
.BR fork (2),
.BR getpagesize (2),
.BR mprotect (2),
.BR munmap (2),
.BR mlockall (3)
.SH BUGS
.SB MAP_RENAME
is not implemented.
descriptor.
.TP
.SM EMFILE
.I cmd
is
.SB F_DUPFD
and the maximum allowed number of descriptors are currently
open.
.TP
.SM EINVAL
../share/man/man2/mount.2                                                                               755       0      12        11736  4424741005  10157                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mount.2 1.30 89/03/26 SMI; from UCB 4.2
.TH MOUNT 2 "26 March 1989"
.SH NAME
mount \- mount file system
.SH SYNOPSIS
.nf
.ft B
#include <sys/mount.h>
.LP
.ft B
int mount(type, dir, \s-1M_NEWTYPE\s0\||\|flags, data)
char \(**type;
char \(**dir;
int flags;
caddr_t data;
.fi
.IX  mount  ""  \fLmount\fP
.IX  "file system"  mount  ""  \fLmount\fP
.IX  "system operation support"  mount  ""  \fLmount\fP
.SH DESCRIPTION
.B mount(\|)
attaches a file system to a directory.
After a successful return, references to directory
.I dir
will refer to the root directory on the newly mounted file system.
.I dir
is a pointer to a null-terminated string
containing a path name.
.I dir
must exist already, and must be a directory.  Its old contents
are inaccessible while the file system is mounted.
.LP
.B mount(\|)
may be invoked only by the super-user.
.LP
The
.I flags
argument is constructed by the logical OR of the following bits
(defined in
.BR /usr/include/sys/mount.h ):
.TP 15
.SB M_RDONLY
mount filesystem read-only.
.TP
.SB M_NOSUID
ignore set-uid bit on execution.
.TP
.SB M_NEWTYPE
this flag must always be set.
.TP
.SB M_GRPID
use
.SM BSD
file-creation semantics (see
.BR open (2V)).
.TP
.SB M_REMOUNT
change options on an existing mount.
.TP
.SB M_NOSUB
disallow mounts beneath this filesystem.
.TP
.SB M_MULTI
evaluate each pathname as a unit, rather than one component at a time 
(This option has no effect unless the particular filesystem type is specified 
as supporting it.)
.RE
.LP
Physically write-protected and magnetic tape file systems must be mounted
read-only or errors will occur when access times are updated, whether
or not any explicit write is attempted.
.LP
The
.I type
string indicates the type of the filesystem.
.I data
is a pointer to a structure which contains the type specific
arguments to mount.  Below is a list of the filesystem types supported
and the type specific arguments to each:
.nf
.ta \w'#include'u +\w'fhandle_t\0\0'u +\w'\(**hostname;\0\0'u
.RS
.TP 4
.B "4.2"
.ft B
struct ufs_args {
	char	\(**fspec;	/* Block special file to mount */
};
.ft R
.TP 4
.B "nfs"
.ft B
#include	<nfs/nfs.h>
#include	<netinet/in.h>
struct nfs_args {
	struct sockaddr_in  \(**addr; /* file server address */
	fhandle_t	\(**fh;	/* File handle to be mounted */
	int	flags;		/* flags */
	int	wsize;		/* write size in bytes */
	int	rsize;		/* read size in bytes */
	int	timeo;		/* initial timeout in .1 secs */
	int	retrans;	/* times to retry send */
	char	\(**hostname;	/* server's hostname */
	int	acregmin;	/* attr cache file min secs */
	int	acregmax;	/* attr cache file max secs */
	int	acdirmin;	/* attr cache dir min secs */
	int	acdirmax;	/* attr cache dir max secs */
	char	\(**netname;	/* server's netname */

};
.ft R
.fi
.RE
.SH RETURN VALUE
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B mount(\|)
fails when one of the following occurs:
.TP 20
.SM EPERM
The caller is not the super-user.
.TP
.SM ENODEV
The file system type specified by
.I type
is not valid or is not configured into the system.
.TP
.SM ENAMETOOLONG
The length of a component of the path name
of
.I dir
exceeds 255 characters,
or the length of the entire path name of
.I dir
exceeds 1023 characters.
.TP
.SM ENOENT
A component of
.I dir
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR dir .
.TP
.SM ENOTDIR
The file named by
.I dir
is not a directory.
.TP
.SM EBUSY
Another process currently holds a reference to
.IR dir .
.TP
.SM EFAULT
.I dir
points outside the process's
allocated address space.
.TP
.SM ELOOP
Too many symbolic links were encountered in
translating the path name of
.IR dir .
.LP
For a 4.2 file system,
.B mount(\|)
fails when one of the following occurs:
.TP 20
.SM ENOTBLK
.I fspec
is not a block device.
.TP
.SM ENXIO
The major device number of 
.I fspec
is out of range (this indicates no device driver exists
for the associated hardware).
.TP
.SM EMFILE
No space remains in the mount table.
.TP
.SM EINVAL
The super block for the file system had a bad magic
number or an out of range block size.
.TP
.SM ENOMEM
Not enough memory was available to read the cylinder
group information for the file system.
.TP
.SM ENOTDIR
A component of the path prefix of
.I fspec
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of the path name of
.I fspec
exceeds 255 characters,
or the length of the entire path name of
.I fspec
exceeds 1023 characters.
.TP
.SM ENOENT
A component of
.I fspec
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR fspec .
.TP
.SM EFAULT
.I fspec
points outside the process's
allocated address space.
.TP
.SM ELOOP
Too many symbolic links were encountered in
translating the path name of
.IR fspec .
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR unmount (2),
.BR open (2V),
.BR mount (8)
.SH BUGS
Some of the error codes need translation to more obvious messages.
system that the value of
.I paddr
./share/man/man2/mprotect.2                                                                            755       0      12         2750  4424741005  10626                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mprotect.2 1.9 89/03/26 SMI;
.TH MPROTECT 2 "22 March 1989"
.SH NAME
mprotect \- set protection of memory mapping
.SH SYNOPSIS
.nf
.ft B
#include <sys/mman.h>
.ft
.LP
.ft B
mprotect(addr, len, prot)
caddr_t addr;
int len, prot;
.ft
.fi
.IX  mprotect  ""  \fLmprotect\fP
.IX  "memory management"  mprotect  ""  \fLmprotect\fP
.IX  "change mapping protections \(em \fLmprotect\fP"
.SH DESCRIPTION
.LP
.B mprotect(\|)
changes the access protections on the mappings specified
by
the range
[\fIaddr, addr + len\fP\^)
to be that specified by
.IR prot .
Legitimate values for
.I prot
are the same as those permitted for
.BR mmap (2).
.SH RETURN VALUE
.LP
.B mprotect(\|)
returns 0 on success, \-1 on failure.
.SH ERRORS
.B mprotect(\|)
will fail if:
.TP 15
.SM EACCES
.I prot
specifies a protection which violates the access permission
the process has to the underlying memory object.
.TP
.SM EINVAL
.I addr
is not a multiple of the page size as returned
by
.BR getpagesize (2).
.TP
.SM ENOMEM
Addresses in the range
[\fIaddr, addr + len\fP)
are invalid for the address space of a process,
or specify one or more pages which are not mapped.
.LP
When
.B mprotect(\|)
fails for reasons other than
.SM EINVAL\s0\fR,
the protections on some of the pages in the range
[\fIaddr, addr + len\fP)
will have been changed.  If the error occurs
on some page at address
.IR addr2 ,
then the protections of
all whole pages in the range
[\fIaddr, addr2\fP\^)
have been modified.
.SH SEE ALSO
.BR getpagesize (2),
.BR mmap (2)
  	syscall.2 
     9./share/man/man2/msgctl.2                                                                              755       0      12         5256  4424741005  10266                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)msgctl.2 1.13 89/03/26 SMI; from S5R3
.TH MSGCTL 2 "22 March 1989"
.SH NAME
msgctl \- message control operations
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
.LP
.ft B
int msgctl (msqid, cmd, buf)
int msqid, cmd;
struct msqid_ds \(**buf;
.ft R
.fi
.SH DESCRIPTION
.IX  msgctl  ""  \fLmsgctl\fR
.IX  "message control operations"  msgctl  ""  \fLmsgctl\fR
.B msgctl(\|)
provides a variety of message control operations as specified by
.IR cmd .
The following
.IR cmd s
are available:
.TP 15
.SB IPC_STAT
Place the current value of each member of the data structure associated with
.I msqid
into the structure pointed to by
.IR buf .
The contents of this structure are defined in
.BR intro (2).
.TP
.SB IPC_SET
Set the value of the following members of the data structure associated with
.I msqid
to the corresponding value found in the structure pointed to by
.IR buf :
.RS
.RS
.nf
.ft B
msg_perm.uid
msg_perm.gid
msg_perm.mode /\(** only low 9 bits \(**/
msg_qbytes
.ft R
.fi
.RE
.RE
.IP
This
.I cmd
can only be executed by a process that has an effective user
.SM ID
equal to either that of super-user, or to the value of
.B msg_perm.cuid
or
.B msg_perm.uid
in the data structure associated with
.IR msqid .
Only super-user can raise the value of
.BR msg_qbytes .
.TP
.SB IPC_RMID
Remove the message queue identifier specified by
.I msqid
from the system and destroy the message queue and data structure
associated with it.  This
.I cmd
can only be executed by a process that has an effective user
.SM ID
equal to either that of super-user, or to the value of
.B msg_perm.cuid
or
.B msg_perm.uid
in the data structure associated with
.IR msqid .
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned. Otherwise, a
value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B msgctl(\|)
will fail if:
.TP 15
.SM EINVAL
.I msqid
is not a valid message queue identifier.
.TP
.SM EINVAL
.I cmd
is not a valid command.
.TP
.SM EACCES
.I cmd
is equal to
.SM
.SB IPC_STAT
and
.B {\s-1READ\s0}
operation permission is denied to the calling process (see
.BR intro (2)).
.TP
.SM EPERM
.I cmd
is equal to
.SB IPC_RMID
or
.SM
.BR IPC_SET \s0.
The effective user
.SM ID
of the calling process is not equal to that of super-user,
or to the value of
.B msg_perm.cuid
or
.B msg_perm.uid
in the data structure associated with
.IR msqid .
.TP
.SM EPERM
.I cmd
is equal to
.SM
.BR IPC_SET \s0,
an attempt is being made to increase to the value of
.BR msg_qbytes ,
and the effective user
.SM ID
of the calling process is not equal to that of super-user.
.TP
.SM EFAULT
.I buf
points to an illegal address.
.SH SEE ALSO
.BR intro (2),
.BR msgget (2),
.BR msgop (2)
o many symbolic links were encountered in
translating the path name of
.IR fspec .
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR unmount (2),
.BR open (2V),
.BR mount (8)
.SH BUGS
Some of the error codes need translation to more obvious messages.
system that the value of
.I paddr
./share/man/man2/msgget.2                                                                              755       0      12         4730  4424741006  10260                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)msgget.2 1.13 89/03/26 SMI; from S5R3
.TH MSGGET 2 "22 March 1989"
.SH NAME
msgget \- get message queue
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
.LP
.ft B
int msgget(key, msgflg)
key_t key;
int msgflg;
.ft R
.fi
.SH DESCRIPTION
.IX  msgget  ""  \fLmsgget\fR
.IX  "message control operations"  msgget  ""  \fLmsgget\fR
.B msgget(\|)
returns the message queue identifier associated with
.BR key .
.LP
A message queue identifier and associated message queue and data structure
(see
.BR intro (2))
are created for
.B key(\|)
if one of the following is true:
.TP 3
\(bu
.I key
is equal to
.SM
.BR IPC_PRIVATE \s0.
.TP
\(bu
.I key
does not already have a message queue identifier associated with it, and
.RI ( msgflg " & "
.SM
.BR IPC_CREAT \s0)
is ``true''.
.LP
Upon creation, the data structure associated with the new message queue
identifier is initialized as follows:
.TP 3
\(bu
.BR msg_perm.cuid ", " msg_perm.uid ,
.BR msg_perm.cgid ", and " msg_perm.gid
are set equal to the effective user
.SM ID
and effective group
.SM ID\s0,
respectively, of the calling process.
.TP
\(bu
The low-order 9 bits of
.B msg_perm.mode
are set equal to the low-order 9 bits of
.IR msgflg .
.TP
\(bu
.BR msg_qnum ", " msg_lspid ", " msg_lrpid ,
.BR msg_stime ", and " msg_rtime "
are set equal to 0.
.TP
\(bu
.B msg_ctime
is set equal to the current time.
.TP
\(bu
.B msg_qbytes
is set equal to the system-wide standard value of the maximum number of bytes
allowed on a message queue.
.SH "RETURN VALUE"
Upon successful completion,
a non-negative integer,
namely a message queue identifier, is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B msgget(\|)
will fail if one or more of the following are true:
.TP 15
.SM EACCES
A message queue identifier exists for
.BR key ,
but operation permission (see
.BR intro (2))
as specified by the low-order 9 bits of
.B msgflg
would not be granted.
.TP
.SM ENOENT
A message queue identifier does not exist for
.B key(\|)
and
.RB ( msgflg " & "
\fB\s-1IPC_CREAT\s0\fR)
is ``false''.
.TP
.SM ENOSPC
A message queue identifier is to be created but
the system-imposed limit on the maximum number of
allowed message queue identifiers system wide
would be exceeded.
.TP
.SM EEXIST
A message queue identifier exists for
.B key(\|)
but
.RB "( (" msgflg " & "
.SB IPC_CREAT\*S\s0\fR) & (\fBmsgflg\fR &
.SB IPC_EXCL\*S\s0\fR))
is ``true''.
.SH SEE ALSO
.BR intro (2),
.BR msgctl (2),
.BR msgop (2)
.2 .    9  
truncate.2 .  $  9  ./share/man/man2/msgop.2                                                                               755       0      12        15245  4424741006  10142                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)msgop.2 1.14 89/03/26 SMI; from S5R3
.TH MSGOP 2 "22 March 1989"
.SH NAME
msgop, msgsnd, msgrcv \- message operations
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/ipc.h>
.B #include <sys/msg.h>
.LP
.B int msgsnd(msqid, msgp, msgsz, msgflg)
.B int msqid;
.B struct msgbuf \(**msgp;
.B int msgsz, msgflg;
.LP
.B "int msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)"
.B int msqid;
.B struct msgbuf \(**msgp;
.B int msgsz;
.B long msgtyp;
.B int msgflg;
.fi
.SH DESCRIPTION
.IX msgsnd  ""  \fLmsgsnd\fR
.IX "message control operations"  msgsnd  ""  \fLmsgsnd\fR
.B msgsnd(\|)
is used to send a message to the queue associated with the message
queue identifier specified by
.IR msqid .
.B {\s-1WRITE\s0}
.I msgp
points to a structure containing the message.
This structure is composed of the following members:
.LP
.RS
.ta 8n 20n
.nf
.ft B
long	mtype;	/\(** message type \(**/
char	mtext[];	/\(** message text \(**/
.ft R
.fi
.RE
.LP
.I mtype
is a positive integer that can be used by the receiving process for
message selection (see
.BR msgrcv(\|) " below").
.I mtext
is any text of length
.I msgsz
bytes.
.I msgsz
can range from 0 to a system-imposed maximum.
.LP
.I msgflg
specifies the action to be taken if one or more of the following are
true:
.TP 3
\(bu
The number of bytes already on the queue is equal to
.IR msg_qbytes
.RB (see " intro " (2)).
.TP 3
\(bu
The total number of messages on all queues system-wide is equal to the
system-imposed limit.
.LP
These actions are as follows:
.TP 3
\(bu
If
.RB ( msgflg " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``true'', the message will not be sent and the calling process will
return immediately.
.TP 3
\(bu
If
.RB ( msgflg " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``false'',
the calling process will suspend execution until one of the following occurs:
.RS
.TP 3
\(bu
The condition responsible for the suspension no longer exists, in which case
the message is sent.
.TP 3
\(bu
.I msqid
is removed from the system (see
.BR msgctl (2)).
When this occurs,
.B errno
is set equal to
.SM EIDRM\s0,
and a value of \-1 is returned.
.TP 3
\(bu
The calling process receives a signal that is to be caught.
In this case the message is not sent and the calling process resumes
execution in the manner prescribed in
.BR signal (3).
.RE
.LP
Upon successful completion, the following actions are taken with respect to
the data structure associated with
.IR msqid
(see
.BR intro (2)).
.TP 3
\(bu
.I msg_qnum
is incremented by 1.
.TP 3
\(bu
.I msg_lspid
is set equal to the process
.SM ID
of the calling process.
.TP 3
\(bu
.I msg_stime
is set equal to the current time.
.LP
.B msgrcv(\|)
reads a message from the queue associated with the message queue identifier
specified by
.IR msqid
and places it in the structure pointed to by
.IR msgp .
.B {\s-1READ\s0}
This structure is composed of the following members:
.LP
.RS
.ta 8n 20n
.nf
.ft B
long	mtype;	/\(** message type \(**/
char	mtext[];	/\(** message text \(**/
.ft R
.fi
.RE
.LP
.I mtype
is the received message's type as specified by the sending process.
.I mtext
is the text of the message.
.I msgsz
specifies the size in bytes of
.IR mtext .
The received message is truncated to
.IR msgsz " bytes"
if it is larger than
.I msgsz
and
.RB ( msgflg " &"
.SB MSG_NOERROR\*S\fR)
is \lqtrue\(rq.
The truncated part of the message is lost and no indication of the truncation is
given to the calling process.
.LP
.I msgtyp
specifies the type of message requested as follows:
.TP 3
\(bu
If
.I msgtyp
is equal to 0, the first message on the queue is received.
.TP 3
\(bu
If
.I msgtyp
is greater than 0, the first message of type
.I msgtyp
is received.
.TP 3
\(bu
If
.I msgtyp
is less than 0,
the first message of the lowest type that is less than or equal
to the absolute value of
.I msgtyp
is received.
.LP
.I msgflg
specifies the action to be taken if a message of the desired type
is not on the queue.
These are as follows:
.TP 3
\(bu
If
.RB ( msgflg " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``true'', the calling process will return immediately with a return value
of \-1 and
.B errno
set to
.SM ENOMSG\s0.
.TP 3
\(bu
If
.RB ( msgflg " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``false'', the calling process will suspend execution until one of the
following occurs:
.RS 8
.TP 3
\(bu
A message of the desired type is placed on the queue.
.TP 3
\(bu
.I msqid
is removed from the system.
When this occurs,
.B errno
is set equal to
.SM EIDRM\s0,
and a value of \-1 is returned.
.TP 3
\(bu
The calling process receives a signal that is to be caught.
In this case a message is not received and the calling process resumes
execution in the manner prescribed in
.BR signal (3).
.RE
.LP
Upon successful completion, the following actions are taken with respect to
the data structure associated with
.IR msqid
(see intro (2)).
.TP 3
\(bu
.I msg_qnum
is decremented by 1.
.TP 3
\(bu
.I msg_lrpid
is set equal to the process
.SM ID
of the calling process.
.TP 3
\(bu
.I msg_rtime
is set equal to the current time.
.SH RETURN VALUES
Upon successful completion, the return value is as follows:
.TP 3
\(bu
.B msgsnd(\|)
returns a value of 0.
.TP 3
\(bu
.B msgrcv(\|)
returns a value equal to the number of bytes actually placed into
.IR mtext .
.LP
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B msgsnd(\|)
will fail and no message will be sent if one or more of the following are true:
.TP 15
.SM EINVAL
.I msqid
is not a valid message queue identifier.
.TP
.SM EIDRM
The message queue referred to by
.I msqid
was removed from the system.
.TP
.SM EACCES
Operation permission is denied to the calling process (see
.BR intro (2)).
.TP
.SM EINVAL
.I mtype
is less than 1.
.TP
.SM EAGAIN
The message cannot be sent for one of the reasons cited above and
.RB ( msgflg " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``true''.
.TP
.SM EINVAL
.I msgsz
is less than zero or greater than the system-imposed limit.
.TP
.SM EFAULT
.I msgp
points to an illegal address.
.TP
.SM EINTR
The call was interrupted by the delivery of a signal.
.LP
.B msgrcv(\|)
will fail and no message will be received if one or more of the following are
true:
.TP 15
.SM EINVAL
.I msqid
is not a valid message queue identifier.
.TP
.SM EIDRM
The message queue referred to by
.I msqid
was removed from the system.
.TP
.SM EACCES
Operation permission is denied to the calling process.
.TP
.SM EINVAL
.I msgsz
is less than 0.
.TP
.SM E2BIG
.I mtext
is greater than
.I msgsz
and
.RB ( msgflg " &"
.SB MSG_NOERROR\*S\fR)
is \lqfalse\(rq.
.TP
.SM ENOMSG
The queue does not contain a message of the desired type and
.RB ( msgtyp " & "
\fB\s-1IPC_NOWAIT\s0\fR)
is ``true''.
.TP
.SM EFAULT
.I msgp
points to an illegal address.
.TP
.SM EINTR
The call was interrupted by the delivery of a signal.
.SH SEE ALSO
.BR intro (2),
.BR msgctl (2),
.BR msgget (2),
.BR signal (3)
e to support
.SB MAP_RENAME
(for instance,
.SB MAP_RENAME
to a frame buffer or other device).
.TP
.SM ENOMEM
.SB MAP_FIXED
was specified, and
the range
[\fIaddr, addr + len\fP\^)
exceeds that allowed for
the address space of a process;
.SM OR
.SB MAP_FIXED
was not specified and there is insufficient room in the address space
to effect the mappin./share/man/man2/msgrcv.2                                                                              755       0      12           64  4424741006  10227                                                                                                                                                                                                                                                                                                                                                                      .so man2/msgop.2
.\" @(#)msgrcv.2 1.5 89/03/26 SMI;
  9  msync.2     9  munmap.2      9  nfssvc.2      9  open.2v     9  pipe.2      9  poll.2 n    9  profil.2      9  ptrace.2      9  putmsg.2      9  
quotactl.2   (  9  read.2v   <  9  
readlink.2 <  P  9  readv.2v  P  d  9  reboot.2  d  t  9  recv.2      9  
recvfrom.2     9  	recvmsg.2     9  rename.2      9  rmdir.2     9  sbrk.2      9  sele./share/man/man2/msgsnd.2                                                                              755       0      12           64  4424741006  10221                                                                                                                                                                                                                                                                                                                                                                      .so man2/msgop.2
.\" @(#)msgsnd.2 1.5 89/03/26 SMI;
  munmap.2 .2     9  nfssvc.2      9  open.2v     9  pipe.2 n    9  poll.2 e    9  profil.2 2 n    9  ptrace.2      9  putmsg.2      9  
quotactl.2   (  9  read.2v   <  9  
readlink.2    P  9  readv.2v 2 <  d  9  reboot.2  P  t  9  recv.2 2    9  
recvfrom.2      9  	recvmsg.2      9  rename.2      9  rmdir.2     9  sbrk.2 i    9  select.2 2       9  semc./share/man/man2/msync.2                                                                               755       0      12         3577  4424741006  10133                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)msync.2 1.11 89/03/26 SMI;
.TH MSYNC 2 "22 March 1989"
.SH NAME
msync \- synchronize memory with physical storage
.SH SYNOPSIS
.nf
.ft B
#include <sys/mman.h>
msync(addr, len, flags)
caddr_t addr;
int len, flags;
.ft R
.fi
.SH DESCRIPTION
.IX "msync function" "" "\fLmsync\fP function"
.LP
.B msync(\|)
writes all modified copies of pages over the range
[\fIaddr, addr + len\fP\^)
to their permanent storage locations.
.B msync(\|)
optionally invalidates any copies so that further references to the pages
will be obtained by the system from their permanent
storage locations.
.LP
Values for
.I flags
are defined in
.B /usr/include/sys/mman.h
as:
.LP
.RS
.nf
.ta 25n 35n
.ft B
#define \s-1MS_ASYNC\s0	0x1	/* Return immediately */
#define \s-1MS_INVALIDATE\s0	0x2	/* Invalidate mappings */
.ft R
.fi
.RE
.LP
and are used to control the behavior of
.BR msync .
One or more flags may
be specified in a single call.
.LP
.SB MS_ASYNC
returns
.B msync(\|)
immediately once all I/O operations are
scheduled; normally,
.B msync(\|)
will not return until all I/O operations are complete.
.SB MS_INVALIDATE
invalidates all cached copies of data
from memory objects,
requiring them to be re-obtained from the object's permanent
storage location upon the next reference.
.LP
.B msync(\|)
should be used by programs which require a memory object to
be
in a known state, for example in building transaction facilities.
.SH RETURN VALUE
A 0 value is returned on success.  A \-1 value indicates an error.
.SH ERRORS
.B msync(\|)
fails if:
.TP 20
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM ENOMEM
Addresses in the range
[\fIaddr, addr + len\fP\^)
are outside the valid range for
the address space of a process.
.TP
.SM EINVAL
Either
.I addr
is not a multiple of the current page size, or
.I len
is negative.
.TP
.SM EINVAL
One of the flags
.SB MS_ASYNC
or
.SB MS_INVALID
is invalid.
TP 3
\(bu
.I msqid
is removed from the system (see
.BR msgctl (2)).
When this occurs,
.B errno
is set equal to
.SM EIDRM\s0,
and ./share/man/man2/munmap.2                                                                              755       0      12         2100  4424741006  10254                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)munmap.2 1.19 89/03/26 SMI;
.TH MUNMAP 2 "22 March 1989"
.SH NAME
munmap \- unmap pages of memory.
.SH SYNOPSIS
.nf
.ft B
#include <sys/mman.h>
munmap(addr, len)
caddr_t addr;
int len;
.ft R
.fi
.IX  munmap  ""  \fLmunmap\fP
.IX  "memory management"  munmap  ""  \fLmunmap\fP
.IX  "unmap memory pages \(em \fLmmap\fP"
.SH DESCRIPTION
.LP
.B munmap(\|)
removes the mappings for pages in the range
[\fIaddr, addr + len\fP\^).
Further references to these pages will result
in the delivery of a
.SB SIGSEGV
signal to the process, unless these pages are
considered part of the \(lqdata\(rq or \(lqstack\(rq segments.
.LP
.B brk(\|)
and
.B mmap(\|)
often perform implicit
\fBmunmap\fP's.
.SH RETURN VALUE
.LP
.B munmap(\|)
returns 0 on success, \-1 on failure.
.SH ERRORS
.B munmap(\|)
will fail if:
.TP 15
.SM EINVAL
.I addr
is not a multiple of the page size as returned by
.BR getpagesize (2).
.TP
.SM EINVAL
Addresses in the range
[\fIaddr, addr + len\fP\^)
are outside the valid range for
the address space of a process.
.SH SEE ALSO
.BR brk (2),
.BR getpagesize (2),
.BR mmap (2)
  
sigpause.2   
,  9  sigsetmask.2  9  
@  9  
sigstack.2 @  
T  9  sigvec.2  
T  
h  9  socket.2  
h  
  9  socketpair.2  9  
  9  stat.2   
  9  statfs.2  
  
  9  swapon.2  
  
  9  	symlink.2 
  
  9  sync.2   
  9  	syscall.2 
     9  tell.2 .    9  
truncate.2   $  9  umask.2   8  9  uname.2v  8  L  9  unlink.2  L  `  9  	unmount.2 `  t  9  utimes.2  t    9./share/man/man2/nfssvc.2                                                                              755       0      12         2100  4424741007  10262                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nfssvc.2 1.15 89/03/26 SMI;
.TH NFSSVC 2 "25 September 1987"
.SH NAME
nfssvc, async_daemon \- NFS daemons
.SH SYNOPSIS
.nf
.B nfssvc (sock)
.B int sock;
.fi
.LP
.BR async_daemon (\|)
.IX  nfssvc  ""  \fLnfssvc\fP
.IX  "socket operations"  nfssvc  ""  \fLnfssvc\fP
.IX  "network file system daemons"
.IX  daemons  "network file system"
.IX  async_daemon  ""  \fLasync_daemon\fP
.IX  "socket operations"  async_daemon  ""  \fLasync_daemon\fP
.SH DESCRIPTION
.LP
.B nfssvc(\|)
starts an
.SM NFS
daemon listening on socket
.IR sock .
The socket must be
.BR \s-1AF_INET\s0 ,
and
.SB SOCK_DGRAM
(protocol
.BR \s-1UDP/IP\s0 ).
The system call will return only if the socket is invalid.
.LP
.B async_daemon(\|)
implements the
.SM NFS
daemon that handles asynchronous I/O for an
.SM NFS
client.  This system call never returns.
.LP
Both system calls result in kernel-only processes with user memory discarded.
.SH SEE ALSO
.BR mountd (8C)
.SH BUGS
.LP
There should be a way to dynamically create kernel-only processes
instead of having to make system calls from userland to simulate this.
  sigsetmask.2  
,  
@  9  
sigstack.2   
T  9  sigvec.2 2 @  
h  9  socket.2  
T  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2   
  9  swapon.2  
  
  9  	symlink.2 
  
  9  sync.2 .  
  9  	syscall.2       9  tell.2 .    9  
truncate.2 .  $  9  umask.2   8  9  uname.2v .2   L  9  unlink.2  8  `  9  	unmount.2 L  t  9  utimes.2  `    9  	vadvise.2 t    9./share/man/man2/open.2v                                                                               755       0      12        17456  4424741007  10153                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)open.2v 1.34 89/03/26 SMI; from UCB 4.3 and S5R3
.TH OPEN 2V "22 March 1989"
.SH NAME
open \- open or create a file for reading or writing
.SH SYNOPSIS
.nf
.B #include <fcntl.h>
.LP
.BR "open(path, flags" [ " , mode " ] " )"
.B char \(**path;
.B int flags, mode;
.fi
.SH DESCRIPTION
.IX "System V library, system call versions" "\fLopen\fR"
.IX  open  ""  \fLopen\fP
.IX  "file system"  open  ""  \fLopen\fP
.IX  "file system"  "create file"  ""  "create file \(em \fLopen\fP"
.IX  "create" "file \(em \fLopen\fP"
.LP
.I path
points to the pathname of a file.
.B open(\|)
opens the named file
for reading and/or writing, as specified by the
.I flags
argument, and returns a descriptor for that file.  The
.I flags
argument may indicate the file is to be
created if it does not already exist (by specifying the
.SB O_CREAT
flag), in which case the file is created with mode
.I mode
as described in
.BR chmod (2)
and modified by the process' umask value (see
.BR umask (2)).
If the path is a null string, the kernel maps this null pathname to
.RB ` . ',
the current directory.
.I flags
values are constructed by
.SM OR\s0ing
flags from the following list (only one of
the first three flags below may be used):
.LP
.TP 15
.SB O_RDONLY
Open for reading only.
.TP
.SB O_WRONLY
Open for writing only.
.TP
.SB O_RDWR
Open for reading and writing.
.TP
.SB O_NDELAY
When opening a
.SM FIFO
with
.SB O_RDONLY
or
.SB O_WRONLY
set:
.IP
If
.SB O_NDELAY
is set:
.RS
.IP
An
.B open(\|)
for reading-only will return without delay.
An
.B open(\|)
for writing-only will return an error if no process
currently has the file open for reading.
.RE
.IP
If
.SB O_NDELAY
is clear:
.RS
.IP
An
.B open(\|)
for reading-only will block until a process
opens the file for writing.
An
.B open(\|)
for writing-only will block until a process
opens the file for reading.
.RE
.IP
When opening a file associated with a communication line:
.IP
If
.SB O_NDELAY
is set:
.RS
.IP
The open will return without waiting for carrier.
The first time the process attempts to perform I/O on the open
file it will block (not currently implemented).
.RE
.IP
If
.SB O_NDELAY
is clear:
.RS
.IP
The open will block until carrier is present.
.RE
.TP
.SB O_SYNC
When opening a regular file, this flag affects subsequent writes.  If
set, each
.BR write (2V)
will wait for both the file data and file status to be physically
updated.
.TP
.SB O_APPEND
If set, the file pointer will be set to the end of the file
prior to each write.
.TP
.SB O_CREAT
If the file exists, this flag has no effect.
Otherwise, the owner
.SM ID
of the file is set to the effective user
.SM ID
of the process.
The group
.SM ID
of the file is set to either:
.RS
.TP 3
\(bu
the effective group
.SM ID
of the process, if the filesystem was not
mounted with the
.SM BSD
file-creation semantics flag (see
.BR mount (2))
and the set-gid bit of the parent directory is clear, or
.TP 3
\(bu
the group
.SM ID
of the directory in which the file is created.
.LP
The low-order 12 bits of the file mode are set to the value of
.IR mode ,
modified as follows (see
.BR creat (2)):
.TP 3
\(bu
All bits set in the file mode creation mask of the process are cleared.
See
.BR umask (2).
.TP 3
\(bu
The \(lqsave text image after execution\(rq bit of the mode is cleared.
See
.BR chmod (2).
.TP 3
\(bu
The \(lqset group
.SM ID
on execution\(rq bit of the mode is cleared if the
effective user
.SM ID
of the process is not super-user and the process
is not a member of the group of the created file.
.RE
.TP 15
.SB O_TRUNC
If the file exists, its length is truncated to 0 and the mode and owner
are unchanged.
.TP
.SB O_EXCL
If
.SB O_EXCL
and
.SB O_CREAT
are set,
.B open(\|)
will fail if the file exists.  This can be used to implement a simple
exclusive access locking mechanism.  If
.SB O_EXCL
is set and the last component of the pathname is
a symbolic link, the open will fail even if the symbolic
link points to a non-existent name.
.LP
The file pointer used to mark the current position within the
file is set to the beginning of the file.
.LP
The new descriptor is set to remain open across
.BR execve (2)
system calls; see
.BR close (2)
and
.BR fcntl (2V).
.LP
There is a system enforced limit on the number of open file descriptors
per process, whose value is returned by the
.BR getdtablesize (2)
call.
.SH SYSTEM V DESCRIPTION
.LP
If the
.SB O_NDELAY
flag is set on an
.BR open ,
that flag is set for that file descriptor (see
.BR fcntl (2V)
and may affect subsequent reads and writes.
See
.BR read (2V)
and
.BR write (2V).
.SH RETURN VALUE
.LP
The value \-1 is returned if an error occurs, and external variable
.B errno
is set to indicate the cause of the error.
Otherwise a non-negative
numbered file descriptor for the new open file is returned.
.SH ERRORS
.LP
.B open(\|)
fails if:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
.SB O_CREAT
is not set and the named file does not exist.
.TP
.SM ENOENT
A component of the path prefix of
.I path
does not exist.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM EACCES
The required permissions (for reading and/or writing)
are denied for the file named by
.IR path .
.TP
.SM EACCES
The file referred to by
.I path
does not exist,
.SB O_CREAT
is specified, and the directory
in which it is to be created does not permit writing.
.TP
.SM EISDIR
The named file is a directory, and the arguments specify
it is to be opened for writing.
.TP
.SM ENXIO
.SB O_NDELAY
is set, the named file is a
.SM FIFO\s0,
.SB O_WRONLY
is set, and no process has the file open for reading.
.TP
.SM EMFILE
The system limit for open file descriptors per process has already been reached.
.TP
.SM ENFILE
The system file table is full.
.br
.ne 5
.TP
.SM ENOSPC
The file does not exist,
.SB O_CREAT
is specified, and
the directory in which the entry for the new file
is being placed cannot be extended because there
is no space left on the file system containing the
directory.
.TP
.SM ENOSPC
The file does not exist,
.SB O_CREAT
is specified,
and there are no free inodes on the file system on which
the file is being created.
.TP
.SM EDQUOT
The file does not exist,
.SB O_CREAT
is specified, and
the directory in which the entry for the new file
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EDQUOT
The file does not exist,
.SB O_CREAT
is specified, and
the user's quota of inodes on the file system on
which the file is being created has been exhausted.
.TP
.SM EROFS
The named file does not exist,
.SB O_CREAT
is specified, and the file system on
which it is to be created is a read-only file system.
.TP
.SM EROFS
The named file resides on a read-only file system,
and the file is to be opened for writing.
.TP
.SM ENXIO
The file is a character special or block special file, and
the associated device does not exist.
.TP
.SM EINTR
A signal was caught during the
.B open(\|)
system call.
.TP
.SM EIO
A hangup or error occurred during a
.SM STREAMS
.BR open .
.TP
.SM ENOSR
A
.I stream
could not be allocated.
.TP
.SM ENXIO
A
.SM STREAMS
module or driver open routine failed.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.TP
.SM EEXIST
.SB O_EXCL
and
.SB O_CREAT
were both specified and the file exists.
.TP
.SM EOPNOTSUPP
An attempt was made to open a socket (not currently implemented).
.SH SEE ALSO
.BR chmod (2),
.BR close (2),
.BR creat (2),
.BR dup (2),
.BR fcntl (2V),
.BR getdtablesize (2),
.BR getmsg (2),
.BR lseek (2),
.BR mount (2),
.BR putmsg (2),
.BR read (2V),
.BR umask (2),
.BR write (2V)
legal address.
.TP
.SM EINTR
The call was interrupted by the delivery of a signal.
.LP
.B msgrcv(\|)
will fail and no message will be received if one or more of the following are
true:
.TP 15
.SM EINVAL
.I msqi./share/man/man2/pipe.2                                                                                755       0      12         3754  4424741007   7735                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pipe.2 1.17 89/03/26 SMI; from UCB 4.2
.TH PIPE 2 "22 March 1989"
.SH NAME
pipe \- create an interprocess communication channel
.SH SYNOPSIS
.nf
.ft B
pipe(fildes)
int fildes[2];
.fi
.ft R
.IX  pipe  ""  \fLpipe\fP
.IX  "interprocess communication"  pipe  ""  \fLpipe\fP
.IX  "create" "interprocess communication channel \(em \fLpipe\fP"
.SH DESCRIPTION
The
.B pipe(\|)
system call creates an I/O mechanism called a pipe and returns two file
descriptors,
.IR fildes [0]
and
.IR fildes [1].
.IR fildes [0]
is opened for reading and
.IR fildes [1]
is opened for writing.
When the pipe is written using the descriptor
.IR fildes [1]
up to 4096 bytes of data are buffered before the writing process is blocked.
A read only file descriptor
.IR fildes [0]
accesses the data written to
.IR fildes [1]
on a
.SM FIFO\s0
(first-in-first-out) basis.
.LP
It is assumed that after the pipe has been set up, two (or more)
cooperating processes (created by subsequent
.B fork(\|)
calls) will pass data through the pipe with
.B read(\|)
and
.B write(\|)
calls.
.LP
The shell has a syntax to set up a linear array of processes connected by pipes.
.LP
Read calls on an empty pipe (no buffered data) with only one end
(all write file descriptors closed) returns an
.SM EOF
(end of file).
.LP
Pipes are really a special case of the
.BR socketpair (2)
call and, in fact, are implemented as such in the system.
.LP
A signal is generated if a write on a pipe with only one end is attempted.
.SH RETURN VALUE
The function value zero is returned if the
pipe was created; \-1 if an error occurred.
.SH ERRORS
The
.B pipe(\|)
call will fail if:
.TP 15
.SM EMFILE
Too many descriptors are active.
.TP
.SM ENFILE
The system file table is full.
.TP
.SM EFAULT
The
.I fildes
file descriptor pair is in an invalid area of the process's address
space.
.SH "SEE ALSO"
.BR fork (2),
.BR read (2V),
.BR socketpair (2),
.BR write (2V),
.BR sh (1)
.SH BUGS
Should more than 4096 bytes be necessary in any
pipe among a loop of processes, deadlock will occur.
is set to remain ope./share/man/man2/poll.2                                                                                755       0      12        12376  4424741007   7766                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)poll.2 1.13 89/03/26 SMI; from S5R3
.TH POLL 2 "25 March 1989"
.SH NAME
poll \- STREAMS I/O multiplexing
.SH SYNOPSIS
.B #include <stropts.h>
.br
.B #include <poll.h>
.LP
.B int poll(fds, nfds, timeout)
.br
.B struct pollfd \(**fds;
.br
.B unsigned long nfds;
.br
.B int timeout;
.SH DESCRIPTION
.IX "poll function" "" "\fLpoll\fP function"
.LP
.B poll(\|)
provides users with a mechanism for multiplexing input/output
over a set of file descriptors that reference open streams
(see
.BR intro (2)).
.B poll(\|)
identifies those streams
on which a user can send or
receive messages, or on which certain events have occurred.
A user can receive messages using
.BR read (2V)
or
.BR getmsg (2)
and can send messages using
.BR write (2V)
and
.BR putmsg (2).
Certain
.BR ioctl (2)
calls, such as
.SB I_RECVFD
and
.SB I_SENDFD
(see
.BR streamio (4)),
can also be used to receive and send messages.
.LP
.I fds
specifies the file descriptors to be examined and the
events of interest for each file descriptor.
It is a pointer to an array with one element for each
open file descriptor of interest.
The array's elements are
.B pollfd
structures which contain
the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 2.5i
int fd;   	 	/* file descriptor */
short events;		/* requested events */
short revents;		/* returned events */
.ft R
.fi
.DT
.RE
.LP
where
.B fd
specifies an open file descriptor and
.B events
and
.B revents
are bitmasks constructed by
.SM OR\s0ing
any combination of the following event flags:
.TP 15
.SB POLLIN
A non-priority or file descriptor passing message (see
.SM
.BR I_RECVFD \s0)
is present on the
.B stream head
read queue.
This flag is set even if the message is of zero length.
In
.BR revents ,
this flag is mutually exclusive with
.SM
.BR POLLPRI \s0.
.TP
.SB POLLPRI
A priority message is present on the
.B stream head
read queue.
This flag is set even if the message is of zero length.
In
.BR revents ,
this flag is mutually exclusive with
.SM
.BR POLLIN \s0.
.TP
.SB POLLOUT
The first downstream write queue in the
.I stream
is not full.
Priority control messages can be sent (see
.BR putmsg (2))
at any time.
.TP
.SB POLLERR
An error message has arrived at the
.BR "stream head" .
This flag is only valid in the
.B revents
bitmask; it is not used in the
.B events
field.
.TP
.SB POLLHUP
A hangup has occurred on the
.IR stream .
This event and
.SB POLLOUT
are mutually exclusive; a
.I stream
can never be writable if a hangup has occurred.
However, this event and
.SB POLLIN
or
.SB POLLPRI
are not mutually exclusive.
This flag is only valid in the
.B revents
bitmask; it is not used in the
.I events
field.
.br
.ne 5
.TP
.SB POLLNVAL
The specified
.B fd
value does not belong to an open
.IR stream .
This flag is only valid in the
.B revents
field; it is not used in the
.B events
field.
.LP
For each element of the array pointed to by
.IR fds ,
.B poll(\|)
examines the given file descriptor for
the
.BR event (s)
specified in
.BR events .
The number of file descriptors to be examined is specified by
.IR nfds .
If
.I nfds
exceeds the system limit of open files
(see
.BR getdtablesize (2)),
.B poll(\|)
will fail.
.LP
If the value
.B fd
is less than zero,
.B events
is ignored and
.B revents
is set to 0 in that entry on return from
.BR poll(\|) .
.LP
The results of the
.B poll(\|)
query are stored in the
.B revents
field in the
.B pollfd
structure.  Bits are set in the
.B revents
bitmask to indicate
which of the requested events are true.
If none are true, none of the specified bits is set in
.B revents
when the
.B poll(\|)
call returns.
The event flags
.SM
.BR POLLHUP \s0,
.SM
.BR POLLERR \s0,
and
.SB POLLNVAL
are always set in
.B revents
if the conditions they indicate are true; this
occurs even though these flags were not present in
.BR events .
.LP
If none of the defined events have occurred on any selected file descriptor,
.B poll(\|)
waits at least
.I timeout
milliseconds for an event to occur
on any of the selected file descriptors.
On a computer where millisecond timing accuracy is not available,
.I timeout
is rounded up to the nearest legal value
available on that system.  If the value
.I timeout
is 0,
.B poll(\|)
returns immediately.
If the value of
.I timeout
is \-1,
.B poll(\|)
blocks until a requested event occurs or
until the call is interrupted.
.B poll(\|)
is not affected by the
.SB O_NDELAY
flag.
.SH RETURN VALUE
Upon successful completion,
a non-negative value is returned.
A positive value indicates the total number of file descriptors
that has been selected
(for instance, file descriptors for which the
.B revents
field is non-zero).
A value of 0 indicates that
the call timed out and no file descriptors have been selected.
Upon failure, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B poll(\|)
fails if one or more of the following are true:
.TP 15
.SM EAGAIN
Allocation of internal data structures failed, but the request should
be attempted again.
.TP
.SM EFAULT
Some argument points outside the allocated address space.
.TP
.SM EINTR
A signal was caught during the
.B poll(\|)
system call.
.TP
.SM EINVAL
The argument
.I nfds
is less than zero, or
.I nfds
is greater than the system limit of open files.
.SH "SEE ALSO"
.BR getdtablesize (2),
.BR getmsg (2),
.BR intro (2),
.BR ioctl (2),
.BR putmsg (2),
.BR read (2V),
.BR write (2V),
.BR streamio (4)
The file does not exist,
.SB O_CREAT
is specified, and
the directory in which the entry for the new file
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EDQUOT./share/man/man2/profil.2                                                                              755       0      12         3173  4424741007  10266                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)profil.2 1.16 89/03/26 SMI; from UCB 4.2
.TH PROFIL 2 "22 March 1989"
.SH NAME
profil \- execution time profile
.SH SYNOPSIS
.nf
.B profil(buff, bufsiz, offset, scale)
.B char *buff;
.B int bufsiz, offset, scale;
.fi
.IX  profil  ""  \fLprofil\fP
.IX  "timing and statistics"  profil  ""  \fLprofil\fP
.IX  statistics  profil  ""  \fLprofil\fP
.SH DESCRIPTION
.B profil(\|)
enables run-time execution profiling, and
reserves a buffer for maintaining raw profiling statistics.
.I buff
points to an area of core of length
.IR bufsiz
(in bytes).
After the call to
.BR profil(\|) ,
the user's program counter (pc) is examined at each clock tick
(10 milliseconds on Sun-4 systems, 20 milliseconds on Sun-2 and Sun-3 systems);
.I offset
is subtracted from its value, and the result multiplied by
.IR scale .
If the resulting number corresponds to a word within the buffer,
that word is incremented.
.LP
.I scale
is interpreted as an unsigned, fixed-point fraction with binary point
at the left: 0x10000 gives a 1-to-1 mapping of pc values to words in
.IR buff ;
0x8000 maps each pair of instruction words together.
0x2 maps all instructions onto the beginning of
.I buff
(producing a non-interrupting core clock).
.LP
Profiling is turned off by giving a
.I scale
of 0 or 1.  It is rendered ineffective by giving a
.I bufsiz
of 0.  Profiling is turned off when an
.B execve(\|)
is executed, but remains on in child and parent both after a
.BR fork(\|) .
Profiling is turned off if an update in
.I buff
would cause a memory fault.
.SH "RETURN VALUE
A 0, indicating success, is always returned.
.SH "SEE ALSO"
.BR gprof (1),
.BR getitimer (2),
.BR monitor (3)
B fd
value does not belong to an open
.IR stream .
This flag is only valid in the
.B revents
field; it is not used in the
.B events
field.
.LP
For each element of the array pointed to by
.IR fds ,
.B poll(\|)
examines the given file descriptor for
the
.BR event (s)
specified in
.BR events .
The number of file descriptors to be examined is specified by
.IR nfds .
If
.I nfds
exceeds the s./share/man/man2/ptrace.2                                                                              755       0      12        32516  4424741010  10266                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)ptrace.2 1.34 89/03/26 SMI; from UCB 6.4 5/23/86
.TH PTRACE 2 "22 March 1989"
.SH NAME
ptrace \- process trace
.SH SYNOPSIS
.nf
.ft B
#include <signal.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
.LP
.ft B
.BR "ptrace(request, pid, addr, data " [ " , addr2 " ] " )"
.ft B
enum ptracereq request;
int pid;
char *addr;
int data;
char *addr2;
.ft R
.fi
.SH DESCRIPTION
.IX  ptrace  ""  \fLptrace\fP 
.IX  "processes and protection"  ptrace  ""  \fLptrace\fP
.IX  process "tracing \(em \fLptrace\fP"
.IX  "trace process ptrace"  ""  "trace process \(em \fLptrace\fP"
.LP
.B ptrace(\|)
provides a means by which a process may control the execution of
another process, and examine and change its core image.  Its primary
use is for the implementation of breakpoint debugging.  There are five
arguments whose interpretation depends on the
.I request
argument.  Generally,
.I pid
is the process
.SM ID
of the traced process.  A process being traced
behaves normally until it encounters some signal whether internally
generated like \(lqillegal instruction\(rq or externally generated
like \(lqinterrupt\(rq.  See
.BR sigvec (2)
for the list.  Then the traced process enters a stopped state and the
tracing process is notified using
.BR  wait (2).
When the traced process is in the stopped state, its core image can be
examined and modified using
.BR ptrace .
If desired, another
.B ptrace(\|)
request can then cause the traced process either to terminate or to
continue, possibly ignoring the signal.
.LP
Note: several different values of the
.I request
argument can make
.B ptrace(\|)
return data values \(em since \-1 is a possibly legitimate value, to
differentiate between \-1 as a legitimate value and \-1 as an error
code, you should clear the
.B errno
global error code before doing a
.B ptrace(\|)
call, and then check the value of
.B errno
afterwards.
.LP
The value of the
.I request
argument determines the precise action of the call:
.TP
.SB PTRACE_TRACEME
This request is the only one used by the traced process;
it declares that the process is to be traced by its parent.
All the other arguments are ignored.
Peculiar results will ensue if the parent does not expect to trace the child.
.TP
.SB PTRACE_PEEKTEXT
.PD 0
.TP
.SB PTRACE_PEEKDATA
.PD
The word in the traced process's address space at
.I addr
is returned.  If the instruction and data spaces are separate
(for example, historically on a
.SM PDP\s0-11),
request
.SB PTRACE_PEEKTEXT
indicates instruction space while
.SB PTRACE_PEEKDATA
indicates data space.
Otherwise, either request may be used, with equal results;
.I addr
must be even on a Sun-2 system or a multiple of 4 on a Sun-4 system.
The child must be stopped.
The input
.I data
and
.I addr2
are ignored.
.TP
.SB PTRACE_PEEKUSER
The word of the system's per-process data area corresponding to
.I addr
is returned.
.I addr
must be a valid offset within the kernel's per-process data pages.
This space contains the registers and other information about
the process; its layout corresponds to the
.I user
structure in the system (see
.BR /usr/include/sys/user.h ).
.TP
.SB PTRACE_POKETEXT
.PD 0
.TP
.SB PTRACE_POKEDATA
.PD
The given
.I data
is written at the word in the process's address space corresponding to
.IR addr .
.I addr
must be even on a Sun-2 system or a multiple of 4 on a
Sun-4 system.
No useful value is returned.
If the instruction and data spaces are separate,
request
.SB PTRACE_PEEKTEXT
indicates instruction space while
.SB PTRACE_PEEKDATA
indicates data space.  The
.SB PTRACE_POKETEXT
request must be used to write into a process's text
space even if the instruction and data spaces are not separate.
.br
.ne 4
.TP
.SB PTRACE_POKEUSER
The process's system data is written, as it is read with request
.BR \s-1PTRACE_PEEKUSER\s0 .
Only a few locations can be written in this way:
the general registers, the floating point status and registers,
and certain bits of the processor status word.
.TP
.SB PTRACE_CONT
The
.I data
argument is taken as a signal number
and the child's execution continues at location
.I addr
as if it had incurred that signal.  Normally the signal number will be
either 0 to indicate that the signal that caused the stop
should be ignored, or that value fetched out of the
process's image indicating which signal caused the stop.  If
.I addr
is (int *)1 then execution continues from where it stopped.
.I addr
must be a multiple of 4 on a Sun-4 system.
.TP
.SB PTRACE_KILL
The traced process terminates, with the same consequences as
.BR exit (2).
.TP
.SB PTRACE_SINGLESTEP
Execution continues as in request
.SM
.BR PTRACE_CONT ;
however, as soon as possible after execution of at least one instruction,
execution stops again.  The signal number from the stop is
.SM
.BR SIGTRAP .
On Sun-2, Sun-3, and Sun386i systems, the status register
T-bit is used and just one instruction
is executed.
This is part of the mechanism for implementing breakpoints.
On a Sun-4 system this will return an error since there is no hardware assist for
this feature.
Instead, the user should insert breakpoint traps in the debugged program
with
.SM
.BR PTRACE_POKETEXT .
.TP
.SB PTRACE_ATTACH
Attach to the process identified by the
.I pid
argument and begin tracing it.  Process
.I pid
does not have to be a child of the requestor, but
the requestor must have permission to send process
.I pid
a signal and the effective user
.SM ID\s0s
of the requesting process and process
.I pid
must match.
.TP
.SB PTRACE_DETACH
Detach the process being traced.  Process
.I pid
is no longer being traced and continues its execution.  The
.I data
argument is taken as a signal number and the process continues at location
.I addr
as if it had incurred that signal.
.TP
.SB PTRACE_GETREGS
The traced process's registers are returned in a
structure pointed to by the
.I addr
argument.  The registers include the general purpose registers,
the program counter and the program status word.
The ``regs'' structure defined in
.B /usr/include/machine/reg.h
describes the data that is returned.
.TP
.SB PTRACE_SETREGS
The traced process's registers are written from a
structure pointed to by the
.I addr
argument.  The registers include the general purpose registers,
the program counter and the program status word.
The ``regs'' structure defined in
.B reg.h
describes the data that is set.
.TP
.SB PTRACE_GETFPREGS
(Sun-3, Sun-4 and Sun386i systems only) The traced process's
.SM FPP
status is returned in a structure pointed to by the
.I addr
argument.  The status includes the
68881 (80387 on Sun386i systems)
floating point registers and
the control, status, and instruction address registers.
The ``fp_status'' structure defined in
.BR reg .
describes the data that is returned.  On Sun-2 systems this will return an
error since there is no user visible floating point state. The
.B fp_state
.\" Sun386i
structure defined in 
.B /usr/include/machine/fp.h
describes the data that is returned on 
a Sun386i system.
.TP
.SB PTRACE_SETFPREGS
(Sun-3, Sun-4 and Sun386i systems only) The traced process's
.SM FPP
status is written from a structure pointed to by the
.I addr
argument.  The status includes the
.SM FPP
floating point registers and
the control, status, and instruction address registers.
The ``fp_status'' structure defined in
.B reg.h
describes the data that is set.  On Sun-2 systems this will return an
error since there is no user visible floating point state. The ``fp_state''
.\" Sun386i
structure defined in
.B fp.h
describes the data that is returned on 
a Sun386i system.
.br
.ne 6
.TP
.SB PTRACE_GETFPAREGS
(a Sun-3 system with
.SM FPA
only) The traced process's
.SM FPA
registers are returned in a structure pointed to by the
.I addr
argument.  The ``fpa_regs'' structure defined in
.B reg.h
describes the data that is returned.
.TP
.SB PTRACE_SETFPAREGS
(a Sun-3 system with
.SM FPA
only) The traced process's
.SM FPA
registers are written from a
structure pointed to by the
.I addr
argument.  The \(lqfpa_regs\(rq structure defined in
.B reg.h
describes the data that is set.
.br
.ne 4
.TP
.SB PTRACE_READTEXT
.PD 0
.TP
.SB PTRACE_READDATA
.PD
Read data from the address space of the traced process.
If the instruction and data spaces are separate, request
.SB PTRACE_READTEXT
indicates instruction space while
.SB PTRACE_READDATA
indicates data space.  The
.I addr
argument is the address within the traced process from where the data is
read, the
.I data
argument is the number of bytes to read, and the
.I addr2
argument is the address within the requesting process where the data is written.
.TP
.SB PTRACE_WRITETEXT
.PD 0
.TP
.SB PTRACE_WRITEDATA
.PD
Write data into the address space of the traced process.
If the instruction and data spaces are separate, request
.SB PTRACE_READTEXT
indicates instruction space while
.SB PTRACE_READDATA
indicates data space.  The
.I addr
argument is the address within the traced process where the data is
written, the
.I data
argument is the number of bytes to write, and the
.I addr2
argument is the address within the requesting process from where the data is read.
.TP
.\" Sun386i systems
.SB PTRACE_SETWRBKPT
(Sun386i systems only) Set a write breakpoint at location
.I addr
in the process being traced.  Whenever a write is directed to this location
a breakpoint will occur and a SIGTRAP signal will be sent to the process.  The
.I data
argument specifies which debug register should be used for the address of the
breakpoint and must be in the range 0 through 3, inclusive. The
.I addr2
argument specifies the length of the operand in bytes, and must be one of 1, 2,
or 4.
.TP
.SB PTRACE_SETACBKPT
(Sun386i systems only) Set an access breakpoint at location
.I addr
in the process being traced.  When location
.I addr
is read or written a breakpoint will occur and the process will be sent a
SIGTRAP signal.  The
.I data
argument specifies which debug register should be used for the address of the
breakpoint and must be in the range 0 through 3, inclusive. The
.I addr2
argument specifies the length of the operand in bytes, and must be one of 1, 2,
or 4.
.TP
.SB PTRACE_CLRBKPT
(Sun386i systems only) Clears all break points set with
.SB PTRACE_SETACBKPT
or
.BR \s-1PTRACE_SETWRBKPT\s0 .
.TP
.SB PTRACE_SYSCALL
Execution continues as in request
.SM
.BR PTRACE_CONT ;
until the process makes a system call.
The process receives a
.SB SIGTRAP
signal and stops.
At this point the arguments to the system call may be inspected
in the process
.I user
structure using the
.SB PTRACE_PEEKUSER
request.
The system call number is available in place of the 8th argument.
Continuing with another
.SB PTRACE_SYSCALL
will stop the process again at the completion of the system call.
At this point the result of the system call and error value
may be inspected in the process
.I user
structure.
.TP
.SB PTRACE_DUMPCORE
Dumps a core image of the traced process to a file.
The name of the file is obtained from the
.I addr
argument.
.LP
As indicated, these calls
(except for requests
.BR \s-1PTRACE_TRACEME\s0 ,
.SB PTRACE_ATTACH
and
.B \s-1PTRACE_DETACH\fR\s0)
can be used only when the subject process has stopped.  The
.B wait(\|)
call is used to determine when a process stops;
in such a case the \(lqtermination\(rq status returned by
.B wait(\|)
has the value
.SB WSTOPPED
to indicate a stop rather than genuine termination.
.LP
To forestall possible fraud,
.B ptrace(\|)
inhibits the set\s-1UID\s0 and set\s-1GID\s0 facilities on subsequent
.BR execve (2)
calls.  If a traced process calls
.BR execve ,
it will stop before executing the first instruction of the new image,
showing signal
.SM
.BR SIGTRAP .
.LP
On the Sun, \(lqword\(rq also means a 32-bit integer.
.SH RETURN VALUE
In general, a 0 value is returned if the call succeeds.  Note: 
this is not always true because requests such as
.SB PTRACE_PEEKTEXT
and
.SB PTRACE_PEEKDATA
return legitimate values.  If the call fails
then a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.TP 15
.SM EIO
The request code is invalid.
.TP
.SM ESRCH
The specified process does not exist.
.TP
.SM ESRCH
The request requires the process to be one which is
traced by the current process and stopped, but it is not
stopped or it is not being traced by the current process.
.TP
.SM EIO
The given signal number is invalid.
.TP
.SM EIO
The specified address is out of bounds.
.TP
.SM EPERM
The specified process cannot be traced.
.SH "SEE ALSO"
.BR adb (1),
.BR intro (2),
.BR ioctl (2),
.BR sigvec (2),
.BR wait (2)
.SH BUGS
.LP
.B ptrace(\|)
is unique and arcane; it should be replaced with a special file which
can be opened and read and written.  The control functions could then
be implemented with
.BR ioctl (2)
calls on this file.  This would be simpler to understand and have much
higher performance.
.LP
The requests
.SB PTRACE_TRACEME
through
.SB PTRACE_SINGLESTEP
are standard
.SM UNIX
system
.B ptrace(\|)
requests.  The requests
.SB PTRACE_ATTACH
through
.SB PTRACE_DUMPCORE
and the fifth argument,
.IR addr2 ,
are unique to SunOS.
.LP
The request
.SB PTRACE_TRACEME
should be able to specify signals which are to be treated normally and
not cause a stop.
In this way, for example, programs with simulated floating point (which
use \(lqillegal instruction\(rq signals at a very high rate)
could be efficiently debugged.
.LP
The error indication, \-1, is a legitimate function value;
.BR errno ,
(see
.BR intro (2)),
can be used to clarify what it means.
 address space corresponding to
.IR addr .
.I addr
must be even on a Sun-2 system or a multiple of 4 on a
Sun-4 system.
No useful value is returned.
If the instruction and data s./share/man/man2/putmsg.2                                                                              755       0      12        11303  4424741010  10316                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)putmsg.2 1.12 89/03/26 SMI; from S5R3
.TH PUTMSG 2 "22 March 1989"
.SH NAME
putmsg \- send a message on a stream
.SH SYNOPSIS
.B #include <stropts.h>
.LP
.nf
.B int putmsg(fd, ctlptr, dataptr, flags)
.B int fd;
.B struct strbuf *ctlptr;
.B struct strbuf *dataptr;
.B int flags;
.fi
.SH DESCRIPTION
.IX "putmsg function" "" "\fLputmsg()\fP function"
.LP
.B putmsg(\|)
creates a message (see
.BR intro (2))
from user specified buffer(s)
and sends the message to a
.SM STREAMS
file.  The message may contain either a data part,
a control part or both.
The data and control parts to be sent are distinguished by placement in
separate buffers, as described below.
The semantics of each part is defined by the
.SM STREAMS
module that receives the message.
.LP
.I fd
specifies a file descriptor referencing an open
.IR stream .
.I ctlptr
and
.I dataptr
each point to a
.B strbuf
structure that contains the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 2.5i
int maxlen;	/* not used */
int len;  	/* length of data */
char *buf;	/* ptr to buffer */
.ft R
.fi
.DT
.RE
.LP
.I ctlptr
points to the structure describing the control part, if
any,
to be included in the message.  The
.B buf
field in the
.B strbuf
structure points to the buffer where the
control information resides, and the
.B len
field indicates the number of bytes to be sent.  The
.B maxlen
field is not used in
.B putmsg(\|)
(see
.BR getmsg (2)).
In a similar manner,
.I dataptr
specifies the data, if any, to be included
in the message.
.I flags
may be set to the values 0 or
.SB RS_HIPRI
and is used as described below.
.LP
To send the data part of a message,
.I dataptr
must not be a
.SM NULL
pointer and the
.B len
field of
.I dataptr
must have a value of 0 or greater.
To send the control part of a message, the corresponding values must be set
for
.IR ctlptr .
No data (control) part will be sent if either
.I dataptr
.BI ( ctlptr )
is a
.SM NULL
pointer or the
.B len
field of
.I dataptr
.BI ( ctlptr )
is set to \-1.
.LP
If a control part is specified, and
.I flags
is set to
.SB RS_HIPRI\s0\fR,
a
.I priority
message is sent.  If
.I flags
is set to 0, a non-priority message is sent.
If no control part is specified, and
.I flags
is set to
.SB RS_HIPRI\s0\fR,
.B putmsg(\|)
fails and sets
.B errno
to
.SM EINVAL\s0.
If no control part and no data part are specified, and
.I flags
is set to 0, no message is sent, and 0 is returned.
.LP
For non-priority messages,
.B putmsg(\|)
will block if the
.I stream
write queue is full due to internal flow control conditions.
For priority messages,
.B putmsg(\|)
does not block on this condition.
For non-priority messages,
.B putmsg(\|)
does not block when the write queue
is full and
.SB O_NDELAY
is set.  Instead, it fails and sets
.B errno
to
.SM EAGAIN\s0.
.LP
.B putmsg(\|)
also blocks, unless prevented by lack of internal
resources,
waiting for the availability
of message blocks in the
.IR stream ,
regardless of priority or whether
.SB O_NDELAY
has been specified.  No partial message is sent.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B putmsg(\|)
fails if one or more of the following are true:
.TP 15
.SM EAGAIN
A non-priority message was specified, the
.SB O_NDELAY
flag is set and the
.I stream
write queue is full due to internal flow control conditions.
.TP
.SM EAGAIN
Buffers could not be allocated for the message that was to be created.
.TP
.SM EBADF
.I fd
is not a valid file descriptor open for
writing.
.TP
.SM EFAULT
.I ctlptr
or
.I dataptr
points outside the allocated address space.
.TP
.SM EINTR
A signal was caught during the
.B putmsg(\|)
system call.
.TP
.SM EINVAL
An undefined value was specified in
.IR flags ,
or
.I flags
is set to
.SB RS_HIPRI
and no control part was supplied.
.TP
.SM EINVAL
The
.I stream
referenced by
.I fd
is linked below a multiplexor.
.TP
.SM ENOSTR
A
.I stream
is not associated with
.IR fd .
.TP
.SM ENXIO
A hangup condition was generated downstream for the specified
.IR stream .
.TP
.SM ERANGE
The size of the data part of the message does not fall within the range
specified by the maximum and minimum packet sizes of the topmost
.I stream
module.
This value is also returned if the control part of
the message is larger than the maximum
configured size of the control part of a message, or
if the data part of a message is larger than
the maximum configured size of the data part of a message.
.LP
A
.B putmsg(\|)
also fails if a
.SM STREAMS
error message had been processed
by the
.I stream
head before the call to
.BR putmsg(\|) .
The error returned is the value contained in the
.SM STREAMS
error message.
.SH "SEE ALSO"
.BR getmsg (2),
.BR intro (2),
.BR poll (2),
.BR read (2V),
.BR write (2V)
gisters and
the control, status, and instruction address registers.
The ``fp_status'' structure defined in
.B reg.h
describes the data that is set.  On Sun-2 systems this will return an
error since there is no user visible floating point state. The ``fp_state''
.\" Sun386i
structure defined in
.B fp.h
describes the ./share/man/man2/quotactl.2                                                                            755       0      12         7053  4424741010  10622                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quotactl.2 1.13 89/03/26 SMI; from UCB 15 April 1985
.TH QUOTACTL 2 "22 March 1989"
.SH NAME
quotactl \- manipulate disk quotas
.SH SYNOPSIS
.nf
.B #include <ufs/quota.h>
.LP
.B int quotactl(cmd, special, uid, addr)
.B int cmd;
.B char \(**special;
.B int uid;
.B caddr_t addr;
.fi
.SH DESCRIPTION
.LP
.IX  "file system"  "quotactl disk quotas"  ""  "\fLquotactl\fP \(em disk quotas"
.IX  "quotactl disk quotas"  ""  "\fLquotactl\fP \(em disk quotas"
.IX  "disk quotas quotactl"  ""  "disk quotas \(em \fLquotactl\fP"
.LP
The
.B quotactl(\|)
call manipulates disk quotas.
.I cmd
indicates a command to be applied to the user
.SM ID
.IR uid .
.I special
is a pointer to a null-terminated string containing the path
name of the block special device for the file system being manipulated.
The block special device must be mounted as a
.SM UFS
file system
(see
.BR mount (2)).
.I addr
is the address of an optional, command specific, data structure
which is copied in or out of the system.  The interpretation of
.I addr
is given with each command below.
.TP 15
.SB Q_QUOTAON
Turn on quotas for a file system.
.I addr
points to the path name of file containing the quotas for the file system.
The quota file must exist; it is normally created with the
.BR quotacheck (8)
program.  This call is restricted to the super-user.
.TP
.SB Q_QUOTAOFF
Turn off quotas for a file system.
.I addr
and
.I uid
are ignored.
This call is restricted to the super-user.
.TP
.SB Q_GETQUOTA
Get disk quota limits and current usage for user
.IR uid .
.I addr
is a pointer to a
.B dqblk
structure (defined in
.BR /usr/include/ufs/quota.h ).
Only the super-user may get the quotas of a user other than himself.
.TP
.SB Q_SETQUOTA
Set disk quota limits and current usage for user
.IR uid .
.I addr
is a pointer to a
.B dqblk
structure (defined in
.BR quota.h ).
This call is restricted to the super-user.
.TP
.SB Q_SETQLIM
Set disk quota limits for user
.IR uid .
.I addr
is a pointer to a
.B dqblk
structure (defined in
.BR quota.h ).
This call is restricted to the super-user.
.TP
.SB Q_SYNC
Update the on-disk copy of quota usages for a file system.
If
.I special
is null then all file systems with active quotas are sync'ed.
.I addr
and
.I uid
are ignored.
.SH "RETURN VALUE"
.LP
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.LP
A
.B quotactl(\|)
call will fail when one of the following occurs:
.TP 15
.SM EINVAL
The kernel has not been compiled with the
.SB QUOTA
option.
.TP
.SM EINVAL
.I cmd
is invalid.
.TP
.SM ESRCH
No disc quota is found for the indicated user or quotas
have not been turned on for this file system.
.TP
.SM EPERM
The call is privileged and the caller was not the super-user.
.TP
.SM ENODEV
.I special
is not a mounted
.SM UFS
file system.
.TP
.SM ENOTBLK
.I special
is not a block device.
.TP
.SM EACCES
.RB ( \s-1Q_QUOTAON\s0 )
The quota file pointed to by
.I addr
exists but is either not a regular file or is not on the
file system pointed to by
.IR special .
.TP
.SM EBUSY
.SB Q_QUOTAON
attempted while another
.SB Q_QUOTAON
or
.SB Q_QUOTAOFF
is in progress.
.TP
.SM EUSERS
The quota table is full.
.TP
.SM ENOENT
The file specified by
.I special
or
.I addr
does not exist.
.TP
.SM EFAULT
.I addr
or
.I special
are invalid.
.SH "SEE ALSO"
.BR quota (1),
.BR getrlimit (2),
.BR mount (2),
.BR quotacheck (8),
.BR quotaon (8)
.SH BUGS
.LP
There should be some way to integrate this call with the resource
limit interface provided by
.BR setrlimit (2)
and
.BR getrlimit (2).
.LP
Incompatible with Melbourne quotas.
manipulates disk quotas.
.I cmd
indicates a command to be applied to the user
.SM ID
.IR uid .
.I special
is a pointer to a null-terminated string containing the path
name of the block special device for the file system being manipulated.
The block special device must be mounted as a
.SM UFS
file system
(see
.BR mount (2)).
.I addr
is the address of an optional, command specific, data structure
which is copied in or out of the system.  The interpretation of
.I addr./share/man/man2/read.2v                                                                               755       0      12        20526  4424741011  10110                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)read.2v 1.27 89/03/26 SMI; from UCB 4.3 and S5R3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH READ 2V "22 March 1989"
.SH NAME
read, readv \- read input
.SH SYNOPSIS
.nf
.ft B
int read(d, buf, nbytes)
int d;
char *buf;
int nbytes;
.LP
.ft B
#include <sys/types.h>
#include <sys/uio.h>
.LP
.ft B
int readv(d, iov, iovcnt)
int d;
struct iovec *iov;
int iovcnt;
.fi
.SH DESCRIPTION
.IX  read  ""  \fLread\fP
.IX  "generic operations"  read  ""  \fLread\fP
.IX  "read scattered readv"  ""  "read scattered \(em \fLreadv\fP"
.IX  "generic operations"  "scatter read readv"  ""  "scatter read \(em \fLreadv\fP"
.IX  "scatter read readv"  ""  "scatter read \(em \fLreadv\fP"
.LP
.B read(\|)
attempts to read
.I nbytes
of data from the object referenced by the descriptor
.I d
into the buffer pointed to by
.IR buf .
.B readv(\|)
performs the same action as 
.BR read(\|) ,
but scatters the input data into the
.I iovcnt
buffers specified by the members of the
.I iov
array:
.IR iov [0], iov "[1], .\|.\|.\|,"
.IR iov [ iovcnt \|\-\|1].
.LP
For
.BR readv(\|) ,
the
.B iovec
structure is defined as
.LP
.nf
.RS
.DT
.ft B
struct iovec {
	caddr_t	iov_base;
	int	iov_len;
};
.ft R
.RE
.fi
.LP
Each
.B iovec
entry specifies the base address and length of an area
in memory where data should be placed.
.B readv(\|)
will always fill an area completely before proceeding to the next.
.LP
On objects capable of seeking, the
.B read(\|)
starts at a position given by the pointer associated with
.I d
(see
.BR lseek (2)).
Upon return from
.BR read(\|) ,
the pointer is incremented by the number of bytes actually read.
.LP
Objects that are not capable of seeking always read from the current
position.  The value of the pointer associated with such an object is
undefined.
.LP
Upon successful completion,
.B read(\|)
and
.B readv(\|)
return the number of bytes actually read and placed in the buffer.
The system guarantees to read the number of bytes requested if
the descriptor references a normal file which has that many bytes left
before the
\s-1EOF\s0, but in no other case.
.LP
If the returned value is 0, then
.SM EOF
has been reached.
.LP
A
.B read(\|)
or
.B readv(\|)
from a
.SM STREAMS
(see
.BR Intro (2))
file can operate in three different modes: "byte-stream" mode,
"message-nondiscard" mode, and "message-discard" mode.
The default is byte-stream mode.
This can be changed using the
.SB I_SRDOPT
.B ioctl(\|)
request (see
.BR streamio (4)),
and can be tested with the
.SB I_GRDOPT
.BR ioctl .
In byte-stream mode,
.B read(\|)
and
.B readv(\|)
will retrieve data from the
.IR stream
until as many bytes as were requested are
transferred,
or until there is no more data to be retrieved.
Byte-stream mode ignores message boundaries.
.LP
In
.SM STREAMS
message-nondiscard mode,
.B read(\|)
and
.B readv(\|)
will retrieve data until as many bytes as were requested are transferred,
or until a message boundary is reached.  If the
.B read(\|)
or
.B readv(\|)
does not retrieve all the data in a message,
the remaining data are left on the
.IR stream ,
and can be retrieved by the next
.BR read(\|) ,
.BR readv(\|) ,
or
.BR getmsg (2)
call.  Message-discard mode also retrieves data
until as many bytes as were requested are transferred,
or a message boundary is reached.
However, unread data remaining in a message after the
.B read(\|)
or
.B readv(\|)
returns are discarded, and are not available for a
subsequent
.BR read(\|) ,
.BR readv(\|) ,
or
.BR getmsg(\|) .
.LP
When attempting to read from a descriptor associated with an empty pipe,
socket,
.SM FIFO\s0,
or
.IR stream :
.br
.ne 4
.TP 3
\(bu
If the object the descriptor is associated with is marked for
4.2\s-1BSD\s0-style
non-blocking I/O (with the
.SM FIONBIO
.B ioctl (2),
or an
.B fcntl(\|)
using the
.SM FNDELAY
flag from
.B /usr/include/sys/file.h
or the
.SB O_NDELAY
flag from
.B /usr/include/sys/fcntl.h
in the 4.2\s-1BSD\s0
environment), the read will return \-1 and
.B errno
will be set to
.SM EWOULDBLOCK\s0.
.TP 3
\(bu
If the descriptor is marked for System V-style non-blocking I/O (with
an
.B fcntl(\|)
using the
.SM FNBIO
flag from
.B /usr/include/sys/file.h
or the
.SB O_NDELAY
flag from
.B /usr/include/sys/fcntl.h
in the System V environment), and does not refer to a
.IR stream ,
the read will return 0.  Note: this
is indistinguishable from
\s-1EOF\s0.
.TP 3
\(bu
If the descriptor is marked for System V-style non-blocking I/O, and
refers to a
.IR stream ,
the read will return \-1 and
.B errno
will be set to
.SM EAGAIN\s0.
.TP 3
\(bu
If neither the descriptor nor the object it refers to are marked for
non-blocking I/O, the read will block until data is available to
be read or the object is has been \(lqdisconnected\(rq.  A pipe or
.SM FIFO
is \(lqdisconnected\(rq when no process has the
object open for writing; a socket that was connected is
\(lqdisconnected\(rq when the connection is broken; a stream is
\(lqdisconnected\(rq when a hangup condition occurs
(for instance, when carrier
drops on a terminal).
.LP
If the descriptor or the object is marked for non-blocking I/O,
and less data are available than are requested by the
.B read(\|)
or
.BR readv(\|) ,
only the data that are available are returned, and the count indicates how
many bytes of data were actually read.
.LP
When reading from a
.SM STREAMS
file, handling of zero-byte messages is
determined by the current read mode setting.
In byte-stream mode,
.B read(\|)
and
.B readv(\|)
accept data until as many bytes as were requested are transferred,
or until there is no more data to read, or until a zero-byte message
block is encountered.
.B read(\|)
and
.B readv(\|)
then return the number of bytes read, and places the zero-byte
message back on the
.I stream
to be retrieved by the next
.BR read(\|) ,
.BR readv(\|) ,
or
.BR getmsg(\|) .
In the two other modes, a zero-byte message returns a value of 0 and the
message is removed from the
.IR stream .
When a zero-byte message is read as the first message on a
.IR stream ,
a value of 0 is returned regardless of the read mode.
.LP
A
.B read(\|)
or
.B readv(\|)
from a
.SM STREAMS
file can only process data messages.
It cannot process any type of protocol message and will fail if
a protocol message is encountered at the
.BR stream head .
.SH RETURN VALUE
If successful, the number of bytes actually read is returned.
Otherwise, a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.B read(\|)
and
.B readv(\|)
will fail if one or more of the following are true:
.TP 20
.SM EBADF
.I d
is not a valid file descriptor open for reading.
.TP
.SM EISDIR
.I d
refers to a directory which is on a file system
mounted
using the
.SM NFS\s0.
.TP
.SM EBADMSG
The message waiting to be read on a
.I stream
is not a data message.
.TP
.SM EFAULT
.I buf
points outside the allocated address
space.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EINTR
A read from a slow device was interrupted before
any data arrived by the delivery of a signal.
.TP
.SM EINVAL
The
.I stream
is linked below a multiplexor.
.TP
.SM EINVAL
The pointer associated with
.I d
was negative.
.TP
.SM EWOULDBLOCK
The file was marked for 4.2\s-1BSD\s0-style non-blocking I/O,
and no data were ready to be read.
.TP
.SM EAGAIN
The descriptor referred to a
.IR stream ,
was marked for System V-style non-blocking I/O,
and no data were ready to be read.
.LP
In addition,
.B readv(\|)
may return one of the following errors:
.TP 20
.SM EINVAL
.I iovcnt
was less than or equal to 0, or greater than 16.
.TP
.SM EINVAL
One of the
.B iov_len
values in the
.I iov
array was negative.
.TP
.SM EINVAL
The sum of the
.B iov_len
values in the
.I iov
array overflowed a 32-bit integer.
.TP
.SM EFAULT
Part of
.I iov
points outside the process's allocated address space.
.LP
A
.B read(\|)
or
.B readv(\|)
from a
.SM STREAMS
file will also fail if an error message is received
at the
.I stream
head.
In this case,
.B errno
is set to the value returned in the
error message.
If a hangup occurs on the
.I stream
being read,
.B read(\|)
will continue to operate normally until the
.B stream head
read queue is empty.  Thereafter, it will return 0.
.SH "SEE ALSO"
.BR dup (2),
.BR fcntl (2V),
.BR getmsg (2),
.BR intro (2),
.BR ioctl (2),
.BR lseek (2),
.BR open (2V),
.BR pipe (2),
.BR select (2),
.BR socket (2),
.BR socketpair (2),
.BR streamio (4)
ed from the
.I addr
argument.
.LP
As indicated, these calls
(except for requests
.BR \s-1PTRACE_TRACEME\s0 ,
.SB PTRACE_ATTACH
and
.B \s-1PTRACE_DETACH\fR\s0)
can be used./share/man/man2/readlink.2                                                                            755       0      12         2726  4424741012  10563                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)readlink.2 1.18 89/03/26 SMI; from UCB 4.2
.TH READLINK 2 "22 November 1987"
.SH NAME
readlink \- read value of a symbolic link
.SH SYNOPSIS
.nf
.ft B
int readlink(path, buf, bufsiz)
char \(**path, \(**buf;
int bufsiz;
.fi
.ft R
.IX  readlink  ""  \fLreadlink\fP
.IX  "file system"  readlink  ""  \fLreadlink\fP
.IX  "symbolic link"  "read value of"
.IX  link  "read value of symbolic"
.SH DESCRIPTION
.LP
.B readlink(\|)
places the contents of the symbolic link referred to by
.I path
in the buffer
.I buf
which has size
.IR bufsiz .
The contents of the link are not null terminated when returned.
.SH RETURN VALUE
.LP
The call returns the count of characters placed in the buffer
if it succeeds, or a \-1 if an error occurs, placing the error
code in the global variable
.BR errno .
.SH ERRORS
.LP
.B readlink(\|)
will fail and the buffer will be unchanged if:
.TP 20
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters, or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The named file does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EINVAL
The named file is not a symbolic link.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EFAULT
.I path
or
.I buf
extends outside the process's allocated address space.
.SH SEE ALSO
.BR stat (2),
.BR symlink (2)
ely before proceeding to the next.
.LP
On ./share/man/man2/readv.2v                                                                              755       0      12           64  4424741012  10212                                                                                                                                                                                                                                                                                                                                                                      .so man2/read.2v
.\" @(#)readv.2v 1.9 89/03/26 SMI;
  9  recv.2 2    9  
recvfrom.2      9  	recvmsg.2      9  rename.2      9  rmdir.2     9  sbrk.2 i    9  select.2 2       9  semctl.2      9  semget.2     $  9  semop.2   4  9  send.2 o  H  9  	sendmsg.2     \  9  sendto.2  H  p  9  	setauid.2 \    9  setdomainname.2     9  setgroups.2     9  
sethostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setprior./share/man/man2/reboot.2                                                                              755       0      12         4640  4424741012  10261                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)reboot.2 1.18 89/03/26 SMI; from UCB 4.2
.TH REBOOT 2 "22 March 1989"
.SH NAME
reboot \- reboot system or halt processor
.SH SYNOPSIS
.nf
.B #include <sys/reboot.h>
.LP
.BR "reboot(howto, " [ " bootargs " ] " )"
.B int howto;
.B char \(**bootargs;
.fi
.IX  reboot  ""  "\fLreboot\fP \(em halt processor"
.IX  "system operation support"  reboot  ""  \fLreboot\fP
.IX  "halt processor"
.IX  "stop processor"
.SH DESCRIPTION
.B reboot(\|)
reboots the system, and is invoked automatically
in the event of unrecoverable system failures.
.I howto
is a mask of options passed to the bootstrap program.
The system call interface permits only
.SB RB_HALT
or
.SB RB_AUTOBOOT
to be passed to the reboot program; the other flags
are used in scripts stored on the console storage media, or used
in manual bootstrap procedures.
When none of these options (for instance
.SM
.BR RB_AUTOBOOT \s0)
is given, the system is rebooted
from file 
.B /vmunix
in the root file system of unit 0
of a disk chosen in a processor specific way.
An automatic consistency check of the disks is then normally performed.
.LP
The bits of
.I howto
are:
.TP 15
.SB RB_HALT
the processor is simply halted; no reboot takes place.
.SB RB_HALT
should be used with caution.
.TP
.SB RB_ASKNAME
Interpreted by the bootstrap program itself, causing it to
inquire as to what file should be booted.  Normally, the system is
booted from the file
.B /vmunix
without asking.
.TP
.SB RB_SINGLE
Normally, the reboot procedure involves an automatic disk consistency
check and then multi-user operations.
.SB RB_SINGLE
prevents the consistency
check, rather simply booting the system with a single-user shell on
the console.
.SB RB_SINGLE
is interpreted by the
.BR init (8)
program in the newly booted system.
.TP
.SB RB_DUMP
A system core dump is performed before rebooting.
.TP
.SB RB_STRING
The optional argument
.I bootargs
is passed to the bootstrap program.
See
.BR boot (8S)
for details.
This option overrides
.SB RB_SINGLE
but the same effect can be achieved by including
.B \-s
as an option in
.IR bootargs .
.LP
Only the super-user may
.B reboot(\|)
a machine.
.SH "RETURN VALUES"
If successful, this call never returns.  Otherwise, a \-1
is returned and an error is returned in the global variable
.BR errno .
.SH ERRORS
.TP 15
.SM EPERM
The caller is not the super-user.
.SH FILES
.PD 0
.TP 20
.B /vmunix
.PD
.SH "SEE ALSO"
.BR crash (8S),
.BR halt (8),
.BR init (8),
.BR intro (8),
.BR reboot (8)
card" mode.
The default is byte-stream mode.
This can be changed using the
.SB I_SRDOPT
.B ioctl./share/man/man2/recv.2                                                                                755       0      12        10344  4424741013   7745                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)recv.2 1.18 89/03/26 SMI; from UCB 4.3
.hw EWOULDBLOCK
.TH RECV 2 "22 March 1989"
.SH NAME
recv, recvfrom, recvmsg \- receive a message from a socket
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
int recv(s, buf, len, flags)
int s;
char \(**buf;
int len, flags;
.LP
.ft B
int recvfrom(s, buf, len, flags, from, fromlen)
int s;
char \(**buf;
int len, flags;
struct sockaddr \(**from;
int \(**fromlen;
.LP
.ft B
int recvmsg(s, msg, flags)
int s;
struct msghdr \(**msg;
int flags;
.ft R
.fi
.IX  recv  ""  "\fLrecv\fP \(em receive message from socket"
.IX  "socket operations"  recv  ""  \fLrecv\fP
.IX  "interprocess communication"  recv  ""  \fLrecv\fP
.IX  recvfrom  ""  \fLrecvfrom\fP
.IX  "socket operations"  recvfrom  ""  \fLrecvfrom\fP
.IX  "interprocess communication"  recvfrom  ""  \fLrecvfrom\fP
.IX  recvmsg  ""  \fLrecvmsg\fP
.IX  "socket operations"  recvmsg  ""  \fLrecvmsg\fP
.IX  "interprocess communication"  recvmsg  ""  \fLrecvmsg\fP
.IX  "receive message from socket"
.IX  message  "receive from socket \(em \fLrecv\fR"
.SH DESCRIPTION
.I s
is a socket created with
.BR socket (2).
.BR recv ,
.BR recvfrom ,
and
.BR recvmsg
are used to receive messages from another socket.
.B recv(\|)
may be used only on a
.I connected
socket (see
.BR connect (2)),
while
.B recvfrom(\|)
and
.B recvmsg(\|)
may be used to receive data on a socket whether
it is in a connected state or not.
.LP
If
.I from
is not a
.SM NULL
pointer, the source address of the message is filled in.
.I fromlen
is a value-result parameter, initialized to the size of
the buffer associated with
.IR from ,
and modified on return to indicate the actual size of the
address stored there.
The length of the message is returned.
If a message is too long to fit in the supplied buffer,
excess bytes may be discarded depending on the type of socket
the message is received from (see
.BR socket (2)).
.LP
If no messages are available at the socket, the
receive call waits for a message to arrive, unless
the socket is nonblocking (see
.BR ioctl (2))
in which case \-1 is returned with the external variable
.B errno
set to
.SM EWOULDBLOCK\s0.
.LP
The
.BR select (2)
call may be used to determine when more data arrives.
.LP
The
.I flags
parameter is formed by
.SM OR\s0ing
one or more of the following:
.TP 15
.SB MSG_OOB
Read any ``out-of-band'' data present on the socket, rather than the
regular ``in-band'' data.
.TP
.SB MSG_PEEK
``Peek'' at the data present on the socket; the data is returned, but
not consumed, so that a subsequent receive operation will see the same data.
.LP
The
.B recvmsg(\|)
call uses a
.B msghdr
structure to minimize the number of directly supplied parameters.
This structure is defined in
.BR /usr/include/sys/socket.h ,
and includes the following members:
.LP
.RS
.nf
.ft B
.ta +\w'struct iovec\0'u +\w'msg_accrightslen;\0'u
caddr_t	msg_name;		/\(** optional address \(**/
int	msg_namelen;		/\(** size of address \(**/
struct iovec	\(**msg_iov;		/\(** scatter/gather array \(**/
int	msg_iovlen;		/\(** # elements in msg_iov \(**/
caddr_t	msg_accrights;		/\(** access rights sent/received \(**/
int	msg_accrightslen;
.ft R
.fi
.DT
.RE
.LP
Here
.B msg_name
and
.B msg_namelen
specify the destination address if the socket is unconnected;
.B msg_name
may be given as a
.SM NULL
pointer if no names are desired or required.
The
.B msg_iov
and
.B msg_iovlen
describe the scatter-gather locations, as described in
.BR read (2V).
A buffer to receive any access rights sent along with the message is specified
in
.BR msg_accrights ,
which has length
.BR msg_accrightslen .
.SH RETURN VALUE
These calls return the number of bytes received, or \-1 if an error occurred.
.SH ERRORS
The calls fail if:
.TP 20
.SM EBADF
.I s
is an invalid descriptor.
.TP
.SM ENOTSOCK
.I s
is a descriptor for a file, not a socket.
.TP
.SM EINTR
The operation was interrupted by delivery of a signal before
any data was available to be received.
.TP
.SM EFAULT
The data was specified to be received into a non-existent
or protected part of the process address space.
.TP
.SM EWOULDBLOCK
The socket is marked non-blocking and the requested operation
would block.
.SH SEE ALSO
.BR connect (2),
.BR fcntl (2V),
.BR getsockopt (2),
.BR ioctl (2),
.BR read (2V),
.BR select (2),
.BR send (2),
.BR socket (2)
 operations"  recvfrom  ""  \fLrecvfrom\fP
.IX  "interprocess communication"  recvfrom  ""  \fLrecvfrom\fP
.IX  recvmsg  ""  \fLrecvmsg\fP
.IX  "socket operations"  recvmsg  ""  \fLrecvmsg\fP
.IX  "interprocess communication"  recvmsg  ""  \fLrecvmsg\fP
.IX  "receive message from soc./share/man/man2/recvfrom.2                                                                            755       0      12           66  4424741013  10551                                                                                                                                                                                                                                                                                                                                                                      .so man2/recv.2
.\" @(#)recvfrom.2 1.9 89/03/26 SMI; 
9  rename.2      9  rmdir.2     9  sbrk.2      9  select.2       9  semctl.2       9  semget.2    $  9  semop.2   4  9  send.2    H  9  	sendmsg.2 H  \  9  sendto.2  \  p  9  	setauid.2 p    9  setdomainname.2     9  setgroups.2     9  
sethostname.2 9    9  setitimer.2     9  
setpgrp.2v     9  
setpriority.2 9  	  9  
setregid.2   	  9  
setreuid.2   	0  9  ./share/man/man2/recvmsg.2                                                                             755       0      12           65  4424741013  10373                                                                                                                                                                                                                                                                                                                                                                      .so man2/recv.2
.\" @(#)recvmsg.2 1.9 89/03/26 SMI; 
 9  rmdir.2     9  sbrk.2 i    9  select.2 2       9  semctl.2      9  semget.2     $  9  semop.2   4  9  send.2 o  H  9  	sendmsg.2     \  9  sendto.2  H  p  9  	setauid.2 \    9  setdomainname.2     9  setgroups.2     9  
sethostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  ./share/man/man2/rename.2                                                                              755       0      12         7660  4424741013  10244                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rename.2 1.19 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RENAME 2 "22 March 1989"
.SH NAME
rename \- change the name of a file
.SH SYNOPSIS
.ft B
.nf
int rename(from, to)
char \(**from, \(**to;
.fi
.ft R
.IX  "rename file"  ""  "rename file \(em \fLrename\fP"
.IX  "file system"  "rename file"  ""  "rename file \(em \fLrename\fP"
.IX  "change" "file name \(em \fLrename\fP"
.IX  "filename, change \(em \fLrename\fP"
.SH DESCRIPTION
.B rename(\|)
renames the link named
.I from
as
.IR to .
If
.I to
exists, then it is first removed.  Both
.I from
and
.I to
must be of the same type (that is, both directories or both
non-directories), and must reside on the same file system.
.LP
.B rename(\|)
guarantees that an instance of
.I to
will always exist, even if the system should crash in
the middle of the operation.
.LP
If the final component of
.I from
is a symbolic link, the symbolic link is renamed,
not the file or directory to which it points.
.SH RETURN VALUE
A 0 value is returned if the operation succeeds, otherwise
.B rename(\|)
returns \-1 and the global variable
.B errno
indicates the reason for the failure.
.SH ERRORS
.B rename(\|)
will fail and neither of the argument files will be
affected if any of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of either
.I from
or
.I to
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of either
.I from
or
.I to
exceeds 255 characters,
or the length of either
.I from
or
.I to
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of either
.I from
or
.I to
does not exist.
.TP
.SM ENOENT
The file named by
.I from
does not exist.
.TP
.SM EACCES
A component of the path prefix of either
.I from
or
.I to
denies search permission.
.TP
.SM EACCES
The requested rename requires writing in a directory with a mode
that denies write permission.  If a rename request relocates a
directory in the hierarchy, write permission in the directory to
be moved is needed, since its entry for the parent directory
.RB ( .\|. )
must be updated.
.TP
.SM ELOOP
Too many symbolic links were encountered while translating either
.I from
or
.IR to .
.TP
.SM EXDEV
The link named by
.I to
and the file named by
.I from
are on different logical devices (file systems).
.TP
.SM ENOSPC
The directory in which the entry for the new name
is being placed cannot be extended because there
is no space left on the file system containing the directory.
.TP
.SM EDQUOT
The directory in which the entry for the new name
is being placed cannot be extended because the user's
quota of disk blocks on the file system containing
the directory has been exhausted.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The requested rename requires writing in a directory on a read-only file
system.
.TP
.SM EFAULT
Either or both of
.I from
or
.I to
point outside the process's allocated address space.
.TP
.SM EINVAL
.I from
is a parent directory of
.IR to ,
or an attempt is made to rename
.RB ` . '
or
.RB ` .\|. '.
.TP
.SM ENOTEMPTY
.I to
is a directory and is not empty.
.TP
.SM EBUSY
.I to
is a directory and is the mount point for a mounted file system.
.SH "SEE ALSO"
.BR open (2V)
.SH WARNING
The system can deadlock if a loop in the file system graph is present.
This loop takes the form of an entry in directory
.BR a ,
say
.BR a/file1 ,
being a hard link to directory
.BR b ,
and an entry in directory
.BR b ,
say
.BR b/file2 ,
being a hard link to directory
.BR a .
When such a loop exists and two separate processes attempt to
perform
.RB ` "rename a/file1 b/file2" '
and
.RB ` "rename b/file2 a/file1" ',
respectively, the system may deadlock attempting to lock
both directories for modification.  Hard links to directories should be
replaced by symbolic links by the system administrator.
ntl.h
in the 4.2\s-1BSD\s0
environment), the read will return \-1 and
.B errno
w./share/man/man2/rmdir.2                                                                               755       0      12         4523  4424741013  10105                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rmdir.2 1.19 89/03/26 SMI; from UCB 4.2
.TH RMDIR 2 "21 November 1987"
.SH NAME
rmdir \- remove a directory file
.SH SYNOPSIS
.nf
.ft B
int rmdir(path)
char \(**path;
.fi
.ft R
.IX  rmdir  ""  "\fLrmdir\fP \(em remove directory"
.IX  "file system"  "remove directory rmdir"  ""  "remove directory \(em \fLrmdir\fP"
.IX  "file system"  "erase directory rmdir"  ""  "erase directory \(em \fLrmdir\fP"
.IX  "file system"  "delete directory rmdir"  ""  "delete directory \(em \fLrmdir\fP"
.IX  directory  "remove rmdir"  ""  "remove \(em \fLrmdir\fP"
.IX  directory  "delete rmdir"  ""  "delete \(em \fLrmdir\fP"
.IX  directory  "erase rmdir"  ""  "erase \(em \fLrmdir\fP"
.IX  remove "directory \(em \fLrmdir\fP"
.IX  delete "directory \(em \fLrmdir\fP"
.IX  erase "directory \(em \fLrmdir\fP"
.SH DESCRIPTION
.B rmdir(\|)
removes a directory file whose name is given by
.IR path .
The directory must not have any entries other than
.RB ` . '
and
.RB ` .\|. '.
.SH RETURN VALUE
A 0 is returned if the remove succeeds; otherwise a \-1 is
returned and an error code is stored in the global location
.BR errno .
.SH ERRORS
The named file is removed unless one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENOTDIR
The file referred to by
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The directory referred to by
.I path
does not exist.
.TP
.SM EINVAL
The directory referred to by
.I path
is the current directory, 
.RB ` . '.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM ENOTEMPTY
The directory referred to by
.I path
contains files other than
.RB ` . '
and
.RB ` .\|. '
in it.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM EACCES
Write permission is denied for the directory containing the link to be removed.
.TP
.SM EBUSY
The directory to be removed is the mount point for a mounted file system.
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The directory to be removed resides on a read-only file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR mkdir (2),
.BR unlink (2)
m"  "erase directory rmdir"  ""  "erase directory \(em \fLrmdir\fP"
.IX  "file system"  "delete directory rmdir"  ""  "delete directory \(em \fLrmdir\fP"
.IX  directory  "re./share/man/man2/sbrk.2                                                                                755       0      12           61  4424741013   7662                                                                                                                                                                                                                                                                                                                                                                      .so man2/brk.2
.\" @(#)sbrk.2 1.9 89/03/26 SMI; 
 9  semctl.2       9  semget.2    $  9  semop.2   4  9  send.2    H  9  	sendmsg.2 H  \  9  sendto.2  \  p  9  	setauid.2 p    9  setdomainname.2     9  setgroups.2     9  
sethostname.2 9    9  setitimer.2     9  
setpgrp.2v     9  
setpriority.2 9  	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  9  	`  9  settimeofday.2   	x  9  setuseraudit./share/man/man2/select.2                                                                              755       0      12        11525  4424741014  10270                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)select.2 1.26 89/03/26 SMI; from UCB 4.2
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SELECT 2 "25 March 1989"
.SH NAME
select \- synchronous I/O multiplexing
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/time.h>
.LP
.ft B
int select (width, readfds, writefds, exceptfds, timeout)
int width;
fd_set *readfds, *writefds, *exceptfds;
struct timeval *timeout;
.LP
.ft B
\s-1FD_SET\s0 (fd, &fdset)	
\s-1FD_CLR\s0 (fd, &fdset)	
\s-1FD_ISSET\s0 (fd, &fdset)	
\s-1FD_ZERO\s0 (&fdset)	
int fd;
fd_set fdset;
.fi
.IX  select  ""  \fLselect\fP
.IX  descriptors  select  ""  \fLselect\fP
.IX  "synchronous I/O multiplexing"
.SH DESCRIPTION
.B select(\|)
examines the I/O descriptor sets whose addresses are passed in
.IR readfds ,
.IR writefds ,
and
.I exceptfds
to see if some of their descriptors
are ready for reading, ready for writing, or have an exceptional
condition pending.
.I width
is the number of bits to be checked in each bit mask that represent a file
descriptor;
the descriptors from 0 through
.IR width \-1
in the descriptor sets are examined.
Typically
.I width
has the value returned by
.BR getdtablesize (2)
for the maximum number of file descriptors.
On return,
.B select(\|)
replaces the given descriptor sets
with subsets consisting of those descriptors that are ready
for the requested operation.
The total number of ready descriptors in all the sets is returned.
.LP
The descriptor sets are stored as bit fields in arrays of integers.
The following macros are provided for manipulating such descriptor sets:
.SB FD_ZERO
.RB ( &\fIfdset\fR )
initializes a descriptor set
.I fdset
to the null set.
.BI \s-1FD_SET\s0( fd,
.BI & fdset
) includes a particular
descriptor
.I fd
in
.IR fdset .
.BI \s-1FD_CLR\fP\s0( fd,
.BI & fdset\c
)
removes
.I fd
from
.IR fdset .
.BI \s-1FD_ISSET\fP\s0( fd,
.BI & fdset\c
) is nonzero
if
.I fd
is a member of
.IR fdset ,
zero otherwise.
The behavior of these macros is undefined if
a descriptor value is less than zero or greater than or equal to
.SB FD_SETSIZE\s0\fR,
which is normally at least equal
to the maximum number of descriptors supported by the system.
.LP
If
.I timeout
is not a
.SM NULL
pointer, it specifies a maximum interval to wait for the
selection to complete.  If
.I timeout
is a
.SM NULL
pointer, the select blocks indefinitely.  To effect a poll, the
.I timeout
argument should be a non-\s-1NULL\s0 pointer, pointing to a zero-valued
.B timeval
structure.
.LP
Any of
.IR readfds ,
.IR writefds ,
and
.I exceptfds
may be given as
.SM NULL
pointers if no descriptors are of interest.
.LP
Selecting true for reading on a socket descriptor upon which a
.B listen (2)
call has been performed indicates that a subsequent
.BR accept (2)
call on that descriptor will not block.
.SH RETURN VALUE
.B select(\|)
returns the number of ready descriptors that are contained in
the descriptor sets,
or \-1 if an error occurred.
If the time limit expires then
.B select(\|)
returns 0.  If
.B select(\|)
returns with an error,
including one due to an interrupted call,
the descriptor sets will be unmodified.
.SH ERRORS
An error return from
.B select(\|)
indicates:
.TP 15
EBADF
One of the descriptor sets specified an invalid descriptor.
.TP 15
EINTR
A signal was delivered before any of the selected
events occurred, or before the time limit expired.
.TP
EINVAL
A component of the pointed-to time limit is outside the
acceptable range:
.B t_sec
must be between 0 and
.if t 10\u\s-38\s0\d,
.if n 10^8,
inclusive.  
.B t_usec
must be greater-than or equal to 0, and less than
.if t 10\u\s-36\s0\d.
.if n 10^6.
.TP
EFAULT
One of the pointers given in the call referred to a non-existent portion
of the process' address space.
.SH SEE ALSO
.BR accept (2),
.BR connect (2),
.BR getdtablesize (2),
.BR gettimeofday (2),
.BR listen (2),
.BR read (2V),
.BR recv (2),
.BR send (2),
.BR write (2V)
.SH BUGS
Although the provision of
.BR getdtablesize (2)
was intended to allow user programs to be written independent
of the kernel limit on the number of open files, the dimension
of a sufficiently large bit field for select remains a problem.
The default size
.SB FD_SETSIZE
(currently 256) is somewhat larger than
the current kernel limit to the number of open files.
However, in order to accommodate programs which might potentially
use a larger number of open files with select, it is possible
to increase this size within a program by providing
a larger definition of
.SB FD_SETSIZE
before the inclusion of
.BR /usr/include/sys/types.h .
.LP
.B select(\|)
should probably return the time remaining from the original timeout,
if any, by modifying the time value in place.
This may be implemented in future versions of the system.
Thus, it is unwise to assume that the timeout pointer will be unmodified
by the
.B select(\|)
call.
 a socket that was connected is
\(lqdisconnected\(rq when the connection is broken; a stream is
\(lqdisconnected\(rq when a hangup condition occurs
(for instance, when car./share/man/man2/semctl.2                                                                              755       0      12         7716  4424741014  10267                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)semctl.2 1.20 89/03/26 SMI; from S5R3
.TH SEMCTL 2 "22 March 1989"
.SH NAME
semctl \- semaphore control operations
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
.LP
.ft B
semctl(semid, semnum, cmd, arg)
int semid, semnum, cmd;
union semun {
	val;
	struct semid_ds \(**buf;
	ushort \(**array;
} arg;
.ft R
.fi
.SH DESCRIPTION
.IX  semctl  "" "\fLsemctl\fR \(em semaphore controls"
.IX  semaphore "control \(em \fLsemctl\fR"
.B semctl(\|)
provides a variety of semaphore control operations as specified by
.IR cmd .
.LP
The following
.IR cmd s
are executed with respect to the semaphore specified by
.IR semid " and " semnum:
.TP 15
.SB GETVAL
Return the value of
.I semval
(see
.BR intro (2)).
.B {\s-1READ\s0}
.TP
.SB SETVAL
Set the value of
.I semval
to
.IR arg.val .
.B {\s-1ALTER\s0}
When this cmd is successfully executed, the
.I semadj
value corresponding to the
specified semaphore in all processes is cleared.
.TP
.SB GETPID
Return the value of
.IR sempid .
.B {\s-1READ\s0}
.TP
.SB GETNCNT
Return the value of
.IR semncnt .
.B {\s-1READ\s0}
.TP
.SB GETZCNT
Return the value of
.IR semzcnt .
.B {\s-1READ\s0}
.LP
The following
.IR cmd s
return and set, respectively, every
.I semval
in the set of semaphores.
.TP 15
.SB GETALL
Place
.I semvals
into the array pointed to by
.IR arg.array .
.B {\s-1READ\s0}
.TP
.SB SETALL
Set
.I semvals
according to the array pointed to by
.IR arg.array .
.B {\s-1ALTER\s0}
When this cmd is successfully executed the
.I semadj
values corresponding to each
specified semaphore in all processes are cleared.
.LP
The following
.IR cmd s
are also available:
.TP 15
.SB 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 .
The contents of this structure are defined in
.BR intro (2).
.B {\s-1READ\s0}
.TP
.SB 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 :
.RS
.IP
.ft B
sem_perm.uid
.br
sem_perm.gid
.br
sem_perm.mode /\(** only low 9 bits \(**/
.ft
.RE
.IP
This
.I cmd
can only be executed by a process that has an effective user
.SM ID
equal to either that of super-user, or to the value of
.B sem_perm.cuid
or
.B sem_perm.uid
in the data structure associated with
.IR semid .
.br
.ne 5
.TP 15
.SB 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 cmd can only be executed by a process that has an effective user
.SM ID
equal to either that of super-user, or to the value of
.B sem_perm.cuid
or
.B sem_perm.uid
in the data structure associated with
.IR semid .
.SH "RETURN VALUE"
.LP
Upon successful completion,
the value returned depends on
.I cmd
as follows:
.TP 15
.SM GETVAL
The value of
.IR semval .
.TP
.SM GETPID
The value of
.IR sempid .
.TP
.SM GETNCNT
The value of
.IR semncnt .
.TP
.SM GETZCNT
The value of
.IR semzcnt .
.TP
All others
A value of 0.
.LP
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B semctl(\|)
will fail if one or more of the following are true:
.TP 15
.SM EINVAL
.I semid
is not a valid semaphore identifier.
.TP
.SM EINVAL
.I semnum
is less than zero or greater than
.BR sem_nsems .
.TP
.SM EINVAL
.I cmd
is not a valid command.
.TP
.SM EACCES
Operation permission is denied to the calling process (see
.BR intro (2)).
.TP
.SM ERANGE
.I cmd
is
.SB SETVAL
or
.SB SETALL
and the value to which
.I semval
is to be set is greater than the system imposed maximum.
.TP
.SM EPERM
.I cmd
is equal to
.SB IPC_RMID
or
.SB IPC_SET
and the effective user
.SM ID
of the calling process is not equal to that of super-user, or
to the value of
.B sem_perm.cuid
or
.B sem_perm.uid
in the data structure associated with
.IR semid .
.TP
.SM EFAULT
.I arg.buf
points to an illegal address.
.SH "SEE ALSO"
.BR intro (2),
.BR semget (2),
.BR semop (2),
.BR ipcrm (1),
.BR ipcs (1)
ssfully executed the
.I semadj
values correspondin./share/man/man2/semget.2                                                                              755       0      12         5442  4424741014  10256                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)semget.2 1.17 89/03/26 SMI; from S5R3
.TH SEMGET 2 "22 March 1989"
.SH NAME
semget \- get set of semaphores
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
.LP
.ft B
int semget(key, nsems, semflg)
key_t key;
int nsems, semflg;
.ft R
.fi
.SH DESCRIPTION
.IX  "semget" "" "\fLsemget\fR \(em get semaphore set"
.IX  semaphore "get set of  \(em \fLsemget\fR"
.B semget(\|)
returns the semaphore identifier associated with
.IR key .
.LP
A semaphore identifier and associated data structure and set containing
.I nsems
semaphores
(see
.BR intro (2))
are created for
.I key
if one of the following are true:
.TP 3
\(bu
.I key
is equal to
.SM
.BR IPC_PRIVATE \s0.
.TP
\(bu
.I key
does not already have a semaphore identifier associated with it, and
.RI ( semflg " & "
.SM
.BR IPC_CREAT \s0)
is ``true''.
.LP
Upon creation, the data structure associated with the new semaphore
identifier is initialized as follows:
.TP 3
\(bu
.BR sem_perm.cuid ", " sem_perm.uid ,
.BR sem_perm.cgid ", and " sem_perm.gid
are set equal to the effective user
.SM ID
and effective group
.SM ID\s0,
respectively, of the calling process.
.TP
\(bu
The low-order 9 bits of
.B sem_perm.mode
are set equal to the low-order 9 bits of
.IR semflg .
.TP
\(bu
.B sem_nsems
is set equal to the value of
.IR nsems .
.TP
\(bu
.B sem_otime
is set equal to 0 and
.B sem_ctime
is set equal to the current time.
.SH "RETURN VALUE"
Upon successful completion,
a non-negative integer,
namely a semaphore identifier, is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B semget(\|)
will fail if one or more of the following are true:
.TP 15
.SM EINVAL
.I nsems
is either less than or equal to zero or greater than the system-imposed limit.
.TP
.SM EACCES
A semaphore identifier exists for
.IR key ,
but operation permission (see
.BR intro (2))
as specified by the low-order 9 bits of
.I semflg
would not be granted.
.TP
.SM EINVAL
A semaphore identifier exists for
.IR key ,
but the number of semaphores in the set associated with it is less than
.IR nsems " and " nsems
is not equal to zero.
.TP
.SM ENOENT
A semaphore identifier does not exist for
.I key
and
.RI ( semflg " &"
.SM
.BR IPC_CREAT \s0)
is ``false''.
.TP
.SM ENOSPC
A semaphore identifier is to be created but
the system-imposed limit on the maximum number of
allowed semaphore identifiers system wide
would be exceeded.
.TP
.SM ENOSPC
A semaphore identifier is to be created but
the system-imposed limit on the maximum number of
allowed semaphores system wide
would be exceeded.
.TP
.SM EEXIST
A semaphore identifier exists for
.I key
but
.RI "( (" semflg " & "
.SM
.BR IPC_CREAT \s0)
and
.RI ( semflg " & "
.SM
.BR IPC_EXCL \s0) )
is ``true''.
.SH SEE ALSO
.BR intro (2),
.BR semctl (2),
.BR semop (2),
.BR ipcrm (1),
.BR ipcs (1)
uent
.BR accept (2)
call on that descriptor will not block.
.SH RETURN VALUE
.B select(\|)
returns the number of ready descriptors that are contained in
the descriptor sets,
or \-1 if an error occurred.
If the time limit e./share/man/man2/semop.2                                                                               755       0      12        13714  4424741014  10136                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)semop.2 1.18 89/03/26 SMI; from S5R3
.TH SEMOP 2 "22 March 1989"
.SH NAME
semop \- semaphore operations
.SH SYNOPSIS
.ft B
#include <sys/types.h>
.br
#include <sys/ipc.h>
.br
#include <sys/sem.h>
.LP
.ft B
.nf
int semop(semid, sops, nsops)
int semid;
struct sembuf *sops;
int nsops;
.ft R
.fi
.SH DESCRIPTION
.IX  semop  ""  "\fLsemop\fR  \(em semaphore operations"
.IX  semaphore "operations \(em \fLsemop\fR"
.B 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.
The contents of each structure includes the following members:
.LP
.RS
.ta 8n 20n
.ft B
.nf
short	sem_num;	/\(** semaphore number \(**/
short	sem_op;	/\(** semaphore operation \(**/
short	sem_flg;	/\(** operation flags \(**/
.fi
.ft R
.RE
.LP
Each semaphore operation specified by
.B sem_op
is performed on the corresponding semaphore specified by
.I semid
and
.BR sem_num .
.LP
.B sem_op
specifies one of three semaphore operations as follows:
.LP
.RS 8
If
.B sem_op
is a negative integer, one of the following will occur:
.B \%{\s-1ALTER\s0}
.TP 3
\(bu
If
.I semval
(see
.BR intro (2))
is greater than or equal to the absolute value of
.BR sem_op ,
the absolute value of
.B sem_op
is subtracted from
.IR semval .
Also, if
.RB ( sem_flg " &"
.SM
.BR SEM_UNDO\*S )
is ``true'', the absolute value of
.B sem_op
is added to the calling process's
.I semadj
value (see
.BR exit (2))
for the specified semaphore.
.TP
\(bu
If
.I semval
is less than the absolute value of
.B sem_op
and
.RB ( sem_flg " &"
.SM
.BR IPC_NOWAIT\*S )
is ``true'',
.B semop(\|)
will return immediately.
.TP
\(bu
If
.I semval
is less than the absolute value of
.B sem_op
and
.RB ( sem_flg " &"
.SM
.BR IPC_NOWAIT\*S )
is ``false'',
.B semop(\|)
will increment the
.I semncnt
associated with the specified semaphore
and suspend execution of the calling process
until one of the following conditions occur.
.RS 12
.LP
.I semval
becomes greater than or equal to the absolute value of
.BR sem_op .
When this occurs, the value of
.I semncnt
associated with the specified
semaphore is decremented, the absolute value of
.I sem_op
is subtracted from
.I semval
and, if
.RB ( sem_flg " &"
.SM
.BR SEM_UNDO\*S )
is ``true'', the absolute value of
.B sem_op
is added to the calling process's
.I semadj
value for the specified semaphore.
.LP
The
.I semid
for which the calling process is awaiting action
is removed from the system (see
.BR semctl (2)).
When this occurs,
.B errno
is set equal to
.SM EIDRM\*S,
and a value of \-1 is returned.
.LP
The calling process receives a signal that is to be caught.
When this occurs, the value of
.I semncnt
associated with the specified
semaphore is decremented,
and the calling process resumes execution in the manner prescribed in
.BR signal (2).
.RE
.LP
If
.B sem_op
is a positive integer, the value of
.B sem_op
is added to
.I semval
and, if
.RB ( sem_flg " &"
.SM
.BR SEM_UNDO\*S )
is ``true'', the value of
.B sem_op
is subtracted from the calling process's
.I semadj
value for the specified
semaphore.
.B \%{\s-1ALTER\s0}
.if t .bp
.LP
If
.B sem_op
is zero,
one of the following will occur:
.B \%{\s-1READ\s0}
.TP 3
\(bu
If
.I semval
is zero,
.B semop(\|)
will return immediately.
.TP
\(bu
If
.I semval
is not equal to zero and
.RB ( sem_flg " &"
.SM
.BR IPC_NOWAIT\*S )
is ``true'',
.B semop(\|)
will return immediately.
.TP
\(bu
If
.I semval
is not equal to zero and
.RB ( sem_flg " &"
.SM
.BR IPC_NOWAIT\*S )
is ``false'',
.B semop(\|)
will increment the
.I semzcnt
associated with the specified semaphore
and suspend execution of the calling process until
one of the following occurs:
.RS 15
.TP 3
\(bu
.I semval
becomes zero, at which time the value of
.I semzcnt
associated with the
specified semaphore is decremented.
.TP 3
\(bu
The
.I semid
for which the calling process is awaiting action
is removed from the system.
When this occurs,
.B errno
is set equal to
.SM EIDRM\*S,
and a value of \-1 is returned.
.TP 3
\(bu
The calling process receives a signal that is to be caught.
When this occurs, the value of
.I semzcnt
associated with the specified semaphore is decremented,
and the calling process resumes execution in the manner prescribed in
.BR signal (2).
.RE
.RE
.LP
Upon successful completion, the value of
.I sempid
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
Upon successful completion,
.B semop(\|)
returns 0.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B semop(\|)
will fail if one or more of the following are true for any of the semaphore
operations specified by
.IR sops :
.TP 15
.SM EINVAL
.I semid
is not a valid semaphore identifier.
.TP 20
.SM EIDRM
The set of semaphores referred to by
.I msqid
was removed from the system.
.TP 20
.SM EFBIG
.B sem_num
is less than zero or greater than or equal to the number of semaphores
in the set associated with
.IR semid .
.TP 20
.SM E2BIG
.I nsops
is greater than the system-imposed maximum.
.TP 20
.SM EACCES
Operation permission is denied to the calling process (see
.BR intro (2)).
.TP 20
.SM EAGAIN
The operation would result in suspension of the calling process but
.RB ( sem_flg " &"
.SM
.BR IPC_NOWAIT\*S )
is ``true''.
.TP 20
.SM ENOSPC
The limit on the number of individual  processes requesting an
.SM
.B SEM_UNDO
would be exceeded.
.TP 20
.SM EINVAL
The number of individual semaphores for which the calling process
requests a
.SM
.B SEM_UNDO
would exceed the limit.
.TP 20
.SM ERANGE
An operation would cause a
.I semval
or
.I semadj
value to overflow the system-imposed limit.
.TP 20
.SM EFAULT
.I sops
points to an illegal address.
.TP 20
.SM EINTR
The call was interrupted by the delivery of a signal.
.SH SEE ALSO
.BR exec (2),
.BR exit (2),
.BR fork (2),
.BR intro (2),
.BR semctl (2),
.BR semget (2),
.BR signal (2),
.BR ipcrm (1),
.BR ipcs (1)
e'', the absolute value of
.B sem_op
is added to the./share/man/man2/send.2                                                                                755       0      12         7651  4424741014   7727                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)send.2 1.19 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SEND 2 "22 March 1989"
.SH NAME
send, sendto, sendmsg \- send a message from a socket
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
int send(s, msg, len, flags)
int s;
char \(**msg;
int len, flags;
.LP
.ft B
int sendto(s, msg, len, flags, to, tolen)
int s;
char \(**msg;
int len, flags;
struct sockaddr \(**to;
int tolen;
.LP
.ft B
int sendmsg(s, msg, flags)
int s;
struct msghdr \(**msg;
int flags;
.fi
.IX  send  "message from socket \(em \fLsend\fR"
.IX  "socket operations"  send  ""  \fLsend\fP
.IX  "interprocess communication"  send  ""  \fLsend\fP
.IX  sendto  ""  "\fLsendto\fP \(em send message to socket"
.IX  "socket operations"  sendto  ""  \fLsendto\fP
.IX  "interprocess communication"  sendto  ""  \fLsendto\fP
.IX  sendmsg  ""  "\fLsendmsg\fP \(em send message over socket"
.IX  "socket operations"  sendmsg  ""  \fLsendmsg\fP
.IX  "interprocess communication"  sendmsg  ""  \fLsendmsg\fP
.IX  message  "send from socket \(em \fLsend\fR"
.SH DESCRIPTION
.LP
.I s
is a socket created with
.BR socket (2).
.BR send(\|) ,
.BR sendto(\|) ,
and
.B sendmsg(\|)
are used to transmit a message to another socket.
.B send(\|)
may be used only when the socket is in a
.I connected
state, while
.B sendto(\|)
and
.B sendmsg(\|)
may be used at any time.
.LP
The address of the target is given by
.I to
with
.I tolen
specifying its size.
The length of the message is given by
.IR len .
If the message is too long to pass atomically through the
underlying protocol, then the error
.SM EMSGSIZE
is returned, and
the message is not transmitted.
.LP
No indication of failure to deliver is implicit in a
.BR send(\|) .
Return values of \-1 indicate some locally detected errors.
.LP
If no buffer space is available at the socket to hold
the message to be transmitted, then
.B send(\|)
normally blocks, unless the socket has been placed in
non-blocking I/O mode.  The
.BR select (2)
call may be used to determine when it is possible to
send more data.
.LP
The
.I flags
parameter is formed by
.SM OR\s0ing
one or more of the following:
.TP 20
.SB MSG_OOB
Send ``out-of-band''
data on sockets that support this notion.  The underlying protocol must also
support ``out-of-band'' data.  Currently, only
.SB SOCK_STREAM
sockets created in the
.SB AF_INET
address family support out-of-band data.
.TP
.SB MSG_DONTROUTE
The
.SB SO_DONTROUTE
option is turned on for the duration of the operation.
This is usually used only by diagnostic or routing programs.
.LP
See
.BR recv (2)
for a description of the
.B msghdr
structure.
.SH RETURN VALUE
.LP
These calls return the number of bytes sent, or \-1 if an error occurred.
.SH ERRORS
.LP
The calls fail if:
.TP 20
.SM EBADF
.I s
is an invalid descriptor.
.TP
.SM ENOTSOCK
.I s
is a descriptor for a file, not a socket.
.TP
.SM EINVAL
.I len
is not the size of a valid address for the specified address family.
.TP
.SM EINTR
The operation was interrupted by delivery of a signal before
any data could be buffered to be sent.
.TP
.SM EFAULT
The data was specified to be sent to a non-existent
or protected part of the process address space.
.TP
.SM EMSGSIZE
The socket requires that message be sent atomically,
and the size of the message to be sent made this impossible.
.TP
.SM EWOULDBLOCK
The socket is marked non-blocking and the requested operation
would block.
.TP
.SM ENOBUFS
The system was unable to allocate an internal buffer.
The operation may succeed when buffers become available.
.TP
.SM ENOBUFS
The output queue for a network interface was full.
This generally indicates that the interface has stopped sending,
but may be caused by transient congestion.
.SH SEE ALSO
.BR connect (2),
.BR fcntl (2V),
.BR getsockopt (2),
.BR recv (2),
.BR select (2),
.BR socket (2),
.BR write (2V)
tion
is removed from the system.
When this occurs,
.B errno
is set equal to
.SM EIDRM\*./share/man/man2/sendmsg.2                                                                             755       0      12           65  4424741014  10366                                                                                                                                                                                                                                                                                                                                                                      .so man2/send.2
.\" @(#)sendmsg.2 1.9 89/03/26 SMI; 
 9  	setauid.2 p    9  setdomainname.2     9  setgroups.2     9  
sethostname.2 9    9  setitimer.2     9  
setpgrp.2v     9  
setpriority.2 9  	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  9  	`  9  settimeofday.2   	x  9  setuseraudit.2   	  9  shmat.2   	  9  shmctl.2  	  	  9  shmdt.2   	  9  shmget.2  	  	  9  shmop.2   	  9  
shutdown./share/man/man2/sendto.2                                                                              755       0      12           64  4424741014  10221                                                                                                                                                                                                                                                                                                                                                                      .so man2/send.2
.\" @(#)sendto.2 1.9 89/03/26 SMI; 
  9  setdomainname.2     9  setgroups.2     9  
sethostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock./share/man/man2/setauid.2                                                                             755       0      12           67  4424741015  10367                                                                                                                                                                                                                                                                                                                                                                      .so man2/getauid.2
.\" @(#)setauid.2 1.4 89/03/26 SMI;
  9  setgroups.2     9  
sethostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause./share/man/man2/setdomainname.2                                                                       755       0      12          103  4424741015  11564                                                                                                                                                                                                                                                                                                                                                                      .so man2/getdomainname.2
.\" @(#)setdomainname.2 1.5 89/03/26 SMI;
hostname.2     9  setitimer.2     9  
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2   	  9  
setreuid.2   	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause.2    
,  9  sigsetma./share/man/man2/setgroups.2                                                                           755       0      12          110  4424741015  10771                                                                                                                                                                                                                                                                                                                                                                      .so man2/getgroups.2
.\" @(#)setgroups.2 1.9 89/03/26 SMI; from UCB 4.2
r.2     9  
setpgrp.2v e    9  
setpriority.2     	  9  
setregid.2 .  	  9  
setreuid.2 d  	0  9  setrlimit.2   	H  9  setsockopt.2 .2   	`  9  settimeofday.2 H  	x  9  setuseraudit.2 `  	  9  shmat.2   	  9  shmctl.2 hma  	  9  shmdt.2   	  9  shmget.2 hmd  	  9  shmop.2   	  9  
shutdown.2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2    
@  9  
sigstack./share/man/man2/sethostname.2                                                                         755       0      12          100  4424741015  11267                                                                                                                                                                                                                                                                                                                                                                      .so man2/gethostname.2
.\" @(#)sethostname.2 1.9 89/03/26 SMI; 
setpgrp.2v      9  
setpriority.2   	  9  
setregid.2    	  9  
setreuid.2 .  	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2 o  
  9  
sigpause.2 n  
,  9  sigsetmask.2  
,  
@  9  
sigstack.2    
T  9  sigvec.2./share/man/man2/setitimer.2                                                                           755       0      12           74  4424741015  10734                                                                                                                                                                                                                                                                                                                                                                      .so man2/getitimer.2
.\" @(#)setitimer.2 1.9 89/03/26 SMI; 
setpriority.2     	  9  
setregid.2 .  	  9  
setreuid.2 d  	0  9  setrlimit.2   	H  9  setsockopt.2 .2   	`  9  settimeofday.2 H  	x  9  setuseraudit.2 `  	  9  shmat.2   	  9  shmctl.2 hma  	  9  shmdt.2   	  9  shmget.2 hmd  	  9  shmop.2   	  9  
shutdown.2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2 n  
@  9  
sigstack.2 2  
T  9  sigvec.2 ack  
h  9  socket.2 c.2./share/man/man2/setpgrp.2v                                                                            755       0      12         5305  4424741015  10643                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setpgrp.2v 1.19 89/03/26 SMI; from UCB 4.2 and S5R2
.TH SETPGRP 2V "22 March 1989"
.SH NAME
setpgrp, getpgrp \- set and/or return the process group of a process
.SH SYNOPSIS
.nf
.ft B
int setpgrp(pid, pgrp)
int pgrp;
int pid;
.ft R
.LP
.ft B
int getpgrp(pid)
int pid;
.ft R
.fi
.SH SYSTEM V SYNOPSIS
.B int setpgrp\|(\|)
.LP
.B int getpgrp\|(\|)
.SH DESCRIPTION
.IX "System V library, system call versions" "\fLsetpgrp\fR"
.IX  setpgrp  ""  \fLsetpgrp\fP
.IX  "processes and protection"  setpgrp  ""  \fLsetpgrp\fP
.IX  "process group"  "set \(em \fLsetpgrp\fR"
.IX "System V library, system call versions" "\fLgetpgrp\fR"
.IX  getpgrp  ""  \fLgetpgrp\fP
.IX  "processes and protection"  getpgrp  ""  \fLgetpgrp\fP
.IX  "process group"  "get \(em \fLgetpgrp\fR"
.SS setpgrp
.B setpgrp(\|)
sets the process group of the specified process,
.RI ( pid )
to the process group specified by
.IR pgrp .
If
.I pid
is zero, then the call applies to the current (calling) process.
.LP
If the effective user
.SM ID
is not that of the super-user, then the
process to be affected must have the same effective user
.SM ID
as that of the caller or be a descendant of that process.
.SS getpgrp
.B getpgrp(\|)
returns the process group of the indicated process.
If
.I pid
is zero, then the call applies to the calling process.
.LP
Process groups are used for distribution of signals, and
by terminals to arbitrate requests for their input.  Processes
that have the same process group as the terminal run in the foreground
and may read from the terminal, while others block with a signal when
they attempt to read.
.LP
This call is thus used by programs such as
.BR csh (1)
to create process groups in implementing job control.
The
.SB TIOCGPGRP
and
.SB TIOCSPGRP
calls described in
.BR termio (4)
are used to get/set the process group of the control terminal.
.SH SYSTEM V DESCRIPTION
.SS setpgrp
.B setpgrp(\|)
sets the process group of the calling process to match its process
.SM
.BR ID \s0,
and returns the new process group
.SM
.BR ID \s0.
.SS getpgrp
.B getpgrp(\|)
returns the process group of the calling process.
.SH "RETURN VALUE
.B setpgrp(\|)
returns 0 when the operation was successful.  If
the request failed, \-1 is returned and the global
variable
.B errno
indicates the reason.
.SH ERRORS
.B setpgrp(\|)
fails, and the process group is not altered when
one of the following occurs:
.TP 15
.SM ESRCH
The requested process does not exist.
.TP
.SM EPERM
The effective user
.SB ID
of the requested process is different
from that of the caller and the process is not a descendent
of the calling process.
.SH "SEE ALSO"
.BR execve (2),
.BR fork (2),
.BR getpid (2),
.BR getuid (2),
.BR intro (2),
.BR kill (2V),
.BR csh (1),
.BR signal (3),
.BR termio (4)
ription of the
.B msghdr
structure.
.SH RETURN VALUE
.LP
These calls return the number of bytes sent, or \-1 if an error occurred.
.SH ERRORS
.LP
The calls fail if:
.TP 20
.SM EBADF
.I s
is an invalid descriptor.
.TP
.SM ENOTSOCK
.I s
is a descriptor for a file, not a socket.
.TP
.SM EINVAL
.I len
is not the size ./share/man/man2/setpriority.2                                                                         755       0      12          100  4424741016  11333                                                                                                                                                                                                                                                                                                                                                                      .so man2/getpriority.2
.\" @(#)setpriority.2 1.9 89/03/26 SMI; 
setreuid.2    	0  9  setrlimit.2   	H  9  setsockopt.2  	H  	`  9  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause.2 o  
,  9  sigsetmask.2  
,  
@  9  
sigstack.2 ,  
T  9  sigvec.2 2 n  
h  9  socket.2 2 2  
  9  socketpair.2  
  
  9  stat.2 2./share/man/man2/setregid.2                                                                            755       0      12         4671  4424741016  10605                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setregid.2 1.23 89/03/26 SMI; from UCB 4.2 and S5R3
.TH SETREGID 2 "22 March 1989"
.SH NAME
setregid \- set real and effective group IDs
.SH SYNOPSIS
.ft B
.nf
int setregid(rgid, egid)
int rgid, egid;
.fi
.ft R
.SH DESCRIPTION
.IX  setregid  ""  \fLsetregid\fP
.IX  "processes and protection"  setregid  ""  \fLsetregid\fP
.IX  "group ID"  "set real and effective"
.IX  "real group ID"  set
.IX  "effective group ID"  set
.B setregid(\|)
is used to set the real and effective group
.SM ID\s0s
of the calling process.  If
.I rgid
is \-1, the real
.SM GID
is not changed; if
.I egid
is \-1, the effective
.SM GID
is not changed.  The real and effective
.SM GID\s0s
may be set to different values in the same call.
.LP
If the effective user
.SM ID
of the calling process is super-user,
the real
.SM GID
and the effective
.SM GID
can be set to any legal value.
.LP
If the effective user
.SM ID
of the calling process is not super-user,
either the real
.SM GID
can be set to the saved set\s-1GID\s0
from
.BR execve (2),
or the effective
.SM GID
can either be set to the saved set\s-1GID\s0
or the real 
.SM GID\s0.
Note: if a set\s-1GID\s0 process sets its effective 
.SM GID
to its real
.SM GID\s0,
it can still set its effective
.SM GID
back to the saved set\s-1GID\s0.
.LP
In either case, if the real
.SM GID
is being changed (that is, if
.I rgid
is not \-1), or the effective
.SM GID
is being changed to a value not equal to the real 
.SM GID\s0,
the saved set\s-1GID\s0
is set equal to the new effective
.SM GID\s0.
.LP
If the real
.SM GID
is changed from its current value, the old value is removed from the groups
access list (see
.BR getgroups (2))
if it is present in that list, and the new value is added to the groups access
list if it is not already present and if this would not cause the number of
groups in that list to exceed
.SM
.BR NGROUPS \s0,
as defined in
.BR /usr/include/sys/param.h .
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B setregid(\|)
will fail and neither of the group
.SM ID\s0s
will be changed if:
.TP 15
.SM EPERM
The calling process' effective
.SM UID
is not the super-user and a change
other than changing the real 
.SM GID
to the saved set\s-1GID\s0,
or changing the effective 
.SM GID
to the real
.SM GID
or the saved
.SM GID\s0,
was specified.
.SH "SEE ALSO"
.BR execve (2),
.BR getgid (2),
.BR setreuid (2),
.BR setuid (3)
(\|)
is used to set the real and effective group
.SM ID\s0s
of the call./share/man/man2/setreuid.2                                                                            755       0      12         4324  4424741016  10616                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setreuid.2 1.17 89/03/26 SMI; from UCB 4.3 and S5R3
.TH SETREUID 2 "22 March 1989"
.SH NAME
setreuid \- set real and effective user IDs
.SH SYNOPSIS
.ft B
.nf
int setreuid(ruid, euid)
int ruid, euid;
.fi
.ft R
.SH DESCRIPTION
.IX  setreuid  ""  \fLsetreuid\fP
.IX  "processes and protection"  setreuid  ""  \fLsetreuid\fP
.IX  "user ID"  "set real and effective \(em \fLsetreuid\fR"
.IX  "real user ID"  "set \(em \fLsetreuid\fR"
.IX  "effective user ID"  "set \(em \fLsetreuid\fR"
.B setreuid(\|)
is used to set the real and effective user
.SM ID\s0s
of the calling process.  If
.I ruid
is \-1, the real user
.SM ID
is not changed; if
.I euid
is \-1, the effective user
.SM ID
is not changed.
The real and effective user
.SM ID\s0s
may be set to different values
in the same call.
.LP
If the effective user
.SM ID
of the calling process is super-user,
the real user
.SM ID
and the effective user
.SM ID
can be set to any legal value.
.LP
If the effective user
.SM ID
of the calling process is not super-user,
either the real user
.SM ID
can be set to the effective user
.SM ID\s0,
or the effective user
.SM ID
can either be set to the saved set-user
.SM ID
from
.BR execve (2)
or the real user
.SM ID\s0.
Note: if a set-\s-1UID\s0
process sets its effective user
.SM ID
to its real user
.SM ID\s0,
it can still set its effective user
.SM ID
back to the saved set-user
.SM ID\s0.
.LP
In either case, if the real user
.SM ID
is being changed (that is, if
.I ruid
is not \-1), or the effective user
.SM ID
is being changed to a value not equal to the real user
.SM ID\s0,
the saved set-user
.SM ID
is set equal to the new effective user
.SM ID\s0.
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned.  Otherwise,
a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B setreuid(\|)
will fail and neither of the user
.SM ID\s0s
will be changed if:
.TP 15
.SM EPERM
The calling process' effective user
.SM ID
is not the super-user and a change
other than changing the real user
.SM ID
to the effective user
.SM ID\s0,
or changing the effective user
.SM ID
to the real user
.SM ID
or the saved set-user
.SM ID\s0,
was specified.
.SH "SEE ALSO"
.BR execve (2),
.BR getuid (2),
.BR setregid (2),
.BR setuid (3)
no
indicates the reason.
.SH ERRORS
.B setpgrp(\|)
fails, and the process group is not altered when
one of the following occurs:
.TP 15
.SM ESRCH
The requested process does not exist.
.TP
.SM EPERM
The effective user
.SB ID
of the requested process is different
from that of the caller and the proces./share/man/man2/setrlimit.2                                                                           755       0      12           74  4424741016  10744                                                                                                                                                                                                                                                                                                                                                                      .so man2/getrlimit.2
.\" @(#)setrlimit.2 1.9 89/03/26 SMI; 
  settimeofday.2 `  	x  9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause.2 o  
,  9  sigsetmask.2  
,  
@  9  
sigstack.2 ,  
T  9  sigvec.2 2 o  
h  9  socket.2 2 2  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2 2  
  9  swapon.2 2 a  
  9  	symlink.2 at  
./share/man/man2/setsockopt.2                                                                          755       0      12           76  4424741016  11130                                                                                                                                                                                                                                                                                                                                                                      .so man2/getsockopt.2
.\" @(#)setsockopt.2 1.9 89/03/26 SMI; 
9  setuseraudit.2 x  	  9  shmat.2   	  9  shmctl.2 .2   	  9  shmdt.2   	  9  shmget.2 .2   	  9  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2    
  9  
sigpause.2    
,  9  sigsetmask.2  
,  
@  9  
sigstack.2 ,  
T  9  sigvec.2 2 ,  
h  9  socket.2 2 o  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2 2  
  9  swapon.2 2 2  
  9  	symlink.2  a  
  9  sync.2 .  
  9./share/man/man2/settimeofday.2                                                                        755       0      12          102  4424741016  11435                                                                                                                                                                                                                                                                                                                                                                      .so man2/gettimeofday.2
.\" @(#)settimeofday.2 1.9 89/03/26 SMI; 
 shmat.2   	  9  shmctl.2 hma  	  9  shmdt.2   	  9  shmget.2 hmd  	  9  shmop.2   	  9  
shutdown.2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2    
@  9  
sigstack.2 2  
T  9  sigvec.2 ack  
h  9  socket.2 c.2  
  9  socketpair.2 2 o  
  9  stat.2 a  
  9  statfs.2 tat  
  9  swapon.2 s.2  
  9  	symlink.2 .2  
  9  sync.2 l  
  9  	syscall.2 nc     9  ./share/man/man2/setuseraudit.2                                                                        755       0      12         2446  4424741017  11517                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setuseraudit.2 1.11 89/03/26 SMI;
.TH SETUSERAUDIT 2 "22 March 1989"
.SH NAME
setuseraudit, setaudit \- set the audit classes for a specified user ID
.SH SYNOPSIS
.nf
.ft B
#include <sys/label.h>
#include <sys/audit.h>
.LP
.ft B
setuseraudit(uid, state)
int uid;
audit_state_t *state;
.LP
.ft B
setaudit(state)
audit_state_t *state;
.fi
.SH DESCRIPTION
.IX "setuseraudit function" "" "\fLsetuseraudit()\fR function"
.IX "setaudit function" "" "\fLsetuseraudit()\fR function"
.LP
The
.B setuseraudit(\|)
system call sets the audit state for all processes whose audit user
.SM ID
matches the specified user
.SM ID\s0.
The parameter
.I state
specifies the audit classes to audit for both successful and unsuccessful
operations.
.LP
The
.B setaudit
system call sets the audit state for the current process.
.LP
Only processes with the real or effective user
.SM ID
of the super-user may
successfully execute these calls.
.SH "RETURN VALUE"
If the call succeeds, a value of 0 is returned.
If an error occurs, the value \-1 is returned.
.SH "ERRORS"
.TP 15
.SM EPERM
The process' real or effective user
.SM ID
is not super-user.
.TP 20
.SM EFAULT
The
.I state
parameter points outside the processes' allocated address space.
.SH "SEE ALSO"
.BR audit (2),
.BR audit_args (3),
.BR audit_control (5),
.BR audit.log (5)
l set its effective user
.SM ID
back to the saved set-user
.SM ID\s0.
.LP
In either case, if the real user
.SM ID
is being changed (that is, if
.I ruid
is not \-1), or the effective user
.SM ID
is being changed to a va./share/man/man2/shmat.2                                                                               755       0      12           63  4424741017  10043                                                                                                                                                                                                                                                                                                                                                                      .so man2/shmop.2
.\" @(#)shmat.2 1.5 89/03/26 SMI;
  shmdt.2   	  9  shmget.2 hmd  	  9  shmop.2   	  9  
shutdown.2 o  
   9  
sigblock.2 n  
  9  
sigpause.2 k  
,  9  sigsetmask.2 2 k  
@  9  
sigstack.2 2  
T  9  sigvec.2 ack  
h  9  socket.2 c.2  
  9  socketpair.2 c.2  
  9  stat.2 a  
  9  statfs.2 tat  
  9  swapon.2 s.2  
  9  	symlink.2 .2  
  9  sync.2 l  
  9  	syscall.2 nc     9  tell.2 c    9  
truncate.2 l  $  9  umask.2   8./share/man/man2/shmctl.2                                                                              755       0      12         6617  4424741017  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shmctl.2 1.17 89/03/26 SMI; from S5R3
.TH SHMCTL 2 "22 March 1989"
.SH NAME
shmctl \- shared memory control operations
.SH SYNOPSIS
.B #include <sys/types.h>
.br
.B #include <sys/ipc.h>
.br
.B #include <sys/shm.h>
.LP
.ft B
.nf
int shmctl (shmid, cmd, buf)
int shmid, cmd;
struct shmid_ds \(**buf;
.fi
.ft R
.SH DESCRIPTION
.IX  shmctl  ""  "\fLshmctl\fR \(em shared memory control"
.IX  "shared memory" "control \(em\fLshmctl\fR"
.B shmctl(\|)
provides a variety of shared memory control operations as specified by
.IR cmd .
The following
.IR cmd s
are available:
.TP 15
.SB 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
.BR intro (2).
.B {\s-1READ\s0}
.TP
.SB 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 :
.RS
.IP
.ft B
shm_perm.uid
.br
shm_perm.gid
.br
shm_perm.mode /\(** only low 9 bits \(**/
.ft R
.IP
This
.I cmd
can only be executed by a process that has an effective user
.SM ID
equal to that of super-user, or to the value of
.B shm_perm.cuid
or
.B shm_perm.uid
in the data structure associated with
.IR shmid .
.TP
.SB IPC_RMID
Remove the shared memory identifier specified by
.I shmid
from the system.  If no processes are currently mapped to the corresponding
shared memory segment, then the segment is removed and the associated resources
are reclaimed.  Otherwise, the segment will persist, although
.BR shmget (2)
will not be able to locate it, until it is no longer mapped by any process.
This
.I cmd
can only be executed by a process that has an effective user
.SM ID
equal to that of super-user, or to the value of
.B shm_perm.cuid
or
.B shm_perm.uid
in the data structure associated with
.IR shmid .
.\".TP
.\".SB SHM_LOCK
.\"Lock the shared memory segment specified by \fIshmid\fP in memory.
.\"This
.\"\fIcmd\fP
.\"can only be executed by a process that has an effective user
.\".SM ID
.\"equal to super-user.
.\".TP
.\".SB SHM_UNLOCK
.\"Unlock the shared memory segment specified by
.\"\fIshmid\fP.
.\"This
.\"\fIcmd\fP
.\"can only be executed by a process that has an effective user
.\".SM ID
.\"equal to super-user.
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned. Otherwise, a
value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B shmctl(\|)
will fail if one or more of the following are true:
.TP 15
.SM EINVAL
.I shmid
is not a valid shared memory identifier.
.TP
.SM EINVAL
.I cmd
is not a valid command.
.TP
.SM EACCES
.I cmd
is equal to
.SB IPC_STAT
and
.B {\s-1READ\s0}
operation permission is denied to the calling process (see
.BR intro (2)).
.TP
.SM EPERM
.I cmd
is equal to
.SB IPC_RMID
or
.SB IPC_SET
and the effective user
.SM ID
of the calling process is not equal to that of super-user, or
to the value of
.B shm_perm.cuid
or
.B shm_perm.uid
in the data structure associated with
.IR shmid .
.\".TP
.\".SM EPERM
.\".I cmd
.\"is equal to
.\".SB SHM_LOCK
.\"or
.\".SB SHM_UNLOCK
.\"and the effective user
.\".SM ID
.\"of the calling process is not equal to that of super-user.
.TP
.SM EFAULT
.I buf
points to an illegal address.
.\".TP
.\".SM ENOMEM
.\".I cmd
.\"is equal to
.\".SB SHM_LOCK
.\"and there is not enough memory.
.SH SEE ALSO
.BR intro (2),
.BR shmget (2),
.BR shmop (2),
.BR ipcrm (1),
.BR ipcs (1)
s impossible.
.TP
.SM EWOULDBLOCK
The socket is marked non-blocking and the requested operation
would block.
.TP
./share/man/man2/shmdt.2                                                                               755       0      12           63  4424741017  10046                                                                                                                                                                                                                                                                                                                                                                      .so man2/shmop.2
.\" @(#)shmdt.2 1.5 89/03/26 SMI;
  shmop.2   	  9  
shutdown.2    
   9  
sigblock.2   
  9  
sigpause.2    
,  9  sigsetmask.2  
,  
@  9  
sigstack.2   
T  9  sigvec.2 2 @  
h  9  socket.2  
T  
  9  socketpair.2  
  
  9  stat.2 2  
  9  statfs.2 2 2  
  9  swapon.2  
  
  9  	symlink.2 
  
  9  sync.2 .  
  9  	syscall.2  2     9  tell.2 .    9  
truncate.2 c  $  9  umask.2   8  9  uname.2v .2   L  9  unlink.2  8./share/man/man2/shmget.2                                                                              755       0      12         5713  4424741017  10265                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shmget.2 1.18 89/03/26 SMI; from S5R3
.TH SHMGET 2 "22 March 1989"
.SH NAME
shmget \- get shared memory segment identifier
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
.ft R
.fi
.LP
.nf
.ft B
int shmget(key, size, shmflg)
key_t key;
int size, shmflg;
.ft R
.fi
.SH DESCRIPTION
.IX  shmget  ""  "\fLshmget\fR \(em get shared memory segment"
.IX  "shared memory" "get segment \(em\fLshmget\fR"
.LP
.B shmget(\|)
returns the shared memory identifier associated with
.IR key .
.LP
A shared memory identifier and associated data structure and shared memory
segment of at least
.I size
bytes (see
.BR intro (2))
are created for
.I key
if one of the following are true:
.TP 3
\(bu
.I key
is equal to
.SM
.BR IPC_PRIVATE \s0.
.TP
\(bu
.I key
does not already have a shared memory identifier associated with it, and
.RI ( shmflg " & "
.SM
.BR IPC_CREAT \s0)
is ``true''.
.LP
Upon creation, the data structure associated with the new shared memory
identifier is initialized as follows:
.TP 3
\(bu
.BR shm_perm.cuid ", " shm_perm.uid ,
.BR shm_perm.cgid ", and " shm_perm.gid
are set equal to the effective user
.SM ID
and effective group
.SM ID\s0,
respectively, of the calling process.
.TP
\(bu
The low-order 9 bits of
.B shm_perm.mode
are set equal to the low-order 9 bits of
.IR shmflg .
.TP
\(bu
.B shm_segsz
is set equal to the value of
.IR size .
.TP
\(bu
.BR shm_lpid ", " shm_nattch ",
.BR shm_atime ", and " shm_dtime "
are set equal to 0.
.TP
\(bu
.B shm_ctime
is set equal to the current time.
.SH "RETURN VALUE"
Upon successful completion,
a non-negative integer,
namely a shared memory identifier, is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B shmget(\|)
will fail if one or more of the following are true:
.TP 15
.SM EINVAL
.I size
is less than the system-imposed minimum
or greater than the system-imposed maximum.
.TP
.SM EACCES
A shared memory identifier exists for
.I key
but operation permission (see
.BR intro (2))
as specified by the low-order 9 bits of
.I shmflg
would not be granted.
.TP
.SM EINVAL
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.
.TP
.SM ENOENT
A shared memory identifier does not exist for
.I key
and
.RI ( shmflg " &"
.SM
.BR IPC_CREAT \s0)
is ``false''.
.TP
.SM ENOSPC
A shared memory identifier is to be created but
the system-imposed limit on the maximum number of
allowed shared memory identifiers system wide
would be exceeded.
.TP
.SM ENOMEM
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.
.TP
.SM EEXIST
A shared memory identifier exists for
.I key
but
.RI "( (" shmflg " & "
.SM
.BR IPC_CREAT\*S ") && ("\c
.IR shmflg " & "
.SM
.BR IPC_EXCL\*S ") )"
is ``true''.
.SH SEE ALSO
.BR intro (2),
.BR shmctl (2),
.BR shmop (2),
.BR ipcrm (1),
.BR ipcs (1)
ture associated with
.IR shmid .
.\".TP
.\".SM EPERM
./share/man/man2/shmop.2                                                                               755       0      12         6543  4424741017  10126                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shmop.2 1.22 89/03/26 SMI; from S5R3
.TH SHMOP 2 "22 March 1989"
.SH NAME
shmop, shmat, shmdt \- shared memory operations
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
.LP
.ft B
char \(**shmat(shmid, shmaddr, shmflg)
int shmid;
char \(**shmaddr;
int shmflg;
.LP
.ft B
int shmdt(shmaddr)
char \(**shmaddr;
.fi
.ft R
.SH DESCRIPTION
.IX  shmop  ""  "\fLshmop\fR \(em get shared memory operations"
.IX  "shared memory" "operation \(em\fLshmop\fR"
.B shmat(\|)
maps the shared memory segment associated with the shared memory identifier
specified by
.I shmid
into the data segment of the calling process.  Upon successful completion,
the address of the mapped segment is returned.
.LP
The shared memory segment is mapped at the address specified
by one of the following criteria:
.TP 3
\(bu
If
.I shmaddr
is equal to zero, the segment is mapped at an address selected by the
system.  Ordinarily, applications should invoke
.B shmat(\|)
with
.I shmaddr
equal to zero so that the operating system may make the best
use of available resources.
.TP
\(bu
If
.I shmaddr
is not equal to zero and
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``true'', the segment is mapped at the address given by
.RI ( shmaddr " -"
.RI ( shmaddr " modulus"
.SM
.BR SHMLBA \s0)).
.TP
\(bu
If
.I shmaddr
is not equal to zero and
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', the segment is mapped at the address given by
.IR shmaddr .
.LP
The segment is mapped for reading if
.RI ( shmflg " &"
.SM
.BR SHM_RDONLY \s0)
is ``true''
.BR \%{\s-1READ\s0} ,
otherwise it is mapped for reading and writing
.BR \%{\s-1READ\s0/\s-1WRITE\s0} .
.LP
.B shmdt(\|)
unmaps from the calling process's address space
the shared memory segment that is mapped at the address specified by
.IR shmaddr .
The shared memory segment must have been mapped with a prior
.B shmat(\|)
function call.  The segment and contents are retained until explicitly
removed by means of the
.SB IPC_RMID
function (see
.BR shmctl (2)).
.SH RETURN VALUES
Upon successful completion, the return values are as follows:
.TP 3
\(bu
.B shmat(\|)
returns the data segment start address of the mapped shared memory segment.
.TP
\(bu
.B shmdt(\|)
returns a value of 0.
.LP
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B shmat(\|)
will fail and not map the shared memory segment if one or more of the
following are true:
.TP 15
.SM EINVAL
.I shmid
is not a valid shared memory identifier.
.TP
.SM EACCES
Operation permission is denied to the calling process (see
.BR intro (2)).
.TP
.SM ENOMEM
The available data space
is not large enough to accommodate the shared memory segment.
.TP
.SM EINVAL
.I shmaddr
is not equal to zero, and the value of
.RI ( shmaddr " -"
.RI ( shmaddr " modulus"
.SM
.BR SHMLBA \s0))
is an illegal address.
.TP
.SM EINVAL
.I shmaddr
is not equal to zero,
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', and the value of
.I shmaddr
is an illegal address.
.TP
.SM EMFILE
The number of shared memory segments mapped to the calling process would
exceed the system-imposed limit.
.LP
.B shmdt(\|)
will fail and not unmap the shared memory segment if:
.TP 15
.SM EINVAL
.I shmaddr
is not the data segment start address of a shared memory segment.
.SH SEE ALSO
.BR execve (2),
.BR exit (2),
.BR fork (2),
.BR intro (2),
.BR shmctl (2),
.BR shmget (2),
.BR ipcrm (1),
.BR ipcs (1)
 greater than the system-imposed maximum.
.TP
.SM EACCES
A shared memory identifier exists for
.I key
but operation permission (see
.BR intro (2))
as specifi./share/man/man2/shutdown.2                                                                            755       0      12         2155  4424741017  10646                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shutdown.2 1.14 89/03/26 SMI; from UCB 4.2
.TH SHUTDOWN 2 "22 March 1989"
.SH NAME
shutdown \- shut down part of a full-duplex connection
.SH SYNOPSIS
.nf
.ft B
shutdown(s, how)
int s, how;
.fi
.IX  shutdown  ""  \fLshutdown\fP
.IX  "socket operations"  shutdown  ""  \fLshutdown\fP
.IX  "interprocess communication"  shutdown  ""  \fLshutdown\fP
.IX  "full-duplex connection, shut down \(em \fLshutdown\fR"
.SH DESCRIPTION
The
.B shutdown(\|)
call causes all or part of a full-duplex connection on
the socket associated with
.I s
to be shut down.  If
.I how
is 0, then further receives will be disallowed.  If
.I how
is 1, then further sends will be disallowed.  If
.I how
is 2, then further sends and receives will be disallowed.
.SH RETURN VALUE
A 0 is returned if the call succeeds, \-1 if it fails.
.SH ERRORS
The call succeeds unless:
.TP 20
.SM EBADF
.I s
is not a valid descriptor.
.TP
.SM ENOTSOCK
.I s
is a file, not a socket.
.TP
.SM ENOTCONN
The specified socket is not connected.
.SH "SEE ALSO"
.BR connect (2),
.BR socket (2),
.BR ipcrm (1),
.BR ipcs (1)
.SH BUGS
The
.I how
values should be defined constants.
modate the shared memory segment.
.TP
.SM EINVAL
.I shmaddr
is not equal to zero, and the value of
.RI ( shmaddr " -"
.RI ( shmaddr " modulus"
.SM
.BR SHMLBA \s0))
is an illegal address.
.TP
.SM EINVAL
.I shmaddr
is not equal to zero,
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', and the value of
.I shmaddr
is an illegal address.
.TP
.SM EMFILE
The number of shared memory segments mapped to th./share/man/man2/sigblock.2                                                                            755       0      12         2245  4424741020  10562                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sigblock.2 1.20 89/03/26 SMI; from UCB 6.3 5/14/86
.TH SIGBLOCK 2 "22 March 1989"
.SH NAME
sigblock, sigmask \- block signals
.SH SYNOPSIS
.B #include <signal.h>
.LP
.nf
.B sigblock(mask);
.B int mask;
.fi
.LP
.B #define sigmask(signum)
.SH DESCRIPTION
.IX  sigblock  ""  \fLsigblock\fP
.IX  signals  sigblock  ""  \fLsigblock\fP
.IX  "block signals"
.LP
.B sigblock(\|)
adds the signals specified in
.I mask
to the set of signals currently being blocked from delivery.  Signals are
blocked if the appropriate bit in
.I mask
is a 1; the macro
.B sigmask(\|)
is provided to construct the mask for a given
.IR signum .
The previous mask is returned, and may be restored using
.BR sigsetmask (2).
.LP
It is not possible to block
.BR \s-1SIGKILL\s0 ,
.BR \s-1SIGSTOP\s0 ,
or
.BR \s-1SIGCONT\s0 ;
this restriction
is silently imposed by the system.
.SH RETURN VALUE
The previous set of masked signals is returned.
.SH SEE ALSO
.BR kill (2V),
.BR sigsetmask (2),
.BR sigvec (2),
.BR signal (3)
ddr
is not equal to zero, and the value of
.RI ( shmaddr " -"
.RI ( shmaddr " modulus"
.SM
.BR SHMLBA \s0))
is an illegal address.
.TP
.SM EINVAL
.I shmaddr
is not equal to zero,
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', and the value of
.I shmaddr
is an illegal address.
.TP
.SM EMFILE
The number of shared memory segments mapped to th./share/man/man2/sigpause.2                                                                            755       0      12         2517  4424741020  10607                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sigpause.2 1.16 89/03/26 SMI; from UCB 6.2 5/15/86
.TH SIGPAUSE 2 "22 March 1989"
.SH NAME
sigpause \- automically release blocked signals and wait for interrupt
.SH SYNOPSIS
.B sigpause(sigmask)
.br
.B int sigmask;
.ft R
.IX  sigpause  ""  \fLsigpause\fP
.IX  signals  sigpause  ""  \fLsigpause\fP
.IX  "release blocked signals \(em \fLsigpause\fR"
.IX  "blocked signals, release \(em \fLsigpause\fR"
.IX  "interrupts, release blocked signals \(em \fLsigpause\fR"
.SH DESCRIPTION
.B sigpause(\|)
assigns
.I sigmask
to the set of masked signals
and then waits for a signal to arrive;
on return the set of masked signals is restored.
.I sigmask
is usually 0 to indicate that no
signals are now to be blocked.
.B sigpause(\|)
always terminates by being interrupted, returning
.SM EINTR\s0.
.LP
In normal usage, a signal is blocked using
.BR sigblock (2),
to begin a critical section, variables modified on the occurrence
of the signal are examined to determine that there is no work
to be done, and the process pauses awaiting work by using
.B sigpause(\|)
with the mask returned by
.IR sigblock .
.SH SEE ALSO
.BR sigblock (2),
.BR sigvec (2),
.BR signal (3)
to zero,
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', and the value of
.I shmaddr
is an illegal address.
.TP
.SM EMFILE
The number of shared memory segments mapped to th./share/man/man2/sigsetmask.2                                                                          755       0      12         2233  4424741020  11134                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sigsetmask.2 1.21 89/03/26 SMI; from UCB 6.3 5/14/86
.TH SIGSETMASK 2 "22 March 1989"
.SH NAME
sigsetmask \- set current signal mask
.SH SYNOPSIS
.B #include <signal.h>
.LP
.nf
.B sigsetmask(mask);
.B int mask;
.fi
.LP
.B #define sigmask(signum)
.IX  sigsetmask  ""  \fLsigsetmask\fP
.IX  signals  sigsetmask  ""  \fLsigsetmask\fP
.IX  set "current signal mask \(em \fLsigsetmask\fP"
.IX  "mask, set current signal \(em \fLsigsetmask\fP"
.SH DESCRIPTION
.LP
.B sigsetmask(\|)
sets the current signal mask (those signals
that are blocked from delivery).  Signals are blocked if the corresponding
bit in
.I mask
is a 1; the macro
.B sigmask(\|)
is provided to construct the mask for a given
.IR signum .
.LP
The system quietly disallows
.BR \s-1SIGKILL\s0 ,
.BR \s-1SIGSTOP\s0 ,
or
.SB SIGCONT
from being blocked.
.SH RETURN VALUE
.LP
The previous set of masked signals is returned.
.SH "SEE ALSO"
.BR kill (2V),
.BR sigblock (2),
.BR sigpause (2),
.BR sigvec (2),
.BR signal (3)
rk
to be done, and the process pauses awaiting work by using
.B sigpause(\|)
with the mask returned by
.IR sigblock .
.SH SEE ALSO
.BR sigblock (2),
.BR sigvec (2),
.BR signal (3)
to zero,
.RI ( shmflg " &"
.SM
.BR SHM_RND \s0)
is ``false'', and the value of
.I shmaddr
is an illegal address.
.TP
.SM EMFILE
The number of shared memory segments mapped to th./share/man/man2/sigstack.2                                                                            755       0      12         5505  4424741020  10577                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sigstack.2 1.17 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SIGSTACK 2 "22 March 1989"
.SH NAME
sigstack \- set and/or get signal stack context
.SH SYNOPSIS
.nf
.ft B
#include <signal.h>
.LP
.ft B
int sigstack (ss, oss)
struct sigstack \(**ss, \(**oss;
.ft R
.fi
.IX  sigstack  ""  "\fLsigstack\fP \(em signal stack context"
.IX  signals  sigstack  ""  "\fLsigstack\fP \(em signal stack context"
.IX  get "signal stack context \(em \fLsigstack\fR"
.IX  set "signal stack context \(em \fLsigstack\fR"
.SH DESCRIPTION
.B sigstack(\|)
allows users to define an alternate stack, called the ``signal stack'',
on which signals are to be processed.  When a signal's action indicates
its handler should execute on the signal stack (specified with a
.BR sigvec (2)
call), the system checks to see
if the process is currently executing on that stack.  If the
process is not currently executing on the signal stack,
the system arranges a switch to the signal stack for the
duration of the signal handler's execution.
.LP
A signal stack is specified by a
.B sigstack(\|)
structure, which includes the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 2.5i
char	*ss_sp;			/* signal stack pointer */
int	ss_onstack;		/* current status */
.ft R
.fi
.DT
.RE
.LP
.B ss_sp
is the initial value to be assigned to the stack pointer
when the system switches the process to the signal stack.
Note that, on machines where the
stack grows downwards in memory, this is
.I not
the address of the beginning of the signal stack area.
.B ss_onstack
field is zero or non-zero depending on whether the process is
currently executing on the signal stack or not.
.LP
If
.I ss
is not a
.SM NULL
pointer,
.B sigstack(\|)
sets the signal stack state to the value in the
.B sigstack(\|)
structure pointed to by
.IR ss .
Note: if
.B ss_onstack
is non-zero, the system will think that the process is
executing on the signal stack.
If
.I ss
is a
.SM NULL
pointer, the signal stack state will be unchanged.  If
.I oss
is not a
.SM NULL
pointer, the current signal stack state is stored in the
.B sigstack(\|)
structure pointed to by
.IR oss .
.SH "RETURN VALUE"
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B sigstack(\|)
will fail and the signal stack context will remain unchanged
if one of the following occurs.
.TP 15
.SM EFAULT
Either
.I ss
or
.I oss
points to memory that is not a valid part of the process
address space.
.SH "SEE ALSO"
.BR sigvec (2),
.BR setjmp (3),
.BR signal (3)
.SH NOTES
Signal stacks are not ``grown'' automatically, as is
done for the normal stack.  If the stack overflows
unpredictable results may occur.
g " & "
.SM
.BR IPC_EXCL\*S ") )"
is ``true''.
.SH SEE ALSO
.BR intro (2),
.BR shmctl (2),
.BR shmop (2),
.BR ipcrm (1),
.BR ipcs (1)
ture associated with
.IR shmid .
.\".TP
.\".SM EPERM
./share/man/man2/sigvec.2                                                                              755       0      12        35741  4424741020  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sigvec.2 1.38 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SIGVEC 2 "26 March 1989"
.ie t .ds d \(dg
.el .ds d \z|+
.ie t .ds b \(bu
.el .ds b @
.SH NAME
sigvec \- software signal facilities
.SH SYNOPSIS
.nf
.ft B
#include <signal.h>
.LP
.ft B
int sigvec(sig, vec, ovec)
int sig;
struct sigvec \(**vec, \(**ovec;
.ft R
.fi
.SH DESCRIPTION
.IX  "sigvec software signals"  ""  "\fLsigvec\fP \(em software signals" ""  PAGE START
.IX  signals  sigvec  ""  \fLsigvec()\fR  PAGE START
.IX  "software signals \(em \fLsigvec()\fR"  "" "" PAGE START
.IX  process  "software signals sigvec"  ""  "software signals \(em \fLsigvec()\fR" PAGE START
The system defines a set of signals that may be delivered to a process.
Signal delivery resembles the occurrence of a hardware interrupt:
the signal is blocked from further occurrence, the current process
context is saved, and a new one is built.  A process may specify a
.I handler
to which a signal is delivered, or specify that a signal is to be
.I blocked
or
.IR ignored .
A process may also specify that a default action is to be taken
by the system when a signal occurs.
Normally, signal handlers execute on the current stack
of the process.  This may be changed, on a per-handler basis,
so that signals are taken on a special
.IR "signal stack" .
.LP
All signals have the same
.IR priority .
Signal routines execute with the signal that caused their invocation
.IR blocked ,
but other signals may yet occur.
A global
.I "signal mask"
defines the set of signals currently blocked from delivery
to a process.  The signal mask for a process is initialized
from that of its parent (normally 0).  It may be changed with a
.BR sigblock (2)
or
.BR sigsetmask (2)
call, or when a signal is delivered to the process.
.LP
A process may also specify a set of
.I flags
for a signal that affect the delivery of that signal.
.LP
When a signal condition arises for a process, the signal is added to a
set of signals pending for the process.  If the signal is not currently
.I blocked
by the process then it is delivered to the process.  When a signal is
delivered, the current state of the process is saved, a new signal mask
is calculated (as described below), and the signal handler is invoked.
The call to the handler is arranged so that if the signal handling
routine returns normally the process will resume execution in the
context from before the signal's delivery.  If the process wishes to
resume in a different context, then it must arrange to restore the
previous context itself.
.LP
When a signal is delivered to a process a new signal mask is installed
for the duration of the process' signal handler (or until a
.B sigblock(\|)
or
.B sigsetmask(\|)
call is made).  This mask is formed by taking the current signal mask,
adding the signal to be delivered, and
.SM OR\s0ing
in the signal mask associated with the handler to be invoked.
.LP
The action to be taken when the signal is delivered is specified by a
.B sigvec(\|)
structure, which includes the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 3.0i
void	(\(**sv_handler)();	/\(** signal handler \(**/
int	sv_mask;	/\(** signal mask to apply \(**/
int	sv_flags;	/\(** see signal options \(**/

#define SV_ONSTACK	0x0001	/\(** take signal on signal stack \(**/
#define SV_INTERRUPT	0x0002	/\(** do not restart system on signal return \(**/
#define SV_RESETHAND	0x0004	/\(** reset signal handler to SIG_DFL when signal taken \(**/
.ft R
.fi
.DT
.RE
.LP
If the
.SB SV_ONSTACK
bit is set in the flags for that signal,
the system will deliver the signal to the process on the signal stack
specified with
.BR sigstack (2),
rather than delivering the signal on the current stack.
.LP
If
.I vec
is not a
.SM NULL
pointer,
.B sigvec(\|)
assigns the handler specified by
.BR sv_handler ,
the mask specified by
.BR sv_mask ,
and the flags specified by
.B sv_flags
to the specified signal.  If
.I vec
is a
.SM NULL
pointer,
.B sigvec(\|)
does not change the handler, mask, or flags for the specified signal.
.LP
The mask specified in
.I vec
is not allowed to block
.SM
.BR SIGKILL \s0,
.SM
.BR SIGSTOP \s0,
or
.SM
.BR SIGCONT \s0.
The system enforces this restriction silently.
.LP
If
.I ovec
is not a
.SM NULL
pointer, the handler, mask, and flags in effect for the signal
before the call to
.B sigvec(\|)
are returned to the user.  A call to
.B sigvec(\|)
with
.I vec
a
.SM NULL
pointer and
.I ovec
not a
.SM NULL
pointer can be used to determine the handling information
currently in effect for a signal without changing that information.
.LP
The following is a list of all signals
with names as in the include file
.BR /usr/include/signal.h :
.RS
.LP
.nf
.ta \w'SIGVTALRM 'u +\w'15*  'u
\fB\s-1SIGHUP\s0\fR	1	hangup
\fB\s-1SIGINT\s0\fR	2	interrupt
\fB\s-1SIGQUIT\s0\fR	3*	quit
\fB\s-1SIGILL\s0\fR	4*	illegal instruction
\fB\s-1SIGTRAP\s0\fR	5*	trace trap
\fB\s-1SIGABRT\s0\fR	6*	abort (generated by \fBabort\fP(3) routine)
\fB\s-1SIGEMT\s0\fR	7*	emulator trap
\fB\s-1SIGFPE\s0\fR	8*	arithmetic exception
\fB\s-1SIGKILL\s0\fR	9	kill (cannot be caught, blocked, or ignored)
\fB\s-1SIGBUS\s0\fR	10*	bus error
\fB\s-1SIGSEGV\s0\fR	11*	segmentation violation
\fB\s-1SIGSYS\s0\fR	12*	bad argument to system call
\fB\s-1SIGPIPE\s0\fR	13	write on a pipe or other socket with no one to read it
\fB\s-1SIGALRM\s0\fR	14	alarm clock
\fB\s-1SIGTERM\s0\fR	15	software termination signal
\fB\s-1SIGURG\s0\fR	16\*b	urgent condition present on socket
\fB\s-1SIGSTOP\s0\fR	17\*d	stop (cannot be caught, blocked, or ignored)
\fB\s-1SIGTSTP\s0\fR	18\*d	stop signal generated from keyboard
\fB\s-1SIGCONT\s0\fR	19\*b	continue after stop (cannot be blocked)
\fB\s-1SIGCHLD\s0\fR	20\*b	child status has changed
\fB\s-1SIGTTIN\s0\fR	21\*d	background read attempted from control terminal
\fB\s-1SIGTTOU\s0\fR	22\*d	background write attempted to control terminal
\fB\s-1SIGIO\s0\fR	23\*b	I/O is possible on a descriptor (see \fBfcntl\fR(2V))
\fB\s-1SIGXCPU\s0\fR	24	cpu time limit exceeded (see \c
.BR setrlimit (2))
\fB\s-1SIGXFSZ\s0\fR	25	file size limit exceeded (see \c
.BR setrlimit (2))
\fB\s-1SIGVTALRM\s0\fR	26	virtual time alarm (see \c
.BR setitimer (2))
\fB\s-1SIGPROF\s0\fR	27	profiling timer alarm (see \c
.BR setitimer (2))
\fB\s-1SIGWINCH\s0\fR	28\*b	window changed (see \fBtermio\fR(4) and \fBwin\fR(4S))
\fB\s-1SIGLOST\s0\fR	29*	resource lost (see \c
.BR lockd (8C))
\fB\s-1SIGUSR1\s0\fR	30	user-defined signal 1
\fB\s-1SIGUSR2\s0\fR	31	user-defined signal 2
.fi
.RE
.LP
The starred signals in the list above cause a core image
if not caught or ignored.
.LP
Once a signal handler is installed, it remains installed until another
.B sigvec(\|)
call is made, or an
.BR execve (2)
is performed, unless the
.SB SV_RESETHAND
bit is set in the flags for that signal.  In that case, the value of the
handler for the caught signal will be set to
.SB SIG_DFL
before entering the signal-catching function, unless the signal is
.SB SIGILL
or
.SM
.BR SIGTRAP \s0.
Also, if this bit is set, the bit for that signal
in the signal mask will not be set; unless the signal mask
associated with that signal blocks that signal, further occurrences
of that signal will not be blocked.
The
.SB SV_RESETHAND
flag is not available in 4.2\s-1BSD\s0,
hence it should not be used if backward compatibility is needed.
.LP
The default action for a signal may be reinstated by setting the
signal's handler to
.SM
.BR SIG_DFL \s0;
this default is termination
except for signals marked with \*b or \*d.  Signals marked
with \*b are discarded if the action is
.SM
.BR SIG_DFL \s0;
signals marked with
\*d cause the process to stop.
If the process is terminated, a ``core image'' will be made in
the current working directory of the receiving
process if the signal
is one for which an asterisk appears in the above list
.I and
the following conditions are met:
.RS
.TP 3
\(bu
The effective user
.SM ID
(\s-1EUID\s0)
and the real user
.SM ID
(\s-1UID\s0)
of the receiving
process are equal.
.TP 3
\(bu
The effective group
.SM ID
(\s-1EGID\s0)
and the real group
.SM ID
(\s-1GID\s0)
of the receiving
process are equal.
.TP 3
\(bu
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
.TP 3
\(bu
a mode of 0666 modified by the file creation mask
(see
.BR umask (2))
.TP
\(bu
a file owner
.SM ID
that is the same as the effective user
.SM ID
of the receiving process.
.TP
\(bu
a file group
.SM ID
that is the same as the file group
.SM ID
of the current directory
.RE
.RE
.LP
If the handler for that signal is
.SM
.BR SIG_IGN \s0,
the signal is subsequently ignored,
and pending instances of the signal are discarded.
.LP
Note: the signals
.SM
.BR SIGKILL \s0,
.SM
.BR SIGSTOP \s0,
and
.SB SIGCONT
cannot be ignored.
.LP
If a caught signal occurs during certain system calls,
the call is normally restarted.
The call can be forced to terminate prematurely with an
.SM EINTR
error return by setting the
.SB SV_INTERRUPT
bit in the flags for that signal.
The
.SB SV_INTERRUPT
flag is not available in 4.2\s-1BSD\s0,
hence it should not be used if backward compatibility is needed.
The affected system calls are
.BR read (2V)
or
.BR write (2V)
on a slow device (such as a terminal or pipe or other socket, but not a file)
and during a
.BR wait (2).
.LP
After a
.BR fork (2)
or
.BR vfork (2)
the child inherits
all signals, the signal mask, the signal stack,
and the restart/interrupt and reset-signal-handler flags.
.LP
The
.BR execve (2)
call resets all
caught signals to default action and
resets all signals to be caught on the user stack.
Ignored signals remain ignored;
the signal mask remains the same;
signals that interrupt system calls continue to do so.
.SH "CODES"
The following defines the codes for signals which produce them.
All of these symbols are defined in
.BR signal.h :
.LP
.if t .ta .25i; +2.75i; +.75i; +1i;
.if n .ta 2m; +35m; +8m; +20m
.nf
	Condition	Signal	Code
Sun codes:
	Illegal instruction	\fB\s-1SIGILL\s0	\s-1ILL_INSTR_FAULT\s0\fR
	Integer division by zero	\fB\s-1SIGFPE\s0	\s-1FPE_INTDIV_TRAP\s0\fR
	\s-1IEEE\s0 floating pt inexact	\fB\s-1SIGFPE\s0	\s-1FPE_FLTINEX_TRAP\s0\fR
	\s-1IEEE\s0 floating pt division by zero	\fB\s-1SIGFPE\s0	\s-1FPE_FLTDIV_TRAP\s0\fR
	\s-1IEEE\s0 floating pt underflow	\fB\s-1SIGFPE\s0	\s-1FPE_FLTUND_TRAP\s0\fR
	\s-1IEEE\s0 floating pt operand error	\fB\s-1SIGFPE\s0	\s-1FPE_FLTOPERR_TRAP\s0\fR
	\s-1IEEE\s0 floating pt overflow	\fB\s-1SIGFPE\s0	\s-1FPE_FLTOVF_FAULT\s0\fR
	Hardware bus error	\fB\s-1SIGBUS\s0	\s-1BUS_HWERR\s0\fR
	Address alignment error	\fB\s-1SIGBUS\s0	\s-1BUS_ALIGN\s0\fR
	No mapping fault	\fB\s-1SIGSEGV\s0	\s-1SEGV_NOMAP\s0\fR
	Protection fault	\fB\s-1SIGSEGV\s0	\s-1SEGV_PROT\s0\fR
	Object error	\fB\s-1SIGSEGV\s0	\s-1SEGV_CODE\s0\fR(code)=\fB\s-1SEGV_OBJERR\s0\fR
	Object error number	\fB\s-1SIGSEGV\s0	\s-1SEGV_ERRNO\s0\fR(code)
\s-1SPARC\s0 codes:
	Privileged instruction violation	\fB\s-1SIGILL\s0	\s-1ILL_PRIVINSTR_FAULT\s0\fR
	Bad stack	\fB\s-1SIGILL\s0	\s-1ILL_STACK\s0\fR
	Trap #\fIn\fP (1 <= \fIn\fP <= 127)	\fB\s-1SIGILL\s0	\s-1ILL_TRAP_FAULT\s0(\fIn\fP)\fR
	Tag overflow	\fB\s-1SIGEMT\s0	\s-1EMT_TAG\s0\fR
\s-1MC\s0680X0 codes:
	Privilege violation	\fB\s-1SIGILL\s0	\s-1ILL_PRIVVIO_FAULT\s0\fR
	Coprocessor protocol error	\fB\s-1SIGILL\s0	\s-1ILL_INSTR_FAULT\s0\fR
	Trap #\fIn\fP (1 <= \fIn\fP <= 14)	\fB\s-1SIGILL\s0	\s-1ILL_TRAP\s0\fIn\fP _\s-1FAULT\s0\fR
	A-line op code	\fB\s-1SIGEMT\s0	\s-1EMT_EMU\s01010\fR
	F-line op code	\fB\s-1SIGEMT\s0	\s-1EMT_EMU\s01111\fR
	\s-1CHK\s0 or \s-1CHK\s02 instruction	\fB\s-1SIGFPE\s0	\s-1FPE_CHKINST_TRAP\s0\fR
	\s-1TRAPV\s0 or \s-1TRAP\s0cc or cp\s-1TRAP\s0cc	\fB\s-1SIGFPE\s0	\s-1FPE_TRAPV_TRAP\s0\fR
	\s-1IEEE\s0 floating pt compare unordered	\fB\s-1SIGFPE\s0	\s-1FPE_FLTBSUN_TRAP\s0\fR
	\s-1IEEE\s0 floating pt signaling NaN	\fB\s-1SIGFPE\s0	\s-1FPE_FLTNAN_TRAP\s0\fR
.fi
.SH "ADDR"
The
.I addr
signal handler parameter is defined as follows:
.LP
.if t .ta .25i; +.75i; +1.25; +1.5i;
.if n .ta 2m; +10m; +12; +20m
.nf
	Signal	Code	Addr
Sun:
	\fB\s-1SIGILL\s0\fR	Any	address of faulted instruction
	\fB\s-1SIGEMT\s0\fR	Any	address of faulted instruction
	\fB\s-1SIGFPE\s0\fR	Any	address of faulted instruction
	\fB\s-1SIGBUS\s0\fR	\fB\s-1BUS_HWERR\s0\fR	address that caused fault
	\fB\s-1SIGSEGV\s0\fR	Any	address that caused fault
\s-1SPARC\s0:
	\fB\s-1SIGBUS\s0\fR	\fB\s-1BUS_ALIGN\s0\fR	address of faulted instruction
\s-1MC\s0680X0:
	\fB\s-1SIGBUS\s0\fR	\fB\s-1BUS_ALIGN\s0\fR	address that caused fault
.fi
.LP
The accuracy of
.I addr
is machine dependent.
For example, certain machines may supply an address that is on the
same page as the address that caused the fault.
If an appropriate
.I addr
cannot be computed it will be set to \fB\s-1SIG_NOADDR\s0\fR.
.SH "RETURN VALUE
.LP
A 0 value indicated that the call succeeded.  A \-1 return value
indicates an error occurred and
.B errno
is set to indicate the reason.
.SH ERRORS
.LP
.B sigvec(\|)
will fail and no new signal handler will be installed if one
of the following occurs:
.TP 15
.SM EFAULT
Either
.I vec
or
.I ovec
is not a
.SM NULL
pointer and points to memory that is not a valid part of
the process address space.
.TP 15
.SM EINVAL
.I Sig
is not a valid signal number.
.TP 15
.SM EINVAL
An attempt was made to ignore or supply a handler for
.SB SIGKILL
or
.SM
.BR SIGSTOP \s0.
.TP 15
.SM EINVAL
An attempt is made to ignore
.SB SIGCONT
(by default
.SB SIGCONT
is ignored).
.IX  "sigvec software signals"  ""  "\fLsigvec\fP \(em software signals" ""  PAGE END
.IX  signals  sigvec  ""  \fLsigvec\fP  PAGE END
.IX  "software signals \(em \fLsigvec()\fR"  "" "" PAGE END
.IX  process  "software signals sigvec"  ""  "software signals \(em \fLsigvec()\fR" PAGE END
.SH "SEE ALSO"
.BR execve (2),
.BR fcntl (2V),
.BR fork (2),
.BR getitimer (2),
.BR getrlimit (2),
.BR ioctl (2),
.BR kill (2V),
.BR ptrace (2),
.BR read (2V),
.BR sigblock (2),
.BR sigpause (2),
.BR sigsetmask (2),
.BR sigstack (2),
.BR umask (2),
.BR vfork (2),
.BR wait (2),
.BR write (2V),
.BR setjmp (3),
.BR signal (3),
.BR streamio (4),
.BR termio (4),
.BR win (4S),
.BR lockd (8C)
.SH NOTES
.SB SIGPOLL
is a synonym for
.SM
.BR SIGIO \s0.
A
.SB SIGIO
will be issued when a file descriptor corresponding
to a
.SM STREAMS
(see
.BR intro (2))
file has a "selectable" event pending.
Unless that descriptor has been put into asynchronous mode
(see
.B fcntl (2V),
a process must specifically request that this signal be sent
using the
.SB I_SETSIG
.BR ioctl (2)
call (see
.BR streamio (4)).
Otherwise, the process will never receive
.SM
.BR SIGPOLL \s0.
.LP
The handler routine can be declared:
.RS
.LP
.nf
.ft B
void handler(sig, code, scp, addr)
int sig, code;
struct sigcontext \(**scp;
char \(**addr;
.ft R
.fi
.RE
.LP
Here
.I sig
is the signal number;
.I code
is a parameter of certain signals that provides additional detail;
.I scp
is a pointer to the
.B sigcontext
structure (defined in
.BR signal.h ),
used to restore the context from before the signal;
and
.I addr
is additional address information.
.LP
Programs that must be portable to
.SM UNIX
systems
other than 4.2\s-1BSD\s0 should use the
.BR signal (3)
interface instead.
ruction of the new image,
showi./share/man/man2/socket.2                                                                              755       0      12        14073  4424741020  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)socket.2 1.25 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SOCKET 2 "22 March 1989"
.SH NAME
socket \- create an endpoint for communication
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
int socket(domain, type, protocol)
int domain, type, protocol;
.fi
.IX  socket  ""  \fLsocket\fP
.IX  "socket operations"  socket  ""  \fLsocket\fP
.IX  "interprocess communication"  socket  ""  \fLsocket\fP
.IX  "create" "interprocess communication endpoint \(em \fLsocket\fR"
.SH DESCRIPTION
.B socket(\|)
creates an endpoint for communication and returns a descriptor.
.LP
The
.I domain
parameter specifies a communications domain within which
communication will take place; this selects the protocol family
which should be used.
The protocol family generally is the same as the address family
for the addresses supplied in later operations on the socket.
These families are defined in the include file
.BR /usr/include/sys/socket.h .
The currently understood formats are
.LP
.RS
.TP 20
.SB PF_UNIX
(\s-1UNIX\s0 system internal protocols),
.TP
.SB PF_INET
(\s-1ARPA\s0 Internet protocols), and
.TP
.SB PF_IMPLINK
(\s-1IMP\s0 \*(lqhost at
.SM IMP\s0\*(rq
link layer).
.RE
.LP
The socket has the indicated
.IR type ,
which specifies the semantics of communication.  Currently
defined types are:
.LP
.RS
.nf
.SB SOCK_STREAM
.SB SOCK_DGRAM
.SB SOCK_RAW
.SB SOCK_SEQPACKET
.SB SOCK_RDM
.fi
.RE
.LP
A
.SB SOCK_STREAM
type provides sequenced, reliable, two-way connection based byte streams.
An out-of-band data transmission mechanism may be supported.  A
.SB SOCK_DGRAM
socket supports
datagrams (connectionless, unreliable messages of
a fixed (typically small) maximum length). A
.SB SOCK_SEQPACKET
socket may provide a sequenced, reliable,
two-way connection-based data transmission path for datagrams
of fixed maximum length; a consumer may be required to read
an entire packet with each read system call.
This facility is protocol specific, and presently not implemented
for any protocol family.
.SB SOCK_RAW
sockets provide access to internal network interfaces.
The types
.SM
.BR SOCK_RAW\s0 ,
which is available only to the super-user, and
.SM
.BR SOCK_RDM\s0 ,
for which no implementation currently exists,
are not described here.
.LP
The
.I protocol
specifies a particular protocol to be used with the socket.
Normally only a single protocol exists to support a particular
socket type within a given protocol family.  However, it is possible
that many protocols may exist, in which case a particular protocol
must be specified in this manner.  The protocol number to use is
particular to the \*(lqcommunication domain\*(rq in which communication
is to take place; see
.BR protocols (5).
.LP
Sockets of type
.SB SOCK_STREAM
are full-duplex byte streams, similar to pipes.
A stream socket must be in a
.I connected
state before any data may be sent or received
on it.  A connection to another socket is created with a
.BR connect (2)
call.  Once connected, data may be transferred using
.BR read (2V)
and
.BR write (2V)
calls or some variant of the
.BR send (2)
and
.BR recv (2)
calls.  When a session has been completed a
.BR close (2)
may be performed.
Out-of-band data may also be transmitted as described in
.BR send (2)
and received as described in
.BR recv (2).
.LP
The communications protocols used to implement a
.SB SOCK_STREAM
insure that data
is not lost or duplicated.  If a piece of data for which the
peer protocol has buffer space cannot be successfully transmitted
within a reasonable length of time, then
the connection is considered broken and calls
will indicate an error with
\-1 returns and with
.SM ETIMEDOUT
as the specific code
in the global variable
.BR errno .
The protocols optionally keep sockets \*(lqwarm\*(rq by
forcing transmissions
roughly every minute in the absence of other activity.
An error is then indicated if no response can be
elicited on an otherwise
idle connection for a extended period (for
instance 5 minutes).  A
.SB SIGPIPE
signal is raised if a process sends
on a broken stream; this causes naive processes,
which do not handle the signal, to exit.
.LP
.SB SOCK_SEQPACKET
sockets employ the same system calls as
.SB SOCK_STREAM
sockets.  The only difference is that 
.BR read (2V)
calls will return only the amount of data requested,
and any remaining in the arriving packet will be discarded.
.LP
.SB SOCK_DGRAM
and
.SB SOCK_RAW
sockets allow sending of datagrams to correspondents
named in
.BR send (2)
calls.  Datagrams are generally received with
.BR recv (2),
which returns the next datagram with its return address.
.LP
An
.BR fcntl (2V)
call can be used to specify a process group to receive a
.SB SIGURG
signal when the out-of-band data arrives.
It may also enable non-blocking I/O
and asynchronous notification of I/O events with
.SB SIGIO
signals.
.LP
The operation of sockets is controlled by socket level
.IR options .
These options are defined in the file
.BR socket.h .
.BR getsockopt (2)
and
.BR getsockopt (2)
are used to set and get options, respectively.
.SH "RETURN VALUE
A \-1 is returned if an error occurs, otherwise the return
value is a descriptor referencing the socket.
.SH "ERRORS
The
.B socket(\|)
call fails if:
.TP 20
.SM EPROTONOSUPPORT
The protocol type or the specified protocol is not supported
within this domain.
.TP
.SM EMFILE
The per-process descriptor table is full.
.TP
.SM ENFILE
The system file table is full.
.TP
.SM EACCES
Permission to create a socket of the specified type and/or protocol
is denied.
.TP
.SM ENOBUFS
Insufficient buffer space is available.
The socket cannot be created until sufficient resources are freed.
.TP
.SM EPROTOTYPE
The protocol is the wrong type for the socket.
.SH SEE ALSO
.BR accept (2),
.BR bind (2),
.BR close (2),
.BR connect (2),
.BR fcntl (2V),
.BR getsockname (2),
.BR getsockopt (2),
.BR ioctl (2),
.BR listen (2),
.BR read (2V),
.BR recv (2),
.BR select (2),
.BR send (2),
.BR shutdown (2),
.BR socketpair (2),
.BR write (2V),
.BR protocols (5)
.LP
.TX NETP
-1FPE_TRAPV_TRAP\s0\fR
	\s-1IEEE\s0 floating pt compare unordered	\fB\s-1SIGFPE\s0	\s-1FPE_FLTBSUN_TRAP\s0\fR
	\s-1IEEE\s0 floating pt signaling NaN	\fB\s-1SIGFPE\s0	\s-1FPE_FLTNAN_TRAP\s0\fR
.fi
.SH "ADDR"
The
.I addr
signal handler parameter is defined as follows:
.LP
.if t .ta .25i; +.75i; +1.25; +1.5i;
.if n .ta 2m; +10m; +12; +20m
.nf
	Signal	Code	Addr
Sun:
	\fB\s-1SIGILL\s0\fR	Any	address of faulted instruction
	\fB\s-1SIGEMT\s0\fR	Any	address./share/man/man2/socketpair.2                                                                          755       0      12         3145  4424741021  11132                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)socketpair.2 1.17 89/03/26 SMI; from UCB 7 Jul 1983
.TH SOCKETPAIR 2 "22 March 1989"
.SH NAME
socketpair \- create a pair of connected sockets
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
.LP
.ft B
socketpair(d, type, protocol, sv)
int d, type, protocol;
int sv[2];
.fi
.IX  socketpair  ""  "\fLsocketpair\fP create connected socket pair"
.IX  "socket operations"  socketpair  ""  \fLsocketpair\fP
.IX  "interprocess communication"  socketpair  ""  \fLsocketpair\fP
.IX  "create" "pair of connected sockets \(em \fLsocketpair\fR"
.SH DESCRIPTION
The
.B socketpair(\|)
system call
creates an unnamed pair of connected sockets in
the specified address family
.IR d ,
of the specified
.I type
and using the optionally specified
.IR protocol .
The descriptors used in referencing the new sockets
are returned in
.IR sv [0]
and
.IR sv [1].
The two sockets are indistinguishable.
.SH "RETURN VALUE"
.B socketpair(\|)
returns a \-1 on failure, otherwise it returns the number of the
second file descriptor it creates.
.SH ERRORS
The call succeeds unless:
.TP 20
.SM EMFILE
Too many descriptors are in use by this process.
.TP
.SM EAFNOSUPPORT
The specified address family is not supported on this machine.
.TP
.SM EPROTONOSUPPORT
The specified protocol is not supported on this machine.
.TP
.SM EOPNOSUPPORT
The specified protocol does not support creation of socket pairs.
.TP
.SM EFAULT
The address
.I sv
does not specify a valid part of the
process address space.
.SH "SEE ALSO"
.BR pipe (2),
.BR read (2V),
.BR write (2V)
.SH BUGS
This call is currently implemented only for the
.SB AF_UNIX
address family.
and presently not implemented
for any protocol family.
.SB SOCK_RAW
sockets provide access to internal network interfaces.
The types
.SM
.BR SOCK_RAW\s0 ,
which is available only to the super-user, and
.SM
.BR SOCK_RDM\s0 ,
for which no implementation currently exists,
are not described here.
.LP
The
.I protocol
specifies a particular protocol to be used with the socket.
Normally only a single protocol exist./share/man/man2/stat.2                                                                                755       0      12        13332  4424741021   7760                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stat.2 1.23 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH STAT 2 "25 March 1989"
.SH NAME
stat, lstat, fstat \- get file status
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/stat.h>
.LP
.ft B
int stat(path, buf)
char \(**path;
struct stat \(**buf;
.LP
.ft B
int lstat(path, buf)
char \(**path;
struct stat \(**buf;
.LP
.ft B
int fstat(fd, buf)
int fd;
struct stat \(**buf;
.fi
.ft R
.SH DESCRIPTION
.IX  "stat"  ""  "\fLstat\fP \(em obtain file attributes"
.IX  "file attributes"  \fLstat\fP
.IX  "attributes of file stat"  ""  "attributes of file \fLstat\fP"
.LP
.B stat(\|)
obtains information about the file named by
.IR path .
Read, write or execute permission of the named file is not required,
but all directories listed in the path name leading to the file must be searchable.
.LP
.IX  "lstat"  ""  "\fLlstat\fP \(em obtain file attributes"
.IX  "file attributes"  \fLlstat\fP
.IX  "attributes of file lstat"  ""  "attributes of file \fLlstat\fP"
.B lstat(\|)
is like
.B stat(\|)
except in the case where the named file is a
symbolic link, in which case
.B lstat(\|)
returns information about the link, while
.B stat(\|)
returns information about the file the link references.
.LP
.IX  "fstat"  ""  "\fLfstat\fP \(em obtain file attributes"
.IX  "file attributes"  \fLfstat\fP
.IX  "attributes of file fstat"  ""  "attributes of file \fLfstat\fP"
.BR fstat (\|)
obtains the same information about an open file referenced by the
argument descriptor, such as would be obtained by an
.BR open (2V)
call.
.LP
.I buf
is a pointer to a
.B stat(\|)
structure into which information is placed concerning the file.
A
.B stat(\|)
structure includes the following members:
.LP
.RS
.nf
.ft B
.ta 1i 1.7i 2.5i
dev_t	st_dev;	/* device file resides on */
ino_t	st_ino;	/* this file's number */
u_short	st_mode;	/* protection */
short	st_nlink;	/* number of hard links to the file */
short	st_uid;	/* user \s-1ID\s0 of owner */
short	st_gid;	/* group \s-1ID\s0 of owner */
dev_t	st_rdev;	/* the device identifier (special files only)*/
off_t	st_size;	/* total size of file, in bytes */
time_t	st_atime;	/* file data last access time */
time_t	st_mtime;	/* file data last modify time */
time_t	st_ctime;	/* file data last status change time */
long	st_blksize;	/* preferred blocksize for file system I/O*/
long	st_blocks;	/* actual number of blocks allocated */
.ft R
.fi
.DT
.RE
.LP
.TP 12
.B st_atime
Time when file data was last accessed.
This can also be set explicitly by
.BR utimes (2).
For reasons of efficiency,
.B st_atime
is not set when a directory
is searched, although this would be more logical.
.TP
.B st_mtime
Time when file data was last modified.
This can also be set explicitly by
.BR utimes (2).
It is not set by changes of owner,
group, link count, or mode.
.TP 12
.B st_ctime
Time when file status was last changed. 
It is set both both by writing
and changing the file status information, such as
changes of owner, group, link count, or mode.
.LP
The status information word
.B st_mode
has bits:
.RS
.nf
.ta 1i 2.6i 3.5i 4i
.ft B
#define\ \ \ \ \s-1S_IFMT\s0	0170000	/* type of file */
#define\ \ \ \ \s-1S_IFIFO\s0	0010000	/* \s-1FIFO\s0 special */
#define\ \ \ \ \s-1S_IFCHR\s0	0020000	/* character special */
#define\ \ \ \ \s-1S_IFDIR\s0	0040000	/* directory */
#define\ \ \ \ \s-1S_IFBLK\s0	0060000	/* block special */
#define\ \ \ \ \s-1S_IFREG\s0	0100000	/* regular file */
#define\ \ \ \ \s-1S_IFLNK\s0	0120000	/* symbolic link */
#define\ \ \ \ \s-1S_IFSOCK\s0	0140000	/* socket */
.\"#define\ \ \ \ \s-1S_ISUID\s0	0004000	/* set user \s-1ID\s0 on execution */
.\"#define\ \ \ \ \s-1S_ISGID\s0	0002000	/* set group \s-1ID\s0 on execution */
.\"#define\ \ \ \ \s-1S_ISVTX\s0	0001000	/* save swapped text even after use */
.\"#define\ \ \ \ \s-1S_IREAD\s0	0000400	/* read permission, owner */
.\"#define\ \ \ \ \s-1S_IWRITE\s0	0000200	/* write permission, owner */
.\"#define\ \ \ \ \s-1S_IEXEC\s0	0000100	/* execute/search permission, owner */
.ft R
.fi
.in -5n
.RE
.LP
For more infomation on
.B st_mode
bits see
.BR chmod (2).
.LP
The mode bits 0000070 and 0000007 encode group and others permissions (see
.BR chmod (2)).
.SH RETURN VALUE
.LP
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.LP
.B stat(\|)
and
.B lstat(\|)
will fail if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EFAULT
.I buf
or
.I path
points to an invalid address.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.LP
.B fstat(\|)
will fail if one or more of the following are true:
.TP 20
.SM EBADF
.I fd
is not a valid open file descriptor.
.TP
.SM EFAULT
.I buf
points to an invalid address.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH WARNINGS
.LP
The
.B st_atime
and
.B st_mtime
fields of the
.B stat(\|)
are
.I not
contiguous.
Programs that depend on them being contiguous (in calls to
.BR utimes (2)
or
.BR utime (3C))
will not work.
.SH "SEE ALSO"
.BR chmod (2),
.BR chown (2),
.BR link (2),
.BR open (2V),
.BR read (2V),
.BR readlink (2),
.BR rename (2),
.BR truncate (2),
.BR unlink (2),
.BR utimes (2),
.BR write (2V)
encing the socket.
.SH "ERRORS
The
.B socket(\|)
call fails if:
.TP 20
.SM EPROTONOSUPPORT
The protocol type or the specified protocol is not supported
within this domain.
.TP
.SM EMFILE
The per-process descriptor table is full.
.TP
.SM ENFILE
The system file table is full.
.TP
.SM EACCES
Perm./share/man/man2/statfs.2                                                                              755       0      12         5634  4424741021  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)statfs.2 1.23 89/03/26 SMI
.TH STATFS 2 "22 March 1989"
.SH NAME
statfs, fstatfs \- get file system statistics
.SH SYNOPSIS
.nf
.ft B
#include <sys/vfs.h>
.LP
.nf
.ft B
int statfs(path, buf)
char \(**path;
struct statfs *buf;
.LP
.nf
.ft B
int fstatfs(fd, buf)
int fd;
struct statfs \(**buf;
.fi
.ft R
.SH DESCRIPTION
.IX  "statfs"  ""  "\fLstatfs\fP \(em obtain file system statistics"
.IX  "file system" "statistics \(em \fLstatfs\fP"
.IX  statistics "of file system \(em \fLstatfs\fP"
.LP
.B statfs(\|)
returns information about a mounted file system.
.I path
is the path name of any file within the mounted filesystem.
.I buf
is a pointer to a
.B statfs(\|)
structure defined as follows:
.RS
.ta \w'#define'u +\w'fsid_t\0\0'u +\w'f_spare[7]\0\0'u
.sp .5
.nf
.ft B
typedef struct {
	long	val[2];
} fsid_t;
.sp.5
struct statfs {
	long	f_type; 	/* type of info, zero for now */
	long	f_bsize;	/* fundamental file system block size */
	long	f_blocks;	/* total blocks in file system */
	long	f_bfree;	/* free blocks */
	long	f_bavail;	/* free blocks available to non-super-user */
	long	f_files;	/* total file nodes in file system */
	long	f_ffree;	/* free file nodes in fs */
	fsid_t	f_fsid; 	/* file system id */
	long	f_spare[7];	/* spare for later */
};
.ft R
.fi
.RE
.LP
Fields that are undefined for a particular file system are set to \-1.
.B fstatfs(\|)
returns the same information about an open file referenced by descriptor
.IR fd .
.IX  "fstatfs"  ""  "\fLfstatfs\fP \(em obtain file system statistics"
.IX  "file system" "statistics \(em \fLfstatfs\fP"
.IX  statistics "of file system \(em \fLfstatfs\fP"
.SH RETURN VALUE
.LP
Upon successful completion, a value of 0 is returned.
Otherwise, \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.LP
.B statfs(\|)
fails if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EFAULT
.I buf
or
.I path
points to an invalid address.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.LP
.B fstatfs(\|)
fails if one or both of the following are true:
.TP 20
.SM EBADF
.I fd
is not a valid open file descriptor.
.br
.ne 3
.TP 20
.SM EFAULT
.I buf
points to an invalid address.
.TP
.SM EIO
An I/O error occurred while reading from the file system.
.SH BUGS
.LP
The
.SM NFS
revision 2 protocol does not permit the number of free files to be provided to
the client; thus, when
.B statfs(\|)
or
.B fstatfs(\|)
are done on a file on an
.SM NFS
file system,
.B f_files
and
.B f_ffree
are always \-1.
ission, owner */
.\"#define\ \ \ \ \s-1S_IWRITE\s0	0000200	/* write permission, owner */
.\"#define\./share/man/man2/swapon.2                                                                              755       0      12         5050  4424741021  10272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)swapon.2 1.16 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SWAPON 2 "22 March 1989"
.SH NAME
swapon \- add a swap device for interleaved paging/swapping
.SH SYNOPSIS
.nf
.B int swapon(special)
.B char \(**special;
.fi
.SH DESCRIPTION
.IX  "system operation support"  swapon  ""  "\fLswapon\fP \(em specify paging device"
.IX  swapon  ""  "\fLswapon\fP \(em specify paging device"
.IX  "paging device"  ""  "paging device \(em \fLswapon\fP"
.IX  "swapping device"  ""  "swapping device \(em \fLswapon\fP"
.IX  "specify paging/swapping device"  ""  "specify paging/swapping device \(em \fLswapon\fP"
.B swapon(\|)
makes the block device
.I special
available to the system for
allocation for paging and swapping.  The names of potentially
available devices are known to the system and defined at system
configuration time.  The size of the swap area on
.I special
is calculated at the time the device is first made available for swapping.
.SH "RETURN VALUE
If an error has occurred, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I special
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I special
exceeds 255 characters,
or the length of
.I special
exceeds 1023 characters.
.TP
.SM ENOENT
The device referred to by
.I special
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR special .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR special .
.TP
.SM EPERM
The caller is not the super-user.
.TP
.SM ENOTBLK
The file referred to by
.I special
is not a block device.
.TP
.SM EBUSY
The device referred to by
.I special
has already been made available for swapping.
.TP
.SM ENODEV
The device referred to by
.I special
was not configured into the system as a swap device.
.TP
.SM ENXIO
The major device number of the device referred to by
.I special
is out of range (this indicates no device driver exists
for the associated hardware).
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system
or opening the swap device.
.TP
.SM EFAULT
.I special
points outside the process's address space.
.SH "SEE ALSO"
.BR fstab (5),
.BR config (8),
.BR swapon (8)
.SH BUGS
There is no way to stop swapping on a disk so that the pack may be dismounted.
.LP
This call will be upgraded in future versions of the system.
  statistics "of file system \(em \fLfstatfs\fP"
.SH RETURN VALUE
.LP
Upon successful completion, a value of 0 is returned.
Otherwise, \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.LP
.B statfs(\|)
fails if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
../share/man/man2/symlink.2                                                                             755       0      12         6114  4424741021  10453                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)symlink.2 1.22 89/03/26 SMI; from UCB 4.2
.TH SYMLINK 2 "22 March 1989"
.SH NAME
symlink \- make symbolic link to a file
.SH SYNOPSIS
.nf
.ft B
int symlink(name1, name2)
char \(**name1, \(**name2;
.fi
.ft R
.IX  symlink  ""  \fLsymlink\fP
.IX  "file system"  symlink  ""  \fLsymlink\fP
.IX  "create" "symbolic link \(em \fLsymlink\fR"
.IX  "symbolic link"  create
.IX  link  "make symbolic"
.SH DESCRIPTION
A symbolic link
.I name2
is created to
.I name1
.RI ( name2
is the name of the file created,
.I name1
is the string
used in creating the symbolic link).
Either name may be an arbitrary path name; the files need not
be on the same file system.
.LP
The file that the symbolic link points to is
used when an
.BR open (2V)
operation is performed on the link.  A
.BR stat (2)
on a symbolic link returns the linked-to file, while an
.B lstat(\|)
(refer to
.BR stat (2))
returns information about the link itself.  This can lead to
surprising
results when a symbolic link is made to a directory.
To avoid confusion in programs, the
.BR readlink (2)
call can be used to read the contents of a symbolic link.
.SH RETURN VALUE
Upon successful completion, a zero value is returned.
If an error occurs, the error code is stored in
.B errno
and a \-1 value is returned.
.SH ERRORS
The symbolic link is made unless one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I name2
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of either
.I name1
or
.I name2
exceeds 255 characters,
or the length of either
.I name1
or
.I name2
exceeds 1023 characters.
.TP
.SM ENOENT
A component of the path prefix of
.I name2
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR name2 .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR name2 .
.TP
.SM EEXIST
The file referred to by
.I name2
already exists.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The file
.I name2
would reside on a read-only file system.
.TP
.SM ENOSPC
The directory in which the entry for the new symbolic link is being placed
cannot be extended because there is no space left on the file system
containing the directory.
.TP
.SM ENOSPC
The new symbolic link cannot be created because there
is no space left on the file system which will contain the link.
.TP
.SM ENOSPC
There are no free inodes on the file system on which the file is being created.
.TP
.SM EDQUOT
The directory in which the entry for the new symbolic
link is being placed cannot be extended because the
user's quota of disk blocks on the file system
containing the directory has been exhausted.
.TP
.SM EDQUOT
The new symbolic link cannot be created because the
user's quota of disk blocks on the file system which
will contain the link has been exhausted.
.TP
.SM EDQUOT
The user's quota of inodes on the file system on
which the file is being created has been exhausted.
.TP
.SM EFAULT
.I name1
or
.I name2
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR link (2),
.BR readlink (2),
.BR unlink (2),
.BR ln (1)
fi
.in -5n
.RE
.LP
For more infomation on
.B st_mode
bits see
.BR chmod (2).
.LP
The mode bits 0000070 and 0000007 encode group and others permissions (see
.BR chmod (2)).
.SH RETURN VALUE
.LP
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.LP
.B stat(\|)
and
.B lstat(\|)
will fail if one or more of the following are true:
.TP 20
.SM EN./share/man/man2/sync.2                                                                                755       0      12         1755  4424741021   7747                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sync.2 1.15 89/03/26 SMI; from UCB 6.2 6/30/85
.TH SYNC 2 "27 January 1988"
.SH NAME
sync \- update super-block
.SH SYNOPSIS
.B sync()
.IX  sync  ""  "\fLsync\fP \(em update super block"
.IX  "system operation support"  sync  ""  \fLsync\fP
.IX  "super block, update \(em \fLsync\fR"
.IX  "update super block \(em \fLsync\fR"
.SH DESCRIPTION
.LP
.B sync(\|)
writes out all information in core
memory that should be on disk.
This includes modified super blocks,
modified inodes, and delayed block I/O.
.LP
.B sync(\|)
should be used by programs that examine a file system,
for example
.BR fsck (8),
.BR df (1),
etc.
.B sync(\|)
is mandatory before a boot.
.SH "SEE ALSO"
.BR fsync (2),
.BR cron (8)
.SH BUGS
.LP
The writing, although scheduled, is not necessarily
complete upon return from
.BR sync(\|) .
o avoid confusion i./share/man/man2/syscall.2                                                                             755       0      12         2343  4424741022  10440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)syscall.2 1.17 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SYSCALL 2 "22 March 1989"
.SH NAME
syscall \- indirect system call
.SH SYNOPSIS
.nf
.ft B
#include <sys/syscall.h>
.LP
.B int syscall(number, arg, .\|.\|.)
.fi
.IX  syscall  ""  \fLsyscall\fP
.IX  "indirect system call"
.SH DESCRIPTION
.B syscall(\|)
performs the system call whose assembly language
interface has the specified
.IR number ,
and arguments
.IR "arg \&.\|.\|." \&.
Symbolic constants for system calls can be found in the header file
.BR <sys/syscall.h> .
.LP
.\" Sun386i systems
On Sun-2, Sun-3, and Sun-4 systems, the value of register d0 after 
the system call is returned.
On Sun386i systems, the value of register %eax is returned.
.SH "RETURN VALUE"
When the C-bit is set,
.B syscall(\|)
returns \-1 and sets the
external variable
.B errno
(see
.BR intro (2)).
.SH SEE ALSO
.BR intro (2),
.BR pipe (2)
.SH BUGS
There is no way to simulate system calls
such as
.BR pipe (2),
which return values in register d1 
on Sun-2, Sun-3, and Sun-4 systems or
in register %edx on Sun386i systems.
1 value is returned.
.SH ERRORS
The symbolic link is made unless one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I name2
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of either
.I name1
or
.I name2
exceeds 255 character./share/man/man2/tell.2                                                                                755       0      12           62  4424741022   7662                                                                                                                                                                                                                                                                                                                                                                      .so man2/lseek.2
.\" @(#)tell.2 1.5 89/03/26 SMI;
9  umask.2   8  9  uname.2v .2   L  9  unlink.2  8  `  9  	unmount.2 L  t  9  utimes.2  `    9  	vadvise.2 t    9  vfork.2     9  	vhangup.2 2     9  wait.2 .    9  wait3.2     9  wait4.2      9  write.2v .2      9  	writev.2v  
#include <sys/syscall.h>
.LP
.B int syscall(number, arg, .\|.\|.)
.fi
.IX  syscall  ""  \fLsyscall\fP
.IX  "indirect system call"
.SH DESCRIPTION
.B syscall(\|)
performs the s./share/man/man2/truncate.2                                                                            755       0      12         4732  4424741022  10617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)truncate.2 1.20 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH TRUNCATE 2 "22 March 1989"
.SH NAME
truncate, ftruncate \- set a file to a specified length
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
.ft
.LP
.ft B
int truncate(path, length)
char \(**path;
off_t length;
.ft
.LP
.ft B
int ftruncate(fd, length)
int fd;
off_t length;
.ft
.fi
.SH DESCRIPTION
.LP
.IX  truncate  ""  \fLtruncate\fP
.IX  "file system"  truncate  ""  \fLtruncate\fP
.IX  ftruncate  ""  \fLftruncate\fP
.IX  "file system"  ftruncate  ""  \fLftruncate\fP
.B truncate(\|)
causes the file referred to by
.I path
(or for
.B ftruncate(\|)
the object referred to by
.IR fd )
to have a size equal to
.I length
bytes.  If the file was previously longer than
.IR length ,
the extra
bytes are removed from the file.  If it was shorter, bytes between the old
and new lengths are read as zeroes.
With
.BR ftruncate(\|) ,
the file must be open for writing.
.SH RETURN VALUE
A value of 0 is returned if the call succeeds.  If the call
fails a \-1 is returned, and the global variable
.B errno
specifies the error.
.SH ERRORS
.B truncate(\|)
succeeds unless:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM EACCES
Write permission is denied for the file referred to by
.IR path .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EISDIR
The file referred to by
.I path
is a directory.
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.LP
.B ftruncate(\|)
succeeds unless:
.TP 20
.SM EINVAL
.I fd
is not a valid descriptor of a file open for writing.
.TP
.SM EINVAL
.I fd
refers to a socket, not to a file.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR open (2V)
.SH BUGS
These calls should be generalized to allow ranges of bytes in a file to be discarded.
in which the entry for the new symboli./share/man/man2/umask.2                                                                               755       0      12         1621  4424741022  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)umask.2 1.15 89/03/26 SMI; from UCB 12 Feb 1983
.TH UMASK 2 "22 March 1989"
.SH NAME
umask \- set file creation mode mask
.SH SYNOPSIS
.B int umask(numask)
.br
.B int numask;
.IX  umask  ""  \fLumask\fP
.IX  "file system"  umask  ""  \fLumask\fP
.IX  set "file creation mode mask \(em \fLumask\fR"
.IX  set "user mask \(em \fLumask\fR"
.IX  "user mask, set \(em \fLumask\fR"
.SH DESCRIPTION
.B umask(\|)
sets the process's file mode creation mask to
.I numask
and returns the previous value of the mask.  The low-order
9 bits of
.I numask
are used whenever a file is created,
clearing corresponding bits in the file mode
(see
.BR chmod (2)).
This clearing allows each user to restrict the default access
to his files.
.LP
The mask is inherited by child processes.
.SH "RETURN VALUE
The previous value of the file mode mask is returned by the call.
.SH SEE ALSO
.BR chmod (2),
.BR mknod (2),
.BR open (2V)
IR length ,
the extra
bytes are removed from the file.  If it was shorter, bytes between the old
and new length./share/man/man2/uname.2v                                                                              755       0      12         2707  4424741022  10265                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uname.2v 1.14 89/03/26 SMI; from S5R2 6.2 9/6/83
.TH UNAME 2V "27 January 1988"
.SH NAME
uname \- get name of current system
.SH SYNOPSIS
.B #include <sys/utsname.h>
.LP
.B int uname(name)
.LP
.B struct utsname \(**name;
.SH DESCRIPTION
.IX "System V library, system call versions" "\fLuname\fR"
.IX "uname system call" "" "\fLuname\fR \(em get system name"
.LP
Note:
This system call is only available for use with the System V
compatibility libraries. These are located in the directory
.BR /usr/5lib ,
and are compiled using the System V version of the
.B C
compiler,
.BR /usr/5bin/cc .
.LP
.B uname(\|)
stores information identifying the current
system in the structure pointed to by
.IR name .
.LP
.B uname(\|)
uses the structure
defined in
.B <sys/utsname.h>
whose members are:
.LP
.RS
.nf
.ft B
char	sysname[9];
char	nodename[65];
char	release[9];
char	version[9];
char	machine[9];
.fi
.ft R
.RE
.LP
.B uname(\|)
returns a null-terminated string giving the standard host name for the current
processor in
.BR nodename .
This name will be same as the name returned by the
.BR gethostname (2)
system call.
It also returns a null-terminated character string naming the current
operating system in
.BR sysname .
.B release
and
.B version
further identify the operating system.
.B machine
contains a name that identifies the hardware of the current processor.
.SH FILES
.PD 0
.TP 20
.B /usr/5lib
.TP
.B /usr/5bin/cc
.PD
.SH SEE ALSO
.BR gethostname (2),
.BR uname (1V)
gth of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
Th./share/man/man2/unlink.2                                                                              755       0      12         4605  4424741022  10271                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)unlink.2 1.18 89/03/26 SMI; from UCB 4.2
.TH UNLINK 2 "22 November 1987"
.SH NAME
unlink \- remove directory entry
.SH SYNOPSIS
.nf
.ft B
int unlink(path)
char \(**path;
.fi
.ft R
.SH DESCRIPTION
.IX  unlink  ""  "\fLunlink\fP \(em remove directory entry"
.IX  "file system"  "remove directory entry unlink"  ""  "remove directory entry \(em \fLunlink\fP"
.IX  "file system"  "delete directory entry unlink"  ""  "delete directory entry \(em \fLunlink\fP"
.IX  "file system"  "erase directory entry unlink"  ""  "erase directory entry \(em \fLunlink\fP"
.IX  remove "directory entry \(em \fLunlink\fP"
.IX  delete "directory entry \(em \fLunlink\fP"
.IX  erase "directory entry \(em \fLunlink\fP"
.LP
.B unlink(\|)
removes the directory entry named by the path name pointed to by
.IR path .
If this entry was the last link to the file,
and no process has the file open, then
all resources associated with the file are reclaimed.
If, however, the file was open in any process, the actual
resource reclamation is delayed until it is closed,
even though the directory entry has disappeared.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
The
.B unlink(\|)
succeeds unless:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I path
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I path
exceeds 255 characters,
or the length of
.I path
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I path
does not exist.
.TP
.SM EINVAL
The file referred to by
.I path
is the current directory,
.RB ` . '.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR path .
.TP
.SM EACCES
Write permission is denied for the directory containing the link to be removed.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR path .
.TP
.SM EPERM
The file referred to by
.I path
is a directory and the effective user
.SM ID
of the process is not the super-user.
.TP
.SM EBUSY
The entry to be unlinked is the mount point for a mounted file system.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The file referred to by
.I path
resides on a read-only file system.
.TP
.SM EFAULT
.I path
points outside the process's allocated address space.
.SH "SEE ALSO"
.BR close (2),
.BR link (2),
.BR rmdir (2)
hese calls should be generalized to allow ranges of bytes in a file to be discarded.
in which the entry for the new symboli./share/man/man2/unmount.2                                                                             755       0      12         3627  4424741022  10501                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)unmount.2 1.17 89/03/26 SMI; from UCB 4.2
.TH UNMOUNT 2 "25 September 1987"
.SH NAME
unmount \- remove a file system
.SH SYNOPSIS
.nf
.ft B
unmount(name)
char *name;
.fi
.SH DESCRIPTION
.LP
.IX  unmount  ""  "\fLunmount\fP \(em demount file system"
.IX  "file system"  unmount  ""  "\fLunmount\fP \(em demount file system"
.IX  "file system"  demount  ""  "\fLunmount\fP \(em demount file system"
.IX  remove "file system \(em \fLunmount\fP"
.IX  "demount file system unmount"  ""  "demount file system \(em \fLunmount\fP"
.LP
.B unmount(\|)
announces to the system that the directory
.I name
is no longer to refer to the root of a mounted file system.  The directory
.I name
reverts to its ordinary interpretation.
.SH RETURN VALUE
.B unmount(\|)
returns 0 if the action occurred; \-1 if
if the directory is inaccessible or
does not have a mounted file system,
or if there are active files in the mounted file system.
.SH ERRORS
.B unmount(\|)
may fail with one of the following errors:
.TP 20
.SM EPERM
The caller is not the super-user.
.TP
.SM ENOTDIR
A component of the path prefix of
.I name
is not a directory.
.TP
.SM EINVAL
.I name
is not the root of a mounted file system.
.TP
.SM EBUSY
A process is holding a reference to a file located on the file system.
.TP
.SM ENAMETOOLONG
The length of a component of the path name exceeds 255 characters,
or the length of the entire path name exceeds 1023 characters.
.TP
.SM ENOENT
.I name
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix.
.TP
.SM EFAULT
.I name
points outside the process's allocated address space.
.TP
.SM ELOOP
Too many symbolic links were encountered in translating the path name.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.SH "SEE ALSO"
.BR mount (2),
.BR mount (8),
.SH BUGS
.LP
The error codes are in a state of disarray; too many errors
appear to the caller as one value.
e referred to by
.I path
is a directory and the effective user
.SM ID
of the process is not the super-use./share/man/man2/utimes.2                                                                              755       0      12         4570  4424741023  10301                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)utimes.2 1.19 89/03/26 SMI; from UCB 4.2
.TH UTIMES 2 "22 November 1987"
.SH NAME
utimes \- set file times
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
.LP
.ft B
int utimes(file, tvp)
char \(**file;
struct timeval \(**tvp;
.fi
.SH DESCRIPTION
.IX  utimes  ""  "\fLutimes\fP \(em set file times"
.IX  "file system"  utimes  ""  "\fLutimes\fP \(em set file times"
.IX  "change" "file access times \(em \fLutimes\fR"
.IX  "access times of file, change \(em \fLutimes\fR"
.LP
.B utimes(\|)
sets the access and modification times of the file named by
.IR file .
.LP
If
.I tvp
is
.SM NULL\s0,
the access and modification times are set to the current time.  A
process must be the owner of the file or have write permission for
the file to use
.B utimes(\|)
in this manner.
.LP
If
.I tvp
is not
.SM NULL\s0,
it is assumed to point to an array of two
.B timeval
structures.  The access time is set to the value of the first member,
and the modification time is set to the value of the second member.
Only the owner of the file or the super-user may use
.B utimes(\|)
in this manner.
.LP
In either case, the
.I inode-changed
time of the file is set to the current time.
.SH RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B utimes(\|)
will fail if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I file
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I file
exceeds 255 characters, or the length of
.I file
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I file
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR file .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR file .
.TP
.SM EPERM
The effective user
.SM ID
of the process is not super-user and not the owner of the file, and
.I tvp
is not
.SM NULL\s0.
.TP
.SM EACCES
The effective user
.SM ID
of the process is not super-user and not the owner of the file, write
permission is denied for the file, and
.I tvp
is
.SM NULL\s0.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The file system containing the file is mounted read-only.
.TP
.SM EFAULT
.I file
or
.I tvp
points outside the process's allocated address space.
.SH SEE ALSO
.BR stat (2)
BR rmdir (2)
hese calls should be generalized to allow ranges of bytes in a file to be discarded.
in which the entry for the new symboli./share/man/man2/vadvise.2                                                                             755       0      12         3113  4424741023  10424                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vadvise.2 1.16 89/03/26 SMI; from UCB 4.2
.TH VADVISE 2 "22 March 1989"
.SH NAME
vadvise \- give advice to paging system
.SH SYNOPSIS
.nf
.ft B
#include <sys/vadvise.h>
.sp .5v
vadvise(param)
int param;
.fi
.ft R
.IX  vadvise  ""  "\fLvadvise\fP \(em advise paging system"
.IX  "system operation support"  vadvise  ""  \fLvadvise\fP
.IX  "advise paging system \(em \fLvadvise\fR"
.IX  "paging system, advise \(em \fLvadvise\fR"
.SH DESCRIPTION
.B vadvise(\|)
is used to inform the system that process paging behavior merits
special consideration.  Parameters to
.B vadvise(\|)
are defined in the file
.BR /usr/include/sys/vadvise.h .
Currently, two calls to
.B vadvise(\|)
are implemented.
.IP
.BR vadvise(\s-1VA_ANOM\s0) ;
.LP
advises that the paging behavior is not likely to be well handled by the
system's default algorithm, since reference information is collected over
macroscopic intervals (for instance, 10-20 seconds) will not serve to indicate future
page references.  The system in this case will choose to replace
pages with little emphasis placed on recent usage, and more emphasis
on referenceless circular behavior.  It is
.I essential
that processes which have very random paging behavior (such as
.SM LISP
during garbage collection of very large address spaces) call
.BR vadvise ,
as otherwise the system has great difficulty dealing with their
page-consumptive demands.
.IP
.BR vadvise(\s-1VA_NORM\s0) ;
.LP
restores default paging replacement behavior after a call to
.IP
.BR vadvise(\s-1VA_ANOM\s0) ;
.SH BUGS
Will go away soon, being replaced by a per-page
.B vadvise(\|)
facility.
.TP
.SM ENOENT
The file referred to by
.I file
does not exist.
.TP
.SM EACCES
Search permission is denied for a component of the path prefix of
.IR file .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR file .
.TP
.SM EPERM
The effective user
.SM ID
of the process is not super-user and not the owner of the file, and
.I tvp
is not
.SM NULL\s0.
.TP
.SM EACCES
The effective user
.SM ID
of the process is not sup./share/man/man2/vfork.2                                                                               755       0      12         5330  4424741023  10115                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)vfork.2 1.14 89/03/26 SMI; from UCB 6.2 6/30/85
.TH VFORK 2 "25 March 1989"
.SH NAME
vfork \- spawn new process in a virtual memory efficient way
.SH SYNOPSIS
.nf
.ft B
#include <vfork.h>
.LP
.ft B
.B vfork(\|)
.SH DESCRIPTION
.IX  vfork  ""  \fLvfork\fP
.IX  "processes and protection"  vfork  ""  \fLvfork\fP
.IX  "spawn process"
.LP
.B vfork(\|)
can be used to create new processes without fully copying the address
space of the old process, which is horrendously inefficient in a paged
environment.  It is useful when the purpose of
.BR fork (2)
would have been to create a new system context for an
.BR execve (2).
.B vfork(\|)
differs from
.B fork(\|)
in that the child borrows the parent's memory and thread of
control until a call to
.BR execve (2)
or an exit (either by a call to
.BR exit (2)
or abnormally.)
The parent process is suspended while the child is using its resources.
.LP
.B vfork(\|)
returns 0 in the child's context and (later) the
process
.SM ID
(\s-1PID\s0)
of the child in the parent's context.
.LP
.B vfork(\|)
can normally be used just like
.BR fork .
It does not work, however, to return while running in the child's context
from the procedure which called
.B vfork(\|)
since the eventual return from
.B vfork(\|)
would then return to a no longer existent stack frame.
Be careful, also, to call
.B _exit(\|)
rather than
.B exit(\|)
if you cannot
.IR execve ,
since
.B exit(\|)
will flush and close standard I/O channels, and thereby mess up the
parent processes standard I/O data structures.
(Even with
.B fork(\|)
it is wrong to call
.B exit(\|)
since buffered data would then be flushed twice.)
.LP
On Sun-4 machines, the parent inherits the values of local and incoming
argument registers from the child.  Since this violates the usual
data flow properties of procedure calls, the file
.B /usr/include/vfork.h
must be included in programs that are compiled using
global optimization.
.SH "RETURN VALUE"
Same as for
.BR fork (2).
.SH SEE ALSO
.BR execve (2),
.BR exit (2),
.BR fork (2),
.BR ioctl (2),
.BR sigvec (2),
.BR wait (2),
.SH BUGS
.LP
This system call will be eliminated in a future release.
System implementation changes are making the efficiency gain of
.B vfork(\|)
over
.BR fork (2)
smaller.  The memory sharing semantics of
.B vfork(\|)
can be obtained through other mechanisms.
.LP
To avoid a possible deadlock situation,
processes that are children in the middle of a
.B vfork(\|)
are never sent
.SB SIGTTOU
or
.SB SIGTTIN
signals; rather, output or
.IR ioctl s
are allowed and input attempts result in an
.SM EOF
indication.
can normally be used just like
.BR fork .
It does not work, however, to return while running in the child's context
from the procedure which called
.B vfork(\|)
since the eventual return from
.B vfork(\|)
would then return to a no longer existent stack frame.
Be careful, also, to call
.B _exit(\./share/man/man2/vhangup.2                                                                             755       0      12         2574  4424741023  10445                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)vhangup.2 1.13 89/03/26 SMI; from UCB 6.2 6/30/85
.TH VHANGUP 2 "25 September 1987"
.SH NAME
vhangup \- virtually ``hangup'' the current control terminal
.SH SYNOPSIS
.B vhangup()
.SH DESCRIPTION
.IX  vhangup  ""  \fLvhangup\fP
.IX  "processes and protection"  vhangup  ""  \fLvhangup\fP
.IX  "control terminal,  hangup \(em \fLvhangup\fR"
.IX  "hangup, control terminal \(em \fLvhangup\fR"
.LP
.B vhangup(\|)
is used by the initialization process
.BR init (8)
(among others) to arrange that users are given
\*(lqclean\*(rq terminals at login,
by revoking access of the previous users' processes to the terminal.
To affect this,
.B vhangup(\|)
searches the system tables for references to the control terminal
of the invoking process, revoking access permissions
on each instance of the terminal that it finds.
Further attempts to access the terminal by the affected processes
will yield I/O errors (\s-1EBADF\s0).
Finally, a
.SB SIGHUP
(hangup signal)
is sent to the process group of the
control terminal.
.SH SEE ALSO
.BR init (8)
.SH BUGS
Access to
the control terminal using
.B /dev/tty
is still possible.
.LP
This call should be replaced by an automatic mechanism that
takes place on process exit.
ce the eventual return from
.B vfork(\|)
would then return to a no longer existent stack frame.
Be careful, also, to call
.B _exit(\./share/man/man2/wait.2                                                                                755       0      12        17452  4424741023   7762                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)wait.2 1.30 89/03/26 SMI; from UCB 4.3
.TH WAIT 2 "22 March 1989"
.SH NAME
wait, wait3, wait4, WIFSTOPPED, WIFSIGNALED, WIFEXITED \- wait for process to terminate or stop
.SH SYNOPSIS
.B #include <sys/wait.h>
.LP
.nf
.B int wait(statusp)
.B union wait \(**statusp;
.fi
.LP
.nf
.B #include <sys/time.h>
.B #include <sys/resource.h>
.fi
.LP
.nf
.ft B
int wait3(statusp, options, rusage)
union wait \(**statusp;
int options;
struct rusage \(**rusage;
.ft R
.fi
.LP
.nf
.ft B
int wait4(pid, statusp, options, rusage)
int pid;
union wait \(**statusp;
int options;
struct rusage \(**rusage;
.ft R
.fi
.LP
.nf
.B \s-1WIFSTOPPED\s0(status)
.B union wait status;
.fi
.LP
.nf
.B \s-1WIFSIGNALED\s0(status)
.B union wait status;
.fi
.LP
.nf
.B \s-1WIFEXITED\s0(status)
.B union wait status;
.fi
.SH DESCRIPTION
.IX  wait  ""  \fLwait\fP
.IX  "processes and protection"  wait  ""  \fLwait\fP
.IX  wait3  ""  \fLwait3\fP
.IX  "processes and protection"  wait3  ""  \fLwait3\fP
.IX  wait4  ""  \fLwait4\fP
.IX  "processes and protection"  wait4  ""  \fLwait4\fP
.LP
.B wait(\|)
delays its caller until a signal is received or
one of its child
processes terminates or stops due to tracing.
If any child has died or stopped due to tracing and this has not been
reported using
.BR wait(\|) ,
return is immediate, returning the process
.SM ID
and exit status of one of those children.
If that child had died, it is discarded.
If there are no children, return is immediate with
the value \-1 returned.
If there are only running or stopped but reported children,
the calling process is blocked.
.LP
If
.I status
is not a
.SM NULL
pointer, then on return from a successful
.B wait(\|)
call the status of the child process whose process
.SM ID
is the return value of
.B wait(\|)
is stored in the
.B wait(\|)
union pointed to by
.IR status .
The
.B w_status
member of that union is an
.BR int ;
it indicates the cause of termination and other information about the
terminated process in the following manner:
.RS
.TP 3
\(bu
If the low-order 8 bits of
.B w_status
are equal to 0177, the child process has stopped; the 8 bits higher up from
the low-order 8 bits of
.B w_status
contain the number of the signal that caused the process to stop.
See
.BR ptrace (2)
and
.BR sigvec (2).
.TP
\(bu
If the low-order 8 bits of
.B w_status
are non-zero and are not equal to 0177, the child process terminated
due to a signal; the low-order 7 bits of
.B w_status
contain the number of the signal that terminated the process.
In addition, if the low-order seventh bit of
.B w_status
(that is, bit 0200) is set, a ``core image'' of the process was produced; see
.BR sigvec (2).
.TP
\(bu
Otherwise, the child process terminated due to an
.B exit(\|)
call; the 8 bits higher up from the low-order 8 bits of
.B w_status
contain the low-order 8 bits of the argument that the child process
passed to
.BR exit ;
see
.BR exit (2).
.RE
.br
.ne 5
.LP
Other members of the
.B wait(\|)
union can be used to extract this information more conveniently:
.RS
.TP 3
\(bu
If the
.B w_stopval
member has the value
.SM
.BR WSTOPPED \s0,
the child process has stopped; the
value of the
.B w_stopsig
member is the signal that stopped the process.
.TP
\(bu
If the
.B w_termsig
member is non-zero, the child process terminated due to a signal; the
value of the
.B w_termsig
member is the number of the signal that terminated the process.  If the
.B w_coredump
member is non-zero, a core dump was produced.
.TP
\(bu
Otherwise, the child process terminated due to an
.B exit(\|)
call; the value of the
.B w_retcode
member is the low-order 8 bits of the argument that the child process
passed to
.BR exit .
.RE
.LP
The other members of the
.B wait(\|)
union merely provide an alternate way of analyzing the status.  The
value stored in the
.B w_status
field is compatible with the values stored by other versions of the
.SM UNIX
system, and an argument of type
.B "int \(**"
may be provided instead of an argument of type
.B "union wait \(**"
for compatibility with those versions.
.LP
.B wait3(\|)
is an alternate interface that
allows both non-blocking status collection and
the collection of the status of children stopped by any means.
The
.I status
parameter is defined as above.  The
.I options
parameter is used to indicate the call should not block if
there are no processes that have status to report
.RB ( \s-1\fBWNOHANG\s0 ),
and/or that children of the current process that are stopped
due to a
.SM
.BR SIGTTIN \s0,
.SM
.BR SIGTTOU \s0,
.SM
.BR SIGTSTP \s0,
or
.SB SIGSTOP
signal are eligible to have
their status reported as well
.RB ( \s-1\fBWUNTRACED\s0 ).
A terminated child is discarded after it reports status, and a stopped
process will not report its status more than once.
If
.I rusage
is not a
.SM NULL
pointer, a summary of the resources used by the terminated
process and all its
children is returned.  (This information is currently not available
for stopped processes.)
.LP
When the
.SM WNOHANG
option is specified and no processes
have status to report,
.B wait3(\|)
returns 0.  The
.SB WNOHANG
and
.SB WUNTRACED
options may be combined by
.SM OR\s0ing
the two values.
.LP
.B wait4(\|)
is another alternate interface.  With a
.I pid
argument of 0, it is equivalent to
.BR wait3(\|) .
If
.I pid
has a nonzero value, then
.B wait4(\|)
returns status only for the indicated process
.SM ID\s0,
but not for any other child processes.
.LP
.SM
.BR WIFSTOPPED \s0,
.SM
.BR WIFSIGNALED \s0,
.SM
.BR WIFEXITED \s0,
are macros that take an argument
.IR status ,
of type
.RB ` "union wait" ',
as returned by
.BR wait(\|) ,
.BR wait3(\|) ,
or
.BR wait4(\|) .
.SB WIFSTOPPED
evaluates to true (1) when the process for which the
.B wait(\|)
call was made is stopped, or to false (0) otherwise.
.SB WIFSIGNALED
evaluates to true when the process was terminated with a signal.
.SB WIFEXITED
evaluates to true whe the process exited by using an
.BR exit (2)
call.
.SH "RETURN VALUE"
If
.B wait(\|)
returns due to a stopped
or terminated child process, the process ID of the child
is returned to the calling process.  Otherwise, a value of \-1
is returned and
.B errno
is set to indicate the error.
.LP
.B wait3(\|)
and
.B wait4(\|)
return 0 if
.SB WNOHANG
is specified and there are
no stopped or exited children, and return the process
.SM ID
of the
child process if they return due to a stopped or terminated child
process.  Otherwise, they return a value of \-1
and set
.B errno
to indicate the error.
.SH ERRORS
.BR wait(\|) ,
.BR wait3(\|) ,
or
.BR wait4(\|)
will fail and return immediately if one or more of the following
are true:
.TP 15
.SM ECHILD
The calling process has no existing unwaited-for
child processes.
.TP
.SM EFAULT
The
\fIstatus\fP or
.I rusage
arguments point to an illegal address.
.LP
.BR wait(\|) ,
.BR wait3(\|) ,
and
.BR wait4(\|)
will terminate prematurely, return \-1, and set
.B errno
t
.SM EINTR
upon the arrival of a signal whose
.SB SV_INTERRUPT
bit in its flags field is set (see
.BR sigvec (2)
and
.BR siginterrupt (3)).
.BR signal (3V),
in the System V compatibility library, sets this bit for any signal it catches.
.SH "SEE ALSO"
.BR exit (2),
.BR getrusage (2),
.BR ptrace (2),
.BR sigvec (2),
.BR siginterrupt (3),
.BR signal (3)
.SH NOTES
If a parent process terminates without
waiting on its children,
the initialization process
(process
.SM ID
= 1)
inherits the children.
.LP
.BR wait(\|) ,
.BR wait3(\|) ,
and
.B wait4(\|)
are automatically restarted when a process receives a
signal while awaiting termination of a child process, unless the
.SB SV_INTERRUPT
bit is set in the flags for that signal.
.SH WARNINGS
Calls to
.B wait(\|)
with an argument of 
.B 0
should be cast to type
.RB ` "union wait *" ',
as in:
.IP
.B wait((union wait *)0)
.LP
Otherwise
.BR lint (1V)
will complain.
 from a successful
.B wait(\|)
call the status of the child process whose process
.SM ID
is the return value of
.B wait(\|)
is stored in the
.B wait(\|)
union pointed to by
.IR status .
The
.B w_status
member of th./share/man/man2/wait3.2                                                                               755       0      12           63  4424741023   7753                                                                                                                                                                                                                                                                                                                                                                      .so man2/wait.2
.\" @(#)wait3.2 1.8 89/03/26 SMI; 
write.2v        9  	writev.2v  urned to the calling process.  Otherwise, a value of \-1
is returned and
.B errno
is set to indicate the error.
.LP
.B wait3(\|)
and
.B wait4(\|)
return 0 if
.SB WNOHANG
is specified and there are
no stopped or exited children, and return the process
.SM ID
of the
child process if they return due to a stopped or terminated child
process.  Otherwise, they return a value of \-1
and set
.B errno
to indicate the error.
.SH E./share/man/man2/wait4.2                                                                               755       0      12           62  4424741024   7754                                                                                                                                                                                                                                                                                                                                                                      .so man2/wait.2
.\" @(#)wait4.2 1.4 89/03/26 SMI;
9  	writev.2v    9  	writev.2v  urned to the calling process.  Otherwise, a value of \-1
is returned and
.B errno
is set to indicate the error.
.LP
.B wait3(\|)
and
.B wait4(\|)
return 0 if
.SB WNOHANG
is specified and there are
no stopped or exited children, and return the process
.SM ID
of the
child process if they return due to a stopped or terminated child
process.  Otherwise, they return a value of \-1
and set
.B errno
to indicate the error.
.SH E./share/man/man2/write.2v                                                                              755       0      12        17707  4424741024  10342                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)write.2v 1.24 89/03/26 SMI; from UCB 4.3 and S5R3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH WRITE 2V "22 March 1989"
.SH NAME
write, writev \- write output
.SH SYNOPSIS
.nf
.ft B
int write(d, buf, nbytes)
int d;
char \(**buf;
int nbytes;
.LP
.ft B
#include <sys/types.h>
#include <sys/uio.h>
.LP
.ft B
int writev(d, iov, iovcnt)
int d;
struct iovec \(**iov;
int iovcnt;
.fi
.SH DESCRIPTION
.IX "System V library, system call versions" "\fLwrite\fR"
.IX  write  ""  \fLwrite\fP
.IX  "generic operations"  write  ""  \fLwrite\fP
.IX  "write gathered writev"  ""  "write gathered \(em \fLwritev\fP"
.IX  "generic operations"  "gather write writev"  ""  "gather write \(em \fLwritev\fP"
.IX  "gather write writev"  ""  "gather write \(em \fLwritev\fP"
.LP
.B write(\|)
attempts to write
.I nbytes
of data to the object referenced by the descriptor
.I d
from the buffer pointed to by
.IR buf .
.B writev(\|)
performs the same action, but gathers the output data
from the
.I iovcnt
buffers specified by the members
of the
.I iov
array:
.IR iov [0], iov "[1], ...,"
.IR iov [ iovcnt "\|\-\|1]."
.LP
For
.BR writev(\|) ,
the
.B iovec
structure is defined as
.LP
.nf
.RS
.DT
.ft B
struct iovec {
	caddr_t	iov_base;
	int	iov_len;
};
.ft R
.RE
.fi
.LP
Each
.B iovec
entry specifies the base address and length of an area
in memory from which data should be written.
.B writev(\|)
will always write a complete area before proceeding
to the next.
.LP
On objects capable of seeking, the
.B write(\|)
starts at a position
given by the pointer associated with
.IR d ,
see
.BR lseek (2).
Upon return from
.BR write(\|) ,
the pointer is incremented by the number of bytes actually written.
.LP
Objects that are not capable of seeking always write from the current
position.  The value of the pointer associated with such an object
is undefined.
.LP
If the
.SB O_APPEND
flag of the file status flags is set,
the file pointer will be set to the end of the file prior to each write.
.LP
For regular files, if the
.SB O_SYNC
flag of the file status flags is set,
the write will not return until both the file data and file status have
been physically updated.
This function is for special applications that require extra reliability
at the cost of performance.
For block special files, if
.SB O_SYNC
is set, the write will not return until the data has been physically updated.
.LP
If the real user is not the super-user, then
.B write(\|)
clears the set-user-id bit on a file.
This prevents penetration of system security
by a user who
\*(lqcaptures\*(rq a writable set-user-id file
owned by the super-user.
.LP
For
.SM STREAMS
(see
.BR intro (2))
files, the operation of
.B write(\|)
and
.B writev(\|)
are determined by the values of the minimum and maximum packet sizes
accepted by the
.IR stream .
These values are contained in the topmost
.I stream
module.
Unless the user pushes (see
.SB I_PUSH
in
.BR streamio (4))
the topmost module,
these values can not be set or tested from user level.
If the total number of bytes to be written
falls within the packet size range, that many bytes will be written.
If the total number of bytes to be written
does not fall within the range and the minimum packet size value is zero,
.B write(\|)
and
.B writev(\|)
will break the data to be written
into maximum packet size segments prior to sending the data downstream
(the last segment may contain less than the maximum packet size).
If the total number of bytes to be written does not fall within the
range and the minimum value is non-zero,
.B write(\|)
and
.B writev(\|)
will fail with
.B errno
set to
.SM ERANGE\s0.
Writing a zero-length buffer (the total number of bytes to be written
is zero) sends zero bytes with zero returned.
.LP
When a descriptor or the object it refers to is marked for non-blocking
I/O, and the descriptor refers to an object subject to flow control,
such as a socket, a pipe (or
.SM FIFO\s0),
or a
.IR stream ,
.B write(\|)
and
.B writev(\|)
may write fewer bytes than requested;
the return value must be noted,
and the remainder of the operation should be retried when possible.
If such an object's buffers are full, so that it cannot accept any data,
then:
.RS
.TP 3
\(bu
If the object the descriptor is associated with is marked for
4.2\s-1BSD\s0-style non-blocking I/O (with the
.SB FIONBIO
.BR ioctl (2),
or an
.B fcntl(\|)
using the
.SB FNDELAY
flag from
.B <sys/file.h>
or the
.SB O_NDELAY
flag from
.B <sys/fcntl.h>
in the 4.2\s-1BSD\s0 environment), the write will return \-1 and
.B errno
will be set to
.SM EWOULDBLOCK\s0.
.TP
\(bu
If the descriptor is marked for System V-style non-blocking I/O (with
an
.B fcntl(\|)
using the
.SB FNBIO
flag from
.B <sys/file.h>
or the
.SB O_NDELAY
flag from
.B <sys/fcntl.h>
in the System V environment), and does not refer to a
.IR stream ,
the write will return 0.
.TP
\(bu
If the descriptor is marked for System V-style non-blocking I/O, and
refers to a
.IR stream ,
the write will return \-1 and
.B errno
will be set to
.SM EAGAIN\s0.
.TP
\(bu
If neither the descriptor nor the object it refers to are marked for
non-blocking I/O, the write will block until space becomes available.
.RE
.SH RETURN VALUE
.LP
Upon successful completion the number of bytes actually written
is returned.  Otherwise a \-1 is returned and the global variable
.B errno
is set to indicate the error.
.SH ERRORS
.LP
.B write(\|)
and
.B writev(\|)
will fail and the file pointer will remain unchanged if one or more
of the following are true:
.TP 20
.SM EBADF
.I d
is not a valid descriptor open for
writing.
.TP
.SM EPIPE
An attempt is made to write to a pipe that is not open
for reading by any process (or to a socket of type
.SB SOCK_STREAM
that is connected to a peer socket.)  Note: an attempted write of this
kind will also cause you to receive a
.SB SIGPIPE
signal from the
kernel.  If you've not made a special provision to catch or ignore this
signal, your process will die.
.TP
.SM EFBIG
An attempt was made to write a file that exceeds the process's
file size limit or the maximum file size.
.TP
.SM EFAULT
Part of
.I iov
or data to be written to the file
points outside the process's allocated address space.
.LP
The call is forced to terminate prematurely due to the arrival of a signal whose
.SB SV_INTERRUPT
bit in
.B sv_flags
is set  (see
.BR sigvec (2)).
.BR signal (3V),
in the System V compatibility library, sets this bit for any signal it catches.
.TP 20
.SM EINVAL
The
.I stream
is linked below a multiplexor.
.TP
.SM EINVAL
The pointer associated with
.I d
was negative.
.TP
.SM ENOSPC
There is no free space remaining on the file system containing the file.
.TP
.SM EDQUOT
The user's quota of disk blocks on the file system containing the
file has been exhausted.
.TP
.SM EIO	
An I/O error occurred while reading from or writing to the file system.
.TP
.SM ENXIO
A hangup occurred on the
.I stream
being written to.
.TP
.SM ERANGE
.I d
refers to a
.IR stream ,
the total number of bytes to be written is
outside the minimum and maximum write range, and the minimum value is
non-zero.
.TP
.SM EWOULDBLOCK
The file was marked for 4.2\s-1BSD\s0-style non-blocking I/O,
and no data could be written immediately.
.TP
.SM EAGAIN
The descriptor referred to a
.IR stream ,
was marked for System V-style non-blocking I/O,
and no data could be written immediately.
.LP
In addition,
.B writev(\|)
may return one of the following errors:
.TP 20
.SM EINVAL
.I iovcnt
was less than or equal to 0, or greater than 16.
.TP
.SM EINVAL
One of the
.B iov_len
values in the
.I iov
array was negative.
.TP
.SM EINVAL
The sum of the
.B iov_len
values in the
.I iov
array overflowed a 32-bit integer.
.LP
A write to a
.SM STREAMS
file can fail
if an error message has been received at the stream head.
In this case,
.B errno
is set to the value included
in the error message.
.SH "SEE ALSO"
.BR dup (2),
.BR fcntl (2V),
.BR intro (2),
.BR ioctl (2),
.BR lseek (2),
.BR open (2V),
.BR pipe (2),
.BR select (2),
.BR sigvec (2),
.BR signal (3V)
ically updated.
.LP
If the real user is not the super-use./share/man/man2/writev.2v                                                                             755       0      12           66  4424741024  10436                                                                                                                                                                                                                                                                                                                                                                      .so man2/write.2v
.\" @(#)writev.2v 1.8 89/03/26 SMI;
 for
writing.
.TP
.SM EPIPE
An attempt is made to write to a pipe that is not open
for reading by any process (or to a socket of type
.SB SOCK_STREAM
that is connected to a peer socket.)  Note: an attempted write of this
kind will also cause you to receive a
.SB SIGPIPE
signal from the
kernel.  If you've not made a special provision to catch or ignore this
signal, your process will die.
.TP
.SM EFBIG
An attempt was made to write a file that exceeds the p./share/man/man3/                                                                                      775       0      12            0  4425704112   6614                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man3/CHECK.3l                                                                              755       0      12           72  4424741107   7722                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)CHECK.3l 1.4 89/03/27 SMI;
 <  
  HUGE.3m    P  
  HUGE_VAL.3m    `  
  Intro.3    t  
  Intro.3l rit     
  Intro.3m rit     
  Intro.3r rit     
  Intro.3v rit     
  List.3 	     
  List.3l      
  List.3m      
  List.3r      
  List.3v     
  
MINSTACKSZ.3l 9  ,  
  
MONITOR.3l 	  D  
  MSG_RECVALL.3l t  X  
  	SAMECV.3l it  l  
  
SAMEMON.3l t    
  
SAMETHREAD.3l 2v    
  	STKTOP.3l .2    
  _cry./share/man/man3/HUGE.3m                                                                               755       0      12           72  4424741110   7630                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)HUGE.3m 1.3 89/03/27 SMI;
tro.3    t  
  Intro.3l       
  Intro.3m       
  Intro.3r ntr     
  Intro.3v ntr     
  List.3      
  List.3l      
  List.3m      
  List.3r      
  List.3v     
  
MINSTACKSZ.3l    ,  
  
MONITOR.3l t  D  
  MSG_RECVALL.3l 3  X  
  	SAMECV.3l R.  l  
  
SAMEMON.3l V    
  
SAMETHREAD.3l .3    
  	STKTOP.3l N.    
  _crypt.3 HRE    
  _tolower.3v     
  _toupper.3v ./share/man/man3/HUGE_VAL.3m                                                                           755       0      12           76  4424741110  10336                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)HUGE_VAL.3m 1.3 89/03/27 SMI;
3l   t     
  Intro.3m        
  Intro.3r        
  Intro.3v        
  List.3 r     
  List.3l      
  List.3m      
  List.3r      
  List.3v     
  
MINSTACKSZ.3l 
  ,  
  
MONITOR.3l ,  D  
  MSG_RECVALL.3l   X  
  	SAMECV.3l X  l  
  
SAMEMON.3l l    
  
SAMETHREAD.3l 
    
  	STKTOP.3l     
  _crypt.3      
  _tolower.3v     
  _toupper.3v     
  a64l.3  ./share/man/man3/Intro.3                                                                               755       0      12         5162  4424741103  10065                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.3 1.33 89/03/27 SMI; from UCB 4.2
.TH INTRO 3 "21 October 1987"
.SH NAME
Intro \- introduction to user-level library functions
.SH DESCRIPTION
.IX  introduction  "C library functions"  ""  ""  PAGE START
.IX  "C library functions, introduction to"  "" ""  ""  PAGE START
.IX  "library functions" "introduction to C"  ""  ""  PAGE START
.LP
Section 3 describes user-level library routines.  In this release, most
user-library routines are listed in alphabetical order regardless of
their subsection headings.  (This eliminates having to search through
several subsections of the manual.)  However, due to their
special-purpose nature, the routines from the following libraries are
broken out into the indicated subsections:
.TP 3
\(bu
The Lightweight Processes Library, in subsection 3L.
.TP
\(bu
The
.SM RPC
Services Library, in subsection 3R.
.TP
\(bu
The System V Compatibility Library, in subsection 3V.
This library contains System V versions of functions that are
not yet merged into the standard Sun libraries.  To use them
functions, compile programs with
.BR /usr/5bin/cc ,
instead of
.BR /usr/bin/cc .
.LP
The main C library,
.BR /usr/lib/libc.a ,
contains many of the functions described in this section,
along with entry points for the system calls described in Section 2.
This library also includes the Internet networking routines
listed under the 3N subsection heading, and routines provided for
compatibility with other
.SM UNIX
operating systems, listed under 3C.  Functions associated with the
\(lqstandard I/O library\(rq are listed under 3S.
.LP
User-level routines for access to data structures within the kernel
and other processes are listed under 3K.  To use these functions,
compile programs with the
.B \-lkvm
option for the C compiler,
.BR cc (1V).
.LP
Math library functions are listed under 3M.
To use them, compile programs with the the
.B \-lm
.BR cc (1V)
option.
.LP
Various specialized libraries, the routines they contain, and the
compiler options needed to link with them, are listed under 3X.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/libc.a
C Library (2, 3, 3N and 3C)
.TP
.B /usr/lib/lib*.a
other \(lqstandard\(rq C libraries
.TP
.B /usr/lib/lib*.a
special-purpose C libraries
.TP
.B /usr/5bin/cc
.PD
.SH SEE ALSO
.BR cc (1V),
.BR ld (1),
.BR nm (1),
.BR intro (2)
.IX  introduction  "C library functions"  ""  ""  PAGE END
.IX  "C library functions, introduction to"  "" ""  ""  PAGE END
.IX  "library functions" "introduction to C"  ""  ""  PAGE END
.br
.ne 10
.SH "LIST OF LIBRARY FUNCTIONS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
.B Name	Appears on Page	Description
.sp
.nr zZ 1
.so /usr/man/man3/List.3
.nr zZ 0
.fi
er-level library functions
.SH DESCRIPTION
.IX  introduction  "C library functions"  ""  ""  PAGE START
.IX  "C library functions, introduction to"  "" ""  ""  PAGE START
.IX  "library functions" "introduction to C"  ""  ""  PAGE START
.LP
Section 3 describes user-level library routines.  In this release, most
user-library routines are listed in alphabetical order regardless of
their subsection ./share/man/man3/Intro.3l                                                                              755       0      12        13703  4424741104  10262                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.3l 1.36 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH INTRO 3L "18 November 1987"
.SH NAME
intro \- introduction to the lightweight process library (LWP)
.SH DESCRIPTION
.IX "lightweight processes library" "" "" "" PAGE MAJOR
.LP
The lightweight process library
(\s-1LWP\s0)
provides a mechanism to support
multiple threads of control that share a single address space.
Under SunOS, the address space is derived from a single
.I forked
(\(lqheavyweight\(rq) process.
Each thread has its own stack segment (specified when the thread is created)
so that it can access local variables
and make procedure calls independently of other threads.
The collection of threads sharing an address space is called a
.IR pod .
Under SunOS,
threads share all of the resources of the
heavyweight process that contains the pod, including descriptors and signal
handlers.
.LP
The 
.SM LWP
provides a means for creating and destroying
threads, message exchange between threads, manipulating
condition variables and
monitors, handling synchronous exceptions, mapping asynchronous
events into messages, mapping synchronous events into
exceptions, arranging for special per-thread context,
multiplexing the clock for timeouts,
and scheduling threads both preemptively and non\-preemptively.
.LP
The
.SM LWP
system exists as a library of routines
.RB ( /usr/lib/liblwp.a )
linked in
.RB ( \-llwp )
with a client program which should
.B #include
the file
.BR <lwp/lwp.h> .
.B main
is transparently converted into a lightweight process as soon as
it attempts to use any
.SM LWP
primitives.
.LP
When an object created by a
.SM LWP
primitive is destroyed,
every attempt is made to clean up after it.
For example, if a thread dies, all threads blocked on sends to
or receives from that thread are unblocked, and all monitor locks
held by the dead thread are released.
.LP
Because there is no kernel support for threads at present,
system calls effectively block the entire pod.
By linking in the non-blocking I/O library
.RB ( \-lnbio )
ahead of the
.SM LWP
library,
you can alleviate this problem for those system calls that can issue
a signal when a system call would be profitable to try.
This library (which redefines some system calls)
uses asynchronous I/O and events (for example,
.SB SIGCHLD
and
.SM
.BR SIGIO \s0)
to make blocking less painful.
The system calls remapped by the nbio library are:
.BR open (2V),
.BR socket (2),
.BR pipe (2),
.BR close (2),
.BR read (2V),
.BR write (2V) ,
.BR send (2),
.BR recv (2),
.BR accept (2),
.BR connect (2),
.BR select (2),
.BR wait (2)
.SH "RETURN VALUES"
.LP
.SM LWP
primitives return \-1 on errors.
Upon success, a non-negative integer is returned.
See
.BR lwp_perror (3L)
for details on error handling.
.LP
.SH FILES
.PD 0
.TP 20
.B /usr/lib/liblwp.a
.TP
.B /usr/lib/libnbio.a
.TP
.B /usr/include/lwp/check.h
.TP
.B /usr/include/lwp/lwp.h
.TP
.B /usr/include/lwp/lwperror.h
.TP
.B /usr/include/lwp/lwpmachdep.h
.TP
.B /usr/include/lwp/stackdep.h
.SH "SEE ALSO"
.BR accept (2),
.BR close (2),
.BR connect (2),
.BR open (2V),
.BR pipe (2),
.BR read (2V),
.BR recv (2),
.BR select (2),
.BR send (2),
.BR socket (2),
.BR wait (2)
.BR write (2V) ,
.LP
.I Lightweight Processes
in the
.TX SSSO
.SH INDEX
The following are the primitives currently supported, grouped roughly
by function.
.SS "Thread Creation"
.nf
.ft B
lwp_self(tid)
lwp_getstate(tid, statvec)
lwp_setregs(tid, machstate)
lwp_getregs(tid, machstate)
lwp_ping(tid)
lwp_create(tid, pc, prio, flags, stack, nargs, arg1, .\|.\|.\|, argn)
lwp_destroy(tid)
lwp_enumerate(vec, maxsize)
pod_setexit(status)
pod_getexit(\|)
pod_exit(status)
\s-1SAMETHREAD\s0(t1, t2)
.ft R
.fi
.SS "Thread Scheduling"
.nf
.ft B
pod_setmaxpri(maxprio)
pod_getmaxpri(\|)
pod_getmaxsize(\|)
lwp_resched(prio)
lwp_setpri(tid, prio)
lwp_sleep(timeout)
lwp_suspend(tid)
lwp_resume(tid)
lwp_yield(tid)
lwp_join(tid)
.ft R
.fi
.SS "Error Handling"
.nf
.ft B
lwp_geterr(\|)
lwp_perror(s)
lwp_errstr(\|)
.ft R
.fi
.SS Messages
.nf
.ft B
msg_send(tid, argbuf, argsize, resbuf, ressize)
msg_recv(tid, argbuf, argsize, resbuf, ressize, timeout)
\s-1MSG_RECVALL\s0(tid, argbuf, argsize, resbuf, ressize, timeout)
msg_reply(tid)
msg_enumsend(vec, maxsize)
msg_enumrecv(vec, maxsize)
.ft R
.fi
.SS "Event Mapping (Agents)"
.nf
.ft B
agt_create(agt, event, memory)
agt_enumerate(vec, maxsize)
agt_trap(event)
.ft R
.fi
.SS "Thread Synchronization: Monitors"
.nf
.ft B
mon_create(mid)
mon_destroy(mid)
mon_enter(mid)
mon_exit(mid)
mon_enumerate(vec, maxsize)
mon_waiters (mid, owner, vec, maxsize)
mon_cond_enter(mid)
mon_break(mid)
\s-1MONITOR\s0(mid)
\s-1SAMEMON\s0(m1, m2)
.ft R
.fi
.SS "Thread Synchronization: Condition Variables"
.nf
.ft B
cv_create(cv, mid)
cv_destroy(cv)
cv_wait(cv)
cv_notify(cv)
cv_send(cv, tid)
cv_broadcast(cv)
cv_enumerate(vec, maxsize)
cv_waiters(cv, vec, maxsize)
\s-1SAMECV\s0(c1, c2)
.ft R
.fi
.SS "Exception Handling"
.nf
.ft B
exc_handle(pattern, func, arg)
exc_unhandle(\|)
(*exc_bound(pattern, arg))(\|)
exc_notify(pattern)
exc_raise(pattern)
exc_on_exit(func, arg)
exc_uniqpatt(\|)
.ft R
.fi
.SS "Special Context Handling"
.nf
.ft B
lwp_ctxinit(tid, cookie)
lwp_ctxremove(tid, cookie)
lwp_ctxset(save, restore, ctxsize, optimise)
lwp_ctxmemget(mem, tid, ctx)
lwp_ctxmemset(mem, tid, ctx)
lwp_fpset(tid)
lwp_libcset(tid)
.ft R
.fi
.SS "Stack Management"
.nf
.ft B
\s-1CHECK\s0(location, result)
lwp_setstkcache(minsize, numstks)
lwp_newstk(\|)
lwp_datastk(data, size, addr)
lwp_stkcswset(tid, limit)
lwp_checkstkset(tid, limit)
\s-1STKTOP\s0(s)
.ft R
.fi
.SH BUGS
.LP
There is no language support available from C.
.LP
There is no kernel support yet.
Thus system calls in different threads cannot execute in parallel.
.LP
Killing a process that uses the non-blocking I/O library may leave
objects (such as its standard input) in a non-blocking state.
This could cause confusion to the shell.
.bp
.SH "LIST OF LWP LIBRARY FUNCTIONS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
\fBName	Appears on Page	Description\fR
.sp
.nr zZ 1
.so /usr/man/man3/List.3l
.nr zZ 0
.fi
fgetc.3v  x      fgetgraent.3        fgetgren./share/man/man3/Intro.3m                                                                              755       0      12         6704  4424741105  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.3m 1.11 89/03/27 SMI; from UCB 4.3 BSD
.TH INTRO 3M "20 January 1988"
.SH NAME
intro \- introduction to mathematical library functions and constants
.SH SYNOPSIS
.B #include <sys/ieeefp.h>
.PP
.B #include <floatingpoint.h>
.PP
.B #include <math.h>
.SH DESCRIPTION
.IX  introduction  "mathematical library functions"  
.IX  "mathematical library functions, introduction to"
.IX  "library functions" "introduction to mathematical"
The include file
.B <math.h>
contains declarations of all the functions described in Section 3M that
are implemented in the math library,
.BR libm .
.\"Functions in this library are automatically loaded as needed by the
.\"Fortran and Pascal compilers
.\".BR f77 (1)
.\"and
.\".BR pc (1);
C programs should be linked with the the 
.B \-lm
option in order to use this library.
.PP
.B <sys/ieeefp.h>
and
.B <floatingpoint.h>
define certain types and constants used for 
.B libm
exception handling, conforming to
.SM ANSI/IEEE
Std 754-1985, the
.IR "\s-1IEEE\s0 Standard for Binary Floating-Point Arithmetic" .
.SH "ACKNOWLEDGEMENT"
.LP
The Sun version of
.B libm
is based upon and developed from ideas embodied and codes contained in
4.3 BSD, which may not be compatible with earlier BSD or
.SM UNIX
implementations.
.SH "IEEE ENVIRONMENT"
The
.SM IEEE
Standard specifies modes for rounding direction,
precision, and exception trapping,
and status reflecting accrued exceptions.
These modes and status constitute the
.SM IEEE
run-time environment.
On Sun-2 and Sun-3 systems  without 68881 floating-point co-processors,
only the default rounding direction to nearest is available,
only the default non-stop exception handling is available,
and accrued exception bits are not maintained.
.SH "IEEE EXCEPTION HANDLING"
The
.SM IEEE
Standard specifies exception handling for
.BR aint ,
.BR ceil ,
.BR floor ,
.BR irint ,
.BR remainder ,
.BR rint ,
and
.BR sqrt ,
and suggests appropriate exception handling for
.BR fp_class ,
.BR copysign ,
.BR fabs ,
.BR finite ,
.BR fmod ,
.BR isinf ,
.BR isnan ,
.BR ilogb ,
.BR ldexp ,
.BR logb ,
.BR nextafter ,
.BR scalb ,
.BR scalbn
and
.BR signbit ,
but does not specify exception handling for the other
.B libm
functions.
.LP
For these other unspecified functions the spirit of the
.SM IEEE
Standard is generally followed in 
.B libm
by handling invalid operand, singularity (division by zero),
overflow, and underflow exceptions, as much as possible,
in the same way they are handled for the fundamental floating-point
operations such as addition and multiplication. 
.PP
These unspecified functions
are usually not quite correctly rounded, may not observe the optional
rounding directions, and may not set the inexact exception correctly.
.br
.ne 8
.SH "SYSTEM V EXCEPTION HANDLING"
The 
.I System V Interface Definition
(\c
.SM SVID\c
)
specifies exception handling for some 
.B libm 
functions:
.BR j0(\|) ,
.BR j1(\|) ,
.BR jn(\|) ,
.BR y0(\|) ,
.BR y1(\|) ,
.BR yn(\|) ,
.BR exp(\|) ,
.BR log(\|) ,
.BR log10(\|) ,
.BR pow(\|) ,
.BR sqrt(\|) ,
.BR hypot(\|) ,
.BR lgamma(\|) ,
.BR sinh(\|) ,
.BR cosh(\|) ,
.BR sin(\|) ,
.BR cos(\|) ,
.BR tan(\|) ,
.BR asin(\|) ,
.BR acos(\|) ,
and
.BR atan2(\|) .
See
.BR matherr (3M)
for a discussion of the extent to which Sun's implementation of
.B libm
follows the
.SM SVID
when it is consistent with the
.SM IEEE
Standard and with hardware efficiency.
.br
.bp
.SH "LIST OF MATH LIBRARY FUNCTIONS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
.sp
.nr zZ 1
.so /usr/man/man3/List.3m
.nr zZ 0
.fi
EE
Std 754-1985, the
.IR "\s-1IEEE\s0 Standard for Binary Fl./share/man/man3/Intro.3r                                                                              755       0      12         3177  4424741105  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.3r 1.18 89/03/27 SMI;
.TH INTRO 3R "4 September 1987"
.SH NAME
intro \- introduction to RPC service library functions and protocols
.SH DESCRIPTION
.IX "RPC protocol specifications"
.IX "protocol specifications"
.IX "RPC library functions, introduction to"
.IX introduction "RPC library functions"
.IX "library functions"  "introduction to RPC"
.LP
These functions constitute the
.SM RPC
service library. Most of these describe
.SM RPC
protocols. The
.SM PROTOCOL
section describes how to access the protocol
description file.  This file may be compiled with 
.BR rpcgen (1) 
to produce data definitions and
.SM XDR
routines. Procompiled versions of header files sometimes 
exist as
.B <rpcsvc/*.h>
and precompiled
.SM XDR
routines and programming interfaces to
the protocols sometimes exist in
.IR librpcsvc .
Warning: some of these header files and
.SM XDR
routines were hand-written because
they existed before
.I rpcgen.
They do not correspond to their protocol description file.
In order to get the link editor to load this library,
use the
.B \-lrpcsvc
option of
.BR cc (1V).
Information about the availability of programming interfaces to these
protocols is available under
.SM PROGRAMMING
section of each manual page. 
.LP
Some routines in the 
.B librpcsvc
library do not correspond to protocols, but are useful utilities for
.SM RPC
programming. These are distinguished by the presence of the
.SM SYNOPSIS
section instead of the usual
.SM PROTOCOL
section.
.ne 10
.SH "LIST OF STANDARD RPC SERVICES"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
\fBName	Appears on Page	Description\fR
.sp
.nr zZ 1
.so /usr/man/man3/List.3r
.nr zZ 0
.fi
.3v r       box.3x .  4    	bsearch.3  .  H    	bstring.3  r  `    byteorder.3n  `  p    bzero.3       cabs.3m       calloc.3 3m       
callrpc.3n        cbc_crypt.3       	cbreak.3v 3       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x 3   (  "  class.3m  3   <  #  clear.3v    P  $  clea./share/man/man3/Intro.3v                                                                              755       0      12         1273  4424741106  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.3v 1.14 89/03/27 SMI; 
.TH INTRO 3V "4 September 1987"
.SH NAME
intro \- introduction to System V functions
.SH SYNOPSIS
.B /usr/5bin/cc
.SH DESCRIPTION
.IX  introduction  "System V library functions"
.IX  "System V library functions, introduction to"
.IX  "library functions"  "introduction to System V"
These functions are contained in the System V library,
.IR /usr/5lib/libc.a .  
They are automatically linked when you compile a 
.B C
program with the 
.B C
compiler in
.BR /usr/5bin/cc .
.ne 10
.SH "LIST OF SYSTEM V LIBRARY FUNCTIONS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf 
\fBName	Appears on Page	Description\fR 
.sp 
.nr zZ 1 
.so /usr/man/man3/List.3v
.nr zZ 0
.fi
agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  m    
  
asctime.3v m    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v m     
  atan.3m      
  atan./share/man/man3/List.3                                                                                755       0      12       111351  4424741104   7744                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.3 1.15 89/03/27 SMI
.if \n(zZ=1 .ig zZ
.TH LIST 3 "22 March 1989"
.SH LIST OF LIBRARY FUNCTIONS
.nf
.sp
.ta 20n; +20n
\fBName 	Appears on Page	Description\fR
.sp
.zZ
\-	\fBbstring\fR(3)	 bit and byte string operations
\-	\fBbyteorder\fR(3N)	 convert values between host and network byte order
\-	\fBctime\fR(3)	 convert date and time
\-	\fBctype\fR(3)	 character classification and conversion macros and functions
\-	\fBcurses\fR(3X)	 cursor addressing and screen display library
\-	\fBdbm\fR(3X)	 data base subroutines
\-	\fBdirectory\fR(3)	 directory operations
\-	\fBethers\fR(3N)	 Ethernet address mapping operations
\-	\fBinet\fR(3N)	 Internet address manipulation
\-	\fBintro\fR(3L)	 introduction to the lightweight process library (LWP)
\-	\fBintro\fR(3M)	 introduction to mathematical library functions
\-	\fBintro\fR(3R)	 introduction to RPC service library and protocols
\-	\fBintro\fR(3V)	 introduction to System V functions
\-	\fBmp\fR(3X)	 multiple precision integer arithmetic
\-	\fBndbm\fR(3)	 data base subroutines
\-	\fBplot\fR(3X)	 graphics interface
\-	\fBrpc\fR(3N)	 library routines for remote procedure calls
\-	\fBstring\fR(3)	 string operations
\-	\fBtermcap\fR(3X)	 terminal independent operation routines
\-	\fBvalues\fR(3)	 machine-dependent values
\-	\fBxdr\fR(3N)	 library routines for external data representation
\fB_crypt(\|)\fR	\fBcrypt\fR(3)	 password and data encryption
\fBa64l(\|)\fR	\fBa64l\fR(3)	 convert between long integer and base-64 ASCII string
\fBabort(\|)\fR	\fBabort\fR(3)	 generate a fault
\fBabs(\|)\fR	\fBabs\fR(3)	 integer absolute value
\fBaddexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBaddexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBaddmntent(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBaddmntent(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBalloca(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBalloca(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBalphasort(\|)\fR	\fBscandir\fR(3)	 scan a directory
\fBalphasort(\|)\fR	\fBscandir\fR(3)	 scan a directory
\fBarc(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBasctime(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBassert(\|)\fR	\fBassert\fR(3)	 program verification
\fBatof(\|)\fR	\fBstrtod\fR(3)	 convert string to double-precision number
\fBatoi(\|)\fR	\fBstrtol\fR(3)	 convert string to integer
\fBatol(\|)\fR	\fBstrtol\fR(3)	 convert string to integer
\fBaudit(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBaudit_args(\|)\fR	\fBaudit_args\fR(3)	 produce text audit message
\fBaudit_text(\|)\fR	\fBaudit_args\fR(3)	 produce text audit message
\fBauth_destroy(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBauthdes_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBauthdes_getcred(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBauthnon_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBauthunix_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBauthunix_create_default(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBbcmp(\|)\fR	\fBbstring\fR(3)	 bit and byte string operations
\fBbcopy(\|)\fR	\fBbstring\fR(3)	 bit and byte string operations
\fBbindresvport(\|)\fR	\fBbindresvport\fR(3N)	 bind a socket to a privileged IP port
\fBbsearch(\|)\fR	\fBbsearch\fR(3)	 binary search a sorted table
\fBbzero(\|)\fR	\fBbstring\fR(3)	 bit and byte string operations
\fBcalloc(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBcallrpc(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBcbc_crypt(\|)\fR	\fBdes_crypt\fR(3)	 fast DES encryption
\fBcfree(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBcircle(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBclearerr(\|)\fR	\fBferror\fR(3S)	 stream status inquiries
\fBclnt_broadcast(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_call(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_destroy(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_freeres(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_geterr(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_pcreateerror(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_perrno(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_perror(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_sperrno(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnt_sperror(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclntraw_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclnttcp_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclntudp_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBclock(\|)\fR	\fBclock\fR(3C)	 report CPU time used
\fBclosedir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBcloselog(\|)\fR	\fBsyslog\fR(3)	 control system log
\fBclosepl(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBcont(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBcontrol(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBcrypt(\|)\fR	\fBcrypt\fR(3)	 password and data encryption
\fBctermid(\|)\fR	\fBctermid\fR(3S)	 generate filename for terminal
\fBcuserid(\|)\fR	\fBcuserid\fR(3S)	 get character login name of the user
\fBdbm_clearerr(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_close(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_delete(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_error(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_fetch(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_firstkey(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_nextkey(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_open(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbm_store(\|)\fR	\fBndbm\fR(3)	 data base subroutines
\fBdbminit(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBdecimal_to_double(\|)\fR	\fBdecimal_to_floating\fR(3)	 convert decimal record to floating-point value
\fBdecimal_to_extended(\|)\fR	\fBdecimal_to_floating\fR(3)	 convert decimal record to floating-point value
\fBdecimal_to_single(\|)\fR	\fBdecimal_to_floating\fR(3)	 convert decimal record to floating-point value
\fBdelete(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBdes_crypt(\|)\fR	\fBdes_crypt\fR(3)	 fast DES encryption
\fBdes_setparity(\|)\fR	\fBdes_crypt\fR(3)	 fast DES encryption
\fBdn_comp(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBdn_expand(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBdouble_to_decimal(\|)\fR	\fBfloating_to_decimal\fR(3)	 convert floating-point value to decimal record
\fBdrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBdysize(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBecb_crypt(\|)\fR	\fBdes_crypt\fR(3)	 fast DES encryption
\fBeconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBecvt(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBedata(\|)\fR	\fBend\fR(3)	 last locations in program
\fBencrypt(\|)\fR	\fBcrypt\fR(3)	 password and data encryption
\fBend(\|)\fR	\fBend\fR(3)	 last locations in program
\fBendac(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBendexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBendfsent(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBendgraent(\|)\fR	\fBgetgraent\fR(3)	 get group adjunct file entry
\fBendgrent(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBendhostent(\|)\fR	\fBgethostent\fR(3N)	 get network host entry
\fBendmntent(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBendnetent(\|)\fR	\fBgetnetent\fR(3N)	 get network entry
\fBendnetgrent(\|)\fR	\fBgetnetgrent\fR(3N)	 get network group entry
\fBendprotoent(\|)\fR	\fBgetprotoent\fR(3N)	 get protocol entry
\fBendpwaent(\|)\fR	\fBgetpwaent\fR(3)	 get password adjunct file entry
\fBendpwent(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBendservent(\|)\fR	\fBgetservent\fR(3N)	 get service entry
\fBendttyent(\|)\fR	\fBgetttyent\fR(3)	 get ttytab file entry
\fBendusershell(\|)\fR	\fBgetusershell\fR(3)	 get legal user shells
\fBerand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBerase(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBerrno(\|)\fR	\fBperror\fR(3)	 system error messages
\fBetext(\|)\fR	\fBend\fR(3)	 last locations in program
\fBether_aton(\|)\fR	\fBethers\fR(3N)	 Ethernet address mapping operations
\fBether_hostton(\|)\fR	\fBethers\fR(3N)	 Ethernet address mapping operations
\fBether_line(\|)\fR	\fBethers\fR(3N)	 Ethernet address mapping operations
\fBether_ntoa(\|)\fR	\fBethers\fR(3N)	 Ethernet address mapping operations
\fBether_ntohost(\|)\fR	\fBethers\fR(3N)	 Ethernet address mapping operations
\fBexecl(\|)\fR	\fBexecl\fR(3)	 execute a file
\fBexecle(\|)\fR	\fBexecl\fR(3)	 execute a file
\fBexeclp(\|)\fR	\fBexecl\fR(3)	 execute a file
\fBexecv(\|)\fR	\fBexecl\fR(3)	 execute a file
\fBexecvp(\|)\fR	\fBexecl\fR(3)	 execute a file
\fBexit(\|)\fR	\fBexit\fR(3)	 terminate a process after performing cleanup
\fBexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBextended_to_decimal(\|)\fR	\fBfloating_to_decimal\fR(3)	 convert floating-point value to decimal record
\fBfclose(\|)\fR	\fBfclose\fR(3S)	 close or flush a stream
\fBfconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBfcvt(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBfdate(\|)\fR	\fBfdate\fR(3)	 return date and time in an ASCII string
\fBfdopen(\|)\fR	\fBfopen\fR(3S)	 open a stream
\fBfeof(\|)\fR	\fBferror\fR(3S)	 stream status inquiries
\fBferror(\|)\fR	\fBferror\fR(3S)	 stream status inquiries
\fBfetch(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBfflush(\|)\fR	\fBfclose\fR(3S)	 close or flush a stream
\fBffs(\|)\fR	\fBbstring\fR(3)	 bit and byte string operations
\fBfgetc(\|)\fR	\fBgetc\fR(3S)	 get character or integer from stream
\fBfgetgraent(\|)\fR	\fBgetgraent\fR(3)	 get group adjunct file entry
\fBfgetgrent(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBfgetpwaent(\|)\fR	\fBgetpwaent\fR(3)	 get password adjunct file entry
\fBfgetpwent(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBfgets(\|)\fR	\fBgets\fR(3S)	 get a string from a stream
\fBfile(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBfile_to_decimal(\|)\fR	\fBstring_to_decimal\fR(3)	 parse characters into decimal record
\fBfileno(\|)\fR	\fBferror\fR(3S)	 stream status inquiries
\fBfirstkey(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBfloatingpoint(\|)\fR	\fBfloatingpoint\fR(3)	 IEEE floating point definitions
\fBfopen(\|)\fR	\fBfopen\fR(3S)	 open a stream
\fBfprintf(\|)\fR	\fBprintf\fR(3S)	 formatted output conversion
\fBfputc(\|)\fR	\fBputc\fR(3S)	 put character or word on a stream
\fBfputs(\|)\fR	\fBputs\fR(3S)	 put a string on a stream
\fBfread(\|)\fR	\fBfread\fR(3S)	 buffered binary input/output
\fBfree(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBfreopen(\|)\fR	\fBfopen\fR(3S)	 open a stream
\fBfscanf(\|)\fR	\fBscanf\fR(3S)	 formatted input conversion
\fBfseek(\|)\fR	\fBfseek\fR(3S)	 reposition a stream
\fBftell(\|)\fR	\fBfseek\fR(3S)	 reposition a stream
\fBftime(\|)\fR	\fBtime\fR(3C)	 get date and time
\fBftok(\|)\fR	\fBftok\fR(3)	 standard interprocess communication package
\fBftw(\|)\fR	\fBftw\fR(3)	 walk a file tree
\fBfunc_to_decimal(\|)\fR	\fBstring_to_decimal\fR(3)	 parse characters into decimal record
\fBfwrite(\|)\fR	\fBfread\fR(3S)	 buffered binary input/output
\fBgcd(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBgconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBgcvt(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBget(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBget_myaddress(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBgetacdir(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBgetacflg(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBgetacmin(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBgetauditflagsbin(\|)\fR	\fBgetauditflags\fR(3)	 convert audit flag specifications
\fBgetauditflagschar(\|)\fR	\fBgetauditflags\fR(3)	 convert audit flag specifications
\fBgetc(\|)\fR	\fBgetc\fR(3S)	 get character or integer from stream
\fBgetchar(\|)\fR	\fBgetc\fR(3S)	 get character or integer from stream
\fBgetcwd(\|)\fR	\fBgetcwd\fR(3)	 get pathname of current working directory
\fBgetenv(\|)\fR	\fBgetenv\fR(3)	 return value for environment name
\fBgetexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBgetexportopt(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBgetfauditflags(\|)\fR	\fBgetfaudflgs\fR(3)	 generates the process audit state
\fBgetfsent(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBgetfsfile(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBgetfsspec(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBgetfstype(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBgetgraent(\|)\fR	\fBgetgraent\fR(3)	 get group adjunct file entry
\fBgetgranam(\|)\fR	\fBgetgraent\fR(3)	 get group adjunct file entry
\fBgetgrent(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBgetgrgid(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBgetgrnam(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBgethostbyaddr(\|)\fR	\fBgethostent\fR(3N)	 get network host entry
\fBgethostbyname(\|)\fR	\fBgethostent\fR(3N)	 get network host entry
\fBgethostent(\|)\fR	\fBgethostent\fR(3N)	 get network host entry
\fBgetlogin(\|)\fR	\fBgetlogin\fR(3)	 get login name
\fBgetmntent(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBgetnetbyaddr(\|)\fR	\fBgetnetent\fR(3N)	 get network entry
\fBgetnetbyname(\|)\fR	\fBgetnetent\fR(3N)	 get network entry
\fBgetnetent(\|)\fR	\fBgetnetent\fR(3N)	 get network entry
\fBgetnetgrent(\|)\fR	\fBgetnetgrent\fR(3N)	 get network group entry
\fBgetnetname(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBgetopt(\|)\fR	\fBgetopt\fR(3)	 get option letter from argument vector
\fBgetpass(\|)\fR	\fBgetpass\fR(3)	 read a password
\fBgetprotobyname(\|)\fR	\fBgetprotoent\fR(3N)	 get protocol entry
\fBgetprotobynumber(\|)\fR	\fBgetprotoent\fR(3N)	 get protocol entry
\fBgetprotoent(\|)\fR	\fBgetprotoent\fR(3N)	 get protocol entry
\fBgetpw(\|)\fR	\fBgetpw\fR(3)	 get name from uid
\fBgetpwaent(\|)\fR	\fBgetpwaent\fR(3)	 get password adjunct file entry
\fBgetpwanam(\|)\fR	\fBgetpwaent\fR(3)	 get password adjunct file entry
\fBgetpwent(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBgetpwnam(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBgetpwuid(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBgetrpcbyname(\|)\fR	\fBgetrpcent\fR(3N)	 get RPC entry
\fBgetrpcbynumber(\|)\fR	\fBgetrpcent\fR(3N)	 get RPC entry
\fBgetrpcent(\|)\fR	\fBgetrpcent\fR(3N)	 get RPC entry
\fBgets(\|)\fR	\fBgets\fR(3S)	 get a string from a stream
\fBgetservbyname(\|)\fR	\fBgetservent\fR(3N)	 get service entry
\fBgetservbyport(\|)\fR	\fBgetservent\fR(3N)	 get service entry
\fBgetservent(\|)\fR	\fBgetservent\fR(3N)	 get service entry
\fBgetttyent(\|)\fR	\fBgetttyent\fR(3)	 get ttytab file entry
\fBgetttynam(\|)\fR	\fBgetttyent\fR(3)	 get ttytab file entry
\fBgetusershell(\|)\fR	\fBgetusershell\fR(3)	 get legal user shells
\fBgetw(\|)\fR	\fBgetc\fR(3S)	 get character or integer from stream
\fBgetwd(\|)\fR	\fBgetwd\fR(3)	 get current working directory pathname
\fBgmtime(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBgrpauth(\|)\fR	\fBpwdauth\fR(3)	 password authentication routines
\fBgsignal(\|)\fR	\fBssignal\fR(3)	 software signals
\fBgtty(\|)\fR	\fBstty\fR(3C)	 set and get terminal state
\fBhasmntopt(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBhcreate(\|)\fR	\fBhsearch\fR(3)	 manage hash search tables
\fBhdestroy(\|)\fR	\fBhsearch\fR(3)	 manage hash search tables
\fBhost2netname(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBhsearch(\|)\fR	\fBhsearch\fR(3)	 manage hash search tables
\fBhtonl(\|)\fR	\fBbyteorder\fR(3N)	 convert values between host and network byte order
\fBhtons(\|)\fR	\fBbyteorder\fR(3N)	 convert values between host and network byte order
\fBindex(\|)\fR	\fBstring\fR(3)	 string operations
\fBinet_addr(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinet_lnaof(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinet_makeaddr(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinet_netof(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinet_network(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinet_ntoa(\|)\fR	\fBinet\fR(3N)	 Internet address manipulation
\fBinformation(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBinitgroups(\|)\fR	\fBinitgroups\fR(3)	 initialize group access list
\fBinitstate(\|)\fR	\fBrandom\fR(3)	 routines for changing random number generators
\fBinnetgr(\|)\fR	\fBgetnetgrent\fR(3N)	 get network group entry
\fBinsque(\|)\fR	\fBinsque\fR(3)	 insert/remove element from a queue
\fBisalnum(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisalpha(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisascii(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisatty(\|)\fR	\fBttyname\fR(3)	 find name of a terminal
\fBiscntrl(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisdigit(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisgraph(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBislower(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisprint(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBispunct(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBissecure(\|)\fR	\fBissecure\fR(3)	 indicates whether system is running secure
\fBisspace(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisupper(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBisxdigit(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBitom(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBjrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBkey_decryptsession(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBkey_encryptsession(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBkey_gendes(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBkey_setsecret(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBkvm_close(\|)\fR	\fBkvm_open\fR(3K)	 specify a kernel to examine
\fBkvm_getcmd(\|)\fR	\fBkvm_getu\fR(3K)	 get the u-area or invocation arguments for a process
\fBkvm_getproc(\|)\fR	\fBkvm_nextproc\fR(3K)	 read system process structures
\fBkvm_getu(\|)\fR	\fBkvm_getu\fR(3K)	 get the u-area or invocation arguments for a process
\fBkvm_nextproc(\|)\fR	\fBkvm_nextproc\fR(3K)	 read system process structures
\fBkvm_nlist(\|)\fR	\fBkvm_nlist\fR(3K)	 obtain kernel symbol table information
\fBkvm_open(\|)\fR	\fBkvm_open\fR(3K)	 specify a kernel to examine
\fBkvm_read(\|)\fR	\fBkvm_read\fR(3K)	 copy data to or from a kernel image or running system
\fBkvm_setproc(\|)\fR	\fBkvm_nextproc\fR(3K)	 read system process structures
\fBkvm_write(\|)\fR	\fBkvm_read\fR(3K)	 copy data to or from a kernel image or running system
\fBl64a(\|)\fR	\fBa64l\fR(3)	 convert between long integer and base-64 ASCII string
\fBlabel(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBlcong48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBldaclose(\|)\fR	\fBldclose\fR(3X)	 close a COFF file
\fBldahread(\|)\fR	\fBldahread\fR(3X)	 read the archive header of a member of a COFF archive file
\fBldaopen(\|)\fR	\fBldopen\fR(3X)	 open a COFF file for reading
\fBldclose(\|)\fR	\fBldclose\fR(3X)	 close a COFF file
\fBldfcn(\|)\fR	\fBldfcn\fR(3)	 common object file access routines
\fBldfhread(\|)\fR	\fBldfhread\fR(3X)	 read the file header of a COFF file
\fBldgetname(\|)\fR	\fBldgetname\fR(3X)	 retrieve symbol name for COFF file symbol table entry
\fBldlinit(\|)\fR	\fBldlread\fR(3X)	 manipulate line number entries of a COFF file function
\fBldlitem(\|)\fR	\fBldlread\fR(3X)	 manipulate line number entries of a COFF file function
\fBldlread(\|)\fR	\fBldlread\fR(3X)	 manipulate line number entries of a COFF file function
\fBldlseek(\|)\fR	\fBldlseek\fR(3X)	 seek to line number entries of a section of a COFF file
\fBldnlseek(\|)\fR	\fBldlseek\fR(3X)	 seek to line number entries of a section of a COFF file
\fBldnrseek(\|)\fR	\fBldrseek\fR(3X)	 seek to relocation entries of a section of a COFF file
\fBldnshread(\|)\fR	\fBldshread\fR(3X)	 read an indexed\/named section header of a COFF file
\fBldnsseek(\|)\fR	\fBldsseek\fR(3X)	 seek to an indexed\/named section of a COFF file
\fBldohseek(\|)\fR	\fBldohseek\fR(3X)	 seek to the optional file header of a COFF file
\fBldopen(\|)\fR	\fBldopen\fR(3X)	 open a COFF file for reading
\fBldrseek(\|)\fR	\fBldrseek\fR(3X)	 seek to relocation entries of a section of a COFF file
\fBldshread(\|)\fR	\fBldshread\fR(3X)	 read an indexed\/named section header of a COFF file
\fBldsseek(\|)\fR	\fBldsseek\fR(3X)	 seek to an indexed\/named section of a COFF file
\fBldtbindex(\|)\fR	\fBldtbindex\fR(3X)	 compute the index of a symbol table entry of a COFF file
\fBldtbread(\|)\fR	\fBldtbread\fR(3X)	 read an indexed symbol table entry of a COFF file
\fBldtbseek(\|)\fR	\fBldtbseek\fR(3X)	 seek to the symbol table of a COFF file
\fBlfind(\|)\fR	\fBlsearch\fR(3)	 linear search and update
\fBline(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBlinemod(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBlocaltime(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBlockf(\|)\fR	\fBlockf\fR(3)	 advisory record locking on files
\fBlongjmp(\|)\fR	\fBsetjmp\fR(3)	 non-local goto
\fBlrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBlsearch(\|)\fR	\fBlsearch\fR(3)	 linear search and update
\fBmadd(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmalloc(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBmalloc_debug(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBmalloc_verify(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBmdiv(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmemalign(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBmemccpy(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmemchr(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmemcmp(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmemcpy(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmemory(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmemset(\|)\fR	\fBmemory\fR(3)	 memory operations
\fBmfree(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmin(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmkstemp(\|)\fR	\fBmktemp\fR(3)	 make a unique file name
\fBmktemp(\|)\fR	\fBmktemp\fR(3)	 make a unique file name
\fBmoncontrol(\|)\fR	\fBmonitor\fR(3)	 prepare execution profile
\fBmonitor(\|)\fR	\fBmonitor\fR(3)	 prepare execution profile
\fBmonstartup(\|)\fR	\fBmonitor\fR(3)	 prepare execution profile
\fBmout(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmove(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBmrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBmsub(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmtox(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBmult(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBnetname2host(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBnetname2user(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBnextkey(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBnice(\|)\fR	\fBnice\fR(3C)	 change priority of a process
\fBnlist(\|)\fR	\fBnlist\fR(3)	 get entries from name list
\fBnrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBntohl(\|)\fR	\fBbyteorder\fR(3N)	 convert values between host and network byte order
\fBntohs(\|)\fR	\fBbyteorder\fR(3N)	 convert values between host and network byte order
\fBon_exit(\|)\fR	\fBon_exit\fR(3)	 name termination handler
\fBopendir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBopenlog(\|)\fR	\fBsyslog\fR(3)	 control system log
\fBopenpl(\|)\fR	\fBplot\fR\&(3X)	 graphics interface
\fBoptarg(\|)\fR	\fBgetopt\fR(3)	 get option letter from argument vector
\fBoptind(\|)\fR	\fBgetopt\fR(3)	 get option letter from argument vector
\fBpause(\|)\fR	\fBpause\fR(3C)	 stop until signal
\fBpclose(\|)\fR	\fBpopen\fR(3S)	 open or close a pipe (for I/O) from or to a process
\fBperror(\|)\fR	\fBperror\fR(3)	 system error messages
\fBpmap_getmaps(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBpmap_getport(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBpmap_rmtcall(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBpmap_set(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBpmap_unset(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBpoint(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBpopen(\|)\fR	\fBpopen\fR(3S)	 open or close a pipe (for I/O) from or to a process
\fBpow(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBprintf(\|)\fR	\fBprintf\fR(3S)	 formatted output conversion
\fBprof(\|)\fR	\fBprof\fR(3)	 profile within a function
\fBpsignal(\|)\fR	\fBpsignal\fR(3)	 system signal messages
\fBputc(\|)\fR	\fBputc\fR(3S)	 put character or word on a stream
\fBputchar(\|)\fR	\fBputc\fR(3S)	 put character or word on a stream
\fBputenv(\|)\fR	\fBputenv\fR(3)	 change or add value to environment
\fBputpwent(\|)\fR	\fBputpwent\fR(3)	 write password file entry
\fBputs(\|)\fR	\fBputs\fR(3S)	 put a string on a stream
\fBputw(\|)\fR	\fBputc\fR(3S)	 put character or word on a stream
\fBpwdauth(\|)\fR	\fBpwdauth\fR(3)	 password authentication routines
\fBqsort(\|)\fR	\fBqsort\fR(3)	 quicker sort
\fBrand(\|)\fR	\fBrand\fR(3C)	 simple random number generator
\fBrandom(\|)\fR	\fBrandom\fR(3)	 routines for changing random number generators
\fBrcmd(\|)\fR	\fBrcmd\fR(3N)	 routines for returning a stream to a remote command
\fBre_comp(\|)\fR	\fBregex\fR(3)	 regular expression handler
\fBre_exec(\|)\fR	\fBregex\fR(3)	 regular expression handler
\fBreaddir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBrealloc(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBregex(\|)\fR	\fBregex\fR(3)	 regular expression handler
\fBregexp(\|)\fR	\fBregexp\fR(3)	 regular expression compile and match routines
\fBregisterrpc(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBremexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBremque(\|)\fR	\fBinsque\fR(3)	 insert/remove element from a queue
\fBres_init(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBres_mkquery(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBres_send(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBresolver(\|)\fR	\fBresolver\fR(3)	 resolver routines
\fBrewind(\|)\fR	\fBfseek\fR(3S)	 reposition a stream
\fBrewinddir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBrexec(\|)\fR	\fBrexec\fR(3N)	 return stream to a remote command
\fBrindex(\|)\fR	\fBstring\fR(3)	 string operations
\fBrpc_createrr(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBrpow(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fBrresvport(\|)\fR	\fBrcmd\fR(3N)	 routines for returning a stream to a remote command
\fBrtime(\|)\fR	\fBrtime\fR(3N)	 get remote time
\fBruserok(\|)\fR	\fBrcmd\fR(3N)	 routines for returning a stream to a remote command
\fBscandir(\|)\fR	\fBscandir\fR(3)	 scan a directory
\fBscanf(\|)\fR	\fBscanf\fR(3S)	 formatted input conversion
\fBseconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBseed48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBseekdir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBsetac(\|)\fR	\fBgetacinfo\fR(3)	 get audit control file information
\fBsetbuf(\|)\fR	\fBsetbuf\fR(3S)	 assign buffering to a stream
\fBsetbuffer(\|)\fR	\fBsetbuf\fR(3S)	 assign buffering to a stream
\fBsetegid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBseteuid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBsetexportent(\|)\fR	\fBexportent\fR(3)	 get exported file system information
\fBsetfsent(\|)\fR	\fBgetfsent\fR(3)	 get file system descriptor file entry
\fBsetgid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBsetgraent(\|)\fR	\fBgetgraent\fR(3)	 get group adjunct file entry
\fBsetgrent(\|)\fR	\fBgetgrent\fR(3)	 get group file entry
\fBsethostent(\|)\fR	\fBgethostent\fR(3N)	 get network host entry
\fBsetjmp(\|)\fR	\fBsetjmp\fR(3)	 non-local goto
\fBsetkey(\|)\fR	\fBcrypt\fR(3)	 password and data encryption
\fBsetlinebuf(\|)\fR	\fBsetbuf\fR(3S)	 assign buffering to a stream
\fBsetlogmask(\|)\fR	\fBsyslog\fR(3)	 control system log
\fBsetmntent(\|)\fR	\fBgetmntent\fR(3)	 get file system descriptor file entry
\fBsetnetent(\|)\fR	\fBgetnetent\fR(3N)	 get network entry
\fBsetnetgrent(\|)\fR	\fBgetnetgrent\fR(3N)	 get network group entry
\fBsetprotoent(\|)\fR	\fBgetprotoent\fR(3N)	 get protocol entry
\fBsetpwaent(\|)\fR	\fBgetpwaent\fR(3)	 get password adjunct file entry
\fBsetpwent(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBsetpwfile(\|)\fR	\fBgetpwent\fR(3)	 get password file entry
\fBsetrgid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBsetruid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBsetservent(\|)\fR	\fBgetservent\fR(3N)	 get service entry
\fBsetstate(\|)\fR	\fBrandom\fR(3)	 routines for changing random number generators
\fBsetttyent(\|)\fR	\fBgetttyent\fR(3)	 get ttytab file entry
\fBsetuid(\|)\fR	\fBsetuid\fR(3)	 set user and group ID
\fBsetusershell(\|)\fR	\fBgetusershell\fR(3)	 get legal user shells
\fBsetvbuf(\|)\fR	\fBsetbuf\fR(3S)	 assign buffering to a stream
\fBsfconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBsgconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBsigfpe(\|)\fR	\fBsigfpe\fR(3)	 signal handling for specific SIGFPE codes
\fBsiginterrupt(\|)\fR	\fBsiginterrupt\fR(3)	 allow signals to interrupt system calls
\fBsignal(\|)\fR	\fBsignal\fR(3)	 simplified software signal facilities
\fBsingle_to_decimal(\|)\fR	\fBfloating_to_decimal\fR(3)	 convert floating-point value to decimal record
\fBsleep(\|)\fR	\fBsleep\fR(3)	 suspend execution for interval
\fBspace(\|)\fR	\fBplot\fR(3X)	 graphics interface
\fBsprintf(\|)\fR	\fBprintf\fR(3S)	 formatted output conversion
\fBsrand(\|)\fR	\fBrand\fR(3C)	 simple random number generator
\fBsrand48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBsrandom(\|)\fR	\fBrandom\fR(3)	 routines for changing random number generators
\fBsscanf(\|)\fR	\fBscanf\fR(3S)	 formatted input conversion
\fBssignal(\|)\fR	\fBssignal\fR(3)	 software signals
\fBstore(\|)\fR	\fBdbm\fR(3X)	 data base subroutines
\fBstrcat(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrchr(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrcmp(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrcpy(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrcspn(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrdup(\|)\fR	\fBstring\fR(3)	 string operations
\fBstring_to_decimal(\|)\fR(3)	\fBstring_to_decimal\fR(3)	 parse characters into decimal record
\fBstrlen(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrncat(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrncmp(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrncpy(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrpbrk(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrrchr(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrspn(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrtod(\|)\fR	\fBstrtod\fR(3)	 convert string to double-precision number
\fBstrtok(\|)\fR	\fBstring\fR(3)	 string operations
\fBstrtol(\|)\fR	\fBstrtol\fR(3)	 convert string to integer
\fBstty(\|)\fR	\fBstty\fR(3C)	 set and get terminal state
\fBsvc_destroy(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_fds(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_freeargs(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_getargs(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_getcaller(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_getreq(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_register(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_run(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_sendreply(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvc_unregister(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_auth(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_decode(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_noproc(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_noprog(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_progvers(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_systemerr(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcerr_weakauth(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcfd_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcraw_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvctcp_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBsvcudp_create(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBswab(\|)\fR	\fBswab\fR(3)	 swap bytes
\fBsys_errlist(\|)\fR	\fBperror\fR(3)	 system error messages
\fBsys_nerr(\|)\fR	\fBperror\fR(3)	 system error messages
\fBsys_siglist(\|)\fR	\fBpsignal\fR(3)	 system signal messages
\fBsyslog(\|)\fR	\fBsyslog\fR(3)	 control system log
\fBsystem(\|)\fR	\fBsystem\fR(3)	 issue a shell command
\fBtdelete(\|)\fR	\fBtsearch\fR(3)	 manage binary search trees
\fBtelldir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBtempnam(\|)\fR	\fBtmpnam\fR(3S)	 create a name for a temporary file
\fBtfind(\|)\fR	\fBtsearch\fR(3)	 manage binary search trees
\fBtgetent(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtgetflag(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtgetnum(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtgetstr(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtgoto(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtime(\|)\fR	\fBtime\fR(3C)	 get date and time
\fBtimegm(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBtimelocal(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBtimes(\|)\fR	\fBtimes\fR(3C)	 get process times
\fBtimezone(\|)\fR	\fBtimezone\fR(3C)	 get time zone name given offset from GMT
\fBtmpfile(\|)\fR	\fBtmpfile\fR(3S)	 create a temporary file
\fBtmpnam(\|)\fR	\fBtmpnam\fR(3S)	 create a name for a temporary file
\fBtoascii(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBtolower(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBtoupper(\|)\fR	\fBctype\fR(3)	 character classification and conversion macros and functions
\fBtputs(\|)\fR	\fBtermcap\fR(3X)	 terminal independent operation routines
\fBtsearch(\|)\fR	\fBtsearch\fR(3)	 manage binary search trees
\fBttyname(\|)\fR	\fBttyname\fR(3)	 find name of a terminal
\fBttyslot(\|)\fR	\fBttyslot\fR(3)	 find the slot in the utmp file of the current process
\fBtwalk(\|)\fR	\fBtsearch\fR(3)	 manage binary search trees
\fBtzset(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBtzsetwall(\|)\fR	\fBctime\fR(3)	 convert date and time
\fBualarm(\|)\fR	\fBualarm\fR(3)	 schedule signal after interval in microseconds
\fBulimit(\|)\fR	\fBulimit\fR(3C)	 get and set user limits
\fBungetc(\|)\fR	\fBungetc\fR(3S)	 push character back into input stream
\fBuser2netname(\|)\fR	\fBrpc\fR(3N)	 RPC services routines
\fBusleep(\|)\fR	\fBusleep\fR(3)	 suspend execution for interval in microseconds
\fButime(\|)\fR	\fButime\fR(3C)	 set file times
\fBvalloc(\|)\fR	\fBmalloc\fR(3)	 memory allocator
\fBvarargs(\|)\fR	\fBvarargs\fR(3)	 handle variable argument list
\fBvfprintf(\|)\fR	\fBvprintf\fR(3S)	 print formatted output of a varargs argument list
\fBvlimit(\|)\fR	\fBvlimit\fR(3C)	 control maximum system resource consumption
\fBvprintf(\|)\fR	\fBvprintf\fR(3S)	 print formatted output of a varargs argument list
\fBvsprintf(\|)\fR	\fBvprintf\fR(3S)	 print formatted output of a varargs argument list
\fBvtimes(\|)\fR	\fBvtimes\fR(3C)	 get information about resource utilization
\fBxdr_accepted_reply(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_array(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_authunix_parms(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_bool(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_bytes(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_callhdr(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_callmsg(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_char(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_destroy(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_double(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_enum(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_float(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_getpos(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxdr_inline(\|)\fR	\fBxdr\fR(3N)	 XDR functions
\fBxtom(\|)\fR	\fBmp\fR(3X)	 multiple precision integer arithmetic
\fByp_all(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_bind(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_first(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_get_default_domain(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_master(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_match(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_next(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_order(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_unbind(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByp_update(\|)\fR	\fBypupdate\fR(3N)	 update YP information
\fBypclnt(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fByperr_string(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
\fBypprot_err(\|)\fR	\fBypclnt\fR(3N)	 Yellow Pages client interface
.fi
canf\fR(3S)	 formatted input conversion
\fBseconvert(\|)\fR	\fBeconvert\fR(3)	 output conversion
\fBseed48(\|)\fR	\fBdrand48\fR(3)	 generate uniformly distributed pseudo-random numbers
\fBseekdir(\|)\fR	\fBdirectory\fR(3)	 directory operations
\fBsetac(\|)\fR	\fBgetacinfo\fR(3)	./share/man/man3/List.3l                                                                               755       0      12        13036  4424741104  10101                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.3l 1.9 89/03/27 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 3L "18 January 1988"
.SH LIST OF LWP LIBRARY FUNCTIONS
.nf
.sp
.ta 20n; +20n
\fBName 	Appears on Page	Description\fR
.sp
.zZ
\fBagt_create(\|)\fR	\fBagt_create\fR(3L)	 map LWP events into messages
\fBagt_enumerate(\|)\fR	\fBagt_create\fR(3L)	 map LWP events into messages
\fBagt_trap(\|)\fR	\fBagt_create\fR(3L)	 map LWP events into messages
\fBCHECK(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBcv_broadcast(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_create(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_destroy(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_enumerate(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_notify(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_send(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_wait(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBcv_waiters(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBexc_bound(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_handle(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_notify(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_on_exit(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_raise(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_unhandle(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBexc_uniqpatt(\|)\fR	\fBexc_handle\fR(3L)	 LWP exception handling
\fBlwp_checkstkset(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBlwp_create(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBlwp_ctxinit(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_ctxremove(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_ctxset(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_ctxmemget(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_ctxmemset(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_destroy(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBlwp_enumerate(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_errstr(\|)\fR	\fBlwp_perror\fR(3L)	 LWP error handling
\fBlwp_fpset(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_geterr(\|)\fR	\fBlwp_perror\fR(3L)	 LWP error handling
\fBlwp_getstate(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_setregs(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_getregs(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_ping(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_join(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_libcset(\|)\fR	\fBlwp_ctxinit\fR(3L)	 special LWP context operations
\fBlwp_newstk(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBlwp_datastk(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBlwp_perror(\|)\fR	\fBlwp_perror\fR(3L)	 LWP error handling
\fBlwp_resched(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_resume(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_self(\|)\fR	\fBlwp_status\fR(3L)	 LWP status information
\fBlwp_setpri(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_setstkcache(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBlwp_sleep(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_stkcswset(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBlwp_suspend(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBlwp_yield(\|)\fR	\fBlwp_yield\fR(3L)	 control LWP scheduling
\fBMINSTACKSZ(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
\fBmon_break(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_cond_enter(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_create(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_destroy(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_enter(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_enumerate(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_exit(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmon_waiters(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBMONITOR(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBmsg_enumrecv(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBmsg_enumsend(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBmsg_recv(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBMSG_RECVALL(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBmsg_reply(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBmsg_send(\|)\fR	\fBmsg_send\fR(3L)	 LWP send and receive messages
\fBpod_exit(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBpod_getexit(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBpod_getmaxpri(\|)\fR	\fBpod_setmaxpri\fR(3L)	 control LWP scheduling priority
\fBpod_getmaxsize(\|)\fR	\fBpod_setmaxpri\fR(3L)	 control LWP scheduling priority
\fBpod_setexit(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBpod_setmaxpri(\|)\fR	\fBpod_setmaxpri\fR(3L)	 control LWP scheduling priority
\fBSAMECV(\|)\fR	\fBcv_create\fR(3L)	 manage LWP condition variables
\fBSAMEMON(\|)\fR	\fBmon_create\fR(3L)	 LWP routines to manage critical sections
\fBSAMETHREAD(\|)\fR	\fBlwp_create\fR(3L)	 LWP thread creation and destruction primitives
\fBSTKTOP(\|)\fR	\fBlwp_newstk\fR(3L)	 LWP stack management
.fi
t      
fconvert.3       fcvt.3        fdate.3       	fdopen.3s       	fdopen.3v       feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s      ./share/man/man3/List.3m                                                                               755       0      12        11615  4424741105  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.3m 1.8 89/03/27 SMI; from UCB 4.3 BSD
.if \n(zZ=1 .ig zZ
.TH LIST 3 "18 January 1988"
.SH LIST OF MATH LIBRARY FUNCTIONS
.nf
.sp
.ta 20n; +20n
.zZ
.B Name 	Appears on Page 	Description
.sp
\-	\fBbessel\fR(3M)	Bessel functions
\-	\fBfrexp\fR(3M) 	floating-point analysis
\-	\fBhyperbolic\fR(3M)	hyperbolic functions
\-	\fBieee_functions\fR(3M)	IEEE classification
\-	\fBieee_test\fR(3M)	IEEE tests for compliance
\-	\fBieee_values\fR(3M)	returns double-precision IEEE infinity
\-	\fBtrig\fR(3M)  	trigonometric functions
\fBacos(\|)\fR	\fBtrig\fR(3M)	inverse trigonometric functions
\fBacosh(\|)\fR	\fBhyperbolic\fR(3M)	inverse hyperbolic function
\fBaint(\|)\fR	\fBrint\fR(3M)	convert to integral value in floating-point format
\fBanint(\|)\fR	\fBrint\fR(3M)	convert to integral value in floating-point format
\fBasin(\|)\fR	\fBtrig\fR(3M)	inverse trigonometric function
\fBasinh(\|)\fR	\fBhyperbolic\fR(3M)	inverse hyperbolic function
\fBatan(\|)\fR	\fBtrig\fR(3M)	inverse trigonometric function
\fBatan2(\|)\fR	\fBtrig\fR(3M)	rectangular to polar conversion
\fBatanh(\|)\fR	\fBhyperbolic\fR(3M)	inverse hyperbolic function
\fBcbrt(\|)\fR	\fBsqrt\fR(3M)	cube root
\fBceil(\|)\fR	\fBrint\fR(3M)	ceiling function
\fBcopysign(\|)\fR	\fBieee_functions\fR(3M)	copy sign bit
\fBcos(\|)\fR	\fBtrig\fR(3M)	trigonometric function
\fBcosh(\|)\fR	\fBhyperbolic\fR(3M)	hyperbolic function
\fBerf(\|)\fR	\fBerf\fR(3M)	error function
\fBerfc(\|)\fR	\fBerf\fR(3M)	complementary error function
\fBexp(\|)\fR	\fBexp\fR(3M)	exponential function
\fBexpm1(\|)\fR	\fBexp\fR(3M)	exp(X)-1
\fBexp2(\|)\fR	\fBexp\fR(3M)	2**X
\fBexp10(\|)\fR	\fBexp\fR(3M)	10**X
\fBfabs(\|)\fR	\fBieee_functions\fR(3M)	absolute value function
\fBfinite(\|)\fR	\fBieee_functions\fR(3M)	test for finite number
\fBfloor(\|)\fR	\fBrint\fR(3M)	floor function
\fBfmod(\|)\fR	\fBieee_functions\fR(3M)	floating-point remainder
\fBfp_class(\|)\fR	\fBieee_functions\fR(3M)	classify operand
\fBfrexp(\|)\fR	\fBfrexp\fR(3M)	floating-point analysis
\fBhypot(\|)\fR	\fBhypot\fR(3M)	Euclidean distance
\fBieee_flags(\|)\fR	\fBieee_flags\fR(3M)	IEEE modes and status
\fBieee_handler(\|)\fR	\fBieee_handler\fR(3M)	IEEE trapping
\fBilogb(\|)\fR	\fBieee_functions\fR(3M)	exponent extraction
\fBinfinity(\|)\fR	\fBieee_values\fR(3M)	returns double-precision IEEE infinity
\fBirint(\|)\fR	\fBrint\fR(3M)	convert to integral value in integer format
\fBisinf(\|)\fR	\fBieee_functions\fR(3M)	IEEE classification
\fBisnan(\|)\fR	\fBieee_functions\fR(3M)	IEEE classification
\fBisnormal(\|)\fR	\fBieee_functions\fR(3M)	IEEE classification
\fBissubnormal(\|)\fR	\fBieee_functions\fR(3M)	IEEE classification
\fBiszero(\|)\fR	\fBieee_functions\fR(3M)	IEEE classification
\fBj0(\|)\fR	\fBbessel\fR(3M)	Bessel function
\fBj1(\|)\fR	\fBbessel\fR(3M)	Bessel function
\fBjn(\|)\fR	\fBbessel\fR(3M)	Bessel function
\fBldexp(\|)\fR	\fBfrexp\fR(3M)	exponent adjustment
\fBlgamma(\|)\fR	\fBlgamma\fR(3M)	log gamma function
\fBlog(\|)\fR	\fBexp\fR(3M)	natural logarithm
\fBlogb(\|)\fR	\fBieee_test\fR(3M)	exponent extraction
\fBlog1p(\|)\fR	\fBexp\fR(3M)	log(1+X)
\fBlog2(\|)\fR	\fBexp\fR(3M)	log base 2
\fBlog10(\|)\fR	\fBexp\fR(3M)	common logarithm
\fBmatherr(\|)\fR	\fBmatherr\fR(3M)	math library exception-handling routines
\fBmax_normal(\|)\fR	\fBieee_values\fR(3M)	double-precision IEEE largest positive normalized number
\fBmax_subnormal(\|)\fR	\fBieee_values\fR(3M)	double-precision IEEE largest positive subnormal number
\fBmin_normal(\|)\fR	\fBieee_values\fR(3M)	double-precision IEEE smallest positive normalized number
\fBmin_subnormal(\|)\fR	\fBieee_values\fR(3M)	double-precision IEEE smallest positive subnormal number
\fBmodf(\|)\fR	\fBfrexp\fR(3M)	floating-point analysis
\fBnextafter(\|)\fR	\fBieee_functions\fR(3M)	IEEE nearest neighbor
\fBnint(\|)\fR	\fBrint\fR(3M)	convert to integral value in integer format
\fBpow(\|)\fR	\fBexp\fR(3M)	power X**Y
\fBquiet_nan(\|)\fR	\fBieee_values\fR(3M)	returns double-precision IEEE quiet NaN
\fBremainder(\|)\fR	\fBieee_functions\fR(3M)	floating-point remainder
\fBrint(\|)\fR	\fBrint\fR(3M)	convert to integral value in floating-point format
\fBscalb(\|)\fR	\fBieee_test\fR(3M)	exponent adjustment
\fBscalbn(\|)\fR	\fBieee_functions\fR(3M)	exponent adjustment
\fBsignaling_nan(\|)\fR	\fBieee_values\fR(3M)	returns double-precision IEEE signaling NaN
\fBsignbit(\|)\fR	\fBieee_functions\fR(3M)	IEEE sign bit test
\fBsignificand(\|)\fR	\fBieee_test\fR(3M)	scalb(x,-ilogb(x))
\fBsin(\|)\fR	\fBtrig\fR(3M)	trigonometric function
\fBsincos(\|)\fR	\fBtrig\fR(3M)	simultaneous sin and cos
\fBsingle_precision(\|)\fR	\fBsingle_precision\fR(3M)	single-precision libm access
\fBsinh(\|)\fR	\fBhyperbolic\fR(3M)	hyperbolic function
\fBsqrt(\|)\fR	\fBsqrt\fR(3M)	square root
\fBtan(\|)\fR	\fBtrig\fR(3M)	trigonometric function
\fBtanh(\|)\fR	\fBhyperbolic\fR(3M)	hyperbolic function
\fBy0(\|)\fR	\fBbessel\fR(3M)	Bessel function
\fBy1(\|)\fR	\fBbessel\fR(3M)	Bessel function
\fByn(\|)\fR	\fBbessel\fR(3M)	Bessel function
.fi
n       endprotoent.3n       endpwaent.3       
endpwent.3        endpwent.3v       
./share/man/man3/List.3r                                                                               755       0      12         3457  4424741106  10077                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.3r 1.10 89/03/27 SMI
.if \n(zZ=1 .ig zZ
.TH LIST 3R "18 January 1988"
.SH "LIST OF STANDARD RPC SERVICES"
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page	Description\fR
.sp
.zZ
\fBbootparam(\|)\fR	 \fBbootparam\fR(3R)	 bootparam protocol
\fBether(\|)\fR	 \fBether\fR(3R)	 monitor traffic on the Ethernet
\fBget(\|)\fR	 \fBpublickey\fR(3R) 	 get secret key
\fBgetrpcport(\|)\fR	 \fBgetrpcport\fR(3R)	 get RPC port number
\fBgetsecretkey(\|)\fR	 \fBpublickey\fR(3R)	 get secret key
\fBipalloc(\|)\fR	\fBipalloc\fR(3R)	 determine or temporarily allocate IP address
\fBkey(\|)\fR	 \fBpublickey\fR(3R)	 get secret key
\fBklm_prot(\|)\fR	 \fBklm_prot\fR(3R)	 protocol between kernel and local lock manager
\fBmount(\|)\fR	 \fBmount\fR(3R)	 keep track of remotely mounted filesystems
\fBnlm_prot(\|)\fR	 \fBnlm_prot\fR(3R)	 protocol between local and remote network lock managers
\fBpnp(\|)\fR	\fBpnp\fR(3R)	 Automated network installer
\fBpublic(\|)\fR	 \fBpublickey\fR(3R)	 get secret key
\fBrex(\|)\fR	 \fBrex\fR(3R)	 remote execution protocol
\fBrnusers(\|)\fR	 \fBrnusers\fR(3R)	 return information about users on remote machines
\fBrquota(\|)\fR	 \fBrquota\fR(3R)	 implement quotas on remote machines
\fBrstat(\|)\fR	 \fBrstat\fR(3R)	 get performance data from remote kernel
\fBrusers(\|)\fR	 \fBrnusers\fR(3R)	 return information about users on remote machines
\fBrwall(\|)\fR	 \fBrwall\fR(3R)	 write to specified remote machines
\fBsecret(\|)\fR	 \fBpublickey\fR(3R)	 get secret key
\fBsm_inter(\|)\fR	 \fBsm_inter\fR(3R)	 status monitor protocol
\fBspray(\|)\fR	 \fBspray\fR(3R)	 scatter data in order to check the network
\fBxcrypt(\|)\fR	 \fBxcrypt\fR(3R)	 hex encryption and utility routines
\fByp(\|)\fR	 \fByp\fR(3R)	 Yellow Pages protocol
\fByppasswd(\|)\fR	 \fByppasswd\fR(3R)	 update user password in Yellow Pages
.fi
   cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x   ./share/man/man3/List.3v                                                                               755       0      12        36671  4424741106  10127                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.3v 1.10 89/03/27 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 3V "30 January 1988"
.SH LIST OF SYSTEM V LIBRARY FUNCTIONS
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page	Description\fR
.sp
.zZ
\fB_tolower(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fB_toupper(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBaddch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBaddstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBasctime(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBassert(\|)\fR	\fBassert\fR(3V)	 verify program assertion
\fBattroff(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBattron(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBattrset(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBbaudrate(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBbeep(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBbox(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBcbreak(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBclear(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBclearerr(\|)\fR	\fBferror\fR(3V)	 stream status inquiries
\fBclearok(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBclrtobot(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBclrtoeol(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBctime(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBctype(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBcurses(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBcurses(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBdelay_output(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBdelch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBdeleteln(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBdelwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBdoupdate(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBecho(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBendpwent(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBendwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBerase(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBerasechar(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBfdopen(\|)\fR	\fBfopen\fR(3V)	 open a stream
\fBfeof(\|)\fR	\fBferror\fR(3V)	 stream status inquiries
\fBferror(\|)\fR	\fBferror\fR(3V)	 stream status inquiries
\fBfgetc(\|)\fR	\fBgetc\fR(3V)	 get character or integer from stream
\fBfgetpwent(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBfileno(\|)\fR	\fBferror\fR(3V)	 stream status inquiries
\fBfixterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBflash(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBflushinp(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBfopen(\|)\fR	\fBfopen\fR(3V)	 open a stream
\fBfprintf(\|)\fR	\fBprintf\fR(3V)	 formatted output conversion
\fBfreopen(\|)\fR	\fBfopen\fR(3V)	 open a stream
\fBfscanf(\|)\fR	\fBscanf\fR(3V)	 formatted input conversion
\fBgetc(\|)\fR	\fBgetc\fR(3V)	 get character or integer from stream
\fBgetch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBgetchar(\|)\fR	\fBgetc\fR(3V)	 get character or integer from stream
\fBgetpass(\|)\fR	\fBgetpass\fR(3V)	 read a password
\fBgetpwent(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBgetpwnam(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBgetpwuid(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBgetstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBgettmode(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBgetw(\|)\fR	\fBgetc\fR(3V)	 get character or integer from stream
\fBgetyx(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBgmtime(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBhas_ic(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBhas_il(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBidlok(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBinch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBinitscr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBinsch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBinsertln(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBintrflush(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBisalnum(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisalpha(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisascii(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBiscntrl(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisdigit(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisgraph(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBislower(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisprint(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBispunct(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisspace(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisupper(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBisxdigit(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBkeypad(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBkillchar(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBleaveok(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBlocaltime(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBlongname(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmeta(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmove(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvaddch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvaddstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvcur(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvdelch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvgetch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvgetstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvinch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvinsch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvprintw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvscanw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwaddch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwaddstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwdelch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwgetch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwgetstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwinch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwinsch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwprintw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBmvwscanw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnewpad(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnewterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnewwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnice(\|)\fR	\fBnice\fR(3V)	 change priority of a process
\fBnl(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnocbreak(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnodelay(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnoecho(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnonl(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBnoraw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBoverlay(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBoverwrite(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBpnoutrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBprintf(\|)\fR	\fBprintf\fR(3V)	 formatted output conversion
\fBrand(\|)\fR	\fBrand\fR(3V)	 simple random number generator
\fBraw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBresetterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBresetty(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsaveterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsavetty(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBscanf(\|)\fR	\fBscanf\fR(3V)	 formatted input conversion
\fBscanw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBscroll(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBscrollok(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBset_term(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsetbuf(\|)\fR	\fBsetbuf\fR(3V)	 assign buffering to a stream
\fBsetbuffer(\|)\fR	\fBsetbuf\fR(3V)	 assign buffering to a stream
\fBsetgid(\|)\fR	\fBsetuid\fR(3V)	 set user and group IDs
\fBsetlinebuf(\|)\fR	\fBsetbuf\fR(3V)	 assign buffering to a stream
\fBsetpwent(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBsetpwfile(\|)\fR	\fBgetpwent\fR(3V)	 get password file entry
\fBsetscrreg(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsetterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsetuid(\|)\fR	\fBsetuid\fR(3V)	 set user and group IDs
\fBsetupterm(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsetvbuf(\|)\fR	\fBsetbuf\fR(3V)	 assign buffering to a stream
\fBsignal(\|)\fR	\fBsignal\fR(3V)	 simplified software signal facilities
\fBsleep(\|)\fR	\fBsleep\fR(3V)	 suspend execution for interval
\fBsprintf(\|)\fR	\fBprintf\fR(3V)	 formatted output conversion
\fBsrand(\|)\fR	\fBrand\fR(3V)	 simple random number generator
\fBsscanf(\|)\fR	\fBscanf\fR(3V)	 formatted input conversion
\fBstandend(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBstandout(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBsubwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBtimegm(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBtimelocal(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBtimes(\|)\fR	\fBtimes\fR(3V)	 get process and child process times
\fBtoascii(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBtolower(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBtouchwin(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBtoupper(\|)\fR	\fBctype\fR(3V)	 character classification and conversion macros and functions
\fBtraceoff(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBtraceon(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBttyslot(\|)\fR	\fBttyslot\fR(3V)	 find the slot in the utmp file of the current process
\fBtypeahead(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBtzset(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBtzsetwall(\|)\fR	\fBctime\fR(3V)	 convert date and time
\fBunctrl(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwaddch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwaddstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwattroff(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwattron(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwattrset(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwclear(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwclrtobot(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwclrtoeol(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwdelch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwdeleteln(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwerase(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwgetch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwgetstr(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwinch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwinsch(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwinsertln(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwmove(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwnoutrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwprintw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwscanw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwsetscrreg(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwstandend(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBwstandout(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
.fi
e\fR(3V)	 character classification and conversion macros and functions
./share/man/man3/MINSTACKSZ.3l                                                                         755       0      12           77  4424741110  10572                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)MINSTACKSZ.3l 1.3 89/03/27 SMI;
MSG_RECVALL.3l   X  
  	SAMECV.3l X  l  
  
SAMEMON.3l l    
  
SAMETHREAD.3l 
    
  	STKTOP.3l     
  _crypt.3      
  _tolower.3v     
  _toupper.3v     
  a64l.3       
  abort.3     
  abs.3 3      
  acos.3m   4  
  acosh.3m  4  H  
  addch.3v  H  \  
  addch.3x  \  t  
  addexportent.3     
  addmntent.3     
  	addstr.3v     
  	addstr.3x     
./share/man/man3/MONITOR.3l                                                                            755       0      12           74  4424741110  10230                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)MONITOR.3l 1.3 89/03/27 SMI;
  	SAMECV.3l L.  l  
  
SAMEMON.3l 3    
  
SAMETHREAD.3l  l    
  	STKTOP.3l .3    
  _crypt.3 P.3    
  _tolower.3v     
  _toupper.3v     
  a64l.3 u     
  abort.3     
  abs.3       
  acos.3m   4  
  acosh.3m cos  H  
  addch.3v .3m  \  
  addch.3x .3v  t  
  addexportent.3 \    
  addmntent.3     
  	addstr.3v en    
  	addstr.3x .3    
  
agt_create.3l     
./share/man/man3/MSG_RECVALL.3l                                                                        755       0      12           76  4424741110  10701                                                                                                                                                                                                                                                                                                                                                                      .so man3/msg_send.3l
.\" @(#)MSG_RECVALL.3l 1.3 89/03/27 SMI;
 
SAMEMON.3l .    
  
SAMETHREAD.3l     
  	STKTOP.3l  l    
  _crypt.3  .3    
  _tolower.3v     
  _toupper.3v     
  a64l.3 r     
  abort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v cos  \  
  addch.3x .3m  t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x en    
  
agt_create.3l     
   agt_enumerate.3l  
./share/man/man3/SAMECV.3l                                                                             755       0      12           72  4424741111  10056                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)SAMECV.3l 1.3 89/03/27 SMI;
 
SAMETHREAD.3l  .    
  	STKTOP.3l .3    
  _crypt.3 P.3    
  _tolower.3v     
  _toupper.3v     
  a64l.3 u     
  abort.3     
  abs.3       
  acos.3m   4  
  acosh.3m cos  H  
  addch.3v .3m  \  
  addch.3x .3v  t  
  addexportent.3 m    
  addmntent.3     
  	addstr.3v en    
  	addstr.3x .3    
  
agt_create.3l en    
   agt_enumerate.3l      
  agt_trap.3l   ./share/man/man3/SAMEMON.3l                                                                            755       0      12           74  4424741111  10201                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)SAMEMON.3l 1.3 89/03/27 SMI;
  	STKTOP.3l  .    
  _crypt.3  .3    
  _tolower.3v     
  _toupper.3v     
  a64l.3 r     
  abort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v cos  \  
  addch.3x .3m  t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x en    
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
./share/man/man3/SAMETHREAD.3l                                                                         755       0      12           77  4424741111  10522                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_create.3l
.\" @(#)SAMETHREAD.3l 1.3 89/03/27 SMI;
_crypt.3   .    
  _tolower.3v     
  _toupper.3v     
  a64l.3 r     
  abort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v 3m   \  
  addch.3x cos  t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x 3     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
./share/man/man3/STKTOP.3l                                                                             755       0      12           73  4424741111  10125                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)STKTOP.3l 1.3 89/03/27 SMI;
_tolower.3v     
  _toupper.3v     
  a64l.3 u     
  abort.3     
  abs.3       
  acos.3m   4  
  acosh.3m cos  H  
  addch.3v .3m  \  
  addch.3x .3v  t  
  addexportent.3 s    
  addmntent.3     
  	addstr.3v en    
  	addstr.3x .3    
  
agt_create.3l 3     
   agt_enumerate.3l      
  agt_trap.3l     
  aint.3m     
  alarm.3c int  0  
  alloca.3 .3c  D  
  ./share/man/man3/_crypt.3                                                                              755       0      12           64  4424741111  10225                                                                                                                                                                                                                                                                                                                                                                      .so man3/crypt.3
.\" @(#)_crypt.3 1.3 89/03/27 SMI;
  
  _toupper.3v     
  a64l.3 r     
  abort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v cos  \  
  addch.3x .3m  t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x en    
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 int  D  
  alphasort.3   X  
  ./share/man/man3/_tolower.3v                                                                           755       0      12           71  4424741111  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)_tolower.3v 1.6 89/03/27 SMI; 
 a64l.3 r     
  abort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v 3m   \  
  addch.3x cos  t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x 3     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  ./share/man/man3/_toupper.3v                                                                           755       0      12           71  4424741112  10747                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)_toupper.3v 1.6 89/03/27 SMI; 
bort.3     
  abs.3 or     
  acos.3m   4  
  acosh.3m 3m   H  
  addch.3v 3m   \  
  addch.3x 3m   t  
  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x 3     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asct./share/man/man3/a64l.3                                                                                755       0      12         2761  4424741112   7542                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)a64l.3 1.9 89/03/27 SMI; from S5
.TH A64L 3 "6 October 1987"
.SH NAME
a64l, l64a \- convert between long integer and base-64 ASCII string
.SH SYNOPSIS
.nf
.B long a64l(s)
.B char \(**s;
.LP
.B char \(**l64a(l)
.B long l;
.fi
.SH DESCRIPTION
.IX  "a64l function"  ""  "\fLa64l\fP \(em convert long integer to base-64 \s-2ASCII\s0"
.IX  "l64a function"  ""  "\fLl64a\fP \(em convert base-64 \s-2ASCII\s0 to long integer"
.IX  "convert long integer to base-64 \s-2ASCII\s0 \(em \fLl64a\fP"
.IX  "convert base-64 \s-2ASCII\s0 to long integer \(em \fLl64a\fP"
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 six characters; each character
represents a ``digit'' in a radix-64 notation.
.LP
The characters used to represent ``digits''
are
.RB ` . '
for 0,
.RB ` / '
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.
.LP
.B a64l(\|)
takes a pointer to a
.SM NULL\s0-terminated
base-64 representation and returns
a corresponding
.B long
value.  If the string pointed to by
.I s
contains more than six characters,
.B a64l(\|)
will use the first six.
.LP
.B l64a(\|)
takes a
.B long
argument and returns a pointer to the corresponding base-64 representation.
If the argument is 0,
.B l64a(\|)
returns a pointer to a
.SM NULL
string.
.SH BUGS
The value returned by
.B l64a(\|)
is a pointer into a static buffer, the contents of which are
overwritten by each call.
     ceil./share/man/man3/abort.3                                                                               755       0      12         1646  4424741112  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)abort.3 1.13 89/03/27 SMI; from UCB 4.3 BSD
.TH ABORT 3 "6 October 1987"
.SH NAME
abort \- generate a fault
.SH SYNOPSIS
.B abort(\|)
.IX  "abort function"  ""  "\fLabort\fP \(em generate fault"
.IX  generate "fault \(em \fLabort\fP"
.IX  "terminate program \(em \fLabort\fP"
.SH DESCRIPTION
.LP
.B abort(\|)
first closes all open files if possible, then
sends an
.SM IOT
signal to the process.
This signal usually results in termination with a core dump,
which may be used for debugging.
.LP
It is possible for
.B abort(\|)
to return control if
.SB SIGIOT
is caught or ignored,
in which case the value returned is that of the
.BR kill (2V)
system call.
.SH SEE ALSO
.BR adb (1),
.BR exit (2),
.BR kill (2V),
.BR signal (3)
.SH DIAGNOSTICS
.LP
If
.SB SIGIOT
is neither caught nor ignored, and the current directory is writable,
a core dump is produced and the message
.RB `  "abort \- core dumped"  '
is written by the shell.
   authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n ./share/man/man3/abs.3                                                                                 755       0      12         1236  4424741112   7535                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)abs.3 1.10 89/03/27 SMI; from UCB 4.2
.TH ABS 3 "6 October 1987"
.SH NAME
abs \- integer absolute value
.SH SYNOPSIS
.nf
.B abs(i)
.B int i;
.fi
.IX  "abs function"  ""  "\fLabs\fP \(em integer absolute value"
.IX  "integer absolute value"  ""  "integer absolute value \(em \fLabs\fP"
.IX  "absolute value"  ""  "absolute value \(em \fLabs\fP"
.SH DESCRIPTION
.LP
.B abs(\|)
returns the absolute value of its integer operand.
.SH SEE ALSO
.BR rint (3M)
for
.B fabs(\|)
.SH BUGS
.LP
Applying the
.B abs(\|)
function to the most negative integer generates a
result which is the most negative integer.
That is,
.B abs(0x80000000)
returns
.B 0x80000000
as a result.
 atoi.3    D  
  atol.3 m  X     
attroff.3v X  l    	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l   ( authunix./share/man/man3/acos.3m                                                                               755       0      12           64  4424741112  10030                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)acos.3m 1.7 89/03/27 SMI; 
  addch.3v  H  \  
  addch.3x  \  t  
  addexportent.3     
  addmntent.3     
  	addstr.3v     
  	addstr.3x     
  
agt_create.3l 
    
   agt_enumerate.3l       
  agt_trap.3l     
  aint.3m     
  alarm.3c    0  
  alloca.3  0  D  
  alphasort.3   X  
  anint.3m  X  h  
  arc.3x X  |  
  	asctime.3 |    
  
asctime.3v     
  asin.3m     
  asinh.3m      
./share/man/man3/acosh.3m                                                                              755       0      12           73  4424741112  10200                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)acosh.3m 1.7 89/03/27 SMI; 
addch.3x  \  t  
  addexportent.3     
  addmntent.3     
  	addstr.3v     
  	addstr.3x     
  
agt_create.3l 
    
   agt_enumerate.3l       
  agt_trap.3l     
  aint.3m     
  alarm.3c    0  
  alloca.3  0  D  
  alphasort.3   X  
  anint.3m  X  h  
  arc.3x X  |  
  	asctime.3 |    
  
asctime.3v     
  asin.3m     
  asinh.3m      
  assert.3    ./share/man/man3/addch.3v                                                                              755       0      12           66  4424741112  10161                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)addch.3v 1.5 89/03/27 SMI;

  addexportent.3 t    
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3    D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  X    
  
asctime.3v |    
  asin.3m     
  asinh.3m 3m     
  assert.3      
  	assert.3v   ./share/man/man3/addch.3x                                                                              755       0      12           67  4424741113  10165                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)addch.3x 1.6 89/03/27 SMI; 
  
  addmntent.3     
  	addstr.3v 3     
  	addstr.3x 3     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  m    
  
asctime.3v X    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v     
  atan.3m      
./share/man/man3/addexportent.3                                                                        755       0      12           76  4424741113  11433                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)addexportent.3 1.3 89/03/27 SMI;
 	addstr.3v 3     
  	addstr.3x 3     
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  m    
  
asctime.3v m    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v m     
  atan.3m      
  atan2.3m 3m     
./share/man/man3/addmntent.3                                                                           755       0      12           74  4424741113  10706                                                                                                                                                                                                                                                                                                                                                                      .so man3/getmntent.3
.\" @(#)addmntent.3 1.6 89/03/27 SMI; 
addstr.3x .3    
  
agt_create.3l 3     
   agt_enumerate.3l      
  agt_trap.3l     
  aint.3m     
  alarm.3c int  0  
  alloca.3 .3c  D  
  alphasort.3   X  
  anint.3m sor  h  
  arc.3x n  |  
  	asctime.3 c.    
  
asctime.3v .    
  asin.3m     
  asinh.3m sin    
  assert.3 .3m    
  	assert.3v .3    
  atan.3m      
  atan2.3m tan    
  atanh.3m .3m  $  
  ./share/man/man3/addstr.3v                                                                             755       0      12           67  4424741113  10401                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)addstr.3v 1.5 89/03/27 SMI;
  
agt_create.3l     
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 int  D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  n    
  
asctime.3v .    
  asin.3m     
  asinh.3m 3m     
  assert.3 sin    
  	assert.3v 3m    
  atan.3m      
  atan2.3m 3m     
  atanh.3m tan  $  
  atof.3 m  4  
  atoi./share/man/man3/addstr.3x                                                                             755       0      12           70  4424741113  10375                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)addstr.3x 1.6 89/03/27 SMI; 
  
   agt_enumerate.3l  
    
  agt_trap.3l     
  aint.3m     
  alarm.3c 3m   0  
  alloca.3 3m   D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3  m    
  
asctime.3v n    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v in    
  atan.3m      
  atan2.3m 3m     
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i./share/man/man3/agt_create.3l                                                                         755       0      12        16742  4424741113  11273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)agt_create.3l 1.26 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH AGT_CREATE 3L "18 November 1987"
.SH NAME
agt_create, agt_enumerate, agt_trap \- map LWP events into messages
.SH SYNOPSIS
.nf
.B #include <lwp/lwp.h>
.LP
.ft B
thread_t
agt_create(agt, event, memory)
thread_t *agt;
int event;
caddr_t memory;
.LP
.ft B
int
agt_enumerate(vec, maxsize)
thread_t vec[\|];
int maxsize;
.LP
.ft B
int
agt_trap(event)
int event;
.fi
.ft R
.SH DESCRIPTION
.IX "agt_create function" "" "\fLagt_create()\fP function"
.IX "agt_enumerate function" "" "\fLagt_enumerate()\fP function"
.IX "agt_trap function" "" "\fLagt_trap()\fP function"
.LP
Agents are entities that act like threads sending messages when
an asynchronous event occurs.
.B agt_create(\|)
creates an object called an
.I agent
which maps the asynchronous event
.I event
into messages that can be received with
.BR msg_receive .
.I agt
stores the handle on this object.
.I event
is a
.SM UNIX
signal number.
.LP
.B agt_trap(\|)
causes the
event,
.IR event ,
to generate an exception (see
.BR exc_handle (3L)).
Once initialized using
.B agt_create(\|)
or
.BR agt_trap ,
an event can
not be remapped to a different style of handling.
If traps are enabled, an event will cause
the termination of the
.I thread
running at the time of the trap if the trap exception is
not handled.
If an exception handler is in place, an exception will be raised.
If an agent exists for the event, the event is mapped into a message
for the agent.
If neither agent nor trap
mapping is enabled, the default signal action (\c
.SM SIG_DFL\s0) is applied to the
.IR pod .
Use of standard
.SM UNIX
signal handling facilities will defeat the
event mapping mechanism.
.LP
The message sent by the agent (in the argument buffer) will look
like any other message with the sender being the agent.
The receive buffer is
.SM NULL\s0.
A message is always sent by an agent to the thread which created the agent.
.LP
All messages sent by an agent contain an
.BR eventinfo_t .
This structure indicates the thread running at the time the interrupt happened,
and the particular event that occurred.
Some agent messages contain more information if the particular event
warrants it.
In this case, a struct containing an
.B eventinfo_t
as its first element is
passed as the argument buffer.
Definitions of these structures are contained in
.BR <lwp/lwp.h> .
.\" .SB SIGCHLD
.\" is included because multiple processes could die but be reported
.\" as one
.\" .SB SIGCHLD
.\" event.
.\" Any thread using
.\" .BR wait (2)
.\" could reap the wrong child and the information
.\" becomes lost to other threads.
.\" .SB SIGIO
.\" is different because
.\" .BR select (2)
.\" will always tell you the state
.\" of a descriptor.
.LP
An agent appears to the owning thread just like another thread.
It must therefore have some memory for
holding its message, as the sender and receiver must belong to the same
address space.
.I memory
is the space an agent will use to store its
message.
Typically, this is on the stack of the thread that created the agent.
It must be of the correct size for the kind of
event being created (most events need something
to store an
.BR eventinfo_t .
.SB SIGCHLD
events need room for a
.BR sigchldev_t .)
.LP
You should reply to an agent (using
.B msg_reply
(see
.BR msg_send (3L))
as you would reply to a thread.
Although agents do not ordinarily lose events,
the next agent message will not be delivered
until a reply is sent to the agent.
Thus, an agent appears to the client as an ordinary thread sending messages.
An agent will only lose events if the total number of unreplied-to
events in a pod exceeds
.SM AGENTMEMORY\s0.
.LP
.B lwp_destroy(\|)
is used to destroy an agent.
All agents created by a thread automatically
disappear when that thread dies.
.B agt_enumerate(\|)
fills in a list with the
.SM ID\s0's
of all existing agents
and returns the total number of agents.
This primitive uses
.I maxsize
to avoid exceeding the capacity
of the list.
If the number of agents is greater than
.IR maxsize ,
only
.I maxsize
agents
.SM ID\s0's
are filled in
.IR vec .
If
.I maxsize
is zero,
.B agt_enumerate(\|)
returns the total number of agents.
.LP
The special event
.SB LASTRITES
is caused by the termination of a thread.  An agent for
.SB LASTRITES
will be informed about every thread that terminates,
regardless of cause.  The
.B eventinfo_code
element of this agent will contain the stack
argument that the dead thread was created with.
Note: by allocating adjacent space above the thread stack, this
argument can be used to point to private information about a thread.
The
.B eventinfo_victimid
element will contain the id of the dead thread.
.\" should agents themselves generate
.\" .SB LASTRITES
.\" for cleaning up agt mem?
.\" not really necessary since mem can be on stack.
.\" can be used to clean up stack malloc for example
.\" no synchronous cleanup since need stack to clean up on and
.\" do not want lwpkill to encounter a for(;;) cleanup handler.
.\" Since cannot use exception handler to free stack, no other way
.\" to generally do things on thread termination.
.SH RETURN VALUE
.LP
Upon successful completion,
.B agt_create(\|)
and
.B agt_trap(\|)
return 0.  Otherwise, \-1 is returned.
.LP
.B agt_enumerate(\|)
returns the total number of agents.
.SH ERRORS
.LP
.B agt_trap(\|)
will fail if one or more of the following is true:
.TP 20
.SM LE_INVALIDARG
Event specified does not exist.
.TP
.SM LE_INUSE
Agent in use for this event.
.LP
.B agt_create(\|)
will fail if one or more of the following are true:
.TP 20
.SM LE_INVALIDARG
Attempt to create agent for non-existent event.
.TP
.SM LE_INUSE
Trap mapping in use for this event.
.SH SEE ALSO
.BR exc_handle (3L),
.BR msg_send (3L)
.SH BUGS
.LP
Signal handlers always take the
.SB SIG_DFL
action when no agent manages the event.
.LP
If a descriptor used by a parent of the
pod (such as its standard input)
is marked non-blocking by a thread, it should be reset when
the pod terminates to prevent the parent from receiving
.SM EWOULDBLOCK
errors on the descriptor.
There is no way to prevent this from happening if a pod is terminated
with extreme prejudice (for instance, using
.SM
.BR SIGKILL ).
.LP
If an agent reports that a descriptor has I/O available, there may
be more than one occurrence of I/O available from that descriptor.
Thus, being informed that
.SB SIGIO
has occurred on socket
.I s
may mean
that there are several messages waiting to be received from
.IR s .
Clients should be careful to clean out all I/O from a descriptor before
going back to sleep.
.LP
All system calls should be protected with loops testing for
.SM EINTR
(and monitors if multiple threads can try to use system calls concurrently).
.\" this is mostly an efficiency issue to keep from reissuing the same
.\" interrupted system call again.
An
.B lwp_sleep(\|)
could result in a hidden clock interrupt for example.
.\".LP
.\" a system call may be interrupted by
.\" .SM
.\" .BR \s-1SIGALRM\s0 ,
.\" have the new thread
.\" do another system call, and the 1st is restarted, but
.\" that's it. A third one loses all memory.
.SH WARNINGS
.LP
.B agt_trap(\|)
should not be used for asynchronous events.
If an unsuspecting thread which has no exception handler
is running at the time of a trapped
event, it will be terminated.
.\" especially a problem if Idle or other service thread is running.
.\" perhaps these should have exception handlers (that essentially
.\" ignore all exceptions) just in case
.LP
Clients should not normally handle signals themselves since the agent mechanism
assumes it is the only entity handling signals.
  endttyent.3   D    ./share/man/man3/agt_enumerate.3l                                                                      755       0      12          102  4424741113  11734                                                                                                                                                                                                                                                                                                                                                                      .so man3/agt_create.3l
.\" @(#)agt_enumerate.3l 1.3 89/03/27 SMI;
 aint.3m     
  alarm.3c int  0  
  alloca.3 .3c  D  
  alphasort.3   X  
  anint.3m sor  h  
  arc.3x n  |  
  	asctime.3 c.    
  
asctime.3v .    
  asin.3m     
  asinh.3m sin    
  assert.3 .3m    
  	assert.3v .3    
  atan.3m      
  atan2.3m tan    
  atanh.3m .3m  $  
  atof.3 n  4  
  atoi.3   D  
  atol.3   X     
attroff.3v l  l    	attron.3v f.  ./share/man/man3/agt_trap.3l                                                                           755       0      12           75  4424741114  10707                                                                                                                                                                                                                                                                                                                                                                      .so man3/agt_create.3l
.\" @(#)agt_trap.3l 1.3 89/03/27 SMI;
.3c    0  
  alloca.3 lar  D  
  alphasort.3   X  
  anint.3m lph  h  
  arc.3x   |  
  	asctime.3      
  
asctime.3v t    
  asin.3m     
  asinh.3m      
  assert.3 sin    
  	assert.3v se    
  atan.3m      
  atan2.3m      
  atanh.3m tan  $  
  atof.3   4  
  atoi.3   D  
  atol.3   X     
attroff.3v   l    	attron.3v tr      
attrset.3v r      ./share/man/man3/aint.3m                                                                               755       0      12           63  4424741114  10037                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)aint.3m 1.3 89/03/27 SMI;
  alloca.3    D  
  alphasort.3   X  
  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3      
  
asctime.3v     
  asin.3m     
  asinh.3m 3m     
  assert.3      
  	assert.3v in    
  atan.3m      
  atan2.3m 3m     
  atanh.3m    $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v   l    	attron.3v        
attrset.3v r      audit.3       audi./share/man/man3/alarm.3c                                                                              755       0      12         2417  4424741114  10233                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)alarm.3c 1.10 89/03/27 SMI; from UCB 6.3 5/27/86
.TH ALARM 3C  "6 October 1987"
.SH NAME
alarm \- schedule signal after specified time
.SH SYNOPSIS
.nf
.B alarm(seconds)
.B unsigned seconds;
.fi
.IX  "alarm function"  ""  "\fLalarm\fP \(em schedule signal"
.IX  "schedule signal"  ""  "schedule signal \(em \fLalarm\fP"
.IX  signal  schedule  signal  "schedule \(em \fLalarm\fP"
.SH DESCRIPTION
.B alarm(\|)
sends signal
.BR \s-1SIGALRM\s0 ,
see
.BR sigvec (2),
to the invoking process
in a number of seconds given by the argument.
Unless caught or ignored, the signal terminates the process.
.LP
Alarm requests are not stacked; successive calls reset the alarm clock.
If the argument is 0, any alarm request is canceled.
Because of scheduling delays,
resumption of execution of when the signal is
caught may be delayed an arbitrary amount.
The longest specifiable delay time is 2147483647 seconds.
.LP
The return value is the amount of time previously remaining in the alarm clock.
.SH "SEE ALSO"
.BR sigpause (2),
.BR sigvec (2),
.BR signal (3),
.BR sleep (3),
.BR ualarm (3),
.BR usleep (3)
x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n ./share/man/man3/alloca.3                                                                              755       0      12           66  4424741114  10165                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)alloca.3 1.6 89/03/27 SMI; 

  anint.3m .3   h  
  arc.3x m  |  
  	asctime.3       
  
asctime.3v |    
  asin.3m     
  asinh.3m 3m     
  assert.3      
  	assert.3v     
  atan.3m      
  atan2.3m 3m     
  atanh.3m     $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v f  l    	attron.3v  X      
attrset.3v l      audit.3       audit_args.3        audit_text.3    ./share/man/man3/alphasort.3                                                                           755       0      12           72  4424741114  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/scandir.3
.\" @(#)alphasort.3 1.6 89/03/27 SMI; 
 arc.3x m  |  
  	asctime.3  m    
  
asctime.3v      
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v     
  atan.3m      
  atan2.3m 3m     
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v i  l    	attron.3v  f      
attrset.3v X      audit.3       audit_args.3        audit_text.3        auth_destroy.3n ./share/man/man3/anint.3m                                                                              755       0      12           64  4424741114  10216                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)anint.3m 1.3 89/03/27 SMI;
  	asctime.3  m    
  
asctime.3v m    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v m     
  atan.3m      
  atan2.3m 3m     
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v i  l    	attron.3v  i      
attrset.3v f      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_crea./share/man/man3/arc.3x                                                                                755       0      12           62  4424741115   7664                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)arc.3x 1.5 89/03/27 SMI;

  
asctime.3v m    
  asin.3m     
  asinh.3m 3m     
  assert.3 3m     
  	assert.3v m     
  atan.3m      
  atan2.3m 3m     
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v i  l    	attron.3v  i      
attrset.3v i      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        auth./share/man/man3/asctime.3                                                                             755       0      12           66  4424741115  10360                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)asctime.3 1.6 89/03/27 SMI; 

  asin.3m     
  asinh.3m      
  assert.3      
  	assert.3v     
  atan.3m      
  atan2.3m       
  atanh.3m    $  
  atof.3    4  
  atoi.3 m  D  
  atol.3 f  X     
attroff.3v X  l    	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,./share/man/man3/asctime.3v                                                                            755       0      12           70  4424741115  10541                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)asctime.3v 1.6 89/03/27 SMI; 
asinh.3m 3m     
  assert.3      
  	assert.3v     
  atan.3m      
  atan2.3m 3m     
  atanh.3m     $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v f  l    	attron.3v  X      
attrset.3v l      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3./share/man/man3/asin.3m                                                                               755       0      12           64  4424741115  10040                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)asin.3m 1.7 89/03/27 SMI; 
  assert.3 3m     
  	assert.3v     
  atan.3m      
  atan2.3m 3m     
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v i  l    	attron.3v  f      
attrset.3v X      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix./share/man/man3/asinh.3m                                                                              755       0      12           72  4424741115  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)asinh.3m 1.3 89/03/27 SMI;
 	assert.3v     
  atan.3m      
  atan2.3m       
  atanh.3m    $  
  atof.3    4  
  atoi.3 m  D  
  atol.3 f  X     
attroff.3v X  l    	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l  ./share/man/man3/assert.3                                                                              755       0      12         1641  4424741115  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)assert.3 1.12 89/03/27 SMI; from UCB 4.2
.TH ASSERT 3 "6 October 1987"
.SH NAME
assert \- program verification
.SH SYNOPSIS
.B #include <assert.h>
.LP
.B assert(expression)
.IX  "assert function"  ""  "\fLassert\fP \(em program verification"
.IX  "program verification"  ""  "program verification \(em \fLassert\fP"
.IX  "debugging support"  ""  "debugging support \(em \fLassert\fP"
.SH DESCRIPTION
.LP
.B assert(\|)
is a macro that indicates
.I expression
is expected to be true at this point in the program.
It
.BR exit s
(see
.BR exit (2)
with a diagnostic comment on the standard output when
.I expression
is false (0).
Compiling with the
.BR cc (1V)
option
.SB \-DNDEBUG
effectively deletes
.B assert(\|)
from the program.
.SH SEE ALSO
.BR cc (1V)
.BR exit (2)
.SH DIAGNOSTICS
.TP 10
.BI "Assertion failed: file " f " line " n
.I f
is the source file and
.I n
the source line number of the
.B assert(\|)
statement.
k.3v 3       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x 3   (./share/man/man3/assert.3v                                                                             755       0      12         2301  4424741116  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)assert.3v 1.9 89/03/27 SMI; from S5R2
.TH ASSERT 3V "6 October 1987"
.SH NAME
assert \- verify program assertion
.SH SYNOPSIS
.B #include <assert.h>
.LP
.nf
.B assert(expression)
.B int expression;
.fi
.IX  "assert function V"  ""  "\fLassert\fP \(em program verification, System V"
.IX  "program verification V"  ""  "program verification, System V \(em \fLassert\fP"
.IX  "debugging support V"  ""  "debugging support, System V \(em \fLassert\fP"
.SH DESCRIPTION
.LP
.B assert(\|)
is a macro that indicates
.I expression
is expected to be true at this point in the program.
When it is executed, if
.I expression
is false (zero),
.B assert(\|)
prints
.LP
.RS
.RB ` "Assertion failed: "
.IB expression ", file " xyz ", line"
.IR nnn '
.RE
.LP
on the standard error output and aborts.
In the error message,
.I xyz
is the name of the source file and
.I nnn
the source line number of the
.B assert(\|)
statement.
.LP
Compiling with the
.BR cc (1V)
option
.BR \-\s-1DNDEBUG\s0 ,
or with the preprocessor control statement
.RB ` \#define
.BR \s-1NDEBUG\s0 '
ahead of the
.RB ` "\#include <assert.h>" '
statement, will stop assertions from
being compiled into the program.
.SH "SEE ALSO"
.BR cc (1V),
.BR abort (3)
 expression;
.fi
.IX  "assert function V"  ""  "\fLassert\fP \(em program verification, System V"
.IX  "program verification V"  ""  "program verification, System V \(em \fLassert\fP"
.IX  "debugging support V"  ""  "debugging support, System V \(em \fLassert\fP"
.SH DESCRIPTION
.LP
.B assert(\|)
is a macro that indic./share/man/man3/atan.3m                                                                               755       0      12           64  4424741116  10032                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)atan.3m 1.7 89/03/27 SMI; 
  atanh.3m 3m   $  
  atof.3 m  4  
  atoi.3 f  D  
  atol.3 i  X     
attroff.3v i  l    	attron.3v  i      
attrset.3v f      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp./share/man/man3/atan2.3m                                                                              755       0      12           65  4424741116  10115                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)atan2.3m 1.7 89/03/27 SMI; 
 
  atof.3    4  
  atoi.3 m  D  
  atol.3 f  X     
attroff.3v X  l    	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l   ( authunix_create_default.3n x      baudrate.3v     
  bcmp.3        bcop./share/man/man3/atanh.3m                                                                              755       0      12           73  4424741116  10202                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)atanh.3m 1.7 89/03/27 SMI; 
i.3 f  D  
  atol.3 i  X     
attroff.3v f  l    	attron.3v  X      
attrset.3v l      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp.3 e      bcopy.3       beep.3v ./share/man/man3/atof.3                                                                                755       0      12           63  4424741116   7662                                                                                                                                                                                                                                                                                                                                                                      .so man3/strtod.3
.\" @(#)atof.3 1.4 89/03/27 SMI;
atol.3 i  X     
attroff.3v i  l    	attron.3v  f      
attrset.3v X      audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp.3 e      bcopy.3       beep.3v       	bessel.3m v ./share/man/man3/atoi.3                                                                                755       0      12           64  4424741116   7666                                                                                                                                                                                                                                                                                                                                                                      .so man3/strtol.3
.\" @(#)atoi.3 1.7 89/03/27 SMI; 
attroff.3v X  l    	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l   ( authunix_create_default.3n x      baudrate.3v     
  bcmp.3        bcopy.3       beep.3v       	bessel.3m       bindresv./share/man/man3/atol.3                                                                                755       0      12           64  4424741117   7672                                                                                                                                                                                                                                                                                                                                                                      .so man3/strtol.3
.\" @(#)atol.3 1.7 89/03/27 SMI; 
  	attron.3v l      
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l   ( authunix_create_default.3n x      baudrate.3v     
  bcmp.3        bcopy.3       beep.3v       	bessel.3m       bindresvport.3n        ./share/man/man3/attroff.3v                                                                            755       0      12           70  4424741117  10563                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)attroff.3v 1.5 89/03/27 SMI;
  
attrset.3v       audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n         authdes_getcred.3n   ,  	   authnon_create.3n    H  
   authunix_create.3n   l   ( authunix_create_default.3n x      baudrate.3v     
  bcmp.3        bcopy.3       beep.3v       	bessel.3m       bindresvport.3n        bootparam.3r    ./share/man/man3/attron.3v                                                                             755       0      12           67  4424741117  10433                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)attron.3v 1.5 89/03/27 SMI;
  audit.3       audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp.3 e      bcopy.3       beep.3v       	bessel.3m v       bindresvport.3n        bootparam.3r         box.3v r     ./share/man/man3/attrset.3v                                                                            755       0      12           70  4424741117  10604                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)attrset.3v 1.5 89/03/27 SMI;
audit_args.3        audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp.3 e      bcopy.3       beep.3v       	bessel.3m v       bindresvport.3n        bootparam.3r         box.3v r       box.3x .  4    	./share/man/man3/audit.3                                                                               755       0      12           67  4424741117  10044                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)audit.3 1.3 89/03/27 SMI;
  audit_text.3        auth_destroy.3n        authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n 	  H  
   authunix_create.3n 
  l   ( authunix_create_default.3n h      baudrate.3v     
  bcmp.3 e      bcopy.3       beep.3v       	bessel.3m v       bindresvport.3n        bootparam.3r         box.3v r       box.3x .  4    	bsearch.3  .  H    	./share/man/man3/audit_args.3                                                                          755       0      12         2267  4424741117  11124                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit_args.3 1.9 89/03/27 SMI;
.TH AUDIT_ARGS 3 "6 October 1987"
.SH NAME
audit_args, audit_text \- produce text audit message
.SH SYNOPSIS
.nf
.ft B
#include <sys/label.h>
#include <sys/audit.h>
.LP
.ft B
audit_args(event, argc, argv)
int event;
int argc;
char **argv;
.LP
.ft B
audit_text(event, error, retval, argc, argv)
int event;
int error;
int retval;
int argc;
char **argv;
.fi
.SH DESCRIPTION
.IX "audit_args function" "" "\fLaudit_args()\fP function"
.IX "audit_text function" "" "\fLaudit_text()\fP function"
.LP
These functions provide text interfaces to the
.BR audit (2)
system call.  In both calls, the
.I event
parameter identifies the event class of the action, and
.I argc
is the number of strings found in the vector
.I argv.
The
.B error
parameter is used to determine the failure or success of the audited
operation.  A negative value is always audited.
A zero value is audited as a successful event.
A positive value is audited as an event failure.  The
.I retval
parameter is the return value or exit code
that the invoking program will have.
.LP
.B audit_args(\|)
is equivalent to
.B audit_text(\|)
with
.B error
and
.I retval
parameters of \-1.
.SH "SEE ALSO"
.BR audit (2)
     2  clnt_sperror.3n     3   clntraw_create.3n      4   clnttcp_create.3n    	  5   clntudp_create.3n    	  7  
closedir.3   	,  8  
closelog.3 ,  	@  9  
closepl.3x @  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	cont./share/man/man3/audit_text.3                                                                          755       0      12           75  4424741117  11107                                                                                                                                                                                                                                                                                                                                                                      .so man3/audit_args.3
.\" @(#)audit_text.3 1.3 89/03/27 SMI;
    authdes_create.3n        authdes_getcred.3n   ,  	   authnon_create.3n ,  H  
   authunix_create.3n H  l   ( authunix_create_default.3n       baudrate.3v     
  bcmp.3 d      bcopy.3       beep.3v       	bessel.3m ep      bindresvport.3n        bootparam.3r 3n       box.3v a       box.3x   4    	bsearch.3 x.  H    	bstring.3 h.  `    byteorder.3n  H  p  ./share/man/man3/auth_destroy.3n                                                                       755       0      12           72  4424741120  11614                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)auth_destroy.3n 1.5 89/03/27 SMI;
       authdes_getcred.3n   ,  	   authnon_create.3n ,  H  
   authunix_create.3n H  l   ( authunix_create_default.3n       baudrate.3v     
  bcmp.3 d      bcopy.3       beep.3v       	bessel.3m ep      bindresvport.3n        bootparam.3r 3n       box.3v a       box.3x   4    	bsearch.3 x.  H    	bstring.3 h.  `    byteorder.3n  h.  p    bzero.3       cabs./share/man/man3/authdes_create.3n                                                                     755       0      12           74  4424741120  12064                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)authdes_create.3n 1.5 89/03/27 SMI;
3n   ,  	   authnon_create.3n ,  H  
   authunix_create.3n H  l   ( authunix_create_default.3n       baudrate.3v     
  bcmp.3 d      bcopy.3       beep.3v       	bessel.3m ep      bindresvport.3n        bootparam.3r 3n       box.3v a       box.3x   4    	bsearch.3 x.  H    	bstring.3 h.  `    byteorder.3n  h.  p    bzero.3       cabs.3m       calloc.3 abs./share/man/man3/authdes_getcred.3n                                                                    755       0      12           75  4424741120  12237                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)authdes_getcred.3n 1.5 89/03/27 SMI;
    H  
   authunix_create.3n ,  l   ( authunix_create_default.3n       baudrate.3v     
  bcmp.3       bcopy.3       beep.3v       	bessel.3m        bindresvport.3n        bootparam.3r ort      box.3v t       box.3x   4    	bsearch.3    H    	bstring.3 ea  `    byteorder.3n ng.  p    bzero.3       cabs.3m       calloc.3        
callrpc.3n l    ./share/man/man3/authnon_create.3n                                                                     755       0      12           74  4424741120  12103                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)authnon_create.3n 1.4 89/03/27 SMI;
3n   l   ( authunix_create_default.3n       baudrate.3v     
  bcmp.3       bcopy.3       beep.3v       	bessel.3m        bindresvport.3n        bootparam.3r ort      box.3v t       box.3x   4    	bsearch.3    H    	bstring.3 ea  `    byteorder.3n ng.  p    bzero.3       cabs.3m       calloc.3        
callrpc.3n l      cbc_crypt.3       	cbre./share/man/man3/authunix_create.3n                                                                    755       0      12           75  4424741120  12275                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)authunix_create.3n 1.4 89/03/27 SMI;
efault.3n       baudrate.3v     
  bcmp.3       bcopy.3       beep.3v       	bessel.3m        bindresvport.3n        bootparam.3r ort      box.3v t       box.3x   4    	bsearch.3    H    	bstring.3 ea  `    byteorder.3n ng.  p    bzero.3       cabs.3m       calloc.3        
callrpc.3n l      cbc_crypt.3       	cbreak.3v c_      cbrt.3m   ./share/man/man3/authunix_create_default.3n                                                            755       0      12          105  4424741120  14013                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)authunix_create_default.3n 1.4 89/03/27 SMI;
 
  bcmp.3       bcopy.3       beep.3v       	bessel.3m        bindresvport.3n        bootparam.3r ort      box.3v t       box.3x   4    	bsearch.3    H    	bstring.3 ea  `    byteorder.3n ng.  p    bzero.3       cabs.3m       calloc.3        
callrpc.3n l      cbc_crypt.3       	cbreak.3v c_      cbrt.3m       ceil.3m         cfre./share/man/man3/baudrate.3v                                                                           755       0      12           71  4424741121  10701                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)baudrate.3v 1.5 89/03/27 SMI;
copy.3       beep.3v       	bessel.3m       bindresvport.3n        bootparam.3r ind      box.3v        box.3x t  4    	bsearch.3    H    	bstring.3   `    byteorder.3n  	  p    bzero.3       cabs.3m       calloc.3        
callrpc.3n       cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x    (  "  ./share/man/man3/bcmp.3                                                                                755       0      12           65  4424741121   7650                                                                                                                                                                                                                                                                                                                                                                      .so man3/bstring.3
.\" @(#)bcmp.3 1.6 89/03/27 SMI; 
eep.3v       	bessel.3m v       bindresvport.3n        bootparam.3r         box.3v r       box.3x .  4    	bsearch.3  t  H    	bstring.3    `    byteorder.3n  `  p    bzero.3       cabs.3m       calloc.3 3m       
callrpc.3n       cbc_crypt.3       	cbreak.3v 3       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x 3   (  "  class.3m     <  #  ./share/man/man3/bcopy.3                                                                               755       0      12           66  4424741121  10044                                                                                                                                                                                                                                                                                                                                                                      .so man3/bstring.3
.\" @(#)bcopy.3 1.6 89/03/27 SMI; 
ssel.3m       bindresvport.3n        bootparam.3r        box.3v         box.3x r  4    	bsearch.3 4  H    	bstring.3 H  `    byteorder.3n    p    bzero.3       cabs.3m       calloc.3        
callrpc.3n       cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $./share/man/man3/beep.3v                                                                               755       0      12           65  4424741121  10030                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)beep.3v 1.5 89/03/27 SMI;
 bindresvport.3n        bootparam.3r        box.3v        box.3x    4    	bsearch.3 4  H    	bstring.3 H  `    byteorder.3n    p    bzero.3       cabs.3m       calloc.3        
callrpc.3n       cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d./share/man/man3/bessel.3m                                                                             755       0      12         3230  4424741121  10416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bessel.3m 1.4 89/03/27 SMI; from UCB 4.2 BSD
.TH BESSEL 3M  "6 October 1987"
.SH NAME
j0, j1, jn, y0, y1, yn \- Bessel functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double j0(x)
.B double x;
.LP
.B double j1(x)
.B double x;
.LP
.B double jn(n, x)
.B double x;
.B int n;
.LP
.B double y0(x)
.B double x;
.LP
.B double y1(x)
.B double x;
.LP
.B double yn(n, x)
.B double x;
.B int n;
.fi
.IX  "j0 function"  ""  "\fLj0\fP  \(em Bessel function"
.IX  "mathematical functions"  j0  ""  \fLj0\fP
.IX  "Bessel functions"  j0  ""  \fLj0\fP
.IX  "j1 function"  ""  "\fLj1\fP  \(em Bessel function"
.IX  "mathematical functions"  j1  ""  \fLj1\fP
.IX  "Bessel functions"  j1  ""  \fLj1\fP
.IX  "jn function"  ""  "\fLjn\fP  \(em Bessel function"
.IX  "mathematical functions"  jn  ""  \fLjn\fP
.IX  "Bessel functions"  jn  ""  \fLjn\fP
.IX  "y0 function"  ""  "\fLy0\fP  \(em Bessel function"
.IX  "mathematical functions"  y0  ""  \fLy0\fP
.IX  "Bessel functions"  y0  ""  \fLy0\fP
.IX  "y1 function"  ""  "\fLy1\fP  \(em Bessel function"
.IX  "mathematical functions"  y1  ""  \fLy1\fP
.IX  "Bessel functions"  y1  ""  \fLy1\fP
.IX  "yn function"  ""  "\fLyn\fP  \(em Bessel function"
.IX  "mathematical functions"  yn  ""  \fLyn\fP
.IX  "Bessel functions"  yn  ""  \fLyn\fP
.SH DESCRIPTION
These functions calculate Bessel functions of the first
and second kinds for real arguments and integer orders.
.SH SEE ALSO
.BR exp (3M)
.SH DIAGNOSTICS
The functions
.I y0, y1,
and
.I yn
have logarithmic singularities at the origin, so they
treat zero and negative arguments the way
.I log
does, as described in
.BR exp (3M).
Such arguments are unexceptional for
.I j0, j1,
and
.I jn.
cv_notify.3l  S  l  T  
cv_send.3l l    U  
cv_wait.3l     V  
cv_waiters.3l V    W  dbm.3x V    X  dbm_clearerr.3 X    Y  dbm_close.3     Z  dbm_delete.3  Z     [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ]  D  ^  
dbm_nextkey.3 ^  X  _  
dbm_open.3 X  l  `  dbm_store.3     a  
dbmi./share/man/man3/bindresvport.3n                                                                       755       0      12         1574  4424741121  11674                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bindresvport.3n 1.9 89/03/27 SMI
.TH BINDRESVPORT 3N  "22 november 1987"
.SH NAME
bindresvport \- bind a socket to a privileged IP port
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <netinet/in.h>
.LP
.B int bindresvport(sd, sin)
.B int sd;
.B struct sockaddr_in \(**sin;
.fi
.SH DESCRIPTION
.IX "bindresvport function" "" "\fLbindresvport()\fP function"
.LP
.B bindresvport(\|)
is used to bind a socket descriptor to a privileged
.SM IP
port, that is, a
port number in the range 0-1023.
The routine returns 0 if it is successful,
otherwise \-1 is returned and
.B errno
set to reflect the cause of the error. This routine differs with
.B rresvport
(see
.BR rcmd (3N))
in that this works for any
.SM IP
socket, whereas
.B rresvport(\|)
only works for
.SM TCP\s0.
.LP
Only root can bind to a privileged port; this call will fail for any
other users.
.SH SEE ALSO
.BR rcmd (3N)
raw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3   	,  8  
closelog.3   	@./share/man/man3/bootparam.3r                                                                          755       0      12         1201  4424741122  11127                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bootparam.3r 1.6 89/03/27 SMI;
.TH BOOTPARAM 3R "6 October 1987"
.SH NAME
bootparam \- bootparam protocol
.SH PROTOCOL
.B /usr/include/rpcsvc/bootparam_prot.x
.SH DESCRIPTION
.IX "bootparam protocol" "" "bootparam protocol \(em \fLbootparam\fR"
The bootparam protocol is used for providing information to the diskless
clients necessary for booting.
.SH PROGRAMMING
.nf
.B #include <rpcsvc/bootparam.h>
.SS XDR Routines
.fi
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_bp_whoami_arg
.B	xdr_bp_whoami_res
.B	xdr_bp_getfile_arg
.B	xdr_bp_getfile_res
.fi
.SH SEE ALSO
.BR bootparams (5),
.BR bootparamd (8)
roy    ,  clnt_freeres.3n   0  -  clnt_geterr.3n    P  . $ clnt_pcreateerror.3n  .  h  /  clnt_perrno.3n     0  clnt_perror.3n h    1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :./share/man/man3/box.3v                                                                                755       0      12           64  4424741122   7705                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)box.3v 1.5 89/03/27 SMI;
bsearch.3 x.  H    	bstring.3 h.  `    byteorder.3n  h.  p    bzero.3       cabs.3m       calloc.3 abs      
callrpc.3n 3      cbc_crypt.3       	cbreak.3v yp      cbrt.3m       ceil.3m         cfree.3     !  	circle.3x re  (  "  class.3m e.3  <  #  clear.3v .3m  P  $  clear.3x .3v  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v r    (  
clearok.3x .    )./share/man/man3/box.3x                                                                                755       0      12           65  4424741122   7710                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)box.3x 1.6 89/03/27 SMI; 
 	bstring.3 H  `    byteorder.3n    p    bzero.3       cabs.3m       calloc.3        
callrpc.3n       cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3./share/man/man3/bsearch.3                                                                             755       0      12         6233  4424741122  10402                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bsearch.3 1.8 89/03/27 SMI; from S5
.TH BSEARCH 3 "6 October 1987"
.SH NAME
bsearch \- binary search a sorted table
.SH SYNOPSIS
.nf
.B #include <search.h>
.LP
.B "char *bsearch ((char *) key, (char *) base, nel, sizeof (*key), compar)"
.B unsigned nel;
.B int (*compar)( );
.fi
.SH DESCRIPTION
.IX "bsearch function" "" "\fLbsearch\fR \(em binary search of a sorted table"
.IX "binary search of sorted table \(em \fLbsearch\fR"
.IX "search functions" "bsearch" "" "\fLbsearch\fR binary search"
.B 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 a datum instance 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
as accordingly the first argument is to be considered
less than, equal to, or greater than the second.
.SH EXAMPLE
The example below searches a table containing pointers
to nodes consisting of a string and its length.
The table is ordered alphabetically on the string in the
node pointed to by each entry.
.LP
This code fragment reads in strings and either finds the
corresponding node, in which case it prints out the string and its length,
or it prints an error message.
.br
.ne 43
.RS
.nf
.ft B
#include <stdio.h>
#include <search.h>
#define	\s-1TABSIZE\s+1	1000
struct node {			/* these are stored in the table */
	char *string;
	int length;
};
struct node table[\s-1TABSIZE\s+1];	/* table to be searched */
	.
	.
	.
{
	struct node *node_ptr, node;
	int node_compare( );  /* routine to compare 2 nodes */
	char str_space[20];   /* space to read string into */
	.
	.
	.
	node.string = str_space;
	while (scanf("%s", node.string) != \s-1EOF\s0) {
		node_ptr = (struct node *)bsearch((char *)(&node),
			   (char *)table, \s-1TABSIZE\s0,
			   sizeof(struct node), node_compare);
		if (node_ptr != \s-1NULL\s0) {
			 (void)printf("string = %20s, length = %d\en",
				node_ptr\(mi>string, node_ptr\(mi>length);
		} else {
			 (void)printf("not found: %s\en", node.string);
		}
	}
}
/*
	This routine compares two nodes based on an
	alphabetical ordering of the string field.
*/
int
node_compare(node1, node2)
struct node *node1, *node2;
{
	return strcmp(node1\(mi>string, node2\(mi>string);
}
.ft R
.fi
.RE
.SH NOTES
.LP
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.
.LP
The comparison function need not compare every byte,
so arbitrary data may be contained in the elements in addition to the values
being compared.
.LP
Although declared as type pointer-to-character,
the value returned should be cast into type pointer-to-element.
.SH SEE ALSO
.BR hsearch (3),
.BR lsearch (3),
.BR qsort (3),
.BR tsearch (3)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned if the key cannot be found in the table.
  erasechar.3v        erf.3m       erfc.3m       errno.3       etext.3   (    ether.3r  (  @    
ether_aton.3n   \     ether_hostton.3n     t    
ether_line.3n       
ether_ntoa.3n        ether_ntohost.3n         	ethers.3n       exc_bound.3l        
exc_handle.3l    ./share/man/man3/bstring.3                                                                             755       0      12         3756  4424741122  10452                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bstring.3 1.18 89/03/27 SMI; from UCB 4.2
.TH BSTRING 3  "23 November 1987"
.SH NAME
bstring, bcopy, bcmp, bzero, ffs \- bit and byte string operations
.SH SYNOPSIS
.nf
.B bcopy(b1, b2, length)
.B char \(**b1, \(**b2;
.B int length;
.LP
.B int bcmp(b1, b2, length)
.B char \(**b1, \(**b2;
.B int length;
.LP
.B bzero(b, length)
.B char \(**b;
.B int length;
.LP
.B int ffs(i)
.B int i;
.fi
.IX  "bcopy function"  ""  "\fLbcopy\fP \(em copy byte strings"
.IX  "byte string functions"  bcopy  ""  \fLbcopy\fP
.IX  "copy" "byte strings \(em \fLbcopy\fP"
.IX  "bcmp function"  ""  "\fLbcmp\fP \(em compare byte strings"
.IX  "byte string functions"  bcmp  ""  \fLbcmp\fP
.IX  "compare" "byte strings \(em \fLbcmp\fP"
.IX  "bzero function"  ""  "\fLbzero\fP \(em zero byte strings"
.IX  "byte string functions"  bzero  ""  \fLbzero\fP
.IX  "zero byte strings \(em bzero"  ""  "zero byte strings \(em \fLbzero\fP"
.IX  "ffs function"  ""  "\fLffs\fP \(em find first one bit"
.IX  "bit string functions \(em \fLffs\fP"
.IX  find "first one bit \(em \fLffs\fP"
.SH DESCRIPTION
.LP
The functions
.BR bcopy ,
.BR bcmp ,
and
.B bzero(\|)
operate on variable length strings of bytes.  They do not check for
.SM NULL
bytes as the routines in
.BR string (3)
do.
.LP
.B bcopy(\|)
copies
.I length
bytes from string
.I b1
to the string
.IR b2 .
Overlapping strings are handled correctly.
.LP
.B bcmp(\|)
compares byte string
.I b1
against byte string
.IR b2 ,
returning zero if they are identical, non-zero otherwise.
Both strings are assumed to be
.I length
bytes long.
.B bcmp(\|)
of length zero bytes always returns zero.
.LP
.I bzero
places
.I length
0 bytes in the string
.IR b .
.LP
.I ffs
finds the first bit set in the argument passed it and returns the index
of that bit.  Bits are numbered starting at 1 from the right.  A return
value of zero indicates that the value passed is zero.
.SH CAVEAT
The
.B bcmp(\|)
and
.B bcopy(\|)
routines take parameters backwards from
.B strcmp(\|)
and
.BR strcpy .
.SH SEE ALSO
.BR string (3)
cimal_to_single.3 ./share/man/man3/byteorder.3n                                                                          755       0      12         3561  4424741122  11151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)byteorder.3n 1.15 89/03/27 SMI; from UCB 4.2
.TH BYTEORDER 3N "22 March 1989"
.SH NAME
byteorder, htonl, htons, ntohl, ntohs \- convert values between host and network byte order
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <netinet/in.h>
.LP
.B netlong = htonl(hostlong);
.B u_long netlong, hostlong;
.LP
.B netshort = htons(hostshort);
.B u_short netshort, hostshort;
.LP
.B hostlong = ntohl(netlong);
.B u_long hostlong, netlong;
.LP
.B hostshort = ntohs(netshort);
.B u_short hostshort, netshort;
.fi
.IX  "ntohl function"  ""  "\fLntohl\fP \(em convert network to host long"
.IX  convert  "network to host long"  ""  "network to host long \(em \fLntohl\fP"
.IX  "ntohs function"  ""  "\fLntohs\fP \(em convert host to network short"
.IX  convert  "network to host short"  ""  "network to host short \(em \fLntohs\fP"
.IX  "htonl function"  ""  "\fLhtonl\fP \(em convert network to host long"
.IX  convert  "host to network long"  ""  "host to network long \(em \fLhtonl\fP"
.IX  "htons function"  ""  "\fLhtons\fP \(em convert host to network short"
.IX  convert  "host to network short"  ""  "host to network short \(em \fLhtons\fP"
.IX  convert  "functions to between host and network byte order"
.IX  "byte order, functions to convert between host and network"
.IX  host "functions to convert to network byte order"
.SH DESCRIPTION
These routines convert 16 and 32 bit quantities between network
.\" Sun386i
byte order and host byte order.  On Sun-2, Sun-3 and Sun-4 systems,
these routines are defined as
.SM NULL
macros in the include file
.BR netinet/in.h .
On Sun386i systems, these routines are functional since its host byte order is
different from network byte order.
.LP
These routines are most often used in conjunction with Internet
addresses and ports as returned by
.BR gethostent (3N)
and
.BR getservent (3N).
.SH "SEE ALSO"
.BR gethostent (3N),
.BR getservent (3N)
al_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output./share/man/man3/bzero.3                                                                               755       0      12           66  4424741123  10053                                                                                                                                                                                                                                                                                                                                                                      .so man3/bstring.3
.\" @(#)bzero.3 1.6 89/03/27 SMI; 
lloc.3 abs      
callrpc.3n 3      cbc_crypt.3       	cbreak.3v yp      cbrt.3m       ceil.3m         cfree.3     !  	circle.3x re  (  "  class.3m e.3  <  #  clear.3v .3m  P  $  clear.3x .3v  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v r    (  
clearok.3x .    )   clnt_broadcast.3n     *  clnt_call.3n  )    +  clnt_destroy.3n      6  clock.3c roy    ,  ./share/man/man3/cabs.3m                                                                               755       0      12           65  4424741123  10016                                                                                                                                                                                                                                                                                                                                                                      .so man3/hypot.3m
.\" @(#)cabs.3m 1.6 89/03/27 SMI; 
 
callrpc.3n       cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n   0./share/man/man3/calloc.3                                                                              755       0      12           66  4424741123  10167                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)calloc.3 1.6 89/03/27 SMI; 
  cbc_crypt.3       	cbreak.3v       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n   0  -  clnt_geterr../share/man/man3/callrpc.3n                                                                            755       0      12           65  4424741123  10527                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)callrpc.3n 1.4 89/03/27 SMI;
   	cbreak.3v 3       cbrt.3m       ceil.3m         cfree.3     !  	circle.3x 3   (  "  class.3m    <  #  clear.3v  (  P  $  clear.3x  <  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x     )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcr./share/man/man3/cbc_crypt.3                                                                           755       0      12           74  4424741123  10701                                                                                                                                                                                                                                                                                                                                                                      .so man3/des_crypt.3
.\" @(#)cbc_crypt.3 1.6 89/03/27 SMI; 
cbrt.3m       ceil.3m         cfree.3     !  	circle.3x 3   (  "  class.3m  3   <  #  clear.3v    P  $  clear.3x  (  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /./share/man/man3/cbreak.3v                                                                             755       0      12           67  4424741123  10350                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)cbreak.3v 1.5 89/03/27 SMI;
ceil.3m         cfree.3     !  	circle.3x 3   (  "  class.3m  3   <  #  clear.3v  3   P  $  clear.3x    d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h  ./share/man/man3/cbrt.3m                                                                               755       0      12           63  4424741123  10036                                                                                                                                                                                                                                                                                                                                                                      .so man3/sqrt.3m
.\" @(#)cbrt.3m 1.5 89/03/27 SMI;
cfree.3     !  	circle.3x 3   (  "  class.3m  3   <  #  clear.3v  3   P  $  clear.3x  3   d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n ./share/man/man3/ceil.3m                                                                               755       0      12           64  4424741124  10022                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)ceil.3m 1.6 89/03/27 SMI; 
circle.3x   (  "  class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n   0  -  clnt_geterr.3n -  P  . $ clnt_pcreateerror.3n lnt  h  /  clnt_perrno.3n /    0  clnt_perror.3n 0    1  clnt_spe./share/man/man3/cfree.3                                                                               755       0      12           65  4424741124  10016                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)cfree.3 1.6 89/03/27 SMI; 
 class.3m  (  <  #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n   0  -  clnt_geterr.3n -  P  . $ clnt_pcreateerror.3n lnt  h  /  clnt_perrno.3n /    0  clnt_perror.3n 0    1  clnt_sperrno.3n     2  ./share/man/man3/circle.3x                                                                             755       0      12           65  4424741124  10363                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)circle.3x 1.5 89/03/27 SMI;
 #  clear.3v  <  P  $  clear.3x  P  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v     (  
clearok.3x     )   clnt_broadcast.3n      *  clnt_call.3n  *    +  clnt_destroy.3n      6  clock.3c       ,  clnt_freeres.3n   0  -  clnt_geterr.3n -  P  . $ clnt_pcreateerror.3n lnt  h  /  clnt_perrno.3n /    0  clnt_perror.3n 0    1  clnt_sperrno.3n     2  clnt_sperror.3n   ./share/man/man3/class.3m                                                                              755       0      12           76  4424741124  10216                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)class.3m 1.3 89/03/27 SMI;
ear.3x  <  d  %  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x     )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3./share/man/man3/clear.3v                                                                              755       0      12           66  4424741124  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)clear.3v 1.5 89/03/27 SMI;
%  clearerr.3s   x  &  clearerr.3v     '  
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_./share/man/man3/clear.3x                                                                              755       0      12           67  4424741124  10212                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)clear.3x 1.6 89/03/27 SMI; 
&  clearerr.3v     '  
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   ./share/man/man3/clearerr.3s                                                                           755       0      12           72  4424741125  10713                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3s
.\" @(#)clearerr.3s 1.6 89/03/27 SMI; 
 
clearok.3v      (  
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	./share/man/man3/clearerr.3v                                                                           755       0      12           71  4424741125  10715                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3v
.\" @(#)clearerr.3v 1.4 89/03/27 SMI;
 
clearok.3x      )   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3 5  	,./share/man/man3/clearok.3v                                                                            755       0      12           70  4424741125  10535                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)clearok.3v 1.5 89/03/27 SMI;
   clnt_broadcast.3n )    *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3 5  	,  8  
closelog.3 5  	@./share/man/man3/clearok.3x                                                                            755       0      12           71  4424741125  10540                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)clearok.3x 1.6 89/03/27 SMI; 
   *  clnt_call.3n      +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3 5  	,  8  
closelog.3 5  	@  9  
closepl.3x 5  	T./share/man/man3/clnt_broadcast.3n                                                                     755       0      12           74  4424741125  12073                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_broadcast.3n 1.4 89/03/27 SMI;
    +  clnt_destroy.3n      6  clock.3c 3n     ,  clnt_freeres.3n   0  -  clnt_geterr.3n 0  P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3 5  	,  8  
closelog.3 5  	@  9  
closepl.3x 5  	T  :  clrtobot.3v   	h./share/man/man3/clnt_call.3n                                                                          755       0      12           67  4424741125  11046                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_call.3n 1.4 89/03/27 SMI;
      6  clock.3c des    ,  clnt_freeres.3n   0  -  clnt_geterr.3n s  P  . $ clnt_pcreateerror.3n  P  h  /  clnt_perrno.3n n    0  clnt_perror.3n .    1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n n     4   clnttcp_create.3n 3  	  5   clntudp_create.3n 4  	  7  
closedir.3 a  	,  8  
closelog.3 s  	@  9  
closepl.3x s  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  ./share/man/man3/clnt_destroy.3n                                                                       755       0      12           72  4424741126  11621                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_destroy.3n 1.4 89/03/27 SMI;
,  clnt_freeres.3n   0  -  clnt_geterr.3n    P  . $ clnt_pcreateerror.3n  .  h  /  clnt_perrno.3n P    0  clnt_perror.3n n    1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrt./share/man/man3/clock.3c                                                                              755       0      12         1727  4424741130  10233                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clock.3c 1.7 89/03/27 SMI; from S5
.TH CLOCK 3C  "6 October 1987"
.SH NAME
clock \- report CPU time used
.SH SYNOPSIS
.B long clock ( )
.SH DESCRIPTION
.IX  clock  ""  \fLclock\fP
.IX  "timing and statistics"  clock  ""  \fLclock\fP
.IX  "interval timers"  clock  ""  "\fLclock\fP"
.B clock(\|)
returns the amount of
.SM CPU
time (in microseconds) used since the
first call to
.BR 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
.BR wait (2)
or
.BR system (3).
.LP
The resolution of the clock is 16.667 milliseconds.
.SH SEE ALSO
.BR wait (2),
.BR system (3),
.BR times (3C),
.BR times (3V)
.SH BUGS
The value returned by
.B clock(\|)
is defined in microseconds for compatibility with systems that have
.SM CPU
clocks with much higher resolution.
Because of this, the value returned
will wrap around after accumulating
only 2147 seconds of
.SM CPU
time (about 36 minutes).
R  cv_enumerate.3l   X  S  cv_notif./share/man/man3/clnt_freeres.3n                                                                       755       0      12           72  4424741126  11563                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_freeres.3n 1.4 89/03/27 SMI;
P  . $ clnt_pcreateerror.3n $   h  /  clnt_perrno.3n h    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n 3    4   clnttcp_create.3n 4  	  5   clntudp_create.3n 5  	  7  
closedir.3   	,  8  
closelog.3 3  	@  9  
closepl.3x r  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 x ./share/man/man3/clnt_geterr.3n                                                                        755       0      12           71  4424741126  11417                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_geterr.3n 1.4 89/03/27 SMI;
.3n  .  h  /  clnt_perrno.3n     0  clnt_perror.3n h    1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	./share/man/man3/clnt_pcreateerror.3n                                                                  755       0      12           77  4424741126  12632                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_pcreateerror.3n 1.4 89/03/27 SMI;
.    0  clnt_perror.3n     1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	  A  cos.3m y  	  B  ./share/man/man3/clnt_perrno.3n                                                                        755       0      12           71  4424741126  11434                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_perrno.3n 1.4 89/03/27 SMI;
   1  clnt_sperrno.3n     2  clnt_sperror.3n     3   clntraw_create.3n or    4   clnttcp_create.3n .3  	  5   clntudp_create.3n .3  	  7  
closedir.3 _  	,  8  
closelog.3 
  	@  9  
closepl.3x 
  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 >  	  @  copysign.3m   	  A  cos.3m @  	  B  cosh.3m   
   C  	crmode.3x B  
./share/man/man3/clnt_perror.3n                                                                        755       0      12           71  4424741127  11441                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_perror.3n 1.4 89/03/27 SMI;
   2  clnt_sperror.3n     3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	  A  cos.3m y  	  B  cosh.3m   
   C  	crmode.3x sh  
  D  crypt.3   
$  E  
./share/man/man3/clnt_sperrno.3n                                                                       755       0      12           72  4424741127  11621                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_sperrno.3n 1.4 89/03/27 SMI;
  3   clntraw_create.3n     4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	  A  cos.3m y  	  B  cosh.3m   
   C  	crmode.3x sh  
  D  crypt.3   
$  E  
ctermid.3s p  
4  F  ctim./share/man/man3/clnt_sperror.3n                                                                       755       0      12           72  4424741127  11625                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnt_sperror.3n 1.4 89/03/27 SMI;
    4   clnttcp_create.3n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	  A  cos.3m y  	  B  cosh.3m   
   C  	crmode.3x sh  
  D  crypt.3   
$  E  
ctermid.3s p  
4  F  ctime.3   
H  G  ctime.3v tim./share/man/man3/clntraw_create.3n                                                                     755       0      12           74  4424741127  12110                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clntraw_create.3n 1.4 89/03/27 SMI;
n   	  5   clntudp_create.3n 	  	  7  
closedir.3 3  	,  8  
closelog.3 r  	@  9  
closepl.3x g  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 nt  	  @  copysign.3m   	  A  cos.3m y  	  B  cosh.3m   
   C  	crmode.3x sh  
  D  crypt.3   
$  E  
ctermid.3s p  
4  F  ctime.3   
H  G  ctime.3v tim  
X  H  ctype.3   
l  I./share/man/man3/clnttcp_create.3n                                                                     755       0      12           74  4424741127  12105                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clnttcp_create.3n 1.4 89/03/27 SMI;
n   	  7  
closedir.3 a  	,  8  
closelog.3 s  	@  9  
closepl.3x s  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3    	  @  copysign.3m   	  A  cos.3m   	  B  cosh.3m   
   C  	crmode.3x    
  D  crypt.3   
$  E  
ctermid.3s   
4  F  ctime.3   
H  G  ctime.3v    
X  H  ctype.3   
l  I  ctype.3v    
  J  	curs./share/man/man3/clntudp_create.3n                                                                     755       0      12           74  4424741127  12107                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)clntudp_create.3n 1.4 89/03/27 SMI;
  8  
closelog.3 s  	@  9  
closepl.3x s  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3    	  @  copysign.3m   	  A  cos.3m   	  B  cosh.3m   
   C  	crmode.3x    
  D  crypt.3   
$  E  
ctermid.3s   
4  F  ctime.3   
H  G  ctime.3v    
X  H  ctype.3   
l  I  ctype.3v    
  J  	curses.3v yp  
  K  	curses.3x rs./share/man/man3/closedir.3                                                                            755       0      12           73  4424741130  10532                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)closedir.3 1.6 89/03/27 SMI; 

closepl.3x s  	T  :  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3    	  @  copysign.3m   	  A  cos.3m   	  B  cosh.3m   
   C  	crmode.3x    
  D  crypt.3   
$  E  
ctermid.3s   
4  F  ctime.3   
H  G  ctime.3v    
X  H  ctype.3   
l  I  ctype.3v    
  J  	curses.3v yp  
  K  	curses.3x rs  
  L   curses_functions.3v ./share/man/man3/closelog.3                                                                            755       0      12           70  4424741130  10532                                                                                                                                                                                                                                                                                                                                                                      .so man3/syslog.3
.\" @(#)closelog.3 1.6 89/03/27 SMI; 
  clrtobot.3v   	h  ;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v    
  K  	curses.3x yp  
  L   curses_functions.3v   
  M   curses_funct./share/man/man3/closepl.3x                                                                            755       0      12           66  4424741130  10561                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)closepl.3x 1.5 89/03/27 SMI;
;  clrtobot.3x   	|  <  clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x    
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuse./share/man/man3/clrtobot.3v                                                                           755       0      12           71  4424741130  10742                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)clrtobot.3v 1.5 89/03/27 SMI;
 clrtoeol.3v   	  =  clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 3   
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_b./share/man/man3/clrtobot.3x                                                                           755       0      12           72  4424741130  10745                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)clrtobot.3x 1.6 89/03/27 SMI; 
 clrtoeol.3x   	  >  cont.3x   	  ?  	control.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 3   
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  ./share/man/man3/clrtoeol.3v                                                                           755       0      12           71  4424741131  10736                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)clrtoeol.3v 1.5 89/03/27 SMI;
 cont.3x   	  ?  	control.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 3   
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  cv_create.3l    (  Q./share/man/man3/clrtoeol.3x                                                                           755       0      12           72  4424741131  10741                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)clrtoeol.3x 1.6 89/03/27 SMI; 
ntrol.3 x   	  @  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 3   
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  cv_create.3l    (  Q  
cv_destroy.3l (  @./share/man/man3/cont.3x                                                                               755       0      12           63  4424741131  10061                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)cont.3x 1.5 89/03/27 SMI;
@  copysign.3m   	  A  cos.3m n  	  B  cosh.3m   
   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 3   
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  cv_create.3l    (  Q  
cv_destroy.3l (  @  R  cv_enumerate.3l ./share/man/man3/control.3                                                                             755       0      12           71  4424741131  10405                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)control.3 1.3 89/03/27 SMI;
 cos.3m    	  B  cosh.3m   
   C  	crmode.3x 
   
  D  crypt.3   
$  E  
ctermid.3s $  
4  F  ctime.3   
H  G  ctime.3v  
H  
X  H  ctype.3   
l  I  ctype.3v  
l  
  J  	curses.3v 
  
  K  	curses.3x 
  
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s   
  O  cv_broadcast.3l     P  cv_create.3l  P  (  Q  
cv_destroy.3l Q  @  R  cv_enumerate.3l   X  S  cv_notif./share/man/man3/copysign.3m                                                                           755       0      12          102  4424741131  10750                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)copysign.3m 1.7 89/03/27 SMI; 

   C  	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 
l  
  K  	curses.3x 
  
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  cv_create.3l    (  Q  
cv_destroy.3l (  @  R  cv_enumerate.3l   X  S  cv_notify.3l  X  l  T  
cv_s./share/man/man3/cos.3m                                                                                755       0      12           63  4424741132   7670                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)cos.3m 1.7 89/03/27 SMI; 
	crmode.3x m   
  D  crypt.3   
$  E  
ctermid.3s    
4  F  ctime.3   
H  G  ctime.3v .3   
X  H  ctype.3   
l  I  ctype.3v .3   
  J  	curses.3v 3   
  K  	curses.3x 
l  
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s    
  O  cv_broadcast.3l     P  cv_create.3l    (  Q  
cv_destroy.3l (  @  R  cv_enumerate.3l   X  S  cv_notify.3l  X  l  T  
cv_send.3l X    U  
cv_w./share/man/man3/cosh.3m                                                                               755       0      12           72  4424741132  10040                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)cosh.3m 1.7 89/03/27 SMI; 
ypt.3   
$  E  
ctermid.3s $  
4  F  ctime.3   
H  G  ctime.3v  
H  
X  H  ctype.3   
l  I  ctype.3v  
l  
  J  	curses.3v 
  
  K  	curses.3x 
  
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s   
  O  cv_broadcast.3l     P  cv_create.3l  P  (  Q  
cv_destroy.3l Q  @  R  cv_enumerate.3l   X  S  cv_notify.3l  S  l  T  
cv_send.3l l    U  
cv_wait.3l     V  
./share/man/man3/crmode.3x                                                                             755       0      12           70  4424741132  10366                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)crmode.3x 1.6 89/03/27 SMI; 
ctermid.3s $  
4  F  ctime.3   
H  G  ctime.3v  
H  
X  H  ctype.3   
l  I  ctype.3v  
l  
  J  	curses.3v 
  
  K  	curses.3x 
  
  L   curses_functions.3v   
  M   curses_functions.3x   
  N  
cuserid.3s   
  O  cv_broadcast.3l     P  cv_create.3l  P  (  Q  
cv_destroy.3l Q  @  R  cv_enumerate.3l   X  S  cv_notify.3l  S  l  T  
cv_send.3l l    U  
cv_wait.3l     V  
cv_waiters.3l V  ./share/man/man3/crypt.3                                                                               755       0      12         5653  4424741132  10142                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)crypt.3 1.14 89/03/27 SMI; from UCB 4.3 BSD
.TH CRYPT 3 "6 October 1987"
.SH NAME
crypt, _crypt, setkey, encrypt \- password and data encryption
.SH SYNOPSIS
.nf
.B char *crypt(key, salt)
.B char *key, *salt;
.LP
.B char *_crypt(key, salt)
.B char *key, *salt;
.LP
.B setkey(key)
.B char *key;
.LP
.B encrypt(block, edflag)
.B char *block;
.fi
.IX  "crypt function"  ""  "\fLcrypt\fP \(em encryption"
.IX  "encryption"  crypt  ""  \fLcrypt\fP
.IX  "setkey function"  ""  "\fLsetkey\fP \(em encryption"
.IX  "encryption"  setkey  ""  \fLsetkey\fP
.IX  "encrypt function"  ""  "\fLencrypt\fP \(em encryption"
.IX  "encryption"  encrypt  ""  \fLencrypt\fP
.SH DESCRIPTION
.LP
.B crypt(\|)
is the password encryption routine,
based on the
.SM NBS
Data Encryption Standard,
with variations intended (among other things) to frustrate use of hardware
implementations of the
.SM DES
for key search.
.LP
The first argument to
.B crypt(\|)
is normally a user's typed password.
The second is a 2-character string chosen from the
set [a-zA-Z0-9./].
Unless it starts with
.RB ` ## '
or
.RB ` #$ ',
the
.I salt
string is used to perturb the
.SM DES
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,
in the same alphabet as the salt.
The first two characters are the salt itself.
.LP
If the
.I salt
string starts with
.RB ` ## ',
.BR pwdauth (3)
is called.  If
.I pwdauth
returns
.SM TRUE\s0,
the salt is returned from
.B crypt.
Otherwise,
.SM NULL
is returned.  If the
.I salt
string starts with
.RB ` #$ ',
.B grpauth
(see
.BR pwaudth (3))
is called.  If
.B grpauth
returns
.SM TRUE\s0,
the salt is returned from
.BR crypt .
Otherwise,
.SM NULL
is returned.  If there is a valid reason not
to have this authentication happen, calling
.I _crypt
avoids authentication.
.LP
The
.I setkey
and
.I encrypt
entries provide (rather primitive) access to the
.SM DES
algorithm.  The argument of
.I setkey
is a character array of length 64 containing only the characters
with numerical value 0 and 1.
If this string is divided into groups of 8,
the low-order bit in each group is ignored;
this gives a 56-bit key which is set into the machine.
This is the key that will be used
with the above mentioned algorithm to encrypt or decrypt
the string
.I block
with the function
.IR encrypt .
.LP
The argument to the
.I encrypt
entry is a character array of length 64
containing only the characters with
numerical value 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
.SM DES
algorithm using the key set by
.I setkey.
If
.I edflag
is zero, the argument is encrypted;
if non-zero, it is decrypted.
.SH "SEE ALSO"
.BR login (1),
.BR passwd (1),
.BR getpass (3),
.BR pwdauth (3),
.BR passwd (5)
.SH BUGS
.LP
The return value points to static data
whose content is overwritten by each call.
  feof.3s       feof.3v        ffs.3 of      	ferror.3s v   (  ./share/man/man3/ctermid.3s                                                                            755       0      12         2652  4424741132  10607                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ctermid.3s 1.8 89/03/27 SMI; from S5
.TH CTERMID 3S "6 October 1987"
.SH NAME
ctermid \- generate filename for terminal
.SH SYNOPSIS
.nf
.B
\#include <stdio.h>
.B char *ctermid (s)
.B char *s;
.fi
.SH DESCRIPTION
.IX ctermind "" "\fLctermid\fR \(em generate filename for terminal"
.B ctermid(\|)
generates the pathname of the controlling
terminal for the current process, and stores it in a
string.
.LP
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
.BR 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 path name is placed in this array and the value of
.I s
is returned.  The constant
.B l_ctermid
is defined in the
.B <stdio.h>
header file.
.SH NOTES
The difference between
.B ctermid(\|)
and
.BR ttyname (3)
is that
.B ttyname(\|)
must be handed a file descriptor and returns the actual name of
the terminal associated with that file descriptor, while
.B ctermid(\|)
returns a string
.RB ( /dev/tty )
that will refer to the
terminal if used as a file name.  Thus
.B ttyname(\|)
is useful only if the process already has at least one file open
to a terminal.
.B ctermid(\|)
is useful largely for making code portable to
(non-\s-1UNIX\s0) systems where the
current terminal is referred to by a name other than
.BR /dev/tty .
.SH SEE ALSO
.BR ttyname (3)
    ~  end.3 3       endac.3       endexportent.3   $    
endf./share/man/man3/ctime.3                                                                               755       0      12        16224  4424741132  10116                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)ctime.3 1.20 89/03/27 SMI; from UCB 4.3
.TH CTIME 3 "22 March 1989"
.SH NAME
ctime, localtime, gmtime, asctime, dysize, timelocal, timegm, tzset, tzsetwall \- convert date and time
.SH SYNOPSIS
.B #include <time.h>
.LP
.nf
.B struct tm *localtime(clock)
.B long *clock;
.fi
.LP
.nf
.B struct tm *gmtime(clock)
.B long *clock;
.fi
.LP
.nf
.B char *asctime(tm)
.B struct tm *tm;
.fi
.LP
.nf
.B char *ctime(clock)
.B long *clock;
.fi
.LP
.nf
.B int dysize(y)
.B int y;
.fi
.LP
.nf
.B time_t timelocal(tm)
.B struct tm *tm;
.fi
.LP
.nf
.B time_t timegm(tm)
.B struct tm *tm;
.fi
.LP
.B void tzset(\|)
.LP
.B void tzsetwall(\|)
.SH DESCRIPTION
.IX  "localtime function"  ""  "\fLlocaltime\fP \(em date and time conversion"
.IX  "date and time conversion"  localtime  ""  \fLlocaltime\fP
.IX  "time and date conversion"  localtime  ""  \fLlocaltime\fP
.IX  "convert time and date"  localtime  ""  \fLlocaltime\fP
.IX  "gmtime function"  ""  "\fLgmtime\fP \(em date and time conversion"
.IX  "date and time conversion"  gmtime  ""  \fLgmtime\fP
.IX  "time and date conversion"  gmtime  ""  \fLgmtime\fP
.IX  "convert time and date"  gmtime  ""  \fLgmtime\fP
.B localtime(\|)
and
.B gmtime(\|)
return pointers to structures containing the time, broken down into
various components of that time represented in a particular time zone.
.B localtime(\|)
breaks down a time specified by the
.IR clock
argument, correcting for the time zone and any
time zone adjustments (such
as Daylight Savings Time).  Before doing so,
.B localtime(\|)
calls
.B tzset(\|)
(if
.B tzset(\|)
has not been called in the current process).
.B gmtime(\|)
breaks down a time specified by the
.IR clock
argument into
.SM GMT\s0,
which is the time
the system uses.
.LP
.IX  "asctime function"  ""  "\fLasctime\fP \(em date and time conversion"
.IX  "date and time conversion"  asctime  ""  \fLasctime\fP
.IX  "time and date conversion"  asctime  ""  \fLasctime\fP
.IX  "convert time and date"  asctime  ""  \fLasctime\fP
.B asctime(\|)
converts a time value contained in a
\(lqtm\(rq structure to a 26-character string of
the form:
.IP
.B Sun Sep 16 01:03:52 1973\en\e0
.LP
Each field has a constant width.
.B asctime(\|)
returns a pointer to the string.
.LP
.IX  "ctime function"  ""  "\fLctime\fP \(em date and time conversion"
.IX  "date and time conversion"  ctime  ""  \fLctime\fP
.IX  "time and date conversion"  ctime  ""  \fLctime\fP
.IX  "convert time and date"  ctime  ""  \fLctime\fP
.B ctime(\|)
converts a long integer, pointed to by
.IR clock ,
to a 26-character string of the form produced by
.B asctime(\|) .
It first breaks down
.IR clock
to a
.B struct tm
by calling
.BR localtime(\|) ,
and then calls
.B asctime(\|)
to convert that
.B struct tm
to a string.
.LP
.IX  "dysize function"  ""  "\fLdysize\fP \(em date and time conversion"
.IX  "date and time conversion"  dysize  ""  \fLdysize\fP
.IX  "time and date conversion"  dysize  ""  \fLdysize\fP
.IX  "convert time and date"  dysize  ""  \fLdysize\fP
.B dysize(\|)
returns the number of days in the argument year, either 365 or 366.
.LP
.IX  "timelocal function"  ""  "\fLtimelocal\fP \(em date and time conversion"
.IX  "date and time conversion"  timelocal  ""  \fLtimelocal\fP
.IX  "time and date conversion"  timelocal  ""  \fLtimelocal\fP
.IX  "convert time and date"  timelocal  ""  \fLtimelocal\fP
.IX  "timegm function"  ""  "\fLtimegm\fP \(em date and time conversion"
.IX  "date and time conversion"  timegm  ""  \fLtimegm\fP
.IX  "time and date conversion"  timegm  ""  \fLtimegm\fP
.IX  "convert time and date"  timegm  ""  \fLtimegm\fP
.B timelocal(\|)
and
.B timegm(\|)
convert the time specified by the
.B tm
argument to a time value that represents that
time expressed as the number of seconds since Jan. 1, 1970, 00:00,
Greenwich Mean Time.
.B timelocal(\|)
converts a
.B struct tm
that represents local time,
correcting for the time zone and any time zone adjustments (such
as Daylight Savings Time).  Before doing so,
.B timelocal(\|)
calls
.B tzset(\|)
(if
.B tzset(\|)
has not been called in the current process).
.B timegm(\|)
converts a
.B struct tm
that represents
.SM GMT\s0.
.LP
.IX  "tzset function"  ""  "\fLtzset\fP \(em date and time conversion"
.IX  "date and time conversion"  tzset  ""  \fLtzset\fP
.IX  "time and date conversion"  tzset  ""  \fLtzset\fP
.IX  "convert time and date"  tzset  ""  \fLtzset\fP
.B tzset(\|)
uses the value of the environment variable
.SM TZ
to set time conversion information used by
.BR localtime(\|) .
If
.SM TZ
is absent from the environment,
the best available approximation to local wall clock time is used by
.BR localtime(\|) .
If
.SM TZ
appears in the environment but its value is a
.SM NULL
string, Greenwich Mean Time is used; if
.SM TZ
appears and begins with a slash,
it is used as the absolute pathname of the
.IR tzfile-format
(see
.BR tzfile (5))
file from which to read the time conversion information;
if
.SM TZ
appears and
begins with a character other than a slash,
it is used as a pathname relative to a system time conversion information
directory.
.LP
.IX  "tzsetwall function"  ""  "\fLtzsetwall\fP \(em date and time conversion"
.IX  "date and time conversion"  tzsetwall  ""  \fLtzsetwall\fP
.IX  "time and date conversion"  tzsetwall  ""  \fLtzsetwall\fP
.IX  "convert time and date"  tzsetwall  ""  \fLtzsetwall\fP
.B tzsetwall(\|)
sets things up so that
.B localtime(\|)
returns the best available approximation of local wall clock time.
.LP
Declarations of all the functions and externals, and the \(lqtm\(rq structure,
are in the
.B <time.h>
header file.
The structure (of type)
.B struct tm
includes the following fields:
.LP
.RS
.nf
.ft B
.ta .5i +\w'long tm_gmtoff;\0\0'u
	int tm_sec;		/\(** seconds (0 - 59) \(**/
	int tm_min;		/\(** minutes (0 - 59) \(**/
	int tm_hour;		/\(** hours (0 - 23) \(**/
	int tm_mday;		/\(** day of month (1 - 31) \(**/
	int tm_mon;		/\(** month of year (0 - 11) \(**/
	int tm_year;		/\(** year \- 1900 \(**/
	int tm_wday;		/\(** day of week (Sunday = 0) \(**/
	int tm_yday;		/\(** day of year (0 - 365) \(**/
	int tm_isdst;		/\(** 1 if DST in effect \(**/
	char \(**tm_zone;	/\(** abbreviation of timezone name \(**/
	long tm_gmtoff;	/\(** offset from GMT in seconds \(**/
.ft R
.fi
.RE
.LP
.B tm_isdst
is non-zero if Daylight Savings Time is in effect.
.B tm_zone
points to a string that is the name used for the local time zone at
the time being converted.
.B tm_gmtoff
is the offset (in seconds) of the time represented
from
.SM GMT\s0,
with positive values indicating East
of Greenwich.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/zoneinfo
standard time conversion information directory
.TP
.B /usr/share/lib/zoneinfo/localtime
local time zone file
.SH "SEE ALSO"
.BR gettimeofday (2),
.BR ctime (3V),
.BR getenv (3),
.BR time (3C),
.BR environ (5V),
.BR tzfile (5)
.SH BUGS
The return values point to static data,
whose contents are overwritten by each call.
The
.B tm_zone
field of a returned
.B "struct tm"
points to a static array of characters, which
will also be overwritten at the next call
(and by calls to
.B tzset(\|)
or
.BR tzsetwall(\|) ).
s\fR(3V)	 System V cursor addressing and screen display library
\fBpnoutrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBprintf(\|)\fR	\fBprintf\fR(3V)	 formatted output conversion
\fBrand(\|)\fR	\fBrand\fR(3V)	 simple random number generator
\fBraw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display li./share/man/man3/ctime.3v                                                                              755       0      12        21014  4424741133  10276                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ctime.3v 1.15 89/03/27 SMI; from UCB 4.3 and S5R2
.TH CTIME 3V "22 March 1989"
.SH NAME
ctime, localtime, gmtime, asctime, timelocal, timegm, tzset, tzsetwall \- convert date and time
.SH SYNOPSIS
.B #include <time.h>
.LP
.nf
.B struct tm *localtime(clock)
.B long *clock;
.fi
.LP
.nf
.B struct tm *gmtime(clock)
.B long *clock;
.fi
.LP
.nf
.B char *asctime(tm)
.B struct tm *tm;
.fi
.LP
.nf
.B char *ctime(clock)
.B long *clock;
.fi
.LP
.nf
.B time_t timelocal(tm)
.B struct tm *tm;
.fi
.LP
.nf
.B time_t timegm(tm)
.B struct tm *tm;
.fi
.LP
.B void tzset(\|)
.LP
.B void tzsetwall(\|)
.LP
.B extern long timezone;
.LP
.B extern int daylight;
.LP
.B extern char *tzname[2];
.SH DESCRIPTION
.IX  "localtime function V"  ""  "\fLlocaltime\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  localtime  ""  \fLlocaltime\fP
.IX  "time and date conversion, System V"  localtime  ""  \fLlocaltime\fP
.IX  "convert time and date, System V"  localtime  ""  \fLlocaltime\fP
.IX  "gmtime function V"  ""  "\fLgmtime\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  gmtime  ""  \fLgmtime\fP
.IX  "time and date conversion, System V"  gmtime  ""  \fLgmtime\fP
.IX  "convert time and date, System V"  gmtime  ""  \fLgmtime\fP
.LP
.B localtime(\|)
and
.B gmtime(\|)
return pointers to structures containing the time, broken down into
various components of that time represented in a particular time zone.
.B localtime(\|)
breaks down a time specified by the
.I clock
argument,
correcting for the time zone and any time zone adjustments (such
as Daylight Savings Time).  Before doing so,
.B localtime(\|)
calls
.B tzset(\|)
(if
.B tzset(\|)
has not been called in the current process).
.B gmtime(\|)
breaks down a time specified by the
.I clock
argument into
.SM GMT\s0,
which is the time
the system uses.
.LP
.IX  "asctime function V"  ""  "\fLasctime\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  asctime  ""  \fLasctime\fP
.IX  "time and date conversion, System V"  asctime  ""  \fLasctime\fP
.IX  "convert time and date, System V"  asctime  ""  \fLasctime\fP
.B asctime(\|)
converts a time value contained in a
\(lqtm\(rq structure to a 26-character string of
the form:
.IP
.B Sun Sep 16 01:03:52 1973\en\e0
.LP
Each field has a constant width.
.B asctime(\|)
returns a pointer to the string.
.LP
.IX  "ctime function V"  ""  "\fLctime\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  ctime  ""  \fLctime\fP
.IX  "time and date conversion, System V"  ctime  ""  \fLctime\fP
.IX  "convert time and date, System V"  ctime  ""  \fLctime\fP
.B ctime(\|)
converts a long integer, pointed to by
.IR clock ,
to a 26-character string of the form produced by
.BR asctime(\|) .
It first breaks down
.I clock
to a
.B struct tm
by calling
.BR localtime(\|) ,
and then calls
.B asctime(\|)
to convert that
.B struct tm
to a string.
.LP
.IX  "timelocal function V"  ""  "\fLtimelocal\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  timelocal  ""  \fLtimelocal\fP
.IX  "time and date conversion, System V"  timelocal  ""  \fLtimelocal\fP
.IX  "convert time and date, System V"  timelocal  ""  \fLtimelocal\fP
.IX  "timegm function V"  ""  "\fLtimegm\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  timegm  ""  \fLtimegm\fP
.IX  "time and date conversion, System V"  timegm  ""  \fLtimegm\fP
.IX  "convert time and date, System V"  timegm  ""  \fLtimegm\fP
.B timelocal(\|)
and
.B timegm(\|)
convert the time specified by the
.B tm
argument to a time value that represents that
time expressed as the number of seconds since Jan. 1, 1970, 00:00,
Greenwich Mean Time.
.B timelocal(\|)
converts a
.B struct tm
that represents local time,
correcting for the time zone and any time zone adjustments (such
as Daylight Savings Time).  Before doing so,
.B timelocal(\|)
calls
.B tzset(\|)
(if
.B tzset(\|)
has not been called in the current process).
.B timegm(\|)
converts a
.B struct tm
that represents
.SM GMT\s0.
.LP
.IX  "tzset function V"  ""  "\fLtzset\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  tzset  ""  \fLtzset\fP
.IX  "time and date conversion, System V"  tzset  ""  \fLtzset\fP
.IX  "convert time and date, System V"  tzset  ""  \fLtzset\fP
.B tzset(\|)
uses the value of the environment variable
.SM TZ
to set time conversion information used by
.BR localtime(\|) .
If
.SM TZ
is absent from the environment,
the best available approximation to local wall clock time is used by
.BR localtime(\|) .
If
.SM TZ
appears in the environment but its value is a
.SM NULL
string, Greenwich Mean Time is used; if
.SM TZ
appears and begins with a slash,
it is used as the absolute pathname of the
.I tzfile-format
(see
.BR tzfile (5))
file from which to read the time conversion information;
if
.SM TZ
appears and begins with a character other than a slash,
it is used as a pathname relative to a system time conversion information
directory.
.LP
.IX  "tzsetwall function V"  ""  "\fLtzsetwall\fP \(em date and time conversion, System V"
.IX  "date and time conversion, System V"  tzsetwall  ""  \fLtzsetwall\fP
.IX  "time and date conversion, System V"  tzsetwall  ""  \fLtzsetwall\fP
.IX  "convert time and date, System V"  tzsetwall  ""  \fLtzsetwall\fP
.B tzsetwall(\|)
sets things up so that
.B localtime(\|)
returns the best available approximation of local wall clock time.
.LP
Declarations of all the functions and externals, and the \(lqtm\(rq structure,
are in the
.B <time.h>
header file.
The structure (of type)
.B struct tm
includes the following fields:
.LP
.RS
.nf
.ft B
.ta .5i +\w'long tm_gmtoff;\0\0'u
	int tm_sec;		/\(** seconds (0 - 59) \(**/
	int tm_min;		/\(** minutes (0 - 59) \(**/
	int tm_hour;		/\(** hours (0 - 23) \(**/
	int tm_mday;		/\(** day of month (1 - 31) \(**/
	int tm_mon;		/\(** month of year (0 - 11) \(**/
	int tm_year;		/\(** year \- 1900 \(**/
	int tm_wday;		/\(** day of week (Sunday = 0) \(**/
	int tm_yday;		/\(** day of year (0 - 365) \(**/
	int tm_isdst;		/\(** 1 if DST in effect \(**/
	char \(**tm_zone;	/\(** abbreviation of timezone name \(**/
	long tm_gmtoff;	/\(** offset from GMT in seconds \(**/
.ft R
.fi
.RE
.LP
.B tm_isdst
is non-zero if Daylight Savings Time is in effect.
.B tm_zone
points to a string that is the name used for the local time zone at
the time being converted.
.B tm_gmtoff
is the offset (in seconds) of the time represented
from
.SM GMT\s0,
with positive values indicating East of Greenwich.
.LP
The external
.B long
variable
.I timezone
contains the difference, in seconds, between
.SM GMT
and local standard time (in
.SM PST\s0,
.I timezone
is 8\(**60\(**60).  If this difference is not a constant,
.I timezone
will contain the value of the offset on January 1, 1970 at 00:00
.SM GMT\s0.
Since this is not necessarily the same as the value at some
particular time, the time in question
should be converted to a \(lqstruct tm\(rq using
.BR localtime(\|)
(see
.BR ctime (3))
and the
.B tm_gmtoff
field of that structure should be used.
The external variable
.I daylight
is non-zero if and only if Daylight Savings Time would be in effect
within the current time zone at some time; it does not indicate
whether Daylight Savings Time is currently in effect.
.LP
The external variable
.I tzname
is an array of two
.B "char \(**"
pointers.
The first pointer points to a character string that is the name of the
current time zone when Daylight Savings Time is not in effect; the second one,
if Daylight Savings Time conversion should be applied, points to a character
string that is the name of the current time zone when Daylight Savings Time
is in effect.  These strings are updated by
.B localtime(\|)
whenever a time is converted.  If Daylight Savings Time is in effect
at the time being converted, the second pointer is set to point to
the name of the current time zone at that time, otherwise the first
pointer is so set.
.LP
.IR timezone ,
.IR daylight ,
and
.IR tzname
are retained for compatibility with existing programs.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/zoneinfo
standard time conversion information directory
.TP
.B /usr/share/lib/zoneinfo/localtime
local time zone file
.SH "SEE ALSO"
.BR gettimeofday (2),
.BR ctime (3),
.BR getenv (3),
.BR time (3C),
.BR environ (5V),
.BR tzfile (5)
.SH BUGS
The return values point to static data,
whose contents are overwritten by each call.
The
.B tm_zone
field of a returned
.B "struct tm"
points to a static array of characters, which
will also be overwritten at the next call
(and by calls to
.B tzset(\|)
or
.BR tzsetwall(\|) ).
 to a static array of characters, which
will also be overwritten at the next call
(and by calls to
.B tzset(\|)
or
.BR tzsetwall(\|) ).
s\fR(3V)	 System V cursor addressing and screen display library
\fBpnoutrefresh(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display library
\fBprintf(\|)\fR	\fBprintf\fR(3V)	 formatted output conversion
\fBrand(\|)\fR	\fBrand\fR(3V)	 simple random number generator
\fBraw(\|)\fR	\fBcurses\fR(3V)	 System V cursor addressing and screen display li./share/man/man3/ctype.3                                                                               755       0      12        10735  4424741133  10143                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ctype.3 1.16 89/03/27 SMI; from UCB 4.3 BSD
.TH CTYPE 3 "6 October 1987"
.SH NAME
ctype, isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, iscntrl, isascii, isgraph, toupper, tolower, toascii \- character classification and conversion macros and functions
.SH SYNOPSIS
.B #include <ctype.h>
.LP
.B isalpha(c)
.LP
.B \&.\|.\|.
.SH "CHARACTER CLASSIFICATION MACROS"
.LP
These macros classify
.SM ASCII\s0-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
.BI isascii( c )
is true and on the single non-\s-1ASCII\s0 value
.SM EOF
(see
.BR stdio (3S)).
.IX  "character classification"  isalpha  ""  \fLisalpha\fP
.IX  "isalpha macro"  ""  "\fLisalpha\fP \(em is character letter"
.TP 20
.BI isalpha( c )
.I c
is a letter
.IX  "character classification"  isupper  ""  \fLisupper\fP
.IX  "isupper macro"  ""  "\fLisupper\fP \(em is character upper-case"
.TP
.BI isupper( c )
.I c
is an upper case letter
.IX  "character classification"  islower  ""  \fLislower\fP
.IX  "islower macro"  ""  "\fLislower\fP \(em is character lower-case"
.TP
.BI islower( c )
.I c
is a lower case letter
.IX  "character classification"  isdigit  ""  \fLisdigit\fP
.IX  "isdigit macro"  ""  "\fLisdigit\fP \(em is character digit"
.TP
.BI isdigit( c )
.I c
is a digit [0-9].
.IX  "character classification"  isxdigit  ""  \fLisxdigit\fP
.IX  "isxdigit macro"  ""  "\fLisxdigit\fP \(em is character hex digit"
.TP
.BI isxdigit( c )
.I c
is a hexadecimal digit [0-9], [A-F], or [a-f].
.IX  "character classification"  isalnum  ""  \fLisalnum\fP
.IX  "isalnum macro"  ""  "\fLisalnum\fP \(em is character alphanumeric"
.TP
.BI isalnum( c )
.I c
is an alphanumeric character, that is,
.I c
is a letter or a digit
.IX  "character classification"  isspace  ""  \fLisspace\fP
.IX  "isspace macro"  ""  "\fLisspace\fP \(em is character whitespace"
.TP
.BI isspace( c )
.I c
is a space, tab, carriage return, newline, vertical tab, or formfeed
.IX  "character classification"  ispunct  ""  \fLispunct\fP
.IX  "ispunct macro"  ""  "\fLispunct\fP \(em is character punctuation"
.TP
.BI ispunct( c )
.I c
is a punctuation character (neither control nor alphanumeric)
.IX  "character classification"  isprint  ""  \fLisprint\fP
.IX  "isprint macro"  ""  "\fLisprint\fP \(em is character printable"
.TP
.BI isprint( c )
.I c
is a printing character, code 040(\&8) (space) through 0176 (tilde)
.IX  "character classification"  iscntrl  ""  \fLiscntrl\fP
.IX  "iscntrl macro"  ""  "\fLiscntrl\fP \(em is character control"
.TP
.BI iscntrl( c )
.I c
is a delete character (0177) or ordinary control character (less than 040).
.IX  "character classification"  isascii  ""  \fLisascii\fP
.IX  "isascii macro"  ""  "\fLisascii\fP \(em is character ASCII"
.TP
.BI isascii( c )
.I c
is an
.SM ASCII
character, code less than 0200
.IX  "character classification"  isgraph  ""  \fLisgraph\fP
.IX  "isgraph macro"  ""  "\fLisgraph\fP \(em is character graphic"
.TP
.BI isgraph( c )
.I c
is a visible graphic character, code 041 (exclamation mark) through
0176 (tilde).
.SH "CHARACTER CONVERSION MACROS"
.LP
These macros perform simple conversions on single characters.
.IX  "character conversion"  toupper  ""  \fLtoupper\fP
.IX  "toupper macro"  ""  "\fLtoupper\fP \(em convert character to upper-case"
.IX  "convert character" "to upper-case \(em \fLtoupper\fP"
.TP 20
.BI toupper( c )
converts
.I c
to its upper-case equivalent.  Note: this
.I only
works where
.I c
is known to be a lower-case character to start with (presumably checked
using
.IR islower ).
.IX  "character conversion"  tolower  ""  \fLtolower\fP
.IX  "tolower macro"  ""  "\fLtolower\fP \(em convert character to lower-case"
.IX  "convert character" "to lower-case \(em \fLtolower\fP"
.TP
.BI tolower( c )
converts
.I c
to its lower-case equivalent.  Note: this
.I only
works where
.I c
is known to be a upper-case character to start with (presumably checked
using
.IR isupper ).
.IX  "character conversion"  toascii  ""  \fLtoascii\fP
.IX  "toascii macro"  ""  "\fLtoascii\fP \(em convert character to ASCII"
.IX  "convert character" "to ASCII \(em \fLtoascii\fP"
.TP
.BI toascii( c )
masks
.I c
with the correct value so that
.I c
is guaranteed to be an
.SM ASCII
character in the range 0 through 0x7f.
.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"
.BR ctype (3V),
.BR stdio (3S),
.BR ascii (7)
     execv.3       exec./share/man/man3/ctype.3v                                                                              755       0      12        13653  4424741133  10333                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ctype.3v 1.9 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH CTYPE 3V "30 January 1988"
.SH NAME
ctype, isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, iscntrl, isascii, isgraph, toupper, tolower, toascii,  _toupper, _tolower \- character classification and conversion macros and functions
.SH SYNOPSIS
.B #include <ctype.h>
.LP
.B isalpha(c)
.LP
.B \&.\|.\|.
.SH "CHARACTER CLASSIFICATION MACROS"
.LP
These macros classify
.SM ASCII\s0-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
.BI isascii( c )
is true and on the single non-\s-1ASCII\s0 value
.SM EOF
(see
.BR stdio (3V)).
.IX  "character classification, System V"  isalpha  ""  \fLisalpha\fP
.IX  "isalpha macro V"  ""  "\fLisalpha\fP \(em is character letter, System V"
.TP 20
.BI isalpha( c )
.I c
is a letter
.IX  "character classification, System V"  isupper  ""  \fLisupper\fP
.IX  "isupper macro V"  ""  "\fLisupper\fP \(em is character upper-case, System V"
.TP
.BI isupper( c )
.I c
is an upper case letter
.IX  "character classification, System V"  islower  ""  \fLislower\fP
.IX  "islower macro V"  ""  "\fLislower\fP \(em is character lower-case, System V"
.TP
.BI islower( c )
.I c
is a lower case letter
.IX  "character classification, System V"  isdigit  ""  \fLisdigit\fP
.IX  "isdigit macro V"  ""  "\fLisdigit\fP \(em is character digit, System V"
.TP
.BI isdigit( c )
.I c
is a digit [0-9].
.IX  "character classification, System V"  isxdigit  ""  \fLisxdigit\fP
.IX  "isxdigit macro V"  ""  "\fLisxdigit\fP \(em is character hex digit, System V"
.TP
.BI isxdigit( c )
.I c
is a hexadecimal digit [0-9], [A-F], or [a-f].
.IX  "character classification, System V"  isalnum  ""  \fLisalnum\fP
.IX  "isalnum macro V"  ""  "\fLisalnum\fP \(em is character alphanumeric, System V"
.TP
.BI isalnum( c )
.I c
is an alphanumeric character, that is,
.I c
is a letter or a digit
.IX  "character classification, System V"  isspace  ""  \fLisspace\fP
.IX  "isspace macro V"  ""  "\fLisspace\fP \(em is character whitespace, System V"
.TP
.BI isspace( c )
.I c
is a space, tab, carriage return, newline, vertical tab, or formfeed
.IX  "character classification, System V"  ispunct  ""  \fLispunct\fP
.IX  "ispunct macro V"  ""  "\fLispunct\fP \(em is character punctuation, System V"
.TP
.BI ispunct( c )
.I c
is a punctuation character (neither control nor alphanumeric)
.IX  "character classification, System V"  isprint  ""  \fLisprint\fP
.IX  "isprint macro V"  ""  "\fLisprint\fP \(em is character printable, System V"
.TP
.BI isprint( c )
.I c
is a printing character, code 040(\&8) (space) through 0176 (tilde)
.IX  "character classification, System V"  iscntrl  ""  \fLiscntrl\fP
.IX  "iscntrl macro V"  ""  "\fLiscntrl\fP \(em is character control, System V"
.TP
.BI iscntrl( c )
.I c
is a delete character (0177) or ordinary control character (less than 040).
.IX  "character classification, System V"  isascii  ""  \fLisascii\fP
.IX  "isascii macro V"  ""  "\fLisascii\fP \(em is character ASCII, System V"
.TP
.BI isascii( c )
.I c
is an
.SM ASCII
character, code less than 0200
.IX  "character classification, System V"  isgraph  ""  \fLisgraph\fP
.IX  "isgraph macro V"  ""  "\fLisgraph\fP \(em is character graphic, System V"
.TP
.BI isgraph( c )
.I c
is a visible graphic character, code 041 (exclamation mark) through
0176 (tilde).
.SH "CHARACTER CONVERSION MACROS AND FUNCTIONS"
.I toupper
and
.I tolower
are functions, rather than macros, and work correctly on all characters.
The macros
.I _toupper
and
.I _tolower
are faster than the equivalent functions
.BI ( toupper
and
.IR tolower )
but only work properly on a restricted range of characters.
.LP
These functions perform simple conversions on single characters.
.IX  "character conversion, System V"  toupper  ""  \fLtoupper\fP
.IX  "toupper function V"  ""  "\fLtoupper\fP \(em convert character to upper-case, System V"
.IX  "convert character" "to upper-case, System V \(em \fLtoupper\fP"
.TP 20
.BI toupper( c )
converts
.I c
to its upper-case equivalent.  If
.I c
is not a lower-case letter, it is returned unchanged.
.IX  "character conversion, System V"  tolower  ""  \fLtolower\fP
.IX  "tolower function V"  ""  "\fLtolower\fP \(em convert character to lower-case, System V"
.IX  "convert character" "to lower-case, System V \(em \fLtolower\fP"
.TP
.BI tolower( c )
converts
.I c
to its lower-case equivalent.  If
.I c
is not an upper-case letter, it is returned unchanged.
.IX  "character conversion, System V"  toascii  ""  \fLtoascii\fP
.IX  "to ascii macro V"  ""  "\fLtoascii\fP \(em convert character to ASCII, System V"
.IX  "convert character" "to ASCII, System V \(em \fLtoascii\fP"
.TP
.BI toascii( c )
masks
.I c
with the correct value so that
.I c
is guaranteed to be an
.SM ASCII
character in the range 0 thru 0x7f.
.LP
These macros perform simple conversions on single characters.
.IX  "character conversion, System V"  _toupper  ""  \fL_toupper\fP
.IX  "_toupper macro V"  ""  "\fL_toupper\fP \(em convert character to upper-case, System V"
.IX  "convert character" "to upper-case, System V \(em \fL_toupper\fP"
.TP 20
.BI _toupper( c )
converts
.I c
to its upper-case equivalent.  Note that this
.I only
works where
.I c
is known to be a lower-case character to start with (presumably checked
using
.IR islower ).
.IX  "character conversion, System V"  _tolower  ""  \fL_tolower\fP
.IX  "tolower macro V"  ""  "\fL_tolower\fP \(em convert character to lower-case, System V"
.IX  "convert character" "to lower-case, System V \(em \fL_tolower\fP"
.TP
.BI _tolower( c )
converts
.I c
to its lower-case equivalent.  Note: this
.I only
works where
.I c
is known to be a upper-case character to start with (presumably checked
using
.IR isupper ).
.br
.ne 5
.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"
.BR ctype (3),
.BR stdio (3V),
.BR ascii (7)
9  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v  ./share/man/man3/curses.3v                                                                             755       0      12       217177  4424741134  10543                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)curses.3v 1.17 89/03/27 SMI; from S5R3
.hw noecho
.hw standout
.TH CURSES 3V "30 January 1988"
.UC 4
.SH NAME
curses \- System V terminal screen handling and optimization package
.SH SYNOPSIS
.LP
The
.B curses
manual page is organized as follows:
.LP
In
.SM SYNOPSIS
.RS
.PD 0
.TP 3
\(bu
compiling information
.TP
\(bu
summary of parameters used by
.B curses
routines
.TP
\(bu
alphabetical list of
.B curses
routines, showing their parameters
.PD
.RE
.LP
In
.SM DESCRIPTION\s0:
.RS
.TP 3
\(bu
An overview of how
.B curses
routines should be used
.RE
.LP
In
.SM ROUTINES\s0,
descriptions of
.B curses
routines are grouped under the appropriate topics:
.RS
.PD 0
.TP 3
\(bu
Overall Screen Manipulation
.TP
\(bu
Window and Pad Manipulation
.TP
\(bu
Output
.TP
\(bu
Input
.TP
\(bu
Output Options Setting
.TP
\(bu
Input Options Setting
.TP
\(bu
Environment Queries
.TP
\(bu
Soft Labels
.TP
\(bu
Low-level Curses Access
.TP
\(bu
Terminfo-Level Manipulations
.TP
\(bu
Termcap Emulation
.TP
\(bu
Miscellaneous
.TP
\(bu
Use of
.B curscr
.PD
.RE
.LP
Then come sections on:
.RS
.TP 3
\(bu
.SM ATTRIBUTES
.TP
\(bu
.SM FUNCTION CALLS
.TP
\(bu
.SM LINE GRAPHICS
.PD
.RE
.LP
.B /usr/5bin/cc
[
.I flag
\&\|.\|.\|.]
.I file
\&\|.\|.\|.
.B \-lcurses
[
.I library
\&\|.\|.\|.]
.TP 25
.B #include <curses.h>
(automatically includes
.BR <stdio.h> ,
.BR <termio.h> ,
and
.BR <unctrl.h> ).
.LP
The parameters in the following list are not global
variables; this is a summary of the parameters used by the
.B curses
library routines.
All routines return the
.B int
values
.SB ERR
or
.SB OK
unless otherwise noted.
Routines that return pointers always return
.SM NULL
on error.
.RB ( \s-1ERR\s0 ,
.BR \s-1OK\s0 ,
and
.SB NULL
are all defined in
.BR <curses.h> .)
Routines that return 
integers are not listed in the parameter list below.
.LP
.nf
.ft B
bool bf
.sp .25
char \(**\(**area,\(**boolnames[\|], \(**boolcodes[\|], \(**boolfnames[\|], \(**bp
char \(**cap, \(**capname, codename[2], erasechar, \(**filename, \(**fmt
char \(**keyname, killchar, \(**label, \(**longname
char \(**name, \(**numnames[\|], \(**numcodes[\|], \(**numfnames[\|]
char \(**slk_label, \(**str, \(**strnames[\|], \(**strcodes[\|], \(**strfnames[\|]
char \(**term, \(**tgetstr, \(**tigetstr, \(**tgoto, \(**tparm, \(**type
.sp .25
chtype attrs, ch, horch, vertch
.sp .25
\s-1FILE\s0 \(**infd, \(**outfd
.sp .25
int begin_x, begin_y, begline, bot, c, col, count
int dmaxcol, dmaxrow, dmincol, dminrow, \(**errret, fildes
int (\(**init(\|)), labfmt, labnum, line
int ms, ncols, new, newcol, newrow, nlines, numlines
int oldcol, oldrow, overlay
int p1, p2, p9, pmincol, pminrow, (\(**putc(\|)), row
int smaxcol, smaxrow, smincol, sminrow, start
int tenths, top, visibility, x, y
.sp .25
\s-1SCREEN\s0 \(**new, \(**newterm, \(**set_term
.sp .25
\s-1TERMINAL\s0 \(**cur_term, \(**nterm, \(**oterm
.sp .25
va_list varglist
.sp .25
\s-1WINDOW\s0 \(**curscr, \(**dstwin, \(**initscr, \(**newpad, \(**newwin, \(**orig
.sp .25
\s-1WINDOW\s0 \(**pad, \(**srcwin, \(**stdscr, \(**subpad, \(**subwin, \(**win
.ft R
.fi
.LP
.nf
.BI "addch (" ch )
.BI "addstr (" str )
.BI "attroff (" attrs )
.BI "attron (" attrs )
.BI "attrset (" attrs )
.B baudrate(\|)
.B beep(\|)
.BI "box (" "win, vertch, horch" )
.B cbreak(\|)
.B clear(\|)
.BI "clearok (" "win, bf" )
.B clrtobot(\|)
.B clrtoeol(\|)
.BI "copywin (" "srcwin, dstwin, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, overlay" )
.BI "curs_set (" visibility )
.B def_prog_mode(\|)
.B def_shell_mode(\|)
.BI "del_curterm (" oterm )
.BI "delay_output (" ms )
.B delch(\|)
.B deleteln(\|)
.BI "delwin (" win )
.B doupdate(\|)
.BI "draino (" ms )
.B echo(\|)
.BI "echochar (" ch )
.B endwin(\|)
.B erase(\|)
.B erasechar(\|)
.B filter(\|)
.B flash(\|)
.B flushinp(\|)
.BI "garbagedlines (" "win, begline, numlines" )
.BI "getbegyx (" "win, y, x" )
.B getch(\|)
.BI "getmaxyx (" "win, y, x" )
.BI "getstr (" str )
.BI "getsyx (" "y, x" )
.BI "getyx (" "win, y, x" )
.BI "halfdelay (" tenths )
.B has_ic(\|)
.B has_il(\|)
.BI "idlok (" "win, bf" )
.B inch(\|)
.B initscr(\|)
.BI "insch (" ch )
.B insertln(\|)
.BI "intrflush (" "win, bf" )
.B isendwin(\|)
.BI "keyname (" c )
.BI "keypad (" "win, bf" )
.B killchar(\|)
.BI "leaveok (" "win, bf" )
.B longname(\|)
.BI "meta (" "win, bf" )
.BI "move (" "y, x" )
.BI "mvaddch (" "y, x, ch" )
.BI "mvaddstr (" "y, x, str" )
.BI "mvcur (" "oldrow, oldcol, newrow, newcol" )
.BI "mvdelch (" "y, x" )
.BI "mvgetch (" "y, x" )
.BI "mvgetstr (" "y, x, str" )
.BI "mvinch (" "y, x" )
.BI "mvinsch (" "y, x, ch" )
.BI "mvprintw (" "y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "mvscanw (" "y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "mvwaddch (" "win, y, x, ch" )
.BI "mvwaddstr (" "win, y, x, str" )
.BI "mvwdelch (" "win, y, x" )
.BI "mvwgetch (" "win, y, x" )
.BI "mvwgetstr (" "win, y, x, str" )
.BI "mvwin (" "win, y, x" )
.BI "mvwinch (" "win, y, x" )
.BI "mvwinsch (" "win, y, x, ch" )
.BI "mvwprintw (" "win, y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "mvwscanw (" "win, y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "napms (" ms )
.BI "newpad (" "nlines, ncols" )
.BI "newterm (" "type, outfd, infd" )
.BI "newwin (" "nlines, ncols, begin_y, begin_x" )
.B nl(\|)
.B nocbreak(\|)
.BI "nodelay (" "win, bf" )
.B noecho(\|)
.B nonl(\|)
.B noraw(\|)
.BI "notimeout (" "win, bf" )
.BI "overlay (" "srcwin, dstwin" )
.BI "overwrite (" "srcwin, dstwin" )
.BI "pechochar (" "pad, ch" )
.BI "pnoutrefresh (" "pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol" ) 
.BI "prefresh (" "pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol" )
.BI "printw (" "fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "putp (" str )
.B raw(\|)
.B refresh(\|)
.B reset_prog_mode(\|)
.B reset_shell_mode(\|)
.B resetty(\|)
.BI "restartterm (" "term, fildes, errret" )
.BI "ripoffline (" "line, init" )
.B savetty(\|)
.BI "scanw (" "fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "scr_dump (" filename )
.BI "scr_init (" filename )
.BI "scr_restore (" filename )
.BI "scroll (" win )
.BI "scrollok (" "win, bf" )
.BI "set_curterm (" nterm )
.BI "set_term (" new )
.BI "setscrreg (" "top, bot" )
.BI "setsyx (" "y, x" )
.BI "setupterm (" "term, fildes, errret" )
.B slk_clear(\|)
.BI "slk_init (" fmt )
.BI "slk_label (" labnum )
.B slk_noutrefresh(\|)
.B slk_refresh(\|)
.B slk_restore(\|)
.BI "slk_set (" "labnum, label, fmt" )
.B slk_touch(\|)
.B standend(\|)
.B standout(\|)
.BI "subpad (" "orig, nlines, ncols, begin_y, begin_x" )
.BI "subwin (" "orig, nlines, ncols, begin_y, begin_x" )
.BI "tgetent (" "bp, name" )
.BI "tgetflag (" codename )
.BI "tgetnum (" codename )
.BI "tgetstr (" "codename, area" )
.BI "tgoto (" "cap, col, row" )
.BI "tigetflag (" capname )
.BI "tigetnum (" capname )
.BI "tigetstr (" capname )
.BI "touchline (" "win, start, count" )
.BI "touchwin (" win )
.BI "tparm (" "str, p1, p2, \|.\|.\|., p9" )
.BI "tputs (" "str, count, putc" )
.B traceoff(\|)
.B traceon(\|)
.BI "typeahead (" fildes )
.BI "unctrl (" c )
.BI "ungetch (" c )
.BI "vidattr (" attrs )
.BI "vidputs (" "attrs, putc" )
.BI "vwprintw (" "win, fmt, varglist" )
.BI "vwscanw (" "win, fmt, varglist" )
.BI "waddch (" "win, ch" )
.BI "waddstr (" "win, str" )
.BI "wattroff (" "win, attrs" )
.BI "wattron (" "win, attrs" )
.BI "wattrset (" "win, attrs" )
.BI "wclear (" win )
.BI "wclrtobot (" win )
.BI "wclrtoeol (" win )
.BI "wdelch (" win )
.BI "wdeleteln (" win )
.BI "wechochar (" "win, ch" )
.BI "werase (" win )
.BI "wgetch (" win )
.BI "wgetstr (" "win, str" )
.BI "winch (" win )
.BI "winsch (" "win, ch" )
.BI "winsertln (" win )
.BI "wmove (" "win, y, x" )
.BI "wnoutrefresh (" win )
.BI "wprintw (" "win, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "wrefresh (" win )
.BI "wscanw (" "win, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.BI "wsetscrreg (" "win, top, bot" )
.BI "wstandend (" win )
.BI "wstandout (" win )
.fi
.SH DESCRIPTION
.IX "curses functions, System V"
.LP
The
.B curses
routines give the user
a terminal-independent method of updating screens with reasonable
optimization.
.LP
In order to initialize the routines, the routine
.B initscr(\|)
or
.B newterm(\|)
must be called before any of the other routines that deal with windows and
screens are used.
(Three exceptions are noted where they apply.)
The routine
.B endwin(\|)
must be called before exiting.
To get character-at-a-time input without echoing, (most interactive, screen
oriented programs want this) after calling
.B initscr(\|)
you should call
.RB ` "cbreak (\|); noecho (\|);" '
Most programs would additionally call
.RB ` "nonl (\|);"
.BR "intrflush(stdscr, \s-1FALSE\s0); keypad(stdscr, \s-1TRUE\s0);" '.
.LP
Before a
.B curses
program is run, a terminal's
.SM TAB
stops should be set and its initialization
strings, if defined, must be output.
This can be done by executing the
.B tset
command in your
.B \&.profile
or
.B \&.login
file.
For further details, see
.BR tset (1)
and the
.B Tabs and Initialization
subsection of
.BR terminfo (5V).
.LP
The
.B curses
library contains routines that
manipulate data structures called
.I windows
that can be thought of as two-dimensional arrays of characters
representing all or part of a terminal screen.
A default window called
.BR stdscr
is supplied, which is the size of the terminal screen.
Others may be created with
.BR newwin(\|) .
Windows are referred to by variables declared as
.BR "\s-1WINDOW\s0 \(**" ;
the type
.SB WINDOW
is defined in
.RB < curses.h >
to be a C structure.
These data structures are manipulated with routines described below, among
which the most basic are
.B move(\|)
and
.BR addch(\|) .
(More general versions of these routines are included with names
beginning with
.BR w ,
allowing you to specify a window.
The routines not beginning with
.B w
usually affect
.BR stdscr .)
Then
.B refresh(\|)
is called, telling the routines to make the user's terminal screen look like
.BR stdscr .
The characters in a window are actually of type
.BR chtype ,
so that other information about the character may also be stored with each
character.
.LP
Special windows called
.I pads
may also be manipulated.
These are windows that are not constrained to the size of the screen and
whose contents need not be displayed completely.
See the description of
.B newpad(\|)
under
.B Window and Pad Manipulation
for more information.
.LP
In addition to drawing characters on the screen, video attributes may be
included that cause the characters to show up in modes such as
underlined or in reverse video on terminals that support such display
enhancements.
Line drawing characters may be specified to be output.
On input,
.B curses
is also able to translate arrow and function keys that
transmit escape sequences into single values.
The video attributes, line drawing characters, and input values use names,
defined in
.RB < curses.h >,
such as
.BR \s-1A_REVERSE\s0 ,
.BR \s-1ACS_HLINE\s0 ,
and
.BR \s-1KEY_LEFT\s0 .
.LP
.B curses
also defines the
.B "\s-1WINDOW\s0 \(**"
variable,
.BR curscr ,
which is used only for certain low-level operations like clearing
and redrawing a garbaged screen.
.B curscr
can be used in only a few routines.
If the window argument to
.B clearok(\|)
is 
.BR curscr ,
the next call to
.B wrefresh(\|)
with any window will clear and repaint the screen from scratch.
If the window argument to
.B wrefresh(\|)
is
.BR curscr ,
the screen in immediately cleared and
repainted from scratch.
This is how most programs would implement
a \(lqrepaint-screen\(rq function.
More information on using
.B curscr
is provided where its use is appropriate.
.LP
The environment variables
.SB LINES
and
.SB COLUMNS
may be set to override
.BR curses 's
idea of how large a screen is.
.LP
If the environment variable
.SB TERMINFO
is defined, any program using
.B curses
will check for a local terminal definition before
checking in the standard place.
For example, if the environment variable
.SB TERM
is set to
.BR sun ,
then the compiled terminal definition is found in
.BR /usr/share/lib/terminfo/s/sun .
(The
.B s
is copied from the first letter of
.B sun
to avoid creation of huge directories.)
However, if
.SB TERMINFO
is set to
.BR \s-1$HOME\s0/myterms ,
.B curses
will first check
.BR \s-1$HOME\s0/myterms/s/sun ,
and, if that fails, will then check
.BR /usr/share/lib/terminfo/s/sun .
This is useful for developing experimental
definitions or when write permission on
.B /usr/share/lib/terminfo
is not available.
.LP
The integer variables
.SB LINES
and
.SB COLS
are defined in
.RB < curses.h >,
and will be filled in by
.B initscr(\|)
with the size of the screen.
(For more information, see the subsection
.BR "Terminfo-Level Manipulations" .)
The constants
.SB TRUE
and
.SB FALSE
have the values
.B 1
and
.BR 0 ,
respectively.
The constants
.SB ERR
and
.SB OK
are returned by routines to indicate whether the routine successfully
completed.
These constants are also defined in
.BR <curses.h> .
.SH ROUTINES
.LP
Many of the following routines have two or more versions.
The routines prefixed with
.B w
require a
.I window
argument.
The routines prefixed with
.B p
require a
.I pad
argument.
Those without a prefix generally use
.BR stdscr .
.LP
The routines prefixed with
.B mv
require 
.I y
and
.I x
coordinates to move to before performing the appropriate action.
The
.B mv
routines imply a call to
.B move(\|)
before the call to the other routine.
The window argument is always specified before
the coordinates. 
.I y
always refers to the row
(of the window), and
.I x
always refers to the column.
The upper left corner is always
.BR (0,0) ,
not
.BR (1,1) .
The routines prefixed with
.B mvw
take both a
.I window
argument and
.I y
and
.I x
coordinates.
.LP
In each case,
.I win
is the window affected and
.I pad
is the pad affected.
.IB ( win
and
.I pad
are always of type
.BR "\s-1WINDOW\s+1 \(**" .)
Option-setting routines require a boolean flag
.I bf
with the value
.SB TRUE
or
.BR \s-1FALSE\s0 .
.RI ( bf
is always of type
.BR bool .)
The types
.BR \s-1WINDOW\s+1 ,
.BR bool ,
and
.B chtype
are defined in
.RB < curses.h >.
See the
.SM SYNOPSIS
for a summary of what types all variables are.
.LP
All routines return either the integer
.SB ERR
or the integer
.BR \s-1OK\s0 ,
unless otherwise noted.
Routines that return pointers always return
.SM NULL
on error.
.SS "Overall Screen Manipulation"
.LP
.TP 20
.B \s-1WINDOW\s0 \(**initscr(\|)
The first routine called should almost always be
.BR initscr(\|) .
(The exceptions are
.BR slk_init(\|) ,
.BR filter(\|) ,
and
.BR ripoffline(\|) .)
This will determine the terminal type and initialize all
.B curses
data structures.
.B initscr(\|)
also arranges that the first call to
.B refresh(\|)
will clear the screen.
If errors occur,
.B initscr(\|)
will write an appropriate error message to
standard error and exit;
otherwise, a pointer to
.B stdscr
is returned.
If the program wants an indication of error conditions,
.B newterm(\|)
should be used instead of
.BR initscr(\|) .
.B initscr(\|)
should only be called once per application.
.TP 20
.B endwin(\|)
A program should always call
.B endwin(\|)
before exiting or escaping from
.B curses
mode temporarily, to do a
shell escape or
.BR system (3)
call, for example.
This routine will restore
.BR termio (4)
modes, move the cursor to the lower left
corner of the screen and reset the terminal into the proper non-visual mode.
To resume after a temporary escape,
call
.B wrefresh(\|)
or
.BR doupdate(\|) .
.TP 20
.B isendwin(\|)
Returns
.SB TRUE
if
.B endwin(\|)
has been called without
any subsequent calls to
.BR wrefresh(\|) .
.TP 20
.BI "\s-1SCREEN\s0 \(**newterm(" "type, outfd, infd)
A program that outputs to more than one terminal must use
.B newterm(\|)
for each terminal instead of
.BR initscr(\|) .
A program that wants an indication of error conditions, so that it may
continue to run in a line-oriented mode if the terminal cannot support a
screen-oriented program, must also use this routine.
.B newterm(\|)
should be called once for each terminal.
It returns a variable of type
.B "\s-1SCREEN\s0\(**"
that should be saved as a reference to that terminal.
The arguments are the
.I type
of the terminal to be used in place of
the environment variable
.BR \s-1TERM\s0 ;
.IR outfd ,
a
.BR stdio (3V)
file pointer for output to the terminal; and
.IR infd ,
another file pointer for input from the terminal.
When it is done running, the program must also call
.B endwin(\|)
for each terminal being used.
If
.B newterm(\|)
is called more than once
for the same terminal, the first terminal referred to
must be the last one for which
.B endwin(\|)
is called.
.TP 20
.BI "\s-1SCREEN\s0 \(**set_term (" new )
This routine is used to switch between different terminals.
The screen reference
.I new
becomes the new current terminal.
A pointer to the screen of
the previous terminal is returned by the routine.
This is the only routine that manipulates
.SB SCREEN
pointers; all other routines affect only the current terminal.
.SS "Window and Pad Manipulation"
.LP
.PD 0
.TP 20
.B refresh(\|)
.TP
.BI "wrefresh (" win )
These routines
(or
.BR prefresh(\|) ,
.BR pnoutrefresh(\|) ,
.BR wnoutrefresh(\|) ,
or
.BR doupdate(\|) )
must be called to write output to the terminal,
as most other routines merely manipulate data structures.
.B wrefresh(\|)
copies the named window to the physical terminal screen,
taking into account what is already there in order
to minimize the amount of information that's
sent to the terminal (called optimization).
.B refresh(\|)
does the same thing, except it uses
.B stdscr
as a default window.
Unless
.B leaveok(\|)
has been enabled, the physical cursor of the terminal is left at the location
of the window's cursor.
The number of characters output to the terminal
is returned.
.sp .5
Note:
.B refresh(\|)
is a macro.
.PD
.sp .5
.PD 0
.TP 20
.BI "wnoutrefresh (" win )
.TP 20
.B doupdate(\|)
These two routines allow multiple updates
to the physical terminal screen with more efficiency than
.B wrefresh(\|)
alone.
How this is accomplished is described in the
next paragraph.
.sp .5
.B curses
keeps two data structures
representing the terminal screen: a
.IR physical
terminal screen, describing what is actually on the screen, and a
.IR virtual
terminal screen, describing what the programmer
wants
to have on the screen.
.B wrefresh(\|)
works by first calling
.BR wnoutrefresh(\|) ,
which copies the named window to the virtual screen, and then by calling
.BR doupdate(\|) ,
which compares the virtual screen to the physical screen and does the actual
update.
If the programmer wishes to output several windows at once, a series of calls
to
.B wrefresh(\|)
will result in alternating calls to
.B wnoutrefresh(\|)
and
.BR doupdate(\|) ,
causing several bursts of output to the screen.
By first calling
.B wnoutrefresh(\|)
for each window, it is then possible to call
.B doupdate(\|)
once, resulting in only one burst of output, with probably fewer total
characters transmitted and certainly less processor time used.
.PD
.TP 20
.BI "\s-1WINDOW\s0 \(**newwin (" "nlines, ncols, begin_y, begin_x" )
Create and return a pointer to
a new window with the given number of lines (or rows),
.IR nlines ,
and columns,
.IR ncols .
The upper left corner of the window is at line
.IR begin_y ,
column
.IR begin_x .
If either
.I nlines
or
.IR ncols
is
.BR 0 ,
they will be set to the value of
.BI lines\- begin_y
and
.BI cols\- begin_x\fR.
A new full-screen window is created by calling
.BR newwin(0,0,0,0) .
.TP 20
.BI "mvwin (" "win, y, x" )
Move the window so that the upper left corner will be at position
.RI ( y ", " x ).
If the move would cause the window to be off the screen, it is an error and
the window is not moved.
.TP 20
.BI "\s-1WINDOW\s0 \(**subwin (" "orig, nlines, ncols, begin_y, begin_x" )
Create and return a pointer to
a new window with the given number of lines (or rows),
.IR nlines ,
and columns,
.IR ncols .
The window is at position
.RI ( " begin_y, begin_x" )
on the screen.
(This position is relative to the screen, and not to the window
.IR orig .)
The window is made in the middle of the window
.IR orig ,
so that changes made to one window will affect both windows.
When using this routine, often it will be necessary to call
.B touchwin(\|)
or
.B touchline(\|)
on
.I orig
before calling
.BR wrefresh .
.TP 20
.BI " delwin (" win )
Delete the named window, freeing up all memory associated with it.
In the case of overlapping windows, subwindows should be deleted before the
main window.
.TP 20
.BI "\s-1WINDOW\s0 \(**newpad (" "nlines, ncols" )
Create and return a pointer to a new pad
data structure with the given number of lines (or rows),
.IR nlines ,
and columns,
.IR ncols .
A pad is a window that is not restricted by the screen size
and is not necessarily associated with a particular part of the screen.
Pads can be used when a large window is needed, and only a part of the window
will be on the screen at one time.
Automatic refreshes of pads (for example,
from scrolling or echoing of input) do not occur.
It is not legal to call
.B wrefresh(\|)
with a pad as an argument; the routines
.B prefresh(\|)
or
.B pnoutrefresh(\|)
should be called instead.
Note: these routines require additional parameters to specify the part of
the pad to be displayed and the location on the screen to be used for display.
.TP 20
.BI "\s-1WINDOW\s0 \(**subpad (" "orig, nlines, ncols, begin_y, begin_x" )
Create and return a pointer to
a subwindow within a pad with the given number of lines (or rows),
.IR nlines ,
and columns,
.IR ncols .
Unlike
.BR subwin(\|) ,
which uses screen coordinates,
the window is at position
.RI ( "begin_y, begin_x" )
on the pad.
The window is made in the middle of the window
.IR orig ,
so that changes made to one window will affect both windows.
When using this routine, often it will be necessary to call
.B touchwin(\|)
or
.B touchline(\|)
on
.I orig
before calling
.BR prefresh(\|) .
.sp .5
.PD 0
.TP 20
.BI "prefresh (" "pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol" )
.TP 20
.BI "pnoutrefresh (" "pad, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol" ) 
These routines are analogous to
.B wrefresh(\|)
and
.B wnoutrefresh(\|)
except that pads, instead of windows, are involved.
The additional parameters are needed to indicate what part of the pad and
screen are involved.
.IR pminrow
and
.IR pmincol
specify the upper left corner, in the pad, of the rectangle to be displayed.
.IR sminrow ,
.IR smincol ,
.IR smaxrow ,
and
.IR smaxcol
specify the edges, on the screen, of the rectangle to be displayed in.
The lower right corner in the pad of the rectangle to be displayed is
calculated from the screen coordinates, since the rectangles must be the same
size.
Both rectangles must be entirely contained within their respective structures.
Negative values of
.IR pminrow ,
.IR pmincol ,
.IR sminrow ,
or
.IR smincol
are treated as if they were zero.
.PD
.br
.ne8
.SS "Output"
.LP
These routines are used to \(lqdraw\(rq text on windows.
.sp .5
.PD 0
.TP 20
.BI "addch (" ch )
.TP
.BI "waddch (" "win, ch" )
.TP
.BI "mvaddch (" "y, x, ch" )
.TP
.BI "mvwaddch (" "win, y, x, ch" )
The character
.IR ch
is put into the window at the current cursor position of the window and
the position of the window cursor is advanced.
Its function is similar to that of
.B putchar(\|)
(see
.BR putc (3S)).
At the right margin, an automatic newline is performed.
At the bottom of the scrolling region,
if
.B scrollok(\|)
is enabled, the scrolling region will be scrolled up one line.
.IP
If
.I ch
is a
.SM TAB\s0,
.SM NEWLINE\s0,
or backspace, the cursor will be moved appropriately
within the window.
A
.SM NEWLINE
also does a
.B clrtoeol(\|)
before moving.
.SM TAB
characters are considered to be at every eighth column.
If
.I ch
is another control character, it will be drawn in the
.SM CTRL-X
notation.  (Calling
.B winch(\|)
after adding a control character will not return the control character, but
instead will return the representation of the control character.)
.IP
Video attributes can be combined with a character by or-ing them
into the parameter.
This will result in these attributes also being set.
(The intent here is that text, including attributes, can be
copied from one place to another using
.B inch(\|)
and
.BR addch(\|) .)
See
.BR standout(\|) ,
below.
.IP
Note: 
.IR ch
is actually of type
.BR chtype ,
not a character.
.IP
Note: 
.BR addch(\|) ,
.BR mvaddch(\|) ,
and
.B mvwaddch(\|)
are macros.
.PD
.IP
.PD 0
.TP 20
.BI "echochar (" ch )
.TP
.BI "wechochar (" "win, ch" )
.TP
.BI "pechochar (" "pad, ch" )
These routines are functionally equivalent to a call to
.BI "addch (" ch )
followed by a call to
.BR refresh(\|) ,
a call to
.BI "waddch (" "win, ch" )
followed by a call to
.BI "wrefresh (" win ),
or a call to
.BI "waddch (" "pad, ch" )
followed by a call to
.BI "prefresh (" pad ).
The knowledge that only a single character is being output is taken into
consideration and, for non-control characters, a considerable performance
gain can be seen by using these routines instead of their equivalents.
In the case of
.BR pechochar(\|) ,
the last location of the pad on the screen is reused for the
arguments to
.BR prefresh(\|) .
.IP
Note: 
.I ch
is actually of type
.BR chtype ,
not a character.
.IP
Note: 
.B echochar(\|)
is a macro.
.PD
.LP
.PD 0
.TP 20
.BI "addstr (" str )
.TP
.BI "waddstr (" "win, str" )
.TP 20
.BI "mvwaddstr (" "win, y, x, str" )
.TP
.BI "mvaddstr (" "y, x, str" )
These routines write all the characters of the null-terminated character
string
.I str
on the given window.
This is equivalent to calling
.B waddch(\|)
once for each character in the string.
.IP
Note: 
.BR addstr(\|) ,
.BR mvaddstr(\|) ,
and
.B mvwaddstr(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.BI "attroff (" attrs )
.TP
.BI "wattroff (" "win, attrs" )
.TP 20
.BI "attron (" attrs )
.TP
.BI "wattron (" "win, attrs" )
.TP 20
.BI "attrset (" attrs )
.TP
.BI "wattrset (" "win, attrs" )
.TP 20
.B standend(\|)
.TP
.BI "wstandend (" win )
.TP 20
.B standout(\|)
.TP
.BI "wstandout (" win )
These routines manipulate the
current attributes of the named window.
These attributes can be any combination of
.BR \s-1A_STANDOUT\s0 ,
.BR \s-1A_REVERSE\s0 ,
.BR \s-1A_BOLD\s0 ,
.BR \s-1A_DIM\s0 ,
.BR \s-1A_BLINK\s0 ,
.BR \s-1A_UNDERLINE\s0 ,
and
.BR \s-1A_ALTCHARSET\s0 .
These constants are defined in
.RB < curses.h >
and can be combined with the C logical
.SM OR
( | ) operator.
.IP
The current attributes of a window are applied to all characters that
are written into the window with
.BR waddch(\|) .
Attributes are a property of the character, and move with the character
through any scrolling and insert/delete line/character operations.
To the extent possible on the particular terminal, they will be
displayed as the graphic rendition of the characters put on the screen.
.IP
.BI "attrset (" attrs )
sets the current attributes of the given window to
.IR attrs .
.BI "attroff (" attrs )
turns off the named attributes without turning on or off any other attributes.
.BI "attron (" attrs )
turns on the named attributes without affecting any others.
.B standout(\|)
is the same as
.BR attron ( \s-1A_STANDOUT\s0 ).
.B standend(\|)
is the same as
.BR attrset(0) ,
that is, it turns off all attributes.
.IP
Note: 
.I attrs
is actually of type
.BR chtype ,
not a character.
.IP
Note: 
.BR attroff(\|) ,
.BR attron(\|) ,
.BR attrset(\|) ,
.BR standend(\|) ,
and
.B standout(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.B beep(\|)
.TP
.B flash(\|)
These routines are used to signal the terminal user.
.B beep(\|)
will sound the audible alarm on the terminal, if possible, and if not, will
flash the screen (visible bell), if that is possible.
.B flash(\|)
will flash the screen, and if that is not possible, will sound the audible
signal.
If neither signal is possible, nothing will happen.
Nearly all terminals have an audible signal (bell or beep) but only some can
flash the screen.
.PD
.LP
.TP 20
.BI "box (" "win, vertch, horch" )
A box is drawn around the edge of the window,
.IR win .
.I vertch
and
.I horch
are the characters the box is to be drawn with.
If
.I vertch
and
.I horch
are
.BR 0 ,
then appropriate default characters,
.SB ACS_VLINE
and
.BR \s-1ACS_HLINE\s0 ,
will be used.
.IP
Note: 
.I vertch
and
.I horch
are actually of type
.BR chtype ,
not characters.
.LP
.PD 0
.TP 20
.B erase(\|)
.TP
.BI "werase (" win )
These routines copy blanks to every position in the window.
.IP
Note: 
.B erase(\|)
is a macro.
.PD
.TP 20
.B clear(\|)
.PD 0
.TP
.BI "wclear (" win )
These routines are like
.B erase(\|)
and
.BR werase(\|) ,
but they also call
.BR clearok(\|) ,
arranging that the screen will be cleared completely on the next call to
.B wrefresh(\|)
for that window, and repainted from scratch.
.IP
Note: 
.B clear(\|)
is a macro.
.PD
.LP
.PD 0
.TP 20
.B clrtobot(\|)
.TP
.BI "wclrtobot (" win )
All lines below the cursor in this window are erased.
Also, the current line to the right of the cursor, inclusive, is erased.
.IP
Note: 
.B clrtobot(\|)
is a macro.
.PD
.LP
.PD 0
.TP 20
.B clrtoeol(\|)
.TP
.BI "wclrtoeol (" win )
The current line to the right of the cursor, inclusive, is erased.
.IP
Note: 
.B clrtoeol(\|)
is a macro.
.PD
.LP
.TP 20
.BI "delay_output (" ms )
Insert a
.I ms
millisecond pause in the output.
It is not recommended that this routine be used extensively,
because padding characters are used rather than a processor pause.
.LP
.PD 0
.TP 20
.B delch(\|)
.TP
.BI "wdelch (" win )
.TP
.BI "mvdelch (" "y, x" )
.TP
.BI "mvwdelch (" "win, y, x" )
The character under the cursor in the window is deleted.
All characters to the right on the same line are moved to the left one
position and the last character on the line is filled with a blank.
The cursor position does not change (after moving to
.RI ( "y, x" ),
if specified).
(This does not imply use of the hardware \(lqdelete-character\(rq feature.)
.IP
Note: 
.BR delch(\|) ,
.BR mvdelch(\|) ,
and
.B mvwdelch(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.B deleteln(\|)
.TP
.BI "wdeleteln (" win )
The line under the cursor in the window is deleted.
All lines below the current line are moved up one line.
The bottom line of the window is cleared.
The cursor position does not change.
(This does not imply use of the hardware \(lqdelete-line\(rq feature.)
.IP
Note: 
.B deleteln(\|)
is a macro.
.PD
.LP
.TP 20
.BI "getyx (" "win, y, x" )
The cursor position of the window is placed in the two integer variables
.I y
and
.IR x .
This is implemented as a macro, so no
.RB ` & '
is necessary before the variables.
.LP
.PD 0
.TP 20
.BI "getbegyx (" "win, y, x" )
.TP
.BI "getmaxyx (" "win, y, x" )
Like
.BR getyx(\|) ,
these routines store the current beginning coordinates and size of the
specified window.
.IP
Note: 
.B getbegyx(\|)
and
.B getmaxyx(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.BI "insch (" ch )
.TP
.BI "winsch (" "win, ch" )
.TP 20
.BI "mvwinsch (" "win, y, x, ch" )
.TP
.BI "mvinsch (" "y, x, ch" )
The character
.I ch
is inserted before the character under the cursor.
All characters to the right are moved one
.SM SPACE
to the right, possibly losing
the rightmost character of the line.
The cursor position does not change (after moving to
.RI ( "y, x" ),
if specified).
(This does not imply use of the hardware \(lqinsert-character\(rq feature.)
.IP
Note: 
.I ch
is actually of type
.BR chtype ,
not a character.
.IP
Note: 
.BR insch(\|) ,
.BR mvinsch(\|) ,
and
.B mvwinsch(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.B insertln(\|)
.TP
.BI "winsertln (" win )
A blank line is inserted above the current line and the bottom line is lost.
(This does not imply use of the hardware \(lqinsert-line\(rq feature.)
.IP
Note: 
.B insertln(\|)
is a macro.
.PD
.LP
.PD 0
.TP 20
.BI "move (" "y, x" )
.TP
.BI "wmove (" "win, y, x" )
The cursor associated with the window is moved to
line (row)
.IR y ,
column
.IR x .
This does not move the physical cursor of the terminal until
.B refresh(\|)
is called.
The position specified is relative to the upper left corner of the window,
which is
.RB ( 0 ", " 0 ).
.IP
Note: 
.B move(\|)
is a macro.
.LP
.TP 20
.BI "overlay (" "srcwin, dstwin" )
.TP 20
.BI "overwrite (" "srcwin, dstwin" )
These routines overlay
.I srcwin
on top of
.IR dstwin ;
that is, all text in
.I srcwin
is copied into
.IR dstwin .
.I scrwin
and
.I dstwin
need not be the same size;
only text where the two windows overlap is copied.
The difference is that
.B overlay(\|)
is non-destructive (blanks are not copied), while
.B overwrite(\|)
is destructive.
.PD
.LP
.PD 0
.TP 20
.BI "copywin (" "srcwin, dstwin, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, overlay" )
This routine provides a finer grain of control over the
.B overlay(\|)
and
.B overwrite(\|)
routines.
Like in the
.B prefresh(\|)
routine, a rectangle is specified in the destination window,
.RI ( dminrow ", " dmincol )
and
.RI ( dmaxrow ", " dmaxcol ),
and the upper-left-corner coordinates of the source window,
.RI ( sminrow ", " smincol ).
If the argument
.I overlay
is true, then copying is non-destructive, as in
.BR overlay(\|) .
.PD
.LP
.PD 0
.TP 20
.BI "printw (" "fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.TP 20
.BI "wprintw (" "win, fmt \fR[, arg\|.\|.\|.\fR]" )
.TP 20
.BI "mvprintw (" "y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.TP 20
.BI "mvwprintw (" "win, y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
These routines are analogous to
.BR printf (3S).
The string that would be output by
.BR printf (3S)
is instead output using
.B waddstr(\|)
on the given window.
.PD
.TP 20
.BI "vwprintw (" "win, fmt, varglist" )
This routine corresponds to
.BR vprintf (3V).
It performs a
.B wprintw(\|)
using a variable argument list.
The third argument is a
.BR va_list ,
a pointer to a list of arguments, as defined
in
.BR <varargs.h> .
See the 
.BR vprintf (3V)
and
.BR varargs (3)
manual pages for a detailed description on how to use variable
argument lists.
.TP 20
.BI "scroll (" win )
The window is scrolled up one line.
This involves moving the lines in the window data structure.
As an optimization, if the window is
.BR stdscr
and the scrolling region is the entire window,
the physical screen will be scrolled at the same time.
.LP
.PD 0
.TP 20
.BI "touchwin (" win )
.TP
.BI "touchline (" "win, start, count" )
Throw away all optimization information about which parts of the window have
been touched, by pretending that the entire window has been drawn on.
This is sometimes necessary when using overlapping windows, since a change to
one window will affect the other window, but the records of which lines have
been changed in the other window will not reflect the change.
.B touchline(\|)
only pretends that
.I count
lines have been changed, beginning with line
.IR start .
.PD
.br
.ne8
.SS "Input"
.LP
.PD 0
.TP 20
.B getch(\|)
.TP
.BI "wgetch (" win )
.TP
.BI "mvgetch (" "y, x" )
.TP
.BI "mvwgetch (" "win, y, x" )
A character is read from the terminal associated with the window.
In
.SM NODELAY
mode, if there is no input waiting, the value
.SB ERR
is returned.
In
.SM DELAY
mode,
the program will hang until the system passes text through to
the program.
Depending on the setting of
.BR cbreak(\|) ,
this will be after one character (\s-1CBREAK\s0 mode),
or after the first newline (\s-1NOCBREAK\s0 mode).
In
.SM HALF-DELAY
mode, the program will hang until a character is typed or the
specified timeout has been reached.
Unless
.B noecho(\|)
has been set,
the character will also be echoed into the designated window.
No
.B refresh(\|)
will occur between the
.B move(\|)
and the
.B getch(\|)
done within the routines
.B mvgetch(\|)
and
.BR mvwgetch(\|) .
.IP
When using
.BR getch(\|) ,
.BR wgetch(\|) ,
.BR mvgetch(\|) ,
or
.BR mvwgetch(\|) ,
do not set both
.SM NOCBREAK
mode
.RB ( nocbreak (\|))
and
.SM ECHO
mode
.RB ( echo (\|))
at the same time.
Depending on the state of the terminal
driver when each character is typed,
the program may produce undesirable results.
.IP
If
.BI "keypad (" "win, " \s-1TRUE\s0)
has been called,
and a function key is pressed, the token for that function
key will be returned instead of the raw characters.
(See
.B keypad(\|)
under
.BR "Input Options Setting" .)
Possible function keys are defined in
.RB < curses.h >
with integers beginning with
.BR 0401 ,
whose names begin with
.BR \s-1KEY_\s0 .
If a character is received that could be the beginning of a function key
(such as escape),
.B curses
will set a timer.
If the remainder of the sequence is not received within the designated time,
the character will be passed through,
otherwise the function key value will be returned.
For this reason, on many terminals, there will be a delay after a
user presses the escape key before the escape is returned to the program.
(Use by a programmer of the escape key for a single character routine is
discouraged.
Also see
.B notimeout(\|)
below.)
.IP
Note: 
.BR getch(\|) ,
.BR mvgetch(\|) ,
and
.B mvwgetch(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.BI "getstr (" str )
.TP
.BI "wgetstr (" "win, str" )
.TP 20
.BI "mvgetstr (" "y, x, str" )
.TP
.BI "mvwgetstr (" "win, y, x, str" )
A series of calls to
.B getch(\|)
is made, until a newline, carriage return, or enter key is received.
The resulting value is placed in the area pointed at by the character pointer
.IR str .
The user's erase and kill characters are interpreted.
As in
.BR mvgetch(\|) ,
no
.B refresh(\|)
is done between the
.B move(\|)
and
.B getstr(\|)
within the routines
.B mvgetstr(\|)
and
.BR mvwgetstr(\|) .
.IP
Note: 
.BR getstr(\|) ,
.BR mvgetstr(\|) ,
and
.B mvwgetstr(\|)
are macros.
.PD
.TP 20
.B flushinp(\|)
Throws away any typeahead that has been typed by the user and has not yet
been read by the program.
.TP 20
.BI "ungetch (" c )
Place
.I c
back onto the input queue to be returned by the next call to
.BR wgetch(\|) .
.LP
.PD 0
.TP 20
.B inch(\|)
.TP
.BI "winch (" win )
.TP
.BI "mvinch (" "y, x" )
.TP
.BI "mvwinch (" "win, y, x" )
The character, of type
.BR chtype ,
at the current position in the named window is returned.
If any attributes are set for that position, their values will be OR'ed into
the value returned.
The predefined constants
.SB A_CHARTEXT
and
.BR \s-1A_ATTRIBUTES\s0 ,
defined in
.RB < curses.h >,
can be used with the C logical
.SM AND
(&) operator to extract the character or
attributes alone.
.IP
Note: 
.BR inch(\|) ,
.BR winch(\|) ,
.BR mvinch(\|) ,
and
.B mvwinch(\|)
are macros.
.PD
.LP
.PD 0
.TP 20
.BI "scanw (" fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.TP 20
.BI "wscanw (" "win, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.TP 20
.BI "mvscanw (" "y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
.TP 20
.BI "mvwscanw (" "win, y, x, fmt \fR[\fP, arg\|.\|.\|.\fR]" )
These routines correspond to
.BR scanf (3V) ,
as do their arguments and return values.
.B wgetstr(\|)
is called on the window,
and the resulting line is used as input for the scan.
.PD
.TP 20
.BI "vwscanw (" "win, fmt, ap" )
This routine is similar to 
.B vwprintw(\|)
above in that performs a
.B wscanw(\|)
using a variable argument list.
The third argument is a
.BR va_list ,
a pointer to a list of arguments, as defined
in
.BR <varargs.h> .
See the 
.BR vprintf (3V)
and
.BR varargs (3)
manual pages for a detailed description on how to use variable
argument lists.
.SS "Output Options Setting"
.LP
These routines set options within
.B curses
that deal with output.
All options are initially
\s-1FALSE\s0,
unless otherwise stated.
It is not necessary to turn these options off before calling
.BR endwin(\|) .
.TP 20
.BI "clearok (" "win, bf" )
If enabled
.RI ( bf
is
.BR \s-1TRUE\s0 ),
the next call to
.B wrefresh(\|)
with this window will clear the screen completely and redraw the entire
screen from scratch.
This is useful when the contents of the screen are uncertain,
or in some cases for a more pleasing visual effect.
.TP 20
.BI "idlok (" "win, bf" )
If enabled
.RI ( bf
is
.BR \s-1TRUE\s0 ),
.B curses
will consider using the hardware \(lqinsert/delete-line\(rq
feature of terminals so equipped.
If disabled
.RI ( bf
is
.BR \s-1FALSE\s0 ),
.B curses
will very seldom use this feature.
(The \(lqinsert/delete-character\(rq feature is always considered.)
This option should be enabled
only if your application needs \(lqinsert/delete-line\(rq, for
example, for a screen editor.
It is disabled by default because \(lqinsert/delete-line\(rq tends to be visually
annoying when used in applications where it is not really needed.
If \(lqinsert/delete-line\(rq cannot be used,
.B curses
will redraw the changed portions
of all lines.
.TP 20
.BI "leaveok (" "win, bf" )
Normally, the hardware cursor is left at the location of the window cursor
being refreshed.
This option allows the cursor to be left
wherever the update happens to leave
it.
It is useful for applications where the cursor is not used, since it reduces
the need for cursor motions.
If possible, the cursor is made invisible when this option is enabled.
.LP
.PD 0
.TP 20
.BI "setscrreg (" "top, bot" )
.TP
.BI "wsetscrreg (" "win, top, bot" )
These routines allow the user to set a software scrolling region
in a window.
.I top
and
.I bot
are the line numbers of the top and bottom margin of the scrolling region.
(Line 0 is the top line of the window.)
If this option and
.B scrollok(\|)
are enabled, an attempt to move off the bottom margin line will cause all
lines in the scrolling region to scroll up one line.
(Note: this has nothing to do with use of a physical scrolling region
capability in the terminal, like that in the
.SM DEC VT\s0100.
Only the text of the window is scrolled;
if
.B idlok(\|)
is enabled and the terminal has either a scrolling region or
\(lqinsert/delete-line\(rq capability,
they will probably be used by the output routines.)
.IP
Note: 
.B setscrreg(\|)
and
.B wsetscrreg(\|)
are macros.
.PD
.TP 20
.BI "scrollok (" "win, bf" )
This option controls what happens when the cursor of a window is moved off
the edge of the window or scrolling region, either from a newline on the
bottom line, or typing the last character of the last line.
If disabled
.RI ( bf
is
.BR \s-1FALSE\s0 ),
the cursor is left on the bottom line
at the location where the offending
character was entered.
If enabled
.RI ( bf
is
.BR \s-1TRUE\s0 ),
.B wrefresh(\|)
is called on the window,
and then the physical terminal and window are scrolled up one line.
(Note: in order to get the physical scrolling effect on the terminal,
it is also necessary to call
.BR idlok(\|) .)
.LP
.PD 0
.TP 20
.B nl(\|)
.TP
.B nonl(\|)
These routines control whether
.SM NEWLINE
is translated into 
.SM RETURN
and
.SM LINEFEED
on output, and whether
.SM RETURN
is translated into
.SM NEWLINE
on input.
Initially, the translations do occur.
By disabling these translations using
.BR nonl(\|) ,
.B curses
is able to make better use of the
linefeed capability, resulting in faster cursor motion.
.SS "Input Options Setting"
.LP
These routines set options within
.B curses
that deal with input.
The options involve using
.BR ioctl (2)
and therefore interact with
.B curses
routines.
It is not necessary to turn these options off
before calling
.BR endwin(\|) .
.LP
For more information on these options,
refer to
.TX PUL .
.PD
.LP
.PD 0
.TP 20
.B cbreak(\|)
.TP
.B nocbreak(\|)
These two routines put the terminal into and out of
.SM CBREAK
mode, respectively.
In
.SM CBREAK
mode, characters typed by the user are immediately available to the
program and erase/kill character processing is not performed.
When in
.SM NOCBREAK
mode, the tty driver will buffer characters typed until a
.SM NEWLINE
or
.SM RETURN
is typed.
Interrupt and flow-control characters are unaffected by this mode
(see
.BR termio (4)).
Initially the terminal may or may not be in
.SM CBREAK
mode, as it is inherited, therefore, a program should call
.B cbreak(\|)
or
.B nocbreak(\|)
explicitly.
Most interactive programs using
.B curses
will set
.SM CBREAK
mode.
.IP
Note: 
.B cbreak(\|)
overrides
.BR raw(\|) .
See
.B getch(\|)
under
.B Input
for a discussion of how these routines interact with
.B echo(\|)
and
.BR noecho(\|) .
.PD
.LP
.PD 0
.TP 20
.B echo(\|)
.TP
.B noecho(\|)
These routines control whether characters typed by the user are echoed by
.B getch(\|)
as they are typed.
Echoing by the tty driver is always disabled,
but initially
.B getch(\|)
is in
.SM ECHO
mode, so characters typed are echoed.
Authors of most interactive programs prefer to do their own echoing in a
controlled area of the screen, or not to echo at all, so they disable echoing
by calling
.BR noecho(\|) .
See
.B getch(\|)
under
.B Input
for a discussion
of how these routines interact with
.B cbreak(\|)
and
.BR nocbreak(\|) .
.PD
.TP 20
.BI "halfdelay (" tenths )
Half-delay mode is similar to
.SM CBREAK
mode in that characters typed by the
user are immediately available to the program.
However, after blocking for
.I tenths
tenths of seconds,
.SM ERR
will be returned if nothing has been typed.
.I tenths
must be a number between 1 and 255.
Use
.B nocbreak(\|)
to leave half-delay mode.
.TP 20
.BI "intrflush (" "win, bf" )
If this option is enabled, when an interrupt key is pressed on the keyboard
(interrupt, break, quit) all output in the tty driver queue will be flushed,
giving the effect of faster response to the interrupt, but causing
.B curses
to have the wrong idea of what is on the screen.
Disabling the option prevents the flush.
The default for the option is inherited from the tty driver settings.
The window argument is ignored.
.TP 20
.BI "keypad (" "win, bf" )
This option enables the keypad of the user's terminal.
If enabled, the user can press a function key (such as an arrow key) and
.B wgetch(\|)
will return a single value representing the function key,
as in
.BR \s-1KEY_LEFT\s0 .
If disabled,
.B curses
will not treat function keys specially and the program
would have to interpret the escape sequences itself.
If the keypad in the terminal can be turned on (made to transmit) and off
(made to work locally), turning on this option will cause the
terminal keypad to be turned on when
.B wgetch(\|)
is called.
.TP 20
.BI "meta (" "win, bf" )
If enabled, characters returned by
.B wgetch(\|)
are transmitted with all 8 bits, instead of with the highest bit stripped.
In order for
.B meta(\|)
to work correctly, the
.B km
.RB ( has_meta_key )
capability has to be specified in the terminal's
.BR terminfo (5V)
entry.
.TP 20
.BI "nodelay (" "win, bf" )
This option causes
.B wgetch(\|)
to be a non-blocking call.
If no input is ready,
.B wgetch(\|)
will return
.SM ERR\s0.
If disabled,
.B wgetch(\|)
will hang until a key is pressed.
.TP 20
.BI "notimeout (" "win, bf" )
While interpreting an input escape sequence,
.B wgetch(\|)
will set a timer while waiting for the next character.
If
.BI "notimeout (" "win, " \s-1TRUE\s0)
is called, then
.B wgetch(\|)
will not set a timer.
The purpose of the timeout is to differentiate between sequences
received from a function key and those typed by a user.
.LP
.PD 0
.TP 20
.B raw(\|)
.TP
.B noraw(\|)
The terminal is placed into or out of
.SM RAW
mode.
.SM RAW
mode is similar to
.SM CBREAK
mode,
in that characters typed are immediately
passed through to the user program.
The differences are that in
.SM RAW
mode, the interrupt, quit, suspend, and flow
control characters are passed through uninterpreted, instead of generating a
signal.
.SM RAW
mode also causes 8-bit input and output.
The behavior of the
.SM BREAK
key depends on other bits in the terminal driver that
are not set by
.BR curses .
.PD
.TP 20
.BI "typeahead (" fildes )
.B curses
does \(lqline-breakout optimization\(rq by looking for
typeahead periodically while updating the screen.
If input is found, and it is coming from a tty,
the current update will be postponed until
.B refresh(\|)
or
.B doupdate(\|)
is called again.
This allows faster response to commands typed in advance.
Normally, the file descriptor for the input
.SM FILE
pointer passed to
.BR newterm(\|) ,
or
.B stdin
in the case that
.B initscr(\|)
was used, will be used to do this typeahead checking.
The
.B typeahead(\|)
routine specifies that the file descriptor
.I fildes
is to be used to check for typeahead instead.
If
.I fildes
is
.BR \-1 ,
then no typeahead checking will be done.
.IP
Note:
.I fildes
is a file descriptor, not a
.B <stdio.h>
.SM FILE
pointer.
.SS "Environment Queries"
.LP
.TP 20
.B baudrate(\|)
Returns the output speed of the terminal.
The number returned is
in bits per second,
for example, 9600,
and is an integer.
.TP 20
.B char erasechar(\|)
The user's current erase character is returned.
.TP 20
.B has_ic(\|)
True if the terminal has insert- and delete-character capabilities.
.TP 20
.B has_il(\|)
True if the terminal has insert- and delete-line capabilities, or can
simulate them using scrolling regions.
This might be used to check to see if it would be appropriate to turn on
physical scrolling using
.BR scrollok(\|) .
.TP 20
.B char killchar(\|)
The user's current line-kill character is returned.
.TP 20
.B char \(**longname(\|)
This routine returns a pointer to a static area containing
a verbose description of the current terminal.
The maximum length of a verbose description is 128
characters.
It is defined only after the call to
.B initscr(\|)
or
.BR newterm(\|) .
The area is overwritten by each call to
.B newterm(\|)
and is not restored by
.BR set_term(\|) ,
so the value should be saved between calls to
.B newterm(\|)
if
.B longname(\|)
is going to be used with multiple terminals.
.SS "Soft Labels"
.LP
If desired,
.B curses
will manipulate the set of soft function-key labels that exist on many
terminals.
For those terminals that do not have soft labels,
if you want to simulate them,
.B curses
will take over the
bottom line of
.BR stdscr ,
reducing the size of
.B stdscr
and the variable
.BR \s-1LINES\s0 .
.B curses
standardizes on 8 labels of 8 characters each.
.TP 20
.BI "slk_init (" labfmt )
In order to use soft labels,
this routine must be called
before
.B initscr(\|)
or
.B newterm(\|)
is called.
If
.B initscr(\|)
winds up using a line from
.B stdscr
to emulate the soft labels, then
.I labfmt
determines how the labels are arranged on the screen.
Setting
.I labfmt
to
.B 0
indicates that the labels are to be arranged in a
3-2-3
arrangement;
.B 1
asks for a 4-4 arrangement.
.br
.ne 5
.TP 20
.BI "slk_set (" "labnum, label, labfmt" )
.I labnum
is the label number, from 1 to 8.
.I label
is the string to be put on the label, up to 8 characters in length.
A
.SM NULL
string or a
.SB NULL
pointer will put up a blank label.
.I labfmt
is one of
.BR 0 ,
.B 1
or
.BR 2 ,
to indicate whether the label is to be left-justified,
centered, or right-justified within the label.
.LP
.PD 0
.TP 20
.B slk_refresh(\|)
.TP 20
.B slk_noutrefresh(\|)
These routines correspond to the routines
.B wrefresh(\|)
and
.BR wnoutrefresh(\|) .
Most applications would use
.B slk_noutrefresh(\|)
because a
.B wrefresh(\|)
will most likely soon follow.
.PD
.TP 20
.BI "char \(**slk_label (" labnum )
The current label for label number
.IR labnum ,
with leading and trailing blanks stripped,
is returned.
.TP 20
.B slk_clear(\|)
The soft labels are cleared from the screen.
.TP 20
.B slk_restore(\|)
The soft labels are restored to the screen after a
.BR slk_clear(\|) .
.TP 20
.B slk_touch(\|)
All of the soft labels are forced to be output the next time a
.B slk_noutrefresh(\|)
is performed.
.SS "Low-Level curses Access"
.LP
The following routines give low-level access to various
.B curses
functionality.
These routines typically would be used inside of library routines.
.LP
.PD 0
.TP 20
.B def_prog_mode(\|)
.TP
.B def_shell_mode(\|)
Save the current terminal modes as the \(lqprogram\(rq (in
.BR curses )
or \(lqshell\(rq (not in
.BR curses )
state
for use by the
.B reset_prog_mode(\|)
and
.B reset_shell_mode(\|)
routines.
This is done automatically by
.BR initscr(\|) .
.PD
.LP
.PD 0
.TP 20
.B reset_prog_mode(\|)
.TP
.B reset_shell_mode(\|)
Restore the terminal to \(lqprogram\(rq (in
.BR curses )
or \(lqshell\(rq (out of
.BR curses )
state.
These are done automatically by
.B endwin(\|)
and
.B doupdate(\|)
after an
.BR endwin(\|) ,
so they normally would not be called.
.PD
.LP
.PD 0
.TP 20
.B resetty(\|)
.TP
.B savetty(\|)
These routines save and restore the state of the terminal modes.
.B savetty(\|)
saves the current state of the terminal in a buffer and
.B resetty(\|)
restores the state to what it was at the last call to
.BR savetty(\|) .
.PD
.TP 20
.BI "getsyx (" "y, x" )
The current coordinates of the virtual screen cursor are returned in
.I y
and
.IR x .
Like
.BR getyx(\|) ,
the variables
.I y
and
.I x
do not take an 
.B &
before them.
If
.B leaveok(\|)
is currently
.BR \s-1TRUE\s0 ,
then
.BR \-1 ", " \-1
will be returned.
If lines may have been removed from the top of the screen using
.B ripoffline(\|)
and the values are to be used beyond just passing them on to
.BR setsyx(\|) ,
the value
.IB y +stdscr\->_yoffset
should be used for those other uses.
.IP
Note: 
.B getsyx(\|)
is a macro.
.TP 20
.BI "setsyx (" "y, x" )
The virtual screen cursor is set to
.IR y ", " x .
If
.I y
and
.I x
are both
.BR \-1 ,
then
.B leaveok(\|)
will be set.
The two routines
.B getsyx(\|)
and
.B setsyx(\|)
are designed to be used by a library routine that manipulates
.B curses
windows but does not want to mess up the current position of the program's
cursor.
The library routine would call
.B getsyx(\|)
at the beginning, do its manipulation of its own windows, do a
.B wnoutrefresh(\|)
on its windows, call
.BR setsyx(\|) ,
and then call
.BR doupdate(\|) .
.TP 20
.BI "ripoffline (" "line, init" )
This routine provides access to the same facility that
.B slk_init(\|)
uses to reduce the size of the screen.
.B ripoffline(\|)
must be called
before
.B initscr(\|)
or
.B newterm(\|)
is called.
If
.I line
is positive, a line will be removed from the top of
.BR stdscr ;
if negative, a line will be removed from the bottom.
When this is done inside
.BR initscr(\|) ,
the routine
.I init
is called with two arguments:
a window pointer to the 1-line window that has been allocated and
an integer with the number of columns in the window.
Inside this initialization routine,
the integer variables
.SB LINES
and
.SB COLS
(defined in
.BR <curses.h> )
are not guaranteed to be accurate and
.B wrefresh(\|)
or
.B doupdate(\|)
must not be called.
It is allowable to call
.B wnoutrefresh(\|)
during the initialization routine.
.IP
.B ripoffline(\|)
can be called up to five times before calling
.B initscr(\|)
or
.BR newterm(\|) .
.TP 20
.BI "scr_dump (" filename )
The current contents of the virtual screen are written to the file
.IR filename .
.TP 20
.BI "scr_restore (" filename )
The virtual screen is set to the contents of
.IR filename ,
which must have been written using
.BR scr_dump(\|) .
The next call to
.B doupdate(\|)
will restore the screen to what it looked like in the dump file.
.TP 20
.BI "scr_init (" filename )
The contents of
.I filename
are read in and used to initialize the
.B curses
data structures about what the
terminal currently has on its screen.
If the data is determined to be valid,
.B curses
will base its next update of
the screen on this information rather than clearing the screen and
starting from scratch.
.B scr_init(\|)
would be used after
.B initscr(\|)
or a
.BR system (3)
call to share the screen with another process that has done a
.B scr_dump(\|)
after its
.B endwin(\|)
call.
The data will be declared invalid if the time-stamp of
the tty is old or the
.BR terminfo (5V)
capability
.B nrrmc
is true.
.TP 20
.BI "curs_set (" visibility )
The cursor is set to invisible, normal, or very visible for
.I visibility
equal to
.BR 0 ,
.B 1
or
.BR 2 .
.TP 20
.BI "draino (" ms )
Wait until the output has drained enough that it will only take
.I ms
more milliseconds to drain completely.
.TP 20
.BI "garbagedlines (" "win, begline, numlines" )
This routine indicates to
.B curses
that a screen line is garbaged and
should be thrown away before having anything written over the top of it.
It could be used for programs such as editors that want a command to
redraw just a single line.
Such a command could be used in cases where
there is a noisy communications line
and redrawing the entire screen would be subject
to even more communication noise.
Just redrawing the single line gives some semblance
of hope that it would show up unblemished.
The current location of the window is used to determine which lines are to
be redrawn.
.TP 20
.BI "napms (" ms )
Sleep for
.I ms
milliseconds.
.SS "Terminfo-Level Manipulations"
.LP
These low-level routines must be called by
programs that need to deal directly with the
.BR terminfo (5V)
database to handle certain terminal capabilities,
such as programming function keys.
For all other functionality,
.B curses
routines are more suitable and their use is
recommended.
.LP
Initially,
.B setupterm(\|)
should be called.
(Note: 
.B setupterm(\|)
is automatically called by
.B initscr(\|)
and
.BR newterm(\|) .)
This will define the set of terminal-dependent
variables defined in the
.BR terminfo (5V)
database.
The
.BR terminfo (5V)
variables
.IR line s
and
.IR column s
(see
.BR terminfo (5V))
are initialized by
.B setupterm(\|)
as follows: if the environment variables
.SB LINES
and
.SB COLUMNS
exist, their values are used.
If the above environment variables
do not exist, and the window sizes in rows and columns as returned by the
.SB TIOCGWINSZ
.B ioctl
are non-zero, those sizes are used.
Otherwise, the values for
.IR line s
and
.IR column s
specified in the
.BR terminfo (5V)
database are used.
.LP
The header files
.RB < curses.h >
and
.RB < term.h >
should be included, in this order, to get the definitions
for these strings, numbers, and flags.
Parameterized strings should be passed through
.B tparm(\|)
to instantiate them.
All
.BR terminfo (5V)
strings (including the output of
.BR tparm(\|)
should be printed with
.B tputs(\|)
or
.BR putp(\|) .
Before exiting,
.B reset_shell_mode(\|)
should be called to restore the tty modes.
Programs that use cursor addressing should
output
.B enter_ca_mode
upon startup
and should output
.B exit_ca_mode
before exiting (see
.BR terminfo (5V)).
(Programs desiring shell escapes should call
.B reset_shell_mode(\|)
and output
.B exit_ca_mode
before the shell is called and should output
.B enter_ca_mode
and call
.B reset_prog_mode(\|)
after returning from the shell.
Note: this is different from the
.B curses
routines (see
.BR endwin(\|) )
.TP 20
.BI "setupterm (" "term, fildes, errret" )
Reads in the
.BR terminfo (5V)
database, initializing the
.BR terminfo (5V)
structures, but does
not set up the output virtualization structures used by
.BR curses .
The terminal type is in the character string
.IR term ;
if
.I term
is
.SM NULL\s0,
the environment variable
.SB TERM
will be used.
All output is to the file descriptor
.IR fildes .
If
.IR errret
is not
.SM NULL\s0,
then
.B setupterm(\|)
will return
.SB OK
or
.SB ERR
and store a status value in the integer pointed to by
.IR errret .
A status of
.B 1
in
.IR errret
is normal,
.B 0
means that the terminal could not be found, and
.B \-1
means that the
.BR terminfo (5V)
database could not be found.
If
.IR errret
is
.SM NULL\s0,
.B setupterm(\|)
will print an error message upon finding an error and exit.
Thus, the simplest call is
.RB ` "setupterm ((char \(**)0, 1, (int \(**)0)" ',
which uses all the defaults.
.IP
The
.BR terminfo (5V)
boolean, numeric and string variables are
stored in a structure of type
.BR \s-1TERMINAL\s0 .
After
.B setupterm(\|)
returns successfully, the variable
.I cur_term
(of type
.BR "\s-1TERMINAL\s0 \(**" )
is initialized with all of the information that the
.BR terminfo (5V)
boolean, numeric and string variables refer to.
The pointer may be saved before calling
.B setupterm(\|)
again.
Further calls to
.B setupterm(\|)
will allocate new space rather than reuse the space pointed to by
.IR cur_term .
.TP 20
.BI "set_curterm (" nterm )
.I nterm
is of type
.BR "\s-1TERMINAL\s0 \(** " .
.B set_curterm(\|)
sets the variable
.I cur_term
to
.IR nterm ,
and makes all of the
.BR terminfo (5V)
boolean, numeric and string variables use the values from
.IR nterm .
.TP 20
.BI "del_curterm (" oterm )
.I oterm
is of type
.BR "\s-1TERMINAL\s0 \(**" .
.B del_curterm(\|)
frees the space pointed to by
.I oterm
and makes it available for further use.
If
.I oterm
is the same as
.IR cur_term ,
then references to any of the
.BR terminfo (5V)
boolean, numeric and string variables thereafter may refer to invalid memory locations
until another
.B setupterm(\|)
has been called.
.TP 20
.BI "restartterm (" "term, fildes, errret" )
Like
.B setupterm(\|)
after a memory restore.
.TP 20
.BI "char \(**tparm (" "str, p\d\s-21\s+2\u, p\d\s-22\s+2\u, \|.\|.\|., p\d\s-29\s+2\u")
Instantiate the string
.I str
with parms p\d\s-2i\s+2\u.
A pointer is returned to the result of
.I str
with the parameters applied.
.TP 20
.BI "tputs (" "str, count, putc" )
Apply padding to the string
.I str
and output it.
.I str
must be a
.BR terminfo (5V)
string variable or the return value from
.BR tparm(\|) ,
.BR tgetstr(\|) ,
.B tigetstr(\|)
or
.BR tgoto(\|) .
.IR count
is the number of lines affected, or
.B 1
if not applicable.
.B putchar(\|)
is a
.BR putc (3S)-like
routine to which the characters are passed, one at a time.
.TP 20
.BI "putp (" str )
A routine that calls
.B tputs(\|)
.RI ( str ,
.BR 1 ,
.BR putchar(\|) ).
.TP 20
.BI "vidputs (" "attrs, putc" )
Output a string that puts the terminal in the video attribute mode
.IR attrs ,
which is any combination of the attributes listed below.
The characters are passed to the
.BR putc (3S)-like
routine
.BR putchar(\|) .
.TP 20
.BI "vidattr (" attrs )
Like
.BR vidputs(\|) ,
except that it outputs through
.BR putchar (3S).
.TP 20
.BI "mvcur (" "oldrow, oldcol, newrow, newcol" )
Low-level cursor motion.
.LP
The following routines return the value of the capability corresponding to
the
.BR terminfo (5V)
.I capname
passed to them, such as
.BR xenl .
.TP 20
.BI "tigetflag (" capname )
The value
.B \-1
is returned if
.I capname
is not a boolean capability.
.TP 20
.BI "tigetnum (" capname )
The value
.B \-2
is returned if
.I capname
is not a numeric capability.
.TP 20
.BI "tigetstr (" capname )
The value
.B "(char \(**) \-1"
is returned if
.IR capname
is not a string capability.
.LP
.PD 0
.TP 20
.BR "char \(**boolnames" [\|], " \(**boolcodes" [\|], " \(**boolfnames" [\|]
.TP
.BR "char \(**numnames" [\|], " \(**numcodes" [\|], " \(**numfnames" [\|]
.TP
.BR "char \(**strnames" [\|], " \(**strcodes" [\|], " \(**strfnames" [\|]
These null-terminated arrays contain the
.IR capnames ,
the
.BR termcap (5)
codes, and the full C names, for each of the
.BR terminfo (5V)
variables.
.PD
.SS "Termcap Emulation"
.LP
These routines are included as a conversion aid for programs that use
the
.BR termcap (3X)
library.
Their parameters are the same and the routines are emulated using the
.BR terminfo (5V)
database.
.TP 20
.BI "tgetent (" "bp, name" )
Look up
.B termcap
entry for
.IR name .
The emulation ignores the buffer pointer
.IR bp .
.TP 20
.BI "tgetflag (" codename )
Get the boolean entry for
.IR codename .
.TP 20
.BI "tgetnum (" codes )
Get numeric entry for
.IR codename .
.TP 20
.BI "char \(**tgetstr (" "codename, area" )
Return the string entry for
.IR codename .
If
.I area
is not
.SM NULL\s0,
then also store it in the buffer pointed to by
.IR area
and advance
.IR area .
.B tputs(\|)
should be used to output the returned string.
.TP 20
.BI "char \(**tgoto (" "cap, col, row" )
Instantiate the parameters into the given capability.
The output from this routine is to be passed to
.BR tputs(\|) .
.TP
.BI "tputs (" "str, affcnt, putc" )
See
.B tputs(\|)
above, under
.BR "Terminfo-Level Manipulations" .
.SS "Miscellaneous"
.LP
.TP 20
.BI "unctrl (" c )
This macro expands to a character string which is a printable
representation of the character
.IR c .
Control characters are displayed in the ^X notation.
Printing characters are displayed as is.
.IP
.B unctrl(\|)
is a macro, defined in
.RB < unctrl.h >,
which is automatically included by
.RB < curses.h >.
.TP 20
.BI "char \(**keyname (" c )
A character string corresponding to the key
.I c
is returned.
.TP 20
.B filter(\|)
This routine is one of the few that is to be called
before
.B initscr(\|)
or
.B newterm(\|)
is called.
It arranges things so that
.B curses
thinks that there is a 1-line screen.
.B curses
will not use any terminal capabilities that assume that they know what
line on the screen the cursor is on.
.SS "Use of curscr"
.LP
The special window
.B curscr
can be used in only a few routines.
If the window argument to
.B clearok(\|)
is
.BR curscr ,
the next call to
.B wrefresh(\|)
with any window will cause the screen to be cleared and repainted from
scratch.
If the window argument to
.B wrefresh(\|)
is
.BR curscr ,
the screen is immediately cleared and repainted from scratch.
(This is how most programs would implement a \(lqrepaint-screen\(rq routine.)
The source window argument to
.BR overlay(\|) ,
.BR overwrite(\|) ,
and
.B copywin
may be
.BR curscr ,
in which case the current contents of the virtual terminal
screen will be accessed.
.SS "Obsolete Calls"
.LP
Various routines are provided to maintain compatibility in programs written
for older versions of the curses library.
These routines are all emulated as indicated below.
.TP 20
.PD 0
.B crmode(\|)
Replaced by
.BR cbreak(\|) .
.TP 20
.B fixterm(\|)
Replaced by
.BR reset_prog_mode(\|) .
.TP 20
.B gettmode(\|)
A no-op.
.TP 20
.B nocrmode(\|)
Replaced by
.BR nocbreak(\|) .
.TP 20
.B resetterm(\|)
Replaced by
.BR reset_shell_mode(\|) .
.TP 20
.B saveterm(\|)
Replaced by
.BR def_prog_mode(\|) .
.TP 20
.B setterm(\|)
Replaced by
.BR setupterm(\|) .
.PD
.SH ATTRIBUTES
.LP
The following video attributes,
defined in
.RB < curses.h >,
can be passed to the routines
.BR attron(\|) ,
.BR attroff(\|) ,
and
.BR attrset(\|) ,
or
.SM OR\s0'ed
with the characters passed to
.BR addch(\|) .
.LP
.TS
;
l l l.
\s-1A_STANDOUT\s0	Terminal's best highlighting mode
\s-1A_UNDERLINE\s0	Underlining
\s-1A_REVERSE\s0	Reverse video
\s-1A_BLINK\s0	Blinking
\s-1A_DIM\s0	Half bright
\s-1A_BOLD\s0	Extra bright or bold
\s-1A_ALTCHARSET\s0	Alternate character set
.sp
\s-1A_CHARTEXT\s0	Bit-mask to extract character (described under \fBwinch\fR)
\s-1A_ATTRIBUTES\s0	Bit-mask to extract attributes (described under \fBwinch\fR)
\s-1A_NORMAL\s0	Bit mask to reset all attributes off
	(for example:  `\fBattrset (\s-1A_NORMAL\s0\fP)'
.TE
.\" the following attributes may go away when
.\" internationalization comes along.
.ig
A_INVIS	Blanking (invisible)
A_PROTECT	Protected
..
.SH "FUNCTION-KEYS"
.LP
The following function keys,
defined in
.RB < curses.h >,
might be returned by
.B getch(\|)
if
.B keypad(\|)
has been enabled.
Note: not all of these may be supported on a particular terminal if the
terminal does not transmit a unique code when the key is pressed or the
definition for the key is not present in the
.BR terminfo (5V)
database.
.br
.ne5
.sp
.TS
center;
l l l.
\fIName	Value	Key name\fR

\s-1KEY_BREAK\s0	0401	break key (unreliable)
\s-1KEY_DOWN\s0	0402	The four arrow keys .\|.\|.
\s-1KEY_UP\s0	0403
\s-1KEY_LEFT\s0	0404
\s-1KEY_RIGHT\s0	0405	.\|.\|.
\s-1KEY_HOME\s0	0406	Home key (upward+left arrow)
\s-1KEY_BACKSPACE\s0	0407	backspace (unreliable)
\s-1KEY_F0\s0	0410	Function keys.  Space for 64 keys is reserved.
\s-1KEY_F(n)	(KEY_F0+(n))\s0	Formula for f\dn\u.
\s-1KEY_DL\s0	0510	Delete line
\s-1KEY_IL\s0	0511	Insert line
\s-1KEY_DC\s0	0512	Delete character
\s-1KEY_IC\s0	0513	Insert char or enter insert mode
\s-1KEY_EIC\s0	0514	Exit insert char mode
\s-1KEY_CLEAR\s0	0515	Clear screen
\s-1KEY_EOS\s0	0516	Clear to end of screen
\s-1KEY_EOL\s0	0517	Clear to end of line
\s-1KEY_SF\s0	0520	Scroll 1 line forward
\s-1KEY_SR\s0	0521	Scroll 1 line backwards (reverse)
\s-1KEY_NPAGE\s0	0522	Next page
\s-1KEY_PPAGE\s0	0523	Previous page
\s-1KEY_STAB\s0	0524	Set \s-1TAB\s0
\s-1KEY_CTAB\s0	0525	Clear \s-1TAB\s0
\s-1KEY_CATAB\s0	0526	Clear all \s-1TAB\s0 characters
\s-1KEY_ENTER\s0	0527	Enter or send
\s-1KEY_SRESET\s0	0530	soft (partial) reset
\s-1KEY_RESET\s0	0531	reset or hard reset
\s-1KEY_PRINT\s0	0532	print or copy
.ne 4
\s-1KEY_LL\s0	0533	home down or bottom (lower left)
		keypad is arranged like this:
		  A1    up     A3
		  left  B2     right
		  C1    down   C3
\s-1KEY_A1\s0	0534	Upper left of keypad
\s-1KEY_A3\s0	0535	Upper right of keypad
\s-1KEY_B2\s0	0536	Center of keypad
\s-1KEY_C1\s0	0537	Lower left of keypad
\s-1KEY_C3\s0	0540	Lower right of keypad
\s-1KEY_BTAB\s0	0541	Back \s-1TAB\s0 key
\s-1KEY_BEG\s0	0542	beg(inning) key
\s-1KEY_CANCEL\s0	0543	cancel key
\s-1KEY_CLOSE\s0	0544	close key
\s-1KEY_COMMAND\s0	0545	cmd (command) key
\s-1KEY_COPY\s0	0546	copy key
\s-1KEY_CREATE\s0	0547	create key
\s-1KEY_END\s0	0550	end key
\s-1KEY_EXIT\s0	0551	exit key
\s-1KEY_FIND\s0	0552	find key
\s-1KEY_HELP\s0	0553	help key
\s-1KEY_MARK\s0	0554	mark key
\s-1KEY_MESSAGE\s0	0555	message key
\s-1KEY_MOVE\s0	0556	move key
\s-1KEY_NEXT\s0	0557	next object key
\s-1KEY_OPEN\s0	0560	open key
\s-1KEY_OPTIONS\s0	0561	options key
\s-1KEY_PREVIOUS\s0	0562	previous object key
\s-1KEY_REDO\s0	0563	redo key
\s-1KEY_REFERENCE\s0	0564	ref(erence) key
\s-1KEY_REFRESH\s0	0565	refresh key
\s-1KEY_REPLACE\s0	0566	replace key
\s-1KEY_RESTART\s0	0567	restart key
\s-1KEY_RESUME\s0	0570	resume key
\s-1KEY_SAVE\s0	0571	save key
\s-1KEY_SBEG\s0	0572	shifted beginning key
\s-1KEY_SCANCEL\s0	0573	shifted cancel key
\s-1KEY_SCOMMAND\s0	0574	shifted command key
\s-1KEY_SCOPY\s0	0575	shifted copy key
\s-1KEY_SCREATE\s0	0576	shifted create key
\s-1KEY_SDC\s0	0577	shifted delete char key
\s-1KEY_SDL\s0	0600	shifted delete line key
\s-1KEY_SELECT\s0	0601	select key
\s-1KEY_SEND\s0	0602	shifted end key
\s-1KEY_SEOL\s0	0603	shifted clear line key
\s-1KEY_SEXIT\s0	0604	shifted exit key
\s-1KEY_SFIND\s0	0605	shifted find key
\s-1KEY_SHELP\s0	0606	shifted help key
\s-1KEY_SHOME\s0	0607	shifted home key
\s-1KEY_SIC\s0	0610	shifted input key
\s-1KEY_SLEFT\s0	0611	shifted left arrow key
\s-1KEY_SMESSAGE\s0	0612	shifted message key
\s-1KEY_SMOVE\s0	0613	shifted move key
\s-1KEY_SNEXT\s0	0614	shifted next key
\s-1KEY_SOPTIONS\s0	0615	shifted options key
\s-1KEY_SPREVIOUS\s0	0616	shifted prev key
\s-1KEY_SPRINT\s0	0617	shifted print key
\s-1KEY_SREDO\s0	0620	shifted redo key
\s-1KEY_SREPLACE\s0	0621	shifted replace key
\s-1KEY_SRIGHT\s0	0622	shifted right arrow
\s-1KEY_SRSUME\s0	0623	shifted resume key
\s-1KEY_SSAVE\s0	0624	shifted save key
\s-1KEY_SSUSPEND\s0	0625	shifted suspend key
\s-1KEY_SUNDO\s0	0626	shifted undo key
\s-1KEY_SUSPEND\s0	0627	suspend key
\s-1KEY_UNDO\s0	0630	undo key
.TE
.SH LINE GRAPHICS
.LP
The following variables may be used to add line-drawing characters to the
screen with
.BR waddce .
When defined for the terminal, the variable will have the
.SB A_ALTCHARSET
bit turned on.
Otherwise, the default character listed below will be stored in the variable.
The names were chosen to be consistent with the
.SM DEC VT\s0100
nomenclature.
.LP
.ne 5
.TS
l c l.
\fIName	Default	Glyph Description\fR

\s-1ACS_ULCORNER\s0	+	upper left corner
\s-1ACS_LLCORNER\s0	+	lower left corner
\s-1ACS_URCORNER\s0	+	upper right corner
\s-1ACS_LRCORNER\s0	+	lower right corner
\s-1ACS_RTEE\s0	+	right tee (\|\-\(br\|)
\s-1ACS_LTEE\s0	+	left tee (\|\z\(br\-\|)
\s-1ACS_BTEE\s0	+	bottom tee (\|\o'\(ul\(br'\|)
\s-1ACS_TTEE\s0	+	top tee (\|\o'\(rn\(br'\|)
\s-1ACS_HLINE\s0	\-	horizontal line
\s-1ACS_VLINE\s0	|	vertical line
\s-1ACS_PLUS\s0	+	plus
\s-1ACS_S1\s0	\-	scan line 1
\s-1ACS_S9\s0	\(ul	scan line 9
\s-1ACS_DIAMOND\s0	+	diamond
\s-1ACS_CKBOARD\s0	:	checker board (stipple)
\s-1ACS_DEGREE\s0	'	degree symbol
\s-1ACS_PLMINUS\s0	#	plus/minus
\s-1ACS_BULLET\s0	o	bullet
\s-1ACS_LARROW\s0	<	arrow pointing left
\s-1ACS_RARROW\s0	>	arrow pointing right
\s-1ACS_DARROW\s0	v	arrow pointing down
\s-1ACS_UARROW\s0	\d^\u	arrow pointing up
.ne 3
\s-1ACS_BOARD\s0	#	board of squares
\s-1ACS_LANTERN\s0	#	lantern symbol
\s-1ACS_BLOCK\s0	#	solid square block
.TE
.SH RETURN VALUES
.LP
All routines return the integer
.SB OK
upon successful completion and the integer
.SB ERR
upon failure, unless otherwise
noted in the preceding routine descriptions.
.LP
All macros return the value of their
.B w
version, except
.BR setscrreg(\|) ,
.BR wsetscrreg(\|) ,
.BR getsyx(\|) ,
.BR getyx(\|) ,
.BR getbegy(\|) ,
.BR getmaxyx(\|) .
For these macros, no useful value is returned.
.LP
Routines that return pointers always return
.BI ( type "\(**) \s-1NULL\s0
"on error.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo
.TP
.B \&.login
.TP
.B \&.profile
.PD
.SH SEE ALSO
.BR cc (1V),
.BR ld (1),
.BR ioctl (2),
.BR plot (3X),
.BR printf (3S),
.BR putc (3S),
.BR scanf (3V),
.BR stdio (3V),
.BR system (3),
.BR varargs (3),
.BR vprintf (3V),
.BR termio (4),
.BR term(5V),
.BR terminfo (5V)
.SH WARNINGS
.LP
The plotting library
.BR plot (3X)
and the curses library 
.BR curses (3V)
both use the names
.B erase(\|)
and
.BR move(\|) .
The
.B curses
versions are macros.
If you need both libraries, put the 
.BR plot (3X)
code in  a different source file than the 
.BR curses (3V)
code, and/or
.RB ` "#undef move" '
and
.RB ` "#undef erase" '
in the
.BR plot (3X)
code.
.LP
Between the time a call to
.B initscr(\|)
and
.B endwin(\|)
has been issued, use only the routines in the
.B curses
library to generate output.
Using system calls or the \(lqstandard I/O package\(rq
(see
.BR stdio (3V))
for output during that time
can cause unpredictable results.
ry for
.IR codename .
If
.I area
is not
.SM NULL\s0,
then also store it in the buffer pointed to by
.IR area
and advance
.IR area .
.B tputs(\|)
should be used to output the returned string.
.TP 20
.BI "char \(**tgoto (" "cap, col, row" )
Instantiate the parameters into the given capability.
The output from this routine is to be passed to
.BR tputs(\|) .
.TP
.BI "tputs (" "str, affc./share/man/man3/curses.3x                                                                             755       0      12        35132  4424741134  10512                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)curses.3x 1.19 89/03/27 SMI; from UCB 4.3 6.3 4/23/86
.TH CURSES 3X "25 September 1987"
.SH NAME
curses \- cursor addressing and screen display library
.SH SYNOPSIS
.B cc
[
.I flags
]
.I files
.B \-lcurses \-ltermcap
[
.I libraries
]
.SH DESCRIPTION
.IX "curses library" "" "\fLcurses\fP library routines"
.LP
These routines give the user a method of updating screens with reasonable
optimization.  They keep an image of the current screen,
and the user sets up an image of a new one.  Then the
.B refresh(\|)
tells the routines to make the current screen look like the new one.
In order to initialize the routines, the routine
.B initscr(\|)
must be called before any of the other routines that deal with windows and
screens are used.  The routine
.B endwin(\|)
should be called before exiting.
.SH SEE ALSO
.BR tic (8V),
.BR ioctl (2),
.BR curses (3V),
.BR getenv (3),
.BR tty (4),
.BR terminfo (5V),
.BR term (5V),
.BR termcap (5)
.LP
.TX PUL
.\" .IX  "addch function"  ""  "\fLaddch\fP \(em add character"
.\" .IX  "addstr function"  ""  "\fLaddstr\fP \(em add string"
.\" .IX  "box function"  ""  "\fLbox\fP \(em draw box around window"
.\" .IX  "crmode function"  ""  "\fLcrmode\fP \(em set cbreak mode"
.\" .IX  "clear function"  ""  "\fLclear\fP \(em clear"
.\" .IX  "clearok function"  ""  "\fLclearok\fP \(em set clear flag for screen"
.\" .IX  "clrtobot function"  ""  "\fLclrtobot\fP \(em clear to bottom"
.\" .IX  "clrtoeol function"  ""  "\fLclrtoeol\fP \(em clear to end of line"
.\" .IX  "delch function"  ""  "\fLdelch\fP \(em delete character"
.\" .IX  "deleteln function"  ""  "\fLdeleteln\fP \(em delete line"
.\" .IX  "delwin function"  ""  "\fLdelwin\fP \(em delete window"
.\" .IX  "echo function"  ""  "\fLecho\fP \(em set echo mode"
.\" .IX  "endwin function"  ""  "\fLendwin\fP \(em end window modes"
.\" .IX  "erase function"  ""  "\fLerase\fP \(em erase"
.\" .IX  "getch function"  ""  "\fLgetch\fP \(em get character"
.\" .IX  "getcap function"  ""  "\fLgetcap\fP \(em get terminal capability"
.\" .IX  "getstr function"  ""  "\fLgetstr\fP \(em get string through"
.\" .IX  "gettmode function"  ""  "\fLgettmode\fP \(em get tty modes"
.\" .IX  "getyx function"  ""  "\fLgetyx\fP \(em get (y,x) co-ordinates"
.\" .IX  "inch function"  ""  "\fLinch\fP \(em get character at current (y,x) co-ordinates"
.\" .IX  "initscr function"  ""  "\fLinitscr\fP \(em initialize screens"
.\" .IX  "insch function"  ""  "\fLinsch\fP \(em insert character"
.\" .IX  "insertln function"  ""  "\fLinsertln\fP \(em insert line"
.\" .IX  "leaveok function"  ""  "\fLleaveok\fP \(em set leave flag for window"
.\" .IX  "longname function"  ""  "\fLlongname\fP \(em get long name"
.\" .IX  "move function"  ""  "\fLmove\fP \(em move to (y,x)"
.\" .IX  "mvcur function"  ""  "\fLmvcur\fP \(em actually move cursor"
.\" .IX  "newwin  function"  ""  "\fLnewwin \fP \(em create new window"
.\" .IX  "nl function"  ""  "\fLnl\fP \(em set newline mapping"
.\" .IX  "nocrmode function"  ""  "\fLnocrmode\fP \(em unset cbreak mode"
.\" .IX  "noecho function"  ""  "\fLnoecho\fP \(em unset echo mode"
.\" .IX  "nonl function"  ""  "\fLnonl\fP \(em unset newline mapping"
.\" .IX  "noraw function"  ""  "\fLnoraw\fP \(em unset raw mode"
.\" .IX  "overlay function"  ""  "\fLoverlay\fP \(em overlay win1 on win2"
.\" .IX  "overwrite function"  ""  "\fLoverwrite\fP \(em overwrite win1 on win2"
.\" .IX  "printw function"  ""  "\fLprintw\fP \(em printf to window"
.\" .IX  "raw function"  ""  "\fLraw\fP \(em set raw mode"
.\" .IX  "refresh function"  ""  "\fLrefresh\fP \(em refresh current screen"
.\" .IX  "resetty function"  ""  "\fLresetty\fP \(em reset tty flags to stored value"
.\" .IX  "savetty function"  ""  "\fLsavetty\fP \(em stored current tty flags"
.\" .IX  "scanw function"  ""  "\fLscanw\fP \(em scanf through string"
.\" .IX  "scroll function"  ""  "\fLscroll\fP \(em scroll window one line"
.\" .IX  "scrollok function"  ""  "\fLscrollok\fP \(em set scroll flag"
.\" .IX  "setterm function"  ""  "\fLsetterm\fP \(em set term variables for name"
.\" .IX  "standend function"  ""  "\fLstandend\fP \(em end standout mode"
.\" .IX  "standout function"  ""  "\fLstandout\fP \(em start standout mode"
.\" .IX  "subwin  function"  ""  "\fLsubwin \fP \(em create subwindow"
.\" .IX  "touchwin function"  ""  "\fLtouchwin\fP \(em change all window"
.\" .IX  "unctrl function"  ""  "\fLunctrl\fP \(em printable version of control"
.\" .IX  "waddch function"  ""  "\fLwaddch\fP \(em add character"
.\" .IX  "waddstr function"  ""  "\fLwaddstr\fP \(em add string"
.\" .IX  "wclear function"  ""  "\fLwclear\fP \(em clear window"
.\" .IX  "wclrtobot function"  ""  "\fLwclrtobot\fP \(em clear to bottom of window"
.\" .IX  "wclrtoeol function"  ""  "\fLwclrtoeol\fP \(em clear to end of line"
.\" .IX  "wdelch function"  ""  "\fLwdelch\fP \(em delete character from window"
.\" .IX  "wdeleteln function"  ""  "\fLwdeleteln\fP \(em delete line from window"
.\" .IX  "werase function"  ""  "\fLwerase\fP \(em erase window"
.\" .IX  "wgetch function"  ""  "\fLwgetch\fP \(em get character through window"
.\" .IX  "wgetstr function"  ""  "\fLwgetstr\fP \(em get string through window"
.\" .IX  "winch function"  ""  "\fLwinch\fP \(em get character at current (y,x) in window"
.\" .IX  "winsch function"  ""  "\fLwinsch\fP \(em insert character in"
.\" .IX  "winsertln function"  ""  "\fLwinsertln\fP \(em insert line in"
.\" .IX  "wmove function"  ""  "\fLwmove\fP \(em set current (y,x) co-ordinates"
.\" .IX  "wprintw  function"  ""  "\fLwprintw \fP \(em printf to window"
.\" .IX  "wrefresh function"  ""  "\fLwrefresh\fP \(em make screen look like window"
.\" .IX  "wscanw  function"  ""  "\fLwscanw \fP \(em scanf through window"
.\" .IX  "wstandend function"  ""  "\fLwstandend\fP \(em end standout mode"
.\" .IX  "wstandout function"  ""  "\fLwstandout\fP \(em start standout mode"
.\" .IX  "add character addch"  ""  "add character \(em \fLaddch\fP"
.\" .IX  "add string addstr"  ""  "add string \(em \fLaddstr\fP"
.\" .IX  "draw box around window"  ""  "draw box around window \(em \fLbox\fP"
.\" .IX  "set cbreak mode"  ""  "set cbreak mode \(em \fLcrmode\fP"
.\" .IX  "clear"  ""  "clear \(em \fLclear\fP"
.\" .IX  "set clear flag for screen"  ""  "set clear flag for screen \(em \fLclearok\fP"
.\" .IX  "clear to bottom"  ""  "clear to bottom \(em \fLclrtobot\fP"
.\" .IX  "clear to end of line clrtoeol"  ""  "clear to end of line \(em \fLclrtoeol\fP"
.\" .IX  "delete character"  ""  "delete character \(em \fLdelch\fP"
.\" .IX  "delete line"  ""  "delete line \(em \fLdeleteln\fP"
.\" .IX  "delete window"  ""  "delete window \(em \fLdelwin\fP"
.\" .IX  "set echo mode"  ""  "set echo mode \(em \fLecho\fP"
.\" .IX  "end window modes"  ""  "end window modes \(em \fLendwin\fP"
.\" .IX  "erase"  ""  "erase \(em \fLerase\fP"
.\" .IX  "get character"  ""  "get character \(em \fLgetch\fP"
.\" .IX  "get terminal capability"  ""  "get terminal capability \(em \fLgetcap\fP"
.\" .IX  "get string"  ""  "get string \(em \fLgetstr\fP"
.\" .IX  "get tty modes"  ""  "get tty modes \(em \fLgettmode\fP"
.\" .IX  "get (y,x) co-ordinates"  ""  "get (y,x) co-ordinates \(em \fLgetyx\fP"
.\" .IX  "get character at current (y,x) co-ordinates"  ""  "get character at current (y,x) co-ordinates \(em \fLinch\fP"
.\" .IX  "initialize screens"  ""  "initialize screens \(em \fLinitscr\fP"
.\" .IX  "insert character"  ""  "insert character \(em \fLinsch\fP"
.\" .IX  "insert line"  ""  "insert line \(em \fLinsertln\fP"
.\" .IX  "set leave flag for window"  ""  "set leave flag for window \(em \fLleaveok\fP"
.\" .IX  "get long name"  ""  "get long name \(em \fLlongname\fP"
.\" .IX  "move to (y,x)"  ""  "move to (y,x) \(em \fLmove\fP"
.\" .IX  "actually move cursor"  ""  "actually move cursor \(em \fLmvcur\fP"
.\" .IX  "create new window"  ""  "create new window \(em \fLnewwin \fP"
.\" .IX  "set newline mapping"  ""  "set newline mapping \(em \fLnl\fP"
.\" .IX  "unset cbreak mode"  ""  "unset cbreak mode \(em \fLnocrmode\fP"
.\" .IX  "unset echo mode"  ""  "unset echo mode \(em \fLnoecho\fP"
.\" .IX  "unset newline mapping"  ""  "unset newline mapping \(em \fLnonl\fP"
.\" .IX  "unset raw mode"  ""  "unset raw mode \(em \fLnoraw\fP"
.\" .IX  "overlay win1 on win2"  ""  "overlay win1 on win2 \(em \fLoverlay\fP"
.\" .IX  "overwrite win1 on win2"  ""  "overwrite win1 on win2 \(em \fLoverwrite\fP"
.\" .IX  "printf to window printw"  ""  "printf to window \(em \fLprintw\fP"
.\" .IX  "set raw mode"  ""  "set raw mode \(em \fLraw\fP"
.\" .IX  "refresh current screen"  ""  "refresh current screen \(em \fLrefresh\fP"
.\" .IX  "reset tty flags to stored value"  ""  "reset tty flags to stored value \(em \fLresetty\fP"
.\" .IX  "stored current tty flags"  ""  "stored current tty flags \(em \fLsavetty\fP"
.\" .IX  "scanf through string"  ""  "scanf through string \(em \fLscanw\fP"
.\" .IX  "scroll window one line"  ""  "scroll window one line \(em \fLscroll\fP"
.\" .IX  "set scroll flag"  ""  "set scroll flag \(em \fLscrollok\fP"
.\" .IX  "set term variables for name"  ""  "set term variables for name \(em \fLsetterm\fP"
.\" .IX  "end standout mode standend"  ""  "end standout mode \(em \fLstandend\fP"
.\" .IX  "start standout mode standout"  ""  "start standout mode \(em \fLstandout\fP"
.\" .IX  "create subwindow"  ""  "create subwindow \(em \fLsubwin \fP"
.\" .IX  "change all window"  ""  "change all window \(em \fLtouchwin\fP"
.\" .IX  "printable version of control"  ""  "printable version of control \(em \fLunctrl\fP"
.\" .IX  "add character waddch"  ""  "add character \(em \fLwaddch\fP"
.\" .IX  "add string waddstr"  ""  "add string \(em \fLwaddstr\fP"
.\" .IX  "clear window"  ""  "clear window \(em \fLwclear\fP"
.\" .IX  "clear to bottom of window"  ""  "clear to bottom of window \(em \fLwclrtobot\fP"
.\" .IX  "clear to end of line wclrtoeol"  ""  "clear to end of line \(em \fLwclrtoeol\fP"
.\" .IX  "delete character from window"  ""  "delete character from window \(em \fLwdelch\fP"
.\" .IX  "delete line from window"  ""  "delete line from window \(em \fLwdeleteln\fP"
.\" .IX  "erase window"  ""  "erase window \(em \fLwerase\fP"
.\" .IX  "get character through window"  ""  "get character through window \(em \fLwgetch\fP"
.\" .IX  "get string through window"  ""  "get string through window \(em \fLwgetstr\fP"
.\" .IX  "get character at current (y,x) in window"  ""  "get character at current (y,x) in window \(em \fLwinch\fP"
.\" .IX  "insert character in"  ""  "insert character in \(em \fLwinsch\fP"
.\" .IX  "insert line in"  ""  "insert line in \(em \fLwinsertln\fP"
.\" .IX  "set current (y,x) co-ordinates"  ""  "set current (y,x) co-ordinates \(em \fLwmove\fP"
.\" .IX  "printf to window wprintw"  ""  "printf to window \(em \fLwprintw \fP"
.\" .IX  "make screen look like window"  ""  "make screen look like window \(em \fLwrefresh\fP"
.\" .IX  "scanf through window"  ""  "scanf through window \(em \fLwscanw \fP"
.\" .IX  "end standout mode wstandend"  ""  "end standout mode \(em \fLwstandend\fP"
.\" .IX  "start standout mode wstandout"  ""  "start standout mode \(em \fLwstandout\fP"
.\" .SH FUNCTIONS
.ds w \fIwin\fP
.ds s \fIstdscr\fP
.LP
.PD 0
.TP 35
.BI "addch(" ch )
add a character to \*s
.TP
.BI "addstr(" str )
add a string to \*s
.TP
.BI "box(" "win,vert,hor" )
draw a box around a window
.TP
.B cbreak(\|)
set cbreak mode
.TP
.B clear(\|)
clear \*s
.TP
.BI "clearok(" "scr,boolf" )
set clear flag for
.I scr
.TP
.B clrtobot(\|)
clear to bottom on \*s
.TP
.B clrtoeol(\|)
clear to end of line on \*s
.TP
.B delch(\|)
delete a character
.TP
.B deleteln(\|)
delete a line
.TP
.BI "delwin(" win )
delete \*w
.TP
.B echo(\|)
set echo mode
.TP
.B endwin(\|)
end window modes
.TP
.B erase(\|)
erase \*s
.TP
.BI "flusok(" "win,boolf" )
set flush-on-refresh flag for
.I win
.TP
.B getch(\|)
get a char through \*s
.TP
.BI "getcap(" name )
get terminal capability
.I name
.TP
.BI "getstr(" str )
get a string through \*s
.TP
.B gettmode(\|)
get tty modes
.TP
.BI "getyx(" "win,y,x" )
get
.BI ( y,x )
co-ordinates
.TP
.B inch(\|)
get char at current
.BI ( y,x )
co-ordinates
.TP
.B initscr(\|)
initialize screens
.TP
.BI "insch(" c )
insert a char
.TP
.B insertln(\|)
insert a line
.TP
.BI "leaveok(" "win,boolf" )
set leave flag for \*w
.TP
.BI "longname(" "termbuf,name" )
get long name from
.I termbuf
.TP
.BI "move(" "y,x" )
move to
.BI ( y,x )
on \*s
.TP
.BI "mvcur(" "lasty,lastx,newy,newx" )
actually move cursor
.TP
.BI "newwin(" "lines,cols,begin_y,begin_x" )\ 
create a new window
.TP
.B nl(\|)
set
.SM NEWLINE
mapping
.TP
.B nocbreak(\|)
unset cbreak mode
.TP
.B noecho(\|)
unset echo mode
.TP
.B nonl(\|)
unset
.SM NEWLINE
mapping
.TP
.B noraw(\|)
unset raw mode
.TP
.BI "overlay(" "win1,win2" )
overlay
.I win1
on
.I win2
.TP
.BI "overwrite(" "win1,win2" )
overwrite
.I win1
on top of
.I win2
.TP
.BI "printw(" "fmt,arg1,arg2,\|.\|.\|." )
printf on \*s
.TP
.B raw(\|)
set raw mode
.TP
.B refresh(\|)
make current screen look like \*s
.TP
.B resetty(\|)
reset tty flags to stored value
.TP
.B savetty(\|)
stored current tty flags
.TP
.BI "scanw(" "fmt,arg1,arg2,\|.\|.\|." )
scanf through \*s
.TP
.BI "scroll(" win )
scroll \*w one line
.TP
.BI "scrollok(" "win,boolf" )
set scroll flag
.TP
.BI "setterm(" name )
set term variables for name
.TP
.B standend(\|)
end standout mode
.TP
.B standout(\|)
start standout mode
.TP
.BI "subwin(" "win,lines,cols,begin_y,begin_x" )\ 
create a subwindow
.TP
.BI "touchline(" "win,y,sx,ex" )
mark line
.I y
.I sx
through
.I sy
as changed
.TP
.BI "touchoverlap(" "win1,win2" )
mark overlap of
.I win1
on
.I win2
as changed
.TP
.BI "touchwin(" win )
\*(lqchange\*(rq all of \*w
.TP
.BI "unctrl(" ch )
printable version of
.I ch
.TP
.BI "waddch(" "win,ch" )
add char to \*w
.TP
.BI "waddstr(" "win,str" )
add string to \*w
.TP
.BI "wclear(" win )
clear \*w
.TP
.BI "wclrtobot(" win )
clear to bottom of \*w
.TP
.BI "wclrtoeol(" win )
clear to end of line on \*w
.TP
.BI "wdelch (" "win,c" )
delete char from \*w
.TP
.BI "wdeleteln(" win )
delete line from \*w
.TP
.BI "werase(" win )
erase \*w
.TP
.BI "wgetch(" win )
get a char through \*w
.TP
.BI "wgetstr (" "win,str"  )
get a string through \*w
.TP
.BI "winch(" win )
get char at current
.BI ( y,x )
in \*w
.TP
.BI "winsch (" "win,c" )
insert character into \*w
.TP
.BI "winsertln(" win )
insert line into \*w
.TP
.BI "wmove(" "win,y,x" )
set current
.BI ( y,x )
co-ordinates on \*w
.TP
.BI "wprintw(" "win,fmt,arg1,arg2,\|.\|.\|." )\ 
printf on \*w
.TP
.BI "wrefresh(" win )
make screen look like \*w
.TP
.BI "wscanw(" "win,fmt,arg1,arg2,\|.\|.\|." )\ 
scanf through \*w
.TP
.BI "wstandend(" win )
end standout mode on \*w
.TP
.BI "wstandout(" win )
start standout mode on \*w
.PD
ete line"  ""  "delete line \(em \fLdeleteln\fP"
.\" .IX  "delete window"  ""  "delete window \(em \fLdelwin\fP"
.\" .IX  "set echo mode"  ""  "set echo mode \(em \fLecho\fP"
.\" .IX  "end window modes"  ""  "end window modes \(em \fLendwin\fP"
.\" .IX  "erase"  ""  "erase \(em \fLerase\fP"
.\" .IX  "get character"  ""  "get character \(em \fLgetch\fP"
.\" .IX  "get terminal capability"  ""  "get terminal capability \(./share/man/man3/curses_functions.3v                                                                   755       0      12         2375  4424741134  12563                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)curses_functions.3v 1.11 89/03/27 SMI; 
.ig
.TH CURSES_FUNCTIONS 3V 
.SH NAME
curses, addch, addstr, attroff, attron, attrset, baudrate, beep, box,
clear, clearok, clrtobot, clrtoeol, cbreak, delay_output, delch,
deleteln, delwin, doupdate, echo, endwin, erase, erasechar, fixterm,
flash, flushinp, getch, getstr, gettmode, getyx, has_ic, has_il, idlok,
inch, initscr, insch, insertln, intrflush, keypad, killchar, leaveok,
longname, meta, move, mvaddch, mvaddstr, mvdelch, mvgetch, mvcur,
mvgetstr, mvinch, mvinsch, mvprintw, mvscanw, mvwaddch, mvwaddstr,
mvwdelch, mvwgetch, mvwgetstr, mvwin, mvwinch, mvwinsch, mvwprintw,
mvwscanw, newpad, newterm, newwin, nl, nocbreak, nodelay, noecho, nonl,
noraw, overlay, overwrite, pnoutrefresh, raw, refresh, resetterm,
resetty, saveterm, savetty, scanw, scroll, scrollok, set_term,
setscrreg, setterm, setupterm, standend, standout, subwin, touchwin,
traceoff, traceon, typeahead, unctrl, waddch, waddstr, wattroff,
wattron, wattrset, wclear, wclrtobot, wclrtoeol, wdelch, wdeleteln,
werase, wgetch, wgetstr, winch, winsch, winsertln, wmove, wnoutrefresh,
wprintw, wrefresh, wscanw, wsetscrreg, wstandend, wstandout \-
System V cursor addressing and screen display library, see curses(3V)
.SH 
..
.so /usr/man/man3/curses.3v
 	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent../share/man/man3/curses_functions.3x                                                                   755       0      12         1360  4424741134  12556                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)curses_functions.3x 1.9 89/03/27 SMI; 
.ig
.TH CURSES_FUNCTIONS 3X 
.SH NAME
curses, addch, addstr, box, crmode, clear, clearok, clrtobot, clrtoeol,
delch, deleteln, delwin, echo, endwin, erase, getch, getcap, getstr,
gettmode, getyx, inch, initscr, insch, insertln, leaveok, longname,
move, mvcur, newwin, nl, nocrmode, noecho, nonl, noraw, overlay,
overwrite, printw, raw, refresh, resetty, savetty, scanw, scroll,
scrollok, setterm, standend, standout, subwin, touchwin, unctrl,
waddch, waddstr, wclear, wclrtobot, wclrtoeol, wdelch, wdeleteln,
werase, wgetch, wgetstr, winch, winsch, winsertln, wmove, wprintw,
wrefresh, wscanw, wstandend, wstandout \- cursor addressing and
screen display library, see curses(3X)
.SH
..
.so man3/curses.3x
x, inch, initscr, insch, insertln, leaveok, longname,
move, mvcur, newwin, nl, nocrmode, noecho, nonl, noraw, overlay,
overwrite, printw, raw, refresh, resetty, savetty, scanw, scroll,
scrollok, setterm, standend, standout, subwin, touchwin, unctrl,
waddch, waddstr, wclea./share/man/man3/cuserid.3s                                                                            755       0      12         2114  4424741134  10611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cuserid.3s 1.10 89/03/27 SMI; from S5
.TH CUSERID 3S "22 March 1989"
.SH NAME
cuserid \- get character login name of the user
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B char *cuserid (s)
.B char *s;
.fi
.SH DESCRIPTION
.IX  "cuserid get user name"  ""  "\fLcuserid\fP \(em get user name"
.IX  "get user name"  ""  "get user name \(em \fLcuserid\fP"
.IX  "user name, get \(em \fLcuserid\fP"
.B cuserid(\|)
generates a character-string representation of the login
name that the owner of the current process is logged in under.
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 <stdio.h>
header file.
.SH SEE ALSO
.BR getlogin (3),
.BR getpwent (3)
.SH DIAGNOSTICS
If the login name cannot be found,
.B cuserid(\|)
returns a
.SM NULL
pointer; if
.I s
is not a
.SM NULL
pointer, a
.SM NULL
character
.RB ( '\e0' )
will be placed at
.BR s[0] .
  w  ecb_crypt.3     y  echo.3x     z  
econvert.3     {  ecvt.3 
    |  edata.3     }  	encrypt.3      ~  end.3  	      endac.3       endexportent.3 a  $    
endfsent.3 r  8    endgraent.3   L    
endgrent.3 g  d    
endhostent.3n nt  x    endmntent.3       endnetent.3n ten      endnetgrent.3n n      endprotoent.3n .      endpwaent.3     ./share/man/man3/cv_broadcast.3l                                                                       755       0      12          100  4424741135  11550                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_broadcast.3l 1.3 89/03/27 SMI;
  
cv_destroy.3l (  @  R  cv_enumerate.3l   X  S  cv_notify.3l  X  l  T  
cv_send.3l e    U  
cv_wait.3l f    V  
cv_waiters.3l     W  dbm.3x 3    X  dbm_clearerr.3     Y  dbm_close.3     Z  dbm_delete.3       [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ,  D  ^  
dbm_nextkey.3 D  X  _  
dbm_open.3 y  l  `  dbm_store.3     a  
dbminit.3x      b   decimal_./share/man/man3/cv_create.3l                                                                          755       0      12        14164  4424741135  11130                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cv_create.3l 1.20 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH CV_CREATE 3L "6 October 1987"
.SH NAME
cv_create, cv_destroy, cv_wait, cv_notify, cv_broadcast, cv_send, cv_enumerate, cv_waiters, SAMECV \- manage LWP condition variables
.SH SYNOPSIS
.nf
.B #include <lwp/lwp.h>
.LP
.ft B
cv_t
cv_create(cv, mid)
cv_t *cv;
mon_t mid;
.LP
.ft B
int
cv_destroy(cv)
cv_t cv;
.LP
.ft B
int
cv_wait(cv)
cv_t cv;
.LP
.ft B
int
cv_notify(cv)
cv_t cv;
.LP
.ft B
int
cv_send(cv, tid)
cv_t cv;
lwp_t tid
.LP
.ft B
int
cv_broadcast(cv)
cv_t cv;
.LP
.ft B
int
cv_enumerate(vec, maxsize)
cv_t vec[\|];	/* will contain list of all conditions */
int maxsize;	/* maximum size of vec */
.LP
.ft B
int
cv_waiters(cv, vec, maxsize)
cv_t cv;		/* condition variable being interrogated */
thread_t vec[\|];	/* which threads are blocked on cv */
int maxsize;	/* maximum size of vec */
.LP
.ft B
\s-1SAMECV\s0(c1, c2)
.fi
.SH DESCRIPTION
.IX "cv_create function" "" "\fLcv_create()\fP function"
.IX "cv_destroy function" "" "\fLcv_destroy()\fP function"
.IX "cv_wait function" "" "\fLcv_wait()\fP function"
.IX "cv_notify function" "" "\fLcv_notify()\fP function"
.IX "cv_broadcast function" "" "\fLcv_broadcast()\fP function"
.IX "cv_send function" "" "\fLcv_send()\fP function"
.IX "cv_enumerate function" "" "\fLcv_enumerate()\fP function"
.IX "cv_waiters function" "" "\fLcv_waiters()\fP function"
.IX "SAMECV function" "" "\fLSAMECV()\fP function"
.LP
Condition variables are useful for synchronization within monitors.
By waiting on a condition variable, the currently-held monitor
(a condition variable must
.I always
be used within a monitor)
is released atomically and the invoking thread is suspended.
When monitors are nested, monitor locks other than the current one are retained
by the thread.
At some later point, a different thread may awaken the waiting
thread by issuing a notification on the condition variable.
When the notification occurs, the waiting thread will queue to reacquire
the monitor it gave up.
It is possible to have different condition variables operating within
the same monitor to allow selectivity in waking up threads.
.LP
.B cv_create(\|)
creates a new condition variable (returned in
.IR cv )
which is bound to the monitor specified by
.IR mid .
It is illegal to access (using
.BR cv_wait ,
.BR cv_notify ,
.B cv_send(\|)
or
.BR cv_broadcast )
a condition variable
from a monitor other than the one it is bound to.
.B cv_destroy(\|)
removes a condition variable.
.LP
.B cv_wait(\|)
blocks the current thread
and releases the monitor lock associated with the condition
(which must also be the monitor lock most
recently acquired by the thread).
Other monitor locks held by the thread are not affected.
The blocked thread is enqueued by its scheduling priority on the condition.
.LP
.B cv_notify(\|)
awakens at most one thread blocked on the
condition variable and causes the awakened thread to queue for access to the
monitor released at the time it waited on the condition.
It can be dangerous to use
.B cv_notify(\|)
if there is a possibility that
the thread being awakened is one of several threads
that are waiting on a condition variable and the awakened thread
may not be the one intended.
In this case, use of
.B cv_broadcast(\|)
is recommended.
.LP
.B cv_broadcast(\|)
is the same as
.B cv_notify(\|)
except that
.I all
threads blocked on the condition variable are awakened.
.B cv_notify(\|)
and
.B cv_broadcast(\|)
do nothing if no thread is
waiting on the condition.  For both
.B cv_notify(\|)
and
.BR cv_broadcast ,
the currently held monitor must agree
with the one bound to the condition by
.BR cv_create .
.LP
.B cv_send(\|)
is like
.B cv_notify(\|)
except that the particular thread
.B tid
is awakened.
If this thread is not currently blocked on the condition,
.B cv_send(\|)
reports an error.
.LP
.B cv_enumerate(\|)
lists the
.SM ID
of all of the condition variables.
The value returned is the total number of condition variables.
The vector supplied is filled in with the
.SM ID\s0's
of condition variables.
.B cv_waiters(\|)
lists the
.SM ID\s0's
of the threads blocked on the
condition variable
.I cv
and returns the number of threads blocked on
.IR cv .
For both
.B cv_enumerate(\|)
and
.BR cv_waiters ,
.I maxsize
is used to avoid exceeding the capacity of the list
.IR vec .
If the number of entries to be filled is greater than
.IR maxsize ,
only
.I maxsize
entries are filled in
.IR vec .
It is legal in both of these primitives to specify a
.I maxsize
of 0.
.LP
.SB SAMECV
is a convenient predicate used to compare two
condition variables for equality.
.SH RETURN VALUE
.B
cv_create, cv_destroy, cv_send, cv_wait, cv_notify, cv_broadcast:
.LP
A 0 return indicates success; \-1 indicates an error.
.LP
.B cv_enumerate(\|)
returns the total number of condition variables.
.LP
.B cv_waiters(\|)
returns the number of threads blocked on a
condition variable.
.LP
.SH ERRORS
.B cv_destroy(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INUSE
Attempt to destroy condition variable being waited on by a thread.
.TP
.SM LE_NONEXIST
Attempt to destroy non-existent condition variable.
.LP
.B cv_wait(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NOTOWNED
Attempt to wait on a condition without possessing the correct monitor lock.
.TP
.SM LE_NONEXIST
Attempt to wait on non-existent condition variable.
.LP
.B cv_notify(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NOTOWNED
Attempt to notify condition variable without possessing the correct monitor.
.TP
.SM LE_NONEXIST
Attempt to notify non-existent condition variable.
.LP
.B cv_send(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NOTOWNED
Attempt to awaken condition variable without possessing the correct monitor lock.
.TP
.SM LE_NONEXIST
Attempt to awaken non-existent condition variable.
.TP
.SM LE_NOWAIT
The specified thread is not currently blocked on the condition.
.LP
.B cv_broadcast(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NOTOWNED
Attempt to broadcast condition without possessing the correct monitor lock.
.TP
.SM LE_NONEXIST
Attempt to broadcast non-existent condition variable.
.SH "SEE ALSO"
.BR mon_create (3L)
987"
.SH NAME
cv_create, cv_destroy, cv_wait, cv_notify, cv_broadcast, cv_send, cv_enumerate, cv_waiters, SAMECV \- manage LWP condition variables
.SH SYNOPSIS
.nf
.B #include <lwp/lwp.h>
.LP
.ft B
cv_t
cv_create(cv, mid)
cv_t *cv;
mon_t mid;
.LP
.ft B
int
cv_destroy(cv)
cv_t cv;
.LP
.ft B
int
cv_wait(cv)
cv_t cv;
.LP
.ft B
int
cv_notify(cv)
cv_t cv;
.LP
.ft B
int
cv_send(cv, tid)
cv_t cv;
lwp./share/man/man3/cv_destroy.3l                                                                         755       0      12           76  4424741135  11273                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_destroy.3l 1.3 89/03/27 SMI;
S  cv_notify.3l 3l   l  T  
cv_send.3l l    U  
cv_wait.3l .    V  
cv_waiters.3l  .    W  dbm.3x e    X  dbm_clearerr.3 e    Y  dbm_close.3     Z  dbm_delete.3 .3      [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3    D  ^  
dbm_nextkey.3     X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d./share/man/man3/cv_enumerate.3l                                                                       755       0      12          100  4424741135  11573                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_enumerate.3l 1.3 89/03/27 SMI;
  
cv_send.3l l    U  
cv_wait.3l .    V  
cv_waiters.3l  .    W  dbm.3x e    X  dbm_clearerr.3 e    Y  dbm_close.3     Z  dbm_delete.3 .3      [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3    D  ^  
dbm_nextkey.3     X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d./share/man/man3/cv_notify.3l                                                                          755       0      12           75  4424741135  11111                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_notify.3l 1.3 89/03/27 SMI;
 
cv_wait.3l .    V  
cv_waiters.3l  .    W  dbm.3x e    X  dbm_clearerr.3 e    Y  dbm_close.3     Z  dbm_delete.3 .3      [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3    D  ^  
dbm_nextkey.3     X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_singl./share/man/man3/cv_send.3l                                                                            755       0      12           73  4424741135  10530                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_send.3l 1.3 89/03/27 SMI;

cv_waiters.3l  .    W  dbm.3x e    X  dbm_clearerr.3 e    Y  dbm_close.3     Z  dbm_delete.3 .3      [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3    D  ^  
dbm_nextkey.3     X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_single.3   
  f  delay_output./share/man/man3/cv_wait.3l                                                                            755       0      12           73  4424741136  10544                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_wait.3l 1.3 89/03/27 SMI;
W  dbm.3x 3    X  dbm_clearerr.3     Y  dbm_close.3     Z  dbm_delete.3       [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ,  D  ^  
dbm_nextkey.3 D  X  _  
dbm_open.3    l  `  dbm_store.3     a  
dbminit.3x      b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v./share/man/man3/cv_waiters.3l                                                                         755       0      12           76  4424741136  11261                                                                                                                                                                                                                                                                                                                                                                      .so man3/cv_create.3l
.\" @(#)cv_waiters.3l 1.3 89/03/27 SMI;
m_clearerr.3     Y  dbm_close.3     Z  dbm_delete.3       [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ,  D  ^  
dbm_nextkey.3 D  X  _  
dbm_open.3 D  l  `  dbm_store.3     a  
dbminit.3x      b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x./share/man/man3/dbm.3x                                                                                755       0      12        12020  4424741136   7741                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dbm.3x 1.16 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH DBM 3X  "24 November 1987"
.SH NAME
dbm, dbminit, dbmclose, fetch, store, delete, firstkey, nextkey \- data base subroutines
.SH SYNOPSIS
.LP
.B "#include <dbm.h>"
.LP
.nf
.B typedef struct {
.B "	char *dptr;"
.B "	int dsize;"
.B } datum;
.fi
.LP
.nf
.B dbminit(file)
.B char *file;
.fi
.LP
.B dbmclose(\|)
.LP
.nf
.B datum fetch(key)
.B datum key;
.fi
.LP
.nf
.B store(key, content)
.B datum key, content;
.fi
.LP
.nf
.B delete(key)
.B datum key;
.fi
.LP
.B datum firstkey(\|)
.LP
.nf
.B datum nextkey(key)
.B datum key;
.fi
.SH DESCRIPTION
.LP
Note: the
.B dbm(\|)
library has been superceded by
.BR ndbm (3),
and is now implemented using
.BR ndbm .
.LP
These functions maintain key/content pairs in a data base.
The functions will handle very large (a billion blocks)
databases and will access a keyed item in one or two file system accesses.
.IX  "database library"  "ldbm option"  ""  "\fL\-ldbm\fR option to \fLcc\fR"
The functions are obtained with the loader option
.BR \-ldbm .
.LP
.IR key s
and
.IR content s
are described by the
.B datum
typedef.  A
.B datum
specifies a string of
.I dsize
bytes pointed to by
.IR dptr .
Arbitrary binary data, as well as normal
.SM ASCII
strings, are allowed.
The data base is stored in two files.
One file is a directory containing a bit map and has
.B .dir
as its suffix.  The second file contains all data and has
.B .pag
as its suffix.
.LP
.IX "dbminit function"  ""  "\fLdbminit\fP \(em open database"
.IX "open database \(em \fLdbminit\fP"
.IX "database functions \(em \fLdbm\fR"  dbminit  ""  \fLdbminit\fP
Before a database can be accessed, it must be opened by
.BR dbminit .
At the time of this call, the files
.IB file .dir
and
.IB file .pag
must exist.
(An empty database is created by creating zero-length
.B .dir
and
.B .pag
files.)
.LP
.IX "close function"  ""  "\fLclose\fP \(em close database"
.IX "close database \(em \fLclose\fP"
.IX "database functions \(em \fLdbm\fR"  close  ""  \fLclose\fP
A database may be closed by calling
.BR dbmclose .
You must close a database before opening a new one.
.LP
.IX "fetch function"  ""  "\fLfetch\fP \(em retrieve datum under key"
.IX "retrieve datum under key \(em \fLfetch\fP"
.IX "database functions \(em \fLdbm\fR"  fetch  ""  \fLfetch\fP
Once open, the data stored under a key is accessed by
.B fetch(\|)
and data is placed under a key by
.BR store .
.IX "store function"  ""  "\fLstore\fP \(em store datum under key"
.IX "store datum under key \(em \fLstore\fP"
.IX "database functions \(em \fLdbm\fR"  store  ""  \fLstore\fP
A key (and its associated contents) is deleted by
.BR delete .
.IX "delete function"  ""  "\fLdelete\fP \(em delete datum and key"
.IX "delete datum and key \(em \fLdelete\fP"
.IX "database functions \(em \fLdbm\fR"  delete  ""  \fLdelete\fP
A linear pass through all keys in a database may be made,
in an (apparently) random order, by use of
.B firstkey(\|)
and
.BR nextkey .
.IX "firstkey function"  ""  "\fLfirstkey\fP \(em find first key"
.IX find "first key in \fLdbm\fR database \(em \fLfirstkey\fP"
.IX "database functions \(em \fLdbm\fR"  firstkey  ""  \fLfirstkey\fP
.IX "nextkey function"  ""  "\fLnextkey\fP \(em find next key"
.IX find "next key in \fLdbm\fR database \(em \fLnextkey\fP"
.IX "database functions \(em \fLdbm\fR"  nextkey  ""  \fLnextkey\fP
.B firstkey(\|)
will return the first key in the database.  With any key
.B nextkey(\|)
will return the next key in the database.
This code will traverse the data base:
.IP
.ft B
for
(key = firstkey(\|); key.dptr != \s-1NULL\s0; key = nextkey(key))
.ft R
.SH SEE ALSO
.BR ndbm (3)
.SH DIAGNOSTICS
All functions that return an
.B int
indicate errors with negative values.  A zero return indicates no error.
Routines that return a
.B datum
indicate errors with a
.SM NULL
.BR  (0)
.IR dptr .
.SH BUGS
The
.B .pag
file will contain holes so that its apparent size is about
four times its actual content.  Older
versions of the
.SM UNIX
operating system may create real
file blocks for these holes when touched.  These files cannot be copied
by normal means (\c
.BR cp (1),
.BR cat (1V),
.BR tp (5),
.BR tar (1),
.BR ar (1))
without filling in the holes.
.LP
.I dptr
pointers returned by these subroutines point into static storage
that is changed by subsequent calls.
.LP
The sum of the sizes of a key/content pair must not exceed
the internal block size (currently 1024 bytes).
Moreover all key/content pairs that hash together must fit on a single block.
.B store(\|)
will return an error in the event that a disk block fills with inseparable data.
.LP
.B delete(\|)
does not physically reclaim file space,
although it does make it available for reuse.
.LP
The order of keys presented by
.B firstkey(\|)
and
.B nextkey(\|)
depends on a hashing function, not on anything interesting.
.LP
There are no interlocks and no reliable cache flushing;
thus concurrent updating and reading is risky.
 "\fLclose\fP \(em close database"
.IX "close database \(em \fLclose\fP"
.IX "database functions \(em \fLdbm\fR"  close  ""  \fLclose\fP
A database may be closed by calling
.BR dbmclose .
You must close a database before opening a new one.
.LP
.IX "fetch function"  ""  "\fLfetch\fP \(em retrieve datum under key"
.IX "retrieve datum under key \(em \fLfetch\fP"
.IX "database functions \(em \fLdbm\fR"  fetch  ""  \fLfetch\fP
Once open, the data stored under a key is accessed by
.B fetch(\|)
and./share/man/man3/dbm_clearerr.3                                                                        755       0      12           72  4424741136  11354                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_clearerr.3 1.7 89/03/27 SMI; 
Z  dbm_delete.3  Z     [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ]  D  ^  
dbm_nextkey.3 ^  X  _  
dbm_open.3 X  l  `  dbm_store.3     a  
dbminit.3x     b   decimal_to_double.3     c $ decimal_to_extended.3 ci    d $ decimal_to_floating.3 ci    e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v  
$  
8  h  delch.3x  
8  
L  i  	delete.3x 
L  
`  j  deleteln./share/man/man3/dbm_close.3                                                                           755       0      12           67  4424741136  10666                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_close.3 1.7 89/03/27 SMI; 
   [  dbm_error.3     \  dbm_fetch.3   ,  ]  dbm_firstkey.3    D  ^  
dbm_nextkey.3  ]  X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v put  
8  h  delch.3x .3v  
L  i  	delete.3x 3x  
`  j  deleteln.3v   
t  k  deleteln.3x ./share/man/man3/dbm_delete.3                                                                          755       0      12           70  4424741137  11016                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_delete.3 1.8 89/03/27 SMI; 
  \  dbm_fetch.3   ,  ]  dbm_firstkey.3 ,  D  ^  
dbm_nextkey.3 D  X  _  
dbm_open.3 ]  l  `  dbm_store.3     a  
dbminit.3x      b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x put  
L  i  	delete.3x 3v  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x ./share/man/man3/dbm_error.3                                                                           755       0      12           67  4424741137  10713                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_error.3 1.8 89/03/27 SMI; 
]  dbm_firstkey.3    D  ^  
dbm_nextkey.3  ,  X  _  
dbm_open.3 .  l  `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v put  
8  h  delch.3x .3v  
L  i  	delete.3x 3x  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v ln  
  m  	delwin.3x .3  
./share/man/man3/dbm_fetch.3                                                                           755       0      12           66  4424741137  10652                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_fetch.3 1.6 89/03/27 SMI;
D  ^  
dbm_nextkey.3 D  X  _  
dbm_open.3 ,  l  `  dbm_store.3     a  
dbminit.3x      b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x put  
L  i  	delete.3x 3v  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x ln  
  n  des_crypt.3   
./share/man/man3/dbm_firstkey.3                                                                        755       0      12           72  4424741137  11416                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_firstkey.3 1.8 89/03/27 SMI; 
X  _  
dbm_open.3 D  l  `  dbm_store.3     a  
dbminit.3x      b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x 3v   
L  i  	delete.3x ut  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3 ./share/man/man3/dbm_nextkey.3                                                                         755       0      12           71  4424741137  11244                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_nextkey.3 1.8 89/03/27 SMI; 
 `  dbm_store.3     a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v put  
8  h  delch.3x .3v  
L  i  	delete.3x 3x  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v ln  
  m  	delwin.3x .3  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
./share/man/man3/dbm_open.3                                                                            755       0      12           65  4424741140  10513                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_open.3 1.6 89/03/27 SMI;
 a  
dbminit.3x r    b   decimal_to_double.3     c $ decimal_to_extended.3 c    d $ decimal_to_floating.3 d    e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v put  
8  h  delch.3x .3v  
L  i  	delete.3x 3x  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v ln  
  m  	delwin.3x .3  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 or     x./share/man/man3/dbm_store.3                                                                           755       0      12           67  4424741140  10710                                                                                                                                                                                                                                                                                                                                                                      .so man3/ndbm.3
.\" @(#)dbm_store.3 1.8 89/03/27 SMI; 
b   decimal_to_double.3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x put  
L  i  	delete.3x 3v  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x ln  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  ./share/man/man3/dbminit.3x                                                                            755       0      12           66  4424741140  10547                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)dbminit.3x 1.6 89/03/27 SMI; 
3     c $ decimal_to_extended.3      d $ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x 3v   
L  i  	delete.3x ut  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   ./share/man/man3/decimal_to_double.3                                                                   755       0      12          115  4424741140  12376                                                                                                                                                                                                                                                                                                                                                                      .so man3/decimal_to_floating.3
.\" @(#)decimal_to_double.3 1.3 89/03/27 SMI;
$ decimal_to_floating.3      e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v 3v   
8  h  delch.3x 3v   
L  i  	delete.3x v   
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D./share/man/man3/decimal_to_extended.3                                                                 755       0      12          117  4424741140  12726                                                                                                                                                                                                                                                                                                                                                                      .so man3/decimal_to_floating.3
.\" @(#)decimal_to_extended.3 1.3 89/03/27 SMI;
e   decimal_to_single.3   
  f  delay_output.3v   
$  g  delch.3v _ou  
8  h  delch.3x elc  
L  i  	delete.3x lc  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v le  
  m  	delwin.3x lw  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 re     x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	./share/man/man3/decimal_to_floating.3                                                                 755       0      12         5263  4424741140  12760                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)decimal_to_floating.3 1.10 89/03/27 SMI;
.TH DECIMAL_TO_FLOATING 3 "23 October 1987"
.SH NAME
decimal_to_single, decimal_to_double, decimal_to_extended \- convert decimal record to floating-point value
.SH SYNOPSIS
.B #include <floatingpoint.h>
.LP
.nf
.B void decimal_to_single(px, pm, pd, ps)
.B single *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.LP
.nf
.B void decimal_to_double(px, pm, pd, ps)
.B double *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.LP
.nf
.B void decimal_to_extended(px, pm, pd, ps)
.B extended *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.SH DESCRIPTION
.IX  "decimal_to_single function"  ""  "\fLdecimal_to_single\fP \(em decimal record to single-precision floating"
.IX  "decimal record to single-precision floating \(em \fLdecimal_to_single\fP"
.IX  "decimal_to_double function"  ""  "\fLdecimal_to_double\fP \(em decimal record to double-precision floating"
.IX  "decimal record to double-precision floating \(em \fLdecimal_to_double\fP"
.IX  "decimal_to_extended function"  ""  "\fLdecimal_to_extended\fP \(em decimal record to extended-precision floating"
.IX  "decimal record to extended-precision floating \(em \fLdecimal_to_extended\fP"
.LP
The
.B decimal_to_floating(\|)
functions convert the decimal record at
.I *pd
into a floating-point value at
.IR *px ,
observing the modes specified in
.I *pm
and setting exceptions in
.IR *ps .
If there are no
.SM IEEE
exceptions,
.I *ps
will be zero.
.LP
.I pd->sign
and
.I pd->fpclass
are always taken into account.
.I pd->exponent
and
.I pd->ds
are used when
.I pd->fpclass
is
.I fp_normal
or
.IR fp_subnormal .
In these cases
.I pd->ds
must contain one or more ascii digits followed by a
.SM NULL\s0.
.I *px
is set to a correctly rounded approximation to
.IP
.B (pd->sign)*(pd->ds)*10**(pd->exponent)
.LP
Thus if
.I pd->exponent
== \-2 and
.I pd->ds
== "1234",
.I *px
will get 12.34 rounded
to storage precision.
.I pd->ds
cannot have more than
.SB DECIMAL_STRING_LENGTH-1
significant digits
because one character is used to terminate the string with a
.SM NULL\s0.
If
.I pd->more != 0
on input then additional nonzero digits follow those in
.I pd->ds; fp_inexact
is set accordingly on output in
.IR *ps .
.LP
.I *px
is correctly rounded according to the
.SM IEEE
rounding modes in
.IR pm->rd .
.I *ps
is set to contain
.IR fp_inexact ,
.IR fp_underflow ,
or
.I fp_overflow
if any of these arise.
.LP
.IR pd->ndigits ,
.IR pm->df ,
and
.I pm->ndigits
are not used.
.LP
.BR strtod (3),
.BR scanf (3),
.BR fscanf (3),
and
.BR sscanf (3)
all use
.BR decimal_to_double .
.SH SEE ALSO
.BR scanf (3S),
.BR scanf (3V),
.BR strtod (3)
.3 xt      floatingpoint.3       floor.3m loa       flushinp.3v       fmod.3m   $    fopen.3s    8    fopen.3v    L    fp_class.3m   `    
fprintf.3s   t    
fprintf.3v 
      fputc.3s  
      fputs.3s        fread.3s        free.3       
freopen../share/man/man3/decimal_to_single.3                                                                   755       0      12          115  4424741141  12406                                                                                                                                                                                                                                                                                                                                                                      .so man3/decimal_to_floating.3
.\" @(#)decimal_to_single.3 1.3 89/03/27 SMI;
.3v ela  
8  h  delch.3x    
L  i  	delete.3x    
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v    
  m  	delwin.3x  	  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3       x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3    l  v  dysize.3  	    w  ecb_crypt.3     y  ./share/man/man3/delay_output.3v                                                                       755       0      12           75  4424741141  11636                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)delay_output.3v 1.5 89/03/27 SMI;
 delch.3x elc  
L  i  	delete.3x lc  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v le  
  m  	delwin.3x lw  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 re     x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 up  l  v  dysize.3 ran    w  ecb_crypt.3     y  echo.3x     z  
econvert.3 ./share/man/man3/delch.3v                                                                              755       0      12           66  4424741141  10177                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)delch.3v 1.5 89/03/27 SMI;
i  	delete.3x 3x  
`  j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v ln  
  m  	delwin.3x .3  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 or     x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 te  l  v  dysize.3 48.    w  ecb_crypt.3     y  echo.3x     z  
econvert.3 o    {  ecvt.3 n    |./share/man/man3/delch.3x                                                                              755       0      12           67  4424741141  10202                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)delch.3x 1.6 89/03/27 SMI; 
j  deleteln.3v   
t  k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x ln  
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  te    w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	./share/man/man3/delete.3x                                                                             755       0      12           65  4424741141  10363                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)delete.3x 1.6 89/03/27 SMI; 
 k  deleteln.3x   
  l  	delwin.3v x   
  m  	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  ./share/man/man3/deleteln.3v                                                                           755       0      12           71  4424741142  10711                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)deleteln.3v 1.5 89/03/27 SMI;
 	delwin.3v x   
  m  	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      enda./share/man/man3/deleteln.3x                                                                           755       0      12           72  4424741142  10714                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)deleteln.3x 1.6 89/03/27 SMI; 
 	delwin.3x x   
  n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexpor./share/man/man3/delwin.3v                                                                             755       0      12           67  4424741142  10404                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)delwin.3v 1.5 89/03/27 SMI;
n  des_crypt.3   
  o  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endf./share/man/man3/delwin.3x                                                                             755       0      12           70  4424741142  10400                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)delwin.3x 1.6 89/03/27 SMI; 
  des_setparity.3   
  p  directory.3   
  q  	dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endg./share/man/man3/des_crypt.3                                                                           755       0      12         5416  4424741142  10773                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)des_crypt.3 1.17 89/03/27 SMI;
.TH DES_CRYPT 3  "6 October 1987"
.SH NAME
des_crypt, ecb_crypt, cbc_crypt, des_setparity \- fast DES encryption
.SH SYNOPSIS
.nf
.B #include <des_crypt.h>
.LP
.B int ecb_crypt(key, data, datalen, mode)
.B char *key;
.B char *data;
.B unsigned datalen;
.B unsigned mode;
.LP
.B int cbc_crypt(key, data, datalen, mode, ivec)
.B char *key;
.B char *data;
.B unsigned datalen;
.B unsigned mode;
.B char *ivec;
.LP
.B void des_setparity(key)
.B char *key;
.fi
.SH DESCRIPTION
.IX encryption cbc_crypt "" \fLcbc_crypt\fP
.IX "des encryption" cbc_crypt "DES encryption" \fLcbc_crypt\fP
.IX encryption des_setparity "" \fLdes_setparity\fP
.IX "des encryption" des_setparity "DES encryption" \fLdes_setparity\fP
.B ecb_crypt(\|)
and
.B cbc_crypt(\|)
implement the
.SM NBS
.SM DES
(Data Encryption Standard).
These routines are faster and more general purpose than
.BR crypt (3).
They also are able to utilize
.SM DES
hardware if it is available.
.B ecb_crypt(\|)
encrypts in
.SM ECB
(Electronic Code Book)
mode, which encrypts blocks of data independently.
.B cbc_crypt(\|)
encrypts in
.SM CBC
(Cipher Block Chaining)
mode, which chains together
successive blocks.
.SM CBC
mode protects against insertions, deletions and
substitutions of blocks. Also, regularities in the clear text will
not appear in the cipher text.
.LP
Here is how to use these routines.  The first parameter,
.IR key ,
is the 8-byte encryption key with parity.
To set the key's parity, which for
.SM DES
is in the low bit of each byte, use
.IR des_setparity .
The second parameter,
.IR data ,
contains the data to be encrypted or decrypted. The
third parameter,
.IR datalen ,
is the length in bytes of
.IR data ,
which must be a multiple of 8. The fourth parameter,
.IR mode ,
is formed by
.SM OR\s0'ing
together some things.  For the encryption direction 'or' in either
.SM DES_ENCRYPT
or
.SM DES_DECRYPT\s0.
For software versus hardware
encryption, 'or' in either
.SM DES_HW
or
.SM DES_SW\s0.
If
.SM DES_HW
is specified, and there is no hardware, then the encryption is performed
in software and the routine returns
.SM DESERR_NOHWDEVICE\s0.
For
.IR cbc_crypt ,
the parameter
.I ivec
is the the 8-byte initialization
vector for the chaining.  It is updated to the next initialization
vector upon return.
.LP
.SH "SEE ALSO"
.BR des (1),
.BR crypt (3)
.SH DIAGNOSTICS
.PD 0
.TP 20
.SM DESERR_NONE
No error.
.TP
.SM DESERR_NOHWDEVICE
Encryption succeeded, but done in software instead of the requested hardware.
.TP
.SM DESERR_HWERR
An error occurred in the hardware or driver.
.TP
.SM DESERR_BADPARAM
Bad parameter to routine.
.PD
.LP
Given a result status
.IR stat ,
the macro
.SM DES_FAILED\c
.BR ( stat )
is false only for the first two statuses.
.SH RESTRICTIONS
These routines are not available for export outside the U.S.

.B unsigned datalen;
.B unsigned mode;
.LP
.B int cbc_crypt(key, data, datalen, mode, ivec)
.B char *key;
.B char *data;
.B unsigned datalen;
.B unsigned mode;
.B char *ivec;
.LP
.B void des_setparity(key)
.B char *key;
.fi
.SH DESCRIPTION
../share/man/man3/des_setparity.3                                                                       755       0      12          100  4424741143  11620                                                                                                                                                                                                                                                                                                                                                                      .so man3/des_crypt.3
.\" @(#)des_setparity.3 1.6 89/03/27 SMI; 
dn_comp.3 3      x  echo.3v     r  dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endh./share/man/man3/directory.3                                                                           755       0      12        10754  4424741143  11025                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)directory.3 1.22 89/03/27 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH DIRECTORY 3 "6 October 1987"
.SH NAME
directory, opendir, readdir, telldir, seekdir, rewinddir, closedir \- directory operations
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <dirent.h>
.LP
.B \s-1DIR\s0 *opendir(filename)
.B char *filename;
.LP
.B struct dirent
.B *readdir(dirp)
.B \s-1DIR\s0 *dirp;
.LP
.B long
.B telldir(dirp)
.B \s-1DIR\s0 *dirp;
.LP
.B seekdir(dirp, loc)
.B \s-1DIR\s0 *dirp;
.B long loc;
.LP
.B rewinddir(dirp)
.B \s-1DIR\s0 *dirp;
.LP
.B closedir(dirp)
.B \s-1DIR\s0 *dirp;
.fi
.SH DESCRIPTION
.LP
.B opendir(\|)
opens the directory named by
.I filename
and associates a
.B directory stream
with it.
.IX  "opendir function"  ""  "\fLopendir\fP \(em open directory stream"
.IX  "open directory stream \(em \fLopendir\fP"
.IX  "directory operations"  opendir  ""  \fLopendir\fP
.B opendir(\|)
returns a pointer to be used to identify the
.B directory stream
in subsequent operations.  The pointer
.SM NULL
is returned if
.I filename
cannot be accessed or is not a directory, or if it cannot
.BR malloc (3)
enough memory to hold the whole thing.
.IX  "readdir function"  ""  "\fLreaddir\fP \(em read directory stream"
.IX  "read directory stream \(em \fLreaddir\fP"
.IX  "directory operations"  readdir  ""  \fLreaddir\fP
.LP
.B readdir(\|)
returns a pointer to the next directory entry.  It returns
.SM NULL
upon reaching the end of the directory or detecting an invalid
.B seekdir(\|)
operation.
.LP
.IX  "telldir function"  ""  "\fLtelldir\fP \(em position of directory stream"
.IX  "position of directory stream \(em \fLtelldir\fP"
.IX  "directory operations"  telldir  ""  \fLtelldir\fP
.B telldir(\|)
returns the current location associated with the named
.B directory stream.
.LP
.IX  "seekdir function"  ""  "\fLseekdir\fP \(em seek in directory stream"
.IX  "seek in directory stream \(em \fLseekdir\fP"
.IX  "directory operations"  seekdir  ""  \fLseekdir\fP
.B seekdir(\|)
sets the position of the next
.B readdir(\|)
operation on the
.IR "directory stream" .
The new position reverts to the one associated with the
.B directory stream
when the
.B telldir(\|)
operation was performed.  Values returned by
.B telldir(\|)
are good only for the lifetime of the
.SM DIR
pointer from which they are derived.
If the directory is closed and then reopened, the
.B telldir(\|)
value may be invalidated due to undetected directory compaction.
It is safe to use a previous
.B telldir(\|)
value immediately after a call to
.B opendir(\|)
and before any calls to
.BR readdir .
.LP
.IX  "rewinddir function"  ""  "\fLrewinddir\fP \(em rewind directory stream"
.IX  "rewind directory stream \(em \fLrewinddir\fP"
.IX  "directory operations"  rewinddir  ""  \fLrewinddir\fP
.B rewinddir(\|)
resets the position of the named
.B directory stream
to the beginning of the directory.
.LP
.IX  "closedir function"  ""  "\fLclosedir\fP \(em close directory stream"
.IX  "close directory stream \(em \fLclosedir\fP"
.IX  "directory operations"  closedir  ""  \fLclosedir\fP
.B closedir(\|)
closes the named
.B directory stream
and frees the structure associated with the
.SM DIR
pointer.
.br
.ne 11
.SH EXAMPLES
.LP
Sample code which searchs a directory for entry ``name'' is:
.IP
.nf
.ft B
	dirp = opendir(".");
	for (dp = readdir(dirp); dp != \s-1NULL\s0; dp = readdir(dirp))
		if (!strcmp(dp->d_name, name)) {
 			closedir (dirp);
			return \s-1FOUND\s0;
		}
 	closedir (dirp);
	return \s-1NOT_FOUND\s0;
.ft R
.fi
.SH NOTES
.LP
.B
The
.B directory(\|)
library routines now use a new include file,
.BR <dirent.h> .
This replaces the file,
.BR <sys/dir.h> ,
used in previous releases.
Furthermore, with the use of this new file, the
.B readdir(\|)
routine returns directory entries whose structure is named
.B struct dirent
rather than
.B struct direct
as before. The file,
.BR <sys/dir.h> ,
is retained in the current Sun\s-1OS\s0 release for purposes of
backwards source code compatibility;
programs which use the
.B directory(\|)
library and the file,
.BR <sys/dir.h> ,
will continue to compile and run without source code modifications.
However,
existing programs should convert to the use of the
new include file,
.BR <dirent.h> ,
as
.BR <sys/dir.h>
will be removed in a future major release.
.SH "SEE ALSO"
.BR close (2),
.BR lseek (2),
.BR open (2V),
.BR read (2V),
.BR getwd (3),
.BR malloc (3),
.BR dir (5)
wuid.3v     *  ./share/man/man3/dn_comp.3                                                                             755       0      12           70  4424741143  10346                                                                                                                                                                                                                                                                                                                                                                      .so man3/resolver.3
.\" @(#)dn_comp.3 1.5 89/03/27 SMI;
dn_expand.3   0  s   double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  te    w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3    8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endn./share/man/man3/echo.3v                                                                               755       0      12           65  4424741144  10040                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)echo.3v 1.5 89/03/27 SMI;
  double_to_decimal.3   D  t  doupdate.3v   X  u  	drand48.3 v   l  v  dysize.3  v     w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        ./share/man/man3/dn_expand.3                                                                           755       0      12           72  4424741143  10671                                                                                                                                                                                                                                                                                                                                                                      .so man3/resolver.3
.\" @(#)dn_expand.3 1.5 89/03/27 SMI;
D  t  doupdate.3v   X  u  	drand48.3 X  l  v  dysize.3  l    w  ecb_crypt.3     y  echo.3x     z  
econvert.3     {  ecvt.3      |  edata.3     }  	encrypt.3     ~  end.3 3       endac.3       endexportent.3   $    
endfsent.3 $  8    endgraent.3   L    
endgrent.3 L  d    
endhostent.3n   x    endmntent.3       endnetent.3n        endnetgrent.3n   ./share/man/man3/double_to_decimal.3                                                                   755       0      12          115  4424741143  12401                                                                                                                                                                                                                                                                                                                                                                      .so man3/floating_to_decimal.3
.\" @(#)double_to_decimal.3 1.3 89/03/27 SMI;
 v   l  v  dysize.3  X    w  ecb_crypt.3     y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n ./share/man/man3/doupdate.3v                                                                           755       0      12           71  4424741143  10723                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)doupdate.3v 1.5 89/03/27 SMI;
 dysize.3 ran    w  ecb_crypt.3     y  echo.3x     z  
econvert.3     {  ecvt.3 
    |  edata.3     }  	encrypt.3      ~  end.3  	      endac.3       endexportent.3 a  $    
endfsent.3 r  8    endgraent.3   L    
endgrent.3 g  d    
endhostent.3n nt  x    endmntent.3       endnetent.3n ten      endnetgrent.3n n      endprotoent.3n .      endpwaent.3     ./share/man/man3/drand48.3                                                                             755       0      12        15550  4424741144  10265                                                                                                                                                                                                                                                                                                                                                                      '\" e
.\" @(#)drand48.3 1.12 89/03/27 SMI; from S5
.TH DRAND48 3  "22 March 1989"
.EQ
delim $$
.EN
.SH NAME
drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48, lcong48 \- generate uniformly distributed pseudo-random numbers
.SH SYNOPSIS
.nf
.B double drand48(\|)
.LP
.B double erand48(xsubi)
.B unsigned short xsubi[3];
.LP
.B long lrand48(\|)
.LP
.B long nrand48(xsubi)
.B unsigned short xsubi[3];
.LP
.B long mrand48(\|)
.LP
.B long jrand48(xsubi)
.B unsigned short xsubi[3];
.LP
.B void srand48(seedval)
.B long seedval;
.LP
.B unsigned short \(**seed48(seed16v)
.B unsigned short seed16v[3];
.LP
.B void lcong48(param)
.B unsigned short param[7];
.SH DESCRIPTION
.IX  "drand48 function" "" "\fLdrand48\fR \(em generate uniformly distributed random numbers"
.IX  "erand48 function" "" "\fLerand48\fR \(em generate uniformly distributed random numbers"
.IX  "lrand48 function" "" "\fLlrand48\fR \(em generate uniformly distributed random numbers"
.IX  "nrand48 function" "" "\fLnrand48\fR \(em generate uniformly distributed random numbers"
.IX  "mrand48 function" "" "\fLmrand48\fR \(em generate uniformly distributed random numbers"
.IX  "jrand48 function" "" "\fLjrand48\fR \(em generate uniformly distributed random numbers"
.Is  "srand48 function" "" "\fLsrand48\fR \(em generate uniformly distributed random numbers"
.IX  "seed48 function" "" "\fLseed48\fR \(em generate uniformly distributed random numbers"
.IX  "lcong48  function" "" "\fLlcong48\fR \(em generate uniformly distributed random numbers"
.IX "random number generator" \fLdrand48\fR
.IX "random number generator" \fLerand48\fR
.IX "random number generator" \fLjrand48\fR
.IX "random number generator" \fLlrand48\fR
.IX "random number generator" \fLmrand48\fR
.IX "random number generator" \fLnrand48\fR
.IX "random number generator" \fLsrand48\fR
.IX "random number generator" \fLseed48\fR
.IX "random number generator" \fLlcong48\fR
.IX "generate random numbers" "drand48" "" "\fLdrand48\fR"
.IX "generate random numbers" "erand48" "" "\fLerand48\fR"
.IX "generate random numbers" "jrand48" "" "\fLjrand48\fR"
.IX "generate random numbers" "lrand48" "" "\fLlrand48\fR"
.IX "generate random numbers" "mrand48" "" "\fLmrand48\fR"
.IX "generate random numbers" "nrand48" "" "\fLnrand48\fR"
.IX "generate random numbers" "srand48" "" "\fLsrand48\fR"
.IX "generate random numbers" "seed48" "" "\fLseed48\fR"
.IX "generate random numbers" "lcong48" "" "\fLlcong48\fR"
.LP
This family of functions generates pseudo-random numbers using the
well-known linear congruential algorithm and 48-bit integer arithmetic.
.LP
Functions
.B drand48(\|)
and
.B erand48(\|)
return non-negative double-precision floating-point values
uniformly distributed over the interval $[0.0,~1.0).$
.LP
Functions
.B lrand48(\|)
and
.B nrand48(\|)
return non-negative long integers uniformly distributed over the
interval
.if n .ig
$[0,~2 sup 31 ).$
..
.if t .ig
(0, ~2**31).
..
.LP
Functions
.B mrand48(\|)
and
.B jrand48(\|)
return signed long integers uniformly distributed over the interval
.if n .ig
$[-2 sup 31 ,~2 sup 31 ).$
..
.if t .ig
[-2**31 ~2**31).
..
.LP
Functions
.BR srand48(\|) ,
.BR seed48(\|) ,
and
.B lcong48(\|)
are initialization entry points, one of which should be invoked before
either
.BR drand48(\|) ,
.BR lrand48(\|) ,
or
.B mrand48(\|)
is called.
(Although it is not recommended practice,
constant default initializer values will be supplied automatically if
.BR drand48(\|) ,
.BR lrand48(\|) ,
or
.B mrand48(\|)
is called without a prior call to an initialization entry point.)
Functions
.BR erand48(\|) ,
.BR nrand48(\|) ,
and
.B jrand48(\|)
do not require an initialization entry point to be called first.
.LP
All the routines work by generating a sequence of 48-bit integer values,
$X sub i ,$ according to the linear congruential formula
.IP
.EQ I
X sub{n+1}~=~(aX sub n^+^c) sub{roman mod~m}~~~~~~~~n>=0.
.EN
.LP
The parameter
.if n .ig
$m^=^2 sup 48$;
..
.if t .ig
m=2**48;
..
hence 48-bit integer arithmetic is performed.
Unless
.B lcong48(\|)
has been invoked, the multiplier value $a$ and the addend value $c$
are given by
.LP
.RS 6
.EQ I
a~mark =~roman 5DEECE66D^sub 16~=~roman 273673163155^sub 8
.EN
.br
.EQ I
c~lineup =~roman B^sub 16~=~roman 13^sub 8 .
.EN
.RE
.LP
The value returned by any of the functions
.BR drand48(\|) ,
.BR erand48(\|) ,
.BR lrand48(\|) ,
.BR nrand48(\|) ,
.BR mrand48(\|) ,
or
.B jrand48(\|)
is computed by first generating the next 48-bit $X sub i$ in the sequence.
Then the appropriate number of bits, according to the type of data item
to be returned, are copied from the high-order (leftmost) bits of $X sub i$
and transformed into the returned value.
.LP
The functions
.BR drand48(\|) ,
.BR lrand48(\|) ,
and
.B mrand48(\|)
store the last 48-bit $X sub i$ generated in an internal buffer;
that is why they must be initialized prior to being invoked.
The functions
.BR erand48(\|) ,
.BR nrand48(\|) ,
and
.B jrand48(\|)
require the calling program to provide storage for the
successive $X sub i$ values in the array
specified as an argument when the functions are invoked.
That is why these routines do not have to be initialized; the calling
program merely has to place the desired initial value of $X sub i$ into the
array and pass it as an argument.
By using different
arguments, functions
.BR erand48(\|) ,
.BR nrand48(\|) ,
and
.B jrand48(\|)
allow separate modules of a large program to generate several
.I independent
streams of pseudo-random numbers, that is,
the sequence of numbers in each stream will
.I not
depend upon how many times the routines have been called to generate
numbers for the other streams.
.LP
The initializer function
.B srand48(\|)
sets the high-order 32 bits of $X sub i$ to the 32 bits contained in
its argument.
The low-order 16 bits of $X sub i$ are set to the arbitrary value
$roman 330E sub 16 .$
.LP
The initializer function
.B seed48(\|)
sets the value of $X sub i$ to the 48-bit value specified in the
argument array.
In addition, the previous value of $X sub i$ is copied into a 48-bit
internal buffer, used only by
.BR seed48(\|) ,
and a pointer to this buffer is the value returned by
.BR seed48(\|) .
This returned pointer, which can just be ignored if not needed, is useful
if a program is to be restarted from a given point at some future time
\(em use the pointer to get at and store the last $X sub i$ value, and
then use this value to reinitialize via
.B seed48(\|)
when the program is restarted.
.LP
The initialization function
.B lcong48(\|)
allows the user to specify the initial $X sub i ,$ the multiplier value
$a,$ and the addend value $c.$
Argument array elements
.IR param [0-2]
specify $X sub i ,$
.IR param [3-5]
specify the multiplier $a,$ and
.IR param [6]
specifies the 16-bit addend $c.$ After
.B lcong48(\|)
has been called, a subsequent call to either
.B srand48(\|)
or
.B seed48(\|)
will restore the \(lqstandard\(rq multiplier and addend values, $a$ and $c,$
specified on the previous page.
.SH SEE ALSO
.BR rand (3C)

ase \(em \fLerase\fP"
.\" .IX  "get character"  ""  "get character \(em \fLgetch\fP"
.\" .IX  "get terminal capability"  ""  "get terminal capability \(./share/man/man3/dysize.3                                                                              755       0      12           65  4424741144  10243                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)dysize.3 1.6 89/03/27 SMI; 
 y  echo.3x     z  
econvert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v     ./share/man/man3/ecb_crypt.3                                                                           755       0      12           74  4424741144  10706                                                                                                                                                                                                                                                                                                                                                                      .so man3/des_crypt.3
.\" @(#)ecb_crypt.3 1.6 89/03/27 SMI; 
vert.3      {  ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,./share/man/man3/echo.3x                                                                               755       0      12           66  4424741144  10043                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)echo.3x 1.6 89/03/27 SMI; 
 ecvt.3 t    |  edata.3     }  	encrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D./share/man/man3/econvert.3                                                                            755       0      12        11305  4424741144  10640                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)econvert.3 1.11 89/03/27 SMI;
.TH ECONVERT 3  "25 March 1989"
.SH NAME
econvert, fconvert, gconvert, seconvert, sfconvert, sgconvert, ecvt, fcvt, gcvt \- output conversion
.SH SYNOPSIS
.nf
.B #include <floatingpoint.h>
.LP
.B char *econvert(value, ndigit, decpt, sign, buf)
.B double value;
.B int ndigit, *decpt, *sign;
.B char *buf;
.LP
.B char *fconvert(value, ndigit, decpt, sign, buf)
.B double value;
.B int ndigit, *decpt, *sign;
.B char *buf;
.LP
.B char *gconvert(value, ndigit, trailing, buf)
.B double value;
.B int ndigit;
.B int trailing;
.B char *buf;
.LP
.B char *seconvert(value, ndigit, decpt, sign, buf)
.B single *value;
.B int ndigit, *decpt, *sign;
.B char *buf;
.LP
.B char *sfconvert(value, ndigit, decpt, sign, buf)
.B single *value;
.B int ndigit, *decpt, *sign;
.B char *buf;
.LP
.B char *sgconvert(value, ndigit, trailing, buf)
.B single *value;
.B int ndigit;
.B int trailing;
.B char *buf;
.LP
.B char *ecvt(value, ndigit, decpt, sign)
.B double value;
.B int ndigit, *decpt, *sign;
.LP
.B char *fcvt(value, ndigit, decpt, sign)
.B double value;
.B int ndigit, *decpt, *sign;
.LP
.B char *gcvt(value, ndigit, buf)
.B double value;
.B int ndigit;
.B char *buf;
.fi
.IX  "numbers, convert to strings \(em \fLeconvert\fR"
.IX  "strings, convert from numbers \(em \fLeconvert\fR"
.SH DESCRIPTION
.IX  "econvert function"  ""  "\fLeconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  econvert  ""  \fLeconvert\fR
.IX  "fconvert function"  ""  "\fLfconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  fconvert  ""  \fLfconvert\fR
.IX  "gconvert function"  ""  "\fLgconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  gconvert  ""  \fLgconvert\fR
.IX  "seconvert function"  ""  "\fLseconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  seconvert  ""  \fLseconvert\fR
.IX  "sfconvert function"  ""  "\fLsfconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  sfconvert  ""  \fLsfconvert\fR
.IX  "sgconvert function"  ""  "\fLsgconvert\fR \(em convert number to ASCII"
.IX  "convert numbers to strings"  sgconvert  ""  \fLsgconvert\fR
.B econvert(\|)
converts the
.I value
to a
.SM NULL\s0-terminated
string of
.I ndigit
.SM ASCII
digits in
.I buf
and returns a pointer to
.IR buf .
.I buf
should contain at least
.I ndigit+1
characters.
The position of the decimal point relative to the
beginning of the string is stored indirectly through
.IR decpt .
Thus
.I buf
== "314" and
.I *decpt
== 1 corresponds to the numerical value 3.14,
while
.I buf
== "314" and
.I *decpt
== \-1 corresponds to the numerical value .0314.
If the sign of the result is negative, the word pointed to by
.I sign
is nonzero; otherwise it is zero.  The least significant digit is rounded.
.LP
.BR fconvert " works much like " econvert", 
except that the correct digit
has been rounded as if for 
.B sprintf(%w.nf) 
output with
.IR n = ndigit
digits to the right of the decimal point.
.I ndigit
can be negative to indicate rounding to the left of the decimal point.
The return value is a pointer to
.IR buf .
.I buf
should contain at least
.I 310+max(0,ndigit)
characters to accomodate any double-precision
.IR value .
.LP
.B gconvert(\|)
converts the
.I value
to a
.SM NULL\s0-terminated
.SM ASCII
string in
.I buf
and returns a pointer to
.IR buf .
It produces
.I ndigit
significant digits in fixed-decimal format,
like 
.BR sprintf(%w.nf) , 
if possible, and otherwise in
floating-decimal format, like 
.BR sprintf(%w.ne) ;
in either case
.I buf
is ready for printing, with sign and exponent.
The result corresponds to that obtained by
.nf
	\fB(void) sprintf(buf,``%w.ng'',value) ;\fP
.fi
If
.IR trailing "= 0,"
trailing zeros and a trailing point are suppressed, as in 
.BR sprintf(%g) .
If
.IR trailing "!= 0,"
trailing zeros and a trailing point are retained, as in 
.BR sprintf(%#g) .
.LP
.BR seconvert ,
.BR sfconvert ,
and
.B sgconvert(\|)
are single-precision versions of these functions, and are more efficient
than the corresponding double-precision versions.
A pointer rather than the value itself is passed to avoid C's usual
conversion of single-precision arguments to double.
.LP
.B ecvt(\|)
and
.B fcvt(\|)
are obsolete versions of
.B econvert(\|)
and
.B fconvert(\|)
that create a string in a static data area,
overwritten by each call,
and return values that point to that static data.
These functions are therefore not reentrant.
.LP
.B gcvt(\|)
is an obsolete version of
.B gconvert(\|)
that always suppresses trailing zeros and point.
.LP
.SM IEEE
Infinities and NaNs are treated similarly by these functions.
``NaN'' is returned for NaN, and ``Inf'' or ``Infinity''
for Infinity.  The longer form is produced when
.I ndigit
>= 8.
.SH "SEE ALSO"
.BR sprintf (3S)
 t  ;  getw.3v     <  getwd.3     =  getyx.3v      >  getyx.3x      ?  gmtime.3      @  	gmtime.3v     A  	grpauth.3     B  	gsignal.3     C  gtty.3c      D  	has_ic.3v    4  E  	has_il.3v 4  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcre./share/man/man3/ecvt.3                                                                                755       0      12           65  4424741145   7676                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)ecvt.3 1.3 89/03/27 SMI;
ncrypt.3 3     ~  end.3 t.      endac.3       endexportent.3   $    
endfsent.3   8    endgraent.3   L    
endgrent.3    d    
endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3./share/man/man3/edata.3                                                                               755       0      12           62  4424741145  10010                                                                                                                                                                                                                                                                                                                                                                      .so man3/end.3
.\" @(#)edata.3 1.6 89/03/27 SMI; 
~  end.3 3       endac.3       endexportent.3   $    
endfsent.3 $  8    endgraent.3   L    
endgrent.3 L  d    
endhostent.3n   x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3        endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3   X    	endwin.3v X  l    	endw./share/man/man3/encrypt.3                                                                             755       0      12           66  4424741145  10422                                                                                                                                                                                                                                                                                                                                                                      .so man3/crypt.3
.\" @(#)encrypt.3 1.6 89/03/27 SMI; 
 endac.3       endexportent.3   $    
endfsent.3 $  8    endgraent.3   L    
endgrent.3 L  d    
endhostent.3n   x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3        endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3   X    	endwin.3v X  l    	endwin.3x l      	./share/man/man3/end.3                                                                                 755       0      12         2263  4424741145   7545                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)end.3 1.11 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH END 3  "30 January 1988"
.SH NAME
end, etext, edata \- last locations in program
.SH SYNOPSIS
.nf
.B extern end;
.B extern etext;
.B extern edata;
.fi
.IX  "last locations in program"
.IX  "end locations in program"
.IX  "end location"  ""  "\fLend\fP \(em end of program"
.IX  "etext location"  ""  "\fLetext\fP \(em end of program text"
.IX  "edata location"  ""  "\fLedata\fP \(em end of program data"
.SH DESCRIPTION
These names refer neither to routines nor to locations with interesting
contents.  The address of
.I etext
is the first address above the program text,
.I edata
above the initialized data region, and
.B end(\|)
above the uninitialized data region.
.LP
When execution begins, the program break (the first location beyond the data)
coincides with
.BR end ,
but it is reset by the routines
.BR brk (2),
.BR malloc (3),
standard input/output
.RB ( stdio (3S)
and
.BR stdio (3V)),
the profile
.RB ( \-p )
option of
.BR cc (1V),
and so on.
Thus, the current value of the program break
should be determined by
.B sbrk(0)
(see
.BR brk (2)).
.SH "SEE ALSO"
.BR cc (1V),
.BR brk (2),
.BR malloc (3),
.BR stdio (3S),
.BR stdio (3V)
3      exp.3m t      exp10.3m m        exp2.3m       expm1.3m 3m   0    exportent.3   P   $ extended_to_decimal.3    `    fabs.3m   t    	fclose.3s m       
fconvert.3 t      fcvt.3 t      fdate.3       	fdopen.3s 3       	fdopen.3v       feof.3s     ./share/man/man3/endac.3                                                                               755       0      12           67  4424741147  10013                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)endac.3 1.3 89/03/27 SMI;
  
endfsent.3 $  8    endgraent.3   L    
endgrent.3 L  d    
endhostent.3n   x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3        endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3   X    	endwin.3v X  l    	endwin.3x l      	environ.3       	erand48.3     ./share/man/man3/endexportent.3                                                                        755       0      12           76  4424741147  11460                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)endexportent.3 1.3 89/03/27 SMI;
 endgraent.3   L    
endgrent.3 L  d    
endhostent.3n   x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3        endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3   X    	endwin.3v X  l    	endwin.3x l      	environ.3       	erand48.3       erase.3v    ./share/man/man3/endfsent.3                                                                            755       0      12           72  4424741147  10543                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfsent.3
.\" @(#)endfsent.3 1.6 89/03/27 SMI; 
 
endgrent.3 n  d    
endhostent.3n  L  x    endmntent.3       endnetent.3n .3       endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3 n       endpwent.3v       
endservent.3n v   ,    endttyent.3   D    endusershell.3    X    	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v    ./share/man/man3/endgraent.3                                                                           755       0      12           73  4424741147  10705                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgraent.3
.\" @(#)endgraent.3 1.3 89/03/27 SMI;

endhostent.3n d  x    endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3v     l    	endwin.3x ll      	environ.3 .3      	erand48.3 .3      erase.3v  n.      erase.3x 48.      erasechar.3v    ./share/man/man3/endgrent.3                                                                            755       0      12           72  4424741147  10543                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgrent.3
.\" @(#)endgrent.3 1.6 89/03/27 SMI; 
  endmntent.3       endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3v  D  l    	endwin.3x         	environ.3 ll      	erand48.3 .3      erase.3v  .3      erase.3x  n.      erasechar.3v        erf.3m v    ./share/man/man3/endhostent.3n                                                                         755       0      12          100  4424741150  11270                                                                                                                                                                                                                                                                                                                                                                      .so man3/gethostent.3n
.\" @(#)endhostent.3n 1.6 89/03/27 SMI; 
endnetent.3n        endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3v  D  l    	endwin.3x  D      	environ.3         	erand48.3 ll      erase.3v  .3      erase.3x  .3      erasechar.3v        erf.3m v      erfc.3m       ./share/man/man3/endmntent.3                                                                           755       0      12           74  4424741150  10725                                                                                                                                                                                                                                                                                                                                                                      .so man3/getmntent.3
.\" @(#)endmntent.3 1.6 89/03/27 SMI; 
  endnetgrent.3n       endprotoent.3n       endpwaent.3       
endpwent.3 n       endpwent.3v       
endservent.3n v   ,    endttyent.3   D    endusershell.3    X    	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v  .3      erf.3m a      erfc.3m       errno.3       etext.3 ./share/man/man3/endnetent.3n                                                                          755       0      12           76  4424741150  11075                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetent.3n
.\" @(#)endnetent.3n 1.6 89/03/27 SMI; 
  endprotoent.3n       endpwaent.3       
endpwent.3         endpwent.3v       
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3v     l    	endwin.3x ll      	environ.3 .3      	erand48.3 .3      erase.3v  n.      erase.3x 48.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3 ./share/man/man3/endnetgrent.3n                                                                        755       0      12          102  4424741150  11434                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetgrent.3n
.\" @(#)endnetgrent.3n 1.6 89/03/27 SMI; 
 endpwaent.3       
endpwent.3 n       endpwent.3v       
endservent.3n v   ,    endttyent.3   D    endusershell.3    X    	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v 48.      erf.3m a      erfc.3m       errno.3       etext.3   (    ether.3r tex  @    
ether_aton.3n 3 ./share/man/man3/endprotoent.3n                                                                        755       0      12          102  4424741150  11460                                                                                                                                                                                                                                                                                                                                                                      .so man3/getprotoent.3n
.\" @(#)endprotoent.3n 1.6 89/03/27 SMI; 
dpwent.3 n       endpwent.3v       
endservent.3n v   ,    endttyent.3   D    endusershell.3    X    	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v .3v      erf.3m a      erfc.3m       errno.3       etext.3   (    ether.3r tex  @    
ether_aton.3n ex  \     ether_hostton.3n./share/man/man3/endpwaent.3                                                                           755       0      12           73  4424741150  10715                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwaent.3
.\" @(#)endpwaent.3 1.3 89/03/27 SMI;
endpwent.3v       
endservent.3n v   ,    endttyent.3   D    endusershell.3    X    	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v .3v      erf.3m a      erfc.3m       errno.3       etext.3   (    ether.3r tex  @    
ether_aton.3n ex  \     ether_hostton.3n  \  t    
ether_line.3./share/man/man3/endpwent.3                                                                            755       0      12           72  4424741151  10554                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)endpwent.3 1.6 89/03/27 SMI; 
 
endservent.3n   ,    endttyent.3   D    endusershell.3 D  X    	endwin.3v     l    	endwin.3x ll      	environ.3 .3      	erand48.3 .3      erase.3v  n.      erase.3x 48.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_nt./share/man/man3/endpwent.3v                                                                           755       0      12           74  4424741151  10744                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)endpwent.3v 1.6 89/03/27 SMI; 
  endttyent.3   D    endusershell.3 D  X    	endwin.3v  D  l    	endwin.3x         	environ.3 ll      	erand48.3 .3      erase.3v  .3      erase.3x  n.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ethe./share/man/man3/endservent.3n                                                                         755       0      12          100  4424741151  11273                                                                                                                                                                                                                                                                                                                                                                      .so man3/getservent.3n
.\" @(#)endservent.3n 1.6 89/03/27 SMI; 
endusershell.3 D  X    	endwin.3v  D  l    	endwin.3x  D      	environ.3         	erand48.3 ll      erase.3v  .3      erase.3x  .3      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n      ./share/man/man3/endttyent.3                                                                           755       0      12           71  4424741151  10745                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)endttyent.3 1.4 89/03/27 SMI;
   	endwin.3v ll  l    	endwin.3x .3      	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v  .3      erf.3m a      erfc.3m       errno.3       etext.3   (    ether.3r tex  @    
ether_aton.3n 3   \     ether_hostton.3n  \  t    
ether_line.3n       
ether_ntoa.3n t       ether_ntohost.3n        	ethers.3n 3n      ./share/man/man3/endusershell.3                                                                        755       0      12          101  4424741151  11436                                                                                                                                                                                                                                                                                                                                                                      .so man3/getusershell.3
.\" @(#)endusershell.3 1.3 89/03/27 SMI;
ndwin.3x ll      	environ.3 .3      	erand48.3 .3      erase.3v  n.      erase.3x 48.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l      ./share/man/man3/endwin.3v                                                                             755       0      12           67  4424741151  10406                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)endwin.3v 1.5 89/03/27 SMI;
  	environ.3 .3      	erand48.3 n.      erase.3v 48.      erase.3x .3v      erasechar.3v 48.      erf.3m a      erfc.3m       errno.3       etext.3   (    ether.3r tex  @    
ether_aton.3n 3   \     ether_hostton.3n  \  t    
ether_line.3n       
ether_ntoa.3n t       ether_ntohost.3n        	ethers.3n 3n      exc_bound.3l        
exc_handle.3l      ./share/man/man3/endwin.3x                                                                             755       0      12           70  4424741152  10403                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)endwin.3x 1.6 89/03/27 SMI; 
  	erand48.3 .3      erase.3v  n.      erase.3x 48.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
./share/man/man3/environ.3                                                                             755       0      12           66  4424741152  10414                                                                                                                                                                                                                                                                                                                                                                      .so man3/execl.3
.\" @(#)environ.3 1.6 89/03/27 SMI; 
  erase.3v  .3      erase.3x  n.      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0  ./share/man/man3/erand48.3                                                                             755       0      12           70  4424741152  10174                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)erand48.3 1.6 89/03/27 SMI; 
  erase.3x  .3      erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H./share/man/man3/erase.3v                                                                              755       0      12           66  4424741152  10221                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)erase.3v 1.5 89/03/27 SMI;
  erasechar.3v        erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H    exc_raise.3l  H./share/man/man3/erase.3x                                                                              755       0      12           65  4424741152  10222                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)erase.3x 1.7 89/03/27 SMI; 
     erf.3m v      erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H    exc_raise.3l  H  `    exc_unhandle./share/man/man3/erasechar.3v                                                                          755       0      12           72  4424741152  11054                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)erasechar.3v 1.5 89/03/27 SMI;
 erfc.3m       errno.3       etext.3   (    ether.3r .3   @    
ether_aton.3n @  \     ether_hostton.3n    t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H    exc_raise.3l  H  `    exc_unhandle.3l   x    exc_uniq./share/man/man3/erf.3m                                                                                755       0      12         1334  4424741153   7725                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)erf.3m 1.11 89/03/27 SMI; from UCB 4.3 BSD
.\"
.TH ERF 3M  "20 October 1987"
.UC 6
.SH NAME
erf, erfc \- error functions
.SH SYNOPSIS
.B #include <math.h>
.LP
.nf
.B double erf(x)
.B double x;
.fi
.LP
.nf
.B double erfc(x)
.B double x;
.fi
.SH DESCRIPTION
.IX erf "" "\fLerf\fR \(em error functions"
.IX erfc "" "\fLerfc\fR \(em error functions"
.LP
.B erf(x)
returns the error function of
.IR x ;
where
.if n \{\
.LP
.B
.BR erf (x) = 2/sqrt(pi)\(**\|integral from 0 to x of exp(\-t\(**t) dt. \}
.if t \{\
.B
.BR erf\| (x) :=
.B
.BR (2/\(sr\(*p)\|\(is\d\s-2\z0\s0\u\u\s-2x\s0\d\|exp (\-t\u\s-22\s0\d)\|dt. \}
.LP
.B erfc(x)
returns 1.0\-erf\|(x), 
computed however by other methods that avoid cancellation for large
.IR x .
nded_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at      	fdopen.3v .3      feof.3s       feof.3v        ffs.3        	ferror.3s s.  (    	ferror.3v .3  <  ./share/man/man3/erfc.3m                                                                               755       0      12           63  4424741153  10026                                                                                                                                                                                                                                                                                                                                                                      .so man3/erf.3m
.\" @(#)erfc.3m 1.6 89/03/27 SMI; 
etext.3   (    ether.3r  (  @    
ether_aton.3n   \     ether_hostton.3n     t    
ether_line.3n       
ether_ntoa.3n        ether_ntohost.3n         	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l   H    exc_raise.3l    `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3        exec./share/man/man3/errno.3                                                                               755       0      12           64  4424741153  10060                                                                                                                                                                                                                                                                                                                                                                      .so man3/perror.3
.\" @(#)errno.3 1.5 89/03/27 SMI;
ether.3r  (  @    
ether_aton.3n   \     ether_hostton.3n     t    
ether_line.3n       
ether_ntoa.3n        ether_ntohost.3n         	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l   H    exc_raise.3l    `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3        execlp.3        ./share/man/man3/etext.3                                                                               755       0      12           62  4424741153  10062                                                                                                                                                                                                                                                                                                                                                                      .so man3/end.3
.\" @(#)etext.3 1.6 89/03/27 SMI; 
  
ether_aton.3n   \     ether_hostton.3n     t    
ether_line.3n       
ether_ntoa.3n        ether_ntohost.3n         	ethers.3n       exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l   H    exc_raise.3l    `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3        execlp.3        execv.3       ./share/man/man3/ether.3r                                                                              755       0      12         1060  4424741153  10261                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ether.3r 1.10 89/03/27 SMI;
.TH ETHER 3R "6 October 1987"
.SH NAME
ether \- monitor traffic on the Ethernet
.SH PROTOCOL
.B /usr/include/rpcsvc/ether.x
.IX "monitor traffic on the Ethernet"
.SH DESCRIPTION
The ether protocol is used for monitoring traffic on the ethernet.
.SH PROGRAMMING
.nf
.B #include <rpcsvc/ether.h>
.fi
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_etherstat
.B	xdr_etheraddrs
.B	xdr_etherhtable
.B	xdr_etherhmem
.B	xdr_addrmask
.fi
.SH SEE ALSO
.BR traffic (1C),
.BR etherfind (8C),
.BR etherd (8C)
0.3m        exp2.3m       expm1.3m    0    exportent.3   P   $ extended_to_decimal.3 te  `    fabs.3m   t    	fclose.3s t      
fconvert.3       fcvt.3       fdate.3       	fdopen.3s       	fdopen.3v       feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fget./share/man/man3/ether_aton.3n                                                                         755       0      12           74  4424741153  11242                                                                                                                                                                                                                                                                                                                                                                      .so man3/ethers.3n
.\" @(#)ether_aton.3n 1.6 89/03/27 SMI; 
  t    
ether_line.3n t      
ether_ntoa.3n        ether_ntohost.3n        	ethers.3n        exc_bound.3l        
exc_handle.3l        execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H    exc_raise.3l  H  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 3l       execlp.3        execv.3       execvp.3 .3       exit.3 3      ./share/man/man3/ether_hostton.3n                                                                      755       0      12           77  4424741154  12003                                                                                                                                                                                                                                                                                                                                                                      .so man3/ethers.3n
.\" @(#)ether_hostton.3n 1.6 89/03/27 SMI; 
    
ether_ntoa.3n t       ether_ntohost.3n        	ethers.3n 3n      exc_bound.3l         
exc_handle.3l        execl.3       
exc_notify.3l 3   0    exc_on_exit.3l   H    exc_raise.3l l 0  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m./share/man/man3/ether_line.3n                                                                         755       0      12           74  4424741154  11231                                                                                                                                                                                                                                                                                                                                                                      .so man3/ethers.3n
.\" @(#)ether_line.3n 1.6 89/03/27 SMI; 
     ether_ntohost.3n  t      	ethers.3n os      exc_bound.3l s.3      
exc_handle.3l 3l       execl.3       
exc_notify.3l ec  0    exc_on_exit.3l 3  H    exc_raise.3l it.  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 niq      execlp.3 xec      execv.3       execvp.3        exit.3       exp.3m       exp10.3m        exp2.3m     ./share/man/man3/ether_ntoa.3n                                                                         755       0      12           74  4424741154  11243                                                                                                                                                                                                                                                                                                                                                                      .so man3/ethers.3n
.\" @(#)ether_ntoa.3n 1.6 89/03/27 SMI; 
      	ethers.3n 3n      exc_bound.3l  os      
exc_handle.3l .3       execl.3       
exc_notify.3l 3   0    exc_on_exit.3l c  H    exc_raise.3l l 3  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    ./share/man/man3/ether_ntohost.3n                                                                      755       0      12           77  4424741154  12003                                                                                                                                                                                                                                                                                                                                                                      .so man3/ethers.3n
.\" @(#)ether_ntohost.3n 1.6 89/03/27 SMI; 
  exc_bound.3l  3n      
exc_handle.3l os       execl.3       
exc_notify.3l 3   0    exc_on_exit.3l    H    exc_raise.3l l c  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ exte./share/man/man3/ethers.3n                                                                             755       0      12         5263  4424741154  10452                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ethers.3n 1.16 89/03/27 SMI
.TH ETHERS 3N "16 February 1988"
.SH NAME
ethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line \- Ethernet address mapping operations
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
.LP
.ft B
char *
ether_ntoa(e)
	struct ether_addr *e;
.LP
.ft B
struct ether_addr *
ether_aton(s)
	char *s;
.LP
.ft B
ether_ntohost(hostname, e)
	char *hostname;
	struct ether_addr *e;
.LP
.ft B
ether_hostton(hostname, e)
	char *hostname;
	struct ether_addr *e;
.LP
.ft B
ether_line(l, e, hostname)
	char *l;
	struct ether_addr *e;
	char *hostname;
.fi
.SH DESCRIPTION
.IX "Ethernet address to \s-1ASCII\s0 \(em \fLether_ntoa\fR"
.IX "ascii to ether" "" "\s-1ASCII\s0 to Ethernet address \(em \fLether_aton\fR"
.IX "Ethernet address to hostname \(em \fLether_ntohost\fR"
.IX "hostname to Ethernet address \(em \fLether_hostton\fR"
.IX "line to Ethernet address \(em \fLether_line\fR"
.IX "Ethernet address mapping"
.LP
These routines are useful for mapping 48 bit Ethernet numbers to their
.SM ASCII
representations or their corresponding host names, and vice versa.
.LP
The function
.B ether_ntoa(\|)
converts a 48 bit Ethernet number pointed to by
.I e
to its standard
.SM ACSII
representation; it returns a pointer to the
.SM ASCII
string.  The representation is of the form:
.IR x : x : x :\c
.IR x : x : x
where
.I x
is a hexadecimal number between 0 and ff.
The function
.B ether_aton(\|)
converts an
.SM ASCII
string in the standard representation back
to a 48 bit Ethernet number;  the function returns
.SM NULL
if the string
cannot be scanned successfully.
.LP
The function
.B ether_ntohost(\|)
maps an Ethernet number (pointed to by
.IR e )
to its associated hostname.  The string pointed to by
.B hostname
must be long enough to hold the hostname and a
.SM NULL
character.  The function returns zero
upon success and non-zero upon failure.
Inversely, the function
.B ether_hostton(\|)
maps a hostname string to its corresponding Ethernet number;
the function modifies the Ethernet number pointed to by
.IR e .
The function also returns zero upon success and non-zero upon failure.
.LP
The function
.B ether_line(\|)
scans a line (pointed to by
.IR l )
and sets the hostname and the Ethernet number (pointed to by
.IR e ).
The string pointed to by
.B hostname
must be long enough to hold the hostname and a
.SM NULL
character.
The function returns zero upon success and non-zero upon failure.
The format of the scanned line is described by
.BR ethers (5).
.SH FILES
.PD 0
.TP 20
.B /etc/ethers
(or the Yellow Pages maps
.B ethers.byaddr
and
.BR ethers.byname )
.PD
.SH "SEE ALSO"
.BR ethers (5)
   gethostbyaddr.3n 3 d       gethostbyname.3n        
gethostent.3n 3n      
getlogin.3 e      getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n ame  x    getnetgrent.3n n      
getnetname.3n t.      getopt.3 tna      	getpass.3 to      
./share/man/man3/exc_bound.3l                                                                          755       0      12           76  4424741154  11061                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_bound.3l 1.3 89/03/27 SMI;
  execl.3       
exc_notify.3l   0    exc_on_exit.3l 0  H    exc_raise.3l  H  `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 3l       execlp.3 niq      execv.3       execvp.3 .3       exit.3 3      exp.3m t      exp10.3m m       exp2.3m       expm1.3m 3m   0    exportent.3   P   $ extended_to_decimal.3    `    fabs.3m   t    	fclo./share/man/man3/exc_handle.3l                                                                         755       0      12        23605  4424741155  11271                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exc_handle.3l 1.22 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH EXC_HANDLE 3L "6 October 1987"
.SH NAME
exc_handle, exc_unhandle, exc_bound, exc_notify, exc_raise, exc_on_exit, exc_uniqpatt \- LWP exception handling
.SH SYNOPSIS
.B #include <lwp/lwp.h>
.LP
.nf
.ft B
int
exc_handle(pattern, func, arg)
int pattern;
caddr_t (*func)(\|);
caddr_t arg;
.ft R
.fi
.LP
.nf
.ft B
int
exc_raise(pattern)
int pattern;
.ft R
.fi
.LP
.nf
.B int
.B exc_unhandle(\|)
.fi
.LP
.nf
.ft B
caddr_t
(*exc_bound(pattern, arg))(\|)
int pattern;
caddr_t *arg;
.ft R
.fi
.LP
.nf
.ft B
int
exc_notify(pattern)
int pattern;
.ft R
.fi
.LP
.nf
.ft B
int
exc_on_exit(func, arg)
void (*func)(\|);
caddr_t arg;
.ft R
.fi
.LP
.nf
.B int
.B exc_uniqpatt(\|)
.fi
.SH DESCRIPTION
.IX "exc_handle function" "" "\fLexc_handle(\|)\fP function"
.IX "exc_raise function" "" "\fLexc_raise(\|)\fP function"
.IX "exc_unhandle function" "" "\fLexc_unhandle(\|)\fP function"
.IX "exc_bound function" "" "\fLexc_bound(\|)\fP function"
.IX "exc_notify function" "" "\fLexc_notify(\|)\fP function"
.IX "exc_on_exit function" "" "\fLexc_on_exit(\|)\fP function"
.IX "exc_on_exit function" "" "\fLexc_on_exit(\|)\fP function"
.LP
These primitives can be used to manage exceptional conditions
in a thread.
Basically, raising an exception is a more
general form of non-local goto or
.IR longjmp ,
but the invocation is pattern-based.
It is also possible to
.I notify
an exception handler whereby a function supplied by
the exception handler is invoked and control
is returned to the raiser of the exception.
Finally, one can establish a handler which is always invoked upon
procedure exit, regardless of whether the procedure exits using a
.I return
or an exception raised to a handler established
prior
to the invocation of the exiting procedure.
.LP
.B exc_handle(\|)
is used to establish an exception handler.
.B exc_handle(\|)
returns 0 to indicate that a handler has
been established.
A return of \-1 indicates an error in trying to
establish the exception handler.
If it returns something else, an exception has occurred
and any procedure calls deeper than the one containing the handler
have disappeared.
All exception handlers established by a procedure are automatically
discarded when the procedure terminates.
.LP
.B exc_handle(\|)
binds a
.I pattern
to the handler,
where a pattern is an integer, and two patterns
.I match
if their values are equal.
When an exception is raised with
.BR exc_raise ,
the most recent handler
that has established a matching pattern will catch the exception.
A special pattern (\s-1CATCHALL\s0) is provided which matches any
.B exc_raise(\|)
pattern.
This is useful for handlers which know that there is no chance
the resources allocated in a routine can be reclaimed
by previous routines in the call chain.
.LP
The other two arguments to
.B exc_handle(\|)
are a function and an argument to that function.
.B exc_bound(\|)
retrieves these arguments from an
.B exc_handle(\|)
call made by the specified thread.  By using
.B exc_bound(\|)
to retrieve and call
a function bound by the exception handler, a procedure can raise a
.I notification exception
which allows control to return to
the raiser of the exception after the exception is handled.
.LP
.B exc_raise(\|)
allows the caller to transfer control
(do a non-local goto) to the matching
.BR exc_handle .
This matching exception handler is destroyed after the control transfer.
At this time, it behaves as if
.B exc_handle(\|)
returns with the
.I pattern
from
.B exc_raise(\|)
as the return value.  Note:
.I func
of
.B exc_handle(\|)
is not called using
.B exc_raise(\|)
\(em it is only there for notification exceptions.
Because the exception handler returns the pattern that invoked it,
it is possible for a handler that matches the
.SM CATCHALL
pattern to
.I reraise
the exact exception it caught by using
.B exc_raise(\|)
on the caught pattern.
It is illegal to handle or raise the pattern 0
or the pattern \-1.
Handlers are searched for pattern matches in the reverse execution order
that they are set (i.e., the most recently established handler is
searched first).
.LP
.B exc_unhandle(\|)
destroys the most recently established
exception handler set by the current thread.
It is an error to destroy an exit-handler set up by
.BR exc_on_exit .
When a procedure exits, all handlers and exit handlers set in the
procedure are automatically deallocated.
.LP
.B exc_notify(\|)
is a convenient way to use
.BR exc_bound .
The function which is bound to
.I pattern
is retrieved.
If the function is not
.SM NULL\s0,
the function is called with
the associated argument and the result is returned.
If the function is
.SM NULL\s0,
.BI exc_raise( pattern )
is returned.
.LP
.B exc_on_exit(\|)
specifies an exit procedure and argument
to be passed to the exit procedure, which is called when the procedure
which sets an exit handler using
.B exc_on_exit(\|)
exits.  The exit procedures (more than one may
be set) will be called regardless if the
setting procedure is exited using a
.I return
or an
.BR exc_raise .
Because the exit procedure is called as if the handling
procedure had returned, the argument
passed to it should not contain
addresses on the handler's stack.
However, any value returned by the procedure which established
the exit procedure is
preserved no matter what the exit procedure returns.
This primitive is used in the
.SM MONITOR
macro to enforce the monitor discipline on procedures.
.\" no exc_off_exit; don't want a way to screw
.\" .SM MONITOR
.\" inadvertently (easier to prove/understand things about programs this way).
.LP
Some
signals can be considered to be synchronous traps.
They are usually the starred (*) signals in the
.BR signal (3)
man pages.
These are:
.B \s-1SIGSYS\s0,
.B \s-1SIGBUS\s0,
.B \s-1SIGEMT\s0,
.B \s-1SIGFPE\s0,
.B \s-1SIGILL\s0,
.B \s-1SIGTRAP\s0,
.B \s-1SIGSEGV\s0.
If an
event is marked as a trap using
.B agt_trap
(see
.BR agt_create (3L))
the event will generate exceptions instead of agent messages.
This mapping is per-pod, not per-thread.
A thread which handles the signal number of one of these as the
pattern for
.B exc_handle(\|)
will catch such a signal as an exception.
The exception will be raised as an
.B exc_notify(\|)
so either escape or
notification style exceptions can be used, depending on what the matching
.B exc_handle(\|)
provides.
If the exception is not handled, the thread will terminate.
Note: it can be dangerous to supply an exception handler to treat
stack overflow since the client's stack is used in raising the exception.
.\" if we allow only escape exceptions there could be a way around this
.\" since the stack could be asserted to be valid at the time of the exc_handle.
.\" Then, a trap simply causes a change in context to the point of the exc_handle.
.LP
.B exc_uniqpatt(\|)
returns an exception pattern that is not any of
the
pre-defined patterns (any of the synchronous exceptions or \-1 or
.SM CATCHALL\s0).
Each call to
.B exc_uniqpatt(\|)
results in a different pattern.  If
.B exc_uniqpatt(\|)
cannot guarantee uniqueness, \-1 is returned instead the
.I first
time this happens.
Subsequent calls after this error result in patterns which may be duplicates.
.SH RETURN VALUE
.LP
.B exc_uniqpatt(\|)
returns \-1 the
.I first
time it fails.
Otherwise, it returns a unique pattern.
.LP
When
.B exc_handle(\|)
is called, a return value of 0 indicates success
and \-1 indicates error.  When
.B exc_handle(\|)
returns because of a matching
.B exc_raise(\|)
call, it returns the
.I pattern
raised by
.BR exc_raise .
.LP
Upon successful completion,
.B exc_raise(\|)
transfers control to the matching
.B exc_handle(\|)
and does not return.  If there is an error,
.B exc_raise(\|)
returns \-1.
.LP
Upon successful completion,
.B exc_unhandle(\|)
returns 0.  It returns
\-1 if there is an error.
.LP
.B exc_bound(\|)
returns a pointer to a function or 0 if no
function was bound.
.LP
Upon successful completion,
.B exc_notify(\|)
returns the return value
of a function or transfers control to a matching
.B exc_handle(\|)
and does not return.  It returns \-1 if there is an error.
.LP
.B exc_on_exit(\|)
returns 0.
.br
.ne 5
.SH ERRORS
.LP
.B exc_unhandle(\|)
will fail if one or more of the following is true:
.TP 20
.SM LE_NONEXIST
Attempt to remove an exit handler or a non-existent handler.
.LP
.B exc_raise(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NONEXIST
No context found to raise an exception to.
.TP
.SM LE_INVALIDARG
Attempt to raise an illegal pattern (\-1 or 0).
.LP
.B exc_handle(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
Attempt to handle an illegal pattern (\-1 or 0).
.LP
.B exc_uniqpatt(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_REUSE
Possible reuse of existing object.
.SEE ALSO
.BR agt_create (3L)
.SH BUGS
.LP
The stack may not contain useful information after
an exception has been caught so post-exception debugging
can be difficult.
The reason for this is that a given handler
may call procedures that trash the stack before reraising
an exception.
.LP
.\" Traps now require exceptions to be part of nugget
The distinction between traps and interrupts can be problematical.
.\" for instance,
.\" .SM FP
.\" coprocessor that gets ahead of
.\" .SM CPU
.\" should be interrupt.
.LP
The environment restored on
.B exc_raise(\|)
consists of the registers at the time of the
.BR exc_handle .
As a result, modifications to register variables between the times of
.B exc_handle(\|)
and
.B exc_raise(\|)
will not be seen.
This problem does not occur in the sun4 implementation.
.\" not true on risc and not needed to be true on vax
.\" still have scope problem in that the environment you see on
.\" excraise looks different than the one you save.
.SH WARNINGS
.LP
.B exc_on_exit(\|)
passes a simple type as an argument to the exit
routine. If you need to pass a complex type, such as a
.IR thread_t ,
.IR mon_t ,
or
.IR cv_t ,
pass a pointer to the object instead.
.\" could provide extra args, for instance, a union of these types in addition to arg
 is also possible to
.I notify
an exception handler whereby a function supplied by
the exception handler is invoked and con./share/man/man3/execl.3                                                                               755       0      12        11066  4424741156  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)execl.3 1.20 89/03/27 SMI; from UCB 4.2
.TH EXECL 3 "18 February 1988"
.SH NAME
execl, execv, execle, execlp, execvp \- execute a file
.SH SYNOPSIS
.nf
.B "execl(name, arg0, arg1, .\|.\|.\|, argn, (char *)0)"
.B "char *name, *arg0, *arg1, .\|.\|.\|, *argn;"
.LP
.B "execv(name, argv)"
.B "char *name, *argv[ ];"
.LP
.B "execle(name, arg0, arg1, .\|.\|.\|, argn, (char *)0, envp)"
.B "char *name, *arg0, *arg1, .\|.\|.\|, *argn, *envp[ ];"
.LP
.B "execlp(name, arg0, arg1, .\|.\|.\|, argn, (char *)0)"
.B "char *name, *arg0, *arg1, .\|.\|.\|, *argn;"
.LP
.B "execvp(name, argv)"
.B "char *name, *argv[ ];"
.LP
.B extern char **environ;
.fi
.IX  "execl function"  ""  "\fLexecl\fP \(em execute file"
.IX  "execute file"  "execl function"  ""  \fLexecl\fP
.IX  "execv function"  ""  "\fLexecv\fP \(em execute file"
.IX  "execute file"  "execv function"  ""  \fLexecv\fP
.IX  "execle function"  ""  "\fLexecle\fP \(em execute file"
.IX  "execute file"  "execle function"  ""  \fLexecle\fP
.IX  "execlp function"  ""  "\fLexeclp\fP \(em execute file"
.IX  "execute file"  "execlp function"  ""  \fLexeclp\fP
.IX  "execvp function"  ""  "\fLexecvp\fP \(em execute file"
.IX  "execute file"  "execvp function"  ""  \fLexecvp\fP
.IX  "environ function"  ""  "\fLenviron\fP \(em execute file"
.IX  "execute file"  "environ function"  ""  \fLenviron\fP
.IX  "execute file"
.SH DESCRIPTION
These routines provide various interfaces to the
.B execve(\|)
system call.  Refer to
.BR execve (2)
for a description of their properties; only
brief descriptions are provided here.
.LP
.B exec
in all its forms overlays the calling process with the named file, then
transfers to the entry point of the core image of the file.  There can
be no return from a successful exec; the calling core image is lost.
.LP
The
.I filename
argument is a pointer to the name of the file to be executed.  The
pointers
.IR arg [0],
.IR arg [1]\|.\|.\|.
address
.SM NULL\s0-terminated
strings.  Conventionally
.IR arg [0]
is the name of the file.
.LP
Two interfaces are available.
.B execl(\|)
is useful when a known file with known arguments is being called; the
arguments to
.B execl(\|)
are the character strings constituting the file and the arguments; the
first argument is conventionally the same as the file name (or its last
component).  A 
.B (char *)0
argument must end the argument list.  The cast to type
.B char *
insures portability.
.LP
The
.B execv(\|)
version is useful when the number of arguments is unknown in advance;
the arguments to
.B execv(\|)
are the name of the file to be executed and a vector of strings
containing the arguments.  The last argument string must be followed by
a 0 pointer.
.LP
When a C program is executed,
it is called as follows:
.IP
.ft B
.nf
main(argc, argv, envp)
int argc;
char **argv, **envp;
.ft R
.fi
.LP
where
.I argc
is the argument count and
.I argv
is an array of character pointers to the arguments themselves.  As
indicated,
.I argc
is conventionally at least one and the first member of the array points
to a string containing the name of the file.
.LP
.I argv
is directly usable in another
.B execv(\|)
because
.IR argv [ argc ]
is 0.
.LP
.I envp
is a pointer to an array of strings that constitute the
.I environment
of the process.  Each string consists of a name, an
.RB ` = ',
and a
.SM NULL\s0-terminated
value.  The array of pointers is terminated by a
.SM NULL
pointer.  The shell
.BR sh (1)
passes an environment entry for each global shell variable defined when
the program is called.  See
.BR environ (5V)
for some conventionally used names.  The C run-time start-off routine
places a copy of
.I envp
in the global cell
.IR environ ,
which is used by
.B execv(\|)
and
.B execl(\|)
to pass the environment to any subprograms executed by the current
program.
.LP
.B execlp(\|)
and
.B execvp(\|)
are called with the same arguments as
.B execl(\|)
and
.BR execv ,
but duplicate the shell's actions in searching for an executable file
in a list of directories.  The directory list is obtained from the
environment.
.SH FILES
.PD 0
.TP 20
.B /usr/bin/sh
shell, invoked if command file found
by
.B execlp(\|)
or
.B execvp(\|)
.PD
.SH "SEE ALSO"
.BR csh (1),
.BR sh (1),
.BR execve (2),
.BR fork (2),
.BR a.out (5),
.BR environ (5V)
.LP
.TX PUL
.SH DIAGNOSTICS
If the file cannot be found, if it is not executable, if it does not
start with a valid magic number (see
.BR a.out (5)),
if maximum memory is exceeded, or if the arguments require too much
space, a return constitutes the diagnostic; the return value is \-1.
Even for the super-user, at least one of the execute-permission bits
must be set for a file to be executed.
ned.
If the function is
.SM NULL\s0,
.BI exc_raise( pattern )
is returned.
.LP
.B exc_on_exit(\|)
specifies an exit procedure and argument
to be passed to the exit procedure, which is called when the procedure
which sets an exit handler using
.B exc_on_exit(\|)
exits.  The exit procedures (more than one may
be set) will be called regardless if the
setting procedure is exited using a
.I return
or an
.BR exc_raise .
Because the exit procedure is called as ./share/man/man3/exc_notify.3l                                                                         755       0      12           77  4424741155  11264                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_notify.3l 1.3 89/03/27 SMI;
  exc_raise.3l    `    exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3        execlp.3        execv.3       execvp.3        exit.3 c      exp.3m c      exp10.3m        exp2.3m       expm1.3m    0    exportent.3   P   $ extended_to_decimal.3 te  `    fabs.3m   t    	fclose.3s t      
fconvert.3       fcvt.3 3      fdate.3   ./share/man/man3/exc_on_exit.3l                                                                        755       0      12          100  4424741155  11424                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_on_exit.3l 1.3 89/03/27 SMI;
  exc_unhandle.3l   x    exc_uniqpatt.3l       execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ extended_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at    ./share/man/man3/exc_raise.3l                                                                          755       0      12           76  4424741155  11056                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_raise.3l 1.3 89/03/27 SMI;
  exc_uniqpatt.3l       execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ extended_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at      	fdopen.3v .3      ./share/man/man3/exc_unhandle.3l                                                                       755       0      12          101  4424741155  11556                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_unhandle.3l 1.3 89/03/27 SMI;
 execle.3 att      execlp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ extended_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at      	fdopen.3v .3      feof.3s       feof.3v ./share/man/man3/exc_uniqpatt.3l                                                                       755       0      12          101  4424741155  11625                                                                                                                                                                                                                                                                                                                                                                      .so man3/exc_handle.3l
.\" @(#)exc_uniqpatt.3l 1.3 89/03/27 SMI;
xeclp.3 e.3      execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ extended_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at      	fdopen.3v .3      feof.3s       feof.3v        ffs.3      ./share/man/man3/execle.3                                                                              755       0      12           65  4424741156  10204                                                                                                                                                                                                                                                                                                                                                                      .so man3/execl.3
.\" @(#)execle.3 1.6 89/03/27 SMI; 
   execv.3       execvp.3 xec      exit.3 c      exp.3m       exp10.3m xp.      exp2.3m       expm1.3m xp2  0    exportent.3   P   $ extended_to_decimal.3   `    fabs.3m   t    	fclose.3s bs      
fconvert.3 3      fcvt.3 n      fdate.3       	fdopen.3s at      	fdopen.3v .3      feof.3s       feof.3v        ffs.3        	ferror.3s s.  (    	./share/man/man3/execlp.3                                                                              755       0      12           65  4424741156  10217                                                                                                                                                                                                                                                                                                                                                                      .so man3/execl.3
.\" @(#)execlp.3 1.6 89/03/27 SMI; 
 execvp.3 .3       exit.3 3      exp.3m t      exp10.3m m       exp2.3m       expm1.3m 3m   0    exportent.3   P   $ extended_to_decimal.3    `    fabs.3m   t    	fclose.3s m       
fconvert.3 s      fcvt.3 t      fdate.3       	fdopen.3s 3       	fdopen.3v at      feof.3s       feof.3v        ffs.3 of      	ferror.3s    (    	ferror.3v s.  <    ./share/man/man3/execv.3                                                                               755       0      12           64  4424741156  10050                                                                                                                                                                                                                                                                                                                                                                      .so man3/execl.3
.\" @(#)execv.3 1.6 89/03/27 SMI; 
  exit.3 3      exp.3m t      exp10.3m m t      exp2.3m       expm1.3m 3m   0    exportent.3   P   $ extended_to_decimal.3    `    fabs.3m   t    	fclose.3s m       
fconvert.3        fcvt.3 t      fdate.3       	fdopen.3s 3       	fdopen.3v 3       feof.3s       feof.3v        ffs.3 of      	ferror.3s of  (    	ferror.3v    <    fetch.3x  s.  P    	./share/man/man3/execvp.3                                                                              755       0      12           65  4424741156  10231                                                                                                                                                                                                                                                                                                                                                                      .so man3/execl.3
.\" @(#)execvp.3 1.6 89/03/27 SMI; 
 exp.3m 3      exp10.3m        exp2.3m       expm1.3m    0    exportent.3   P   $ extended_to_decimal.3 te  `    fabs.3m   t    	fclose.3s t      
fconvert.3       fcvt.3        fdate.3       	fdopen.3s       	fdopen.3v       feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d  ./share/man/man3/exit.3                                                                                755       0      12         1311  4424741156   7743                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exit.3 1.10 89/03/27 SMI; from UCB 4.2
.TH EXIT 3 "6 October 1987"
.SH NAME
exit \- terminate a process after performing cleanup
.SH SYNOPSIS
.nf
.B exit(status)
.B int status;
.fi
.IX  "exit function"  ""  "\fLexit\fP \(em terminate process"
.IX  "terminate process"  ""  "terminate process \(em \fLexit\fP"
.IX  process  "terminate and cleanup"  process  "terminate and cleanup \(em \fLexit\fP"
.SH DESCRIPTION
.LP
.B exit(\|)
terminates a process by calling
.BR exit (2)
after calling any termination handlers named by calls to
.BR on_exit .
Normally, this is just the Standard I/O library function
.BR _cleanup .
.B exit(\|)
never returns.
.SH "SEE ALSO"
.BR exit (2),
.BR intro (3S),
.BR on_exit (3)
  file_to_decimal.3   <    	fileno.3s    P    	fileno.3v <  d    	finite.3m P  x    firstkey.3x       
fixterm.3v        flash.3v v      $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    ./share/man/man3/exp.3m                                                                                755       0      12         6216  4424741157   7755                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exp.3m 1.18 89/03/27 SMI; from UCB 4.3 BSD
.TH EXP 3M "21 January 1988"
.SH NAME
exp, expm1, exp2, exp10, log, log1p, log2, log10, pow \- exponential, logarithm, power
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double exp(x)
.B double x;
.LP
.B double expm1(x)
.B double x;
.LP
.B double exp2(x)
.B double x;
.LP
.B double exp10(x)
.B double x;
.LP
.B double log(x)
.B double x;
.LP
.B double log1p(x)
.B double x;
.LP
.B double log2(x)
.B double x;
.LP
.B double log10(x)
.B double x;
.LP
.B double pow(x, y)
.B double x, y;
.fi
.SH DESCRIPTION
.B exp(\|)
returns the exponential function 
.IR e**x .
.IX  "exp function"  ""  "\fLexp\fP \(em exponential function"
.IX  "expm1 function"  ""  "\fLexpm1\fP \(em exponential function"
.IX  "exp2 function"  ""  "\fLexp2\fP \(em exponential function"
.IX  "exp10 function"  ""  "\fLexp10\fP \(em exponential function"
.IX  "mathematical functions"  exp  ""  "\fLexp\fP \(em exponential"
.IX  "exponential function exp"  ""  "exponential function \(em \fLexp\fP"
.LP
.B expm1(\|)
returns
.I e**x\-1
accurately even for tiny
.IR x .
.LP
.B exp2(\|)
and
.B exp10(\|)
return 
.I 2**x 
and 
.I 10**x 
respectively.
.LP
.B log(\|)
returns the natural logarithm of
.IR x .
.IX  "log function"  ""  "\fLlog\fP \(em natural logarithm"
.IX  "log1p function"  ""  "\fLlog1p\fP \(em natural logarithm"
.IX  "mathematical functions"  log  ""  "\fLlog\fP \(em natural logarithm"
.IX  "natural logarithm log"  ""   "natural logarithm \(em \fLlog\fP"
.IX  "logarithm, natural log"  ""   "logarithm, natural \(em \fLlog\fP"
.LP
.B log1p(\|)
returns log(1+x) accurately even for tiny
.IR x .
.LP
.B log2(\|)
and
.B log10(\|)
return the logarithm to base 2 and 10 respectively.
.IX  "log2 function"  ""  "\fLlog2\fP \(em logarithm, base 2"
.IX  "mathematical functions"  log2  ""  "\fLlog2\fP \(em logarithm, base 2"
.IX  "logarithm, base 2 log2"  ""  "logarithm, base 2 \(em \fLlog2\fP"
.IX  "log10 function"  ""  "\fLlog10\fP \(em logarithm, base 10"
.IX  "mathematical functions"  log10  ""  "\fLlog10\fP \(em logarithm, base 10"
.IX  "logarithm, base 10 log10"  ""  "logarithm, base 10 \(em \fLlog10\fP"
.LP
.B pow(\|)
returns
.IR  x**y .
.BI pow( x ,0.0)
is 1 for all x, in conformance with 4.3\s-1BSD\s0,
as discussed in the
.TX FPOINT .
.IX  "pow function"  ""  "\fLpow\fP \(em raise to power"
.IX  "mathematical functions"  pow  ""  "\fLpow\fP \(em raise to power"
.IX  "power function pow"  ""  "power function \(em \fLpow\fP"
.SH "SEE ALSO"
.BR matherr (3M)
.SH DIAGNOSTICS
All these functions handle exceptional arguments in the spirit of
.SM ANSI/IEEE
Std 754-1985.  Thus
for x == \(+-0,
.BI log( x )
is \-\(if with a division by zero exception;
for x < 0, including \-\(if,
.BI log( x )
is a quiet NaN with an invalid operation exception;
for x == +\(if or a quiet NaN,
.BI log( x )
is x without exception;
for x a signaling NaN,
.BI log( x )
is a quiet NaN with an invalid operation exception;
for x == 1,
.BI log( x )
is 0 without exception;
for any other positive x,
.BI log( x )
is a normalized number with an inexact exception.
.LP
In addition,
.BR exp , exp2 , exp10 ,
.BR log , log2 , log10 ,
and
.B pow(\|)
may also set
.B errno
and call
.BR matherr (3M).
.LP
.B log(\|)
returns the natural logarithm of
.IR x .
.IX  "log function"  ""  "\fLlog\fP \(em natural logarithm"
.IX  "log1p function"  ""  "\fLlog1p\fP \(em natural logarithm"
.IX  "mathematical functions"  log  ""  "\fLlog\fP \(em natural logarithm"
.IX  "natural logarithm log"  ""   "natural logarithm \(em \fLlog\fP"
.IX  "logarithm, natural log"  ""   "logarith./share/man/man3/exp10.3m                                                                              755       0      12           63  4424741157  10050                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)exp10.3m 1.3 89/03/27 SMI;
  expm1.3m    0    exportent.3   P   $ extended_to_decimal.3 te  `    fabs.3m   t    	fclose.3s t      
fconvert.3       fcvt.3       fdate.3       	fdopen.3s       	fdopen.3v       feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3./share/man/man3/exp2.3m                                                                               755       0      12           62  4424741157   7770                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)exp2.3m 1.3 89/03/27 SMI;
  exportent.3   P   $ extended_to_decimal.3    `    fabs.3m   t    	fclose.3s m       
fconvert.3 t      fcvt.3 t      fdate.3       	fdopen.3s 3       	fdopen.3v       feof.3s       feof.3v        ffs.3 of      	ferror.3s v   (    	ferror.3v   <    fetch.3x  (  P    	fflush.3s <  d    fgetc.3s  P  x    fgetc.3v  d      fgetgraent.3        fgetgren./share/man/man3/expm1.3m                                                                              755       0      12           63  4424741157  10145                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)expm1.3m 1.3 89/03/27 SMI;
P   $ extended_to_decimal.3 te  `    fabs.3m   t    	fclose.3s t      
fconvert.3       fcvt.3 t      fdate.3       	fdopen.3s       	fdopen.3v       feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3        fgetgrent.3       fget./share/man/man3/exportent.3                                                                           755       0      12         5672  4424741157  11041                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exportent.3 1.11 89/03/27 SMI;
.TH EXPORTENT 3 "4 January 1987"
.SH NAME
exportent, getexportent, setexportent, addexportent, remexportent, endexportent, getexportopt \- get exported file system information
.SH SYNOPSIS
.nf
.ft B
#include <stdio.h>
#include <exportent.h>
\s-1FILE\s0 *setexportent(\|)
struct exportent *getexportent(filep)
	\s-1FILE\s0 *filep;
int addexportent(filep, dirname, options)
	\s-1FILE\s0 *filep;
	char *dirname;
	char *options;
int remexportent(filep, dirname)
	\s-1FILE\s0 *filep;
	char *dirname;
char *getexportopt(xent, opt)
	struct exportent *xent;
	char *opt;
void endexportent(filep)
	\s-1FILE\s0 *filep;
.ft R
.fi
.SH DESCRIPTION
.IX "exportent function" "" "\fLexportent()\fP function"
.IX "getexportent function" "" "\fLgetexportent()\fP function"
.IX "setexportent function" "" "\fLsetexportent()\fP function"
.IX "addexportent function" "" "\fLaddexportent()\fP function"
.IX "remexportent function" "" "\fLremexportent()\fP function"
.IX "endexportent function" "" "\fLendexportent()\fP function"
.IX "getexportopt function" "" "\fLgetexportopt()\fP function"
.LP
These routines access the exported filesystem information in
.BR /etc/xtab .
.LP
.B setexportent(\|)
opens the export information file and returns
a file pointer to use with
.BR getexportent ,
.BR addexportent ,
.BR remexportent ,
and
.BR endexportent .
.B getexportent(\|)
reads the next line from
.I filep
and returns a pointer to an object with the following structure
containing the broken-out fields of a line in the file,
.B /etc/xtab
The fields have meanings described in
.BR exports (5).
.LP
.RS
.ft B
.nf
#define \s-1ACCESS_OPT\s0  ``access''  /* machines that can mount fs */
#define \s-1ROOT_OPT\s0    ``root''    /* machines with root access of fs */
#define \s-1RO_OPT\s0      ``ro''      /* export read-only */
#define \s-1ANON_OPT\s0    ``anon''    /* uid for anonymous requests */
#define \s-1SECURE_OPT\s0  ``secure''  /* require secure NFS for access */
#define \s-1WINDOW_OPT\s0  ``window''  /* expiration window for credential */
struct exportent {
	char *xent_dirname;	/* directory (or file) to export */
	char *xent_options;	/* options, as above */
};
.fi
.ft R
.RE
.LP
.B addexportent(\|)
adds the
.B exportent(\|)
to the end of the open file
.IR filep .
It returns 0 if successful and  \-1 on failure.
.B remexportent(\|)
removes the indicated entry from the list.  It also returns 0 on
success and \-1 on failure.
.B getexportopt(\|)
scans the
.I xent_options
field of the
.B exportent(\|)
structure for a substring that matches
.IR opt .
It returns the string value of
.IR opt ,
or
.SM NULL
if the option is not found.
.LP
.B endexportent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/exports
.TP
.B /etc/xtab
.PD
.SH SEE ALSO
.BR exports (5),
.BR exportfs (8)
.br
.ne 5
.SH DIAGNOSTICS
.LP
.SM NULL
pointer (0) returned on
.SM EOF
or error.
.SH BUGS
.LP
The returned
.B exportent(\|)
structure points to static information that is overwritten in each call.
n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -./share/man/man3/extended_to_decimal.3                                                                 755       0      12          117  4424741157  12736                                                                                                                                                                                                                                                                                                                                                                      .so man3/floating_to_decimal.3
.\" @(#)extended_to_decimal.3 1.3 89/03/27 SMI;
       
fconvert.3        fcvt.3 t      fdate.3       	fdopen.3s 3       	fdopen.3v 3       feof.3s       feof.3v        ffs.3 of      	ferror.3s of  (    	ferror.3v v   <    fetch.3x    P    	fflush.3s (  d    fgetc.3s  <  x    fgetc.3v  P      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       ./share/man/man3/fabs.3m                                                                               755       0      12           76  4424741160  10024                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)fabs.3m 1.7 89/03/27 SMI; 
rt.3 	      fcvt.3       fdate.3       	fdopen.3s       	fdopen.3v  	      feof.3s       feof.3v        ffs.3       	ferror.3s   (    	ferror.3v  	  <    fetch.3x  	  P    	fflush.3s    d    fgetc.3s  	  x    fgetc.3v        fgetgraent.3 get      fgetgrent.3       fgetpwaent.3 get      fgetpwent.3       fgetpwent.3v get      fgets.3s./share/man/man3/fclose.3s                                                                             755       0      12         2272  4424741160  10432                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fclose.3s 1.11 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FCLOSE 3S  "6 October 1987"
.SH NAME
fclose, fflush \- close or flush a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B fclose(stream)
.B \s-1FILE\s0 *stream;
.LP
.B fflush(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "fclose function"  ""  "\fLfclose\fP \(em close stream"
.IX  "close stream"  ""  "close stream \(em \fLfclose\fP"
.IX  stream  "close \(em \fLfclose\fP"
.IX  "fflush function"  ""  "\fLfflush\fP \(em flush stream"
.IX  "flush stream"  ""  "flush stream \(em \fLfflush\fP"
.IX  stream  "flush \(em \fLfflush\fP"
.SH DESCRIPTION
.B fclose(\|)
writes out any buffered data for the named
stream, and closes the named stream.
Buffers allocated by the standard input/output system
are freed.
.LP
.B fclose(\|)
is performed automatically for all open files upon
calling
.BR exit (3).
.LP
.B fflush(\|)
writes out any buffered data for the named output
stream.
The named stream remains open.
.SH "SEE ALSO"
.BR close (2),
.BR exit (3),
.BR fopen (3S),
.BR setbuf (3S)
.SH DIAGNOSTICS
These functions return 0 for success, and
.SM EOF
if any error (such as trying to write to a file that has not been opened
for writing) was detected.
  ftime.3c  `  p    ftok.3       ftw.3         func_to_decimal.3        	fwrite.3s       gamma.3m        gcd.3x 	      
gconvert.3        gcvt.3       get.3         get.3r    <     get_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x./share/man/man3/fconvert.3                                                                            755       0      12           71  4424741160  10555                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)fconvert.3 1.3 89/03/27 SMI;
date.3       	fdopen.3s 3       	fdopen.3v       feof.3s       feof.3v        ffs.3 of      	ferror.3s v   (    	ferror.3v   <    fetch.3x  (  P    	fflush.3s <  d    fgetc.3s  P  x    fgetc.3v  d      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_./share/man/man3/fcvt.3                                                                                755       0      12           66  4424741160   7675                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)fcvt.3 1.6 89/03/27 SMI; 
open.3s 3       	fdopen.3v 3       feof.3s       feof.3v        ffs.3 of      	ferror.3s of  (    	ferror.3v v   <    fetch.3x    P    	fflush.3s (  d    fgetc.3s  <  x    fgetc.3v  P      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	./share/man/man3/fdate.3                                                                               755       0      12         2035  4424741160  10054                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)fdate.3 1.8 89/03/27 SMI; from UCB 6.2 5/27/86
.TH FDATE 3F "6 October 1987"
.SH NAME
fdate \- return date and time in an ASCII string
.SH SYNOPSIS
.nf
.B subroutine fdate(string)
.B character*24 string
.LP
.B character*24 function fdate(\|)
.fi
.SH DESCRIPTION
.IX "fdate function" "" "\fLfdate\fR \(em return date and time in \s-1ASCII\s0 format"
.IX "date and time display \(em \fLfdate\fR"
.LP
.B fdate(\|)
returns the current date and time as a 24 character string
in the format described under
.BR ctime (3).
Neither
.SM NEWLINE
nor
.SM NULL
will be included.
.LP
.B fdate(\|)
can be called either as a function or as a subroutine.
If called as a function, the calling routine must define
its type and length. For example:
.LP
.RS
.nf
.ft B
character*24   fdate
.BR write (*,*) fdate(\|)
.ft R
.fi
.RE
.SH "SEE ALSO"
.BR ctime (3),
.BR time (3F)
scanf.3s   $    	fscanf.3v $  8    fseek.3s  8  L    ftell.3s  L  `    ftime.3c  `  p    ftok.3 8      ftw.3  c       func_to_decimal.3        	fwrite.3s       gamma.3m        gcd.3x       
gconvert.3        gcvt.3 m      get.3  t       get.3r t  <     get_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflag./share/man/man3/fdopen.3s                                                                             755       0      12           67  4424741160  10372                                                                                                                                                                                                                                                                                                                                                                      .so man3/fopen.3s
.\" @(#)fdopen.3s 1.6 89/03/27 SMI; 
  feof.3s       feof.3v        ffs.3 v       	ferror.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3   (     file_to_decimal.3    <    	fileno.3s <  P    	fileno.3v P  d./share/man/man3/fdopen.3v                                                                             755       0      12           67  4424741161  10376                                                                                                                                                                                                                                                                                                                                                                      .so man3/fopen.3v
.\" @(#)fdopen.3v 1.6 89/03/27 SMI; 
feof.3v        ffs.3 of      	ferror.3s v   (    	ferror.3v   <    fetch.3x  (  P    	fflush.3s <  d    fgetc.3s  P  x    fgetc.3v  d      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s    P    	fileno.3v <  d    	finite.3m P  x./share/man/man3/feof.3s                                                                               755       0      12           66  4424741161  10036                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3s
.\" @(#)feof.3s 1.6 89/03/27 SMI; 
s.3 of      	ferror.3s of  (    	ferror.3v v   <    fetch.3x    P    	fflush.3s (  d    fgetc.3s  <  x    fgetc.3v  P      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v    d    	finite.3m <  x    firstkey.3x   ./share/man/man3/feof.3v                                                                               755       0      12           65  4424741161  10040                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3v
.\" @(#)feof.3v 1.4 89/03/27 SMI;
error.3s   (    	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3   (     file_to_decimal.3    <    	fileno.3s <  P    	fileno.3v P  d    	finite.3m d  x    firstkey.3x       
fixterm.3v ./share/man/man3/ffs.3                                                                                 755       0      12           64  4424741162   7511                                                                                                                                                                                                                                                                                                                                                                      .so man3/bstring.3
.\" @(#)ffs.3 1.6 89/03/27 SMI; 
  	ferror.3v (  <    fetch.3x  <  P    	fflush.3s P  d    fgetc.3s  d  x    fgetc.3v  x      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3   (     file_to_decimal.3    <    	fileno.3s <  P    	fileno.3v P  d    	finite.3m d  x    firstkey.3x       
fixterm.3v       flash.3v./share/man/man3/ferror.3s                                                                             755       0      12         4700  4424741161  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ferror.3s 1.16 89/03/27 SMI; from S5R2
.TH FERROR 3S  "6 October 1987"
.SH NAME
ferror, feof, clearerr, fileno \- stream status inquiries
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B ferror(stream)
.B \s-1FILE\s0 *stream;
.LP
.B feof(stream)
.B \s-1FILE\s0 *stream;
.LP
.B clearerr(stream)
.B \s-1FILE\s0 *stream;
.LP
.B fileno(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "ferror function"  ""  "\fLferror\fP \(em inquire error on stream"
.IX  "stream status enquiries"  "ferror"  ""  "\fLferror\fP \(em inquire error on stream"
.IX  "enquire stream status"  "ferror"  ""  "\fLferror\fP \(em inquire error on stream"
.IX  "inquire stream status"  "ferror"  ""  "\fLferror\fP \(em inquire error on stream"
.IX  "feof function"  ""  "\fLfeof\fP \(em enquire EOF on stream"
.IX  "stream status enquiries"  "feof"  ""  "\fLfeof\fP \(em enquire EOF on stream"
.IX  "enquire stream status"  "feof"  ""  "\fLfeof\fP \(em enquire EOF on stream"
.IX  "inquire stream status"  "feof"  ""  "\fLfeof\fP \(em enquire EOF on stream"
.IX  "clearerr function"  ""  "\fLclearerr\fP \(em clear error on stream"
.IX  "stream status enquiries"  "clearerr"  ""  "\fLclearerr\fP \(em clear error on stream"
.IX  "enquire stream status"  "clearerr"  ""  "\fLclearerr\fP \(em clear error on stream"
.IX  "inquire stream status"  "clearerr"  ""  "\fLclearerr\fP \(em clear error on stream"
.IX  "fileno function"  ""  "\fLfileno\fP \(em get stream descriptor number"
.IX  "stream status enquiries"  "fileno"  ""  "\fLfileno\fP \(em get stream descriptor number"
.IX  "enquire stream status"  "fileno"  ""  "\fLfileno\fP \(em get stream descriptor number"
.IX  "inquire stream status"  "fileno"  ""  "\fLfileno\fP \(em get stream descriptor number"
.SH DESCRIPTION
.B ferror(\|)
returns non-zero when an error has occurred reading from or writing to
the named stream,
otherwise zero.  Unless cleared by
.BR clearerr ,
the error indication lasts until the stream is closed.
.LP
.B feof(\|)
returns non-zero when
.SM EOF
has previously been detected reading the named input
stream,
otherwise zero.  Unless cleared by
.BR clearerr ,
the
.SM EOF
indication lasts until the stream is closed.
.LP
.B clearerr(\|)
resets the error indication and
.SM EOF
indication to zero on the named
stream.
.LP
.B fileno(\|)
returns the integer file descriptor associated with the
stream;
see
.BR open (2V).
.SH NOTE
All these functions are implemented as macros;
they cannot be redeclared.
.SH "SEE ALSO"
.BR open (2V),
.BR fopen (3S)
  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3   ./share/man/man3/ferror.3v                                                                             755       0      12         5621  4424741161  10463                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ferror.3v 1.10 89/03/27 SMI; from S5R2
.TH FERROR 3V  "18 November 1987"
.SH NAME
ferror, feof, clearerr, fileno \- stream status inquiries
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B ferror(stream)
.B \s-1FILE\s0 *stream;
.LP
.B feof(stream)
.B \s-1FILE\s0 *stream;
.LP
.B clearerr(stream)
.B \s-1FILE\s0 *stream;
.LP
.B fileno(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "ferror function V"  ""  "\fLferror\fP \(em inquire error on stream, System V"
.IX  "stream status enquiries" "ferror V" ""  "\fLferror\fP \(em inquire error on stream, System V"
.IX  "enquire stream status"  "ferror V"  ""  "\fLferror\fP \(em inquire error on stream, System V"
.IX  "inquire stream status"  "ferror V"  ""  "\fLferror\fP \(em inquire error on stream, System V"
.IX  "clearerr function V"  ""  "\fLclearerr\fP \(em clear error on stream, System V"
.IX  "feof function V"  ""  "\fLfeof\fP \(em enquire EOF on stream, System V"
.IX  "stream status enquiries"  "feof V"  ""  "\fLfeof\fP \(em enquire EOF on stream, System V"
.IX  "enquire stream status"  "feof V"  ""  "\fLfeof\fP \(em enquire EOF on stream, System V"
.IX  "inquire stream status"  "feof V"  ""  "\fLfeof\fP \(em enquire EOF on stream, System V"
.IX  "clearerr function V"  ""  "\fLclearerr\fP \(em clear error on stream, System V"
.IX  "stream status enquiries"  "clearerr V"  ""  "\fLclearerr\fP \(em clear error on stream, System V"
.IX  "enquire stream status"  "clearerr V"  ""  "\fLclearerr\fP \(em clear error on stream, System V"
.IX  "inquire stream status"  "clearerr V"  ""  "\fLclearerr\fP \(em clear error on stream, System V"
.IX  "fileno function V"  ""  "\fLfileno\fP \(em get stream descriptor number, System V"
.IX  "stream status enquiries"  "fileno V"  ""  "\fLfileno\fP \(em get stream descriptor number, System V"
.IX  "enquire stream status"  "fileno V"  ""  "\fLfileno\fP \(em get stream descriptor number, System V"
.IX  "inquire stream status"  "fileno V"  ""  "\fLfileno\fP \(em get stream descriptor number, System V"
.SH DESCRIPTION
.B ferror(\|)
returns non-zero when an error has occurred reading from or writing to
the named stream,
otherwise zero.  Unless cleared by
.BR clearerr ,
the error indication lasts until the stream is closed.
.LP
.B feof(\|)
returns non-zero when
.SM EOF
has previously been detected reading the named input
stream,
otherwise zero.  Unless cleared by
.BR clearerr ,
the
.SM EOF
indication lasts until the stream is closed; however,
operations which attempt to read from the stream will ignore the current
state of the
.SM EOF
indication and attempt to read from the file
descriptor associated with the stream.
.LP
.B clearerr(\|)
resets the error indication and
.SM EOF
indication to zero on the named
stream.
.LP
.B fileno(\|)
returns the integer file descriptor associated with the
stream;
see
.BR open (2V).
.SH NOTE
All these functions are implemented as macros;
they cannot be redeclared.
.SH "SEE ALSO"
.BR open (2V),
.BR fopen (3S)
 4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttyna./share/man/man3/fetch.3x                                                                              755       0      12           64  4424741161  10213                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)fetch.3x 1.6 89/03/27 SMI; 
    fgetc.3s  <  x    fgetc.3v  P      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v    d    	finite.3m <  x    firstkey.3x       
fixterm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3 ./share/man/man3/fflush.3s                                                                             755       0      12           70  4424741162  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/fclose.3s
.\" @(#)fflush.3s 1.6 89/03/27 SMI; 
  fgetc.3v  <      fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v   d    	finite.3m    x    firstkey.3x       
fixterm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3 ./share/man/man3/fgetc.3s                                                                              755       0      12           65  4424741162  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3s
.\" @(#)fgetc.3s 1.6 89/03/27 SMI; 
   fgetgraent.3        fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v   d    	finite.3m   x    firstkey.3x       
fixterm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v ./share/man/man3/fgetc.3v                                                                              755       0      12           64  4424741162  10211                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3v
.\" @(#)fgetc.3v 1.4 89/03/27 SMI;
      fgetgrent.3       fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v   d    	finite.3m   x    firstkey.3x       
fixterm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $./share/man/man3/fgetgraent.3                                                                          755       0      12           74  4424741162  11062                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgraent.3
.\" @(#)fgetgraent.3 1.3 89/03/27 SMI;
  fgetpwaent.3        fgetpwent.3       fgetpwent.3v        fgets.3s        file.3 s  (     file_to_decimal.3   <    	fileno.3s   P    	fileno.3v   d    	finite.3m   x    firstkey.3x       
fixterm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8./share/man/man3/fgetgrent.3                                                                           755       0      12           73  4424741162  10720                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgrent.3
.\" @(#)fgetgrent.3 1.6 89/03/27 SMI; 
  fgetpwent.3       fgetpwent.3v .3       fgets.3s .3v      file.3 t  (     file_to_decimal.3 (  <    	fileno.3s l.  P    	fileno.3v .3  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v y      flash.3v rm.     $ floating_to_decimal.3       floatingpoint.3       floor.3m oin       flushinp.3v       fmod.3m   $    fopen.3s mod  8    fopen.3v .3s  L  ./share/man/man3/fgetpwaent.3                                                                          755       0      12           74  4424741163  11101                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwaent.3
.\" @(#)fgetpwaent.3 1.3 89/03/27 SMI;
  fgetpwent.3v        fgets.3s .3       file.3 s  (     file_to_decimal.3   <    	fileno.3s (  P    	fileno.3v l.  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v        flash.3v v y     $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v mod  L    fp_class.3m   `  ./share/man/man3/fgetpwent.3                                                                           755       0      12           73  4424741163  10737                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)fgetpwent.3 1.6 89/03/27 SMI; 
  fgets.3s .3v      file.3 t  (     file_to_decimal.3 (  <    	fileno.3s l.  P    	fileno.3v .3  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v y      flash.3v rm.     $ floating_to_decimal.3       floatingpoint.3       floor.3m oin       flushinp.3v       fmod.3m   $    fopen.3s mod  8    fopen.3v .3s  L    fp_class.3m   `    
fprintf.3s s  t    
./share/man/man3/fgetpwent.3v                                                                          755       0      12           75  4424741163  11127                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)fgetpwent.3v 1.6 89/03/27 SMI; 
 file.3 s  (     file_to_decimal.3   <    	fileno.3s (  P    	fileno.3v l.  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v        flash.3v v y     $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v mod  L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v s      ./share/man/man3/fgets.3s                                                                              755       0      12           65  4424741163  10230                                                                                                                                                                                                                                                                                                                                                                      .so man3/gets.3s
.\" @(#)fgets.3s 1.6 89/03/27 SMI; 
  file_to_decimal.3 (  <    	fileno.3s l.  P    	fileno.3v .3  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v y      flash.3v rm.     $ floating_to_decimal.3       floatingpoint.3       floor.3m oin       flushinp.3v       fmod.3m   $    fopen.3s mod  8    fopen.3v .3s  L    fp_class.3m   `    
fprintf.3s s  t    
fprintf.3v .      fputc.3s tf.      fput./share/man/man3/file.3                                                                                755       0      12           66  4424741163   7655                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)file.3 1.3 89/03/27 SMI;
<    	fileno.3s (  P    	fileno.3v l.  d    	finite.3m .3  x    firstkey.3x       
fixterm.3v        flash.3v v y     $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v mod  L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v s      fputc.3s v .      fputs.3s tf.      frea./share/man/man3/file_to_decimal.3                                                                     755       0      12          111  4424741163  12044                                                                                                                                                                                                                                                                                                                                                                      .so man3/string_to_decimal.3
.\" @(#)file_to_decimal.3 1.3 89/03/27 SMI;
o.3v P  d    	finite.3m d  x    firstkey.3x       
fixterm.3v       flash.3v       $ floating_to_decimal.3 oa      floatingpoint.3       floor.3m         flushinp.3v       fmod.3m   $    fopen.3s  $  8    fopen.3v  8  L    fp_class.3m   `    
fprintf.3s `  t    
fprintf.3v t      fputc.3s        fputs.3s        fread.3s        ./share/man/man3/fileno.3s                                                                             755       0      12           70  4424741164  10371                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3s
.\" @(#)fileno.3s 1.6 89/03/27 SMI; 
  	finite.3m le  x    firstkey.3x       
fixterm.3v s      flash.3v ixt     $ floating_to_decimal.3       floatingpoint.3       floor.3m ing       flushinp.3v       fmod.3m   $    fopen.3s    8    fopen.3v ope  L    fp_class.3m   `    
fprintf.3s c  t    
fprintf.3v i      fputc.3s pri      fputs.3s put      fread.3s put      free.3       
freopen.3s ./share/man/man3/fileno.3v                                                                             755       0      12           67  4424741164  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/ferror.3v
.\" @(#)fileno.3v 1.4 89/03/27 SMI;
  firstkey.3x       
fixterm.3v        flash.3v v s     $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v    L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v c      fputc.3s v i      fputs.3s pri      fread.3s put      free.3 s      
freopen.3s       
freopen.3v ./share/man/man3/finite.3m                                                                             755       0      12          100  4424741164  10377                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)finite.3m 1.7 89/03/27 SMI; 
erm.3v        flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v 3m   L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v        fputc.3s v c      fputs.3s v i      fread.3s pri      free.3 s      
freopen.3s s      
freopen.3v       frexp.3m v ./share/man/man3/firstkey.3x                                                                           755       0      12           67  4424741164  10770                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)firstkey.3x 1.6 89/03/27 SMI; 
  flash.3v v       $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v 3m   L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v        fputc.3s v        fputs.3s v c      fread.3s v i      free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v       	fscanf.3s  ./share/man/man3/fixterm.3v                                                                            755       0      12           70  4424741164  10576                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)fixterm.3v 1.5 89/03/27 SMI;
 $ floating_to_decimal.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v 3m   L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v        fputc.3s v        fputs.3s v        fread.3s v c      free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v s      	fscanf.3s    $    	fscanf.3v  ./share/man/man3/flash.3v                                                                              755       0      12           66  4424741165  10223                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)flash.3v 1.5 89/03/27 SMI;
l.3        floatingpoint.3       floor.3m .3        flushinp.3v       fmod.3m   $    fopen.3s 3m   8    fopen.3v 3m   L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v        fputc.3s v        fputs.3s v        fread.3s v        free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v s      	fscanf.3s  s  $    	fscanf.3v    8    fseek.3s   ./share/man/man3/floating_to_decimal.3                                                                 755       0      12         7164  4424741165  12771                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)floating_to_decimal.3 1.12 89/03/27 SMI;
.TH FLOATING_TO_DECIMAL 3 "23 October 1987"
.SH NAME
single_to_decimal, double_to_decimal, extended_to_decimal \- convert floating-point value to decimal record
.SH SYNOPSIS
.B #include <floatingpoint.h>
.LP
.nf
.B void single_to_decimal(px, pm, pd, ps)
.B single *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.LP
.nf
.B void double_to_decimal(px, pm, pd, ps)
.B double *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.LP
.nf
.B void extended_to_decimal(px, pm, pd, ps)
.B extended *px ;
.B decimal_mode *pm;
.B decimal_record *pd;
.B fp_exception_field_type *ps;
.fi
.SH DESCRIPTION
.IX  "single_to_decimal function"  ""  "\fLsingle_to_decimal\fR \(em decimal record from single-precision floating"
.IX  "decimal record from single-precision floating \(em \fLsingle_to_decimal\fR"
.IX  "double_to_decimal function"  ""  "\fLdouble_to_decimal\fR \(em decimal record from double-precision floating"
.IX  "decimal record from double-precision floating \(em \fLdouble_to_decimal\fR"
.IX  "extended_to_decimal function"  ""  "\fLextended_to_decimal\fR \(em decimal record from extended-precision floating"
.IX  "decimal record to extended-precision floating \(em \fLextended_to_decimal\fR"
.LP
The
.B floating_to_decimal(\|)
functions convert the floating-point value at
.I *px
into a decimal record at
.IR *pd ,
observing the modes specified in
.I *pm
and setting exceptions in
.IR *ps .
If there are no
.SM IEEE
exceptions,
.I *ps
will be zero.
.LP
If
.I *px
is zero, infinity, or NaN, then only
.I pd->sign
and
.I pd->fpclass
are set.
Otherwise
.I pd->exponent
and
.I pd->ds
are also set so that
.IP
.B (pd->sign)*(pd->ds)*10**(pd->exponent)
.LP
is a correctly rounded approximation to
.I *px.
.I pd->ds
has at least one and no more than
.SB  DECIMAL_STRING_LENGTH\-1
significant digits
because one character is used to terminate the string with a
.SM NULL\s0.
.LP
.I pd->ds
is correctly rounded according to the
.SM IEEE
rounding modes in
.IR pm->rd .
.I *ps
has
.I fp_inexact
set if the result was inexact, and has
.I fp_overflow
set if the string result does not fit in
.I pd->ds
because of the limitation
.BR \s-1DECIMAL_STRING_LENGTH\s0 .
.LP
If
.IR "pm->df == floating_form" ,
then
.I pd->ds
always contains
.I pm->ndigits
significant digits.  Thus if
.I *px
== 12.34 and
.I pm->ndigits
== 8, then
.I pd->ds
will contain 12340000 and
.I pd->exponent
will contain \-6.
.LP
If
.I pm->df == fixed_form
and
.I pm->ndigits
>= 0, then
.I pd->ds
always contains
.I pm->ndigits
after the point and as many digits as necessary before the point.  Since
the latter is not known in advance, the total number of digits required
is returned in
.IR pd->ndigits ;
if that number >=
.BR \s-1DECIMAL_STRING_LENGTH\s0 ,
then
.I ds
is undefined.
.I pd->exponent
always gets
.IR \-pm->ndigits .
Thus if
.I *px
== 12.34 and
.I pm->ndigits
== 1,
then
.I pd->ds
gets 123,
.I pd->exponent
gets \-1, and
.I pd->ndigits
gets 3.
.LP
If
.I pm->df == fixed_form
and
.I pm->ndigits
< 0, then
.I pm->ds
always contains
.I \-pm->ndigits
trailing zeros; in other words, rounding occurs
.I \-pm->ndigits
to
the left of the decimal point, but the digits rounded away are retained
as zeros.  The total number of digits required is in
.IR pd->ndigits .
.I pd->exponent
always gets 0.  Thus if
.I *px
== 12.34 and
.I pm->ndigits
== \-1,
then
.I pd->ds
gets 10,
.I pd->exponent
gets 0, and
.I pd->ndigits
gets 2.
.LP
.I pd->more
is not used.
.LP
.BR econvert (3),
.BR fconvert ,
.BR gconvert ,
.BR printf (3S),
and
.BR sprintf ,
all use
.BR double_to_decimal .
.SH SEE ALSO
.BR econvert (3),
.BR printf (3S)
.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v hyperbolic.3m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m N      W  inch.3v       W  inch.3v       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v ./share/man/man3/floatingpoint.3                                                                       755       0      12        11536  4424741165  11701                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)floatingpoint.3 1.11 89/03/27 SMI;
.TH FLOATINGPOINT 3 "22 March 1989"
.SH NAME
floatingpoint \- IEEE floating point definitions
.SH SYNOPSIS
.nf
.B #include <sys/ieeefp.h>
.B #include <floatingpoint.h>
.fi
.SH DESCRIPTION
.IX "floatingpoint" "" "\fLfloatingpoint\fR \(em IEEE floating point definitions"
.IX "ieeefp.h" "" "\fLieeefp.h\fR \(em IEEE floating point definitions"
This file defines constants, types, variables,
and functions used to implement standard floating point
according to
.SM ANSI/IEEE
Std 754-1985.
The variables and functions are implemented in
.BR libc.a .
The included file
.B <sys/ieeefp.h>
defines certain types of interest to the kernel.
.LP
.SM IEEE
Rounding Modes:
.TP 20
.B fp_direction_type
The type of the
.SM IEEE
rounding direction mode.
Note: the order of enumeration varies according to hardware.
.TP
.B fp_direction
The
.SM IEEE
rounding direction mode currently in force.
This is a global variable that is intended to reflect the
hardware state, so it should only be written indirectly
through a function like
.BI ieee_flags ("set","direction",\|.\|.\|.\|)
that also sets the hardware state.
.TP
.B fp_precision_type
The type of the
.SM IEEE
rounding precision mode, which
only applies on systems that support extended precision such
as Sun-3 systems with 68881's.
.TP
.B fp_precision
The
.SM IEEE
rounding precision mode currently in force.
This is a global variable that is intended to reflect the
hardware state on systems with extended precision,
so it should only be written indirectly through a function
like
\fBieee_flags("set","precision",\|.\|.\|.\|)\fR.
.LP
.SB SIGFPE
handling:
.TP 20
.B sigfpe_code_type
The type of a
.SB SIGFPE
code.
.TP
.B sigfpe_handler_type
The type of a user-definable
.SB SIGFPE
exception handler called to handle a particular
.SB SIGFPE
code.
.TP
.SB SIGFPE_DEFAULT
A macro indicating the default
.SB SIGFPE
exception handling, namely
to perform the exception handling specified by calls to
.BR ieee_handler(3M) ,
if any, and otherwise to dump core using
.BR abort (3).
.TP
.SB SIGFPE_IGNORE
A macro indicating an alternate
.SB SIGFPE
exception handling, namely
to ignore and continue execution.
.TP
.SB SIGFPE_ABORT
A macro indicating an alternate
.SB SIGFPE
exception handling, namely
to abort with a core dump.
.LP
.SM IEEE
Exception Handling:
.TP 20
.SB N_IEEE_EXCEPTION
The number of distinct
.SM IEEE
floating-point exceptions.
.TP
.B fp_exception_type
The type of the
.SB N_IEEE_EXCEPTION
exceptions.  Each exception is given a bit number.
.TP
.B fp_exception_field_type
The type intended to hold at least
.SB N_IEEE_EXCEPTION
bits corresponding to the
.SM IEEE
exceptions numbered by
.BR fp_exception_type .
Thus
.BR fp_inexact
corresponds to the least significant bit and
.BR fp_invalid
to the fifth least significant bit.
Note: some operations may set more than one exception.
.TP
.B fp_accrued_exceptions
The
.SM IEEE
exceptions between the time this global variable was last cleared,
and the last time a function like
\fBieee_flags("get","exception",\|.\|.\|.\|)\fR
was called to update
the variable by obtaining the hardware state.
.TP
.B ieee_handlers
An array of user-specifiable signal handlers for use by the standard
.SB SIGFPE
handler for
.SM IEEE
arithmetic-related
.SB SIGFPE
codes.  Since
.SM IEEE
trapping modes correspond to hardware modes, elements of
this array should only be modified with a function like
.BR ieee_handler (3M)
that performs the appropriate hardware mode update.
If no
.B sigfpe_handler
has been declared for a particular
.SM IEEE\s0-related
.SB SIGFPE
code, then the related
.B ieee_handlers
will be invoked.
.LP
.SM IEEE
Formats and Classification:
.TP 20
.IB single ; extended
Definitions of
.SM IEEE
formats.
.TP
.B fp_class_type
An enumeration of the various classes of
.SM IEEE
values and symbols.
.LP
.SM IEEE
Base Conversion:
.IP
The functions described under
.BR floating_to_decimal (3)
and
.BR decimal_to_floating (3)
not only satisfy the
.SM IEEE
Standard, but also the stricter requirements
of correct rounding for all arguments.
.TP 20
.SB DECIMAL_STRING_LENGTH
The length of a
.BR decimal_string .
.TP
.B decimal_string
The digit buffer in a
.BR decimal_record .
.TP
.B decimal_record
The canonical form for representing an unpacked decimal floating-point number.
.TP
.B decimal_form
The type used to specify fixed or floating binary to decimal conversion.
.TP
.B decimal_mode
A struct that contains specifications for conversion between binary and decimal.
.TP
.B decimal_string_form
An enumeration of possible valid character strings representing floating-point
numbers, infinities, or NaNs.
.SH FILES
.PD 0
.TP 20
.B /usr/include/sys/ieeefp.h
.TP
.B /usr/include/floatingpoint.h
.TP
.B /usr/lib/libc.a
.PD
.SH "SEE ALSO"
.BR abort (3),
.BR decimal_to_floating (3),
.BR econvert (3),
.BR floating_to_decimal (3),
.BR ieee_flags (3M),
.BR ieee_handler (3M),
.BR sigfpe (3),
.BR string_to_decimal (3),
.BR strtod (3)
than one may
be set) will be called regardless if the
setting procedure is exited using a
.I return
or an
.BR exc_raise .
Because the exit procedure is called as ./share/man/man3/floor.3m                                                                              755       0      12           64  4424741165  10234                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)floor.3m 1.3 89/03/27 SMI;
    fmod.3m   $    fopen.3s mod  8    fopen.3v .3s  L    fp_class.3m   `    
fprintf.3s s  t    
fprintf.3v .      fputc.3s tf.      fputs.3s .3s      fread.3s .3s      free.3 a      
freopen.3s e      
freopen.3v .      frexp.3m en.      	fscanf.3s 3m  $    	fscanf.3v .3  8    fseek.3s f.3  L    ftell.3s .3s  `    ftime.3c .3s  p    ftok.3 m      ftw.3  ./share/man/man3/flushinp.3v                                                                           755       0      12           71  4424741165  10752                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)flushinp.3v 1.5 89/03/27 SMI;
open.3s 3m   8    fopen.3v mod  L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v s      fputc.3s v .      fputs.3s tf.      fread.3s .3s      free.3 s      
freopen.3s a      
freopen.3v e      frexp.3m v .      	fscanf.3s n.  $    	fscanf.3v 3m  8    fseek.3s  .3  L    ftell.3s f.3  `    ftime.3c .3s  p    ftok.3 c      ftw.3 ok       func_to_deci./share/man/man3/fmod.3m                                                                               755       0      12           76  4424741166  10044                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)fmod.3m 1.3 89/03/27 SMI; 
3v 3m   L    fp_class.3m   `    
fprintf.3s    t    
fprintf.3v        fputc.3s v s      fputs.3s v .      fread.3s tf.      free.3 s      
freopen.3s s      
freopen.3v a      frexp.3m v e      	fscanf.3s  .  $    	fscanf.3v n.  8    fseek.3s  3m  L    ftell.3s  .3  `    ftime.3c f.3  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwri./share/man/man3/fopen.3s                                                                              755       0      12         6344  4424741166  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fopen.3s 1.18 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FOPEN 3S  "18 November 1987"
.SH NAME
fopen, freopen, fdopen \- open a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B \s-1FILE\s0 *fopen(filename, type)
.B char *filename, *type;
.LP
.B \s-1FILE\s0 *freopen(filename, type, stream)
.B char *filename, *type;
.B \s-1FILE\s0 *stream;
.LP
.B \s-1FILE\s0 *fdopen(fildes, type)
.B char *type;
.fi
.IX  "fopen function"  ""  "\fLfopen\fP \(em open stream"
.IX  stream  open  stream  "open \(em \fLfopen\fP"
.IX  "open stream \(em \fLfopen\fP"
.IX  "freopen function"  ""  "\fLfreopen\fP \(em reopen stream"
.IX  stream  reopen  stream  "reopen \(em \fLfreopen\fP"
.IX  "reopen stream \(em \fLfreopen\fP"
.IX  "fdopen function"  ""  "\fLfdopen\fP \(em associate descriptor"
.IX  stream  "associate descriptor \(em \fLfdopen\fP"
.SH DESCRIPTION
.B fopen(\|)
opens the file named by
.I filename
and associates a stream with it.
If the open succeeds,
.B fopen(\|)
returns a pointer to be used to identify the stream in subsequent operations.
.LP
.I filename
points to a character string that contains
the name of the file to be opened.
.LP
.I type
is a character string having one of the following values:
.RS
.TP 10
.B r
open for reading
.ns
.TP
.B w
truncate or create for writing
.ns
.TP
.B a
append: open for writing at end of file, or create for writing
.TP
.B r+
open for update (reading and writing)
.ns
.TP
.B w+
truncate or create for update
.ns
.TP
.B a+
append; open or create for update at
.SM EOF
.RE
.LP
.B freopen(\|)
opens the file named by
.I filename
and associates the stream pointed to by
.I stream
with it.  The
.I type
argument is used just as in
.BR fopen .
The original stream is closed, regardless of whether the open
ultimately succeeds.
If the open succeeds,
.B freopen(\|)
returns the original value of
.IR stream .
.LP
.B freopen(\|)
is typically used to attach the preopened
streams associated with
.BR stdin ,
.BR stdout ,
and
.B stderr
to other files.
.LP
.B fdopen(\|)
associates a stream with the file descriptor
.IR fildes .
File descriptors are obtained from calls like
.BR open ,
.BR dup ,
.BR creat ,
or
.BR pipe (2),
which open files but do not return streams.
Streams are necessary input for many of the Section 3S library routines.
The
.I type
of the stream must agree with the mode of the open file.
.LP
When a file is opened for update, both input and output may be
done on the resulting stream.
However, output may not be directly followed by input without an
intervening
.B fseek(\|)
or
.BR rewind ,
and input may not be directly followed by output without an
intervening
.BR fseek ,
.BR rewind ,
or an input operation which encounters end-of-file.
.SH "SEE ALSO"
.BR open (2V),
.BR pipe (2),
.BR fclose (3S),
.BR fopen (3V),
.BR fseek (3S)
.SH DIAGNOSTICS
.BR fopen ,
.BR freopen ,
and
.B fdopen(\|)
return a
.SM NULL
pointer on failure.
.SH BUGS
In order to support the same number of open files that the system does,
.B fopen(\|)
must allocate additional memory for data structures using
.B calloc(\|)
after 64 files have been opened.
This confuses some programs which use their own memory allocators.
.\"An undocumented routine,
.\".BR f_prealloc ,
.\"may be called to force immediate allocation of all internal memory
.\"except for buffers.
   getservbyport.3n       2  
getservent.3n 2    3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 9  d  :  getw.3s   t  ;  getw.3v     <  getwd.3 ./share/man/man3/fopen.3v                                                                              755       0      12         7730  4424741166  10303                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fopen.3v 1.15 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FOPEN 3V  "18 November 1987"
.SH NAME
fopen, freopen, fdopen \- open a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B \s-1FILE\s0 *fopen(filename, type)
.B char *filename, *type;
.LP
.B \s-1FILE\s0 *freopen(filename, type, stream)
.B char *filename, *type;
.B \s-1FILE\s0 *stream;
.LP
.B \s-1FILE\s0 *fdopen(fildes, type)
.B char *type;
.fi
.IX  "fopen function V"  ""  "\fLfopen\fP \(em open stream, System V"
.IX  stream  "\fLfopen\fP \(em open stream, System V"
.IX  "open stream, System V \(em \fLfopen\fP"
.IX  "freopen function V"  ""  "\fLfreopen\fP \(em reopen stream, System V"
.IX  stream  "reopen, System V \(em \fLfreopen\fP"
.IX  "reopen stream, System V \(em \fLfreopen\fP"
.IX  "fdopen function V"  ""  "\fLfdopen\fP \(em associate descriptor, System V"
.IX  stream  "associate descriptor, System V \(em \fLfdopen\fP"
.SH DESCRIPTION
.B fopen(\|)
opens the file named by
.I filename
and associates a stream with it.
If the open succeeds,
.B fopen(\|)
returns a pointer to be used to identify the stream in subsequent operations.
.LP
.I filename
points to a character string that contains
the name of the file to be opened.
.LP
.I type
is a character string having one of the following values:
.RS
.TP 10
.B r
open for reading
.ns
.TP
.B w
truncate or create for writing
.ns
.TP
.B a
append: open for writing at end of file, or create for writing
.TP
.B r+
open for update (reading and writing)
.ns
.TP
.B w+
truncate or create for update
.ns
.TP
.B a+
append; open or create for update at
.SM EOF
.RE
.LP
.B freopen(\|)
opens the file named by
.I filename
and associates the stream pointed to by
.I stream
with it.  The
.I type
argument is used just as in
.BR fopen .
The original stream is closed, regardless of whether the open
ultimately succeeds.
If the open succeeds,
.B freopen(\|)
returns the original value of
.IR stream .
.LP
.B freopen(\|)
is typically used to attach the preopened
streams associated with
.BR stdin ,
.BR stdout ,
and
.B stderr
to other files.
.LP
.B fdopen(\|)
associates a stream with the file descriptor
.IR fildes .
File descriptors are obtained from calls like
.BR open ,
.BR dup ,
.BR creat ,
or
.BR pipe (2),
which open files but do not return streams.
Streams are necessary input for many of the Section 3S library routines.
The
.I type
of the stream must agree with the mode of the open file.
.LP
When a file is opened for update, both input and output may be
done on the resulting stream.
However, output may not be directly followed by input without an
intervening
.B fseek(\|)
or
.BR rewind ,
and input may not be directly followed by output without an
intervening
.BR fseek ,
.BR rewind ,
or an input operation which encounters end-of-file.
.LP
When a file is opened for append (that is, when
.I type
is
.B a
or
.BR a+ ),
it is impossible to overwrite information
already in the file.
.B fseek(\|)
may be used to reposition the file pointer to any position
in the file, but when output is written
to the file, the current file pointer is disregarded.
All output is written at the end of the file and causes the file
pointer to be repositioned at the end of the output.  If two separate
processes open the same file for append, each process may write freely
to the file without fear of destroying output being written by the
other.  The output from the two processes will be intermixed in the
file in the order in which it is written.
.SH "SEE ALSO"
.BR open (2V),
.BR pipe (2),
.BR fclose (3S),
.BR fopen (3S),
.BR fseek (3S)
.SH DIAGNOSTICS
.BR fopen ,
.BR freopen ,
and
.B fdopen(\|)
return a
.SM NULL
pointer on failure.
.SH BUGS
In order to support the same number of open files that the system does,
.B fopen(\|)
must allocate additional memory for data structures using
.B calloc(\|)
after 64 files have been opened.
This confuses some programs which use their own memory allocators.
.\"An undocumented routine,
.\".BR f_prealloc ,
.\"may be called to force immediate allocation of all internal memory
.\"except for buffers.
l arguments.
.TP 20
.SB DECIMAL_STRING_L./share/man/man3/fp_class.3m                                                                           755       0      12          101  4424741166  10716                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)fp_class.3m 1.3 89/03/27 SMI;
tf.3v        fputc.3s v `      fputs.3s v t      fread.3s        free.3 s      
freopen.3s s      
freopen.3v .      frexp.3m v       	fscanf.3s    $    	fscanf.3v   8    fseek.3s    L    ftell.3s  $  `    ftime.3c  8  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m         gcd.3x m      
gcon./share/man/man3/fprintf.3s                                                                            755       0      12           71  4424741166  10570                                                                                                                                                                                                                                                                                                                                                                      .so man3/printf.3s
.\" @(#)fprintf.3s 1.6 89/03/27 SMI; 
 fputc.3s v        fputs.3s v `      fread.3s v t      free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v .      	fscanf.3s    $    	fscanf.3v    8    fseek.3s    L    ftell.3s    `    ftime.3c  $  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt./share/man/man3/fprintf.3v                                                                            755       0      12           70  4424741166  10572                                                                                                                                                                                                                                                                                                                                                                      .so man3/printf.3v
.\" @(#)fprintf.3v 1.5 89/03/27 SMI;
  fputs.3s v        fread.3s v `      free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v s      	fscanf.3s  .  $    	fscanf.3v    8    fseek.3s     L    ftell.3s    `    ftime.3c    p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt./share/man/man3/fputc.3s                                                                              755       0      12           64  4424741167  10244                                                                                                                                                                                                                                                                                                                                                                      .so man3/putc.3s
.\" @(#)fputc.3s 1.5 89/03/27 SMI;
    fread.3s v        free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v s      	fscanf.3s  s  $    	fscanf.3v  .  8    fseek.3s     L    ftell.3s     `    ftime.3c    p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <./share/man/man3/fputs.3s                                                                              755       0      12           64  4424741167  10264                                                                                                                                                                                                                                                                                                                                                                      .so man3/puts.3s
.\" @(#)fputs.3s 1.5 89/03/27 SMI;
    free.3 s      
freopen.3s s      
freopen.3v s      frexp.3m v s      	fscanf.3s  s  $    	fscanf.3v  s  8    fseek.3s   .  L    ftell.3s     `    ftime.3c     p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n./share/man/man3/fread.3s                                                                              755       0      12         5113  4424741167  10244                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fread.3s 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FREAD 3S  "25 March 1989"
.SH NAME
fread, fwrite \- buffered binary input/output
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B "int fread (ptr, size, nitems, stream)"
.B char \(**ptr;
.B int size;
.B int nitems;
.B \s-1FILE\s0 *stream;
.LP
.B "int fwrite (ptr, size, nitems, stream)"
.B char \(**ptr;
.B int size;
.B int nitems;
.B \s-1FILE\s0 *stream;
.fi
.IX  "buffered binary I/O"  fread  ""  "\fLfread\fP \(em read from stream"
.IX  "binary I/O, buffered"  fread  ""  "\fLfread\fP \(em read from stream"
.IX  "I/O, buffered binary"  fread  ""  "\fLfread\fP \(em read from stream"
.IX  "buffered binary I/O"  frwite  ""  "\fLfrwite\fP \(em write to stream"
.IX  "binary I/O, buffered"  frwite  ""  "\fLfrwite\fP \(em write to stream"
.IX  "I/O, buffered binary"  frwite  ""  "\fLfrwite\fP \(em write to stream"
.IX  "fread function"  ""  "\fLfread\fP \(em read from stream"
.IX  "read from stream \(em \fLfread\fP"
.IX  "fwrite function"  ""  "\fLfwrite\fP \(em write to stream"
.IX  "write to stream \(em \fLfwrite\fP"
.IX  stream  read  ""  "read from stream \(em \fLfread\fP"
.IX  stream  rwite  ""  "write to stream \(em \fLfwrite\fP"
.SH DESCRIPTION
.B fread(\|)
reads, into a block pointed to by
.IR ptr ,
.I nitems
items of data from the named input stream
.IR stream ,
where an item of data is a sequence of
bytes (not necessarily terminated by a
.SM NULL
byte) of length
.IR size .
It returns the number of items actually read.
.B fread(\|)
stops reading if an end-of-file
or error condition is encountered while reading from
.IR stream ,
or if
.I nitems
items have been read.
.B fread(\|)
leaves the file pointer in
.IR stream ,
if defined, pointing to the byte following the last byte read if
there is one.
.B fread(\|)
does not change the contents of the file referred to by
.I stream .
.LP
.B fwrite(\|)
writes at most
.I nitems
items of data from the block pointed to by
.I ptr
to the named output stream
.IR stream .
It returns the number of items actually written.
.B fwrite(\|)
stops writing when it has written
.I nitems
items of data or if an
error condition is encountered on
.IR stream .
.B fwrite(\|)
does not change the contents of the block pointed to by
.IR ptr .
.LP
If
.IR size " or " nitems
is non-positive, no characters are read
or written and 0 is returned by both
.B fread(\|)
and
.BR fwrite(\|) .
.SH "SEE ALSO"
.BR read (2V),
.BR write (2V),
.BR fopen (3S),
.BR getc (3S),
.BR gets (3S),
.BR putc (3S),
.BR puts (3S),
.BR printf (3S),
.BR scanf (3S)
.SH DIAGNOSTICS
.B fread(\|)
and
.B fwrite(\|)
return 0 upon end of file or error.

G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v  any position
in the file, but when output is written
to the file, the current file pointer is disregard./share/man/man3/free.3                                                                                755       0      12           64  4424741167   7661                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)free.3 1.6 89/03/27 SMI; 
  
freopen.3v s      frexp.3m v s      	fscanf.3s  s  $    	fscanf.3v  s  8    fseek.3s   s  L    ftell.3s   s  `    ftime.3c   .  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg./share/man/man3/freopen.3s                                                                            755       0      12           70  4424741167  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/fopen.3s
.\" @(#)freopen.3s 1.6 89/03/27 SMI; 
  frexp.3m        	fscanf.3s   $    	fscanf.3v $  8    fseek.3s  8  L    ftell.3s  L  `    ftime.3c  `  p    ftok.3 .      ftw.3  c       func_to_decimal.3        	fwrite.3s       gamma.3m        gcd.3x       
gconvert.3        gcvt.3 m      get.3  t       get.3r t  <     get_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x    geta./share/man/man3/freopen.3v                                                                            755       0      12           70  4424741170  10553                                                                                                                                                                                                                                                                                                                                                                      .so man3/fopen.3v
.\" @(#)freopen.3v 1.6 89/03/27 SMI; 
  	fscanf.3s   $    	fscanf.3v   8    fseek.3s  $  L    ftell.3s  8  `    ftime.3c  L  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s        gamma.3m        gcd.3x m      
gconvert.3        gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3 P  x    getacinfo.3       
geta./share/man/man3/frexp.3m                                                                              755       0      12         4353  4424741170  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)frexp.3m 1.9 89/03/27 SMI
.TH FREXP 3M "21 January 1988"
.SH NAME
frexp, modf, ldexp \- traditional UNIX functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double frexp(value, eptr)
.B double value;
.B int \(**eptr;
.LP
.B double ldexp(x,n)
.B double x;
.B int n;
.LP
.B double modf(value, iptr)
.B double value, \(**iptr;
.fi
.IX  "frexp function"  ""  "\fLfrexp\fP \(em split into significand and exponent"
.IX  "modf function"  ""  "\fLmodf\fP \(em split into integer part and fraction part"
.IX  "split into significand and exponent \(em \fLfrexp\fR"
.IX  "significand and exponent, split into \(em \fLfrexp\fR"
.IX  "exponent and significand, split into \(em \fLfrexp\fR"
.SH DESCRIPTION
These functions are provided for compatibility with other
.SM UNIX
system implementations.  They are not used internally in
.B libm
or
.BR libc .
Better ways to accomplish similar ends may be found in
.BR ieee_functions (3M)
and
.BR rint (3M).
.LP
.BI ldexp( x , n )
returns 
.I x * 2**n 
computed by exponent manipulation rather than by actually
performing an exponentiation or a multiplication.
Note:
.BI ldexp( x , n )
differs from
.BI scalbn( x , n )\fR,
defined in
.BR ieee_functions (3M),
only that in the event of
.SM IEEE
overflow and underflow,
.BI ldexp( x , n )
sets
.B errno
to
.SM ERANGE\s0.
.LP
Every non-zero number can be written uniquely as
.IR "x * 2**n" ,
where the significand
.I x
is in the range
.I 0.5 <= |x| < 1.0
and the exponent
.I n
is an integer.  The function
.B frexp(\|)
returns the significand of a double
.I value
as a double quantity,
.IR x ,
and stores the exponent
.IR n ,
indirectly through
.IR eptr .
If
.I value
== 0, both results returned by
.B frexp(\|)
are 0.
.LP
.B modf(\|)
returns the fractional part of
.I value
and stores the integral part indirectly
through
.IR iptr .
Thus the argument
.I value
and the returned values
.B modf(\|)
and
.I *iptr
satisfy
.IP
(*\fIiptr\fP + \fImodf\fP) ==
.I value
.LP
and both results
have the same sign as
.IR value .
The definition of
.B modf(\|)
varies among
.SM UNIX
system implementations, so avoid
.B modf(\|)
in portable code.
.LP
The results of
.B frexp(\|)
and
.B modf(\|)
are not defined when
.I value
is an
.SM IEEE
infinity or NaN.
.SH "SEE ALSO"
.BR ieee_functions (3M),
.BR rint (3M)
mntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v        getprotobyname.3n        getprotoent../share/man/man3/fscanf.3s                                                                             755       0      12           67  4424741170  10360                                                                                                                                                                                                                                                                                                                                                                      .so man3/scanf.3s
.\" @(#)fscanf.3s 1.6 89/03/27 SMI; 
  fseek.3s    L    ftell.3s    `    ftime.3c  $  p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3   x    getacinfo.3       
getacmin.3        getauditflags.3        ./share/man/man3/fscanf.3v                                                                             755       0      12           66  4424741170  10362                                                                                                                                                                                                                                                                                                                                                                      .so man3/scanf.3v
.\" @(#)fscanf.3v 1.5 89/03/27 SMI;
  ftell.3s    `    ftime.3c    p    ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3   x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3   ./share/man/man3/fseek.3s                                                                              755       0      12         5037  4424741170  10257                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fseek.3s 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FSEEK 3S  "22 March 1989"
.SH NAME
fseek, ftell, rewind \- reposition a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B fseek(stream, offset, ptrname)
.B \s-1FILE\s0 *stream;
.B long offset;
.LP
.B long ftell(stream)
.B \s-1FILE\s0 *stream;
.LP
.B rewind(stream)
.B \s-1FILE\s0 *stream;
.fi
.SH DESCRIPTION
.IX  "fseek function"  ""  "\fLfseek\fP \(em seek on stream"
.IX  "seek on stream"  "" "seek on stream \(em \fLfseek\fP"
.IX  stream  seek  stream  "seek \(em \fLfseek\fP"
.IX  "ftell function"  ""  "\fLftell\fP \(em get stream position"
.IX  get "position of stream \(em \fLftell\fP"
.IX  stream  "get position of"  stream  "get position of \(em \fLftell\fP"
.IX  "rewind function"  ""  "\fLrewind\fP \(em rewind stream"
.IX  "rewind stream"  ""  "rewind stream \(em \fLrewind\fP"
.IX  stream  rewind  stream  "rewind \(em \fLrewind\fP"
.IX  stream  reposition  stream  "reposition \(em \fLrewind\fP"
.IX  "reposition stream"  fseek  ""  \fLfseek\fP
.IX  "reposition stream"  ftell  ""  \fLftell\fP
.IX  "reposition stream"  rewind  ""  \fLrewind\fP
.LP
.B fseek(\|)
sets the position of the next input or output operation on the stream.
The new position is at the signed distance
.I offset
bytes from the beginning, the current position, or the end of the file,
according as
.I ptrname
has the value 0, 1, or 2.
.LP
.BI rewind( stream )
is equivalent to
.BI fseek( stream\fR,
0L, 0), except that no value is returned.
.LP
.B fseek(\|)
and
.B rewind(\|)
undo any effects of
.BR ungetc (3S).
.LP
After
.B fseek(\|)
or
.BR rewind(\|) ,
the next operation on a file opened for update
may be either input or output.
.LP
.B ftell(\|)
returns the offset of the current byte relative to the beginning
of the file associated with the named stream.
.SH "SEE ALSO"
.BR lseek (2),
.BR fopen (3S),
.BR popen (3S),
.BR ungetc (3S)
.SH DIAGNOSTICS
.LP
.B fseek(\|)
returns \-1 for improper seeks, otherwise zero.
An improper seek can be, for example, an
.B fseek(\|)
done on a file associated with a non-seekable device,
such as a tty or a pipe; in particular,
.B fseek(\|)
may not be used on a terminal, or on a file opened using
.BR popen (3S).
.SH WARNING
.LP
Although on the
.SM UNIX
system an offset returned by
.B ftell(\|)
is measured in bytes, and it is permissible to seek to positions
relative to that offset,
portability to a (non-\s-1UNIX\s0) system requires that
an offset be used by
.B fseek(\|)
directly.
Arithmetic may not meaningfully be performed on such
an offset, which is not necessarily measured in bytes.
  L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v  any position
in the file, but when output is written
to the file, the current file pointer is disregard./share/man/man3/ftell.3s                                                                              755       0      12           66  4424741171  10226                                                                                                                                                                                                                                                                                                                                                                      .so man3/fseek.3s
.\" @(#)ftell.3s 1.6 89/03/27 SMI; 
  ftok.3 c      ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3   x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s ./share/man/man3/ftime.3c                                                                              755       0      12           65  4424741171  10203                                                                                                                                                                                                                                                                                                                                                                      .so man3/time.3c
.\" @(#)ftime.3c 1.6 89/03/27 SMI; 
 ftw.3 ok       func_to_decimal.3       	fwrite.3s       gamma.3m        gcd.3x m      
gconvert.3 m       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3   x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v   ./share/man/man3/ftok.3                                                                                755       0      12         4342  4424741171   7741                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ftok.3 1.10 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH FTOK 3 "6 October 1987"
.SH NAME
ftok \- standard interprocess communication package
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/ipc.h>
.LP
.B key_t ftok(path, id)
.B char \(**path;
.B char id;
.fi
.SH DESCRIPTION
.IX ftok "" "\fLftok\fR \(em interprocess communication routine"
.IX "interprocess communication" "ftok" "\fLftok\fR"
All interprocess communication facilities
require the user to supply a key
to be used by the
.BR msgget (2),
.BR semget (2),
and
.BR shmget (2)
system calls to obtain interprocess communication identifiers.
One suggested method for forming a key
is to use the
.B ftok(\|)
subroutine described below.
Another way to compose keys
is to include the project
.SM ID\s0
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 some standard is not adhered to,
it will be possible for unrelated processes
to unintentionally 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 across a given system.
.LP
.B ftok(\|)
returns a key based on
.I path
and
.SM ID
that is usable in subsequent
.BR msgget ,
.BR semget ,
and
.B shmget(\|)
system calls.
.I path
must be the path name of an existing file
that is accessible to the process.
.SM ID
is a character
which uniquely identifies
a project.
Note:
.B ftok(\|)
will return the same key
for linked files when called with the same
.SM ID
and that it will return different keys when
called with the same file name but different
.SM ID\s0s.
.SH "SEE ALSO"
.BR intro (2),
.BR msgget (2),
.BR semget (2),
.BR shmget (2)
.SH DIAGNOSTICS
.B ftok(\|)
returns
.B "(key_t) \-1"
if
.I path
does not exist or if it is not accessible
to the process.
.SH WARNING
If the file whose
.I path
is passed to
.B ftok(\|)
is removed when keys still refer to the file,
future calls to
.B ftok(\|)
with the same
.I path
and
.SM ID
will return an error.
If the same file is recreated, then
.B ftok(\|)
is likely to return a different key
than it did the original time it was called.
-  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <./share/man/man3/ftw.3                                                                                 755       0      12         5611  4424741171   7576                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ftw.3 1.10 89/03/27 SMI; from S5R2
.TH FTW 3 "22 November 1987"
.SH NAME
ftw \- walk a file tree
.SH SYNOPSIS
.nf
.B #include <ftw.h>
.LP
.B int ftw(path, fn, depth)
.B char *path;
.B int (*fn)(\|);
.B int depth;
.fi
.SH DESCRIPTION
.IX ftw "" "\fLftw\fR \(em traverse file tree"
.IX file "\fLftw\fR \(em traverse file tree"
.B ftw(\|)
recursively descends the directory hierarchy rooted in
.IR path .
For each object in the hierarchy,
.B ftw(\|)
calls
.IR fn ,
passing it a pointer to a
.SM NULL\s0-terminated
character string containing the name of the object, a pointer to a
.B stat(\|)
structure (see
.BR stat (2))
containing information about the object, and an integer.
Possible values of the integer, defined in the
.B <ftw.h>
header file, are
.SM FTW_F\s0
for a file,
.SM FTW_D\s0
for a directory,
.SM FTW_DNR\s0
for a directory that cannot be read, and
.SM FTW_NS\s0
for an object for which
.B stat(\|)
could not successfully be executed.
If the integer is
.SM FTW_DNR\s0,
descendants of that directory will not be processed.
If the integer is
.SM FTW_NS\s0,
the
.B stat(\|)
structure will contain garbage.
An example of an object that would cause
.SM FTW_NS\s0
to be passed to
.I fn
would be a file in a directory
with read but without execute (search) permission.
.LP
.B ftw(\|)
visits a directory before visiting any of its descendants.
.LP
The tree traversal continues until the tree is exhausted,
an invocation of
.I fn
returns a nonzero value,
or some error is detected within
.B ftw(\|)
(such as an I/O error).
If the tree is exhausted,
.B ftw(\|)
returns zero.  If
.I fn
returns a nonzero value,
.B ftw(\|)
stops its tree traversal and returns whatever
value was returned by
.IR fn .
If
.B ftw(\|)
detects an error, it returns
\-1, and sets the error type in
.BR errno .
.LP
.B ftw(\|)
uses one file descriptor for each level in the tree.
The
.I depth
argument limits the number of file descriptors so used.
If
.I depth
is zero or negative, the effect is the same as if it were 1.
.I depth
must not be greater than the number of file descriptors currently
available for use.
.B ftw(\|)
will run more quickly if
.I depth
is at least as large as the number of levels in the tree.
.SH SEE ALSO
.BR stat (2),
.BR malloc (3)
.SH BUGS
Because
.B ftw(\|)
is recursive, it is possible for it to terminate with a memory
fault when applied to very deep file structures.
.LP
It could be made to run faster and use less storage on deep
structures at the cost of considerable complexity.
.LP
.B ftw(\|)
uses
.BR malloc (3)
to allocate dynamic storage during its operation.
If
.B ftw(\|)
is forcibly terminated, such as by
.B longjmp(\|)
being executed by
.I fn
or an interrupt routine,
.B ftw(\|)
will not have a chance to free that storage,
so it will remain permanently allocated.
A safe way to handle interrupts is to store
the fact that an interrupt has occurred,
and arrange to have
.I fn
return a nonzero value at its next invocation.
 W  inch.3v  any position
in the file, but when output is written
to the file, the current file pointer is disregard./share/man/man3/func_to_decimal.3                                                                     755       0      12          111  4424741171  12057                                                                                                                                                                                                                                                                                                                                                                      .so man3/string_to_decimal.3
.\" @(#)func_to_decimal.3 1.3 89/03/27 SMI;
.3m        gcd.3x       
gconvert.3        gcvt.3       get.3  m       get.3r t  <     get_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x   $    getch.3v  $  8    getch.3x./share/man/man3/fwrite.3s                                                                             755       0      12           67  4424741172  10422                                                                                                                                                                                                                                                                                                                                                                      .so man3/fread.3s
.\" @(#)fwrite.3s 1.6 89/03/27 SMI; 
  gcd.3x       
gconvert.3        gcvt.3 
      get.3        get.3r   <     get_myaddress.3n r t  P    
getacdir.3 s  d    
getacflg.3 a  x    getacinfo.3       
getacmin.3 a      getauditflags.3        getauditflagsbin.3         getauditflagschar.3       getc.3s       getc.3v       	getcap.3x    $    getch.3v etc  8    getch.3x etc  L    
getchar.3s c  `./share/man/man3/gamma.3m                                                                              755       0      12          103  4424741172  10205                                                                                                                                                                                                                                                                                                                                                                      .so man3/lgamma.3m
.\" @(#)gamma.3m 1.8 89/03/27 SMI; from UCB 4.2
       gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3 t  d    
getacflg.3 s  x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x v   $    getch.3v     8    getch.3x etc  L    
getchar.3s c  `     
getchar.3v c  t./share/man/man3/gcd.3x                                                                                755       0      12           60  4424741172   7655                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)gcd.3x 1.5 89/03/27 SMI;
    gcvt.3 t      get.3 vt       get.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3 t  x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x v   $    getch.3v  v   8    getch.3x     L    
getchar.3s c  `     
getchar.3v c  t    getcwd.3 v c  ./share/man/man3/gconvert.3                                                                            755       0      12           71  4424741172  10561                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)gconvert.3 1.3 89/03/27 SMI;
et.3  t       get.3r t  <     get_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x   $    getch.3v  $  8    getch.3x  8  L    
getchar.3s L  `     
getchar.3v `  t    getcwd.3  t      getenv.3  ./share/man/man3/gcvt.3                                                                                755       0      12           66  4424741172   7701                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)gcvt.3 1.6 89/03/27 SMI; 
t.3r .  <     get_myaddress.3n    P    
getacdir.3   d    
getacflg.3 P  x    getacinfo.3       
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x v   $    getch.3v    8    getch.3x  $  L    
getchar.3s 8  `     
getchar.3v L  t    getcwd.3 v `      getenv.3  t      getexportent./share/man/man3/get.3                                                                                 755       0      12           65  4424741173   7515                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)get.3 1.3 89/03/27 SMI;
et_myaddress.3n     P    
getacdir.3 P  d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x   $    getch.3v  $  8    getch.3x  8  L    
getchar.3s L  `     
getchar.3v `  t    getcwd.3  t      getenv.3        getexportent.3       gete./share/man/man3/get.3r                                                                                755       0      12           67  4424741173   7701                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)get.3r 1.3 89/03/27 SMI;
P    
getacdir.3 P  d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x   $    getch.3v  $  8    getch.3x  8  L    
getchar.3s L  `     
getchar.3v `  t    getcwd.3  t      getenv.3        getexportent.3       getexportopt.3     ./share/man/man3/get_myaddress.3n                                                                      755       0      12           73  4424741173  11745                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)get_myaddress.3n 1.4 89/03/27 SMI;
d    
getacflg.3 d  x    getacinfo.3       
getacmin.3       getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x   $    getch.3v  $  8    getch.3x  8  L    
getchar.3s L  `     
getchar.3v `  t    getcwd.3  t      getenv.3        getexportent.3       getexportopt.3       
getfaudflgs.3 ./share/man/man3/getacdir.3                                                                            755       0      12           72  4424741173  10516                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)getacdir.3 1.3 89/03/27 SMI;
 getacinfo.3       
getacmin.3 a      getauditflags.3        getauditflagsbin.3         getauditflagschar.3       getc.3s       getc.3v       	getcap.3x    $    getch.3v etc  8    getch.3x etc  L    
getchar.3s c  `     
getchar.3v c  t    getcwd.3 etc      getenv.3 etc      getexportent.3 3      getexportopt.3 t      
getfaudflgs.3 pt       getfauditflags.3  ./share/man/man3/getacflg.3                                                                            755       0      12           72  4424741173  10510                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)getacflg.3 1.3 89/03/27 SMI;
 
getacmin.3        getauditflags.3        getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x v   $    getch.3v     8    getch.3x etc  L    
getchar.3s c  `     
getchar.3v c  t    getcwd.3 v c      getenv.3 etc      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3 ./share/man/man3/getacinfo.3                                                                           755       0      12         5042  4424741173  10735                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getacinfo.3 1.13 89/03/27 SMI
.TH GETACINFO 3 "22 November 1987"
.SH NAME
getacinfo, getacdir, getacflg, getacmin, setac, endac \- get audit control file information
.SH SYNOPSIS
.nf
.LP
.B int getacdir(dir, len)
.B char \(**dir;
.B int len;
.LP
.B int getacmin(min_val)
.B int \(**min_val;
.LP
.B int getacflg(auditstring, len)
.B char \(**auditstring;
.B int len;
.LP
.B void setac(\|)
.LP
.B void endac(\|)
.fi
.SH DESCRIPTION
.IX "getacinfo function" "" "\fLgetacinfo()\fP function"
.IX "getacdir function" "" "\fLgetacdir()\fP function"
.IX "getacflg function" "" "\fLgetacflg()\fP function"
.IX "getacmin function" "" "\fLgetacmin()\fP function"
.IX "setac function" "" "\fLsetac()\fP function"
.IX "endac function" "" "\fLendac()\fP function"
.LP
When first called,
.B getacdir(\|)
provides information about the first audit directory in the
.B audit_control
file; thereafter, it returns the next directory in the file.
Successive calls list all the directories listed in
.BR audit_control (5)
The parameter
.I len
specifies the length of the buffer
.I dir .
On return,
.I dir
points to the directory entry.
.LP
.B getacmin(\|)
reads the minimum value from the
.B audit_control
file and returns the
value in
.BR min_val .
The minimum value specifies how full the file system to
which the audit files are being written can get before the script
.B audit_warn
is invoked.
.LP
.B getacflg(\|)
reads the system audit value from the
.B audit_control
file and returns the value in
.BR auditstring .
The parameter
.I len
specifies the length of the buffer
.BR auditstring .
.LP
Calling
.I setac
rewinds the
.B audit_control
file to allow repeated searches.
.LP
Calling
.I endac
closes the
.B audit_control
file when processing is complete.
.LP
.\" .SH FILES
.\" .PD 0
.\" .TP 20
.\" .B /etc/security/audit/audit_control
.\" .PD
.SH RETURN VALUE
Upon successful completion of all
.BR getac .\|.\|.
functions, a zero is returned.
.B getacmin(\|)
and
.B getacflg(\|)
return a
.B 1
on
.SM EOF\s0.
Only
.B getacdir(\|)
returns a
.B 2
if the directory search had to start from the beginning because another
.BR getac .\|.\|.
function was called between calls to
.BR getacdir .
.SH ERRORS
Upon unsuccessful completion, a value of \-2 is returned and
.B errno
is set to indicate the error.  \-3 is returned if the directory entry
format in the.
.B audit_control
file is incorrect.
If the input buffer is too short to accommodate the record,
.B getacdir(\|)
and
.B getacflg(\|)
return an error code of \-3.
Only
.B getacdir(\|)
returns a
\-1 on end of file.
.SH "SEE ALSO"
.BR audit_control (5)
(\|)
is forcibly terminated, such as by
.B longjmp(\|)
being executed by
.I fn
or an interrupt routine,
.B ftw(\|)
will not have a chance to free that storage,
so it will remain permanently allocated.
A safe way to handle interrupts is to store
the fact that an interrupt has occurred,
and arrange to have
.I fn
return a nonzero value at its next invocation.
 W  inch.3v  any position
in the file, but when output is written
to the file, the current file pointer is disregard./share/man/man3/getacmin.3                                                                            755       0      12           72  4424741174  10524                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)getacmin.3 1.3 89/03/27 SMI;
   getauditflagsbin.3        getauditflagschar.3       getc.3s       getc.3v       	getcap.3x v   $    getch.3v  v   8    getch.3x  v   L    
getchar.3s   `     
getchar.3v c  t    getcwd.3 v c      getenv.3 v c      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3 ./share/man/man3/getauditflags.3                                                                       755       0      12         3300  4424741174  11615                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getauditflags.3 1.11 89/03/27 SMI;
.TH GETAUDITFLAGS 3 "6 October 1987"
.SH NAME
getauditflagsbin, getauditflagschar \- convert audit flag specifications
.SH SYNOPSIS
.nf
.B #include <sys/label.h>
.B #include <sys/audit.h>
.B #include <sys/auevents.h>
.LP
.B int getauditflagsbin(auditstring, masks)
.B char *auditstring;
.B audit_state_t *masks;
.LP
.B int getauditflagschar(auditstring, masks, verbose)
.B char *auditstring;
.B audit_state_t *masks;
.B int verbose;
.fi
.SH DESCRIPTION
.IX "getauditflagsbin function" "" "\fLgetauditflagsbin()\fP function"
.IX "getauditflagschar function" "" "\fLgetauditflagschar()\fP function"
.LP
.B getauditflagsbin(\|)
converts the character representation of audit values pointed to by
.I auditstring
into
.B audit_state_t
fields pointed to by
.IR masks .
These fields indicate which events are to be audited when they succeed
and which are to be audited when they fail.
The character string syntax is described in
.BR audit_control (5).
.LP
.B getauditflagschar(\|)
converts the
.B audit_state_t
fields pointed to by
.I masks
into a string pointed to by
.IR auditstring .
If
.I verbose
is zero, the short (2-character) flag names are used.
If
.I verbose
is non-zero, the long flag names are used.
.I auditstring
should be large enough to contain the
.SM ASCII
representation of the events.
.LP
.I auditstring
contains a series of event names, each one identifying a single audit
class, separated by commas.  The
.B audit_state_t
fields pointed to by
.I masks
correspond to binary values defined in
.IR audit.h .
.SH DIAGNOSTICS
\-1 is returned on error and 0 on success.
.SH "SEE ALSO"
.BR audit.log (5),
.BR audit_control (5)
.SH BUGS
This is not a very extensible interface.
getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3     >  getyx.3x .3     ?  gmtime.3 .3     @  	gmtime.3v 3     A  	grpauth.3      B  	gsignal.3 ty    C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G./share/man/man3/getauditflagsbin.3                                                                    755       0      12          106  4424741174  12267                                                                                                                                                                                                                                                                                                                                                                      .so man3/getauditflags.3
.\" @(#)getauditflagsbin.3 1.3 89/03/27 SMI;
  getc.3s       getc.3v       	getcap.3x tc  $    getch.3v p.3  8    getch.3x .3v  L    
getchar.3s x  `     
getchar.3v .  t    getcwd.3 ar.      getenv.3 d.3      getexportent.3 c      getexportopt.3       
getfaudflgs.3         getfauditflags.3         
getfsent.3 3      getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d./share/man/man3/getauditflagschar.3                                                                   755       0      12          107  4424741174  12435                                                                                                                                                                                                                                                                                                                                                                      .so man3/getauditflags.3
.\" @(#)getauditflagschar.3 1.3 89/03/27 SMI;
       	getcap.3x    $    getch.3v etc  8    getch.3x etc  L    
getchar.3s c  `     
getchar.3v c  t    getcwd.3 etc      getenv.3 etc      getexportent.3 3      getexportopt.3 t      
getfaudflgs.3 pt       getfauditflags.3          
getfsent.3 a      getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
./share/man/man3/getc.3s                                                                               755       0      12         6577  4424741174  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getc.3s 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETC 3S "18 November 1987"
.SH NAME
getc, getchar, fgetc, getw \- get character or integer from stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B int getc(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int getchar(\|)
.LP
.B int fgetc(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int getw(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "getc macro"  ""  "\fLgetc\fP \(em get character from stream"
.IX  get "character from stream \(em \fLgetc\fP"
.IX  get "character from stream \(em \fLfgetc\fP"
.IX  "getchar macro"  ""  "\fLgetchar\fP \(em get character from stdin"
.IX  "fgetc function"  ""  "\fLfgetc\fP \(em get character from stream"
.IX  "getw macro"  ""  "\fLgetw\fP \(em get word from stream"
.IX  get "word from stream \(em \fLgetw\fP"
.IX  stream  "get character getc"  ""  "get character \(em \fLgetc\fP"
.IX  stream  "get character getchar"  ""  "get character \(em \fLgetchar\fP"
.IX  stream  "get character fgetc"  ""  "get character \(em \fLfgetc\fP"
.IX  stream  "get word getw"  ""  "get word \(em \fLgetw\fP"
.IX  stdin  "get character"  ""  "get character \(em \fLgetchar\fP"
.IX  character  "get from stream getc"  ""  "get from stream \(em \fLgetc\fP"
.IX  character  "get from stdin"  ""  "get from stdin \(em \fLgetchar\fP"
.IX  character  "get from stream fgetc"  ""  "get from stream \(em \fLfgetc\fP"
.IX  word  "get from stream"  word  "get from stream \(em \fLgetw\fP"
.SH DESCRIPTION
.B getc(\|)
returns the next character (that is, byte) from the named input
stream,
as an integer.
It also moves the file pointer, if defined,
ahead one character in
stream.
.B getchar(\|)
is defined as
.BR getc(stdin) .
.BR getc " and " getchar
are macros.
.LP
.B fgetc(\|)
behaves like
.BR getc ,
but is a function rather than a macro.
.B fgetc(\|)
runs more slowly than
.BR getc ,
but it takes less space per invocation and its name can
be passed as an argument to a function.
.LP
.B getw(\|)
returns the next C
.B int
.BI ( word )
from the named input
stream.
.B getw(\|)
increments the associated file pointer, if defined,
to point to the next word.
The size of a word is the size of an integer and varies from machine
to machine.
.B getw(\|)
assumes no special alignment in the file.
.SH "SEE ALSO"
.BR ferror (3S),
.BR fopen (3S),
.BR fread (3S),
.BR gets (3S),
.BR putc (3S),
.BR scanf (3S),
.BR ungetc (3S)
.SH DIAGNOSTICS
These functions return the integer constant
.SM EOF
at
.SM EOF
or upon an error. The
.SM EOF
condition is remembered, even on a terminal,
and all subsequent attempts to read will return
.SM EOF
until the condition is cleared with
.B clearerr
(see
.BR ferror (3S))
Because
.SM EOF
is a valid integer,
.BR ferror (3S)
should be used to detect
.B getw(\|)
errors.
.SH WARNING
If the integer value returned by
.BR getc ", " getchar ", or " fgetc
is stored into a character variable and then compared against
the integer constant
.SM EOF\s0,
the comparison may never succeed, because sign-extension of a character
on widening to integer is machine-dependent.
.SH BUGS
Because it is implemented as a macro,
.B getc(\|)
treats a
stream
argument with side effects incorrectly.  In particular,
.B getc(\(**f\(pl\(pl)
does not work sensibly.
.B fgetc(\|)
should be used instead.
.LP
Because of possible differences in word length and byte ordering,
files written using
.B putw(\|)
are machine-dependent, and may not be readable using
.B getw(\|)
on a different processor.
en.
.SH "SEE ALSO"
.BR open (2V),
.BR pipe (2),
.BR fclose (3S),
.BR fopen (3S),
.BR fseek (3S)
.SH DIAGNOSTICS
.BR fopen ,
.BR f./share/man/man3/getc.3v                                                                               755       0      12         6762  4424741175  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getc.3v 1.9 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETC 3V "18 November 1987"
.SH NAME
getc, getchar, fgetc, getw \- get character or integer from stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B int getc(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int getchar(\|)
.LP
.B int fgetc(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int getw(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "getc macro V"  ""  "\fLgetc\fP \(em get character from stream, System V"
.IX  "get character from stream getc V"  ""  "get character from stream, System V \(em \fLgetc\fP"
.IX  "get character from stream fgetc V"  ""  "get character from stream, System V \(em \fLfgetc\fP"
.IX  "getchar macro V"  ""  "\fLgetchar\fP \(em get character from stdin, System V"
.IX  "fgetc function V"  ""  "\fLfgetc\fP \(em get character from stream, System V"
.IX  "getw macro V"  ""  "\fLgetw\fP \(em get word from stream, System V"
.IX  "get word from stream V"  ""  "get word from stream, System V \(em \fLgetw\fP"
.IX  stream  "get character getc V"  ""  "get character, System V \(em \fLgetc\fP"
.IX  stream  "get character getchar V"  ""  "get character, System V \(em \fLgetchar\fP"
.IX  stream  "get character fgetc V"  ""  "get character, System V \(em \fLfgetc\fP"
.IX  stream  "get word getw V"  ""  "get word, System V \(em \fLgetw\fP"
.IX  stdin  "get character V"  ""  "get character, System V \(em \fLgetchar\fP"
.IX  character  "get from stream getc V"  ""  "get from stream, System V \(em \fLgetc\fP"
.IX  character  "get from stdin V"  ""  "get from stdin, System V \(em \fLgetchar\fP"
.IX  character  "get from stream fgetc V"  ""  "get from stream, System V \(em \fLfgetc\fP"
.IX  word  "get from stream V"  word  "get from stream, System V \(em \fLgetw\fP"
.SH DESCRIPTION
.B getc(\|)
returns the next character (that is, byte) from the named input
stream,
as an integer.  It also moves the file pointer,
if defined, ahead one character in
stream.
.B getchar(\|)
is defined as
.BR getc(stdin) .
.BR getc " and " getchar
are macros.
.LP
.B fgetc(\|)
behaves like
.BR getc ,
but is a function rather than a macro.
.B fgetc(\|)
runs more slowly than
.BR getc ,
but it takes less space per invocation and its name can
be passed as an argument to a function.
.LP
.B getw(\|)
returns the next C
.B int
.BI ( word )
from the named input
stream.
.B getw(\|)
increments the associated file pointer, if defined,
to point to the next word.
The size of a word is the size of an integer and varies from machine
to machine.
.B getw(\|)
assumes no special alignment in the file.
.SH "SEE ALSO"
.BR ferror (3S),
.BR fopen (3S),
.BR fread (3S),
.BR gets (3S),
.BR putc (3S),
.BR scanf (3S),
.BR ungetc (3S)
.SH DIAGNOSTICS
These functions return the integer constant
.SM EOF
at
.SM EOF
or upon an error.  Because
.SM EOF
is a valid integer,
.BR ferror (3S)
should be used to detect
.B getw(\|)
errors.
.SH WARNING
If the integer value returned by
.BR getc ", " getchar ", or " fgetc
is stored into a character variable and then compared against
the integer constant
.SM EOF\s0,
the comparison may never succeed, because sign-extension of a character
on widening to integer is machine-dependent.
.SH BUGS
Because it is implemented as a macro,
.B getc(\|)
treats a
stream
argument with side effects incorrectly.  In particular,
.B getc(\(**f\(pl\(pl)
does not work sensibly.
.B fgetc(\|)
should be used instead.
.LP
Because of possible differences in word length and byte ordering,
files written using
.B putw(\|)
are machine-dependent, and may not be readable using
.B getw(\|)
on a different processor.
 fopen ,
.BR f./share/man/man3/getcap.3x                                                                             755       0      12           70  4424741175  10367                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)getcap.3x 1.6 89/03/27 SMI; 
  getch.3x  8  L    
getchar.3s L  `     
getchar.3v `  t    getcwd.3  t      getenv.3        getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3          
getfsent.3        getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3 x      
getgrgid.3       
getgrnam.3        ./share/man/man3/getch.3v                                                                              755       0      12           66  4424741175  10221                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)getch.3v 1.5 89/03/27 SMI;
  
getchar.3s 8  `     
getchar.3v L  t    getcwd.3 v `      getenv.3  t      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3 x      
getgrnam.3        gethostbyaddr.3n    ./share/man/man3/getch.3x                                                                              755       0      12           67  4424741175  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)getch.3x 1.6 89/03/27 SMI; 
   
getchar.3v 8  t    getcwd.3 v L      getenv.3 v `      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3 x       gethostbyaddr.3n         gethostbyname.3n./share/man/man3/getchar.3s                                                                            755       0      12           67  4424741175  10542                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3s
.\" @(#)getchar.3s 1.6 89/03/27 SMI; 
  getcwd.3 v 8      getenv.3 v L      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3         gethostbyaddr.3n         gethostbyname.3n        
gethoste./share/man/man3/getchar.3v                                                                            755       0      12           66  4424741176  10545                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3v
.\" @(#)getchar.3v 1.4 89/03/27 SMI;
  getenv.3 v 8      getexportent.3       getexportopt.3       
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3         gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getl./share/man/man3/getcwd.3                                                                              755       0      12         3156  4424741176  10262                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getcwd.3 1.10 89/03/27 SMI; from S5R2
.TH GETCWD 3 "22 November 1987"
.SH NAME
getcwd \- get pathname of current working directory
.SH SYNOPSIS
.nf
.B char \(**getcwd (buf, size)
.B char \(**buf;
.B int size;
.fi
.SH DESCRIPTION
.IX get "pathname of current working directory \(em \fLgetcwd\fR"
.IX "getcwd function" "" "\fLgetcwd\fR \(em get pathname of current directory"
.IX "current working directory getcwd" "" "current working directory \(em \fLgetcwd\fR"
.B getcwd(\|)
returns a pointer to the current directory pathname.
The value of
.I size
must be at least two greater than the length of the
pathname to be returned.
.LP
If
.I buf
is a
.SM NULL
pointer,
.B getcwd(\|)
will obtain
.I size
bytes of space using
.BR malloc (3).
In this case, the pointer returned by
.B getcwd(\|)
may be used as the argument in a subsequent call to
.BR free .
.LP
The function is implemented by using
.BR popen (3S)
to pipe the output of the
.BR pwd (1)
command into the specified string space.
.SH EXAMPLE
.RS
.nf
.ft B
char *cwd, *getcwd(\|);
\&.
\&.
\&.
if ((cwd = getcwd((char *)\s-1NULL\s0, 64)) == \s-1NULL\s0) {
.RS
.ft B
perror (\(lqpwd\(rq);
exit (1);
.RE
.ft B
}
printf(\(lq%s\en\(rq, cwd);
.fi
.ft R
.RE
.SH "SEE ALSO"
.BR malloc (3),
.BR popen (3S),
.BR pwd (1)
.SH DIAGNOSTICS
Returns
.SM NULL
with
.B errno
set if
.I size
is not large enough, or if an error ocurrs
in a lower-level function.
.SH BUGS
Since this function uses
.B popen(\|)
to create a pipe to the
.B pwd
command, it is slower than
.B getwd(\|)
and gives poorer error diagnostics.
.B getcwd(\|)
is provided only for compatibility with other
.SM UNIX
operating systems.
be returned.
.LP
If
.I buf
is a
.SM NULL
pointer,
.B getcwd(\|)
will obtain
.I size
bytes of space using
.BR malloc (3).
In this case, the pointer returned by
.B getcwd(\|)
may be used as the argument in a subsequent call to
.BR free .
.LP
The function is implemented by using
.BR popen (3S)
to pipe the output of the
.BR pwd (1)
command into the specified string space.
.SH EXAMPLE
.RS
.nf
.ft B
char ./share/man/man3/getenv.3                                                                              755       0      12         1243  4424741176  10270                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getenv.3 1.13 89/03/27 SMI; from UCB 4.3 and S5
.TH GETENV 3 "6 October 1987"
.SH NAME
getenv \- return value for environment name
.SH SYNOPSIS
.nf
.B char *getenv(name)
.B char *name;
.fi
.IX  "getenv function"  ""  "\fLgetenv\fP \(em get value from environment"
.IX  get "environment value \(em \fLgetenv\fP"
.IX  environment  "get value"  ""  "get value \(em \fLgetenv\fP"
.SH DESCRIPTION
.B getenv(\|)
searches the environment list
(see
.BR environ (5V))
for a string of the form
.IB name = value ,
and returns a pointer to the string
.I value
if such a string is present, otherwise
.SM NULL
pointer.
.SH SEE ALSO
.BR environ (5V),
.BR execve (2),
.BR putenv (3)
pass.3       
getpass.3v        getprotobyname.3n        getprotoent.3n         getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3      %  getpwent.3v     &  
getpwnam.3      '  getpwnam.3v     (  
getpwuid.3      )./share/man/man3/getexportent.3                                                                        755       0      12           76  4424741176  11473                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)getexportent.3 1.3 89/03/27 SMI;
  
getfaudflgs.3        getfauditflags.3         
getfsent.3       getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3         gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    ./share/man/man3/getexportopt.3                                                                        755       0      12           76  4424741176  11507                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)getexportopt.3 1.3 89/03/27 SMI;
   getfauditflags.3         
getfsent.3 3      getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3 a      
getgrgid.3 t      
getgrnam.3 d       gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3 3      getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    ./share/man/man3/getfaudflgs.3                                                                         755       0      12          102  4424741176  11244                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfauditflags.3
.\" @(#)getfaudflgs.3 1.3 89/03/27 SMI;
  
getfsent.3 3      getfsfile.3   (  	  getfsspec.3   <  
  getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3 a      
getgrgid.3 t      
getgrnam.3 d       gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3 3      getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n 3n   x    ./share/man/man3/getfauditflags.3                                                                      755       0      12         3756  4424741177  12005                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getfauditflags.3 1.4 89/03/27 SMI;
.TH GETFAUDITFLAGS 3 "22 March 1989"
.SH NAME
getfauditflags \- generates the process audit state
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/audit.h>
.B #include <sys/label.h>
.LP
.B void getfauditflags(usremasks, usrdmasks, lastmasks)
.B audit_state_t *usremasks;
.B audit_state_t *usrdmasks;
.B audit_state_t *lastmasks;
.fi
.SH DESCRIPTION
.IX "getauditflags function" "" "\fLgetauditflags()\fP function"
.LP
.B getfauditflags
generates the process audit state from the user audit value as input
to
.B getfauditflags
and the system audit value as specified in the
.B audit_control
file.
.B getfauditflags
obtains the system audit value by calling
.BR getacflg .
The user audit value, pointed to by
.I usremasks
and
.I usrdmasks
is passed into
.B getfauditflags.
.LP
.I usremasks
points to
.B audit_state_t
fields which contains two values.  The first
value defines which events are
.I always
to be audited when they they succeed.
The second value defines defines which events are
always to be audited when they they fail.
.LP
.I usrdmasks
also points to
.B audit_state_t
fields which contains two values.  The first
value defines which events are
.I never
to be audited when they they
succeed.
The second value defines defines which events are
never to be audited when they they fail.
.LP
The structures pointed to by
.I usremasks
and
.I usrdmasks
may be obtained from the
.B passwd.adjunct
file by calling
.B getpwaent(\|)
which returns a pointer to a strucure containing all
.B passwd.adjunct
fields for a user.
.LP
.I lastmasks
points to
.B audit_state_t
as well.
The first value defines which events are to be audited
when they succeed
and the second value defines which events are to be
audited when they fail.
.LP
Both
.I usremasks
and
.I usrdmasks
override the values in the system audit values.
.SH DIAGNOSTICS
.SM -1
is returned on error and
.SM 0
on success.
.SH "SEE ALSO"
.BR getauditflags (3),
.BR getacinfo (3),
.BR audit.log (5),
.BR audit_control (5)
v m       W  ./share/man/man3/getfsent.3                                                                            755       0      12         4762  4424741177  10631                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)getfsent.3 1.13 89/03/27 SMI; from UCB 6.3 5/12/86
.TH GETFSENT 3  "6 October 1987"
.SH NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent \- get file system descriptor file entry
.SH SYNOPSIS
.nf
.B #include <fstab.h>
.LP
.B struct fstab *getfsent(\|)
.LP
.B struct fstab *getfsspec(spec)
.B char *spec;
.LP
.B struct fstab *getfsfile(file)
.B char *file;
.LP
.B struct fstab *getfstype(type)
.B char *type;
.LP
.B int setfsent(\|)
.LP
.B int endfsent(\|)
.fi
.IX  "getfsent function"  ""  "\fLgetfsent\fP \(em get file system descriptor file entry"
.IX  "getfsspec function"  ""  "\fLgetfsspec\fP \(em get file system descriptor file entry"
.IX  "getfsfile function"  ""  "\fLgetfsfile\fP \(em get file system descriptor file entry"
.IX  "getfstype function"  ""  "\fLgetfstype\fP \(em get file system descriptor file entry"
.IX  "setfsent function"  ""  "\fLsetfsent\fP \(em get file system descriptor file entry"
.IX  "endfsent function"  ""  "\fLendfsent\fP \(em get file system descriptor file entry"
.IX  "file system"  "get file descriptor entry"
.IX  get "file system descriptor file entry"
.SH DESCRIPTION
.LP
These routines are included for compatibility with 4.2
.SM BSD\s0;
they have been superseded by the
.BR getmntent (3)
library routines.
.LP
.BR getfsent ,
.IR getfsspec ,
.IR getfstype ,
and
.I getfsfile
each return a pointer to an object with the following structure
containing the broken-out fields of a line in the file system description file,
.RB < fstab.h >.
.RS
.sp .5
.nf
.ft B
struct fstab {
	char	*fs_spec;
	char	*fs_file;
	char	*fs_type;
	int	fs_freq;
	int	fs_passno;
};
.ft R
.ad
.fi
.RE
.LP
The fields have meanings described in
.BR fstab (5).
.LP
.B getfsent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B getfsent(\|)
opens and rewinds the file.
.LP
.I endfsent
closes the file.
.LP
.I getfsspec
and
.I getfsfile
sequentially search from the beginning of the file until a matching
special file name or file system file name is found,
or until
.SM EOF
is encountered.
.I getfstype
does likewise, matching on the file system type field.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.PD
.SH "SEE ALSO"
.BR fstab (5)
.SH DIAGNOSTICS
.LP
Null pointer
(0) returned on
.SM EOF
or error.
.SH BUGS
.LP
The return value points to static information which is overwritten
in each call.
ile system des./share/man/man3/getfsfile.3                                                                           755       0      12           73  4424741177  10711                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfsent.3
.\" @(#)getfsfile.3 1.6 89/03/27 SMI; 
getfstype.3   P    getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3 g      
getgrnam.3 g       gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3 n      getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3  t.      	getp./share/man/man3/getfsspec.3                                                                           755       0      12           73  4424741177  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfsent.3
.\" @(#)getfsspec.3 1.6 89/03/27 SMI; 
getgraent.3   d    getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3 g       gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3 t.      
getp./share/man/man3/getfstype.3                                                                           755       0      12           73  4424741177  10753                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfsent.3
.\" @(#)getfstype.3 1.6 89/03/27 SMI; 
getgranam.3   x  
  
getgrent.3        
getgrgid.3        
getgrnam.3         gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v .       getp./share/man/man3/getgraent.3                                                                           755       0      12         4445  4424741200  10753                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getgraent.3 1.12 89/03/27 SMI;
.TH GETGRAENT 3 "22 March 1989"
.SH NAME
getgraent, getgranam, setgraent, endgraent, fgetgraent \- get group adjunct file entry
.SH SYNOPSIS
.nf
.B #include <grpadj.h>
.LP
.B struct group_adjunct *getgraent(\|)
.LP
.B struct group_adjunct *getgranam(name)
.B char *name;
.LP
.B struct group_adjunct *fgetgraent(f)
.br
.B FILE *f;
.LP
.B void setgraent(\|)
.LP
.B void endgraent(\|)
.fi
.SH DESCRIPTION
.IX "getgraent function" "" "\fLgetgraent()\fP function"
.IX "getgranam function" "" "\fLgetgranam()\fP function"
.IX "setgraent function" "" "\fLsetgraent()\fP function"
.IX "endgraent function" "" "\fLendgraent()\fP function"
.IX "fgetgraent function" "" "\fLfgetgraent()\fP function"
.LP
.B getgraent(\|)
and
.B getgranam(\|)
each return pointers to an object
with the following structure containing the broken-out
fields of a line in the group adjunct file.
Each line contains a
.B group_adjunct
structure, defined in the
.B <grpadj.h>
header file.
.RS
.LP
.nf
.ft B
struct  group_adjunct {
char    *gra_name;	/* the name of the group */
char    *gra_passwd;	/* the encrypted group password */
};
.ft R
.fi
.RE
.LP
When first called,
.B getgraent(\|)
returns a pointer to a
.B group_adjunct
structure corresponding to the first line in the file.
Thereafter, it returns a pointer to the next
.B group_adjunct
structure in the file.
So successive calls may be used to traverse the entire file.
.LP
For locating a particular group,
.B getgranam(\|)
searches through the file until it finds group
.IR filename ,
then returns a pointer to that structure.
.LP
A call to
.B getgraent(\|)
rewinds the group adjunct file to allow repeated searches.
A call to
.B endgraent(\|)
closes the group adjunct file when processing is complete.
.LP
Because read access is required on
.B /etc/security/group.adjunct,
.B getgraent(\|)
and
.B getgranam(\|)
will fail unless the calling process has effective UID of root.
.SH FILES
.PD 0
.TP 20
.B /etc/security/group.adjunct
.TP
.BI /var/yp/ domainname /group.adjunct
.PD
.SH "SEE ALSO"
.BR getlogin (3),
.BR getgrent(3),
.BR getpwaent(3),
.BR getpwent(3),
.\" .BR group.adjunct(5),
.BR ypserv(8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information is contained in a static area,
so it must be copied if it is to be saved.
nts the associated file pointer, if defined,
to point to the next word.
The size of a word is the size of an integer and varies from machine
to machine.
.B getw(\|)
assumes no special alignment in the file.
.SH "SEE ALS./share/man/man3/getgranam.3                                                                           755       0      12           73  4424741200  10671                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgraent.3
.\" @(#)getgranam.3 1.3 89/03/27 SMI;

getgrgid.3        
getgrnam.3         gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v        getprotobyname.3n        getprotoent.3n    ./share/man/man3/getgrent.3                                                                            755       0      12         7262  4424741200  10612                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getgrent.3 1.21 89/03/27 SMI; from UCB 4.3 and S5
.TH GETGRENT 3  "14 December 1987"
.SH NAME
getgrent, getgrgid, getgrnam, setgrent, endgrent, fgetgrent \- get group file entry
.SH SYNOPSIS
.nf
.B #include <grp.h>
.LP
.B struct group *getgrent(\|)
.LP
.B struct group *getgrgid(gid)
.B int gid;
.LP
.B struct group *getgrnam(name)
.B char *name;
.LP
.B setgrent(\|)
.LP
.B endgrent(\|)
.LP
.B struct group *fgetgrent(f)
.B \s-1FILE\s0 *f;
.fi
.IX  "getgrent function"  ""  "\fLgetgrent\fP \(em get group file entry"
.IX  "getgrgid function"  ""  "\fLgetgrgid\fP \(em get group file entry"
.IX  "getgrnam function"  ""  "\fLgetgrnam\fP \(em get group file entry"
.IX  "setgrent function"  ""  "\fLsetgrent\fP \(em get group file entry"
.IX  "endgrent function"  ""  "\fLendgrent\fP \(em get group file entry"
.IX  "fgetgrent function"  ""  "\fLfgetgrent\fP \(em get group file entry"
.IX  "get group file entry"  "getgrent"  ""  "\fLgetgrent\fP"
.IX  "get group file entry"  "getgrgid"  ""  "\fLgetgrgid\fP"
.IX  "get group file entry"  "getgrnam"  ""  "\fLgetgrnam\fP"
.IX  "get group file entry"  "setgrent"  ""  "\fLsetgrent\fP"
.IX  "get group file entry"  "endgrent"  ""  "\fLendgrent\fP"
.IX  "get group file entry"  "fgetgrent"  ""  "\fLfgetgrent\fP"
.IX  "group file entry \(em \fLgetgrent\fR"
.SH DESCRIPTION
.LP
.BR getgrent ,
.B getgrgid(\|)
and
.B getgrnam(\|)
each return pointers to an object
with the following structure containing the broken-out
fields of a line in the group file.
Each line contains a \(lqgroup\(rq structure, defined in the
.B <grp.h>
header file.
.RS
.LP
.nf
.ft B
struct	group {
	char	*gr_name;
	char	*gr_passwd;
	int	gr_gid;
	char	**gr_mem;
};
.ft R
.fi
.RE
.LP
The members of this structure are:
.LP
.PD 0
.TP 20
.B gr_name
The name of the group.
.TP
.B gr_passwd
The encrypted password of the group.
.TP
.B gr_gid
The numerical group
.SM ID\s0.
.TP
.B gr_mem
A
.SM NULL\s0-terminated
array of pointers to the individual member names.
.PD
.LP
.B getgrent(\|)
when first called returns a pointer to the first group structure in the file;
thereafter, it returns a pointer to the next group structure in the file;
so, successive calls may be
used to search the entire file.
.B getgrgid(\|)
searches from the beginning of the file until a numerical group
.SM ID
matching
.B gid
is found and returns a pointer to the particular structure in which
it was found.
.B getgrnam(\|)
searches from the beginning of the file until a group name matching
.I name
is found and returns a
pointer to the particular structure in which it was found.
If an end-of-file or an error
is encountered on reading, these functions return a
.SM NULL
pointer.
.LP
A call to
.B getgrent(\|)
has the effect of rewinding the group file to allow
repeated searches.
.B endgrent(\|)
may be called to
close the group file
when processing is complete.
.LP
.B fgetgrent(\|)
returns a pointer to the next group structure in the stream
.IR f ,
which must refer to an open file in the same format as the group file
.BR /etc/group .
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on 
.SM EOF
or error.
.SH FILES
.PD 0
.TP 20
.B /etc/group
.\" .TP
.\" .BI /var/yp/ domainname /group.byname
.\" .TP
.\" .BI /var/yp/ domainname /group.bygid
.PD
.SH "SEE ALSO"
.BR getlogin (3),
.BR getpwent (3),
.BR group (5),
.BR ypserv (8)
.SH BUGS
.LP
All information is contained in a static area, so it must be copied if it is
to be saved.
.LP
Unlike the corresponding routines for passwords (see
.BR getpwent (3)),
which always search the entire file, these routines start
searching from the current file location.
.SH WARNING
.LP
The above routines use
.BR <stdio.h> ,
which increases the size of programs,
not otherwise using standard I/O, more
than might be expected.
-file or error.
.SH BUGS
All information is contained in a static area,
so it must be copied if it is to be saved.
nts the associated file pointer, if defined,
to point to the next word.
The size of a word is the size of an integer and varies from machine
to machine.
.B getw(\|)
assumes no special alignment in the file.
.SH "SEE ALS./share/man/man3/getgrgid.3                                                                            755       0      12           72  4424741200  10517                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgrent.3
.\" @(#)getgrgid.3 1.6 89/03/27 SMI; 
 gethostbyaddr.3n         gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v        getprotobyname.3n        getprotoent.3n         getprotobynumber.3n   4     getpubli./share/man/man3/getgrnam.3                                                                            755       0      12           72  4424741200  10527                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgrent.3
.\" @(#)getgrnam.3 1.6 89/03/27 SMI; 
     gethostbyname.3n        
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v        getprotobyname.3n        getprotoent.3n         getprotobynumber.3n   4     getpublickey.3r   D  !  getp./share/man/man3/gethostbyaddr.3n                                                                      755       0      12          103  4424741201  11760                                                                                                                                                                                                                                                                                                                                                                      .so man3/gethostent.3n
.\" @(#)gethostbyaddr.3n 1.6 89/03/27 SMI; 
    
gethostent.3n       
getlogin.3       getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3       
getpass.3v        getprotobyname.3n        getprotoent.3n         getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaen./share/man/man3/gethostbyname.3n                                                                      755       0      12          103  4424741201  11766                                                                                                                                                                                                                                                                                                                                                                      .so man3/gethostent.3n
.\" @(#)gethostbyname.3n 1.6 89/03/27 SMI; 
  
getlogin.3 e      getmntent.3   0    getnetbyaddr.3n   H    getnetbyname.3n   `    getnetent.3n ame  x    getnetgrent.3n n      
getnetname.3n t.      getopt.3 tna      	getpass.3 to      
getpass.3v p       getprotobyname.3n         getprotoent.3n 3       getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3   ./share/man/man3/gethostent.3n                                                                         755       0      12         6167  4424741201  11341                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gethostent.3n 1.18 89/03/27 SMI; from UCB 4.2 BSD
.TH GETHOSTENT 3N "22 March 1989"
.SH NAME
gethostent, gethostbyaddr, gethostbyname, sethostent, endhostent \- get network host entry
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
.LP
.ft B
struct hostent *gethostent(\|)
.LP
.ft B
struct hostent *gethostbyname(name)
char *name;
.LP
.ft B
struct hostent *gethostbyaddr(addr, len, type)
struct addr_in*; int len, type;
.LP
.ft B
sethostent(stayopen)
int stayopen
endhostent(\|)
.ft R
.fi
.IX  get "network host entry \(em \fLgethostent\fR"
.IX  "network host entry, get \(em \fLgethostent\fR"
.IX  host "get network entry \(em \fLgethostent\fR"
.IX  "gethostent function"  ""  "\fLgethostent\fP \(em get network host entry"
.IX  "gethostbyaddr function"  ""  "\fLgethostbyaddr\fP \(em get network host entry"
.IX  "gethostbyname function"  ""  "\fLgethostbyname\fP \(em get network host entry"
.IX  "sethostent function"  ""  "\fLsethostent\fP \(em get network host entry"
.IX  "endhostent function"  ""  "\fLendhostent\fP \(em get network host entry"
.SH DESCRIPTION
.BR gethostent ,
.BR gethostbyname ,
and
.B gethostbyaddr(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the network host data base,
.BR /etc/hosts .
In the case of
.BR gethostbyaddr(\|) ,
.B addr
is a pointer to the binary format address of
length
.B len
(not a character string).
.RS
.LP
.nf
.ft B
struct	hostent {
	char	*h_name;	/* official name of host */
	char	**h_aliases;	/* alias list */
	int	h_addrtype;	/* address type */
	int	h_length;	/* length of address */
	char	**h_addr_list;	/* list of addresses from name server */
};
.ft R
.fi
.RE
.LP
The members of this structure are:
.TP 20
.B h_name
Official name of the host.
.TP
.B h_aliases
A zero terminated array of alternate names for the host.
.TP
.B h_addrtype
The type of address being returned; currently always
.BR \s-1AF_INET\s0.
.TP
.B h_length
The length, in bytes, of the address.
.TP
.B h_addr_list
A pointer to a list of network addresses for the named host.
Host addresses are returned in network byte order.
.LP
.B gethostent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B sethostent(\|)
opens and rewinds the file.  If the
.I stayopen
flag is non-zero,
the host data base will not be closed after each call to
.B gethostent(\|)
(either directly, or indirectly through one of the other
\*(lqgethost\*(rq calls).
.LP
.B endhostent(\|)
closes the file.
.LP
.B gethostbyname(\|)
and
.B gethostbyaddr(\|)
sequentially search from the beginning
of the file until a matching
host name or host address is found,
or until end-of-file is encountered.
Host addresses are supplied in network order.
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
.\" .TP
.\" .BI /var/yp/ domainname /hosts.byname
.\" .TP
.\" .BI /var/yp/ domainname /hosts.byaddr
.PD
.SH "SEE ALSO"
.BR hosts (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.  Only the Internet
address format is currently understood.
tbyaddr, gethostbyname, sethostent, endhostent \- get network host entry
.SH SYNOPSIS
.nf
.ft B
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
.LP
.ft B
struct hostent *gethostent(\|)
.LP
.ft B
struct hostent *gethostbyname(name)
char *name;
.LP
.ft B
struct hostent *gethostbyaddr(addr, len, type)
struct addr_in*; int len, type;
.LP
.ft B
sethostent(stayopen)
int stayopen./share/man/man3/getlogin.3                                                                            755       0      12         2507  4424741201  10601                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getlogin.3 1.15 89/03/27 SMI; from UCB 4.3 and S5
.TH GETLOGIN 3 "6 October 1987"
.SH NAME
getlogin \- get login name
.SH SYNOPSIS
.B char *getlogin(\|)
.IX  "getlogin function"  ""  "\fLgetlogin\fP \(em get login name"
.IX  get "login name \(em \fLgetlogin\fP"
.IX  "login name, get \(em \fLgetlogin\fP"
.SH DESCRIPTION
.B getlogin(\|)
returns a pointer to the login name as found in
.BR /etc/utmp .
It may be used in conjunction with
.B getpwnam
to locate the correct password file entry when the same user ID
is shared by several login names.
.LP
If
.B getlogin(\|)
is called within a process that is not attached to a
terminal, or if there is no entry in
.B /etc/utmp
for the process's terminal, it returns a NULL pointer.
The correct procedure
for determining the login name
is to call
.IR cuserid ,
or to call
.B getlogin(\|)
and, if it fails, to call
.BR getpwuid ( getuid (\|)).
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.PD
.SH "SEE ALSO"
.BR cuserid (3S),
.BR getpwent (3),
.BR utmp (5)
.SH DIAGNOSTICS
Returns a
.SM NULL
pointer if the name is not found.
.SH BUGS
The return values point to static data whose content is
overwritten by each call.
.LP
.B getlogin(\|)
does not work for processes running under a
.B pty
(for example, emacs shell buffers, or shell tools)
unless the program ``fakes'' the login name in the
.B /etc/utmp
file.
	hcreate.3 sk    I  
hdestroy.3 .    J  host2netname.3n     K  	hsearch.3 me    L  htonl.3n ch.    M  htons.3n .3n    N  
hyperbolic.3m on      W  inch.3v ./share/man/man3/getmntent.3                                                                           755       0      12         6277  4424741201  11006                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getmntent.3 1.21 89/03/27 SMI; from UCB 4.2
.TH GETMNTENT 3 "26 February 1988"
.SH NAME
getmntent, setmntent, addmntent, endmntent, hasmntopt \- get file system descriptor file entry
.SH SYNOPSIS
.nf
.ft B
#include <stdio.h>
#include <mntent.h>
.sp.5
\s-1FILE\s0 *setmntent(filep, type)
char *filep;
char *type;
.sp.5
struct mntent *getmntent(filep)
\s-1FILE\s0 *filep;
.sp.5
int addmntent(filep, mnt)
\s-1FILE\s0 *filep;
struct mntent *mnt;
.sp.5
char *hasmntopt(mnt, opt)
struct mntent *mnt;
char *opt;
.sp.5
int endmntent(filep)
\s-1FILE\s0 *filep;
.fi
.IX  "setmntent function"  ""  "\fLsetmntent\fP \(em get filesystem descriptor file entry"
.IX  "getmntent function"  ""  "\fLgetmntent\fP \(em get filesystem descriptor file entry"
.IX  "addmntent function"  ""  "\fLaddmntent\fP \(em get filesystem descriptor file entry"
.IX  "endmntent function"  ""  "\fLendmntent\fP \(em get filesystem descriptor file entry"
.IX  "hasmntopt function"  ""  "\fLhasmntopt\fP \(em get filesystem descriptor file entry"
.IX  "get filesystem descriptor file entry"  "setmntent"  ""  "\fLsetmntent\fP"
.IX  "get filesystem descriptor file entry"  "getmntent"  ""  "\fLgetmntent\fP"
.IX  "get filesystem descriptor file entry"  "addmntent"  ""  "\fLaddmntent\fP"
.IX  "get filesystem descriptor file entry"  "endmntent"  ""  "\fLendmntent\fP"
.IX  "get filesystem descriptor file entry"  "hasmntopt"  ""  "\fLhasmntopt\fP"
.IX  "filesystem descriptor, get file entry"
.SH DESCRIPTION
.LP
These routines replace the
.B getfsent(\|)
routines for accessing the file system description file
.BR /etc/fstab .
They are also used to access the mounted file system description file
.BR /etc/mtab .
.LP
.B setmntent(\|)
opens a file system description file and returns
a file pointer which can then be used with
.BR getmntent ,
.BR addmntent ,
or
.BR endmntent .
The
.I type
argument is the same as in
.BR fopen (3).
.B getmntent(\|)
reads the next line from
.I filep
and returns a pointer to an object with the following structure
containing the broken-out fields of a line in the filesystem description file,
.BR <mntent.h> .
The fields have meanings described in
.BR fstab (5).
.RS
.LP
.ta \w'#define'u +\w'char\0\0'u +\w'*mnt_fsname;\0\0'u
.nf
.ft B
struct mntent {
	char    *mnt_fsname;    /* file system name */
	char    *mnt_dir;       /* file system path prefix */
	char    *mnt_type;      /* 4.2, nfs, swap, or xx */
	char    *mnt_opts;      /* ro, quota, etc. */
	int	mnt_freq;	/* dump frequency, in days */
	int	mnt_passno;	/* pass number on parallel fsck */
};
.ft R
.fi
.RE
.LP
.B addmntent(\|)
adds the
.B mntent
structure
.I mnt
to the end of the open file
.IR filep .
Note: 
.I filep
has to be opened for writing if this is to work.
.B hasmntopt(\|)
scans the
.B mnt_opts
field of the
.B mntent
structure
.I mnt
for a substring that matches
.IR opt .
It returns the address of the substring if a match is found,
0 otherwise.
.B endmntent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH "SEE ALSO"
.BR fopen (3S),
.BR getfsent (3),
.BR fstab (5)
.SH DIAGNOSTICS
.LP
.SM NULL
pointer (0) returned on
.SM EOF
or error.
.SH BUGS
.LP
The returned
.B mntent
structure points to static information that is overwritten in each call.
 incorrectly.  In particular,
.B getc(\(**f\(pl\(pl)
does not work sensibly.
.B fgetc(\|)
should be used instead.
.LP
Because of possible differences in word length and byte ordering,
files written using
.B putw(\|)
are machine-dependent, and may not be readable using
.B getw(\|)
on a different processor.
 fopen ,
.BR f./share/man/man3/getnetbyaddr.3n                                                                       755       0      12          101  4424741201  11567                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetent.3n
.\" @(#)getnetbyaddr.3n 1.6 89/03/27 SMI; 
 getnetent.3n  `  x    getnetgrent.3n x      
getnetname.3n       getopt.3        	getpass.3  n      
getpass.3v 3       getprotobyname.3n        getprotoent.3n         getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3      %  getpwent.3v     &  
getpwnam.3      '  getpwnam.3v     (  
getp./share/man/man3/getnetbyname.3n                                                                       755       0      12          101  4424741202  11576                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetent.3n
.\" @(#)getnetbyname.3n 1.6 89/03/27 SMI; 
 getnetgrent.3n `      
getnetname.3n  x      getopt.3 e.3      	getpass.3 .3      
getpass.3v .       getprotobyname.3n        getprotoent.3n        getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3 a    %  getpwent.3v     &  
getpwnam.3 t    '  getpwnam.3v     (  
getpwuid.3 m    )  getpwuid./share/man/man3/getnetent.3n                                                                          755       0      12         5572  4424741202  11152                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getnetent.3n 1.16 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETNETENT 3N "14 December 1987"
.SH NAME
getnetent, getnetbyaddr, getnetbyname, setnetent, endnetent \- get network entry
.SH SYNOPSIS
.nf
.ft B
#include <netdb.h>
.LP
.ft B
struct netent *getnetent(\|)
.LP
.ft B
struct netent *getnetbyname(name)
char *name;
.LP
.ft B
struct netent *getnetbyaddr(net, type)
long net;
int type;
.LP
.ft B
.BR setnetent (stayopen)
int stayopen;
.LP
.ft B
.BR endnetent (\|)
.ft R
.fi
.IX  get "network entry \(em \fLgetnetent\fR"
.IX  "network entry, get \(em \fLgetnetent\fR"
.IX  "getnetent function"  ""  "\fLgetnetent\fP \(em get network entry"
.IX  "getnetbyaddr function"  ""  "\fLgetnetbyaddr\fP \(em get network entry"
.IX  "getnetbyname function"  ""  "\fLgetnetbyname\fP \(em get network entry"
.IX  "setnetent function"  ""  "\fLsetnetent\fP \(em get network entry"
.IX  "endnetent function"  ""  "\fLendnetent\fP \(em get network entry"
.SH DESCRIPTION
.BR getnetent ,
.BR getnetbyname ,
and
.B getnetbyaddr(\|)
each return a pointer to an object with the following structure
containing the broken-out fields of a line in the network data base,
.BR /etc/networks .
.RS
.LP
.nf
.ft B
struct	netent {
	char	*n_name;	/* official name of net */
	char	**n_aliases;	/* alias list */
	int	n_addrtype;	/* net number type */
	long	n_net;		/* net number */
};
.ft R
.fi
.RE
.LP
The members of this structure are:
.TP 20
.B n_name
The official name of the network.
.TP
.B n_aliases
A zero terminated list of alternate names for the network.
.TP
.B n_addrtype
The type of the network number returned; currently only
.BR \s-1AF_INET\s0 .
.TP
.B n_net
The network number.  Network numbers are returned in machine byte order.
.LP
.B getnetent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B getnetent(\|)
opens and rewinds the file.  If the
.I stayopen
flag is non-zero, the net data base will not be closed after each call to
.B getnetent(\|)
(either directly, or indirectly through one of
the other \*(lqgetnet\*(rq calls).
.LP
.B endnetent(\|)
closes the file.
.LP
.B getnetbyname(\|)
and
.B getnetbyaddr(\|)
sequentially search from the beginning of the file until a matching
net name or net address and type is found, or until end-of-file
is encountered.
Network numbers are supplied in host order.
.SH FILES
.PD 0
.TP 20
.B /etc/networks
.\" .TP
.\" .BI /var/yp/ domainname /networks.byname
.\" .TP
.\" .BI /var/yp/ domainname /networks.byaddr
.PD
.SH "SEE ALSO"
.BR networks (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information is contained in a static area so it must be copied if it is
to be saved.
.LP
Only Internet network numbers are currently understood.
nt(\|)
reads the next line from
.I filep
and returns a pointer to an object with the following structure
containing the broken-out fie./share/man/man3/getnetgrent.3n                                                                        755       0      12         5011  4424741202  11467                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getnetgrent.3n 1.14 89/03/27 SMI
.TH GETNETGRENT 3N "22 March 1989"
.SH NAME
getnetgrent, setnetgrent, endnetgrent, innetgr \- get network group entry
.SH SYNOPSIS
.LP
.ft B
getnetgrent(machinep, userp, domainp)
char **machinep, **userp, **domainp;
.ft R
.LP
.ft B
setnetgrent(netgroup)
char *netgroup
.ft R
.LP
.ft B
endnetgrent(\|)
.ft R
.LP
.ft B
innetgr(netgroup, machine, user, domain)
char *netgroup, *machine, *user, *domain;
.ft R
.fi
.IX  get "network group entry \(em \fLgetnetgrent\fR"
.IX  set "network group entry \(em \fLsetnetgrent\fR"
.IX  "network group entry, get \(em \fLgetnetgrent\fR"
.IX  "group entry, network \(em \fLgetnetgrent\fR"
.IX  "getnetgrent function"  ""  "\fLgetnetgrent\fP \(em get network group entry"
.IX  "setnetgrent function"  ""  "\fLsetnetgrent\fP \(em get network group entry"
.IX  "endnetgrent function"  ""  "\fLendnetgrent\fP \(em get network group entry"
.IX  "innetgr function"  ""  "\fLinnetgr\fP \(em get network group entry"
.SH DESCRIPTION
.LP
.B getnetgrent(\|)
returns the next member of a network group.
After the call,
.I machinep
will contain a pointer to a string containing the name
of the machine part of the network group member, and similarly for
.I userp
and
.IR domainp .
If any of
.IR machinep ,
.I userp
or
.I domainp
is returned as a
.SM NULL
pointer, it signifies a wild card.
.B getnetgrent(\|)
will use
.BR malloc (3)
to allocate space for the name.
This space is released when a
.B endnetgrent(\|)
call is made.
.B getnetgrent(\|)
returns 1 if it succeeded in obtaining another
member of the network group, 0 if it has reached the
end of the group.  
.LP
.B getnetgrent(\|)
establishes the network group from which
.B getnetgrent(\|)
will obtain members, and also restarts calls to
.B getnetgrent(\|)
from the beginning of the list.
If the previous
.B setnetgrent(\|)
call was to a different network group, a
.B endnetgrent(\|)
call is implied.
.B endnetgrent(\|)
frees the space allocated during the
.B getnetgrent(\|)
calls.
.B innetgr
returns 1 or 0, depending on whether
.I netgroup
contains the machine, user, domain triple as a member.
Any of the three strings
.IR machine ,
.IR user ,
or
.I domain
can be
.SM NULL\s0,
in which case it signifies a wild card.
.SH FILES
.PD 0
.TP 20
.B /etc/netgroup
.\" .TP
.\" .BI /var/yp/ domain /netgroup
.\" .TP
.\" .BI /var/yp/ domain /netgroup.byuser
.\" .TP
.\" .BI /var/yp/ domain /netgroup.byhost
.PD
.SH WARNINGS
.LP
.SM YP
must be running when using
.B getnetgrent(\|), 
since it
only inspects the YP netgroup map, never the local files.


.RE
.LP
.B addmntent(\|)
adds the
.B mntent
structure
.I mnt
to the end of the open file
.IR filep .
Note: 
.I filep
has to be opened for writing if this is to work.
.B hasmntopt(\|)
scans the
.B mnt_opts
field of the
.B mntent
structure
.I mnt
for a substring that matches
.IR opt .
It returns the address of the substring if a match is found,
0 otherwise.
.B endmntent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH "SEE ALSO"
.BR fopen (3S),
.BR getfsent (3),
.BR./share/man/man3/getnetname.3n                                                                         755       0      12           70  4424741202  11230                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)getnetname.3n 1.4 89/03/27 SMI;
    	getpass.3 .3      
getpass.3v .       getprotobyname.3n        getprotoent.3n        getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3 a    %  getpwent.3v     &  
getpwnam.3 t    '  getpwnam.3v     (  
getpwuid.3 m    )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n   0  ,  getrpcen./share/man/man3/getopt.3                                                                              755       0      12         5137  4424741202  10276                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getopt.3 1.13 89/03/27 SMI; from S5R3
.TH GETOPT 3 "22 March 1989"
.SH NAME
getopt, optarg, optind \- get option letter from argument vector
.SH SYNOPSIS
.nf
.ft B
int getopt(argc, argv, optstring)
int argc;
char **argv;
char *optstring;
.ft P
.LP
.ft B
extern char *optarg;
extern int optind, opterr;
.ft R
.fi
.SH DESCRIPTION
.IX "getopt function" "" "\fLgetopt()\fP function"
.IX "optarg function" "" "\fLoptarg()\fP function"
.LP
.B getopt(\|)
returns the next option letter in
.I argv
that matches a letter in
.IR optstring .
.I optstring
must contain the option letters the command using
.B getopt(\|)
will recognize;
if a letter is followed by a colon, the option
is expected to have an argument, or group of arguments,
which must
be separated from it by white space.
.LP
.I optarg
is set to point to the start of the option argument on return
from
.BR getopt .
.LP
.B getopt(\|)
places in
.B optind
the
.I argv
index of the next argument to be processed.
.B optind
is external and is initialized to
.B 1
before the first call to
.BR getopt .
.LP
When all options have been processed (that is,
up to the first non-option argument),
.B getopt(\|)
returns
.BR \-1 .
The special option
.BR `` \-\- ''
may be used to delimit the end
of the options;
when it is encountered,
.B \-1
will be returned, and
.BR `` \-\- ''
will be skipped.
.SH DIAGNOSTICS
.B getopt(\|)
prints an error message on the standard error
and returns a question mark
.RB ( ? )
when it encounters an option letter not included in
.I optstring
or no option-argument after an option that expects one.
This error message may be disabled by setting
.B opterr
to
.BR 0 .
.SH EXAMPLE
The following code fragment shows how one might process the arguments for a
command that can take the mutually exclusive options
.B a
and
.BR b ,
and the option
.BR o ,
which requires an option argument:
.LP
.nf
.DT
.ft B
	main(argc, argv)
	int argc;
	char **argv;
	{
		int c;
		extern char *optarg;
		extern int optind;
		\&.
		\&.
		\&.
		while ((c = getopt(argc, argv, "abo:")) != \-1)
			switch (c) {
			case 'a':
				if (bflg)
					errflg++;
				else
					aflg++;
				break;
			case 'b':
				if (aflg)
					errflg++;
				else
 					bproc (\|);
				break;
			case 'o':
				ofile = optarg;
				break;
			case '?':
				errflg++;
			}
		if (errflg) {
			(void)fprintf(stderr, "usage: . . . ");
 			exit (2);
		}
		for (; optind < argc; optind++) {
			if (access(argv[optind], 4)) {
		\&.
		\&.
		\&.
	}
.ft R
.fi
.SH SEE ALSO
.BR getopts (1)
.SH WARNING
Changing the value of the variable
.BR optind ,
or calling
.B getopt(\|)
with different values of
.IR argv ,
may lead to unexpected results.
ile
.IR filep .
Note: 
.I filep
has to be opened for writing if this is to work.
.B hasmntopt(\|)
scans the
.B mnt_opts
field of the
.B mntent
structure
.I mnt
for a substring that matches
.IR opt .
It returns the address of the substring if a match is found,
0 otherwise.
.B endmntent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH "SEE ALSO"
.BR fopen (3S),
.BR getfsent (3),
.BR./share/man/man3/getpass.3                                                                             755       0      12         2141  4424741203  10433                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpass.3 1.11 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETPASS 3  "6 October 1987"
.SH NAME
getpass \- read a password
.SH SYNOPSIS
.nf
.B char *getpass(prompt)
.B char *prompt;
.fi
.IX  "getpass function"  ""  "\fLgetpass\fP \(em read password"
.IX  "read password"  ""  "read password \(em \fLgetpass\fP"
.IX  password  read  ""  "read \(em \fLgetpass\fP"
.SH DESCRIPTION
.B getpass(\|)
reads up to a
.SM NEWLINE
or
.SM EOF
from the file
.BR /dev/tty ,
or if that cannot be opened, from the standard input,
after prompting with the
.SM NULL\s0-terminated
string
.I prompt
and disabling echoing.
A pointer is returned to a
.SM NULL\s0-terminated
string of at most 8 characters.
An interrupt will terminate input and send
an interrupt signal to the calling program before returning.
.SH FILES
.PD 0
.TP 20
.B /dev/tty
.PD
.SH "SEE ALSO"
.BR crypt (3),
.BR getpass (3V)
.SH WARNING
The above routine uses
.BR <stdio.h> ,
which increases the size of programs
not otherwise using standard I/O, more
than might be expected.
.SH BUGS
The return value points to static data
whose content is overwritten by each call.
isk.3r   p  H  	hcreate.3 r     I  
hdestroy.3 k    J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  me    M  htons.3n ch.    N  
hyperbolic.3m       W  inch.3v  ''
will be skipped.
.SH DIAGNOSTICS
.B getopt(\|)
prints an error message on the standard error
and returns a question mark
.RB ( ? )
when it encounters an option letter not included in
.I optstring
or no option./share/man/man3/getpass.3v                                                                            755       0      12         2262  4424741203  10625                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpass.3v 1.8 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETPASS 3V  "6 October 1987"
.SH NAME
getpass \- read a password
.SH SYNOPSIS
.nf
.B char *getpass(prompt)
.B char *prompt;
.fi
.IX  "getpass function V"  ""  "\fLgetpass\fP \(em read password, System V"
.IX  "read password V"  ""  "read password, System V \(em \fLgetpass\fP"
.IX  password  "read V"  ""  "read, System V \(em \fLgetpass\fP"
.SH DESCRIPTION
.B getpass(\|)
reads up to a
.SM NEWLINE
or
.SM EOF
from the file
.BR /dev/tty ,
after prompting with the
.SM NULL\s0-terminated
string
.I prompt
and disabling echoing.
A pointer is returned to a
.SM NULL\s0-terminated
string of at most 8 characters.
An interrupt will terminate input and send
an interrupt signal to the calling program before returning.
If
.B /dev/tty
cannot be opened, a
.SM NULL
pointer is returned; the standard input is not read.
.SH FILES
.PD 0
.TP 20
.B /dev/tty
.PD
.SH "SEE ALSO"
.BR crypt (3),
.BR getpass (3)
.SH WARNING
The above routine uses
.BR <stdio.h> ,
which increases the size of programs
not otherwise using standard I/O, more
than might be expected.
.SH BUGS
The return value points to static data
whose content is overwritten by each call.
n     L  htonl.3n  n     M  htons.3n  me    N  
hyperbolic.3m       W  inch.3v m       W  inch.3v  ''
will be skipped.
.SH DIAGNOSTICS
.B getopt(\|)
prints an error message on the standard error
and returns a question mark
.RB ( ? )
when it encounters an option letter not included in
.I optstring
or no option./share/man/man3/getprotobyname.3n                                                                     755       0      12          105  4424741203  12160                                                                                                                                                                                                                                                                                                                                                                      .so man3/getprotoent.3n
.\" @(#)getprotobyname.3n 1.6 89/03/27 SMI; 
  getprotobynumber.3n   4     getpublickey.3r   D  !  getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3      %  getpwent.3v     &  
getpwnam.3      '  getpwnam.3v     (  
getpwuid.3      )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   gets./share/man/man3/getprotoent.3n                                                                        755       0      12         5437  4424741203  11530                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getprotoent.3n 1.16 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETPROTOENT 3N "22 March 1989"
.SH NAME
getprotoent, getprotobynumber, getprotobyname, setprotoent, endprotoent \- get protocol entry
.SH SYNOPSIS
.nf
.ft B
.B #include <netdb.h>
.LP
.ft B
struct protoent *getprotoent(\|)
.LP
.ft B
struct protoent *getprotobyname(name)
char *name;
.LP
.ft B
struct protoent *getprotobynumber(proto)
int proto;
.LP
.ft B
setprotoent(stayopen)
int stayopen;
.LP
.ft B
endprotoent(\|)
.fi
.IX  get "protocol entry \(em \fLgetprotoent\fR"
.IX  "protocol entry, get" "" "protocol entry, get \(em \fLgetprotoent\fR"
.IX  "getprotoent function"  ""  "\fLgetprotoent\fP \(em get protocol entry"
.IX  "getprotobynumber function"  ""  "\fLgetprotobynumber\fP \(em get protocol entry"
.IX  "getprotobynumber function"  ""  "\fLgetprotobynumber\fP \(em get protocol entry"
.IX  "setprotoent function"  ""  "\fLsetprotoent\fP \(em get protocol entry"
.IX  "endprotoent function"  ""  "\fLendprotoent\fP \(em get protocol entry"
.SH DESCRIPTION
.BR getprotoent ,
.BR getprotobyname ,
and
.B getprotobynumber(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the network protocol data base,
.BR /etc/protocols .
.RS
.LP
.nf
.ft B
struct	protoent {
	char	*p_name;	/* official name of protocol */
	char	**p_aliases;	/* alias list */
	int	p_proto;	/* protocol number */
};
.ft R
.ad
.fi
.RE
.LP
The members of this structure are:
.LP
.PD 0
.TP 20
.B p_name
The official name of the protocol.
.TP
.B p_aliases
A zero terminated list of alternate names for the protocol.
.TP
.B p_proto
The protocol number.
.PD
.LP
.B getprotoent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B getprotoent(\|)
opens and rewinds the file.  If the
.I stayopen
flag is non-zero,
the net data base will not be closed after each call to
.B getprotoent(\|)
(either directly, or indirectly through one of
the other \*(lqgetproto\*(rq calls).
.LP
.B endprotoent(\|)
closes the file.
.LP
.B getprotobyname(\|)
and
.B getprotobynumber(\|)
sequentially search from the beginning
of the file until a matching protocol name or
protocol number is found, or until end-of-file is encountered.
.SH FILES
.PD 0
.TP 20
.B /etc/protocols
.\" .TP
.\" .BI /var/yp/ domainname /protocols.byname
.\" .TP
.\" .BI /var/yp/ domainname /protocols.bynumber
.PD
.SH "SEE ALSO"
.BR protocols (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.  Only the Internet
protocols are currently understood.
 opt .
It returns the address of the substring if a match is found,
0 otherwise.
.B endmntent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH "SEE ALSO"
.BR fopen (3S),
.BR getfsent (3),
.BR./share/man/man3/getprotobynumber.3n                                                                   755       0      12          107  4424741203  12532                                                                                                                                                                                                                                                                                                                                                                      .so man3/getprotoent.3n
.\" @(#)getprotobynumber.3n 1.6 89/03/27 SMI; 
getpw.3   X  "  getpwaent.3   l  #  getpwanam.3     $  
getpwent.3 a    %  getpwent.3v     &  
getpwnam.3 t    '  getpwnam.3v     (  
getpwuid.3 m    )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n   0  ,  getrpcent.3n  n   H  -  
getrpcport.3r .3  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n      1   getservbyport.3n      2  
./share/man/man3/getpublickey.3r                                                                       755       0      12          100  4424741204  11610                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)getpublickey.3r 1.3 89/03/27 SMI;
waent.3   l  #  getpwanam.3     $  
getpwent.3 p    %  getpwent.3v     &  
getpwnam.3 p    '  getpwnam.3v     (  
getpwuid.3 p    )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n n   0  ,  getrpcent.3n r.3  H  -  
getrpcport.3r 3n  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n 3r     1   getservbyport.3n      2  
getservent.3n 3n    3  	gets./share/man/man3/getpw.3                                                                               755       0      12         1216  4424741204  10116                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpw.3 1.10 89/03/27 SMI; from UCB 6.2 5/27/86
.TH GETPW 3  "6 October 1987"
.SH NAME
getpw \- get name from uid
.SH SYNOPSIS
.nf
.B getpw(uid, buf)
.B char *buf;
.fi
.IX  "getpw function"  ""  "\fLgetpw\fP \(em get name from uid"
.SH DESCRIPTION
.ft B
Getpw is made obsolete by getpwent(3).
.ft R
.LP
.B getpw(\|)
searches the password file for
the (numerical)
.IR uid ", and fills in " "buf"
with the corresponding line;
it returns non-zero if
.IR uid ""
could not
be found.
The line is
.SM NULL\s0-terminated.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.PD
.SH "SEE ALSO"
.BR getpwent (3),
.BR passwd (5)
.SH DIAGNOSTICS
Non-zero
return on error.
tw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v etw    >  getyx.3x .3v    ?  gmtime.3 .3x    @  	gmtime.3v .3    A  	grpauth.3 .3    B  	gsignal.3 h.    C  gtty.3c      D  	has_ic.3v ty  4  E  	has_il.3v .3  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 sk    I  
hdestroy.3 .    J  host./share/man/man3/getpwaent.3                                                                           755       0      12         5050  4424741204  10766                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpwaent.3 1.10 89/03/27 SMI;
.TH GETPWAENT 3 "22 March 1989"
.SH NAME
getpwaent, getpwanam, setpwaent, endpwaent, fgetpwaent \- get password adjunct file entry
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/label.h>
.B #include <sys/audit.h>
.B #include <pwdadj.h>
.LP
.B struct passwd_adjunct *getpwaent(\|)
.LP
.B struct passwd_adjunct *getpwanam(name)
.B char *name;
.LP
.B struct passwd_adjunct *fgetpwaent(f)
.B FILE *f;
.LP
.B void setpwaent(\|)
.LP
.B void endpwaent(\|)
.fi
.SH DESCRIPTION
.IX "getpwaent function" "" "\fLgetpwaent()\fP function"
.IX "getpwanam function" "" "\fLgetpwanam()\fP function"
.IX "setpwaent function" "" "\fLsetpwaent()\fP function"
.IX "endpwaent function" "" "\fLendpwaent()\fP function"
.IX "fgetpwaent function" "" "\fLfgetpwaent()\fP function"
Both
.B getpwaent(\|)
and
.B getpwanam(\|)
return a pointer to an object with the following structure
containing the broken-out fields of a line in the password adjunct file.
Each line in the file contains a
.B passwd_adjunct
structure, declared in the
.B <pwdadj.h>
header file:
.RS
.LP
.nf
.ft B
struct  passwd_adjunct {
char            *pwa_name;
char            *pwa_passwd;
blabel_t        pwa_minimum;
blabel_t        pwa_maximum;
blabel_t        pwa_def;
audit_state_t   pwa_au_always;
audit_state_t   pwa_au_never;
int             pwa_version;
};
.ft R
.fi
.RE
.LP
When first called,
.B getpwaent(\|)
returns a pointer to a
.B passwd_adjunct
structure describing data from the first line in the file.
Thereafter, it returns a pointer to a
.B passwd_adjunct
structure describing data from the next line in the file.
So successive calls can be used to search the entire file.
.LP
.B getpwanam(\|)
searches from the beginning of the file
until it finds a login name matching
.IR name ,
then returns a pointer to the particular structure
in which it was found.
.LP
Calling
.B getpwaent(\|)
rewinds the password adjunct file to allow repeated searches.
Calling
.B endpwaent(\|)
closes the password adjunct file when processing is complete.
.LP
Because read access is required on
.B /etc/security/passwd.adjunct,
.B getpwaent(\|)
and
.B getpwanam(\|)
will fail unless the calling process has effective
.SM UID
of root.
.SH FILES
.PD 0
.TP 20
.B /etc/security/passwd.adjunct
.TP
.BI /var/yp/ domainname /passwd.adjunct.byname
.PD
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH "SEE ALSO"
.BR getpwent (3),
.BR getgrent (3),
.BR passwd.adjunct (5),
.BR ypserv (8)
.SH BUGS
All information is contained in a static area,
so it must be copied if it is to be saved.
s (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.  Only the Internet
protocols are currently understood.
 opt .
It returns the address of the substring if a match is found,
0 otherwise.
.B endmntent(\|)
closes the file.
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH "SEE ALSO"
.BR fopen (3S),
.BR getfsent (3),
.BR./share/man/man3/getpwanam.3                                                                           755       0      12           73  4424741204  10713                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwaent.3
.\" @(#)getpwanam.3 1.3 89/03/27 SMI;
getpwent.3v     &  
getpwnam.3      '  getpwnam.3v     (  
getpwuid.3      )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v 2    4  	getstr.3x      5  gettmode.3v     6  gett./share/man/man3/getpwent.3                                                                            755       0      12        10645  4424741204  10653                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpwent.3 1.16 89/03/27 SMI; from UCB 4.3 and S5
.TH GETPWENT 3 "28 January 1988"
.SH NAME
getpwent, getpwuid, getpwnam, setpwent, endpwent, setpwfile, fgetpwent \- get password file entry
.SH SYNOPSIS
.nf
.B #include <pwd.h>
.LP
.B struct passwd *getpwent(\|)
.LP
.B struct passwd *getpwuid(uid)
.B int uid;
.LP
.B struct passwd *getpwnam(name)
.B char *name;
.LP
.B int setpwent(\|)
.LP
.B int endpwent(\|)
.LP
.B setpwfile(name)
.B char *name;
.LP
.B struct passwd *fgetpwent(f)
.B \s-1FILE\s0 *f;
.fi
.IX  "getpwent function"  ""  "\fLgetpwent\fP \(em get password file entry"
.IX  "getpwuid function"  ""  "\fLgetpwuid\fP \(em get password file entry"
.IX  "getpwnam function"  ""  "\fLgetpwnam\fP \(em get password file entry"
.IX  "setpwent function"  ""  "\fLsetpwent\fP \(em get password file entry"
.IX  "endpwent function"  ""  "\fLendpwent\fP \(em get password file entry"
.IX  "setpwfile function"  ""  "\fLfgetpwent\fP \(em get password file entry"
.IX  "fgetpwent function"  ""  "\fLfgetpwent\fP \(em get password file entry"
.IX  "get password file entry"  "getpwent"  ""  "\fLgetpwent\fP"
.IX  "get password file entry"  "getpwuid"  ""  "\fLgetpwuid\fP"
.IX  "get password file entry"  "getpwnam"  ""  "\fLgetpwnam\fP"
.IX  "get password file entry"  "setpwent"  ""  "\fLsetpwent\fP"
.IX  "get password file entry"  "endpwent"  ""  "\fLendpwent\fP"
.IX  "get password file entry"  "setpwfile"  ""  "\fLfgetpwent\fP"
.IX  "get password file entry"  "fgetpwent"  ""  "\fLfgetpwent\fP"
.IX  "password file"  "get entry getpwent"  ""  "get entry \(em \fLgetpwent\fP"
.IX  "password file"  "get entry getpwuid"  ""  "get entry \(em \fLgetpwuid\fP"
.IX  "password file"  "get entry getpwnam"  ""  "get entry \(em \fLgetpwnam\fP"
.IX  "password file"  "get entry setpwent"  ""  "get entry \(em \fLsetpwent\fP"
.IX  "password file"  "get entry endpwent"  ""  "get entry \(em \fLendpwent\fP"
.IX  "password file"  "get entry setpwfile"  ""  "get entry \(em \fLfsetpwfile\fP"
.IX  "password file"  "get entry fgetpwent"  ""  "get entry \(em \fLfgetpwent\fP"
.SH DESCRIPTION
.BR getpwent ,
.B getpwuid(\|)
and
.B getpwnam(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the password file.
Each line in the file
contains a \(lqpasswd\(rq structure, declared in the
.B <pwd.h>
header file:
.RS
.LP
.nf
.ft B
struct	passwd { /* see getpwent(3) */
	char	*pw_name;
	char	*pw_passwd;
	int	pw_uid;
	int	pw_gid;
	int	pw_quota;
	char	*pw_comment;
	char	*pw_gecos;
	char	*pw_dir;
	char	*pw_shell;
};
struct passwd *getpwent(\|), *getpwuid(\|), *getpwnam(\|);
.ft R
.fi
.RE
.LP
This structure is declared in
.B <pwd.h>
so it is not necessary to redeclare it.
.LP
The fields
.B pw_quota
and
.B pw_comment
are unused; the others have meanings described in
.BR passwd (5).
When first called,
.B getpwent(\|)
returns a pointer to the first passwd structure in the file;
thereafter, it returns a pointer to the next passwd structure in the file;
so successive calls can
be used to search the entire file.
.B getpwuid(\|)
searches from the beginning of the file until a numerical user
.SM ID
matching
.I uid
is found and
returns a pointer to the particular structure in which it was found.
.B getpwnam(\|)
searches from the beginning of the
file until a login name matching
.I name
is found, and returns a pointer to the particular structure
in which it was found.
If an end-of-file or an error
is encountered on reading, these functions return a
.SM NULL
pointer.
.LP
A call to
.B getpwent(\|)
has the effect of rewinding
the password file to allow repeated searches.
.B endpwent(\|)
may be called to
close the password file
when processing is complete.
.LP
.B setpwfile(\|)
changes the default password file to
.I name
thus allowing alternate password files to be used.
Note: it does
.I not
close the previous file.
If this is desired,
.B endpwent(\|)
should be called prior to it.
.LP
.B fgetpwent(\|)
returns a pointer to the next passwd structure in the stream
.IR f ,
which matches the format of the password file
.BR /etc/passwd .
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.\" .TP
.\" .BI /var/yp/ domainname /passwd.byname
.\" .TP
.\" .BI /var/yp/ domainname /passwd.byuid
.PD
.SH "SEE ALSO"
.BR getgrent (3),
.BR getlogin (3),
.BR getpwent (3V),
.BR passwd (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information
is contained in a static area,
so it must be copied if it is
to be saved.
  "get password file entry"  "fgetpwent"  ""  "\fLfgetpwent\fP"
.IX  "password file"  "get ./share/man/man3/getpwent.3v                                                                           755       0      12        11720  4424741205  11035                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getpwent.3v 1.10 89/03/27 SMI; from UCB 4.3 and S5
.TH GETPWENT 3V "14 December 1987"
.SH NAME
getpwent, getpwuid, getpwnam, setpwent, endpwent, setpwfile, fgetpwent \- get password file entry
.SH SYNOPSIS
.nf
.B #include <pwd.h>
.LP
.B struct passwd *getpwent(\|)
.LP
.B struct passwd *getpwuid(uid)
.B int uid;
.LP
.B struct passwd *getpwnam(name)
.B char *name;
.LP
.B int setpwent(\|)
.LP
.B int endpwent(\|)
.LP
.B setpwfile(name)
.B char *name;
.LP
.B struct passwd *fgetpwent(f)
.B \s-1FILE\s0 *f;
.fi
.IX  "getpwent function V"  ""  "\fLgetpwent\fP \(em get password file entry, System V"
.IX  "getpwuid function V"  ""  "\fLgetpwuid\fP \(em get password file entry, System V"
.IX  "getpwnam function V"  ""  "\fLgetpwnam\fP \(em get password file entry, System V"
.IX  "setpwent function V"  ""  "\fLsetpwent\fP \(em get password file entry, System V"
.IX  "endpwent function V"  ""  "\fLendpwent\fP \(em get password file entry, System V"
.IX  "fgetpwent function V"  ""  "\fLsetpwfile\fP \(em get password file entry, System V"
.IX  "fgetpwent function V"  ""  "\fLfgetpwent\fP \(em get password file entry, System V"
.IX  "get password file entry, System V"  "getpwent"  ""  "\fLgetpwent\fP"
.IX  "get password file entry, System V"  "getpwuid"  ""  "\fLgetpwuid\fP"
.IX  "get password file entry, System V"  "getpwnam"  ""  "\fLgetpwnam\fP"
.IX  "get password file entry, System V"  "setpwent"  ""  "\fLsetpwent\fP"
.IX  "get password file entry, System V"  "endpwent"  ""  "\fLendpwent\fP"
.IX  "get password file entry, System V"  "setpwfile"  ""  "\fLfgetpwent\fP"
.IX  "get password file entry, System V"  "fgetpwent"  ""  "\fLfgetpwent\fP"
.IX  "password file"  "get entry getpwent V"  ""  "get entry, System V \(em \fLgetpwent\fP"
.IX  "password file"  "get entry getpwuid V"  ""  "get entry, System V \(em \fLgetpwuid\fP"
.IX  "password file"  "get entry getpwnam V"  ""  "get entry, System V \(em \fLgetpwnam\fP"
.IX  "password file"  "get entry setpwent V"  ""  "get entry, System V \(em \fLsetpwent\fP"
.IX  "password file"  "get entry endpwent V"  ""  "get entry, System V \(em \fLendpwent\fP"
.IX  "password file"  "get entry setpwfile V"  ""  "get entry, System V \(em \fLfgetpwent\fP"
.IX  "password file"  "get entry fgetpwent V"  ""  "get entry, System V \(em \fLfgetpwent\fP"
.SH DESCRIPTION
.BR getpwent ,
.B getpwuid(\|)
and
.B getpwnam(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the password file.
Each line in the file
contains a ``passwd'' structure, declared in the
.B <pwd.h>
header file:
.RS
.LP
.nf
.ft B
struct	passwd { /* see getpwent(3) */
	char	*pw_name;
	char	*pw_passwd;
	int	pw_uid;
	int	pw_gid;
	char	*pw_age;
	char	*pw_comment;
	char	*pw_gecos;
	char	*pw_dir;
	char	*pw_shell;
};
struct passwd *getpwent(\|), *getpwuid(\|), *getpwnam(\|);
.ft R
.fi
.RE
.LP
This structure is declared in
.B <pwd.h>
so it is not necessary to redeclare it.
.LP
The field
.B pw_comment
is unused; the others have meanings described in
.BR passwd (5).
When first called,
.B getpwent(\|)
returns a pointer to the first passwd structure in the file;
thereafter, it returns a pointer to the next passwd structure in the file;
so successive calls can
be used to search the entire file.
.B getpwuid(\|)
searches from the beginning of the file until a numerical user
.SM ID
matching
.I uid
is found and
returns a pointer to the particular structure in which it was found.
.B getpwnam(\|)
searches from the beginning of the
file until a login name matching
.I name
is found, and returns a pointer to the particular structure
in which it was found.
If an end-of-file or an error
is encountered on reading, these functions return a
.SM NULL
pointer.
.LP
A call to
.B getpwent(\|)
has the effect of rewinding
the password file to allow repeated searches.
.B endpwent(\|)
may be called to
close the password file
when processing is complete.
.LP
.B setpwfile(\|)
changes the default password file to
.I name
thus allowing alternate password files to be used.
Note: it does
.I not
close the previous file.
If this is desired,
.B endpwent(\|)
should be called prior to it.
.LP
.B fgetpwent(\|)
returns a pointer to the next passwd structure in the stream
.IR f ,
which matches the format of the password file
.BR /etc/passwd .
.LP
The field
.B pw_age
is used to hold a value for ``password aging'' on some systems;
``password aging'' is not supported on Sun systems.  As such, it is
effectively not used.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.BI /var/yp/ domainname /passwd.byname
.TP
.BI /var/yp/ domainname /passwd.byuid
.PD
.SH "SEE ALSO"
.BR getgrent (3),
.BR getlogin (3),
.BR getpwent (3),
.BR passwd (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH WARNING
The above routines use the standard I/O library, which causes
them to increase the size of programs,
not otherwise using standard I/O, more
than might be expected.
.SH BUGS
All information
is contained in a static area,
so it must be copied if it is
to be saved.
raise .
Because the exit procedure is called as ./share/man/man3/getpwnam.3                                                                            755       0      12           72  4424741206  10553                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)getpwnam.3 1.6 89/03/27 SMI; 
 
getpwuid.3      )  getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getu./share/man/man3/getpwnam.3v                                                                           755       0      12           74  4424741206  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)getpwnam.3v 1.6 89/03/27 SMI; 
getpwuid.3v     *  getrpcbyname.3n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  ./share/man/man3/getpwuid.3                                                                            755       0      12           72  4424741206  10561                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)getpwuid.3 1.6 89/03/27 SMI; 
 getrpcbyname.3n     +   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw./share/man/man3/getpwuid.3v                                                                           755       0      12           74  4424741206  10751                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)getpwuid.3v 1.6 89/03/27 SMI; 
   getrpcbynumber.3n +  0  ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3 ./share/man/man3/getrpcbyname.3n                                                                       755       0      12          101  4424741206  11600                                                                                                                                                                                                                                                                                                                                                                      .so man3/getrpcent.3n
.\" @(#)getrpcbyname.3n 1.6 89/03/27 SMI; 
 ,  getrpcent.3n  0  H  -  
getrpcport.3r H  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n  0    1   getservbyport.3n  1    2  
getservent.3n     3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3 ./share/man/man3/getrpcbynumber.3n                                                                     755       0      12          103  4424741206  12152                                                                                                                                                                                                                                                                                                                                                                      .so man3/getrpcent.3n
.\" @(#)getrpcbynumber.3n 1.6 89/03/27 SMI; 
-  
getrpcport.3r 0  X  .  gets.3s   p  /  getsecretkey.3r     0   getservbyname.3n      1   getservbyport.3n      2  
getservent.3n 1    3  	getstr.3v .3    4  	getstr.3x .3     5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3    d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v etw    >  getyx.3x .3v  ./share/man/man3/getrpcent.3n                                                                          755       0      12         4717  4424741207  11155                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getrpcent.3n 1.14 89/03/27 SMI
.TH GETRPCENT 3N "22 March 1989"
.SH NAME
getrpcent, getrpcbyname, getrpcbynumber, endrpcent, setrpcent \- get RPC entry
.SH SYNOPSIS
.nf
.ft B
#include <netdb.h>
.LP
.ft B
struct rpcent *getrpcent(\|)
.LP
.ft B
struct rpcent *getrpcbyname(name)
char *name;
.LP
.ft B
struct rpcent *getrpcbynumber(number)
int number;
.LP
.ft B
setrpcent (stayopen)
int stayopen
.LP
.ft B
endrpcent (\|)
.fi
.IX  get "RPC program entry \(em \fLgetrpcent\fR"
.IX  set "RPC program entry \(em \fLsetrpcent\fR"
.IX  "RPC program entry, get \(em \fLgetrpcent\fR"
.IX  "getrpcent function"  ""  "\fLgetrpcent\fP \(em get RPC entry"
.IX  "getrpcbynumber function"  ""  "\fLgetrpcbynumber\fP \(em get RPC entry"
.IX  "getrpcbyname function"  ""  "\fLgetrpcbyname\fP \(em get RPC entry"
.IX  "setrpcent function"  ""  "\fLsetrpcent\fP \(em get RPC entry"
.IX  "endrpcent function"  ""  "\fLendrpcent\fP \(em get RPC entry"
.SH DESCRIPTION
.LP
.BR getrpcent ,
.BR getrpcbyname ,
and
.B getrpcbynumber(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the rpc program number data base,
.BR /etc/rpc .
.RS
.LP
.nf
.ft B
struct	rpcent {
	char	*r_name;	/* name of server for this rpc program */
	char	**r_aliases;	/* alias list */
	long	r_number;	/* rpc program number */
};
.ft R
.fi
.RE
.LP
The members of this structure are:
.RS
.PD 0
.TP 20
.B r_name
The name of the server for this rpc program.
.TP 20
.B r_aliases
A zero terminated list of alternate names for the rpc program.
.TP  20
.B r_number
The rpc program number for this service.
.PD
.RE
.LP
.B getrpcent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B setrpcent(\|)
opens and rewinds the file.  If the
.I stayopen
flag is non-zero,
the net data base will not be closed after each call to
.B getrpcent(\|)
(either directly, or indirectly through one of
the other \*(lqgetrpc\*(rq calls).
.LP
.B endrpcent
closes the file.
.LP
.B getrpcbyname(\|)
and
.B getrpcbynumber(\|)
sequentially search from the beginning
of the file until a matching rpc program name or
program number is found, or until end-of-file is encountered.
.SH FILES
.PD 0
.TP 20
.B /etc/rpc
.\" .TP
.\" .BI /var/yp/ domainname /rpc.bynumber
.PD
.SH "SEE ALSO"
.BR rpc (5),
.BR rpcinfo (8C),
.BR ypserv (8)
.SH DIAGNOSTICS
.LP
A
.SM NULL
pointer is returned on 
.SM EOF
or error.
.SH BUGS
.LP
All information
is contained in a static area
so it must be copied if it is
to be saved.
ach line in the file
contains a ``passwd'' struct./share/man/man3/getrpcport.3r                                                                         755       0      12         1441  4424741207  11346                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getrpcport.3r 1.13 89/03/27 SMI;
.TH GETRPCPORT 3R "6 October 1987"
.SH NAME
getrpcport \- get RPC port number
.SH SYNOPSIS
.ft B
.nf
int getrpcport(host, prognum, versnum, proto)
	char *host;
	int prognum, versnum, proto;
.fi
.SH DESCRIPTION
.IX getrpcport "" "\fLgetrpcport\fR \(em get RPC port number"
.B getrpcport(\|)
returns the port number for version
.I versnum
of the RPC program
.I prognum
running on
.I host
and using protocol
.IR proto .
It returns 0 if it cannot contact the portmapper, or if
.I prognum
is not registered.  If
.I prognum
is registered but not with version
.IR versnum ,
it will still return a port number (for some version of the program)
indicating that the program is indeed registered.
The version mismatch will be detected upon the first call to the service.
.3n .3n    N  
hyperbolic.3m on      W  inch.3v t RPC entry"
.IX  "endrpcent function"  ""  "\fLendrpcent\fP \(em get RPC entry"
.SH DESCRIPTION
.LP
.BR getrpcent ,
.BR getrpcbyname ,
and
.B getrpcbynumber(\|)
each r./share/man/man3/gets.3s                                                                               755       0      12         4016  4424741207  10121                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gets.3s 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETS 3S  "22 March 1989"
.SH NAME
gets, fgets \- get a string from a stream
.SH SYNOPSIS
.B #include <stdio.h>
.LP
.nf
.B char *gets(s)
.B char *s;
.fi
.LP
.nf
.B char *fgets(s, n, stream)
.B char *s;
.B \s-1FILE\s0 *stream;
.fi
.SH DESCRIPTION
.IX  get "string from stdin \(em \fLgets\fP"
.IX  get "string from stream \(em \fLfgets\fP"
.IX  stdin  "get string from"  ""  "get string from \(em \fLgets\fP"
.IX  stream  "get string from"  ""  "get string from \(em \fLfgets\fP"
.IX  "gets function"  ""  "\fLgets\fP \(em get string from stdin"
.IX  "fgets function"  ""  "\fLfgets\fP \(em get string from stream"
.IX  "string operations"  "get from stream"  ""  "get from stream \(em \fLfgets\fP"
.IX  "string operations"  "get from stdin"  ""  "get from stdin \(em \fLgets\fP"
.LP
.B gets(\|)
reads characters from the standard input stream,
.BR stdin ,
into the array pointed to by
.IR s ,
until a
.SM NEWLINE
character is read or an
.SM EOF
condition is encountered.  The
.SM NEWLINE
character is discarded and the string is terminated with a
.SM NULL
character.
.B gets(\|)
returns its argument.
.LP
.B fgets(\|)
reads characters from the
stream
into the array pointed to by
.IR s ,
until
.IR n \-1
characters are read, a
.SM NEWLINE
character is read and transferred to
.IR s ,
or an
.SM EOF
condition is encountered.
The string is then terminated with a
.SM NULL
character.
.B fgets(\|)
returns its first argument.
.SH "SEE ALSO"
.BR puts (3S),
.BR getc (3S),
.BR scanf (3S),
.BR fread (3S),
.BR ferror (3S)
.SH BUGS
.LP
If the input to 
.B gets (\|) 
or  
.B fgets (\|) 
contains a  
.SM NULL\s0, 
the 
.SM NULL 
terminates the input,
and all subsequent data will be lost.
.SH DIAGNOSTICS
If
.SM EOF
is encountered and no characters have
been read, no characters are transferred to
.I s
and a
.SM NULL
pointer is returned.
If a read error occurs, such as trying to use these functions
on a file that has not been opened for reading, a
.SM NULL
pointer is returned.
Otherwise
.I s
is returned.
s 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH GETS 3S  "22 March 1989"
.SH NAME
gets, fgets \- get a string from a stream
.SH SYNOPSIS
.B #include <stdio.h>
.LP
.nf
.B char *gets(s)
.B char *s;
.fi
.LP
.nf
.B char *fgets(s, n, stream)
.B char *s;
.B \s-1FILE\s0 *stream;
.fi
.SH DESCRIPTION
.IX  get "string from stdin \(em \fLgets\fP"
.IX  get "string from stream \(em \fLfgets\fP"
.IX  stdin  "get string from"  ""  "get string from \(em \fLgets\fP"
.IX  stream  "get string from"  ""  "get st./share/man/man3/getsecretkey.3r                                                                       755       0      12          100  4424741207  11622                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)getsecretkey.3r 1.3 89/03/27 SMI;
  1   getservbyport.3n       2  
getservent.3n 2    3  	getstr.3v     4  	getstr.3x      5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 9  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v      >  getyx.3x      ?  gmtime.3      @  	gmtime.3v     A  	grpauth.3     B  	gsignal.3     C  gtty./share/man/man3/getservbyname.3n                                                                      755       0      12          103  4424741207  11776                                                                                                                                                                                                                                                                                                                                                                      .so man3/getservent.3n
.\" @(#)getservbyname.3n 1.6 89/03/27 SMI; 
  2  
getservent.3n      3  	getstr.3v .3    4  	getstr.3x .3     5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3    d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v etw    >  getyx.3x .3v    ?  gmtime.3 .3x    @  	gmtime.3v .3    A  	grpauth.3 .3    B  	gsignal.3 h.    C  gtty.3c      D  	has_ic.3v ty./share/man/man3/getservbyport.3n                                                                      755       0      12          103  4424741207  12042                                                                                                                                                                                                                                                                                                                                                                      .so man3/getservent.3n
.\" @(#)getservbyport.3n 1.6 89/03/27 SMI; 
3  	getstr.3v ve    4  	getstr.3x ts     5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 a  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v      >  getyx.3x ety    ?  gmtime.3 ety    @  	gmtime.3v ti    A  	grpauth.3 ti    B  	gsignal.3 pa    C  gtty.3c      D  	has_ic.3v    4  E  	has_il.3v s_  H  F./share/man/man3/getservent.3n                                                                         755       0      12         6143  4424741210  11335                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getservent.3n 1.15 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETSERVENT 3N "22 March 1989"
.SH NAME
getservent, getservbyport, getservbyname, setservent, endservent \- get service entry
.SH SYNOPSIS
.nf
.ft B
#include <netdb.h>
.LP
.ft B
struct servent *getservent(\|)
.LP
.ft B
struct servent *getservbyname(name, proto)
char *name, *proto;
.LP
.ft B
struct servent *getservbyport(port, proto)
int port; char *proto;
.LP
.ft B
setservent(stayopen)
int stayopen;
.LP
.ft B
endservent(\|)
.fi
.IX  get "network service entry \(em \fLgetservent\fR"
.IX  set "network service entry \(em \fLgetservent\fR"
.IX  "network service entry, get \(em \fLgetservent\fR"
.IX  "service entry, get \(em \fLgetservent\fR"
.IX  "getservent function"  ""  "\fLgetservent\fP \(em get service entry"
.IX  "getservbyport function"  ""  "\fLgetservbyport\fP \(em get service entry"
.IX  "getservbyname function"  ""  "\fLgetservbyname\fP \(em get service entry"
.IX  "setservent function"  ""  "\fLsetservent\fP \(em get service entry"
.IX  "endservent function"  ""  "\fLendservent\fP \(em get service entry"
.SH DESCRIPTION
.BR getservent ,
.IR getservbyname ,
and
.I getservbyport
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line in the network services data base,
.BR /etc/services .
.RS
.LP
.ft B
.nf
struct	servent {
	char	*s_name;	/* official name of service */
	char	**s_aliases;	/* alias list */
	int	s_port;		/* port service resides at */
	char	*s_proto;	/* protocol to use */
};
.ft R
.fi
.RE
.LP
The members of this structure are:
.RS
.PD 0
.TP 20
.B s_name
The official name of the service.
.TP
.B s_aliases
A zero terminated list of alternate names for the service.
.TP
.B s_port
The port number at which the service resides.
Port numbers are returned in network short byte order.
.TP
.B s_proto
The name of the protocol to use when contacting the
service.
.PD
.RE
.LP
.B getservent(\|)
reads the next line of the file, opening the file if necessary.
.LP
.B getservent(\|)
opens and rewinds the file.  If the
.I stayopen
flag is non-zero,
the net data base will not be closed after each call to
.B getservent(\|)
(either directly, or indirectly through one of
the other \*(lqgetserv\*(rq calls).
.LP
.B endservent(\|)
closes the file.
.LP
.B getservbyname(\|)
and
.B getservbyport(\|)
sequentially search from the beginning
of the file until a matching
protocol name or port number is found, or until end-of-file is encountered.
If a protocol name is also supplied (non-\s-1NULL\s0),
searches must also match the protocol.
.SH FILES
.PD 0
.TP 20
.B /etc/services
.\" .TP
.\" .BI /var/yp/ domainname /services.byname
.PD
.SH "SEE ALSO"
.BR getprotoent (3N),
.BR services (5),
.BR ypserv (8)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned on end-of-file or error.
.SH BUGS
All information is contained in a static area
so it must be copied if it is
to be saved.  Expecting port
numbers to fit in a 32 bit
quantity is probably naive.
turns a pointer to the next passwd structure in the file;
so successive calls can
be used to search the entire file.
.B getpwuid(\|)
searches from the beginning of the file until a numerical user
.SM ID
matching
.I uid
is found and
returns a pointer to the particular structure in which it was found.
.B getpwnam(\|)
searches from the beginning of the
file until a login name matching
.I name
is found, and return./share/man/man3/getstr.3v                                                                             755       0      12           67  4424741210  10426                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)getstr.3v 1.5 89/03/27 SMI;
5  gettmode.3v     6  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3    d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v etw    >  getyx.3x .3v    ?  gmtime.3 .3x    @  	gmtime.3v .3    A  	grpauth.3 .3    B  	gsignal.3 h.    C  gtty.3c      D  	has_ic.3v ty  4  E  	has_il.3v .3  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate../share/man/man3/getstr.3x                                                                             755       0      12           70  4424741210  10422                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)getstr.3x 1.6 89/03/27 SMI; 
  gettmode.3x   (  7  getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3     >  getyx.3x etw    ?  gmtime.3 .3v    @  	gmtime.3v 3x    A  	grpauth.3 .3    B  	gsignal.3 .3    C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v ty  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy./share/man/man3/gettmode.3v                                                                           755       0      12           71  4424741210  10721                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)gettmode.3v 1.5 89/03/27 SMI;
 getttyent.3   <  8  getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3     >  getyx.3x .3     ?  gmtime.3 etw    @  	gmtime.3v 3v    A  	grpauth.3 3x    B  	gsignal.3 .3    C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2net./share/man/man3/gettmode.3x                                                                           755       0      12           72  4424741210  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)gettmode.3x 1.6 89/03/27 SMI; 
 getttynam.3   T  9  getusershell.3 T  d  :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3     >  getyx.3x .3     ?  gmtime.3 .3     @  	gmtime.3v tw    A  	grpauth.3 3v    B  	gsignal.3 3x    C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsea./share/man/man3/getttyent.3                                                                           755       0      12         6646  4424741210  11030                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getttyent.3 1.11 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETTTYENT 3  "6 October 1987"
.SH NAME
getttyent, getttynam, setttyent, endttyent \- get ttytab file entry
.SH SYNOPSIS
.nf
.B #include <ttyent.h>
.LP
.B struct ttyent *getttyent(\|)
.LP
.B struct ttyent *getttynam(name)
.B char *name;
.LP
.B setttyent(\|)
.LP
.B endttyent(\|)
.fi
.SH DESCRIPTION
.IX "getttyent function" "" "\fLgetttyent(\|)\fP function"
.IX "getttynam function" "" "\fLgetttynam(\|)\fP function"
.IX "setttyent function" "" "\fLsetttyent(\|)\fP function"
.IX "endttyent function" "" "\fLendttyent(\|)\fP function"
.LP
.B getttyent(\|)
and
.B getttynam(\|)
each return a pointer to an object with the
following structure
containing the broken-out
fields of a line from the tty description file.
.RS
.LP
.nf
.ft B
struct	ttyent {
	char	*ty_name;	/* terminal device name */
	char	*ty_getty;	/* command to execute, usually getty */
	char	*ty_type;	/* terminal type for termcap (3X) */
	int	ty_status;	/* status flags (see below for defines) */
	char 	*ty_window;	/* command to start up window manager */
	char	*ty_comment;	/* usually the location of the terminal */
};
#define \s-1TTY_ON\s0		0x1	/* enable logins (startup getty) */
#define \s-1TTY_SECURE\s0	0x2	/* allow root to login */
.ft R
.fi
.RE
.RS
.TP 20
.B ty_name
is the name of the character-special file in the directory
.BR /dev .
For various reasons, it must reside in the directory
.BR /dev .
.TP
.B ty_getty
is the command (usually
.BR getty (8))
which is invoked by
.B init
to initialize tty line characteristics.
In fact, any arbitrary command can be used;
a typical use is to initiate a terminal emulator in a window system.
.TP
.B ty_type
is the name of the default terminal type connected to this tty line. This
is typically a name from the
.BR termcap (5)
data base.
The environment variable
.SM TERM
is initialized with this name by
.BR getty (8)
or
.BR login (1).
.TP
.B ty_status
is a mask of bit fields which indicate various actions to be allowed on this
tty line. The following is a description of each flag.
.RS
.RS
.TP
.SB TTY_ON
Enables logins (that is,
.BR init (8)
will start the specified \(lqgetty\(rq command
on this entry).
.TP
.SB TTY_SECURE
Allows root to login on this terminal. Note: 
.SB TTY_ON
must be included for this to be useful.
.RE
.RE
.TP
.B ty_window
is the command to execute for a window system
associated with the line.  The window system will be started before
the command specified in the
.B ty_getty
entry is executed.
If none is specified, this will be
.SM NULL\s0.
.TP
.B ty_comment
is the trailing comment field, if any; a leading delimiter and white space
will be removed.
.RE
.LP
.B getttyent(\|)
reads the next line from the
.B ttytab
file, opening the file if necessary;
.B getttyent(\|)
rewinds the file;
.B endttyent(\|)
closes it.
.LP
.B getttynam(\|)
searches from the beginning of the file until a matching
.I name
is found (or until
.SM EOF
is encountered).
.SH FILES
.PD 0
.TP 20
.B /etc/ttytab
.PD
.SH "SEE ALSO"
.BR login (1),
.BR ttyslot (3),
.BR ttyslot (3V),
.BR gettytab (5),
.BR ttytab (5),
.BR termcap (5),
.BR getty (8),
.BR init (8)
.SH DIAGNOSTICS
.SM NULL
pointer (0) returned on
.SM EOF
or error.
.SH BUGS
All information
is contained in a static area
so it must be copied if it is
to be saved.
es from the beginning of the
file until a login name matching
.I name
is found, and return./share/man/man3/getttynam.3                                                                           755       0      12           71  4424741211  10740                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)getttynam.3 1.5 89/03/27 SMI;
 :  getw.3s   t  ;  getw.3v     <  getwd.3     =  getyx.3v .3     >  getyx.3x .3     ?  gmtime.3 .3     @  	gmtime.3v 3     A  	grpauth.3 3     B  	gsignal.3 tw    C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  hton./share/man/man3/getusershell.3                                                                        755       0      12         2436  4424741211  11501                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getusershell.3 1.9 89/03/27 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETUSERSHELL 3  "6 October 1987"
.SH NAME
getusershell, setusershell, endusershell \- get legal user shells
.SH SYNOPSIS
.nf
.B char *getusershell(\|)
.LP
.B setusershell(\|)
.LP
.B endusershell(\|)
.fi
.SH DESCRIPTION
.IX "getusershell function" "" "\fLgetusershell()\fP function"
.IX "setusershell function" "" "\fLsetusershell()\fP function"
.IX "endusershell function" "" "\fLendusershell()\fP function"
.LP
.B getusershell(\|)
returns a pointer to a legal user shell as defined by the
system manager in the file
.BR /etc/shells .
If
.B /etc/shells
does not exist, the two standard system shells
.B /usr/bin/sh
and
.B /usr/bin/csh
are returned.
.LP
.B getusershell(\|)
reads the next
line (opening the file if necessary);
.B setusershell(\|)
rewinds the file;
.B endusershell(\|)
closes it.
.SH FILES
.PD 0
.TP 20
.B /etc/shells
.TP
.B /usr/bin/csh
.PD
.SH DIAGNOSTICS
The routine
.B getusershell(\|)
returns a
.SM NULL
pointer (0) on
.SM EOF
or error.
.SH BUGS
All information is contained in a static area
so it must be copied if it is to be saved.
n of the terminal */
};
#define \s-1TTY_ON\s0		0x1	/* enable logins (startup getty) */
#define \s-1TTY_SECURE\s0	0x2	/* allow root to login */
.ft R
.fi
.RE
.RS
.TP 20
.B ty_name
is the name of the character-special file in th./share/man/man3/getw.3s                                                                               755       0      12           64  4424741211  10057                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3s
.\" @(#)getw.3s 1.6 89/03/27 SMI; 
getwd.3     =  getyx.3v etw    >  getyx.3x .3v    ?  gmtime.3 .3x    @  	gmtime.3v .3    A  	grpauth.3 .3    B  	gsignal.3 h.    C  gtty.3c      D  	has_ic.3v ty  4  E  	has_il.3v .3  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 sk    I  
hdestroy.3 .    J  host2netname.3n     K  	hsearch.3 me    L  htonl.3n ch.    M  htons.3n .3n    N  
hyperbolic.3m n       W  inch./share/man/man3/getw.3v                                                                               755       0      12           63  4424741211  10061                                                                                                                                                                                                                                                                                                                                                                      .so man3/getc.3v
.\" @(#)getw.3v 1.4 89/03/27 SMI;
getyx.3v      >  getyx.3x      ?  gmtime.3      @  	gmtime.3v     A  	grpauth.3     B  	gsignal.3     C  gtty.3c      D  	has_ic.3v    4  E  	has_il.3v 4  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 p    I  
hdestroy.3     J  host2netname.3n     K  	hsearch.3     L  htonl.3n      M  htons.3n      N  
hyperbolic.3m N      W  inch.3v       W  inch./share/man/man3/getwd.3                                                                               755       0      12         1707  4424741211  10105                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getwd.3 1.11 89/03/27 SMI; from UCB 4.2
.TH GETWD 3 "18 January 1988"
.SH NAME
getwd \- get current working directory pathname
.SH SYNOPSIS
.nf
.B "#include <sys/param.h>"
.sp
.B char *getwd(pathname)
.B char pathname[\s-1MAXPATHLEN\s0];
.fi
.IX  "getwd function"  ""  "\fLgetwd\fP \(em get current working directory pathname"
.IX  get "current working directory pathname \(em \fLgetwd\fP"
.IX  "current directory"  "get pathname"  ""  "get pathname \(em \fLgetwd\fP"
.IX  "working directory"  "get pathname"  ""  "get pathname \(em \fLgetwd\fP"
.SH DESCRIPTION
.B getwd(\|)
copies the absolute pathname of the current working directory to
.I pathname
and returns a pointer to the result.
.SH DIAGNOSTICS
.B getwd(\|)
returns zero and places a message in
.I pathname
if an error occurs.
.SH FILES
.PD 0
.TP 20
.B /tmp/.getwd
It exists for the sole purpose of the
.B getwd(\|)
library routine; no other software should depend on its existence or
contents.
.PD
f necessary);
.B setusershell(\|)
rewinds the file;
.B en./share/man/man3/getyx.3v                                                                              755       0      12           66  4424741212  10257                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)getyx.3v 1.4 89/03/27 SMI;
?  gmtime.3      @  	gmtime.3v     A  	grpauth.3     B  	gsignal.3     C  gtty.3c      D  	has_ic.3v    4  E  	has_il.3v 4  H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 p    I  
hdestroy.3     J  host2netname.3n     K  	hsearch.3     L  htonl.3n      M  htons.3n      N  
hyperbolic.3m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/getyx.3x                                                                              755       0      12           67  4424741212  10262                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)getyx.3x 1.5 89/03/27 SMI; 
@  	gmtime.3v     A  	grpauth.3     B  	gsignal.3     C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v    H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3 p    J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n      M  htons.3n      N  
hyperbolic.3m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/gmtime.3                                                                              755       0      12           65  4424741212  10212                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)gmtime.3 1.5 89/03/27 SMI; 
 A  	grpauth.3     B  	gsignal.3     C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n      N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/gmtime.3v                                                                             755       0      12           67  4424741212  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)gmtime.3v 1.5 89/03/27 SMI; 
B  	gsignal.3     C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/grpauth.3                                                                             755       0      12           67  4424741212  10404                                                                                                                                                                                                                                                                                                                                                                      .so man3/pwdauth.3
.\" @(#)grpauth.3 1.3 89/03/27 SMI;
C  gtty.3c      D  	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/gsignal.3                                                                             755       0      12           67  4424741212  10356                                                                                                                                                                                                                                                                                                                                                                      .so man3/ssignal.3
.\" @(#)gsignal.3 1.4 89/03/27 SMI;
	has_ic.3v c   4  E  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/gtty.3c                                                                               755       0      12           64  4424741213  10062                                                                                                                                                                                                                                                                                                                                                                      .so man3/stty.3c
.\" @(#)gtty.3c 1.5 89/03/27 SMI; 
  	has_il.3v c   H  F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/has_ic.3v                                                                             755       0      12           67  4424741213  10347                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)has_ic.3v 1.4 89/03/27 SMI;
F  hasmntopt.3   \  G  havedisk.3r   p  H  	hcreate.3 p    I  
hdestroy.3     J  host2netname.3n     K  	hsearch.3     L  htonl.3n      M  htons.3n      N  
hyperbolic.3m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/has_il.3v                                                                             755       0      12           67  4424741213  10360                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)has_il.3v 1.4 89/03/27 SMI;
G  havedisk.3r   p  H  	hcreate.3 r     I  
hdestroy.3 p    J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n      M  htons.3n      N  
hyperbolic.3m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/hasmntopt.3                                                                           755       0      12           74  4424741213  10746                                                                                                                                                                                                                                                                                                                                                                      .so man3/getmntent.3
.\" @(#)hasmntopt.3 1.5 89/03/27 SMI; 
hcreate.3 r     I  
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n      N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/havedisk.3r                                                                           755       0      12           71  4424741213  10706                                                                                                                                                                                                                                                                                                                                                                      .so man3/rstat.3r
.\" @(#)havedisk.3r 1.5 89/03/27 SMI; 
 
hdestroy.3      J  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/hcreate.3                                                                             755       0      12           70  4424741213  10340                                                                                                                                                                                                                                                                                                                                                                      .so man3/hsearch.3
.\" @(#)hcreate.3 1.5 89/03/27 SMI; 
  host2netname.3n     K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/hdestroy.3                                                                            755       0      12           71  4424741214  10570                                                                                                                                                                                                                                                                                                                                                                      .so man3/hsearch.3
.\" @(#)hdestroy.3 1.5 89/03/27 SMI; 
 K  	hsearch.3 n     L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/host2netname.3n                                                                       755       0      12           72  4424741214  11515                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)host2netname.3n 1.4 89/03/27 SMI;
L  htonl.3n  n     M  htons.3n  n     N  
hyperbolic.3m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m       W  inch.3v m N      W  inch.3v e \(em \fLgetwd\fP"
.IX  "working directory"  "get pathn./share/man/man3/hsearch.3                                                                             755       0      12        10626  4424741214  10433                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hsearch.3 1.9 89/03/27 SMI; from S5
.TH HSEARCH 3 "22 March 1989"
.SH NAME
hsearch, hcreate, hdestroy \- manage hash search tables
.SH SYNOPSIS
.B #include <search.h>
.LP
.nf
.B \s-1ENTRY\s+1 \(**hsearch (item, action)
.B \s-1ENTRY\s+1 item;
.B \s-1ACTION\s+1 action;
.fi
.LP
.nf
.B int hcreate (nel)
.B unsigned nel;
.fi
.LP
.B void hdestroy ( )
.SH DESCRIPTION
.IX "hsearch function" "" "\fLhsearch\fR \(em hash table search routine"
.IX "hash table search routine \(em \fLhsearch\fR"
.IX "search functions" "hsearch" "" "\fLhsearch\fR \(em hash table search"
.IX "hcreate function" "" "\fLhcreate\fR \(em create hash table"
.IX "create" "hash table \(em \fLhcreate\fR"
.IX "hdestroy function" "" "\fLhdestroy\fR \(em destroy hash table"
.IX "destroy hash table \(em \fLhdestroy\fR"
.LP
.B hsearch(\|)
is a hash-table search routine generalized from Knuth (6.4) Algorithm D.
It returns a pointer into a hash table indicating the location at which
an entry can be found.
.I item
is a structure of type
.SM ENTRY
(defined in the
.B <search.h>
header file)
containing two pointers:
.I item.key
points to the comparison key, and
.I item.data
points to any other data to be associated with that key.
(Pointers to types other than character
should be cast to pointer-to-character.)
.I action
is a member of an enumeration type
.SM ACTION
indicating the disposition of the entry if it cannot be found in the table.
.SB ENTER
indicates that the item should be inserted in the table at an
appropriate point.
.SB FIND
indicates that no entry should be made.
Unsuccessful resolution is
indicated by the return of a
.SM NULL
pointer.
.LP
.B hcreate(\|)
allocates sufficient space for the table, and must be called before
.B hsearch(\|)
is used.
.I nel
is an estimate of the maximum number of entries that
the table will contain.
This number may be adjusted upward by the
algorithm in order to obtain certain mathematically favorable
circumstances.
.LP
.B hdestroy(\|)
destroys the search table,
and may be followed by another call to
.BR hcreate .
.SH NOTES
.B hsearch(\|)
uses
.B open addressing
with a
.I multiplicative
hash function.
.SH EXAMPLE
The following example will read in strings followed by two
numbers and store them in a hash table, discarding duplicates.
It will then read in strings and find the matching entry
in the hash table and print it out.
.LP
.RS
.nf
.ft B
.ss 18
#include <stdio.h>
#include <search.h>
struct info {		/\(** this is the info stored in the table \(**/
	int age, room;	/\(** other than the key. \(**/
};
#define
\s-1NUM_EMPL\s0    5000    /\(** # of elements in search table \(**/
main( )
{
	/\(** space to store strings \(**/
	char string_space[\s-1NUM_EMPL\s+1\(**20];
	/\(** space to store employee info \(**/
	struct info info_space[\s-1NUM_EMPL\s+1];
	/\(** next avail space in string_space \(**/
	char \(**str_ptr = string_space;
	/\(** next avail space in info_space \(**/
	struct info \(**info_ptr = info_space;
	\s-1ENTRY\s+1 item, \(**found_item, \(**hsearch( );
	/\(** name to look for in table \(**/
	char name_to_find[30];	
	int i = 0;
	/\(** create table \(**/
	(void) hcreate(\s-1NUM_EMPL\s+1);
	while (scanf("%s%d%d", str_ptr, &info_ptr\(mi>age,
	       &info_ptr\(mi>room) !=
\s-1EOF\s0 && i++ <
\s-1NUM_EMPL\s0) {
		/\(** put info in structure, and structure in item \(**/
		item.key = str_ptr;
		item.data = (char \(**)info_ptr;
		str_ptr += strlen(str_ptr) + 1;
		info_ptr++;
		/\(** put item into table \(**/
		(void) hsearch(item,
\s-1ENTER\s0);
	}
	/\(** access table \(**/
	item.key = name_to_find;
	while (scanf("%s", item.key) != \s-1EOF\s0) {
	    if ((found_item = hsearch(item,
\s-1FIND\s0)) != \s-1NULL\s0) {
		/\(** if item is in the table \(**/
		 (void)printf("found %s, age = %d, room = %d\en",
			found_item\(mi>key,
			((struct info \(**)found_item\(mi>data)\(mi>age,
			((struct info \(**)found_item\(mi>data)\(mi>room);
	    } else {
		 (void)printf("no such employee %s\en",
			name_to_find);
	    }
	}
}
.ft R
.fi
.RE
.SH SEE ALSO
.BR bsearch (3),
.BR lsearch (3),
.BR malloc (3),
.BR string (3),
.BR tsearch (3)
.SH DIAGNOSTICS
.B hsearch(\|)
returns a
.SM NULL
pointer if either the action is
.SB FIND
and the item could not be found or the action is
.SB ENTER
and the table is full.
.LP
.B hcreate(\|)
returns zero if it cannot allocate sufficient space for the
table.
.SH WARNING
.B hsearch(\|)
and
.B hcreate(\|)
use
.BR malloc (3)
to allocate space.
.SH BUGS
Only one hash search table may be active at any given time.
table indicating the location at which
an entry can be found.
.I item
is a structure of type
.SM ENTRY
(de./share/man/man3/htonl.3n                                                                              755       0      12           72  4424741214  10232                                                                                                                                                                                                                                                                                                                                                                      .so man3/byteorder.3n
.\" @(#)htonl.3n 1.5 89/03/27 SMI; 
 
hyperbolic.3m       W  inch.3v (** if item is in the table \(**/
		 (void)printf("found %s, age = %d, room = %d\en",
			found_item\(mi>key,
			((struct info \(**)found_item\(mi>data)\(mi>age,
			((struct info \(**)found_item\(mi>data)\(mi>room);
	    } else {
		 (void)printf("no such employee %s\en",
			name_to_find);
	    }
	}
}
.ft R
.fi
.RE
.SH SEE ALSO
.BR bsearch (3),
.BR lsearch (3),
.BR malloc (3),
.BR string (3),
.BR tsearch (3)
.SH DI./share/man/man3/htons.3n                                                                              755       0      12           72  4424741214  10241                                                                                                                                                                                                                                                                                                                                                                      .so man3/byteorder.3n
.\" @(#)htons.3n 1.5 89/03/27 SMI; 
W  inch.3v m       W  inch.3v (** if item is in the table \(**/
		 (void)printf("found %s, age = %d, room = %d\en",
			found_item\(mi>key,
			((struct info \(**)found_item\(mi>data)\(mi>age,
			((struct info \(**)found_item\(mi>data)\(mi>room);
	    } else {
		 (void)printf("no such employee %s\en",
			name_to_find);
	    }
	}
}
.ft R
.fi
.RE
.SH SEE ALSO
.BR bsearch (3),
.BR lsearch (3),
.BR malloc (3),
.BR string (3),
.BR tsearch (3)
.SH DI./share/man/man3/hyperbolic.3m                                                                         755       0      12         3636  4424741214  11316                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hyperbolic.3m 1.9 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH HYPERBOLIC 3M "22 november 1987"
.SH NAME
sinh, cosh, tanh, asinh, acosh, atanh \- hyperbolic functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double sinh(x)
.B double x;
.LP
.B double cosh(x)
.B double x;
.LP
.B double tanh(x)
.B double x;
.LP
.B double asinh(x)
.B double x;
.LP
.B double acosh(x)
.B double x;
.LP
.B double atanh(x)
.B double x;
.fi
.IX  "sinh function"  ""  "\fLsinh\fP \(em hyperbolic sine"
.IX  "mathematical functions"  sinh  ""  \fLsinh\fP
.IX  "hyperbolic functions"  sinh  ""  \fLsinh\fP
.IX  "cosh function"  ""  "\fLcosh\fP \(em hyperbolic cosine"
.IX  "mathematical functions"  cosh  ""  \fLcosh\fP
.IX  "hyperbolic functions"  cosh  ""  \fLcosh\fP
.IX  "tanh function"  ""  "\fLtanh\fP \(em hyperbolic tangent"
.IX  "mathematical functions"  tanh  ""  \fLtanh\fP
.IX  "hyperbolic functions"  tanh  ""  \fLtanh\fP
.IX asinh "" "\fLasinh\fR \(em inverse hyperbolic function"
.IX acosh "" "\fLacosh\fR \(em inverse hyperbolic function"
.IX atanh "" "\fLatanh\fR \(em inverse hyperbolic function"
.SH DESCRIPTION
These functions compute the designated direct and inverse hyperbolic
functions for real arguments.
They inherit much of their roundoff error from
.B expm1(\|)
and
.BR log1p ,
described in
.BR exp (3M).
.SH DIAGNOSTICS
These functions handle exceptional arguments in the spirit of
.SM ANSI/IEEE
Std 754-1985.  Thus
.B sinh(\|)
and
.B cosh(\|)
return \(+-\(if on overflow,
.B acosh(\|)
returns a NaN if its argument is less than 1, and
.B atanh(\|)
returns a NaN if its argument has absolute
value greater than 1.
In addition,
.BR sinh , cosh ,
and
.B tanh(\|)
may also set
.B errno
and call
.BR matherr (3M).
.SH "SEE ALSO"
.BR exp (3M),
.BR matherr (3M)
.B hdestroy(\|)
destroys the search table,
and may be followed by another call to
.BR hcreate .
.S./share/man/man3/inch.3v                                                                               755       0      12           65  4424741216  10043                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)inch.3v 1.4 89/03/27 SMI;
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH HYPERBOLIC 3M "22 november 1987"
.SH NAME
sinh, cosh, tanh, asinh, acosh, atanh \- hyperbolic functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double sinh(x)
.B double x;
.LP
.B double cosh(x)
.B double x;
.LP
.B double tanh(x)
.B double x;
.LP
.B double a./share/man/man3/hypot.3m                                                                              755       0      12         1546  4424741215  10320                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hypot.3m 1.15 89/03/27 SMI; from UCB 4.3
.TH HYPOT 3M  "22 March 1989"
.SH NAME
hypot \- Euclidean distance
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double hypot(x, y)
.B double x, y;
.fi
.IX  "hypot function"  ""  "\fLhypot\fR \(em Euclidean distance"
.IX  "mathematical functions"  hypot  ""  \fLhypot\fR
.IX  "Euclidean distance function \(em \fLhypot\fR"
.SH DESCRIPTION
.B hypot(\|)
returns
.IP
.B sqrt(x*x + y*y) ,
.LP
taking precautions against unwarranted
.SM IEEE
exceptions.  On
.SM IEEE
overflow,
.B hypot(\|)
may also set
.B errno
and call
.BR matherr (3M).
.B hypot(\(+-\(if, y)
is +\(if for any y, even a NaN,
and is exceptional only for a signaling NaN.
.LP
.B hypot(x,y)
and
.BR atan2 (3M)
convert rectangular coordinates
.RI ( x,y )
to polar
.RI ( r,\(*h );
.B hypot(\|)
computes
.IR r ,
the modulus or radius.
.SH SEE ALSO
.BR matherr (3M)
 
ipalloc.3r    #  s  irint.3m    #  t  	isalnum.3 W  #,  v  
isalnum.3v W  #@  w  	isalpha.3 W  #T  x  
isalpha.3v W  #h  y  	isascii../share/man/man3/idlok.3v                                                                              755       0      12           66  4424741215  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)idlok.3v 1.4 89/03/27 SMI;
 \  R   ieee_functions.3m R   t  S  ieee_handler.3m      T  ieee_test.3m        U  ieee_values.3m      V  ilogb.3m m h     X  inch.3x      Y  index.3      Z  inet.3n   !   [  inet_addr.3n  !   !  \  
inet_lnaof.3n !  !4  ]   inet_makeaddr.3n  ]  !L  ^  
inet_netof.3n !L  !d  _  inet_network.3n   !|  `  inet_ntoa.3n  !|  !  a  infinity.3m   !  b  initgroups.3  !  !  c  
initscr.3v    !  d  
./share/man/man3/ieee_flags.3m                                                                         755       0      12        10676  4424741215  11264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ieee_flags.3m 1.13 89/03/27 SMI;
.TH IEEE_FLAGS 3M  "21 October 1987"
.UC 4
.de Pi		\" PI stuff sign
.if n \\
\\$2pi\\$1
.if t \\
\\$2\\(*p\\$1
..
.ds up \fIulp\fR
.SH NAME
ieee_flags \- mode and status function for IEEE standard arithmetic
.SH SYNOPSIS
.B #include <sys/ieeefp.h>
.LP
.nf
.B int ieee_flags(action,mode,in,out)
.B char *action, *mode, *in, **out;
.fi
.SH DESCRIPTION
.IX "ieee_flags function" "" "\fLieee_flags()\fP function"
.LP
This function provides easy access to the modes and status required to
fully exploit
.SM ANSI/IEEE
Std 754-1985 arithmetic in a C program.  All
arguments are pointers to strings.
Results arising from invalid arguments and
invalid combinations are undefined for efficiency.
.LP
There are four types of
.IR action :
``get'', ``set'', ``clear'', and ``clearall''.
There are three valid settings for
.IR mode ,
two corresponding to modes of
.SM IEEE
arithmetic:
.IP
.nf
``direction'',		.\|.\|. current rounding direction mode
``precision'',		.\|.\|. current rounding precision mode
.fi
.LP
and one corresponding to status of
.SM IEEE
arithmetic:
.IP
.nf
``exception''. 		.\|.\|. accrued exception-occurred status
.fi
.LP
There are 14 types of
.I in
and
.I out :
.IP
.nf
``nearest'',		.\|.\|. round toward nearest
``tozero'', 		.\|.\|. round toward zero
``negative'',		.\|.\|. round toward negative infinity
``positive'',		.\|.\|. round toward positive infinity
``extended'',
``double'',
``single'',
``inexact'',
``division'', 		.\|.\|. division by zero exception
``underflow'',
``overflow'',
``invalid'',
``all'',			.\|.\|. all five exceptions above
``common''. 		.\|.\|. invalid, overflow, and division exceptions
.fi
.LP
Note: ``all'' and ``common'' only make sense with ``set'' or ``clear''.
.LP
For ``clearall'',
.B ieee_flags(\|)
returns 0 and restores all default modes and status.
Nothing will be assigned to
.IR out .
Thus
.IP
.nf
.ft B
char *mode, *out, *in;
ieee_flags("clearall",mode, in, &out);
.ft R
.fi
.LP
set rounding direction to ``nearest'', rounding precision to ``extended'',
and all accrued exception-occurred status to zero.
.LP
For ``clear'',
.B ieee_flags(\|)
returns 0 and restores the default mode or status.
Nothing will be assigned to
.IR out .
Thus
.IP
.nf
.ft B
char *out, *in;
ieee_flags("clear","direction", in, &out);       \fP.\|.\|. set rounding direction to round to nearest.
.fi
.ft R
.LP
For ``set'',
.B ieee_flags(\|)
returns 0 if the action is
successful and 1 if the corresponding required status or mode is not
available (for instance, not supported in
hardware). Nothing will be assigned to
.IR out .
Thus
.IP
.nf
.ft B
char *out, *in;
ieee_flags ("set","direction","tozero",&out);	\fP.\|.\|. set rounding direction to round toward zero;
.fi
.ft R
.LP
For ``get'', we have the following cases:
.LP
Case 1:
.I mode
is ``direction''. In that case,
.I out
returns one of the four strings
``nearest'', ``tozero'', ``positive'', ``negative''; and
.B ieee_flags(\|)
returns a value corresponding to
.I out
according to the enum
.I fp_direction_type
defined in
.BR <sys/ieeefp.h> .
.LP
Case 2:
.I mode
is ``precision''. In that case,
.I out
returns one of the three strings
``extended'', ``double'', ``single''; and
.B ieee_flags(\|)
returns a value corresponding to
.I out
according to the enum
.I fp_precision_type
defined in
.BR <sys/ieeefp.h> .
.br
.ne 10
.LP
Case 3:
.I mode
is ``exception''. In that case,
.I out
returns
.IP
.nf
.BR (a) " ``not available'' if information on exception is not available,"
.BR (b) " ``no exception'' if no accrued exception,"
.BR (c) " the accrued exception that has the highest priority according to the list below"
.RS
.IP
.BR  (1) " the exception named by \fIin\fP,"
.BR  (2) " ``invalid'',"
.BR  (3) " ``overflow'',"
.BR  (4) " ``division'',"
.BR  (5) " ``underflow'',"
.BR  (6) " ``inexact''."
.fi
.RE
.LP
In this case
.B ieee_flags(\|)
returns a five bit value where each bit
(cf. enum
.I fp_exception_type
in
.BR <sys/ieeefp.h> )
corresponds to an exception-occurred accrued
status flag: 0 = off, 1 = on.  The bit corresponding to 
a particular exception varies among architectures.
.LP
Example:
.IP
.nf
.ft B
char *out; int k, ieee_flags(\|);
ieee_flags ("clear","exception","all",&out);	/* clear all accrued exceptions */
\&.\|.\|.
\&.\|.\|. (code that generates three exceptions: overflow, invalid, inexact)
\&.\|.\|.
k = ieee_flags("get","exception","overflow",&out);
.ft R
.fi
.LP
then out = ``overflow'', and on a Sun-3, k=25.
.SH FILES
.PD 0
.TP 20
.B /usr/include/sys/ieeefp.h
.TP
.B /usr/lib/libm.a
.PD
   lwp_stkcswset.3l    -    lwp_suspend.3l   -    ./share/man/man3/ieee_functions.3m                                                                     755       0      12        11111  4424741215  12161                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ieee_functions.3m 1.14 89/03/27 SMI;
.TH IEEE_FUNCTIONS 3M "25 March 1989"
.ds nn \fINaN\fR
.SH NAME
ieee_functions, fp_class, finite, ilogb, isinf, isnan, isnormal, issubnormal, iszero, signbit, copysign, fabs, fmod, nextafter, remainder, scalbn \- appendix and related miscellaneous functions for IEEE arithmetic
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B enum fp_class_type fp_class(x)
.B double x;
.LP
.B int finite(x)
.B double x;
.LP
.B int ilogb(x)
.B double x;
.LP
.B int isinf(x)
.B double x;
.LP
.B int isnan(x)
.B double x;
.LP
.B int isnormal(x)
.B double x;
.LP
.B int issubnormal(x)
.B double x;
.LP
.B int iszero(x)
.B double x;
.LP
.B int signbit(x)
.B double x;
.LP
.B double copysign(x,y)
.B double x, y;
.LP
.B double fabs(x)
.B double x;
.LP
.B double fmod(x,y)
.B double x, y;
.LP
.B double nextafter(x,y)
.B double x, y;
.LP
.B double remainder(x,y)
.B double x, y;
.LP
.B double scalbn(x,n)
.B double x; int n;
.fi
.ne 13
.SH DESCRIPTION
.IX "ilogb function" "" "\fLilogb()\fP function"
.IX "finite function" "" "\fLfinite()\fP function"
.IX "fp_class function" "" "\fLfp_class()\fP function"
.IX "scalbn function" "" "\fLscalbn()\fP function"
.IX "remainder function" "" "\fLremainder()\fP function"
.IX "nextafter function" "" "\fLnextafter()\fP function"
.IX "fmod function" "" "\fLfmod()\fP function"
.IX "fabs function" "" "\fLfabs()\fP function"
.IX "copysign function" "" "\fLcopysign()\fP function"
.IX "signbit function" "" "\fLsignbit()\fP function"
.IX "iszero function" "" "\fLiszero()\fP function"
.IX "issubnormal function" "" "\fLissubnormal()\fP function"
.IX "isnormal function" "" "\fLisnormal()\fP function"
.IX "isnan function" "" "\fLisnan()\fP function"
.IX "isinf function" "" "\fLisinf()\fP function"
.IX "isinf function" "" "\fLisinf()\fP function"
Most of these functions provide capabilities required by
.SM ANSI/IEEE
Std 754-1985 or suggested in its appendix.
.LP
.BI fp_class( x )
corresponds to the IEEE's class() and
classifies x as zero, subnormal, normal, \(if, or quiet or signaling \*(nn;
.B <floatingpoint.h>
defines
.IR "enum fp_class_type" .
The following functions return 0 if the indicated condition is not satisfied:
.RS
.PD 0
.TP 15
.BI finite( x )
returns 1 if x is zero, subnormal or normal
.TP
.BI isinf( x )
returns 1 if
.I x
is \(if
.TP
.BI isnan( x )
returns 1 if
.I x
is \*(nn
.TP
.BI isnormal( x )
returns 1 if
.I x
is normal
.TP
.BI issubnormal( x )
returns 1 if
.I x
is subnormal
.TP
.BI iszero( x )
returns 1 if
.I x
is zero
.TP
.BI signbit( x )
returns 1 if
.IR x 's
sign bit is set
.PD
.RE
.LP
.BI ilogb( x )
returns the unbiased exponent of
.I x
in integer format.
.BI ilogb( \(+-\(if ") = +\s-1MAXINT\s0"
and
.BR "ilogb(0) = \-\s-1MAXINT\s0" ;
.B <values.h>
defines
.SM MAXINT
as the largest int.
.BI ilogb( x )
never generates an exception.  When
.I x
is subnormal,
.BI ilogb( x )
returns an exponent computed as if
.I x
were first normalized.
.LP
.BI copysign( x , y )
returns
.I x
with
.IR y 's
sign bit.
.LP
.BI fabs( x )
returns the absolute value of
.IR x .
.LP
.BI nextafter( x , y )
returns the next machine representable number from
.I x
in the direction
.IR y .
.LP
.BI remainder( x , y )
and
.BI fmod( x , y )
return a remainder of
.I x
with respect to
.IR y ;
that is, the result
.I r
is one of the numbers that differ from
.I x
by an integral multiple of
.IR y .
Thus (x-r)/y is an integral value, even though it might exceed
.SM MAXINT
if it were explicitly computed as an int.
Both functions return one of the two such r smallest in magnitude.
.BI remainder( x , y )
is the operation specified in
.SM ANSI/IEEE
Std 754-1985; the result of
.BI fmod( x , y )
may differ from 
.BI remainder 's 
result by
.RI \(+- y .
The magnitude of 
.BI remainder 's 
result
can not exceed half that of
.IR y ;
its sign might not agree with either
.I x
or
.IR y .
The magnitude of
.BI fmod 's
result is less than that of
.IR y ;
its sign agrees with that of
.IR x .
Neither function can generate an exception as long as both arguments are normal or subnormal.
\fBremainder( x , 0), fmod( x , 0), remainder(\(if, y ), \fPand \fBfmod(\(if, y )\fP
are invalid operations that produce a \*(nn.
.LP
.BI scalbn( x , n )
returns
.IB x "* 2**n"
computed by exponent manipulation rather than by actually
performing an exponentiation or a multiplication.  Thus
.IP
.BI "1 \(<= scalbn(fabs(" x "),\-ilogb(" x ")) < 2"
.LP
for every
.I x
except 0,
.if n \
infinity,
.if t \
\(if,
and \*(nn.
.SH FILES
.PD 0
.TP 20
.B /usr/include/floatingpoint.h
.TP
.B /usr/include/math.h
.TP
.B /usr/include/values.h
.TP
.B /usr/lib/libm.a
.PD
.SH "SEE ALSO"
.BR floatingpoint (3),
.BR ieee_flags (3M),
.BR matherr (3M)
 
   mon_cond_enter.3l /  /  
  
mon_create.3l 
  0   
  mout.3x   0  
  mon_destroy.3l    00  
  mon_enter.3l l   0L  
   mon_enumerate.3l  0L  0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l x  0  
  	monitor.3 .3  0  
  monstartup.3  0  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
 ./share/man/man3/ieee_handler.3m                                                                       755       0      12        10347  4424741215  11600                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ieee_handler.3m 1.15 89/03/27 SMI;
.TH IEEE_HANDLER 3M  "21 October 1987"
.UC 4
.de Pi		\" PI stuff sign
.if n \\
\\$2pi\\$1
.if t \\
\\$2\\(*p\\$1
..
.ds up \fIulp\fR
.SH NAME
ieee_handler \- IEEE exception trap handler function
.SH SYNOPSIS
.nf
.B #include <floatingpoint.h>
.LP
.B int ieee_handler(action,exception,hdl)
.B char action[\|], exception[\|];
.B sigfpe_handler_type hdl;
.fi
.SH DESCRIPTION
.IX "ieee_handler function" "" "\fLieee_handler()\fP function"
.LP
This function provides easy exception handling to
exploit
.SM ANSI/IEEE
Std 754-1985 arithmetic in a C program.  All
arguments are pointers to strings.
Results arising from invalid arguments and invalid combinations
are undefined for efficiency.
.LP
There are three types of
.I action :
``get'', ``set'', and ``clear''.
There are five types of
.I exception :
.RS
.PD 0
.TP 15
``inexact''
.TP
``division''
\&.\|.\|. division by zero exception
.TP
``underflow''
.TP
``overflow''
.TP
``invalid''
.TP
``all''
\&.\|.\|. all five exceptions above
.TP
``common''
\&.\|.\|. invalid, overflow, and division exceptions
.PD
.RE
.LP
Note: ``all'' and ``common'' only make sense with ``set'' or ``clear''.
.LP
.B hdl
contains the address of a signal-handling routine.
.B <floatingpoint.h>
defines
.IR sigfpe_handler_type .
.LP
``get'' will get the location of the current handler routine for
.I exception
in
.B hdl .
``set'' will set the routine pointed at by
.B hdl
to be the handler routine
and at the same time enable the trap on
.IR exception ,
except when
.B hdl
==
.BR \s-1SIGFPE_DEFAULT\s0
or
.BR \s-1SIGFPE_IGNORE\s0 ;
then
.B ieee_handler(\|)
will disable the trap on
.IR exception .
When
.B hdl
==
.BR \s-1SIGFPE_ABORT\s0 ,
any trap on
.I exception
will dump core using
.BR abort (3).
``clear'' ``all'' disables trapping on all five exceptions.
.LP
Two steps are required to intercept an
.SM IEEE\s0-related
.BR \s-1SIGFPE\s0
code with
.BR ieee_handler :
.TP
1)
Set up a handler with
.BR ieee_handler .
.TP
2)
Perform a floating-point operation that generates
the intended 
.SM IEEE
exception.
.LP
Unlike
.BR sigfpe (3),
.B ieee_handler(\|)
also adjusts floating-point hardware mode bits affecting
.SM IEEE
trapping.  For ``clear'', ``set''
.BR \s-1SIGFPE_DEFAULT\s0 ,
or ``set''
.BR \s-1SIGFPE_IGNORE\s0 ,
the hardware trap is disabled.
For any other ``set'', the hardware trap is enabled.
.LP
.BR \s-1SIGFPE\s0
signals can be handled using
.BR sigvec (2),
.BR signal (3),
.BR signal (3F),
.BR sigfpe (3),
or
.BR ieee_handler (3M).
In a particular program, to avoid confusion,
use only one of these interfaces to handle
.BR \s-1SIGFPE\s0
signals.
.SH DIAGNOSTICS
.B ieee_handler(\|)
normally returns 0.
In the case of ``set'', 1 will be returned
if the action is not available (for instance, not supported in hardware).
.br
.ne 25
.SH EXAMPLE
.LP
A user-specified signal handler might look like this:
.RS
.ft B
.nf
void sample_handler( sig, code, scp, addr)
int sig ;               /* sig == \s-1SIGFPE\s0 always */
int code ;
struct sigcontext *scp ;
char *addr ;
{
	/*
	   Sample user-written sigfpe code handler.
	   Prints a message and continues.
	   struct sigcontext is defined in <signal.h>.
	 */
	printf("ieee exception code %x occurred at pc %X \en",code,scp->sc_pc);
}
.fi
.RE
.LP
and it might be set up like this:
.nf
.RS
.ft B
extern void sample_handler(\|);
main(\|)
{
	sigfpe_handler_type hdl, old_handler1, old_handler2;
/*
* save current overflow and invalid handlers
*/
	ieee_handler("get","overflow",old_handler1);
	ieee_handler("get","invalid", old_handler2);
/*
* set new overflow handler to sample_handler(\|) and set new
* invalid handler to \s-1SIGFPE_ABORT\s0 (abort on invalid)
*/
	hdl = (sigfpe_handler_type) sample_handler;
	if(ieee_handler("set","overflow",hdl) != 0)
		printf("ieee_handler can't set overflow \en");
	if(ieee_handler("set","invalid",\s-1SIGFPE_ABORT\s0) != 0)
		printf("ieee_handler can't set invalid \en");
	.\|.\|.
/*
* restore old overflow and invalid handlers
*/
	ieee_handler("set","overflow", old_handler1);
	ieee_handler("set","invalid", old_handler2);
}
.fi
.RE
.ft R
.SH FILES
.PD 0
.TP 20
.B /usr/include/floatingpoint.h
.TP
.B /usr/include/signal.h
.TP
.B /usr/lib/libm.a
.PD
.SH SEE ALSO
.BR sigvec (2),
.BR abort (3),
.BR floatingpoint (3),
.BR sigfpe (3),
.BR signal (3),
.BR signal (3F)
c  .  
  memcmp.3 emc  .  
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3 emo  /  
  meta.3v   /(  
  mfree.3x    /8  
  min.3x   /P  
	  
min_normal.3m n.  /l  
   min_subnormal.3m   x  /  
  	mkstemp.3 ma  /  
  mktemp.3 kst  /  

  ./share/man/man3/ieee_test.3m                                                                          755       0      12         4061  4424741216  11117                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ieee_test.3m 1.12 89/03/27 SMI;
.TH IEEE_TEST 3M "21 January 1988"
.ds nn \fINaN\fR
.SH NAME
ieee_test, logb, scalb, significand \- IEEE test functions for verifying standard compliance
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double logb(x)
.B double x;
.LP
.B double scalb(x,y)
.B double x; double y;
.LP
.B double significand(x)
.B double x;
.fi
.SH DESCRIPTION
.IX "logb function" "" "\fLlogb()\fP function"
.IX "scalb function" "" "\fLscalb()\fP function"
.IX "significand function" "" "\fLsignificand()\fP function"
These functions allow users to verify compliance to
.SM ANSI/IEEE
Std 754-1985 by running certain test vectors
distributed by the University of California.
Their use is not otherwise recommended; instead use
.BI scalbn( x , n )
and
.BI ilogb( x )
described in
.BR ieee_functions (3M).
See the
.TX FPOINT
for details.
.LP
.BI logb( x )
returns the unbiased exponent of
.I x
in floating-point format,
for exercising the
logb(L)
test vector.
.BR "logb(\(+-\(if) = +\(if" ;
.B logb(0) = \-\(if
with a division by zero exception.
.BI logb( x )
differs from
.BI ilogb( x )
in returning a result in floating-point rather than integer format,
in sometimes signaling
.SM IEEE
exceptions, and in not normalizing subnormal
.IR x .
.LP
.BI scalb( x ,(double)n )
returns
.I x * 2**n
computed by exponent manipulation rather than by actually
performing an exponentiation or a multiplication,
for exercising the
scalb(S)
test vector.  Thus
.RS
.BI "0 \(<= scalb(fabs(" x "),\-logb(" x ")) < 2"
.RE
for every
.I x
except 0,
.if n \
infinity
.if t \
\(if
and \*(nn.
.BI scalb( x , y )
is not defined when
.I y
is not an integral value.
.BI scalb( x , y )
differs from
.BI scalbn( x ,n )
in that the second argument is in floating-point rather than integer format.
.LP
.BI significand( x )
computes just
.RS
.BI scalb( x ", (double) -ilogb(" x "))"\fR,
.RE
for exercising the fraction-part(F) test vector.
.SH FILES
.PD 0
.TP 20
.B /usr/include/math.h
.TP
.B /usr/lib/libm.a
.PD
.SH "SEE ALSO"
.BR floatingpoint (3),
.BR ieee_values (3M),
.BR ieee_functions (3M),
.BR matherr (3M)
 kvm_write.3k k d  '    l64a.3 t  '    label.3x 64a  '    	lcong48.3 3x  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x d  (     ldfcn.3   (    
ldclose.3x c  ((    ldexp.3m se.  (<    ldfhread.3x   (T    ldgetname.3x 3x   (h    
ldlinit.3x x  (|    
ldlitem.3x .  (    
ldlread.3x .  (    
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x 3x   (    ./share/man/man3/ieee_values.3m                                                                        755       0      12         3765  4424741216  11451                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ieee_values.3m 1.9 89/03/27 SMI;
.TH IEEE_VALUES 3M "6 October 1987"
.ds nn \fINaN\fR
.SH NAME
ieee_values, min_subnormal, max_subnormal, min_normal, max_normal, infinity, quiet_nan, signaling_nan, HUGE, HUGE_VAL \- functions that return extreme values of IEEE arithmetic
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double min_subnormal(\|)
.LP
.B double max_subnormal(\|)
.LP
.B double min_normal(\|)
.LP
.B double max_normal(\|)
.LP
.B double infinity(\|)
.LP
.B double quiet_nan(n)
.B long n;
.LP
.B double signaling_nan(n)
.B long n;
.LP
.B #define HUGE (infinity(\|))
.LP
.B #define HUGE_VAL (infinity(\|))
.fi
.SH DESCRIPTION
.IX "min_subnormal function" "" "\fLmin_subnormal()\fP function"
.IX "max_subnormal function" "" "\fLmax_subnormal()\fP function"
.IX "min_normal function" "" "\fLmin_normal()\fP function"
.IX "max_normal function" "" "\fLmax_normal()\fP function"
.IX "infinity function" "" "\fLinfinity()\fP function"
.IX "quiet_nan function" "" "\fLquiet_nan()\fP function"
.IX "signaling_nan function" "" "\fLsignaling_nan()\fP function"
.IX "HUGE function" "" "\fLHUGE()\fP function"
.IX "HUGE_VAL function" "" "\fLHUGE_VAL()\fP function"
.LP
These functions return special values associated with
.SM ANSI/IEEE
Std 754-1985 double-precision
floating-point arithmetic: the
smallest and largest positive subnormal numbers,
the smallest and largest positive normalized numbers,
positive infinity,
and a quiet and signaling NaN.
The long parameters
.I n
to
.BI quiet_nan( n )
and
.BI signaling_nan( n )
are presently unused but are reserved for future use to specify the significand
of the returned NaN.
.LP
None of these functions are affected by
.SM IEEE
rounding or trapping modes or generate any
.SM IEEE
exceptions.
.LP
The macro
.SB HUGE
returns +\(if in accordance with previous Sun\s-1OS\s0 releases.
The macro
.SB HUGE_VAL
returns +\(if in accordance with the System V Interface Definition.
.SH FILES
.PD 0
.TP 20
.B /usr/include/math.h
.TP
.B /usr/lib/libm.a
.PD
.SH "SEE ALSO"
.BR ieee_functions (3M)
   kvm_./share/man/man3/ilogb.3m                                                                              755       0      12           76  4424741216  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)ilogb.3m 1.3 89/03/27 SMI;
3      Z  inet.3n   !   [  inet_addr.3n 3n   !  \  
inet_lnaof.3n n   !4  ]   inet_makeaddr.3n  !4  !L  ^  
inet_netof.3n !4  !d  _  inet_network.3n   !|  `  inet_ntoa.3n 3n   !  a  infinity.3m   !  b  initgroups.3 3m   !  c  
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  ./share/man/man3/inch.3x                                                                               755       0      12           66  4424741216  10046                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)inch.3x 1.5 89/03/27 SMI; 
et.3n   !   [  inet_addr.3n  !   !  \  
inet_lnaof.3n !  !4  ]   inet_makeaddr.3n  ]  !L  ^  
inet_netof.3n !L  !d  _  inet_network.3n   !|  `  inet_ntoa.3n  !|  !  a  infinity.3m   !  b  initgroups.3  !  !  c  
initscr.3v    !  d  
initscr.3x 3  !  e  initstate.3   "   f  
innetgr.3n    "  g  insch.3v n t  "(  h  insch.3x gr.  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 3x   "|  l  ./share/man/man3/index.3                                                                               755       0      12           66  4424741216  10044                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)index.3 1.6 89/03/27 SMI; 
et_addr.3n  [  !  \  
inet_lnaof.3n \  !4  ]   inet_makeaddr.3n     !L  ^  
inet_netof.3n ^  !d  _  inet_network.3n   !|  `  inet_ntoa.3n  `  !  a  infinity.3m   !  b  initgroups.3  b  !  c  
initscr.3v   !  d  
initscr.3x   !  e  initstate.3   "   f  
innetgr.3n    "  g  insch.3v  "  "(  h  insch.3x  "(  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3  "d  "|  l  intrflush.3v  l  "./share/man/man3/inet.3n                                                                               755       0      12         7731  4424741217  10121                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)inet.3n 1.17 89/03/27 SMI; from UCB 4.2
.TH INET 3N "18 February 1988"
.SH NAME
inet inet_addr, inet_network, inet_makeaddr, inet_lnaof, inet_netof, inet_ntoa \- Internet address manipulation
.SH SYNOPSIS
.ft B
.nf
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
.LP
.ft B
unsigned long
inet_addr(cp)
char *cp;
.LP
.ft B
inet_network(cp)
char *cp;
.LP
.ft B
struct in_addr
inet_makeaddr(net, lna)
int net, lna;
.LP
.ft B
inet_lnaof(in)
struct in_addr in;
.LP
.ft B
inet_netof(in)
struct in_addr in;
.LP
.ft B
char *
inet_ntoa(in)
struct in_addr in;
.ft R
.fi
.IX  "Internet address manipulation functions"
.IX  "manipulate Internet addresses"
.IX  "inet_addr function"  ""  "\fLinet_addr\fP \(em Internet address manipulation"
.IX  "inet_network function"  ""  "\fLinet_network\fP \(em Internet address manipulation"
.IX  "inet_makeaddr function"  ""  "\fLinet_makeaddr\fP \(em Internet address manipulation"
.IX  "inet_lnaof function"  ""  "\fLinet_lnaof\fP \(em Internet address manipulation"
.IX  "inet_netof function"  ""  "\fLinet_netof\fP \(em Internet address manipulation"
.IX  "inet_ntoa function"  ""  "\fLinet_ntoa\fP \(em Internet address manipulation"
.SH DESCRIPTION
.LP
The routines
.B inet_addr(\|)
and
.B inet_network(\|)
each interpret character strings representing numbers expressed in the
Internet standard
.RB ` . '
notation, returning numbers suitable for
use as Internet addresses and Internet network numbers, respectively.
The routine
.B inet_makeaddr(\|)
takes an Internet network number and a local network address and
constructs an Internet address from it.  The routines
.B inet_netof(\|)
and
.B inet_lnaof(\|)
break apart Internet host addresses, returning the network number and
local network address part, respectively.
.LP
The routine
.B inet_ntoa(\|)
returns a pointer to a string in the base 256 notation ``d.d.d.d''
described below.
.LP
All Internet address are returned in network order (bytes ordered from
left to right).  All network numbers and local address parts are
returned as machine format integer values.
.SH "INTERNET ADDRESSES"
Values specified using the
.RB ` . '
notation take one of the following forms:
.IP
.nf
.ft B
a.b.c.d
a.b.c
a.b
a
.ft R
.fi
.LP
When four parts are specified, each is interpreted as a byte of data
and assigned, from left to right, to the four bytes of an Internet
address.  Note: when an Internet address is viewed as a 32-bit
integer quantity on
.SM Sun386i 
systems,
the bytes referred to above appear as
.BR d.c.b.a .
That is,
.SM Sun386i
bytes are ordered from right to left.
.LP
When a three part address is specified, the last part is interpreted as
a 16-bit quantity and placed in the right most two bytes of the network
address.  This makes the three part address format convenient for
specifying Class B network addresses as \*(lq128.net.host\*(rq.
.LP
When a two part address is supplied, the last part is interpreted as a
24-bit quantity and placed in the right most three bytes of the network
address.  This makes the two part address format convenient for
specifying Class A network addresses as \*(lqnet.host\*(rq.
.LP
When only one part is given, the value is stored directly in the
network address without any byte rearrangement.
.LP
All numbers supplied as ``parts'' in a
.RB ` . '
notation may
be decimal, octal, or hexadecimal, as specified in the C language (that
is, a leading 0x or
.SM 0X
implies hexadecimal; otherwise, a leading 0
implies octal; otherwise, the number is interpreted as decimal).
.SH "SEE ALSO"
.BR gethostent (3N),
.BR getnetent (3N),
.BR hosts (5),
.BR networks (5),
.SH DIAGNOSTICS
The value \-1 is returned by
.B inet_addr(\|)
and
.B inet_network(\|)
for malformed requests.
.SH BUGS
The problem of host byte ordering versus network byte ordering is
confusing.  A simple way to specify Class C network addresses in a manner
similar to that for Class B and Class A is needed.
.LP
The return value from
.B inet_ntoa(\|)
points to static information which is overwritten in each call.
 
max_normal.3m   .x     max_subn./share/man/man3/inet_addr.3n                                                                          755       0      12           71  4424741217  11041                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_addr.3n 1.5 89/03/27 SMI; 
 !4  ]   inet_makeaddr.3n     !L  ^  
inet_netof.3n ^  !d  _  inet_network.3n   !|  `  inet_ntoa.3n  `  !  a  infinity.3m   !  b  initgroups.3  b  !  c  
initscr.3v   !  d  
initscr.3x   !  e  initstate.3   "   f  
innetgr.3n    "  g  insch.3v  "  "(  h  insch.3x  "(  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3  "d  "|  l  intrflush.3v  l  "  m  intro.3   "  n  intro.3l  "./share/man/man3/inet_lnaof.3n                                                                         755       0      12           72  4424741217  11227                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_lnaof.3n 1.5 89/03/27 SMI; 
!4  !L  ^  
inet_netof.3n    !d  _  inet_network.3n   !|  `  inet_ntoa.3n 3n   !  a  infinity.3m   !  b  initgroups.3 3m   !  c  
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v  "d  "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "./share/man/man3/inet_makeaddr.3n                                                                      755       0      12           75  4424741217  11703                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_makeaddr.3n 1.5 89/03/27 SMI; 
 !d  _  inet_network.3n   !|  `  inet_ntoa.3n 3n   !  a  infinity.3m   !  b  initgroups.3 3m   !  c  
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v tln  "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "  p  intro.3r .3m  "  q./share/man/man3/inet_netof.3n                                                                         755       0      12           72  4424741217  11243                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_netof.3n 1.5 89/03/27 SMI; 
!|  `  inet_ntoa.3n ork  !  a  infinity.3m   !  b  initgroups.3 ity  !  c  
initscr.3v u  !  d  
initscr.3x t  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v nne  "(  h  insch.3x nsc  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 nse  "|  l  intrflush.3v e.3  "  m  intro.3   "  n  intro.3l    "  o  intro.3m ntr  "  p  intro.3r ntr  "  q  intro.3v ntr  "  r  
ipal./share/man/man3/inet_network.3n                                                                       755       0      12           74  4424741220  11615                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_network.3n 1.5 89/03/27 SMI; 
  a  infinity.3m   !  b  initgroups.3 3m   !  c  
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v nse  "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "  p  intro.3r .3m  "  q  intro.3v .3r  "  r  
ipalloc.3r v  #  s  irint.3m./share/man/man3/inet_ntoa.3n                                                                          755       0      12           71  4424741220  11062                                                                                                                                                                                                                                                                                                                                                                      .so man3/inet.3n
.\" @(#)inet_ntoa.3n 1.5 89/03/27 SMI; 
 b  initgroups.3 3m   !  c  
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v tln  "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "  p  intro.3r .3m  "  q  intro.3v .3r  "  r  
ipalloc.3r v  #  s  irint.3m oc.  #  t  	isalnum.3 3m./share/man/man3/infinity.3m                                                                           755       0      12           76  4424741220  10737                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)infinity.3m 1.3 89/03/27 SMI;
 
initscr.3v 3  !  d  
initscr.3x .  !  e  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v tln  "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "  p  intro.3r .3m  "  q  intro.3v .3r  "  r  
ipalloc.3r v  #  s  irint.3m oc.  #  t  	isalnum.3 3m  #,  v  
isalnum.3v .  #@./share/man/man3/initgroups.3                                                                          755       0      12         2241  4424741220  11170                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)initgroups.3 1.11 89/03/27 SMI; from UCB 4.2
.TH INITGROUPS 3 "6 October 1987"
.SH NAME
initgroups \- initialize group access list
.SH SYNOPSIS
.nf
.B initgroups(name, basegid)
.B char *name;
.B int basegid;
.fi
.IX  "initgroups function"  ""  "\fLinitgroups\fP \(em initialize group access list"
.IX  "initialize group access list"  ""  "initialize group access list \(em \fLinitgroups\fP"
.IX  "group access list"  initialize  ""  "initialize \(em \fLinitgroups\fP"
.SH DESCRIPTION
.LP
.B initgroups(\|)
reads through the group file and sets up,
using the
.B setgroups
call
(see 
.BR getgroups (2)),
the group access list for the user
specified in
.IR name .
The
.B basegid
is automatically included in the groups list.
Typically this value is given as
the group number from the password file.
.SH FILES
.PD 0
.TP 20
.B /etc/group
.PD
.SH SEE ALSO
.BR getgroups (2),
.BR getgrent (3)
.SH DIAGNOSTICS
.LP
.B initgroups(\|)
returns \-1 if it was not invoked by the super-user.
.SH BUGS
.LP
.B initgroups(\|)
uses the routines based on
.BR getgrent (3).
If the invoking program uses any of these routines,
the group structure will
be overwritten in the call to
.BR initgroups .
 %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3    %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v &\  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k./share/man/man3/initscr.3v                                                                            755       0      12           70  4424741220  10564                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)initscr.3v 1.4 89/03/27 SMI;
  initstate.3   "   f  
innetgr.3n t  "  g  insch.3v gr.  "(  h  insch.3x .3v  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 tln  "|  l  intrflush.3v 3x   "  m  intro.3   "  n  intro.3l ntr  "  o  intro.3m .3l  "  p  intro.3r .3m  "  q  intro.3v .3r  "  r  
ipalloc.3r v  #  s  irint.3m oc.  #  t  	isalnum.3 3m  #,  v  
isalnum.3v .  #@  w  	isalpha.3 m.  #T  x  
isalpha.3v .  #h  y./share/man/man3/initscr.3x                                                                            755       0      12           71  4424741220  10567                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)initscr.3x 1.5 89/03/27 SMI; 
 
innetgr.3n    "  g  insch.3v n t  "(  h  insch.3x gr.  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m ntr  "  p  intro.3r .3l  "  q  intro.3v .3m  "  r  
ipalloc.3r r  #  s  irint.3m r v  #  t  	isalnum.3 c.  #,  v  
isalnum.3v m  #@  w  	isalpha.3  .  #T  x  
isalpha.3v .  #h  y  	isascii.3  .  #|  z./share/man/man3/initstate.3                                                                           755       0      12           71  4424741221  10731                                                                                                                                                                                                                                                                                                                                                                      .so man3/random.3
.\" @(#)initstate.3 1.5 89/03/27 SMI; 
 insch.3v n    "(  h  insch.3x n t  "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r ntr  "  q  intro.3v .3l  "  r  
ipalloc.3r m  #  s  irint.3m r r  #  t  	isalnum.3  v  #,  v  
isalnum.3v .  #@  w  	isalpha.3  m  #T  x  
isalpha.3v .  #h  y  	isascii.3  .  #|  z  
isascii.3v .  #  {./share/man/man3/innetgr.3n                                                                            755       0      12           76  4424741221  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetgrent.3n
.\" @(#)innetgr.3n 1.5 89/03/27 SMI; 
sch.3x n    "<  i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v ntr  "  r  
ipalloc.3r l  #  s  irint.3m r m  #  t  	isalnum.3  r  #,  v  
isalnum.3v v  #@  w  	isalpha.3  .  #T  x  
isalpha.3v m  #h  y  	isascii.3  .  #|  z  
isascii.3v .  #  {  isatty.3 v .  #  |./share/man/man3/insch.3v                                                                              755       0      12           66  4424741221  10223                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)insch.3v 1.4 89/03/27 SMI;
i  insertln.3v   "P  j  insertln.3x   "d  k  insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v .3   "  r  
ipalloc.3r r  #  s  irint.3m r l  #  t  	isalnum.3  m  #,  v  
isalnum.3v r  #@  w  	isalpha.3  v  #T  x  
isalpha.3v .  #h  y  	isascii.3  m  #|  z  
isascii.3v .  #  {  isatty.3 v .  #  |  	iscntrl.3  .  #  }./share/man/man3/insch.3x                                                                              755       0      12           67  4424741221  10226                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)insch.3x 1.5 89/03/27 SMI; 
j  insertln.3x   "d  k  insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v .3   "  r  
ipalloc.3r    #  s  irint.3m r r  #  t  	isalnum.3  l  #,  v  
isalnum.3v m  #@  w  	isalpha.3  r  #T  x  
isalpha.3v v  #h  y  	isascii.3  .  #|  z  
isascii.3v m  #  {  isatty.3 v .  #  |  	iscntrl.3  .  #  }  
iscntrl.3v .  #  ~./share/man/man3/insertln.3v                                                                           755       0      12           71  4424741221  10751                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)insertln.3v 1.4 89/03/27 SMI;
 insque.3 3x   "|  l  intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v .3   "  r  
ipalloc.3r    #  s  irint.3m r    #  t  	isalnum.3  r  #,  v  
isalnum.3v l  #@  w  	isalpha.3  m  #T  x  
isalpha.3v r  #h  y  	isascii.3  v  #|  z  
isascii.3v .  #  {  isatty.3 v m  #  |  	iscntrl.3  .  #  }  
iscntrl.3v .  #  ~  	isdigit.3  .  #  ./share/man/man3/insertln.3x                                                                           755       0      12           72  4424741222  10755                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)insertln.3x 1.5 89/03/27 SMI; 
 intrflush.3v  "|  "  m  intro.3   "  n  intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v .3   "  r  
ipalloc.3r    #  s  irint.3m r    #  t  	isalnum.3     #,  v  
isalnum.3v r  #@  w  	isalpha.3  l  #T  x  
isalpha.3v m  #h  y  	isascii.3  r  #|  z  
isascii.3v v  #  {  isatty.3 v .  #  |  	iscntrl.3  m  #  }  
iscntrl.3v .  #  ~  	isdigit.3  .  #    
isdigit.3v .  $   ./share/man/man3/insque.3                                                                              755       0      12         2402  4424741222  10272                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)insque.3 1.15 89/03/27 SMI; from UCB 6.2 5/20/86
.TH INSQUE 3 "6 October 1987"
.SH NAME
insque, remque \- insert/remove element from a queue
.SH SYNOPSIS
.nf
.ft B
struct qelem {
	struct	qelem *q_forw;
	struct	qelem *q_back;
	char	q_data[\|];
};
.LP
.ft B
insque(elem, pred)
struct qelem *elem, *pred;
.LP
.ft B
remque(elem)
struct qelem *elem;
.ft R
.fi
.IX  "insque function"  ""  "\fLinsque\fP \(em insert element in queue"
.IX  "remque function"  ""  "\fLremque\fP \(em remove element from queue"
.IX  "insert element in queue"  ""  "insert element in queue \(em \fLinsque\fP"
.IX  remove "element from queue \(em \fLremque\fP"
.IX  queue  "insert element in"  queue  "insert element in \(em \fLinsque\fP"
.IX  queue  "remove element from"  queue  "remove element from \(em \fLremque\fP"
.SH DESCRIPTION
.B insque(\|)
and
.B remque(\|)
manipulate queues built from doubly linked lists.  Each
element in the queue must be in the form of ``struct qelem''.
.B insque(\|)
inserts
.I elem
in a queue immediately after
.IR pred ;
.B remque(\|)
removes an entry
.I elem
from a queue.
m_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k  '$  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k d  '|./share/man/man3/intrflush.3v                                                                          755       0      12           72  4424741222  11133                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)intrflush.3v 1.4 89/03/27 SMI;
 intro.3l .3   "  o  intro.3m .3   "  p  intro.3r .3   "  q  intro.3v .3   "  r  
ipalloc.3r    #  s  irint.3m r    #  t  	isalnum.3     #,  v  
isalnum.3v    #@  w  	isalpha.3     #T  x  
isalpha.3v r  #h  y  	isascii.3  l  #|  z  
isascii.3v m  #  {  isatty.3 v r  #  |  	iscntrl.3  v  #  }  
iscntrl.3v .  #  ~  	isdigit.3  m  #    
isdigit.3v .  $     	isgraph.3  .  $    
isgraph.3v .  $(  ./share/man/man3/intro.3                                                                               755       0      12           63  4424741103  10060                                                                                                                                                                                                                                                                                                                                                                      .so man3/Intro.3
.\" @(#)intro.3 1.6 89/03/27 SMI;
o  intro.3m .3l  "  p  intro.3r .3m  "  q  intro.3v .3r  "  r  
ipalloc.3r v  #  s  irint.3m oc.  #  t  	isalnum.3 3m  #,  v  
isalnum.3v .  #@  w  	isalpha.3 m.  #T  x  
isalpha.3v .  #h  y  	isascii.3 a.  #|  z  
isascii.3v .  #  {  isatty.3 ii.  #  |  	iscntrl.3 .3  #  }  
iscntrl.3v .  #  ~  	isdigit.3 l.  #    
isdigit.3v .  $     	isgraph.3 t.  $    
isgraph.3v .  $(    isinf.3m ph.  $<    	./share/man/man3/intro.3l                                                                              755       0      12           65  4424741104  10237                                                                                                                                                                                                                                                                                                                                                                      .so man3/Intro.3l
.\" @(#)intro.3l 1.5 89/03/27 SMI;
 p  intro.3r  "  "  q  intro.3v  "  "  r  
ipalloc.3r   #  s  irint.3m  #  #  t  	isalnum.3 #  #,  v  
isalnum.3v ,  #@  w  	isalpha.3 #@  #T  x  
isalpha.3v T  #h  y  	isascii.3 #h  #|  z  
isascii.3v |  #  {  isatty.3  #  #  |  	iscntrl.3 #  #  }  
iscntrl.3v   #  ~  	isdigit.3 #  #    
isdigit.3v   $     	isgraph.3 $   $    
isgraph.3v   $(    isinf.3m  $(  $<    	islower.3 $<  $P  ./share/man/man3/intro.3m                                                                              755       0      12           65  4424741105  10241                                                                                                                                                                                                                                                                                                                                                                      .so man3/Intro.3m
.\" @(#)intro.3m 1.4 89/03/27 SMI;
 q  intro.3v  "  "  r  
ipalloc.3r   #  s  irint.3m r   #  t  	isalnum.3 #  #,  v  
isalnum.3v   #@  w  	isalpha.3  ,  #T  x  
isalpha.3v @  #h  y  	isascii.3  T  #|  z  
isascii.3v h  #  {  isatty.3 v |  #  |  	iscntrl.3 #  #  }  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v    $(    isinf.3m v   $<    	islower.3 $(  $P    
islower.3v <  $d  ./share/man/man3/intro.3r                                                                              755       0      12           65  4424741106  10247                                                                                                                                                                                                                                                                                                                                                                      .so man3/Intro.3r
.\" @(#)intro.3r 1.6 89/03/27 SMI;
 r  
ipalloc.3r   #  s  irint.3m r   #  t  	isalnum.3    #,  v  
isalnum.3v   #@  w  	isalpha.3    #T  x  
isalpha.3v ,  #h  y  	isascii.3  @  #|  z  
isascii.3v T  #  {  isatty.3 v h  #  |  	iscntrl.3  |  #  }  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v    $<    	islower.3    $P    
islower.3v (  $d    isnan.3m v <  $x  ./share/man/man3/intro.3v                                                                              755       0      12           65  4424741106  10253                                                                                                                                                                                                                                                                                                                                                                      .so man3/Intro.3v
.\" @(#)intro.3v 1.6 89/03/27 SMI;
 s  irint.3m r   #  t  	isalnum.3    #,  v  
isalnum.3v   #@  w  	isalpha.3    #T  x  
isalpha.3v   #h  y  	isascii.3  ,  #|  z  
isascii.3v @  #  {  isatty.3 v T  #  |  	iscntrl.3  h  #  }  
iscntrl.3v |  #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3     $P    
islower.3v   $d    isnan.3m v (  $x    isnormal.3m   $  ./share/man/man3/ipalloc.3r                                                                            755       0      12         4357  4424741222  10606                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ipalloc.3r 1.10 89/03/27 SMI; from UCB 4.2
.TH IPALLOC 3R "2 February 1988"
.SH NAME
ipalloc - determine or temporarily allocate IP address
.SH PROTOCOL
.B /usr/include/rpcsvc/ipalloc.x
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ipalloc" "" "\fLipalloc\fP \(em IP address mapper"
.IX "ipalloc" "" "\fLipalloc\fP \(em determine or temporarily allocate IP address"
.IX "IP address mapping"
.IX "IP address allocation"
.LP
.B ipalloc(\|)
is the protocol for allocating the
.SM IP
address that a system should use.
.SH PROGRAMMING
.LP
.B #include <rpcsvc/ipalloc.h>
.LP
The following
.SM RPC
calls are available in version 2 of this protocol:
.TP
.SB NULLPROC
This is a standard null entry, used to ping a service to measure overhead or
to discover servers.
.TP
.SB IP_ALLOC
Returns an
.SM IP
address corresponding to a given Ethernet address, if
possible. This
.SM RPC
must be called using
.SM DES
authentication, from a client
authorized to allocate
.SM IP
addresses.
A cache of allocated addresses is maintained.
.IP
The first action taken on receipt of this
.SM RPC
is to verify that no existing
mapping between the 
.I etheraddr 
and the 
.I netnum 
exists in the
.SM YP
database.
If one is found, then that is returned.  Otherwise, an internal
cache is checked, and
if an entry is found there for the given 
.I etheraddr 
on the right network, that
entry is used.  If no address was found either in the YP database or
in the cache, a new one may be allocated and returned, and the
.I ip_success
status is returned.
.IP
If an unusable entry was found in the cache, this
.SM RPC
returns
.B ip_failure
status.
.TP
.B IP_TONAME
Used to determine whether a given
.SM IP
address is known to the
.SM YP
service, since
.SM YP
allows a delay between the posting of 
an address and its availability in some locations on the network.
.TP
.B IP_FREE
This
.SM RPC
is used to delete 
.I ipaddr
entries from the cache when they are no longer needed
there. It requires the same protections as the
.SB IP_ALLOC
.SM RPC\s0.
.\"The following
.\".SM XDR
.\"routines are available in
.\".BR librpcsvc :
.\".nf
.\".ft B
.\"xdr_ip_status
.\"xdr_ip_alloc_arg
.\"xdr_ip_alloc_res
.\"xdr_ip_addr_arg
.\"xdr_ip_toname_res
.\".ft R
.\".fi
.SH SEE ALSO
.BR ipallocd (8C),
.BR pnpboot (8C)
  localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m k  *    log1p.3m m k  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 x ./share/man/man3/irint.3m                                                                              755       0      12           64  4424741222  10232                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)irint.3m 1.3 89/03/27 SMI;
  v  
isalnum.3v   #@  w  	isalpha.3    #T  x  
isalpha.3v   #h  y  	isascii.3    #|  z  
isascii.3v   #  {  isatty.3 v ,  #  |  	iscntrl.3  @  #  }  
iscntrl.3v T  #  ~  	isdigit.3  h  #    
isdigit.3v |  $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v    $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $  ./share/man/man3/isalnum.3                                                                             755       0      12           66  4424741222  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isalnum.3 1.5 89/03/27 SMI; 
w  	isalpha.3    #T  x  
isalpha.3v   #h  y  	isascii.3    #|  z  
isascii.3v   #  {  isatty.3 v   #  |  	iscntrl.3  ,  #  }  
iscntrl.3v @  #  ~  	isdigit.3  T  #    
isdigit.3v h  $     	isgraph.3  |  $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $  ./share/man/man3/isalnum.3v                                                                            755       0      12           70  4424741223  10564                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isalnum.3v 1.5 89/03/27 SMI; 
  
isalpha.3v   #h  y  	isascii.3    #|  z  
isascii.3v   #  {  isatty.3 v   #  |  	iscntrl.3    #  }  
iscntrl.3v ,  #  ~  	isdigit.3  @  #    
isdigit.3v T  $     	isgraph.3  h  $    
isgraph.3v |  $(    isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $  ./share/man/man3/isalpha.3                                                                             755       0      12           66  4424741223  10354                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isalpha.3 1.5 89/03/27 SMI; 
y  	isascii.3    #|  z  
isascii.3v   #  {  isatty.3 v   #  |  	iscntrl.3    #  }  
iscntrl.3v   #  ~  	isdigit.3  ,  #    
isdigit.3v @  $     	isgraph.3  T  $    
isgraph.3v h  $(    isinf.3m v |  $<    	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $  ./share/man/man3/isalpha.3v                                                                            755       0      12           70  4424741223  10535                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isalpha.3v 1.5 89/03/27 SMI; 
  
isascii.3v   #  {  isatty.3 v   #  |  	iscntrl.3    #  }  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v ,  $     	isgraph.3  @  $    
isgraph.3v T  $(    isinf.3m v h  $<    	islower.3  |  $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %  ./share/man/man3/isascii.3                                                                             755       0      12           66  4424741223  10357                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isascii.3 1.5 89/03/27 SMI; 
{  isatty.3 v   #  |  	iscntrl.3    #  }  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3  ,  $    
isgraph.3v @  $(    isinf.3m v T  $<    	islower.3  h  $P    
islower.3v |  $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %  ./share/man/man3/isascii.3v                                                                            755       0      12           70  4424741223  10540                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isascii.3v 1.5 89/03/27 SMI; 
  	iscntrl.3    #  }  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v ,  $(    isinf.3m v @  $<    	islower.3  T  $P    
islower.3v h  $d    isnan.3m v |  $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0./share/man/man3/isatty.3                                                                              755       0      12           67  4424741223  10251                                                                                                                                                                                                                                                                                                                                                                      .so man3/ttyname.3
.\" @(#)isatty.3 1.5 89/03/27 SMI; 
}  
iscntrl.3v   #  ~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v ,  $<    	islower.3  @  $P    
islower.3v T  $d    isnan.3m v h  $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D./share/man/man3/iscntrl.3                                                                             755       0      12           66  4424741224  10412                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)iscntrl.3 1.5 89/03/27 SMI; 
~  	isdigit.3    #    
isdigit.3v   $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3  ,  $P    
islower.3v @  $d    isnan.3m v T  $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X./share/man/man3/iscntrl.3v                                                                            755       0      12           70  4424741224  10573                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)iscntrl.3v 1.5 89/03/27 SMI; 
  
isdigit.3v   $     	isgraph.3    $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3    $P    
islower.3v ,  $d    isnan.3m v @  $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l./share/man/man3/isdigit.3                                                                             755       0      12           66  4424741224  10370                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isdigit.3 1.5 89/03/27 SMI; 
  	isgraph.3    $    
isgraph.3v   $(    isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v ,  $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %./share/man/man3/isdigit.3v                                                                            755       0      12           70  4424741224  10551                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isdigit.3v 1.5 89/03/27 SMI; 
  
isgraph.3v   $(    isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %./share/man/man3/isgraph.3                                                                             755       0      12           66  4424741224  10371                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isgraph.3 1.5 89/03/27 SMI; 
  isinf.3m v   $<    	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %  ./share/man/man3/isgraph.3v                                                                            755       0      12           70  4424741225  10553                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isgraph.3v 1.5 89/03/27 SMI; 
  	islower.3    $P    
islower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    ./share/man/man3/isinf.3m                                                                              755       0      12           77  4424741225  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)isinf.3m 1.5 89/03/27 SMI; 
ower.3v   $d    isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3./share/man/man3/islower.3                                                                             755       0      12           66  4424741225  10421                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)islower.3 1.5 89/03/27 SMI; 
  isnan.3m v   $x    isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48../share/man/man3/islower.3v                                                                            755       0      12           70  4424741225  10602                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)islower.3v 1.5 89/03/27 SMI; 
  isnormal.3m   $    	isprint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r ../share/man/man3/isnan.3m                                                                              755       0      12           77  4424741225  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)isnan.3m 1.4 89/03/27 SMI; 
rint.3 m   $    
isprint.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3./share/man/man3/isnormal.3m                                                                           755       0      12          101  4424741226  10745                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)isnormal.3m 1.3 89/03/27 SMI;
nt.3v    $    	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decr./share/man/man3/isprint.3                                                                             755       0      12           66  4424741226  10426                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isprint.3 1.5 89/03/27 SMI; 
  	ispunct.3     $    
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@  ./share/man/man3/isprint.3v                                                                            755       0      12           70  4424741226  10607                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isprint.3v 1.5 89/03/27 SMI; 
  
ispunct.3v    $    
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3./share/man/man3/ispunct.3                                                                             755       0      12           66  4424741226  10423                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)ispunct.3 1.5 89/03/27 SMI; 
  
issecure.3    $    	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_sets./share/man/man3/ispunct.3v                                                                            755       0      12           70  4424741226  10604                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)ispunct.3v 1.5 89/03/27 SMI; 
  	isspace.3     %    
isspace.3v    %    issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	./share/man/man3/issecure.3                                                                            755       0      12          643  4424741227  10602                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)issecure.3 1.8 89/03/27 SMI;
.TH ISSECURE 3 "6 October 1987"
.SH NAME
issecure \- indicates whether system is running secure
.SH SYNOPSIS
.B int issecure(\|)
.SH DESCRIPTION
.IX "issecure function" "" "\fLissecure()\fP function"
.LP
This function tells whether the system has been configured
to run in secure mode.
It returns 0 if the system is not running secure,
and non-zero if the system is running secure.
key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    ./share/man/man3/isspace.3                                                                             755       0      12           66  4424741227  10366                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isspace.3 1.5 89/03/27 SMI; 
  issubnormal.3m   %0    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    ./share/man/man3/isspace.3v                                                                            755       0      12           70  4424741227  10547                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isspace.3v 1.5 89/03/27 SMI; 
    	isupper.3    %D    
isupper.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    ./share/man/man3/issubnormal.3m                                                                        755       0      12          104  4424741227  11463                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)issubnormal.3m 1.3 89/03/27 SMI;
per.3v   %X    
isxdigit.3   %l    isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &  ./share/man/man3/isupper.3                                                                             755       0      12           66  4424741227  10426                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isupper.3 1.5 89/03/27 SMI; 
  
isxdigit.3 .  %l    isxdigit.3v   %    	iszero.3m it  %    itom.3x   %    j0.3m    %    j1.3m    %    jn.3m    %    	jrand48.3 .3  %    key.3r n  &     
key_gendes.3n  .  &    $ key_decryptsession.3n   &@   $ key_encryptsession.3n   &\     key_setsecret.3n  &\  &p    	keypad.3v 3n  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k 3r   &    
kvm_getcmd.3k &  &  ./share/man/man3/isupper.3v                                                                            755       0      12           70  4424741230  10601                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isupper.3v 1.5 89/03/27 SMI; 
  isxdigit.3v   %    	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3    %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v &\  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &./share/man/man3/isxdigit.3                                                                            755       0      12           67  4424741230  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)isxdigit.3 1.5 89/03/27 SMI; 
  	iszero.3m v   %    itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   './share/man/man3/isxdigit.3v                                                                           755       0      12           71  4424741230  10737                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)isxdigit.3v 1.5 89/03/27 SMI; 
 itom.3x   %    j0.3m om  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k ./share/man/man3/iszero.3m                                                                             755       0      12           77  4424741230  10423                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)iszero.3m 1.3 89/03/27 SMI;
m  %    j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k./share/man/man3/itom.3x                                                                               755       0      12           61  4424741230  10064                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)itom.3x 1.4 89/03/27 SMI;
 j1.3m .3  %    jn.3m .3  %    	jrand48.3 .3  %    key.3r .  &     
key_gendes.3n &   &    $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v   &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k  '$  '8    kvm_open./share/man/man3/j0.3m                                                                                 755       0      12           63  4424741230   7414                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)j0.3m 1.3 89/03/27 SMI;
jn.3m .3  %    	jrand48.3 %  %    key.3r 3  &     
key_gendes.3n   &    $ key_decryptsession.3n y_  &@   $ key_encryptsession.3n y_  &\     key_setsecret.3n     &p    	keypad.3v &p  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k    &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k    '8    kvm_open.3k   'L    kvm_./share/man/man3/j1.3m                                                                                 755       0      12           64  4424741231   7417                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)j1.3m 1.7 89/03/27 SMI; 
jrand48.3 %  %    key.3r   &     
key_gendes.3n   &    $ key_decryptsession.3n y_  &@   $ key_encryptsession.3n y_  &\     key_setsecret.3n     &p    	keypad.3v &p  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k    &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k    '8    kvm_open.3k   'L    kvm_read.3k   'd    ./share/man/man3/jn.3m                                                                                 755       0      12           64  4424741231   7514                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)jn.3m 1.7 89/03/27 SMI; 
  key.3r   &     
key_gendes.3n   &    $ key_decryptsession.3n y_  &@   $ key_encryptsession.3n y_  &\     key_setsecret.3n     &p    	keypad.3v &p  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k    &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k    '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k   '|./share/man/man3/jrand48.3                                                                             755       0      12           70  4424741231  10177                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)jrand48.3 1.5 89/03/27 SMI; 
key_gendes.3n   &    $ key_decryptsession.3n y_  &@   $ key_encryptsession.3n y_  &\     key_setsecret.3n     &p    	keypad.3v &p  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k    &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k    '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k   '|    kvm_write.3k./share/man/man3/key.3r                                                                                755       0      12           67  4424741231   7705                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)key.3r 1.3 89/03/27 SMI;
 $ key_decryptsession.3n    &@   $ key_encryptsession.3n    &\     key_setsecret.3n    &p    	keypad.3v    &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k  '$  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k d  '|    kvm_write.3k  '|  '    l64a.3 k./share/man/man3/key_gendes.3n                                                                         755       0      12           70  4424741232  11221                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)key_gendes.3n 1.4 89/03/27 SMI;
on.3n y_  &@   $ key_encryptsession.3n y_  &\     key_setsecret.3n     &p    	keypad.3v &p  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k    &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k    '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k   '|    kvm_write.3k    '    l64a.3 |  '    label.3x./share/man/man3/key_decryptsession.3n                                                                 755       0      12          100  4424741231  13043                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)key_decryptsession.3n 1.4 89/03/27 SMI;
on.3n   &\     key_setsecret.3n  &\  &p    	keypad.3v 3n  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k 3r   &    
kvm_getcmd.3k   &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k 3k   '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k    '|    kvm_write.3k k   '    l64a.3 t  '    label.3x 64a  '    	lcong48.3 3x./share/man/man3/key_encryptsession.3n                                                                 755       0      12          100  4424741232  13056                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)key_encryptsession.3n 1.4 89/03/27 SMI;
 n.3  &p    	keypad.3v ts  &    killchar.3v   &    klm_prot.3r   &    kvm_close.3k lm_  &    
kvm_getcmd.3k os  &    kvm_getproc.3k c  &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k ext  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k _  '|    kvm_write.3k etp  '    l64a.3   '    label.3x    '    	lcong48.3    '    ldaclose.3x   '    ./share/man/man3/key_setsecret.3n                                                                      755       0      12           73  4424741232  11760                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)key_setsecret.3n 1.4 89/03/27 SMI;
    killchar.3v   &    klm_prot.3r   &    kvm_close.3k lm_  &    
kvm_getcmd.3k os  &    kvm_getproc.3k c  &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k ext  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k _  '|    kvm_write.3k etp  '    l64a.3   '    label.3x    '    	lcong48.3    '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x ./share/man/man3/keypad.3v                                                                             755       0      12           67  4424741232  10377                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)keypad.3v 1.4 89/03/27 SMI;
  klm_prot.3r   &    kvm_close.3k rot  &    
kvm_getcmd.3k 3k  &    kvm_getproc.3k 3  &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k roc  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k d  '|    kvm_write.3k oc.  '    l64a.3 _  '    label.3x    '    	lcong48.3 be  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x h  (     ldfcn.3   (    
./share/man/man3/killchar.3v                                                                           755       0      12           71  4424741232  10706                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)killchar.3v 1.4 89/03/27 SMI;
 kvm_close.3k  &  &    
kvm_getcmd.3k &  &    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k  '$  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k d  '|    kvm_write.3k  '|  '    l64a.3 k  '    label.3x 3 _  '    	lcong48.3    '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x    (     ldfcn.3   (    
ldclose.3x    ((    ./share/man/man3/klm_prot.3r                                                                           755       0      12         1114  4424741233  11000                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)klm_prot.3r 1.6 89/03/27 SMI;
.TH KLM_PROT 3R "6 October 1987"
.SH NAME
klm_prot \- protocol between kernel and local lock manager
.SH PROTOCOL
.B /usr/include/rpcsvc/klm_prot.x
.IX "kernel and local lock manager protocol"
.SH DESCRIPTION
The protocol is used for communication between kernel and local lock manager.
.SH PROGRAMMING
.B #include <rpcsvc/klm_prot.h>
.SS XDR Routines
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_klm_testargs
.B	xdr_klm_testrply
.B	xdr_klm_lockargs
.B	xdr_klm_unlockargs
.B	xdr_klm_stat
.fi
.SH SEE ALSO
.BR lockd (8C)
ldlitem.3x d  (    
ldlread.3x m  (    
ldlseek.3x i  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok.3x    )    lfind.3   )    	./share/man/man3/kvm_close.3k                                                                          755       0      12           74  4424741233  11070                                                                                                                                                                                                                                                                                                                                                                      .so man3/kvm_open.3k
.\" @(#)kvm_close.3k 1.3 89/03/27 SMI;
    kvm_getproc.3k   &    kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k  '$  '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k d  '|    kvm_write.3k  '|  '    l64a.3 k  '    label.3x 3 k  '    	lcong48.3  k  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x    (     ldfcn.3   (    
ldclose.3x    ((    ldexp.3m x    (<    ldfhread.3x   (T    ./share/man/man3/kvm_getcmd.3k                                                                         755       0      12           75  4424741233  11227                                                                                                                                                                                                                                                                                                                                                                      .so man3/kvm_getu.3k
.\" @(#)kvm_getcmd.3k 1.3 89/03/27 SMI;
   kvm_getu.3k   '    kvm_nextproc.3k   '$    kvm_nlist.3k 3k   '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k    '|    kvm_write.3k k d  '    l64a.3 t  '    label.3x 64a  '    	lcong48.3 3x  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x d  (     ldfcn.3   (    
ldclose.3x c  ((    ldexp.3m se.  (<    ldfhread.3x   (T    ldgetname.3x 3x   (h    
./share/man/man3/kvm_getproc.3k                                                                        755       0      12          102  4424741233  11436                                                                                                                                                                                                                                                                                                                                                                      .so man3/kvm_nextproc.3k
.\" @(#)kvm_getproc.3k 1.3 89/03/27 SMI;
m_nextproc.3k   '$    kvm_nlist.3k 3k   '8    kvm_open.3k   'L    kvm_read.3k   'd    kvm_setproc.3k    '|    kvm_write.3k k    '    l64a.3 t  '    label.3x 64a  '    	lcong48.3 3x  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x d  (     ldfcn.3   (    
ldclose.3x c  ((    ldexp.3m se.  (<    ldfhread.3x   (T    ldgetname.3x 3x   (h    
ldlinit.3x x  (|    
ldli./share/man/man3/kvm_getu.3k                                                                           755       0      12         5412  4424741233  10770                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kvm_getu.3k 1.10 89/03/27 SMI;
.TH KVM_GETU 3K "6 October 1987"
.SH NAME
kvm_getu, kvm_getcmd \- get the u-area or invocation arguments for a process
.SH SYNOPSIS
.nf
.ft B
#include <kvm.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
.LP
.ft B
struct user *kvm_getu(kd, proc)
kvm_t *kd;
struct proc *proc;
.LP
.ft B
int kvm_getcmd(kd, proc, u, arg, env)
kvm_t *kd;
struct proc *proc;
struct user *u;
char ***arg;
char ***env;
.ft R
.fi
.SH DESCRIPTION
.IX "kvm_getu function" "" "\fLkvm_getu()\fP function"
.IX "kvm_getcmd function" "" "\fLkvm_getcmd()\fP function"
.LP
.B kvm_getu(\|)
reads the u-area of the process specified by
.I proc
to an area of static storage associated with
.I kd
and returns a pointer to it.
Subsequent calls to
.B kvm_getu(\|)
will overwrite the static u-area.
.LP
.I kd
is a pointer to a kernel identifier returned by
.BR kvm_open (3K).
.I proc
is a pointer to a copy (in the current process' address space) of a
.I proc
structure (obtained, for instance, by a prior
.BR kvm_nextproc (3K)
call).
.LP
.B kvm_getcmd(\|)
constructs a list of string pointers that represent the command
arguments and environment that were used to initiate the process specified by
.IR proc .
.LP
.I kd
is a pointer to a kernel identifier returned by
.BR kvm_open (3K).
.I u
is a pointer to a copy (in the current process' address space) of a
.I user
structure (obtained, for instance, by a prior
.B kvm_getu(\|)
call).
If
.I arg
is not
.SM NULL\s0,
then the command line arguments are formed into a
.SM NULL\s0-terminated
array of string pointers.  The address of the first
such pointer is returned in
.IR arg .
If
.I env
is not
.SM NULL\s0,
then the environment is formed into a
.SM NULL\s0-terminated
array of string pointers.  The address of the first
of these is returned in
.IR env .
.LP
The pointers returned in
.I arg
and
.I env
refer to data allocated by
.BR malloc (3)
and should be freed (by a call to
.B free
(see
.BR malloc (3))
when no longer needed.
Both the string pointers and the strings themselves are deallocated
when freed.
.LP
Since the environment and command line arguments may have been modified
by the user process,
there is no guarantee that it will be possible to reconstruct
the original command at all.  Thus,
.B kvm_getcmd(\|)
will make the best attempt possible, returning \-1
if the user process data is unrecognizable.
.SH RETURN VALUE
.LP
.B kvm_getu(\|)
returns a
.SM NULL
pointer if an error occurred.
.LP
.B kvm_getcmd(\|)
returns a value of 0 on successful completion.  Otherwise \-1 is returned.
.SH "SEE ALSO"
.BR execve (2),
.BR kvm_nextproc (3K),
.BR kvm_open (3K),
.BR kvm_read (3K),
.BR malloc (3)
.SH NOTES
.LP
If
.B kvm_getcmd(\|)
returns \-1, the caller still has the option of using the command line
fragment that is stored in the u-area.

   mon_enumerate.3l  0L  0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l    0  
  	monitor.3 .3  0  
  monstartup.3  .3  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1./share/man/man3/kvm_nextproc.3k                                                                       755       0      12         4515  4424741234  11672                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kvm_nextproc.3k 1.8 89/03/27 SMI;
.TH KVM_NEXTPROC 3K "6 October 1987"
.SH NAME
kvm_getproc, kvm_nextproc, kvm_setproc \- read system process structures
.SH SYNOPSIS
.nf
.ft B
#include <kvm.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/proc.h>
.LP
.ft B
struct proc *kvm_getproc(kd, pid)
kvm_t *kd;
int pid;
.LP
.ft B
struct proc *kvm_nextproc(kd)
kvm_t *kd;
.LP
.ft B
int kvm_setproc(kd)
kvm_t *kd;
.ft R
.fi
.SH DESCRIPTION
.IX "kvm_getproc function" "" "\fLkvm_getproc()\fP function"
.IX "kvm_nextproc function" "" "\fLkvm_nextproc()\fP function"
.IX "kvm_setproc function" "" "\fLkvm_setproc()\fP function"
.LP
.B kvm_nextproc(\|)
may be used to sequentially read all of the system process structures
from the kernel identified by
.I kd
(see
.BR kvm_open (3K)).
Each call to
.B kvm_nextproc(\|)
returns a pointer to the static memory area that contains a copy of
the next valid process table entry.
There is no guarantee that the data will remain valid
across calls to
.BR kvm_nextproc ,
.BR kvm_setproc ,
or
.BR kvm_getproc .
Therefore, if the process structure must be saved, it should be
copied to non-volatile storage.
.LP
For performance reasons, many implementations will cache a set of
system process structures.
Since the system state is liable to change between calls to
.BR kvm_nextproc ,
and since the cache may contain obsolete information,
there is no guarantee that
.I every
process structure returned refers to
an active process, nor is it certain that
.I all
processes will be reported.
.LP
.B kvm_setproc(\|)
rewinds the process list, enabling
.B kvm_nextproc(\|)
to rescan from the beginning of the system process table.
.B kvm_setproc(\|)
will always flush the process structure cache, allowing an application to
re-scan the process table of a running system.
.LP
.B kvm_getproc(\|)
locates the
.I proc
structure of the process specified by
.I pid
and returns a pointer to it.
.B kvm_getproc(\|)
does not interact with the process table pointer manipulated by
.BR kvm_nextproc ,
however, the restrictions regarding the validity of the data still apply.
.SH RETURN VALUE
.B kvm_getproc(\|)
and
.B kvm_nextproc(\|)
return a
.SM NULL
pointer if an error has occurred.
.LP
.B kvm_setproc(\|)
returns a value of 0 on successful completion.  Otherwise \-1 is returned.
.SH "SEE ALSO"
.BR kvm_getu (3K),
.BR kvm_open (3K),
.BR kvm_read (3K)
LP
.ft B
struct proc *kvm_nextproc(kd)
kvm_t *kd;
.LP
.ft B
int kvm_setproc(kd)
kvm_t *kd;
.ft R
.fi
.SH DESCRIPTION
.IX "kvm_getproc function" "" "\fLkvm_getproc()\fP function"
../share/man/man3/kvm_nlist.3k                                                                          755       0      12         3225  4424741234  11156                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kvm_nlist.3k 1.8 89/03/27 SMI
.TH KVM_NLIST 3K "24 November 1987"
.SH NAME
kvm_nlist \- get entries from kernel symbol table
.SH SYNOPSIS
.nf
.ft B
#include <kvm.h>
#include <nlist.h>
.LP
.ft B
int kvm_nlist(kd, nl)
kvm_t \(**kd;
struct nlist \(**nl;
.ft R
.fi
.IX  "kvm_nlist function"  ""  "\fLnlist\fP \(em get entries from kernel symbol table"
.IX  get "entries from kernel symbol table \(em \fLkvm_nlist\fP"
.IX  "kernel symbol table, get entries from \(em \fLkvm_nlist\fR"
.SH DESCRIPTION
.B kvm_nlist(\|)
examines the symbol table from the kernel image identified by
.I kd
(see
.BR kvm_open (3K))
and selectively extracts a list of values and puts them in the array of
.B nlist(\|)
structures pointed to by
.IR nl .
The name list pointed to by
.B nl(\|)
consists of an array of structures containing names,
types and values.  The
.I n_name
field of each such structure is taken to be a pointer to a
character string representing a symbol name.  The list is terminated
by an entry with a
.SM NULL
pointer (or a pointer to a
.SM NULL
string) in the
.I n_name
field.  For each entry in
.IR nl ,
if the named symbol is present in the kernel symbol table,
its value and type are placed in the
.I n_value
and
.I n_type
fields.
If a symbol cannot be located, the corresponding
.I n_type
field of
.B nl(\|)
is set to zero.
.SH RETURN VALUE
Upon normal completion,
.B kvm_nlist(\|)
returns the number of symbols that were not
located in the symbol table.    If an error occurs,
.B nlist(\|)
returns \-1 and sets all of the
.I n_type
fields in members of the array pointed to by
.B nl(\|)
to zero.
.SH "SEE ALSO"
.BR kvm_open (3K),
.BR kvm_read (3K),
.BR nlist (3),
.BR a.out (5)
wp_newstk.3l    ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,    
lwp_resume.3l    -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l   -    
lwp_status.3l -h  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -  ./share/man/man3/kvm_open.3k                                                                           755       0      12         6401  4424741234  10765                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kvm_open.3k 1.10 89/03/27 SMI;
.TH KVM_OPEN 3K "18 November 1987"
.SH NAME
kvm_open, kvm_close \- specify a kernel to examine
.SH SYNOPSIS
.nf
.ft B
#include <kvm.h>
#include <fcntl.h>
.LP
.ft B
kvm_t *kvm_open(namelist, corefile, swapfile, flag, errstr)
char *namelist, *corefile, *swapfile;
int flag;
char *errstr;
.LP
.ft B
int kvm_close(kd)
kvm_t *kd;
.ft R
.fi
.SH DESCRIPTION
.IX " function" "" "\fLkvm_open()\fP function"
.IX "kvm_close function" "" "\fLkvm_close()\fP function"
.LP
.B kvm_open(\|)
initializes a set of file descriptors to be used in subsequent
calls to Kernel
.SM VM
routines.  It returns a
pointer to a kernel identifier that must be used as the
.I kd
argument in subsequent Kernel
.SM VM
function calls.
.LP
The
.I namelist
argument specifies an unstripped executable file whose symbol table
will be used to locate various offsets in
.IR corefile .
If
.I namelist
is
.SM NULL\s0,
the symbol table of the currently running kernel
is used to determine offsets in the core image.  In this case,
it is up to the implementation to select an appropriate way to
resolve symbolic references (for instance, using
.B /vmunix
as a default
.I namelist
file).
.LP
.I corefile
specifies a file that contains an image of physical memory,
for instance, a kernel crash dump file (see
.BR savecore (8))
or the special device
.BR /dev/mem .
If
.I corefile
is
.SM NULL\s0,
the currently running kernel is accessed (using
.BR /dev/mem
and
.BR /dev/kmem ).
.LP
.I swapfile
specifies a file that represents the swap device.
If both
.I corefile
and
.I swapfile
are
.SM NULL\s0,
the swap device of the ``currently running kernel''
is accessed.  Otherwise, if
.I swapfile
is
.SM NULL\s0,
.B kvm_open(\|)
may succeed but subsequent
.BR kvm_getu (3K)
function calls may fail if the desired information is swapped out.
.LP
.I flag
is used to specify read or write access for
.I corefile
and may have one of the following values:
.RS
.TP 20
.SB O_RDONLY
open for reading
.TP
.SB O_RDWR
open for reading and writing
.RE
.LP
.I errstr
is used to control error reporting.  If it is a
.SM NULL
pointer, no error messages will be printed.
If it is non-\s-1NULL\s0, it is assumed to be the
address of a string that will be
used to prefix error messages generated by
.BR kvm_open .
Errors are printed to
.BR stderr .
A useful value to supply for
.I errstr
would be
.BR argv [0].
This has the effect of printing the process name in front of any error
messages.
.LP
.B kvm_close(\|)
closes all file descriptors that were associated with
.IR kd .
These files are also closed on
.BR exit (2)
and
.BR execve (2).
.B kvm_close(\|)
also resets the
.B proc
pointer associated with
.BR kvm_nextproc (3K)
and flushes any cached kernel data.
.SH RETURN VALUE
Upon successful completion,
.B kvm_open(\|)
returns a
non-\c
.SM NULL
value that is suitable for use with subsequent
Kernel
.SM VM
function calls.  If an error occurs,
no files are opened and 0 is returned.
.LP
Upon successful completion,
.B kvm_close(\|)
closes all file descriptors associated with
.I kd
and returns zero.  Otherwise \-1 is returned.
.SH FILES
.PD 0
.TP 20
.B /vmunix
.TP
.B /dev/kmem
.TP
.B /dev/mem
.TP
.B /dev/drum
.PD
.SH "SEE ALSO"
.BR execve (2),
.BR exit (2),
.BR kvm_getu (3K),
.BR kvm_nextproc (3K),
.BR kvm_nlist (3K),
.BR kvm_read (3K),
.BR savecore (8)
 
mvdelch.3v x  2<  
,  
mvgetch.3v .  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v tr  2x  
/  
mvinsch.3v 3  2  
0  mvprintw.3v   2  
1  
mvscanw.3v w  2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v 3v   2  
4  mvwdelch.3v   2  
5  mvwgetch./share/man/man3/kvm_read.3k                                                                           755       0      12         2271  4424741234  10740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kvm_read.3k 1.7 89/03/27 SMI;
.TH KVM_READ 3K "6 October 1987"
.SH NAME
kvm_read, kvm_write \- copy data to or from a kernel image or running system
.SH SYNOPSIS
.nf
.B #include <kvm.h>
.LP
.ft B
int kvm_read(kd, addr, buf, nbytes)
kvm_t *kd;
unsigned long addr;
char *buf;
unsigned nbytes;
.LP
.ft B
int kvm_write(kd, addr, buf, nbytes)
kvm_t *kd;
unsigned long addr;
char *buf;
unsigned nbytes;
.ft R
.fi
.SH DESCRIPTION
.IX "kvm_read function" "" "\fLkvm_read()\fP function"
.IX "kvm_write function" "" "\fLkvm_write()\fP function"
.B kvm_read(\|)
transfers data from the kernel image specified by
.I kd
(see
.BR kvm_open (3K))
to the address space of the process.
.I nbytes
bytes of data are copied from the kernel virtual address given by
.I addr
to the buffer pointed to by
.IR buf .
.LP
.B kvm_write(\|)
is like
.BR kvm_read ,
except that the direction of data transfer is reversed.
In order to use this function, the
.BR kvm_open (3K)
call that returned
.I kd
must have specified write access.
.SH RETURN VALUE
Upon normal completion, the number of bytes successfully transferred
is returned.  Otherwise \-1 is returned.
.SH "SEE ALSO"
.BR kvm_getu (3K),
.BR kvm_nlist (3K),
.BR kvm_open (3K)
 	lrand48.3 x   +L    	lsearch.3 me  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3./share/man/man3/kvm_setproc.3k                                                                        755       0      12          102  4424741234  11453                                                                                                                                                                                                                                                                                                                                                                      .so man3/kvm_nextproc.3k
.\" @(#)kvm_setproc.3k 1.3 89/03/27 SMI;
 l64a.3 k  '    label.3x 3 k  '    	lcong48.3  t  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x    (     ldfcn.3   (    
ldclose.3x    ((    ldexp.3m x    (<    ldfhread.3x   (T    ldgetname.3x  (T  (h    
ldlinit.3x T  (|    
ldlitem.3x    (    
ldlread.3x x  (    
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x ./share/man/man3/kvm_write.3k                                                                          755       0      12           74  4424741235  11117                                                                                                                                                                                                                                                                                                                                                                      .so man3/kvm_read.3k
.\" @(#)kvm_write.3k 1.3 89/03/27 SMI;
label.3x 64a  '    	lcong48.3 3x  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x d  (     ldfcn.3   (    
ldclose.3x c  ((    ldexp.3m se.  (<    ldfhread.3x   (T    ldgetname.3x 3x   (h    
ldlinit.3x x  (|    
ldlitem.3x .  (    
ldlread.3x .  (    
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x 3x   (    ldnsseek.3x   )    ldohseek.3x   ) ./share/man/man3/l64a.3                                                                                755       0      12           62  4424741235   7500                                                                                                                                                                                                                                                                                                                                                                      .so man3/a64l.3
.\" @(#)l64a.3 1.5 89/03/27 SMI; 
  	lcong48.3 3x  '    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x d  (     ldfcn.3   (    
ldclose.3x c  ((    ldexp.3m se.  (<    ldfhread.3x   (T    ldgetname.3x 3x   (h    
ldlinit.3x x  (|    
ldlitem.3x .  (    
ldlread.3x .  (    
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x 3x   (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x ek  )4  ./share/man/man3/label.3x                                                                              755       0      12           64  4424741235  10203                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)label.3x 1.4 89/03/27 SMI;
    ldaclose.3x   '    ldahread.3x   '    
ldaopen.3x   (     ldfcn.3   (    
ldclose.3x   ((    ldexp.3m  ((  (<    ldfhread.3x   (T    ldgetname.3x    (h    
ldlinit.3x h  (|    
ldlitem.3x |  (    
ldlread.3x   (    
ldlseek.3x   (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x    (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x )   )4    
ldrseek.3x 4  )H./share/man/man3/lcong48.3                                                                             755       0      12           70  4424741235  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)lcong48.3 1.5 89/03/27 SMI; 
  ldahread.3x   '    
ldaopen.3x    (     ldfcn.3   (    
ldclose.3x    ((    ldexp.3m x   (<    ldfhread.3x   (T    ldgetname.3x  (T  (h    
ldlinit.3x   (|    
ldlitem.3x h  (    
ldlread.3x |  (    
ldlseek.3x   (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\./share/man/man3/ldaclose.3x                                                                           755       0      12           72  4424741235  10711                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldclose.3x
.\" @(#)ldaclose.3x 1.3 89/03/27 SMI;
 
ldaopen.3x    (     ldfcn.3   (    
ldclose.3x    ((    ldexp.3m x    (<    ldfhread.3x   (T    ldgetname.3x  (T  (h    
ldlinit.3x T  (|    
ldlitem.3x   (    
ldlread.3x h  (    
ldlseek.3x |  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t./share/man/man3/ldahread.3x                                                                           755       0      12         2006  4424741236  10727                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldahread.3x 1.9 89/03/27 SMI; from SVID
.TH LDAHREAD 3X "19 February 1988"
.SH NAME
ldahread \- read the archive header of a member of a COFF archive file 
.SH SYNOPSIS
.nf
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.ft B
#include <stdio.h>
#include <ar.h>
#include <filehdr.h>
#include <ldfcn.h>
.PP
.B int ldahread (ldptr, arhead)
.B \s-1LDFILE\s+1 \(**ldptr;
.B \s-1ARCHDR\s+1 \(**arhead;
.ft R
.fi
.DT
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
If 
.BI \s-1TYPE\s+1( ldptr )
is the archive file magic number,
.B ldahread
reads the archive header of the
.SM COFF
file currently associated with
.I ldptr
into the area of memory beginning at
.IR arhead .
.PP
.B ldahread
.RB "returns " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldahread
will fail if 
.BI \s-1TYPE\s+1( ldptr )
does not represent an archive file,
or if it cannot read the archive header.
.PP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldopen (3X),
.BR intro (5),
.BR ldfcn (5)
+8    	lrand48.3 x   +L    	lsearch.3 x   +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,./share/man/man3/ldaopen.3x                                                                            755       0      12           70  4424741236  10544                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldopen.3x
.\" @(#)ldaopen.3x 1.3 89/03/27 SMI;
ldclose.3x    ((    ldexp.3m x    (<    ldfhread.3x   (T    ldgetname.3x  (T  (h    
ldlinit.3x T  (|    
ldlitem.3x T  (    
ldlread.3x T  (    
ldlseek.3x   (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x ./share/man/man3/ldfcn.3                                                                               755       0      12        12477  4424741236  10116                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldfcn.3	1.11 89/03/27 SMI; from SVID
.TH LDFCN 3 "19 February 1988"
.SH NAME
ldfcn \- common object file access routines
.SH SYNOPSIS
.nf
.ft B
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.ft R
.fi
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldfcn function" "" "\fLldfcn()\fP function"
.LP
These routines
are for reading
.SM COFF
object files and
archives containing
.SM COFF
object files.
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.
.LP
The interface between the calling program and the object file access
routines is based on
the defined type
.SM
.BR LDFILE ,
defined as
.BR "struct ldfile" ,
declared in the header file
.BR ldfcn.h .
The primary purpose of this structure is to provide uniform access to
both simple object files and to object files that are members of an
archive file.
.LP
The function
.BR ldopen (3X)
allocates and initializes the
.SB LDFILE
structure and returns a pointer 
to the structure
to the calling program.
The fields of the
.SB LDFILE
structure may be accessed individually through
macros defined in
.B ldfcn.h
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 \f2fopen\fP 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.
.LP
The object file access functions themselves may be divided into four
categories:
.RS
.PP
(1)  Functions that open or close an object file
.PP
.RS
.BR ldopen (3X)
and
.BR ldaopen "(see " ldopen (3X))
.RS
open a common object file
.RE
.BR ldclose (3X)
and
.BR ldaclose "[see " ldclose (3X)]
.RS
close a common object file
.RE
.RE
.PP
(2)  Functions that read header or symbol table information
.PP
.RS
.BR ldahread (3X)
.RS
read the archive header of a member of an archive file
.RE
.BR ldfhread (3X)
.RS
read the file header of a common object file
.RE
.BR ldshread (3X)
and
.BR ldnshread "[see " ldshread (3X)]
.RS
read a section header of a common object file
.RE
.BR ldtbread (3X)
.RS
read a symbol table entry of a common object file
.RE
.BR 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
.BR ldohseek (3X)
.RS
seek to the optional file header of a common object file
.RE
.BR ldsseek (3X)
and
.BR ldnsseek "[see " ldsseek (3X)]
.RS
seek to a section of a common object file
.RE
.BR ldrseek (3X)
and
.BR ldnrseek "[see " ldrseek (3X)]
.RS
seek to the relocation information for a section of a common
object file
.RE
.BR ldlseek (3X)
and
.BR ldnlseek "[see " ldlseek (3X)]
.RS
seek to the line number information for a section of a common object file
.RE
.BR ldtbseek (3X)
.RS
seek to the symbol table of a common object file
.RE
.RE
.PP
(4) The unction
.BR ldtbindex (3X),
which returns the 
index of a particular common object 
file symbol table entry.
.RE
.LP
These functions are described in detail on their respective manual pages.
.LP
All the functions except
.BR ldopen (3X),
.BR ldgetname (3X),
.BR ldtbindex (3X)
return either
.BR \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 ,
both constants defined in
.BR ldfcn.h .
.BR ldopen (3X)
and 
.BR ldaopen "[(see " ldopen (3X)]
both return pointers to an
.BR \s-1LDFILE\s+1 " structure."
.LP
Additional access to an object file is provided through a set of macros
defined in
.BR ldfcn.h .
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.
.LP
The following macros are provided:
.PP
.RS
.nf
GETC(ldptr)
FGETC(ldptr)
GETW(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
.br
.ne 5
.PP
The
.SM STROFFSET
macro calculates the address of the string table.
See the manual entries for the corresponding standard input/output library
functions for details on the use of the rest of the macros.
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH "SEE ALSO"
.BR fseek (3S),
.BR ldahread (3X),
.BR ldclose (3X),
.BR ldgetname (3X),
.BR ldfhread (3X),
.BR ldlread (3X),
.BR ldlseek (3X),
.BR ldohseek (3X),
.BR ldopen (3X),
.BR ldrseek (3X),
.BR ldlseek (3X),
.BR ldshread (3X),
.BR ldtbindex (3X),
.BR ldtbread (3X),
.BR ldtbseek (3X),
.BR stdio (3S),
.BR intro (5)
.SH WARNING
.LP
The macro
.SB FSEEK
defined in the header file
.B ldfcn.h
translates into a call to the 
standard input/output function
.BR fseek (3S).
.SB FSEEK
should not be used to seek from the end of an archive file since
the end of an archive file may not be the same as the end of one of
its object file members.
nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v     5  
Q  	noecho.3x     5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48../share/man/man3/ldclose.3x                                                                            755       0      12         3644  4424741236  10621                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldclose.3x 1.10 89/03/27 SMI; from SVID
.TH LDCLOSE 3X "19 February 1988"
.SH NAME
ldclose, ldaclose \- close a COFF file 
.SH SYNOPSIS
.ft B
.nf
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B int ldclose (ldptr)
.B \s-1LDFILE\s+1 \(**ldptr;
.LP
.B int ldaclose (ldptr)
.B \s-1LDFILE\s+1 \(**ldptr;
.fi
.ft R
.DT
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldclose function" "" "\fLldclose()\fP function"
.IX "ldaclose function" "" "\fLldaclose()\fP function"
.LP
.BR ldopen (3X)
and
.B ldclose(\|)
are designed to provide uniform access to both simple
.SM COFF
object files and
.SM COFF
object files that are members of archive files.
Thus an archive
of
.SM COFF
files can be processed as if it were a series of
simple
.SM COFF
files.
.LP
If
.BI \s-1TYPE\s+1( ldptr )
does not represent an archive file,
.B ldclose(\|)
will close the file and free the memory allocated to the
.BR \s-1LDFILE\s+1 " structure"
associated with
.IR ldptr .
If
.BI \s-1TYPE\s+1( ldptr )
is the magic number of an archive file,
and if there are any more files in the archive,
.B ldclose(\|)
will reinitialize
.BI \s-1OFFSET\s+1( ldptr )
to the file address of the next archive member
and return
.BR \s-1FAILURE\s+1 .
The
.SB LDFILE
structure is prepared for a subsequent
.BR ldopen (3X).
In all other cases,
.B ldclose(\|)
returns
.BR \s-1SUCCESS\s+1 .
.LP
.B ldaclose(\|)
closes the file and frees the memory allocated to the
.BR \s-1LDFILE\s+1 " structure"
associated with 
.I ldptr
regardless of the value of 
.BI \s-1TYPE\s+1 (ldptr).
.B ldaclose(\|)
.RB "always returns " \s-1SUCCESS\s+1 .
The function is often used in conjunction with 
.IR ldaopen .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.LP
.IR intro (5)
describes
.IR \s-1INCDIR\s0 " and " \s-1LIBDIR\s0 .
.SH SEE ALSO
.BR fclose (3S),
.BR ldfcn (3),
.BR ldopen (3X),
.BR intro (5)
    
memalign.3   .  
   	memccpy.3 .  .  
  memchr.3  .  .  
  memcmp.3  ../share/man/man3/ldexp.3m                                                                              755       0      12           66  4424741236  10230                                                                                                                                                                                                                                                                                                                                                                      .so man3/frexp.3m
.\" @(#)ldexp.3m 1.3 89/03/27 SMI; 
  ldgetname.3x  (T  (h    
ldlinit.3x   (|    
ldlitem.3x h  (    
ldlread.3x |  (    
ldlseek.3x   (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok../share/man/man3/ldfhread.3x                                                                           755       0      12         2265  4424741237  10744                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldfhread.3x 1.9 89/03/27 SMI; from SVID
.TH LDFHREAD 3X "19 February 1988"
.SH NAME
ldfhread \- read the file header of a COFF file
.SH SYNOPSIS
.ft B
.nf
.ta \w'LDFILE\ \ \ 'u
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B int ldfhread (ldptr, filehead)
.B \s-1LDFILE\s+1 \(**ldptr;
.B \s-1FILHDR\s+1 \(**filehead;
.fi
.DT
.ft R
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldfhread function" "" "\fLldfhread()\fP function"
.LP
.B ldfhread(\|)
reads the file header of the
.SM COFF
file currently associated with
.I ldptr
into the area of memory beginning at
.IR filehead .
.LP
.B ldfhread(\|)
.RB "returns " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldfhread(\|)
will fail if 
it cannot read the file header.
.LP
In most cases the use of
.B ldfhread(\|)
can be avoided by using the macro
.BI \s-1HEADER\s+1\*S( ldptr )
defined in
.B ldfcn.h
(see
.BR ldfcn (3)).
The information in any field,
.IR fieldname ,
of the file header may be accessed using
.BR \s-1HEADER\s+1 ( ldptr ). fieldname\c
\&.
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X)
 lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,    
lwp_resume.3l ,  -    lwp_self.3l   -    
lwp_setpri.3l -  -4    lwp_setstate.3l   -P     ./share/man/man3/ldgetname.3x                                                                          755       0      12         3507  4424741237  11133                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldgetname.3x 1.9 89/03/27 SMI; from SVID
.TH LDGETNAME 3X "19 February 1988"
.SH NAME
ldgetname \- retrieve symbol name for COFF file symbol table entry
.SH SYNOPSIS
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.nf
.ft B
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <syms.h>
.B #include <ldfcn.h>
.PP
.B char \(**ldgetname (ldptr, symbol)
.B \s-1LDFILE\s+1 \(**ldptr;
.B \s-1SYMENT\s+1 \(**symbol;
.ft R
.fi
.DT
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ldgetname function" "" "\fLldgetname()\fP function"
.B ldgetname(\|)
returns a pointer to the name associated with
.BR symbol\^
as a string.
The string is contained in a static buffer local to
.B ldgetname(\|)
that is overwritten by each call to
.BR ldgetname(\|) ,
and therefore must be copied by the caller if the name is to be saved.
.PP
.B ldgetname(\|)
can be used to retrieve names from object files without any backward
compatibility problems.
.B ldgetname(\|)
will return
.SM NULL
(defined in
.BR stdio.h )
for an
object file if the name cannot be retrieved.  This situation can
occur:
.IP \(bu 3
if the ``string table'' cannot be found,
.IP \(bu
if not enough memory can be allocated for the string table,
.IP \(bu
if the string table appears not to be a string table (for example,
if an auxiliary entry is handed to
.B ldgetname(\|)
that looks like a reference to a name in a nonexistent string table), or
.IP \(bu
if the name's offset into the string table is past the end of the
string table.
.PP
Typically,
.B ldgetname(\|)
will be called immediately after a successful call to
.B ldtbread(\|)
to retrieve the name associated with the symbol table entry
filled by
.BR ldtbread(\|) .
.PP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldtbread (3X),
.BR ldtbseek (3X)
_subnormal.3m    .    
memalign.3   .  
   	memccpy.3    .  
  memchr.3     .  
  memcmp.3     .  
  memcpy.3  .  .  
  memory.3  .  /  
  memset.3  ../share/man/man3/ldlinit.3x                                                                            755       0      12           71  4424741237  10563                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldlread.3x
.\" @(#)ldlinit.3x 1.3 89/03/27 SMI;
 
ldlread.3x .  (    
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x 3x   (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x ek  )4    
ldrseek.3x 3  )H    ldshread.3x   )\    
ldsseek.3x d  )t    ldtbindex.3x x    )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v k  )    
leaveok.3x .  )    lfind.3   )    	lgamma.3m in  *     line.3x   *  ./share/man/man3/ldlitem.3x                                                                            755       0      12           71  4424741237  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldlread.3x
.\" @(#)ldlitem.3x 1.3 89/03/27 SMI;
 
ldlseek.3x .  (    ldnlseek.3x   (    ldnrseek.3x   (    ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x k  )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok.3x k  )    lfind.3   )    	lgamma.3m 3   *     line.3x   *    
linemod.3x    *$  ./share/man/man3/ldlread.3x                                                                            755       0      12         5151  4424741237  10577                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldlread.3x 1.9 89/03/27 SMI; from SVID
.TH LDLREAD 3X "19 February 1988"
.SH NAME
ldlread, ldlinit, ldlitem \- manipulate line number entries of a COFF file function
.SH SYNOPSIS
.nf
.ft B
#include <stdio.h>
#include <filehdr.h>
#include <linenum.h>
#include <ldfcn.h>
.PP
.B int ldlread(ldptr, fcnindx, linenum, linent)
.B \s-1LDFILE\s+1 \(**ldptr;
.B long fcnindx;
.B unsigned short linenum;
.B \s-1LINENO\s+1 \(**linent;
.PP
.B int ldlinit(ldptr, fcnindx)
.B \s-1LDFILE\s+1 \(**ldptr;
.B long fcnindx;
.PP
.B int ldlitem(ldptr, linenum, linent)
.B \s-1LDFILE\s+1 \(**ldptr;
.B unsigned short linenum;
.B \s-1LINENO\s+1 \(**linent;
.fi
.ft R
.DT
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldlread function" "" "\fLldlread()\fP function"
.IX " function" "" "\fLldlinit()\fP function"
.IX "ldlitem function" "" "\fLldlitem()\fP function"
.LP
.B ldlread(\|)
searches the line number entries of the
.SM COFF
file currently
associated with 
.IR ldptr .
.B ldlread(\|)
begins its search with the line number entry for the beginning of a function
and confines its search to the line numbers associated with a single function.
The function is identified by
.IR fcnindx ,
the index of its entry in the object file symbol table.
.BR ldlread(\|)
reads the entry with the smallest line number equal to or greater
than
.I linenum
into the memory beginning at
.IR linent .
.PP
.B ldlinit(\|)
and 
.B ldlitem(\|)
together perform exactly the same function as
.BR ldlread(\|) .
After an initial call to
.B ldlread(\|)
or
.BR ldlinit(\|),
.B ldlitem(\|)
may be used to retrieve a series of line number entries associated with a
single function.
.B ldlinit(\|)
simply locates the line number entries for the function identified by
.I fcnindx.
.B ldlitem(\|)
finds and reads the entry with the smallest line number equal to or greater
than
.I linenum
into the memory beginning at
.BR linent(\|) .
.PP
.BR ldlread(\|) ,
.BR ldlinit(\|) ,
and
.B ldlitem(\|)
each return either 
.B \s-1SUCCESS\s+1
or
.BR \s-1FAILURE\s+1 .
.B ldlread(\|)
will fail if there are no line number entries in the object file,
if
.I fcnindx
does not index a function entry in the symbol table, or if
it finds no line number equal to or greater than
.IR linenum .
.L
.B ldlinit(\|)
will fail if there are no line number entries in the object file or if
.I fcnindx
does not index a function entry in the symbol table.
.B ldlitem(\|)
will fail if it finds no line number equal to or greater than
.IR linenum .
.PP
The programs must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldtbindex (3X)
 msg_recv.3l   1p  
"  msg_reply.3l  1p  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3 v  2(  
+  
mvdelch.3v u  2<  
,  
mvgetch.3v m  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v    2  
0  mvprintw.3v   2  
1  
mvscanw../share/man/man3/ldlseek.3x                                                                            755       0      12         2716  4424741240  10611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldlseek.3x 1.9 89/03/27 SMI; from SVID
.TH LDLSEEK 3X "19 February 1988"
.SH NAME
ldlseek, ldnlseek \- seek to line number entries of a section of a COFF file
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.PP
.B int ldlseek (ldptr, sectindx)
.B \s-1LDFILE\s+1 \(**ldptr;
.B unsigned short sectindx;
.PP
.B int ldnlseek (ldptr, sectname)
.B \s-1LDFILE\s+1 \(**ldptr;
.B char \(**sectname;
.fi
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ldlseek function" "" "\fLldlseek()\fP function"
.IX "ldnlseek function" "" "\fLldnlseek()\fP function"
.B ldlseek(\|)
seeks to the line number entries of the section specified by
.I sectindx
of the
.SM COFF
file currently associated with
.IR ldptr .
.PP
.B ldnlseek(\|)
seeks to the line number entries of the section specified by
.IR sectname .
.PP
.B ldlseek(\|)
and
.B ldnlseek(\|)
return
.SM
.B SUCCESS
or
.SM
.BR FAILURE .
.B ldlseek(\|) 
will fail if 
.I sectindx
is greater than the number of sections in the object file;
.B ldnlseek(\|)
will fail if there is no section name corresponding with
.RI \(** sectname .
Either function will fail if the specified section
has no line number entries
or if it cannot seek to the specified line number entries.
.PP
Note that the first section has an index of
.BR one .
.PP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldshread (3X)
-  -     lwp_stkcswset.3l    -    lwp_./share/man/man3/ldnlseek.3x                                                                           755       0      12           72  4424741240  10720                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldlseek.3x
.\" @(#)ldnlseek.3x 1.3 89/03/27 SMI;
 ldnshread.3x  (  (    ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok.3x    )    lfind.3   )    	lgamma.3m 3   *     line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r ./share/man/man3/ldnrseek.3x                                                                           755       0      12           72  4424741240  10726                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldrseek.3x
.\" @(#)ldnrseek.3x 1.3 89/03/27 SMI;
  ldnsseek.3x   )    ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok.3x    )    lfind.3   )    	lgamma.3m 3   *     line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x./share/man/man3/ldnshread.3x                                                                          755       0      12           74  4424741240  11065                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldshread.3x
.\" @(#)ldnshread.3x 1.3 89/03/27 SMI;
  ldohseek.3x   )     	ldopen.3x x   )4    
ldrseek.3x    )H    ldshread.3x   )\    
ldsseek.3x    )t    ldtbindex.3x  )t  )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v    )    
leaveok.3x    )    lfind.3   )    	lgamma.3m 3   *     line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *./share/man/man3/ldnsseek.3x                                                                           755       0      12           72  4424741240  10727                                                                                                                                                                                                                                                                                                                                                                      .so man3/ldsseek.3x
.\" @(#)ldnsseek.3x 1.3 89/03/27 SMI;
 	ldopen.3x ek  )4    
ldrseek.3x 3  )H    ldshread.3x   )\    
ldsseek.3x d  )t    ldtbindex.3x x    )    ldtbread.3x   )    ldtbseek.3x   )    
leaveok.3v k  )    
leaveok.3x .  )    lfind.3   )    	lgamma.3m in  *     line.3x   *    
linemod.3x e  *$    list.3 e  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v .3   *./share/man/man3/ldohseek.3x                                                                           755       0      12         1641  4424741241  10761                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldohseek.3x 1.9 89/03/27 SMI; from SVID
.TH LDOHSEEK 3X "19 February 1988"
.SH NAME
ldohseek \- seek to the optional file header of a COFF file
.SH SYNOPSIS
.ft B
.nf
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B int ldohseek (ldptr)
.B \s-1LDFILE\s+1 \(**ldptr;
.ft R
.fi
.DT
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldohseek function" "" "\fLldohseek()\fP function"
.LP
.B ldohseek(\|)
seeks to the optional file header of the
.SM COFF
file currently associated with
.IR ldptr .
.LP
.B ldohsee(\|)
.RB "returns " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldohseek(\|)
will fail if the object file has no optional header
or if it cannot seek to the optional header.
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldfhread (3X)
wp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_gets./share/man/man3/ldopen.3x                                                                             755       0      12         6251  4424741241  10446                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldopen.3x 1.10 89/03/27 SMI; from SVID
.TH LDOPEN 3X "19 February 1988"
.SH NAME
ldopen, ldaopen \- open a COFF file for reading
.SH SYNOPSIS
.nf
.ft3
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B \s-1LDFILE\s+1 \(**ldopen (filename, ldptr)
.B char \(**filename;
.B \s-1LDFILE\s+1 \(**ldptr;
.LP
.B \s-1LDFILE\s+1 \(**ldaopen (filename, oldptr)
.B char \(**filename;
.B \s-1LDFILE\s+1 \(**oldptr;
.ft1
.fi
.DT
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ldopen function" "" "\fLldopen()\fP function"
.IX "ldaopen function" "" "\fLldaopen()\fP function"
.B ldopen(\|)
and
.BR ldclose (3X)
are designed to provide uniform access to both simple object files and
object files that are members of archive files.  Thus an archive of
.SM COFF
files can be processed as if it were a series of simple
.SM COFF
files.
.LP
If 
.I ldptr
has the value
.BR \s-1NULL\s+1\*S ,
then 
.B ldopen(\|)
will open
.I filename
and allocate and initialize the
.B \s-1LDFILE\s+1
structure, and return a pointer to
the structure to the calling program.
.LP
If
.I ldptr
is valid and if
.BI \s-1TYPE\s+1( ldptr )
is the archive magic number,
.B ldopen(\|)
will reinitialize the
.BR \s-1LDFILE\s+1 " structure"
for the next archive member of
.IR filename .
.LP
.B ldopen(\|)
and
.BR ldclose (3X)
are designed to work in concert.
.I ldclose
will return
.B \s-1FAILURE\s+1
only when
.BI \s-1TYPE\s+1( ldptr )
is the archive magic number and there is another file in the archive
to be processed.
Only then should
.B ldopen(\|)
be called with the current value of
.IR ldptr .
In all other cases,
in particular whenever a new
.I filename
is opened,
.B ldopen(\|)
should be called with a
.SB NULL
.I ldptr
argument.
.LP
The following is a prototype for the use of 
.B ldopen(\|)
and
.BR ldclose (3X) .
.br
.ne 12
.IP
.nf
.ft B
/\(** for each filename to be processed \(**/
.sp .5
ldptr = \s-1NULL\s+1;
do
{
	if ( (ldptr = ldopen(filename, ldptr)) != \s-1NULL\s+1 )
	{
		/\(** check magic number \(**/
		/\(** process the file \(**/
	}
} while (ldclose(ldptr) == \s-1FAILURE\s+1 );
.fi
.ft R
.LP
If the value of
.I oldptr
is not
.BR \s-1NULL\s+1\*S ,
.B ldaopen(\|)
will open
.I filename
anew and allocate and initialize a new
.B \s-1LDFILE\s+1
structure, copying the
.BR \s-1TYPE\s+1 ", " \s-1OFFSET\s+1 ", and " \s-1HEADER\s+1"
fields from
.IR oldptr .
.B ldaopen(\|)
returns a pointer to the new
.BR \s-1LDFILE\s+1 " structure."
This new pointer is independent of the old pointer,
.IR oldptr .
The two pointers may be used concurrently to read separate parts of
the object file.
For example,
one pointer may be used to step sequentially through the relocation information,
while the other is used to read indexed symbol table entries.
.LP
Both
.B ldopen(\|)
and
.B ldaopen(\|)
open
.I filename
for reading.
Both functions return
.SB NULL
if
.I filename
cannot be opened, or if memory for the
.B \s-1LDFILE\s+1
structure cannot be allocated.
A successful open does not insure that the given file is a
.SM COFF
file or an archived object file.
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR fopen (3S),
.BR ldclose (3X),
.BR ldfcn (3)
 
@  
newterm.3v    3  
A  	newwin.3v  r  4   
B  	newwin.3x  3  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O./share/man/man3/ldrseek.3x                                                                            755       0      12         2773  4424741241  10623                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldrseek.3x 1.9 89/03/27 SMI; from SVID
.TH LDRSEEK 3X "19 February 1988"
.SH NAME
ldrseek, ldnrseek \- seek to relocation entries of a section of a COFF file
.SH SYNOPSIS
.nf
.ft B
.ta \w'unsigned\ 'u +\w'short\ \ 'u
#include <stdio.h>
#include <filehdr.h>
#include <ldfcn.h>
.LP
.ft B
int ldrseek (ldptr, sectindx)
\s-1LDFILE\s+1 \(**ldptr;
unsigned short sectindx;
.LP
.ft B
int ldnrseek (ldptr, sectname)
\s-1LDFILE\s+1 \(**ldptr;
char \(**sectname;
.DT
.fi
.ft R
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldrseek function" "" "\fLldrseek()\fP function"
.IX "ldnrseek function" "" "\fLldnrseek()\fP function"
.LP
.B ldrseek(\|)
seeks to the relocation entries of the section specified by
.I sectindx
of the
.SM COFF
file currently associated with
.IR ldptr .
.LP
.B ldnrseek(\|)
seeks to the relocation entries of the section specified by
.IR sectname .
.LP
.B ldrseek(\|)
and
.B ldnrseek(\|)
.RB "return " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldrseek(\|)
will fail if 
.I sectindx
is greater than the number of sections in the object file;
.B ldnrseek(\|)
will fail if there is no section name corresponding with
.IR sectname .
Either function will fail if the specified section has no relocation entries or
if it cannot seek to the specified 
relocation entries.
.LP
Note: the first section has an index of
.BR one .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH "SEE ALSO"
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldshread (3X)
lwp_./share/man/man3/ldshread.3x                                                                           755       0      12         3152  4424741241  10750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldshread.3x 1.9 89/03/27 SMI; from SVID
.TH LDSHREAD 3X "19 February 1988"
.SH NAME
ldshread, ldnshread \- read an indexed\/named section header of a COFF file
.SH SYNOPSIS
.ta \w'unsigned\ 'u +\w'short\ \ 'u
.nf
.ft B
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <scnhdr.h>
.B #include <ldfcn.h>
.LP
.B int ldshread (ldptr, sectindx, secthead)
.B \s-1LDFILE\s+1 \(**ldptr;
.B unsigned short sectindx;
.B \s-1SCNHDR\s+1 \(**secthead;
.LP
.B int ldnshread (ldptr, sectname, secthead)
.B \s-1LDFILE\s+1 \(**ldptr;
.B char \(**sectname;
.B \s-1SCNHDR\s+1 \(**secthead;
.fi
.ft R
.DT
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldshread function" "" "\fLldshread()\fP function"
.IX "ldnshread function" "" "\fLldnshread()\fP function"
.LP
.B ldshread(\|)
reads the section header specified by
.I sectindx
of the
.SM COFF
file currently associated with
.I ldptr
into the area of memory beginning at
.IR secthead .
.LP
.B ldnshread(\|)
reads the section header specified by
.I sectname
into the area of memory beginning at
.IR secthead .
.LP
.B ldshread(\|)
and
.B ldnshread(\|)
return
.BR \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldshread(\|)
will fail if 
.I sectindx
is greater than the number of sections in the object file;
.B ldnshread(\|)
will fail if there is no section name corresponding with
.IR sectname .
Either function will fail if it cannot read the specified section header.
.LP
Note: the first section header has an index of
.IR one .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X)
 memchr.3     .  
  memcmp.3   x  .  
  memcpy.3   m  .  
  memory.3  gn  /  
  memset.3 py.  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3  
  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout./share/man/man3/ldsseek.3x                                                                            755       0      12         2705  4424741241  10617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldsseek.3x 1.9 89/03/27 SMI; from SVID
.TH LDSSEEK 3X "19 February 1988"
.SH NAME
ldsseek, ldnsseek \- seek to an indexed\/named section of a COFF file
.SH SYNOPSIS
.ta \w'unsigned\ 'u +\w'short\ \ 'u
.nf
.ft B
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B int ldsseek (ldptr, sectindx)
.B \s-1LDFILE\s+1 \(**ldptr;
.B unsigned short sectindx;
.LP
.B int ldnsseek (ldptr, sectname)
.B \s-1LDFILE\s+1 \(**ldptr;
.B char \(**sectname;
.DT
.fi
.ft R
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldsseek function" "" "\fLldsseek()\fP function"
.IX "ldnsseek function" "" "\fLldnsseek()\fP function"
.LP
.B ldsseek(\|)
seeks to the section specified by
.I sectindx
of the
.SM COFF
file currently associated with
.IR ldptr .
.LP
.B ldnsseek(\|)
seeks to the section specified by
.IR sectname .
.LP
.B ldsseek(\|)
and
.B ldnsseek(\|)
.RB "return " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldsseek(\|)
will fail if 
.I sectindx
is greater than the number of sections in the object file;
.B ldnsseek(\|)
will fail if there is no section name corresponding with
.IR sectname .
Either function will fail if there is
no section data for the specified section or
if it cannot seek to the specified section.
.LP
Note: the first section has an index of
.IR one .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldshread (3X)
 .D    
matherr.3m    .\    
max_normal.3m .\  .x  ./share/man/man3/ldtbindex.3x                                                                          755       0      12         2631  4424741242  11141                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldtbindex.3x 1.9 89/03/27 SMI; from SVID
.TH LDTBINDEX 3X "19 February 1988"
.SH NAME
ldtbindex \- compute the index of a symbol table entry of a COFF file
.SH SYNOPSIS
.ft B
.nf
.ta \w'LDFILE\ \ \ 'u
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <syms.h>
.B #include <ldfcn.h>
.LP
.B long ldtbindex (ldptr)
.B \s-1LDFILE\s+1 \(**ldptr;
.fi
.DT
.ft R
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldtbindex function" "" "\fLldtbindex()\fP function"
.LP
.B ldtbindex(\|)
returns the
.RB ( long )
index of the symbol table entry
at the current position
of the
.SM COFF
file associated with
.IR ldptr .
.LP
The index returned by
.B ldtbindex(\|)
may be used in subsequent calls to 
.BR ldtbread (3X).
However, since 
.B ldtbindex (\|)
returns the index of the symbol table entry that begins at the current
position of the object file, if
.B ldtbindex(\|)
is called immediately after a particular symbol table entry has been
read, it will return the index of the next entry.
.LP
.B ldtbindex(\|)
will fail if there are no symbols in the object file,
or if the object file is not positioned at the beginning of a symbol
table entry.
.LP
Note that the first symbol in the symbol table has an index of
.IR zero .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldtbread (3X),
.BR ldtbseek (3X)
 malloc_verify.3   .D    
matherr.3m    .\    
max_normal.3m .\  .x     max_subnormal.3m  ./share/man/man3/ldtbread.3x                                                                           755       0      12         2317  4424741242  10746                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldtbread.3x 1.9 89/03/27 SMI; from SVID
.TH LDTBREAD 3X "19 February 1988"
.SH NAME
ldtbread \- read an indexed symbol table entry of a COFF file
.SH SYNOPSIS
.ta \w'\s-1LDFILE\s+1\ \ \ 'u
.nf
.ft B
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <syms.h>
.B #include <ldfcn.h>
.LP
.B int ldtbread (ldptr, symindex, symbol)
.B \s-1LDFILE\s+1 \(**ldptr;
.B long symindex;
.B \s-1SYMENT\s+1 \(**symbol;
.ft R
.fi
.DT
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldtbread function" "" "\fLldtbread()\fP function"
.LP
.B ldtbread(\|)
reads the symbol table entry specified by
.I symindex
of the
.SM COFF
file currently associated with
.I ldptr
into the area of memory beginning at
.BR symbol .
.LP
.B ldtbread(\|)
returns
.BR \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldtbread(\|)
will fail if 
.I symindex
is greater than or equal to the number of symbols in the object file,
or if it cannot read the specified symbol table entry.
.LP
Note: the first symbol in the symbol table has an index of
.IR zero .
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldtbseek (3X),
.BR ldgetname (3X)
_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m     .x     max_subnormal.3m  .x  .    
memalign.3 m  ../share/man/man3/ldtbseek.3x                                                                           755       0      12         1563  4424741242  10764                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldtbseek.3x 1.9 89/03/27 SMI; from SVID
.TH LDTBSEEK 3X "19 February 1988"
.SH NAME
ldtbseek \- seek to the symbol table of a COFF file
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.B #include <filehdr.h>
.B #include <ldfcn.h>
.LP
.B int ldtbseek (ldptr)
.B \s-1LDFILE\s+1 \(**ldptr;
.fi
.SH AVAILABILITY
.LP
Sun386i systems only.
.SH DESCRIPTION
.IX "ldtbseek function" "" "\fLldtbseek()\fP function"
.LP
.B ldtbseek(\|)
seeks to the symbol table of the
.SM COFF
file currently associated with
.IR ldptr .
.LP
.B ldtbseek(\|)
.RB "returns " \s-1SUCCESS\s+1 " or " \s-1FAILURE\s+1 .
.B ldtbseek(\|)
will fail if the symbol table has been stripped from the object file,
or if it cannot seek to the symbol table.
.LP
The program must be loaded with the object file access routine library
.BR libld.a .
.SH SEE ALSO
.BR ldclose (3X),
.BR ldfcn (3),
.BR ldopen (3X),
.BR ldtbread (3X)
   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,    
lwp_resume.3l ,./share/man/man3/leaveok.3v                                                                            755       0      12           70  4424741242  10543                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)leaveok.3v 1.4 89/03/27 SMI;
  lfind.3   )    	lgamma.3m 3   *     line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m k  *    log1p.3m m   *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch../share/man/man3/leaveok.3x                                                                            755       0      12           71  4424741242  10546                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)leaveok.3x 1.5 89/03/27 SMI; 
gamma.3m 3   *     line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m k  *    log1p.3m m k  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 x   +h     lwp_chec./share/man/man3/lfind.3                                                                               755       0      12           65  4424741242  10027                                                                                                                                                                                                                                                                                                                                                                      .so man3/lsearch.3
.\" @(#)lfind.3 1.4 89/03/27 SMI;
 line.3x   *    
linemod.3x    *$    list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m k  *    log1p.3m m k  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 x   +h     lwp_checkstkset.3l   +    
./share/man/man3/lgamma.3m                                                                             755       0      12         2571  4424741243  10413                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lgamma.3m 1.13 89/03/27 SMI; from UCB 4.3
.TH LGAMMA 3M  "22 November 1987"
.SH NAME
lgamma \- log gamma function
.SH SYNOPSIS
.LP
.B #include <math.h>
.LP
.B extern int signgam;
.LP
.nf
.ft B
double lgamma(x)
double x;
.ft R
.fi
.SH DESCRIPTION
.IX  "gamma function"  ""  "\fLgamma\fP \(em log gamma"
.IX  "mathematical functions"  gamma  ""  \fLgamma\fP
.IX  "log gamma function"  ""  "log gamma function \(em \fLgamma\fP"
.LP
.B lgamma(\|)
returns
.nf
.ta \w'Lgamma returns ln\||\(*G(x)| where'u+1n +1.7i
.if t \{\
.BR	ln\||\(*G (x)|
where
.BR 	\(*G (x)\ =\ \(is\d\s8\z0\s10\u\u\s8\(if\s10\d t\u\s8x\-1\s10\d e\u\s8\-t\s10\d dt
for x > 0 and
.BR 	\(*G (x)\ =\ \(*p/(\(*G(1\-x)\|sin(\(*px))
for x < 1.
\}
.if n \
.B lgamma returns ln\||\(*G(x)|.
.ta
.fi
.LP
The external integer
.B signgam
returns the sign of
.BR \(*G (x) .
.SH IDIOSYNCRASIES
.LP
Do
.I not
use the expression
.B signgam\(**exp(lgamma(x))
to compute
.RB ` "g := \(*G(x)" '.
Instead compute 
.B lgamma(\|) 
first:
.RS
.B
lg = lgamma(x); g = signgam\(**exp(lg);
.RE
.LP
only after
.B lgamma(\|)
has returned can
.B signgam
be correct.
Note: \(*G(x) must overflow when
.I x
is large enough, underflow when
.I \-x
is large enough, and generate a division by zero exception
at the singularities
.I x
a nonpositive integer.
In addition,
.B lgamma(\|)
may also set
.B errno
and call
.BR matherr (3M).
.SH SEE ALSO
.BR matherr (3M)
 
memalign.3   .  
   	memccpy.3 .  .  
  memchr.3  .  .  
  memcmp.3  .  .  
  memcpy.3  .  .  
  memory.3  ../share/man/man3/line.3x                                                                               755       0      12           63  4424741243  10051                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)line.3x 1.4 89/03/27 SMI;
  list.3 .  *4    list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m    *    log1p.3m  *  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 +8  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l ./share/man/man3/linemod.3x                                                                            755       0      12           66  4424741243  10554                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)linemod.3x 1.4 89/03/27 SMI;
 list.3l   *D    list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v    *    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxr./share/man/man3/list.3                                                                                755       0      12           61  4424741104   7677                                                                                                                                                                                                                                                                                                                                                                      .so man3/List.3
.\" @(#)list.3 1.4 89/03/27 SMI;
 list.3m   *T    list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v  *  *    lockf.3   *    log.3m k  *    log10.3m m    *    log1p.3m  *  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 +8  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
./share/man/man3/list.3l                                                                               755       0      12           63  4424741105  10056                                                                                                                                                                                                                                                                                                                                                                      .so man3/List.3l
.\" @(#)list.3l 1.5 89/03/27 SMI;
list.3r   *d    list.3v   *x    localtime.3   *    localtime.3v    *    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +./share/man/man3/list.3m                                                                               755       0      12           63  4424741105  10057                                                                                                                                                                                                                                                                                                                                                                      .so man3/List.3m
.\" @(#)list.3m 1.4 89/03/27 SMI;
list.3v   *x    localtime.3   *    localtime.3v    *    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk../share/man/man3/list.3r                                                                               755       0      12           63  4424741106  10065                                                                                                                                                                                                                                                                                                                                                                      .so man3/List.3r
.\" @(#)list.3r 1.5 89/03/27 SMI;
localtime.3   *    localtime.3v    *    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_./share/man/man3/list.3v                                                                               755       0      12           63  4424741107  10072                                                                                                                                                                                                                                                                                                                                                                      .so man3/List.3v
.\" @(#)list.3v 1.5 89/03/27 SMI;
  localtime.3v    *    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_destroy.3l   ,  ./share/man/man3/localtime.3                                                                           755       0      12           70  4424741244  10702                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)localtime.3 1.5 89/03/27 SMI; 
    lockf.3   *    log.3m    *    log10.3m  *  *    log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_destroy.3l   ,     lwp_enumerate.3l./share/man/man3/localtime.3v                                                                          755       0      12           72  4424741244  11072                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)localtime.3v 1.5 89/03/27 SMI; 
 log.3m k  *    log10.3m m    *    log1p.3m  *  *    log2.3m   *    	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 +8  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpse./share/man/man3/lockf.3                                                                               755       0      12         6513  4424741245  10100                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lockf.3 1.14 89/03/27 SMI; created 4/30/86
.TH LOCKF 3 "25 March 1989"
.SH NAME
lockf \- advisory record locking on files
.SH SYNOPSIS
.nf
.ft B
#include <unistd.h>
.LP
.ft B
.DT
#define	\s-1F_ULOCK\s0	0	/* Unlock a previously locked section */
#define	\s-1F_LOCK\s0	1	/* Lock a section for exclusive use */
#define	\s-1F_TLOCK\s0	2	/* Test and lock a section (non-blocking) */
#define	\s-1F_TEST\s0	3	/* Test section for other process' locks */
.LP
.ft B
int lockf(fd, cmd, size)
int fd, cmd;
long size;
.fi
.IX  lockf  ""  \fLlockf\fP
.IX  descriptors  lockf "" \fLlockf\fP
.IX  "lock" "record" "lock" "record \(em \fLlockf\fP"
.SH DESCRIPTION
.B lockf(\|)
may be used to test, apply, or remove an
.I advisory
record lock on the file associated with the open descriptor
.IR fd .
(See
.BR fcntl (2V)
for more information about advisory record locking.)
.LP
A lock is obtained by specifying a
.I cmd
parameter of
.SB F_LOCK
or
.BR \s-1F_TLOCK\s0 .
To unlock
an existing lock, the
.SB F_ULOCK
.I cmd
is used.
.SB F_TEST
is used to detect if a lock by another
process is present on the specified segment.
.LP
.SB F_LOCK
and
.SB F_TLOCK
requests differ only by the action taken
if the lock may not be immediately granted.
.SB F_TLOCK
returns a \-1 by the function and sets
.B errno
to
.SM EACCES
if the section is already locked by another process.
.SB F_LOCK
will cause the process to sleep until the lock may be granted or
a signal is caught.
.LP
.I size
is the number of contiguous bytes to be locked or
unlocked.
The lock starts at the current file offset in the file and extends
forward for a positive
.I size
or backward for a negative
.I size
(preceeding but not including the current offset).  A segment need not
be allocated to the file in order to be locked;  however, a segment may not
extend to a negative offset relative to the beginning of the file.
If
.I size
is zero, the lock will extend from the
current offset through the
.SM EOF\s0.
If such a lock starts at offset 0, then the entire file will be locked
(regardless of future file extensions).
.SH NOTES
The descriptor
.I fd
must have been opened with
.SB O_WRONLY
or
.SB O_RDWR
permission in order to establish locks with this function call.
.LP
All locks associated with a file for a given process are removed
when the file is closed or the process terminates.  Locks are not
inherited by the child process in a
.BR fork (2)
system call.
.SH "RETURN VALUE
Zero is returned on success, \-1 on error,
with an error code stored in
.BR errno .
.SH "ERRORS
.B lockf(\|)
will fail if one or more of the following are
true:
.TP 20
.SM EBADF
.I fd
is not a valid open descriptor.
.TP
.SM EBADF
.I cmd
is
.SB F_LOCK
or
.SB F_TLOCK
and the process does
not have write permission on the file.
.TP
.SM EACCES
.I cmd
is
.SB F_TLOCK
or
.SB F_TEST
and the section is already locked by another process.
.TP
.SM EINTR
.I cmd
is
.SB F_LOCK
and a signal interrupted the process while it was waiting
for the lock to be granted.
.TP
.SM ENOLCK
.I cmd
is
.BR \s-1F_LOCK\s0 ,
.BR \s-1F_TLOCK\s0 ,
or
.SB F_ULOCK
and there are no more file lock entries available.
.SH "SEE ALSO"
.BR fcntl (2V),
.BR flock (2),
.BR fork (2),
.BR lockd (8C)
.SH BUGS
.LP
File locks obtained through the
.B lockf(\|)
mechanism do not interact
in any way with those acquired using
.BR flock (2).
They do, however,
work correctly with the locks claimed by
.BR fcntl (2V).
[  	openlog.3 r.  5  
\  	openpl.3x g.  6   
]  optarg.3 l.3  6  
^  optind.3 g.3  6(  
_  
overlay.3v 3  6<  
`  
overlay.3x .  6T  
a  overwrite.3v x (  6l  
b  over./share/man/man3/log.3m                                                                                755       0      12           62  4424741245   7671                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)log.3m 1.5 89/03/27 SMI; 
  log1p.3m  *  *    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_destroy.3l   ,     lwp_enumerate.3l     ,4    lwp_fpset.3l    ,L    
lwp_geterr.3l   ,d    ./share/man/man3/log10.3m                                                                              755       0      12           64  4424741245  10034                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)log10.3m 1.5 89/03/27 SMI; 
    log2.3m   *    	longjmp.3 *  +    longname.3v   +$    longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_destroy.3l   ,     lwp_enumerate.3l     ,4    lwp_fpset.3l    ,L    
lwp_geterr.3l   ,d    lwp_getstate.3l   ,x./share/man/man3/log1p.3m                                                                              755       0      12           63  4424741245  10133                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)log1p.3m 1.3 89/03/27 SMI;
  	longjmp.3 m   +    longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 +8  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,./share/man/man3/log2.3m                                                                               755       0      12           62  4424741245   7753                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)log2.3m 1.3 89/03/27 SMI;
  longname.3v   +$    longname.3x   +8    	lrand48.3 x   +L    	lsearch.3 x   +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l ./share/man/man3/longjmp.3                                                                             755       0      12           67  4424741246  10407                                                                                                                                                                                                                                                                                                                                                                      .so man3/setjmp.3
.\" @(#)longjmp.3 1.5 89/03/27 SMI; 
  longname.3x   +8    	lrand48.3 +8  +L    	lsearch.3 +L  +h     lwp_checkstkset.3l   +    
lwp_create.3l   +    lwp_ctxinit.3l   +     lwp_ctxremove.3l     +    
lwp_ctxset.3l   +    lwp_datastk.3l   ,     lwp_destroy.3l   ,     lwp_enumerate.3l     ,4    lwp_fpset.3l    ,L    
lwp_geterr.3l   ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_news./share/man/man3/longname.3v                                                                           755       0      12           71  4424741246  10722                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)longname.3v 1.4 89/03/27 SMI;
 	lrand48.3 x   +L    	lsearch.3 +8  +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_./share/man/man3/longname.3x                                                                           755       0      12           72  4424741246  10725                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)longname.3x 1.5 89/03/27 SMI; 
 	lsearch.3 x   +h     lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    ./share/man/man3/lrand48.3                                                                             755       0      12           70  4424741246  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)lrand48.3 1.5 89/03/27 SMI; 
   lwp_checkstkset.3l   +    
lwp_create.3l +  +    lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,  ./share/man/man3/lsearch.3                                                                             755       0      12         6072  4424741246  10424                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lsearch.3 1.10 89/03/27 SMI; from S5
.TH LSEARCH 3 "6 October 1987"
.SH NAME
lsearch, lfind \- linear search and update
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.B #include <search.h>
.fi
.LP
.nf
.B "char\|\(**lsearch ((char\|\(**)key, (char\|\(**)base, nelp, sizeof(\(**key), compar)"
.B unsigned \(**nelp;
.if t .ti +.5i
.B int (\(**compar)( );
.f
.LP
.nf
.B "char\|\(**lfind ((char\|\(**)key, (char\|\(**)base, nelp, sizeof(\(**key), compar)"
.B unsigned \(**nelp;
.B int
.if t .ti +.5i
.B (\(**compar)( );
.fi
.SH DESCRIPTION
.IX "lsearch function" "" "\fLlsearch\fR \(em linear search and update routine"
.IX "linear search and update routine \(em \fLlsearch\fR"
.IX "search functions" "lsearch" "" "\fLlsearch\fR \(em linear search and update"
.IX "lfind function" "" "\fLlfind\fR \(em linear search routine"
.IX "linear search routine \(em \fLlfind\fR"
.LP
.B lsearch(\|)
is a linear search routine generalized from Knuth (6.1) Algorithm S.
It returns a pointer into a table indicating where
a datum may be found.
If the datum does not occur, it is added
at the end of the table.
.B key(\|)
points to the datum to be sought in the table.
.B base
points to the first element in the table.
.B nelp
points to an integer containing the current number of
elements in the table.
The integer is incremented if the datum is added to the table.
.B compar
is the name of the comparison function which the user must supply
.RB ( strcmp ,
for example).
It is called with two arguments that point
to the elements being compared.
The function must return zero if the elements
are equal and non-zero otherwise.
.LP
.B lfind(\|)
is the same as
.B lsearch(\|)
except that if the datum is not found, it is not added
to the table.
Instead, a
.SM NULL
pointer is returned.
.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.
.LP
The comparison function need not compare every byte,
so arbitrary data may be contained in the elements
in addition to the values being compared.
.LP
Although declared as type pointer-to-character,
the value returned should be cast into type pointer-to-element.
.SH EXAMPLE
.LP
This fragment will read in \(<=
.SM TABSIZE\s0
strings of length \(<=
.SM ELSIZE\s0
and store them in a table, eliminating duplicates.
.LP
.RS
.nf
.ft B
#include <stdio.h>
#include <search.h>
#define
\s-1TABSIZE\s0 50
#define
\s-1ELSIZE\s0 120
	char line[\s-1ELSIZE\s+1], tab[\s-1TABSIZE\s+1][\s-1ELSIZE\s+1], \(**lsearch( );
	unsigned nel = 0;
	int strcmp( );
	\&. . .
	while (fgets(line,
	\s-1ELSIZE\s0, stdin) != \s-1NULL\s0 &&
	   nel < \s-1TABSIZE\s0)
		 (void) lsearch(line, (char \(**)tab, &nel, \s-1ELSIZE\s0, strcmp);
	\&. . .
.ft R
.fi
.RE
.SH SEE ALSO
.BR bsearch (3),
.BR hsearch (3),
.BR tsearch (3)
.SH DIAGNOSTICS
If the searched for datum is found, both
.B lsearch(\|)
and
.B lfind(\|)
return a pointer to it.  Otherwise,
.B lfind(\|)
returns
.SM NULL
and
.B lsearch(\|)
returns a pointer to the newly added element.
.SH BUGS
Undefined results can occur if there is not enough room in the table to
add a new item.
rch\fR \(em linear search and update routine"
.IX "linear search and update routine \(em \fLlsearch\fR"
.IX "search functions" "lsearch" "" "\fLlsearch\fR \(em linear search and update"
.IX "lfind function" "" "\fLlfind\fR \(em linear search routine"
.IX "linear search routine \(em \fLlfind\fR"
.LP
.B lsearch(\|)
is a linear search routine generalized from Knuth (6.1) Algorithm S.
It returns a pointer into a table indicating where
a datum may be foun./share/man/man3/lwp_checkstkset.3l                                                                    755       0      12          104  4424741246  12322                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)lwp_checkstkset.3l 1.3 89/03/27 SMI;
  lwp_ctxinit.3l   +     lwp_ctxremove.3l    +    
lwp_ctxset.3l +  +    lwp_datastk.3l   ,     lwp_destroy.3l    ,     lwp_enumerate.3l    ,4    lwp_fpset.3l  ,4  ,L    
lwp_geterr.3l ,L  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l   ,    
lwp_newstk.3l ,  ,    
lwp_perror.3l ,  ,    lwp_resched.3l   ,    
lwp_resume.3l ,  -    lwp_self.3l   -./share/man/man3/lwp_create.3l                                                                         755       0      12        14204  4424741247  11321                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_create.3l 1.29 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_CREATE 3L "6 October 1987"
.SH NAME
lwp_create, lwp_destroy, SAMETHREAD, pod_setexit, pod_getexit, pod_exit \- LWP thread creation and destruction primitives
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
#include <lwp/stackdep.h>
.LP
.ft B
int
lwp_create(tid, func, prio, flags, stack, nargs, arg1, .\|.\|., argn)
thread_t *tid;
void (*func)(\|);
int prio;
int flags;
stkalign_t *stack;
int nargs;
int arg1, .\|.\|.\|, argn;
.LP
.ft B
int
lwp_destroy(tid)
thread_t tid;
.LP
.ft B
void
pod_setexit(status)
int status;
.LP
.ft B
int
pod_getexit(status)
int status;
.LP
.ft B
void
pod_exit(status)
int status
.LP
.ft B
\s-1SAMETHREAD\s0(t1, t2)
.fi
.ft R
.SH DESCRIPTION
.IX "lwp_create function" "" "\fLlwp_create()\fP function"
.IX "lwp_destroy function" "" "\fLlwp_destroy()\fP function"
.IX "SAMETHREAD function" "" "\fLSAMETHREAD()\fP function"
.IX "pod_setexit function" "" "\fLpod_setexit()\fP function"
.IX "pod_getexit function" "" "\fLpod_getexit()\fP function"
.IX "pod_exit function" "" "\fLpod_exit()\fP function"
.LP
.B lwp_create(\|)
creates a lightweight process which starts at address
.I func
and has stack segment
.IR stack .
If
.I stack
is
.SM NULL\s0,
the thread is created in a suspended state (see below)
and no stack or pc is bound to the thread.
.I prio
is the scheduling priority of the thread (higher
priorities are favored by the scheduler).
The identity of the new thread is filled in
the reference parameter
.IR tid .
.I flags
describes some options on the new thread.
.SB LWPSUSPEND
creates the thread in suspended state
(see
.BR lwp_yield (3L)).
.SB LWPNOLASTRITES
will disable the
.SB LASTRITES
agent message when the thread dies.
The default (0) is to create the thread in running state with
.SB LASTRITES
reporting enabled.
.SB LWPSERVER
indicates that a thread is only viable as long
as
non-\s-1LWPSERVER\s0
threads are alive.
The pod will terminate if the only living threads are marked
.SB LWPSERVER
and blocked on a lwp resource (for instance,
waiting for a message to be sent).
.I nargs
is the number (0 or more)
of simple-type (int) arguments supplied to the thread.
.LP
The first time a lwp primitive is used, the lwp library automatically
converts the caller (i.e.,
.BR main )
into a thread with
the highest available scheduling priority (see
.BR pod_setmaxpri (3L)).
The identity of this thread can be retrieved using
.B lwp_self
(see
.BR lwp_status (3L)).
This thread has the normal Sun\s-1OS\s0 stack given to any
.I forked
process.
.sp
Scheduling is, by default, non-preemptive within a priority, and
within a priority, threads enter the run queue on a
.SM FIFO
basis (that is, whenever a thread becomes eligible to run, it goes to
the end of the run queue of its particular priority).
Thus, a thread continues to run until it voluntarily relinquishes control
or an event (including thread creation)
occurs to enable a higher priority thread.
Some primitives may cause the current thread to block, in which
case the unblocked thread with the highest priority runs next.
When several threads are created with the same priority,
they are queued for execution in the order of creation.
This order may not be preserved as threads yield and block within a priority.
If an agent owned by a thread with a higher priority is invoked,
that thread will preempt the currently running one.
.LP
There is no concept of ancestry in threads:
the creator of a thread has no special relation to the thread it created.
When all threads have died, the pod terminates.
.LP
.B lwp_destroy(\|)
is a way to explicitly terminate
a
thread or agent (instead of having an executing thread \*(lqfall though\*(rq,
which also terminates the thread).
.I tid
specifies the id of the thread or agent to be terminated.
If
.I tid
is
.BR \s-1SELF\s0 ,
the invoking thread is destroyed.
Upon termination, the resources (messages, monitor locks, agents)
owned by the thread are released, in some cases
resulting in another thread being notified of the death of its peer
(by having a blocking primitive become unblocked with an error indication).
A thread may terminate itself explicitly, although self-destruction
is automatic when it returns from the procedure specified in
the
.B lwp_create(\|)
primitive.
.LP
.B pod_setexit(\|)
sets the exit status for a
pod.
This value will be returned to the parent
process of the pod
when the pod dies (default is 0).
.BR exit (3)
terminates the current
.IR thread ,
using the argument supplied to
.I exit
to set the current value of the exit status.
.BR on_exit (3)
establishes an action that will be taken when
the entire pod terminates.
.B pod_exit(\|)
is available to terminate the pod immediately
with the final actions established by
.BR on_exit .
If you wish to terminate the pod immediately,
.B pod_exit(\|)
or
.BR exit (2)
should be used.
.B pod_getexit(\|)
returns the current value of the pod's exit status.
.LP
.SB SAMETHREAD
is a convenient predicate used to compare
two threads for equality.
.SH RETURN VALUE
.LP
Upon successful completion,
.BR lwp_create ,
and
.B lwp_destroy(\|)
return 0.  Otherwise, \-1 is returned.
.B pod_getexit(\|)
returns the current exit status of the pod.
.SH ERRORS
.LP
.B lwp_create(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_NOROOM
Unable to allocate memory for thread context.
.TP
.SM LE_INVALIDARG
Too many arguments (> 512).
.TP
.SM LE_ILLPRIO
Illegal priority.
.LP
.B lwp_destroy(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_NONEXIST
Attempt to destroy a thread or agent that does not exist.
.SH SEE ALSO
.BR exit (3),
.BR lwp_yield (3L),
.BR on_exit (3),
.BR pod_setmaxpri (3L)
.SH WARNINGS
.LP
Some special threads may be created silently by the lwp library.
These include an
.I idle
thread that runs when no other
activity is going on, and a
.I reaper
thread that frees
stacks allocated by
.BR lwp_newstk .
.\" no synchronous deallocation because the dying thread has no stack to
.\" work with. Cannot do it in nugget because nugget knows nothing about
.\" stack. This could change when domain stuff is added.
These special threads will show up in status calls.
A pod will terminate if these special threads are the only ones extant.
setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  @   
  ./share/man/man3/lwp_ctxinit.3l                                                                        755       0      12        13661  4424741247  11546                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_ctxinit.3l 1.21 89/03/27 SMI
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_CTXINIT 3L "22 November 1987"
.SH NAME
lwp_ctxinit, lwp_ctxremove, lwp_ctxset, lwp_ctxmemget, lwp_ctxmemset, lwp_fpset, lwp_libcset \- special LWP context operations
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
.LP
.ft B
int
lwp_ctxset(save, restore, ctxsize, optimise)
void (*save)(/* caddr_t ctx, thread_t old, thread_t new */);
void (*restore)(/* caddr_t ctx, thread_t old, thread_t new */);
unsigned int ctxsize;
int optimise;
.LP
.ft B
int
lwp_ctxinit(tid, cookie)
thread_t tid;		/* thread with special contexts */
int cookie;		/* type of context */
.LP
.ft B
int
lwp_ctxremove(tid, cookie)
thread_t tid;
int cookie;
.LP
.ft B
int
lwp_ctxmemget(mem, tid, ctx)
caddr_t mem;
thread_t tid;
int ctx;
.LP
.ft B
int
lwp_ctxmemset(mem, tid, ctx)
caddr_t mem;
thread_t tid;
int ctx;
.LP
.ft B
int
lwp_fpset(tid)
thread_t tid;		/* thread utilizing floating point hardware */
.LP
.ft B
int
lwp_libcset(tid)
thread_t tid;		/* thread utilizing errno */
.ft R
.fi
.SH DESCRIPTION
.IX "lwp_ctxinit function" "" "\fLlwp_ctxinit()\fP function"
.IX "lwp_ctxremove function" "" "\fLlwp_ctxremove()\fP function"
.IX "lwp_ctxset function" "" "\fLlwp_ctxset()\fP function"
.IX "lwp_ctxmemget function" "" "\fLlwp_ctxmemget()\fP function"
.IX "lwp_ctxmemset function" "" "\fLlwp_ctxmemset()\fP function"
.IX "lwp_fpset function" "" "\fLlwp_fpset()\fP function"
.IX "lwp_libcset function" "" "\fLlwp_libcset()\fP function"
.LP
Normally on a context switch, only machine registers are
saved/restored to provide each thread its own virtual machine.
However, there are other hardware and software resources which
can be multiplexed in this way.
For example, floating point registers can be used
by several threads in a pod.
As another example, the global value
.B errno
in the standard C library may be used by all
threads making system calls.
.LP
To accommodate the variety of contexts that a thread
may need without requiring all threads to pay for unneeded switching
overhead,
.B lwp_ctxinit(\|)
is provided.
This primitive allows a client to specify that a given thread
requires certain context to be saved and restored across context switches
(by default just the machine registers are switched).
More than one special context may be given to a thread.
.LP
To use
.BR lwp_ctxinit ,
it is first necessary to define a special context.
.B lwp_ctxset(\|)
specifies save and restore routines, as well
as the size of the context that will be used
to hold the switchable state.  The
.I save
routine will automatically be invoked
when an active thread is blocked and the
.I restore
routine will be invoked when a blocked thread
is restarted.
These routines will be passed a
pointer to a buffer (initialized to all 0's) of size
.I ctxsize
which is allocated by the LWP library and
used to hold the volatile state.
In addition,
the identity of the thread whose special context is being saved
.RI  ( old )
and the identity of the thread being restarted
.RI  ( new )
are passed in to the
.I save
and
.I restore
routines.
.B lwp_ctxset(\|)
returns a cookie used by subsequent
.B lwp_ctxinit(\|)
calls to refer to the kind of context just defined.
If the
.I optimise
flag is
.SM TRUE\s0,
a special context switch action will not be invoked unless
the thread resuming execution differs from the last thread to
use the special context and also uses the special context.
If the
.I optimise
flag is
.SM FALSE\s0,
the
.I save
routine
will always be invoked immediately when the thread using
this context is scheduled out and the
.I restore
routine will
be invoked immediately when a new thread using this context is scheduled in.
Note that an unoptimised special context is protected from threads which
do not use the special context but which do affect the context state.
.B lwp_ctxremove(\|)
can be used to remove a special context installed by
.BR lwp_ctxinit .
.LP
Because context switching is done by the scheduler on behalf of a thread,
it is an error to use an LWP primitive in an action done at context
switch time.
Also, the stack used by the save and restore routines belongs
to the scheduler, so care should be taken not to use lots of stack space.
As a result of these restrictions, only knowledgeable users should
write their own special context switching routines.
.\"The scheduler does it because otherwise no easy way to optimise.
.LP
.B lwp_ctxmemget
and
.B lwp_ctxmemset
are used to retrieve and set (respectively) the memory associated
with a given special context
.RI ( ctx )
and a given thread
.RI ( tid ).
.I mem
is the address of client memory that will hold the context information
being retrieved or set.
Note that the special context
.I save
and
.I restore
routines may be
.SM NULL\s0,
so pure data may be associated with a given
thread using these primitives.
.LP
Several kinds of special contexts are predefined.
To allow a thread to share floating point
hardware with other threads, the
.B lwp_fpset(\|)
primitive is available.
The floating-point hardware bound at compile-time is selected automatically.
To multiplex the global variable
.BR errno ,
.B lwp_libcset(\|)
is used to have
.B errno
become part of the context of thread
.IR tid .
.LP
Special contexts can be used to assist in managing stacks.
See
.BR lwp_newstk (3L)
for details.
.SH RETURN VALUE
.B lwp_ctxset(\|)
returns a cookie to be used by subsequent
.B lwp_ctxinit(\|)
calls, -1 if unable to define the context.
.SH ERRORS
.B lwp_ctxinit(\|)
will fail if one or more of the following are true:
.TP 20
.SM LE_INUSE
This special context already set for this thread.
.LP
.B lwp_ctxremove(\|)
will fail if one or more of the following are true:
.TP 20
.SM LE_NONEXIST
The specified context is not set for this thread.
.LP
.B lwp_ctxset(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_NOROOM
Unable to allocate memory to define special context.
.SH SEE ALSO
.BR lwp_newstk (3L)
.SH BUGS
The floating point contexts should be initialized implicitly for
those threads that use floating point.
lok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r er./share/man/man3/lwp_ctxremove.3l                                                                      755       0      12          161  4424741247  12027                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_ctxremove.3l 1.3 89/03/27 SMI
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.so man3/lwp_ctxinit.3l
l l  ,     lwp_enumerate.3l  ,  ,4    lwp_fpset.3l  ,  ,L    
lwp_geterr.3l     ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l    ,    
lwp_newstk.3l     ,    
lwp_perror.3l  n  ,    lwp_resched.3l .  ,    
lwp_resume.3l  3  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h./share/man/man3/lwp_ctxset.3l                                                                         755       0      12          100  4424741247  11316                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_ctxinit.3l
.\" @(#)lwp_ctxset.3l 1.3 89/03/27 SMI;
  lwp_destroy.3l .  ,     lwp_enumerate.3l l l  ,4    lwp_fpset.3l .3l  ,L    
lwp_geterr.3l 3l  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l n  ,    
lwp_newstk.3l t.  ,    
lwp_perror.3l .3  ,    lwp_resched.3l 3  ,    
lwp_resume.3l d.  -    lwp_self.3l   -    
lwp_setpri.3l lf  -4    lwp_setstate.3l   -P     lwp_setstkcache.3l    -h    lwp_sleep.3l he.  -  ./share/man/man3/lwp_datastk.3l                                                                        755       0      12          157  4424741247  11453                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_datastk.3l 1.3 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.so man3/lwp_newstk.3l
l l l  ,L    
lwp_geterr.3l 3l  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l    ,    
lwp_newstk.3l  n  ,    
lwp_perror.3l t.  ,    lwp_resched.3l 3  ,    
lwp_resume.3l  3  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l    -    
lwp_status.3l e.  -  ./share/man/man3/lwp_destroy.3l                                                                        755       0      12          100  4424741250  11467                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_create.3l
.\" @(#)lwp_destroy.3l 1.3 89/03/27 SMI;
    lwp_fpset.3l  ,  ,L    
lwp_geterr.3l  l  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l    ,    
lwp_newstk.3l     ,    
lwp_perror.3l  n  ,    lwp_resched.3l .  ,    
lwp_resume.3l  3  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l     -     lwp_stkcswset.3l  -  -./share/man/man3/lwp_enumerate.3l                                                                      755       0      12          102  4424741250  11765                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_status.3l
.\" @(#)lwp_enumerate.3l 1.3 89/03/27 SMI;
  
lwp_geterr.3l ,  ,d    lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l    ,    
lwp_newstk.3l     ,    
lwp_perror.3l     ,    lwp_resched.3l n  ,    
lwp_resume.3l  .  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l  P  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -./share/man/man3/lwp_fpset.3l                                                                          755       0      12           77  4424741250  11114                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_ctxinit.3l
.\" @(#)lwp_fpset.3l 1.3 89/03/27 SMI;
  lwp_getstate.3l   ,x    lwp_join.3l   ,    lwp_libcset.3l n  ,    
lwp_newstk.3l t.  ,    
lwp_perror.3l .3  ,    lwp_resched.3l 3  ,    
lwp_resume.3l d.  -    lwp_self.3l   -    
lwp_setpri.3l lf  -4    lwp_setstate.3l   -P     lwp_setstkcache.3l    -h    lwp_sleep.3l he.  -    
lwp_status.3l 3l  -     lwp_stkcswset.3l   P  -    lwp_suspend.3l l  -    lwp_yield.3l nd.  -  ./share/man/man3/lwp_geterr.3l                                                                         755       0      12           77  4424741250  11263                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_perror.3l
.\" @(#)lwp_geterr.3l 1.3 89/03/27 SMI;
  lwp_join.3l   ,    lwp_libcset.3l    ,    
lwp_newstk.3l  n  ,    
lwp_perror.3l t.  ,    lwp_resched.3l 3  ,    
lwp_resume.3l  3  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l    -    
lwp_status.3l e.  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l P  -    lwp_yield.3l l l  -    madd.3x   -    mall./share/man/man3/lwp_getstate.3l                                                                       755       0      12          101  4424741250  11617                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_status.3l
.\" @(#)lwp_getstate.3l 1.3 89/03/27 SMI;
wp_libcset.3l    ,    
lwp_newstk.3l     ,    
lwp_perror.3l  n  ,    lwp_resched.3l .  ,    
lwp_resume.3l  3  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l     -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l P  -    madd.3x   -    malloc.3 add  .     mdiv.3x ./share/man/man3/lwp_join.3l                                                                           755       0      12           74  4424741250  10727                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_join.3l 1.3 89/03/27 SMI;
  
lwp_newstk.3l     ,    
lwp_perror.3l     ,    lwp_resched.3l n  ,    
lwp_resume.3l  .  -    lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l  P  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3  ./share/man/man3/lwp_libcset.3l                                                                        755       0      12          101  4424741251  11425                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_ctxinit.3l
.\" @(#)lwp_libcset.3l 1.3 89/03/27 SMI;
 
lwp_perror.3l ,  ,    lwp_resched.3l   ,    
lwp_resume.3l ,  -    lwp_self.3l   -    
lwp_setpri.3l -  -4    lwp_setstate.3l   -P     lwp_setstkcache.3l   -h    lwp_sleep.3l  -h  -    
lwp_status.3l -  -     lwp_stkcswset.3l    -    lwp_suspend.3l   -    lwp_yield.3l  -  -    madd.3x   -    malloc.3 3x   .     mdiv.3x   .    malloc_debug.3   .0    malloc_verif./share/man/man3/lwp_newstk.3l                                                                         755       0      12        15373  4424741251  11374                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_newstk.3l 1.21 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_NEWSTK 3L "6 October 1987"
.SH NAME
lwp_checkstkset, lwp_stkcswset, CHECK, lwp_setstkcache, lwp_newstk, lwp_datastk, STKTOP \- LWP stack management
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
#include <lwp/check.h>
#include <lwp/lwpmachdep.h>
#include <lwp/stackdep.h>
.ft R
.fi
.LP
.B \s-1CHECK\s0(location, result)
.LP
.nf
.ft B
int
lwp_checkstkset(tid, limit)
thread_t tid;
caddr_t limit;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_stkcswset(tid, limit)
thread_t tid;
caddr_t limit;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_setstkcache(minstksz, numstks)
int minstksz;
int numstks;
.ft R
.fi
.LP
.nf
.B stkalign_t *
.B lwp_newstk(\|)
.fi
.LP
.nf
.ft B
stkalign_t *
lwp_datastk(data, size, addr)
caddr_t data;
int size;
caddr_t *addr;
.ft R
.fi
.LP
.B \s-1STKTOP\s0(s)
.SH DESCRIPTION
.IX "lwp_checkstkset function" "" "\fLlwp_checkstkset()\fP function"
.IX "lwp_stkcswset function" "" "\fLlwp_stkcswset()\fP function"
.IX "lwp_setstkcache function" "" "\fLlwp_setstkcache()\fP function"
.IX "lwp_datastk function" "" "\fLlwp_datastk()\fP function"
.IX "lwp_newstk function" "" "\fLlwp_newstk()\fP function"
.IX "CHECK function" "" "\fLCHECK()\fP function"
.IX "MINSTACKSZ function" "" "\fLMINSTACKSZ()\fP function"
.IX "STKTOP function" "" "\fLSTKTOP()\fP function"
.LP
Stacks are problematical with lightweight processes.
What is desired is that stacks for each thread are red-zone protected
so that one thread's stack does not
unexpectedly grow into the stack of another.
In addition, stacks should be of infinite length, grown as needed.
The process stack is a maximum-sized segment (see
.BR getrlimit (2).)
This stack is redzone protected, and you can even try to extend it beyond
its initial maximum size in some cases.
With SunOS
.RI 4. x ,
it is possible to efficiently allocate large stacks that
have red zone protection, and the
.SM LWP
library provides some support for this.
For those systems that do not have flexible memory management,
the
.SM LWP
library provides assistance in dealing with the problems
of maintaining multiple stacks.
.LP
The stack used by
.I main
is the same stack that
the system allocates for a
.I forked
process.  For allocating other thread stacks,
the client is free to use any statically or dynamically
allocated memory (using memory from
.IR main 's
stack is subject to the stack resource limit for any
.I forked
process).
In addition, the
.SB LASTRITES
agent message is available to free allocated resources
when a thread dies.
Any stack should be at least
.SB MINSTACKSZ
.IR stkalign_t 's
large because
the
.SM LWP
library will use the client stack to execute primitives.
For very fast dynamically allocated stacks,
a stack cacheing mechanism is available.
.B lwp_setstkcache(\|)
allocates a cache of stacks.
Each time the cache is empty, it is filled with
.I numstks
new stacks, each containing at least
.I minstksz
bytes.
.I minstksz
will automatically be augmented to take into account
the stack needs of the
.SM LWP
library.
.B lwp_newstk(\|)
returns a cached stack that is suitable for use in an
.B lwp_create(\|)
call.
.B lwp_setstkcache(\|)
must be called (once) prior to any use of
.BR lwp_newstk .
If running under SunOS
.RI 4. x ,
the stacks allocated by
.B lwp_newstk(\|)
will be red-zone protected
(an attempt to reference below the stack bottom will result in a
.SB SIGSEGV
event).
.LP
Threads created with stacks from
.B lwp_newstk(\|)
should not use the
.SB NOLASTRITES
flag.
If they do, cached stacks will not be returned to the cache
when a thread dies.
.LP
.B lwp_datastk(\|)
also returns a red-zone protected stack like
.B lwp_newstk(\|)
does.
It copies any amount of data (subject to the size limitations
imposed by
.BR lwp_setstkcache )
onto the stack \fIabove\fP the stack top that it returns.
.I data
points to information of
.I size
bytes to be copied.
The exact location where the data is stored is returned
in the reference parameter
.I addr.
Because
.B lwp_create(\|)
only passes simple types to the newly-created thread,
.B lwp_datastk(\|)
is useful to pass a more complex argument:
Call
.B lwp_datastk(\|)
to get an initialized stack, and pass the address of the
data structure
.RI ( addr )
as an argument to the new thread.
.LP
A
.I reaper
thread running at the maximum pod priority is
created by
.BR lwp_setstkcache .
It's action may be delayed by other threads running at that priority,
so it is suggested that the maximum pod priority not be used for
client-created threads when
.B lwp_newstk(\|)
is being used.
Altering the maximum pod priority with
.B pod_setmaxpri(\|)
will have the side effect of increasing the reaper thread priority as well.
.LP
The stack address passed to
.B lwp_create(\|)
represents the
top of the stack: the
.SM LWP
library will not use any addresses at or above it.
Thus, it is safe to store information above the stack top if there
is room there.
.LP
For stacks that are not protected with hardware redzones, some protection
is still possible.
For any thread
.I tid
with stack boundary
.I limit
made part of a special context with
.BR lwp_checkstkset ,
the
.SB CHECK
macro may be used.
This macro, if used at the beginning of each procedure (and before
local storage is initialized (it is okay to
.I declare
locals though)), will
check that the stack limit has not been violated.
If it has, the non-local
.I location
will be set to
.I result
and the procedure will return.
.SB CHECK
is not perfect, as it is possible to call a
procedure with many arguments after
.SB CHECK
validates the stack,
only to have these arguments clobber the stack before the
new procedure is entered.
.LP
.B lwp_stkcswset(\|)
checks at context-switch time
the stack belonging to
thread
.I tid
for passing stack boundary
.IR limit .
In addition, a checksum at the bottom of the stack is validated to ensure
that the stack did not temporarily grow beyond its limit.
This is automated and more efficient than using
.BR \s-1CHECK\s0 ,
but by the time a context switch occurs,
it's too late to do much but
.BR abort (3)
if the stack was clobbered.
.LP
To portably use statically allocated stacks, the macros in
.I stackdep.h
should be used.  Declare a stack
.I s
to be an array of
.IR stkalign_t 's,
and pass the stack to
.B lwp_create(\|)
as
.BR \s-1STKTOP\s0 (s).
.SH RETURN VALUES
.LP
.B lwp_newstk and
.B lwp_datastk(\|)
return 0 on failure, else
a valid new stack address.
.LP
.B lwp_setstkcache(\|)
returns the actual
size of the stacks allocated in the cache.
.SH SEE ALSO
.BR getrlimit (2),
.BR abort (3)
.SH BUGS
.LP
C should provide support for heap-allocated stacks at procedure entry time.
The hardware should be segment-based to eliminate the problem altogether.
.SH WARNING
.LP
.B lwp_datastk(\|)
should not be directly used in a
.B lwp_create(\|)
call since C does not guarantee the order in which arguments to a function
are evaluated.
a cache of stacks.
Each time the cache is empty, it is filled with
.I numstks
new stacks, each containing at least
.I minstksz
bytes.
.I minstksz
will automatically be augmented to take into account
the stack needs of the
.SM LWP
library.
.B lwp_newstk(\|)
retu./share/man/man3/lwp_perror.3l                                                                         755       0      12         2341  4424741251  11341                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_perror.3l 1.20 89/03/27 SMI
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_PERROR 3L "22 November 1987"
.SH NAME
lwp_geterr, lwp_perror, lwp_errstr \- LWP error handling
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
#include <lwp/lwperror.h>
.LP
.ft B
lwp_err_t lwp_geterr(\|);
.LP
.ft B
void
lwp_perror(s)
char *s;
.LP
.ft B
char **lwp_errstr(\|);
.ft R
.fi
.SH DESCRIPTION
.IX " function" "" "\fLlwp_geterr()\fP function"
.IX "lwp_perror function" "" "\fLlwp_perror()\fP function"
.IX "lwp_errstr function" "" "\fLlwp_errstr()\fP function"
.LP
When a primitive fails (returns \-1),
.B lwp_geterr(\|)
can be used to obtain the identity of the error
(which is part of the context for each lwp).
.B lwp_perror(\|)
can be used to print an error message
on the standard error file (analogous to
.BR perror (3))
when a lwp primitive returns an error indication.
.B lwp_perror(\|)
uses the same mechanism as
.B lwp_geterr(\|)
to obtain the last error.
.B lwp_errstr
returns a pointer to the (\s-1NULL\s0-terminated) list
of error messages.
.LP
.B lwp_libcset
(see
.BR lwp_ctxinit (3L))
allows
.B errno
from the standard C library reflect a per-thread
value rather than a per-pod value.
.SH SEE ALSO
.BR lwp_ctxinit (3L),
.BR perror (3)
.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1./share/man/man3/lwp_resched.3l                                                                        755       0      12           77  4424741251  11411                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_resched.3l 1.3 89/03/27 SMI;
  lwp_self.3l   -    
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l  P  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m./share/man/man3/lwp_resume.3l                                                                         755       0      12           76  4424741251  11273                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_resume.3l 1.3 89/03/27 SMI;
 
lwp_setpri.3l l   -4    lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l  P  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m  .x  .    
memalign.3 m./share/man/man3/lwp_self.3l                                                                           755       0      12           75  4424741252  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_status.3l
.\" @(#)lwp_self.3l 1.3 89/03/27 SMI;
 lwp_setstate.3l   -P     lwp_setstkcache.3l P  -h    lwp_sleep.3l l P  -    
lwp_status.3l  P  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  ../share/man/man3/lwp_setpri.3l                                                                         755       0      12           76  4424741252  11302                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_setpri.3l 1.3 89/03/27 SMI;
   lwp_setstkcache.3l   -h    lwp_sleep.3l  -h  -    
lwp_status.3l -  -     lwp_stkcswset.3l    -    lwp_suspend.3l   -    lwp_yield.3l  -  -    madd.3x   -    malloc.3 3x   .     mdiv.3x   .    malloc_debug.3   .0    malloc_verify.3   .D    
matherr.3m    .\    
max_normal.3m .\  .x     max_subnormal.3m    .    
memalign.3 x  .  
   	memccpy.3  m  .  
  memchr.3  gn  ../share/man/man3/lwp_setstate.3l                                                                       755       0      12          101  4424741252  11635                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_status.3l
.\" @(#)lwp_setstate.3l 1.3 89/03/27 SMI;
   lwp_sleep.3l l   -    
lwp_status.3l -h  -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m     .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
./share/man/man3/lwp_setstkcache.3l                                                                    755       0      12          104  4424741252  12305                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)lwp_setstkcache.3l 1.3 89/03/27 SMI;
  
lwp_status.3l    -     lwp_stkcswset.3l  -  -    lwp_suspend.3l   -    lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
  memcpy.3 p.3  .  
  ./share/man/man3/lwp_sleep.3l                                                                          755       0      12           75  4424741252  11103                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_sleep.3l 1.3 89/03/27 SMI;
    lwp_stkcswset.3l     -    lwp_suspend.3l l  -    lwp_yield.3l nd.  -    madd.3x   -    malloc.3    .     mdiv.3x   .    malloc_debug.3 v  .0    malloc_verify.3   .D    
matherr.3m v  .\    
max_normal.3m r.  .x     max_subnormal.3m   f  .    
memalign.3 a  .  
   	memccpy.3 ma  .  
  memchr.3 emc  .  
  memcmp.3 emc  .  
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3./share/man/man3/lwp_status.3l                                                                         755       0      12         6246  4424741253  11365                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_status.3l 1.18 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_STATUS 3L "6 October 1987"
.SH NAME
lwp_self, lwp_ping, lwp_enumerate, lwp_getstate, lwp_setregs, lwp_getregs \- LWP status information
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
#include <lwp/lwpmachdep.h>
.LP
.ft B
int
lwp_enumerate(vec, maxsize)
thread_t vec[\|];	/* list of id's to be filled in */
int maxsize;	/* number of elements in vec */
.LP
.ft B
int
lwp_ping(tid)
thread_t tid;
.LP
.ft B
int
lwp_getregs(tid, machstate)
thread_t tid;
machstate_t *machstate;
.LP
.ft B
int
lwp_setregs(tid, machstate)
thread_t tid;
machstate_t *machstate;
.LP
.ft B
int
lwp_getstate(tid, statvec)
thread_t tid;
statvec_t *statvec;
.LP
.ft B
int
lwp_self(tid)
thread_t *tid;
.ft R
.fi
.SH DESCRIPTION
.IX "lwp_self function" "" "\fLlwp_self()\fP function"
.IX "lwp_ping function" "" "\fLlwp_ping()\fP function"
.IX "lwp_enumerate function" "" "\fLlwp_enumerate()\fP function"
.IX "lwp_getstate function" "" "\fLlwp_getstate()\fP function"
.IX "lwp_setregs function" "" "\fLlwp_setregs()\fP function"
.IX "lwp_getregs function" "" "\fLlwp_getregs()\fP function"
.LP
.B lwp_self(\|)
returns the
.SM ID
of the current thread in
.IR tid .
This is the
.I only
way to retrieve the identity of
.IR main .
.LP
.B lwp_enumerate(\|)
fills in a list with the
.SM ID\s0's
of all existing
threads and returns the total number of threads.
This primitive will use
.I maxsize
to avoid exceeding the capacity of the list.
If the number of threads is greater than
.IR maxsize ,
only
.I maxsize
thread
.SM ID\s0's
are filled in
.IR vec .
If
.I maxsize
is zero,
.B lwp_enumerate(\|)
just returns the total number of threads.
.LP
.B lwp_getstate(\|)
is used to retrieve the context of a given
thread.
It is possible to see
what object (thread, monitor, etc.) if any
that thread is blocked on, and the scheduling
priority of the thread.
.LP
.B lwp_ping
returns 0 (no error) if the thread
.I tid
exists.
Otherwise, -1 is returned.
.LP
.B lwp_setregs
sets the machine-dependent context (i.e., registers) of a thread.
The next time the thread is scheduled in, this
context is installed.
Consult
.B lwpmachdep.h
for the details.
.B lwp_getregs
retrieves the machine-dependent context.
Note: the registers
may not be meaningful unless the thread
in question is blocked or suspended because the
state of the registers as of
the most recent context switch is returned.
.\" \fIlwp_setregs\fP
.\" can be used to simulate things like
.\" \fIlongjmp\fP
.\" out of a signal handler.
.\" Safe to use even if blocked: first, the thread is unblocked
.\" and put on the run q. When it is scheduled in, it
.\" will get the new context. Even if it was supposed to get a message
.\" it can safely return to a different point. You may get strange results
.\" though.
.SH RETURNS
Upon successful completion,
.BR lwp_self
and
.B lwp_getstate(\|)
return 0, \-1 on error.
.LP
.B lwp_enumerate(\|)
returns the total number of threads.
.LP
.BR lwp_ping
returns 0 if the specified thread exists, else -1.
.SH ERRORS
.B lwp_getstate ,
.B lwp_ping ,
and
.B lwp_setstate(\|)
will fail if one or more of the following is true:
.TP 20
.SM LE_NONEXIST
Attempt to get the status of a non-existent thread.
3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n  8  
|  	psignal.3 of  8  
}  	public.3r l.  8  
~  publickey.3r  ig  8  
  putc.3s   8  
  
putchar.3s c  8  
  putenv.3 ar.  9  
  
putpwent.3 3  9  
  puts.3s   9,  
  putw.3s ./share/man/man3/lwp_stkcswset.3l                                                                      755       0      12          102  4424741253  12035                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_newstk.3l
.\" @(#)lwp_stkcswset.3l 1.3 89/03/27 SMI;
  lwp_yield.3l l   -    madd.3x   -    malloc.3 add  .     mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
  memcpy.3 p.3  .  
  memory.3 y.3  /  
  memset.3 y.3  /  
  meta.3v   /(  
  mfree.3x eta  /8  
./share/man/man3/lwp_suspend.3l                                                                        755       0      12           77  4424741253  11457                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_yield.3l
.\" @(#)lwp_suspend.3l 1.3 89/03/27 SMI;
  madd.3x   -    malloc.3    .     mdiv.3x   .    malloc_debug.3 v  .0    malloc_verify.3   .D    
matherr.3m v  .\    
max_normal.3m r.  .x     max_subnormal.3m   f  .    
memalign.3 a  .  
   	memccpy.3 ma  .  
  memchr.3 emc  .  
  memcmp.3 emc  .  
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3 emo  /  
  meta.3v   /(  
  mfree.3x    /8  
  min.3x   /P  
	  
min_norm./share/man/man3/lwp_yield.3l                                                                          755       0      12        12535  4424741253  11166                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lwp_yield.3l 1.24 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH LWP_YIELD 3L "25 March 1989"
.SH NAME
lwp_yield, lwp_suspend, lwp_resume, lwp_join, lwp_setpri, lwp_resched, lwp_sleep \- control LWP scheduling
.SH SYNOPSIS
.LP
.B #include <lwp/lwp.h>
.LP
.nf
.ft B
int
lwp_yield(tid)
thread_t tid;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_sleep(timeout)
struct timeval *timeout;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_resched(prio)
int prio;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_setpri(tid, prio)
thread_t tid;
int prio;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_suspend(tid)
thread_t tid;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_resume(tid)
thread_t tid;
.ft R
.fi
.LP
.nf
.ft B
int
lwp_join(tid)
thread_t tid;
.ft R
.fi
.SH DESCRIPTION
.IX "lwp_yield function" "" "\fLlwp_yield()\fP function"
.IX "lwp_suspend function" "" "\fLlwp_suspend()\fP function"
.IX "lwp_resume function" "" "\fLlwp_resume()\fP function"
.IX "lwp_join function" "" "\fLlwp_join()\fP function"
.IX "lwp_setpri function" "" "\fLlwp_setpri()\fP function"
.IX "lwp_resched function" "" "\fLlwp_resched()\fP function"
.IX "lwp_sleep function" "" "\fLlwp_sleep()\fP function"
.LP
.B lwp_yield(\|)
allows the currently running thread to voluntarily
relinquish control to another thread
.I with the same scheduling priority.
If
.I tid
is
.BR \s-1SELF\s0 ,
the next thread in the same priority queue
of the yielding thread will run and the current thread will
go the the end of the scheduling queue.
Otherwise, it
is the
.SM ID
of the thread to run next, and the current thread will
take second place in the scheduling queue.
.LP
.B lwp_sleep(\|)
blocks the thread executing this primitive
for at least the time specified by
.IR timeout .
.LP
Scheduling of threads is, by default, preemptive
(higher priorities preempt lower ones) across
priorities and non-preemptive within a priority.
.B lwp_resched(\|)
moves the front thread for a given priority
to the end of the scheduling queue.
Thus, to achieve a preemptive round\-robin
scheduling discipline, a high priority thread
can periodically wake up and shuffle
the queue of threads at a lower priority.
.B lwp_resched(\|)
does not affect threads which are blocked.
If the priority of the rescheduled thread is the
same as that of the caller, the effect is the same as
.BR lwp_yield .
.LP
.B lwp_setpri(\|)
is used to alter (raise or lower) the
scheduling priority of the specified thread.
If
.I tid
is
.BR \s-1SELF\s0 ,
the priority of the invoking thread is set.
Note: if the priority of the affected thread
becomes greater than that of the caller and the affected
thread is not blocked, the caller will not run next.
.B lwp_setpri(\|)
can be used on either blocked or unblocked threads.
.LP
.B lwp_join(\|)
blocks the thread issuing the join
until the thread
.I tid
terminates.  More than one thread may join
.IR tid .
.LP
.B lwp_suspend(\|)
makes the specified thread ineligible to run.
If
.I tid
is
.BR \s-1SELF\s0 ,
the caller is itself suspended.
.B lwp_resume(\|)
undoes the effect of
.BR lwp_suspend .
If a blocked thread is suspended, it will
not run until it has been unblocked as well as
explicitly made eligible to run using
.BR lwp_resume .
By suspending a thread, one can safely
examine it without worrying
that its execution\-time state will change.
.SH NOTE
When scheduling preemptively, be sure to
use monitors to protect shared data structures
such as those used by the standard I/O library.
.SH RETURN VALUE
\fIlwp_yield, lwp_sleep, lwp_resched, lwp_join, lwp_suspend, lwp_resume\fP:
.LP
A 0 return indicates success; \-1 indicates an error.
.LP
\fIlwp_setpri\fP:
.LP
Upon successful completion, the previous
priority is returned.  Otherwise, \-1 is returned.
.SH ERRORS
.B lwp_yield(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
Attempt to yield to a blocked thread.
.TP
.SM LE_NONEXIST
Attempt to yield to a non-existent thread.
.TP
.SM LE_ILLPRIO
Attempt to yield to thread with different priority.
.LP
.B lwp_sleep(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
Illegal timeout specified.
.LP
.B lwp_resched(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
Attempt to reschedule thread at priority greater than that of the caller.
.TP
.SM LE_ILLPRIO
The priority queue specified contains no threads to reschedule.
.LP
.B lwp_setpri(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
The priority specified is beyond the maximum available to the pod.
.TP
.SM LE_NONEXIST
Attempt to set priority of a non-existent thread.
.LP
.B lwp_join(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_NONEXIST
Attempt to join a thread that does not exist.
.LP
.B lwp_suspend(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NONEXIST
Attempt to suspend a non-existent thread.
.LP
.B lwp_resume(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NONEXIST
Attempt to resume a non-existent thread.
.\" .SH BUGS
.\" More general scheduling manipulation should be made available.
.\" That is, to put a thread at a certain position in a given priority
.\" for instance, position 3 or after thread t. As we get more experience,
.\" we will know better what to provide. Maybe something like:
.\" lwp_lock(\|); manipulate pod; lwp_unlock where lwp_lock prevents access
.\" to the pod. Cannot protect runq with monitors since you need to access
.\" the runq to block on a monitor.
 :  
  remainder.3m n 3  :  
  remexportent.3 .  :  
  remque.3 ent  :  
  
res_init.3 3  ;  
  
res_mkquery.3  q  ;$  
  
res_send.3 .  ;<  
./share/man/man3/madd.3x                                                                               755       0      12           61  4424741253  10026                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)madd.3x 1.4 89/03/27 SMI;
   mdiv.3x   .    malloc_debug.3    .0    malloc_verify.3   .D    
matherr.3m f  .\    
max_normal.3m  f  .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
  memcpy.3 p.3  .  
  memory.3 y.3  /  
  memset.3 y.3  /  
  meta.3v   /(  
  mfree.3x eta  /8  
  min.3x e  /P  
	  
min_normal.3m  e  /l  
   min_subnormal.3m  /l  /  
  	mkst./share/man/man3/malloc.3                                                                              755       0      12        27062  4424741253  10272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)malloc.3 1.36 89/03/27 SMI; from UCB 4.2
.TH MALLOC 3  "22 March 1989"
.SH NAME
malloc, alloca, calloc, cfree, free, malloc_debug, malloc_verify, mallocmap, memalign, realloc, valloc \- memory allocator
.SH SYNOPSIS
.IX  "memory management"  ""  ""  ""  PAGE START
.IX  "storage allocation"  ""  ""  ""  PAGE START
.IX  "storage management"  ""  ""  ""  PAGE START
.nf
.B char *malloc(size)
.B unsigned size;
.LP
.B #include <alloca.h>
.B char *alloca(size)
.B int size;
.LP
.B char *calloc(nelem, elsize)
.B unsigned nelem, elsize;
.LP
.B cfree(ptr)
.B char *ptr;
.LP
.B free(ptr)
.B char *ptr;
.LP
.B void mallocmap(\|)
.LP
.B char *realloc(ptr, size)
.B char *ptr;
.B unsigned size;
.B char *realloc(ptr, size)
.B char *ptr;
.B unsigned size;
.LP
.B char *memalign(alignment, size)
.B unsigned alignment;
.B unsigned size;
.LP
.B char *realloc(ptr, size)
.B char *ptr;
.B unsigned size;
.LP
.B char *valloc(size)
.B unsigned size;
.fi
.SH DESCRIPTION
.LP
These routines provide a general-purpose memory allocation package.
They maintain a table of free blocks for efficient allocation and
coalescing of free storage.
When there is no suitable space already free,
the allocation routines call
.B sbrk(\|)
(see
.BR brk (2))
to get more memory from the system.
.LP
Each of the allocation routines returns a pointer
to space suitably aligned for storage of any type of object. 
Each returns a
.SM NULL
pointer if the request cannot be completed (see
.SM DIAGNOSTICS\s0).
.LP
.IX  "memory management"  "malloc"  ""  "\fLmalloc\fP \(em allocate memory"  PAGE MAJOR
.IX  "storage allocation"  "malloc"  ""  "\fLmalloc\fP \(em allocate memory"  PAGE MAJOR
.IX  "malloc"  ""  "\fLmalloc\fP \(em allocate memory"  ""  PAGE MAJOR
.IX  "allocate memory malloc"  ""  "allocate memory \(em \fLmalloc\fP"  ""  PAGE MAJOR
.LP
.B malloc(\|)
returns a pointer to a block of at least
.I size
bytes, which is appropriately aligned.
If
.I size
is zero,
.B malloc(\|)
returns a
non-\s-1NULL\s0
pointer,
but this pointer should
.I not
be dereferenced.
.\"A
.\".SM NULL
.\"(0)
.\"pointer is returned if
.\".I size
.\"is 0 or
.\"if
.\".I size
.\"bytes of memory cannot be allocated.
.IX  "memory management"  "free"  ""  "\fLfree\fP \(em free memory"  PAGE MAJOR
.IX  "storage allocation"  "free"  ""  "\fLfree\fP \(em free memory"  PAGE MAJOR
.IX  "free"  ""  "\fLfree\fP \(em free memory"  ""  PAGE MAJOR
.IX  "free memory free"  ""  "free memory \(em \fLfree\fP"  ""  PAGE MAJOR
.LP
.B free(\|)
releases a previously allocated block.
Its argument is a pointer to a block previously
allocated by
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR malloc ,
or
.BR memalign .
.IX  "memory management"  "realloc"  ""  "\fLrealloc\fP \(em reallocate memory"  PAGE MAJOR
.IX  "storage allocation"  "realloc"  ""  "\fLrealloc\fP \(em reallocate memory"  PAGE MAJOR
.IX  "realloc"  ""  "\fLrealloc\fP \(em reallocate memory"  ""  PAGE MAJOR
.IX  "reallocate memory realloc"  ""  "reallocate memory \(em \fLrealloc\fP"  ""  PAGE MAJOR
.LP
.B mallocmap(\|)
prints a map of the heap to stdout.
.B mallocmap(\|)
prints each block's address,
size (in bytes) and status (free or busy).
A block must have a size that is no larger than the current
extent of the heap.
.LP
.B realloc(\|)
changes the size of the block referenced by
.I ptr
to
.I size
bytes and returns a pointer to the (possibly moved) block.
The contents will be unchanged
up to the lesser of the new and old sizes.
If unable to honor a reallocation request,
.B realloc (\|) 
leaves its first argument unaltered.
For backwards compatibility,
.B realloc(\|)
accepts a pointer to a block freed since
the most recent call to
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
or
.BR memalign .
Note: using
.B realloc(\|)
with a block freed
.I before
the most recent call to
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
or
.BR memalign
is an error.
.IX  "memory management"  "calloc"  ""  "\fLcalloc\fP \(em allocate memory"  PAGE MAJOR
.IX  "storage allocation"  "calloc"  ""  "\fLcalloc\fP \(em allocate memory"  PAGE MAJOR
.IX  "calloc"  ""  "\fLcalloc\fP \(em allocate memory"  ""  PAGE MAJOR
.IX  "allocate memory calloc"  ""  "allocate memory \(em \fLcalloc\fP"  ""  PAGE MAJOR
.LP
.B calloc(\|)
uses
.B malloc(\|)
to allocate space for an array of
.I nelem
elements of size
.IR elsize ,
initializes the space to zeros, and
returns a pointer to the
initialized block. The block can be freed with
.B free(\|)
or
.BR cfree .
.IX  "memory management"  "cfree"  ""  "\fLcfree\fP \(em free memory"  PAGE MAJOR
.IX  "storage allocation"  "cfree"  ""  "\fLcfree\fP \(em free memory"  PAGE MAJOR
.IX  "cfree"  ""  "\fLcfree\fP \(em free memory"  ""  PAGE MAJOR
.IX  "free memory cfree"  ""  "free memory \(em \fLcfree\fP"  ""  PAGE MAJOR
.LP
.IX  "memory management"  "memalign"  ""  "\fLmemalign\fP \(em allocate aligned memory"  PAGE MAJOR
.IX  "storage allocation"  "memalign"  ""  "\fLmemalign\fP \(em allocate aligned memory"  PAGE MAJOR
.IX  "memalign"  ""  "\fLmemalign\fP \(em allocate aligned memory"  ""  PAGE MAJOR
.IX  "allocate aligned memory memalign"  ""  "allocate aligned memory \(em \fLmemalign\fP"  ""  PAGE MAJOR
.LP
.B memalign(\|)
allocates
.I size
bytes on a specified alignment boundary,
and returns a pointer to the allocated block.
The value of the returned address is guaranteed to be
an even multiple of
.IR alignment .
Note: the value of
.I alignment
must be a power of two, and must be greater than
or equal to the size of a word.
.IX  "memory management"  "valloc"  ""  "\fLvalloc\fP \(em allocate aligned memory"  PAGE MAJOR
.IX  "storage allocation"  "valloc"  ""  "\fLvalloc\fP \(em allocate aligned memory"  PAGE MAJOR
.IX  "valloc"  ""  "\fLvalloc\fP \(em allocate aligned memory"  ""  PAGE MAJOR
.IX  "allocate aligned memory valloc"  ""  "allocate aligned memory \(em \fLvalloc\fP"  ""  PAGE MAJOR
.LP
.BI valloc( size )
is equivalent to
.BI "memalign(getpagesize(\|), " size )\fR.
.IX  "memory management"  "alloca"  ""  "\fLalloca\fP \(em allocate on stack"  PAGE MAJOR
.IX  "storage allocation"  "alloca"  ""  "\fLalloca\fP \(em allocate on stack"  PAGE MAJOR
.IX  "alloca"  ""  "\fLalloca\fP \(em allocate on stack"  ""  PAGE MAJOR
.IX  "allocate on stack alloca"  ""  "allocate on stack \(em \fLalloca\fP"  ""  PAGE MAJOR
.LP
.B alloca(\|)
allocates
.I size
bytes of space in the stack frame of the caller,
and returns a pointer to the allocated block.
This temporary space is automatically freed
when the caller returns.
Note that if the allocated block is beyond the current stack limit,
the resulting behavior is undefined.
.SH ERRORS
.LP
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
.BR memalign ,
.BR cfree ,
and
.B free(\|)
will each fail if one or more of the following are true:
.TP 20
.SM EINVAL
The requested allocation size is zero or an
invalid argument was specified. The value of
.I ptr
passed to
.BR free ,
.BR cfree ,
or
.B realloc(\|)
must be a pointer to a block previously allocated by
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
or
.BR memalign .
.TP
.SM EINVAL
The allocation heap is found to have been
corrupted. More detailed information
may be obtained by enabling range checks using
.B malloc_debug.
.TP
.SM ENOMEM
.I size
bytes of memory could not be allocated.
.SH DIAGNOSTICS
.LP
More detailed diagnostics can be made available to programs using
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
.BR memalign ,
.BR cfree ,
and
.BR free ,
by including a special relocatable object file at link time
(see
.SM FILES\s0).
This file also provides routines for control
of error handling and diagnosis, as defined below.
Note: these routines are
.I not
defined in the standard library.
.LP
.RS
.nf
.B int malloc_debug(level)
.B int level;
.LP
.B int malloc_verify(\|)
.RE
.fi
.IX  "memory management"  "malloc_debug"  ""  "\fLmalloc_debug\fP \(em set debug level"  PAGE MAJOR
.IX  "storage allocation"  "malloc_debug"  ""  "\fLmalloc_debug\fP \(em set debug level"  PAGE MAJOR
.IX  "debugging memory management"  "malloc_debug"  ""  "\fLmalloc_debug\fP \(em set debug level"  PAGE MAJOR
.IX  "malloc_debug"  ""  "\fLmalloc_debug\fP \(em set debug level"  ""  PAGE MAJOR
.IX  set "memory management debug level \(em \fLmalloc_debug\fP"  "" ""  PAGE MAJOR
.LP
.B malloc_debug(\|)
sets the level of error diagnosis and reporting
during subsequent calls to
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
.BR memalign ,
.BR cfree ,
and
.BR free .
The value of
.I level
is interpreted as follows:
.TP 20
Level 0
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
.BR memalign ,
.BR cfree ,
and
.BR free
behave the same as in the standard library.
.TP
Level 1
The routines abort with a message to the standard error
if errors are detected in arguments or in the heap.
If a bad block is encountered,
its address and size are included in the message.
.TP
Level 2
Same as level 1, except that the entire heap is
examined on every call to the above routines.
.LP
.B malloc_debug(\|)
returns the previous error diagnostic level.  The default level is 1.
.IX  "memory management"  "malloc_verify"  ""  "\fLmalloc_verify\fP \(em verify heap"  PAGE MAJOR
.IX  "storage allocation"  "malloc_verify"  ""  "\fLmalloc_verify\fP \(em verify heap"  PAGE MAJOR
.IX  "debugging memory management"  "malloc_verify"  ""  "\fLmalloc_verify\fP \(em verify heap"  PAGE MAJOR
.IX  "malloc_verify"  ""  "\fLmalloc_verify\fP \(em verify heap"  ""  PAGE MAJOR
.IX  "verify heap malloc_verify"  ""  "verify heap \(em \fLmalloc_verify\fP"  ""  PAGE MAJOR
.IX  "check heap malloc_verify"  ""  "check heap \(em \fLmalloc_verify\fP"  ""  PAGE MAJOR
.LP
.B malloc_verify(\|)
attempts to determine if the heap has been corrupted.
It scans all blocks in the heap (both free and allocated)
looking for strange addresses or absurd sizes,
and also checks for inconsistencies in the free
space table.
.B malloc_verify(\|)
returns 1 if all checks pass without error, and otherwise
returns 0.  The checks can take a significant
amount of time, so it should not be used
indiscriminately.
.SH FILES
.PD 0
.TP 25
.B /usr/lib/debug/malloc.o
diagnostic versions of
.B malloc(\|)
routines.
.TP
.B /usr/lib/debug/mallocmap.o
routines to print a map of the heap.
.PD
.SH WARNINGS
.B alloca(\|)
is machine-,
compiler-,
and most of all,
system-dependent.
Its use is strongly discouraged.
(see
.BR getrlimit (2),
.BR sigvec (2),
.BR sigstack (2),
.BR csh (1),
.BR csh_builtins (1)
and
.BR ld (1).)
.SH BUGS
.LP
Since
.B realloc(\|)
accepts a pointer to a block freed since the last call to
.BR malloc ,
.BR calloc ,
.BR realloc ,
.BR valloc ,
or
.BR memalign ,
a degradation of performance results.  The semantics of
.B free(\|)
should be changed so that the contents of a
previously freed block are undefined.
.IX  "memory management debugging"  ""  ""  ""  PAGE END
.IX  "memory allocation debugging"  ""  ""  ""  PAGE END
.IX  "storage management debugging"  ""  ""  ""  PAGE END
.IX  "debugging memory management"  ""  ""  ""  PAGE END
.IX  "memory management"  ""  ""  ""  PAGE END
.IX  "storage allocation"  ""  ""  ""  PAGE END
.IX  "storage management"  ""  ""  ""  PAGE END
.br
.ne 15
.SH SEE ALSO
.BR brk (2),
.BR getrlimit (2),
.BR sigvec (2),
.BR sigstack (2),
.BR csh (1),
.BR csh_builtins (1),
.BR ld (1)
.LP
Stephenson, C.J.,
.IR "Fast Fits" ,
in
.IR "Proceedings of the \s-1ACM\s0 9th Symposium on Operating Systems" ,
.BI \s-1SIGOPS\s0 " Operating Systems Review"\fR,
vol. 17, no. 5, October 1983.
.br
.IR "Core Wars" ,
in
.IR "Scientific American" ,
May 1984.
.SH NOTES
Because
.B malloc(0)
returns a
non-\s-1NULL\s0
pointer, a zero size need not be treated
as a special case if it should be passed to
.B malloc(\|)
unpredictably.
 
Also, the pointer returned by
.B malloc(0)
may be passed to subsequent invocations of
.BR realloc(\|) .
mask.3  @   
  setlogmask.3  @   
  setlogmask.3  
  setlogmask.3  @   
  setlogmask.3  
setlinebuf.3s Xue pattern.
.LP
When
.B exc_handle(\|)
is called, a return value of 0 indicates success
and \-1 indicates error.  When
.B exc_handle(\|)
returns because of a matching
.B exc_raise(\|)
call, it returns the
.I pattern
raised by
.BR exc_raise .
.LP
Upon successful completion,
.B exc_raise(\|)
transfers control to the matching
.B exc_handle(\|)
a./share/man/man3/mdiv.3x                                                                               755       0      12           61  4424741255  10062                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)mdiv.3x 1.4 89/03/27 SMI;
 .0    malloc_verify.3   .D    
matherr.3m    .\    
max_normal.3m .\  .x     max_subnormal.3m    .    
memalign.3   .  
   	memccpy.3    .  
  memchr.3  .  .  
  memcmp.3  .  .  
  memcpy.3  .  .  
  memory.3  .  /  
  memset.3  .  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3    /  
  mktemp.3  /  /  

  ./share/man/man3/malloc_debug.3                                                                        755       0      12           74  4424741254  11353                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)malloc_debug.3 1.5 89/03/27 SMI; 
    
matherr.3m D  .\    
max_normal.3m   .x     max_subnormal.3m     .    
memalign.3   .  
   	memccpy.3 .  .  
  memchr.3  .  .  
  memcmp.3  .  .  
  memcpy.3  .  .  
  memory.3  .  /  
  memset.3  /  /  
  meta.3v   /(  
  mfree.3x  /(  /8  
  min.3x    /P  
	  
min_normal.3m 
	  /l  
   min_subnormal.3m     /  
  	mkstemp.3 /  /  
  mktemp.3  /  /  

  modf.3m   /  
  ./share/man/man3/malloc_verify.3                                                                       755       0      12           75  4424741254  11572                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)malloc_verify.3 1.5 89/03/27 SMI; 
 
max_normal.3m  D  .x     max_subnormal.3m  .x  .    
memalign.3 m  .  
   	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
  memcpy.3 p.3  .  
  memory.3 y.3  /  
  memset.3 y.3  /  
  meta.3v   /(  
  mfree.3x eta  /8  
  min.3x e  /P  
	  
min_normal.3m     /l  
   min_subnormal.3m  /l  /  
  	mkstemp.3 3m  /  
  mktemp.3 mp.  /  

  modf.3m   /  
  mon_break.3l 3m   /  
   ./share/man/man3/matherr.3m                                                                            755       0      12        13716  4424741254  10644                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" process through tbl
.\" @(#)matherr.3m 1.21 89/03/27 SMI; from S5R2
.TH MATHERR 3M "20 January 1988"
.SH NAME
matherr \- math library exception-handling function
.SH SYNOPSIS
.LP
.nf
.B #include <math.h>
.LP
.B int matherr(exc)
.B struct exception \(**exc;
.fi
.SH DESCRIPTION
.IX matherr "" "\fLmatherr\fR \(em math library exception-handline function"
.LP
The
.SM SVID
.RI ( "System V Interface Definition" )
specifies that certain
.B libm
functions call
.B matherr(\|)
when exceptions are detected.
Users may define their own mechanisms
for handling exceptions, by including a function named
.B matherr(\|)
in their programs.
.B matherr(\|)
is of the form described above.
When an exception occurs,
a pointer to the exception structure
.I exc
will be passed to the user-supplied
.B matherr(\|)
function.  This structure, which is defined in the
.B <math.h>
header file, is as follows:
.RS
.LP
.ft B
.nf
struct exception {
	int type;
	char \(**name;
	double arg1, arg2, retval;
};
.ft R
.fi
.RE
.LP
The element
.B type
is an integer describing the type of exception
that has occurred, from the following list of
constants (defined in the header file):
.LP
.RS
.PD 0
.TP 20
.SB DOMAIN	
argument domain exception
.TP
.SB SING
argument singularity
.TP
.SB OVERFLOW
overflow range exception
.TP
.SB UNDERFLOW
underflow range exception
.PD
.RE
.LP
The element
.B name
points to a string containing
the name of the function that incurred the exception.
The elements
.B arg1
and
.B arg2
are the arguments with which the function was invoked.
.B retval
is set to the default value that will be
returned by the function unless the user's
.B matherr(\|)
sets it to a different value.
.LP
If the user's
.B matherr(\|)
function returns non-zero,
no exception message will be printed, and
.B errno
will not be set.
.LP
If
.B matherr(\|)
is not supplied by the user,
the default matherr exception-handling
mechanisms, summarized in the table below,
will be invoked upon exception:
.TP
.B \s-1DOMAIN\s0==fp_invalid
An
.SM IEEE
NaN is usually returned,
.B errno
is set to
.SM EDOM\s0,
and a message is printed on standard error.
.BI pow( x ,0.0)
for any
.I x
and
.B atan2(0.0,0.0)
return numerical default results but set
.B errno
and print the message.
.TP
.B \s-1SING\s0==fp_division
An
.SM IEEE
\(if of appropriate sign is returned,
.B errno
is set to
.SM EDOM\s0,
and a message is printed on standard error.
.TP
.B \s-1OVERFLOW\s0==fp_overflow
In the default rounding direction, an
.SM IEEE
\(if of appropriate sign is returned.
In optional rounding directions,
.BR \(+-\s-1MAXDOUBLE\s0 ,
the largest finite double-precision number,
is sometimes returned instead of
.BR \(+-\(if .
.B errno
is set to
.SM ERANGE\s0.
.TP
.B \s-1UNDERFLOW\s0==fp_underflow
An appropriately-signed zero, subnormal number,
or smallest normalized number is returned, and
.B errno
is set to
.SM ERANGE\s0.
.LP
The facilities provided by
.B matherr(\|)
are not available in situations such as
compiling on a Sun-3 system with
.B /usr/lib/f68881/libm.il
or
.BR /usr/lib/ffpa/libm.il ,
in which case some
.B libm
functions are converted to atomic hardware operations.
In these cases setting
.B errno
and calling
.B matherr(\|)
are not worth the adverse performance impact,
but regular
.SM ANSI/IEEE
Std 754-1985 exception handling remains available.
In any case
.B errno
is not a reliable error indicator in that it
may be unexpectedly set by a function in
a handler for an asynchronous signal.
.LP
.TS
center box;
cB s s s s
cB s s s s
c cI s s s
c | c | c | c | c
l | c | c | c | c .
\s0DEFAULT ERROR HANDLING PROCEDURES\s0

=
	Types of Errors
_
\s0<math.h> type	\s-1DOMAIN\s+1	\s-1SING\s+1	\s-1OVERFLOW\s+1	\s-1UNDERFLOW\s0
_
\s0\fBerrno\fP	\s-1EDOM\s+1	\s-1EDOM\s+1	\s-1ERANGE\s+1	\s-1ERANGE\s0
_
\s0IEEE Exception	Invalid Operation	Division by Zero	Overflow	Underflow\s0
_
\s0<floatingpoint.h> type	fp_invalid	fp_division	fp_overflow	fp_underflow\s0

_
\s0\s-1ACOS, ASIN\s+1:	M, NaN	\-	\-	\-\s0
_
\s0\s-1ATAN2(0,0)\s+1:	M, \(+-0.0 or \(+-\(*p	\-	\-	\-\s0
_
\s0\s-1BESSEL\s+1:                \s0
\s0y0, y1, yn (x < 0)	M, NaN	\-	\-	\-\s0
\s0y0, y1, yn (x = 0)	\-	M, \-\(if	\-	\-\s0
_
\s0\s-1COSH, SINH\s+1:	\-	\-	IEEE Overflow	\-\s0
_
\s0\s-1EXP\s+1:	\-	\-	IEEE Overflow	IEEE Underflow\s0
_
\s0\s-1HYPOT\s+1:	\-	\-	IEEE Overflow	\-\s0
_
\s0\s-1LGAMMA\s+1:	\-	M, +\(if	IEEE Overflow	\-\s0
_
\s0\s-1LOG, LOG10\s+1:\s0
\s0 (x < 0)	M, NaN	\-	\-	\-\s0
\s0 (x = 0)	\-	M, \-\(if	\-	\-\s0
_
\s0\s-1POW\s+1:\s0
\s0usual cases	\-	\-	IEEE Overflow	IEEE Underflow\s0
\s0(x < 0) \(**\(** (y not an integer)	M, NaN	\-	\-	\-\s0
\s0  0 \(**\(** 0	M, 1.0	\-	\-	\-\s0
\s0  0 \(**\(** (y < 0)	\-	M, \(+-\(if	\-	\-\s0
_
\s0\s-1SQRT\s+1:	M, NaN	\-	\-	\-\s0
.TE
.LP
.TS
center box;
cB s
c l .
ABBREVIATIONS

=

M	Message is printed (\s-1EDOM\s+1 exception).
NaN	\s-1IEEE\s+1 NaN result and invalid operation exception.
\(if	\s-1IEEE\s+1 \(if result and division-by-zero exception.
\s-1IEEE\s+1 Overflow	\s-1IEEE\s+1 Overflow result and exception.
\s-1IEEE\s+1 Underflow	\s-1IEEE\s+1 Underflow result and exception.
\(*p	Closest machine-representable approximation to \fBpi\fP\.
.TE
.LP
The interaction of
.SM IEEE
arithmetic and
.B matherr(\|)
is not defined when executing under
.SM IEEE
rounding modes other than the default
round to nearest:
.B matherr(\|)
may not be called on overflow or underflow,
and the Sun-provided
.B matherr(\|)
may return results that differ from those in this table.
.br
.ne 20
.SH EXAMPLE
.nf
.ft B
.ta .5i 1.0i 1.5i 2.0i
#include <math.h>
.sp .5
int
matherr(x)
register struct exception \(**x;
{
	switch (x\->type) {
	case
		\s-1DOMAIN\s0:
		/\(** change sqrt to return sqrt(\-arg1), not NaN \(**/
		if (!strcmp(x\->name, "sqrt")) {
			x\->retval = sqrt(\-x\->arg1);
			return (0); /* print message and set errno */
	} /\(** fall through \(**/
	case
 		\s-1SING\s0:
		/\(** all other domain or sing exceptions, print message and abort \(**/
		fprintf(stderr, "domain exception in %s\en", x\->name);
		abort( );
		break;
	}
	return (0); /\(** all other exceptions, execute default procedure \(**/
}
.ft R
.fi
ould be changed so that the contents of a
previous./share/man/man3/max_normal.3m                                                                         755       0      12          100  4424741254  11256                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)max_normal.3m 1.3 89/03/27 SMI;
    
memalign.3 x  .  
   	memccpy.3  m  .  
  memchr.3  gn  .  
  memcmp.3 py.  .  
  memcpy.3 r.3  .  
  memory.3 p.3  /  
  memset.3 y.3  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 /l  /  
  mktemp.3  3m  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0 ./share/man/man3/max_subnormal.3m                                                                      755       0      12          103  4424741254  11773                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)max_subnormal.3m 1.3 89/03/27 SMI;
	memccpy.3 gn  .  
  memchr.3 py.  .  
  memcmp.3 r.3  .  
  memcpy.3 p.3  .  
  memory.3 y.3  /  
  memset.3 y.3  /  
  meta.3v   /(  
  mfree.3x eta  /8  
  min.3x e  /P  
	  
min_normal.3m  x  /l  
   min_subnormal.3m  /l  /  
  	mkstemp.3 3m  /  
  mktemp.3 mp.  /  

  modf.3m   /  
  mon_break.3l 3m   /  
   mon_cond_enter.3l /  /  
  
mon_create.3l 
  0   
  mout.3x   0  
  ./share/man/man3/memalign.3                                                                            755       0      12           70  4424741255  10524                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)memalign.3 1.6 89/03/27 SMI; 
  memchr.3 emc  .  
  memcmp.3 emc  .  
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3 emo  /  
  meta.3v   /(  
  mfree.3x    /8  
  min.3x   /P  
	  
min_normal.3m n.  /l  
   min_subnormal.3m   x  /  
  	mkstemp.3 ma  /  
  mktemp.3 kst  /  

  modf.3m   /  
  mon_break.3l odf  /  
   mon_cond_enter.3l m   /  
  
mon_create.3l .3  0   
  mout.3x   0  
  mon_destroy.3l t  00  
  mon_./share/man/man3/memccpy.3                                                                             755       0      12           66  4424741255  10375                                                                                                                                                                                                                                                                                                                                                                      .so man3/memory.3
.\" @(#)memccpy.3 1.4 89/03/27 SMI;

  memcmp.3 emc  .  
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3 emc  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3  x  /  
  mktemp.3  ma  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   ./share/man/man3/memchr.3                                                                              755       0      12           65  4424741255  10212                                                                                                                                                                                                                                                                                                                                                                      .so man3/memory.3
.\" @(#)memchr.3 1.5 89/03/27 SMI;
 
  memcpy.3 emc  .  
  memory.3 emc  /  
  memset.3 emc  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3   x  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`./share/man/man3/memcmp.3                                                                              755       0      12           65  4424741255  10215                                                                                                                                                                                                                                                                                                                                                                      .so man3/memory.3
.\" @(#)memcmp.3 1.5 89/03/27 SMI;
 
  memory.3 emc  /  
  memset.3 emc  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3  
  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x./share/man/man3/memcpy.3                                                                              755       0      12           65  4424741255  10231                                                                                                                                                                                                                                                                                                                                                                      .so man3/memory.3
.\" @(#)memcpy.3 1.5 89/03/27 SMI;
 
  memset.3 emc  /  
  meta.3v   /(  
  mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3  
  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x  
  mon_waiters.3l x./share/man/man3/memory.3                                                                              755       0      12         5562  4424741256  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)memory.3 1.14 89/03/27 SMI; from S5
.TH MEMORY 3 "6 October 1987"
.SH NAME
memory, memccpy, memchr, memcmp, memcpy, memset \- memory operations
.SH SYNOPSIS
.nf
.B #include <memory.h>
.LP
.B char \(**memccpy (s1, s2, c, n)
.B char \(**s1, \(**s2;
.B int c, n;
.LP
.B char \(**memchr (s, c, n)
.B char \(**s;
.B int c, n;
.LP
.B int memcmp (s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B char \(**memcpy (s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B char \(**memset (s, c, n)
.B char \(**s;
.B int c, n;
.fi
.SH DESCRIPTION
.IX "memccpy function" "" "\fLmemccpy\fR \(em copy memory character strings"
.IX "copy" "memory character strings \(em \fLmemccpy\fR"
.IX "memchr function" "" "\fLmemchr\fR \(em index memory characters"
.IX "index memory characters memchr" "" "index memory characters \(em \fLmemchr\fR"
.IX "memcmp function" "" "\fLmemcmp\fR compare memory characters"
.IX "compare" "memory characters \(em \fLmemcmp\fR"
.IX "memcpy function" "" "\fLmemcpy\fR copy memory character fields"
.IX "copy" "memory character fields \(em \fLmemcpy\fR"
.IX "memset function" "" "\fLmemset\fR assign to memory characters"
.IX "assign to memory characters memset" "" "assign to memory characters \(em \fLmemset\fR"
.IX "memory operations"
These functions operate as efficiently as
possible on memory areas (arrays of characters
bounded by a count, not terminated by a
.SM NULL
character).  They do not check for the overflow
of any receiving memory area.
.LP
.B memccpy(\|)
copies characters from memory area
.I s2
into
.IR s1 ,
stopping after the first occurrence of character
.I c
has been copied, or after
.I n
characters have been copied, whichever comes first.
It returns a pointer to the character after
the copy of
.I c
in
.IR s1 ,
or a
.SM NULL
pointer if
.I c
was not found in the first
.I n
characters of
.IR s2 .
.LP
.B memchr(\|)
returns a pointer to the first
occurrence of character
.I c
in the first
.I n
characters of memory area
.IR s ,
or a
.SM NULL
pointer if
.I c
does not occur.
.LP
.B memcmp(\|)
compares its arguments, looking at the first
.I n
characters only, and returns an integer
less than, equal to, or greater than 0,
according as
.I s1
is lexicographically less than, equal to, or
greater than
.IR s2 .
.LP
.B memcpy(\|)
copies
.I n
characters from memory area
.I s2
to
.IR s1 .
It returns
.IR s1 .
.LP
.B memset(\|)
sets the first
.I n
characters in memory area
.I s
to the value of character
.IR c .
It returns
.IR s .
.SH NOTE
For user convenience, all these functions are declared in the
.B <memory.h>
header file.
.SH BUGS
.B memcmp(\|)
uses native character comparison, which
is signed on some machines
and unsigned on other machines.
Thus the sign of the value returned when one of the
characters has its high-order bit set is
implementation-dependent.
.LP
Character movement is performed differently
in different implementations.
Thus overlapping moves may yield surprises.
of.3 3  8  
|  	psignal.3  3  8  
}  	public.3r  3  8  
~  publickey.3r  8  8  
  putc.3s   8  
  
putchar.3s    8  
  pute./share/man/man3/memset.3                                                                              755       0      12           65  4424741256  10232                                                                                                                                                                                                                                                                                                                                                                      .so man3/memory.3
.\" @(#)memset.3 1.5 89/03/27 SMI;
 mfree.3x 3v   /8  
  min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3  
  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x  
  mon_waiters.3l x  0  
  moncontrol.3  0  0  
  	monitor../share/man/man3/meta.3v                                                                               755       0      12           65  4424741256  10054                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)meta.3v 1.4 89/03/27 SMI;
 min.3x x  /P  
	  
min_normal.3m /P  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3 
  /  
  mktemp.3  
  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x  
  mon_waiters.3l x  0  
  moncontrol.3  0  0  
  	monitor.3 0  0  
  monstart./share/man/man3/mfree.3x                                                                              755       0      12           62  4424741256  10223                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)mfree.3x 1.4 89/03/27 SMI;

	  
min_normal.3m 
	  /l  
   min_subnormal.3m     /  
  	mkstemp.3 /  /  
  mktemp.3  /  /  

  modf.3m   /  
  mon_break.3l  
  /  
   mon_cond_enter.3l    /  
  
mon_create.3l 
  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  
  0L  
   mon_enumerate.3l     0`  
  mon_exit.3l   0x  
  mon_waiters.3l   0  
  moncontrol.3  
  0  
  	monitor.3 0  0  
  monstartup.3  
  0  
  ./share/man/man3/min.3x                                                                                755       0      12           60  4424741256   7706                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)min.3x 1.4 89/03/27 SMI;
  /l  
   min_subnormal.3m  
  /  
  	mkstemp.3    /  
  mktemp.3  /  /  

  modf.3m   /  
  mon_break.3l  /  /  
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x  
  mon_waiters.3l x  0  
  moncontrol.3  0  0  
  	monitor.3 
  0  
  monstartup.3  0  0  
  mount.3r  
  0  
  ./share/man/man3/min_normal.3m                                                                         755       0      12          100  4424741256  11256                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)min_normal.3m 1.3 89/03/27 SMI;
  
  	mkstemp.3 /  /  
  mktemp.3  /  /  

  modf.3m   /  
  mon_break.3l  
  /  
   mon_cond_enter.3l    /  
  
mon_create.3l 
  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  
  0L  
   mon_enumerate.3l     0`  
  mon_exit.3l   0x  
  mon_waiters.3l   0  
  moncontrol.3  
  0  
  	monitor.3 0  0  
  monstartup.3  
  0  
  mount.3r  0  0  
  move.3v   0  
  ./share/man/man3/min_subnormal.3m                                                                      755       0      12          103  4424741257  11774                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)min_subnormal.3m 1.3 89/03/27 SMI;
mktemp.3 mp.  /  

  modf.3m   /  
  mon_break.3l 3m   /  
   mon_cond_enter.3l /  /  
  
mon_create.3l    0   
  mout.3x   0  
  mon_destroy.3l    00  
  mon_enter.3l l   0L  
   mon_enumerate.3l  0L  0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l   0  
  	monitor.3 .3  0  
  monstartup.3  0  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x  ./share/man/man3/mkstemp.3                                                                             755       0      12           66  4424741257  10422                                                                                                                                                                                                                                                                                                                                                                      .so man3/mktemp.3
.\" @(#)mkstemp.3 1.4 89/03/27 SMI;


  modf.3m   /  
  mon_break.3l odf  /  
   mon_cond_enter.3l m   /  
  
mon_create.3l .3  0   
  mout.3x   0  
  mon_destroy.3l t  00  
  mon_enter.3l oy.  0L  
   mon_enumerate.3l l   0`  
  mon_exit.3l   0x  
  mon_waiters.3l t  0  
  moncontrol.3 rs.  0  
  	monitor.3 tr  0  
  monstartup.3 or.  0  
  mount.3r art  0  
  move.3v   0  
  move.3x   1   
  mp.3x 
  1  
  	mrand48.3    1,  
./share/man/man3/mktemp.3                                                                              755       0      12         3662  4424741257  10304                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mktemp.3 1.16 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH MKTEMP 3  "20 January 1988"
.SH NAME
mktemp, mkstemp \- make a unique file name
.SH SYNOPSIS
.nf
.B char *mktemp(template)
.B char *template;
.LP
.B mkstemp(template)
.B char *template;
.fi
.IX  "mktemp function"  ""  "\fLmktemp\fP \(em make unique file name"
.IX  "create" "unique file name \(em \fLmktemp\fP"
.IX  "unique file name"  create  "unique file name"  "create \(em \fLmktemp\fP"
.SH DESCRIPTION
.B mktemp(\|)
creates a unique file name, typically in a
temporary filesystem, by replacing
.I template
with a unique file name, and always returns the address of
.IR template .
The string in
.I template
should contain a file name with six trailing
.BR X s;
.B mktemp(\|)
replaces the
.BR X s
with a letter and the current process
.SM ID\s0.
The letter will be chosen so that the resulting
name does not duplicate an existing file.
.B mkstemp(\|)
makes the same replacement to the template
but returns a file descriptor
for the template file open for reading and writing.
.B mkstemp(\|)
avoids the race between testing whether the
file exists and opening it for use.
.LP
Notes:
.TP 2
\(bu
.B mktemp(\|)
and
.B mkstemp(\|)
actually
.I change
the template string which you pass; this
means that you cannot use the same template
string more than once \(em you need a fresh
template for every unique file you want to open.
.TP 2
\(bu
When
.B mktemp(\|)
or
.B mkstemp(\|)
are creating a new unique filename they check
for the prior existence of a file with that name.
This means that if you are creating more than one
unique filename, it is bad practice to use the
same root template for multiple invocations of
.B mktemp(\|)
or
.BR mkstemp(\|) .
.SH "SEE ALSO"
.BR getpid (2),
.BR open (2V),
.BR tmpfile (3S),
.BR tmpnam (3S)
.SH DIAGNOSTICS
.B mkstemp(\|)
returns an open file descriptor upon success.
It returns \-1 if no suitable file could be created.
.SH BUGS
It is possible to run out of letters.
targ.3  en  6  
^  optind.3 pen  6(  
_  
overlay.3v a  6<  
`  
overlay../share/man/man3/modf.3m                                                                               755       0      12           65  4424741257  10043                                                                                                                                                                                                                                                                                                                                                                      .so man3/frexp.3m
.\" @(#)modf.3m 1.3 89/03/27 SMI; 
 
   mon_cond_enter.3l 
  /  
  
mon_create.3l /  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  00  0L  
   mon_enumerate.3l  
  0`  
  mon_exit.3l   0x  
  mon_waiters.3l x  0  
  moncontrol.3  0  0  
  	monitor.3 0  0  
  monstartup.3  0  0  
  mount.3r  0  0  
  move.3v   0  
  move.3x   1   
  mp.3x ve  1  
  	mrand48.3 ve  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l ./share/man/man3/mon_break.3l                                                                          755       0      12           76  4424741257  11054                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_break.3l 1.3 89/03/27 SMI;
/  
  
mon_create.3l 
  0   
  mout.3x   0  
  mon_destroy.3l   00  
  mon_enter.3l  
  0L  
   mon_enumerate.3l     0`  
  mon_exit.3l   0x  
  mon_waiters.3l   0  
  moncontrol.3  
  0  
  	monitor.3 0  0  
  monstartup.3  
  0  
  mount.3r  0  0  
  move.3v   0  
  move.3x   1   
  mp.3x x   1  
  	mrand48.3 1  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv./share/man/man3/mon_cond_enter.3l                                                                     755       0      12          103  4424741260  12111                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_cond_enter.3l 1.3 89/03/27 SMI;
  mout.3x   0  
  mon_destroy.3l    00  
  mon_enter.3l l   0L  
   mon_enumerate.3l  0L  0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l   0  
  	monitor.3 .3  0  
  monstartup.3  0  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l./share/man/man3/mon_create.3l                                                                         755       0      12        15035  4424741260  11306                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mon_create.3l 1.18 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH MON_CREATE 3L "6 October 1987"
.SH NAME
mon_create, mon_destroy, mon_enter, mon_exit, mon_enumerate, mon_waiters, mon_cond_enter, mon_break, MONITOR, SAMEMON \- LWP routines to manage critical sections
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
.LP
.ft B
int
mon_create(mid)
mon_t *mid;
.LP
.ft B
int
mon_destroy(mid)
mon_t mid;
.LP
.ft B
int
mon_enter(mid)
mon_t mid;
.LP
.ft B
int
mon_exit(mid)
mon_t mid;
.LP
.ft B
int
mon_enumerate(vec, maxsize)
mon_t vec[\|];	/* list of all monitors */
int maxsize;	/* max size of vec */
.LP
.ft B
int
mon_waiters(mid, owner, vec, maxsize)
mon_t mid;		/* monitor in question */
thread_t *owner;	/* which thread owns the monitor */
thread_t vec[\|];		/* list of blocked threads */
int maxsize;		/* max size of vec */
.LP
.ft B
int
mon_cond_enter(mid)
mon_t mid;
.LP
.ft B
int
mon_break(mid)
mon_t mid;
.LP
.ft B
\s-1MONITOR\s0(mid)
.LP
.ft B
\s-1SAMEMON\s0(m1, m2)
.ft R
.fi
.SH DESCRIPTION
.IX "mon_exit function" "" "\fLmon_exit()\fP function"
.IX "mon_enter function" "" "\fLmon_enter()\fP function"
.IX "mon_destroy function" "" "\fLmon_destroy()\fP function"
.IX "mon_create function" "" "\fLmon_create()\fP function"
.IX "SAMEMON function" "" "\fLSAMEMON()\fP function"
.IX "MONITOR function" "" "\fLMONITOR()\fP function"
.IX "mon_break function" "" "\fLmon_break()\fP function"
.IX "mon_cond_enter function" "" "\fLmon_cond_enter()\fP function"
.IX "mon_waiters function" "" "\fLmon_waiters()\fP function"
.IX "mon_enumerate function" "" "\fLmon_enumerate()\fP function"
.LP
Monitors are used to synchronize access
to common resources.  Although it is possible
(on a uniprocessor) to use knowledge of how scheduling
priorities work to serialize access to a resource,
monitors (and condition variables) provide a
general tool to provide the necessary synchronization.
.LP
.B mon_create(\|)
creates a new monitor and returns its identity in
.IR mid .
.B mon_destroy(\|)
destroys a monitor, as well as any
conditions bound to it (see
.BR cv_create (3L)).
Because the lifetime of a monitor can
transcend the lifetime of the lwp that created it,
monitor destruction is not automatic upon
lwp destruction.
.LP
.B mon_enter(\|)
blocks the calling thread (if the
monitor is in use) until the monitor
becomes free by being exited or by waiting on a condition
(see
.BR cv_create (3L)).
Threads unable to gain entry
into the monitor are queued for monitor service
by the priority of the thread requesting monitor access,
.SM FCFS
within a priority.
Monitor calls may nest.
If, while holding monitor M1
a request for monitor M2 is made,
M1 will be held until M2 can be acquired.
.LP
.B mon_cond_enter(\|)
will enter the monitor only if the
monitor is not busy.
Otherwise, an error is returned.
.LP
.B mon_enter(\|)
and
.B mon_cond_enter(\|)
will allow a thread which
already has the monitor to reenter the monitor.
In this case, the nesting level of monitor
entries is returned.  Thus, the first time a
monitor is entered,
.B mon_enter(\|)
returns 0.  The next time the monitor is entered,
.B mon_enter(\|)
returns 1.
.B mon_exit(\|)
frees the current monitor and allows the next
thread blocked on
the monitor (if any) to enter the monitor.
However, if a monitor is entered more than once,
.B mon_exit(\|)
returns the previous monitor nesting level
without freeing the monitor to other threads.
Thus, if the monitor was not reentered,
.B mon_exit(\|)
returns 0.
.LP
.B mon_enumerate(\|)
lists all the monitors in the system.
The vector supplied is filled in with the
.SM ID\s0's
of the monitors.
.I maxsize
is used to avoid exceeding the capacity of the
list.  If the number of monitors is greater than
.IR maxsize ,
only
.I maxsize
monitor
.SM ID\s0's
are filled in
.IR vec .
.LP
.B mon_waiters(\|)
puts the thread that currently owns the monitor in
.I owner
and all threads blocked on the monitor in
.I vec
(subject to the
.I maxsize
limitation), and returns
the number of waiting threads.
.LP
.B mon_break(\|)
forces the release of a monitor lock
not necessarily held by the invoking thread.
This enables the next thread blocked on the
monitor to enter it.
.LP
.SB MONITOR
is a macro that can be used at the start of a
procedure to indicate that the procedure is a monitor.
It uses the exception handling mechanism to ensure that
the monitor is exited automatically when
the procedure exits.
Ordinarily, this single macro replaces paired
.BR mon_enter -
.B mon_exit(\|)
calls in a monitor procedure.
.\" trouble if mid on stack of procedure doing mon
.\" (that is, if you
.\" copied the mid onto a stack var, exc_on_exit could mess it up)
.LP
.SB SAMEMON
is a convenient predicate used
to compare two monitors for equality.
.LP
Monitor locks are released automatically
when the lwp holding them dies.  This may have
implications for the validity of the monitor invariant
(a condition that is always true \fIoutside\fP of the monitor)
if a thread unexpectedly terminates.
.SH RETURN VALUE
.B mon_create(\|)
returns the
.SM ID
of a new monitor.
.LP
A 0 return by
.B mon_destroy(\|)
indicates success; \-1 indicates error.
.LP
.B mon_enter(\|)
returns the nesting level of the monitor.
.LP
Upon successful completion,
.B mon_exit(\|)
returns the previous nesting
level.  It returns \-1 if there is an error.
.LP
.B mon_enumerate(\|)
returns the total number of monitors.
.LP
.B mon_waiters(\|)
returns the number of threads waiting for the
monitor.
.LP
.B mon_cond_enter(\|)
returns the nesting level of the monitor if the
monitor is not busy.  It return \-1 if the
monitor is busy.
.LP
Upon successful completion,
.B mon_break(\|)
returns 0.  Otherwise, it returns \-1.
.SH ERRORS
.B mon_destroy(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_INUSE
Attempt to destroy a monitor that has threads blocked on it.
.TP
.SM LE_NONEXIST
Attempt to destroy non-existent monitor.
.LP
.B mon_exit(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_INVALIDARG
Attempt to exit a monitor that the thread does not own.
.TP
.SM LE_NONEXIST
Attempt to exit non-existent monitor.
.LP
.B mon_cond_enter(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_INUSE
The requested monitor is being used by another thread.
.TP
.SM LE_NONEXIST
Attempt to destroy non-existent monitor.
.LP
.B mon_break(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_NOTOWNED
Attempt to break a monitor lock that is not set.
.TP
.SM LE_NONEXIST
Attempt to break lock on non-existent monitor.
.SH "SEE ALSO"
.BR cv_create (3L)
.SH BUGS
.LP
There should be language support to enforce
the monitor enter-exit discipline.

Stephenson, C.J.,
.IR "Fast Fits" ,
in
.IR "Proceedings of the \s-1ACM\s0 9th Symposium on Operating Systems" ,
.BI \s-1SIGOPS\s0 " Operating Systems Review"\fR,
vol. 17, no. 5, October 1983.
.br
.IR "Core Wars" ,
in
.IR "Scientific American" ,
May 1984.
.SH NOTES
Because
.B malloc(0)
returns a
non-\s-1NULL\s0
pointer, a zero size need not be treated
as a special case if it should be passed to
.B malloc(\|)
unpredictably.
 
Also, the pointer returned by
.B malloc(0)
may be pass./share/man/man3/mout.3x                                                                               755       0      12           61  4424741262  10105                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)mout.3x 1.4 89/03/27 SMI;
 00  
  mon_enter.3l l t  0L  
   mon_enumerate.3l  0L  0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l t  0  
  	monitor.3 .3  0  
  monstartup.3  tr  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  ./share/man/man3/mon_destroy.3l                                                                        755       0      12          100  4424741260  11457                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_destroy.3l 1.3 89/03/27 SMI;
   mon_enumerate.3l     0`  
  mon_exit.3l   0x  
  mon_waiters.3l   0  
  moncontrol.3  
  0  
  	monitor.3 0  0  
  monstartup.3  
  0  
  mount.3r  0  0  
  move.3v   0  
  move.3x   1   
  mp.3x x   1  
  	mrand48.3 1  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  
"  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  ./share/man/man3/mon_enter.3l                                                                          755       0      12           76  4424741260  11077                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_enter.3l 1.3 89/03/27 SMI;
0`  
  mon_exit.3l   0x  
  mon_waiters.3l    0  
  moncontrol.3 l   0  
  	monitor.3 .3  0  
  monstartup.3  0  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch../share/man/man3/mon_enumerate.3l                                                                      755       0      12          102  4424741260  11755                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_enumerate.3l 1.3 89/03/27 SMI;
 mon_waiters.3l    0  
  moncontrol.3 l    0  
  	monitor.3 .3  0  
  monstartup.3  .3  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v t  1  
(  mvaddstr.3v ./share/man/man3/mon_exit.3l                                                                           755       0      12           75  4424741261  10733                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_exit.3l 1.3 89/03/27 SMI;
 moncontrol.3 rs.  0  
  	monitor.3 tr  0  
  monstartup.3 or.  0  
  mount.3r art  0  
  move.3v   0  
  move.3x   1   
  mp.3x 
  1  
  	mrand48.3    1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l ecv  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v   1  
(  mvaddstr.3v   1  
)  mvcur.3v vad  2   
<./share/man/man3/mon_waiters.3l                                                                        755       0      12          100  4424741262  11446                                                                                                                                                                                                                                                                                                                                                                      .so man3/mon_create.3l
.\" @(#)mon_waiters.3l 1.3 89/03/27 SMI;
  	monitor.3 s.  0  
  monstartup.3  0  0  
  mount.3r or.  0  
  move.3v   0  
  move.3x   1   
  mp.3x ve  1  
  	mrand48.3 
  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  1p  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  ./share/man/man3/moncontrol.3                                                                          755       0      12           73  4424741262  11126                                                                                                                                                                                                                                                                                                                                                                      .so man3/monitor.3
.\" @(#)moncontrol.3 1.5 89/03/27 SMI; 
  monstartup.3  s.  0  
  mount.3r p.3  0  
  move.3v   0  
  move.3x   1   
  mp.3x    1  
  	mrand48.3 .3  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v t  1  
(  mvaddstr.3v   1  
)  mvcur.3v str  2   
<  ndbm.3 u  2  
*  mvcur.3x dbm  2(  
+  
mvde./share/man/man3/monitor.3                                                                             755       0      12        10310  4424741262  10476                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)monitor.3 1.18 89/03/27 SMI; from UCB 4.2
.TH MONITOR 3  "18 February 1988"
.SH NAME
monitor, monstartup, moncontrol \- prepare execution profile
.SH SYNOPSIS
.nf
.B #include <a.out.h>
.LP
.B monitor(lowpc, highpc, buffer, bufsize, nfunc)
.B int (*lowpc)(\|), (*highpc)(\|);
.B short buffer[\|];
.LP
.B monstartup(lowpc, highpc)
.B int (*lowpc)(\|), (*highpc)(\|);
.LP
.B moncontrol(mode)
.fi
.IX  "monitor function"  ""  "\fLmonitor\fP \(em make execution profile"
.IX  "monstartup function"  ""  "\fLmonstartup\fP \(em make execution profile"
.IX  "moncontrol function"  ""  "\fLmoncontrol\fP \(em make execution profile"
.IX  "prepare execution profile"  "monitor"  ""  "\fLmonitor\fP \(em make execution profile"
.IX  "prepare execution profile"  "monstartup"  ""  "\fLmonstartup\fP \(em make execution profile"
.IX  "prepare execution profile"  "moncontrol"  ""  "\fLmoncontrol\fP \(em make execution profile"
.IX  "execution profile, prepare \(em \fLmonitor\fR"
.IX  "profile, execution \(em \fLmonitor\fR"
.SH DESCRIPTION
.LP
There are two different forms of monitoring available.
An executable program created by
.RB ` "cc \-p" '
automatically includes calls for the
.BR prof (1)
monitor, and includes an initial call
with default parameters to its start-up routine
.BR  monstartup .
In this case,
.B monitor(\|)
need not be called explicitly, except to
gain fine control over
.BR profil (2)
buffer allocation.  An executable program created by
.RB ` "cc \-pg" '
automatically includes calls for the
.BR gprof (1)
monitor.
.LP
.B monstartup(\|)
is a high-level interface to
.BR profil (2).
.I lowpc
and
.I highpc
specify the address range that is to be
sampled; the lowest address
sampled is that of
.I lowpc
and the highest is just below
.IR highpc .
.B monstartup(\|)
allocates space using
.B sbrk
(see
.BR brk (2))
and passes it to
.B monitor(\|)
(as described below) to record a histogram of
program-counter values,
and calls to certain functions.
Only calls to functions compiled with
.RB ` "cc \-p" '
are recorded.
.LP
On Sun-2, Sun-3, and Sun-4 systems, an entire program can be profiled with:
.RS
.LP
.nf
.B extern etext(\|);
\&.\|.\|.
.B monstartup(\s-1N_TXTOFF\s0(0), etext);
.fi
.RE
.LP
On Sun386i systems, the equivalent code sequence is:
.RS
.LP
.nf
.B extern etext(\|);
.B extern _start(\|);
\&.\|.\|.
.B monstartup(_start, etext);
.fi
.RE
.LP
.B etext
lies just above all the program text, see
.BR end (3).
.LP
To stop execution monitoring and post results to the file
.BR mon.out ,
use:
.IP
.B monitor(0);
.LP
.BR prof (1)
can then be used to examine the results.
.LP
.B moncontrol(\|)
is used to selectively control profiling
within a program.  This works with both
.BR prof (1)
and
.BR gprof (1).
Profiling begins when the program starts.
To stop the collection of profiling statistics, use:
.IP
.B moncontrol(\&0)
.LP
To resume the collection of statistics, use:
.IP
.B moncontrol(\&1)
.LP
This allows you to measure the cost of
particular functions.  Note: an output file
is be produced upon program exit,
regardless of the state of
.BR moncontrol .
.LP
.B monitor(\|)
is a low level interface to
.BR profil (2).
.I lowpc
and
.I highpc
are the addresses of two functions;
.I buffer
is the address of a (user supplied) array of
.I bufsize
short integers.  At most
.I nfunc
call counts can be kept.
.LP
For the results to be significant, especially
where there are small, heavily used routines,
it is suggested that the buffer be no more than
a few times smaller than the range of locations sampled.
.B monitor(\|)
divides the buffer into space to record the
histogram of program counter samples over the range
.I lowpc
to
.IR highpc ,
and space to record call counts of functions
compiled with the
.BR "cc \-p" .
.LP
To profile the entire program on Sun-2, Sun-3, and Sun-4 systems using the low-level interface to profil(2), it is sufficient to use
.RS
.LP
.nf
.B extern etext(\|);
\&.\|.\|.
.B monitor(\s-1N_TXTOFF\s0(0), etext, buf, bufsize, nfunc);
.fi
.RE
On Sun386i systems, the equivalent calls are:
.LP
.RS
.nf
.B extern etext(\|);
.B extern _start(\|);
\&.\|.\|.
.B monitor(_start, etext, buf, bufsize, nfunc);
.fi
.RE
.SH FILES
.PD 0
.TP
.B mon.out
.PD
.SH "SEE ALSO"
.BR cc (1V),
.BR prof (1),
.BR gprof (1),
.BR brk (2),
.BR profil (2),
.BR end (3)
uffer.3v     >  
  	setegid.3 3v  >  
  	seteuid.3 d.  >  
  setexportent.3 .  ?  
  
setfsent.3 t  ?   
  setgid.3 ent  ?4  
  	setgid.3v .3  ?H  
  setgraent.3   ?\  
  
setgrent.3 n  ?t  
  
sethostent.3n  n  ?  
  setjmp.3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3  ?./share/man/man3/monstartup.3                                                                          755       0      12           73  4424741262  11150                                                                                                                                                                                                                                                                                                                                                                      .so man3/monitor.3
.\" @(#)monstartup.3 1.5 89/03/27 SMI; 
  move.3v   0  
  move.3x   1   
  mp.3x ve  1  
  	mrand48.3    1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  1p  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3 u  2(  
+  
mvdelch.3v m  2<  
,  
mvgetch.3v x  2P  
-  mvgetstr./share/man/man3/mount.3r                                                                              755       0      12         2674  4424741262  10331                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mount.3r 1.14 89/03/27 SMI;
.TH MOUNT 3R "22 March 1989"
.SH NAME
mount \- keep track of remotely mounted filesystems
.SH PROTOCOL
.B /usr/include/rpcsvc/mount.x
.SH DESCRIPTION
.IX "mount function" "" "\fLmount()\fP function"
.LP
The mount protocol is separate from, but
related to, the
.SM NFS
protocol. It provides all of the operating
system specific services to get the
.SM NFS
off the ground \(em looking up path names,
validating user identity, and checking
access permissions. Clients use the mount
protocol to get the first file handle, which allows
them entry into a remote filesystem.
.LP
The mount protocol is kept separate from the
.SM NFS
protocol to make it easy to plug in new
access checking and validation methods
without changing the
.SM NFS
server protocol.
.LP
Note: the protocol definition implies
stateful servers because the server maintains
a list of client's mount requests. The mount list
information is not critical for the correct
functioning of either the client
or the server. It is intended for advisory
use only, for example, to warn
people when a server is going down.
.SH PROGRAMMING
.B #include <rpcsvc/mount.h>
.LP
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B xdr_exportbody
.B xdr_exports
.B xdr_fhandle
.B xdr_fhstatus
.B xdr_groups
.B xdr_mountbody
.B xdr_mountlist
.B xdr_path
.fi
.SH SEE ALSO
.BR mount (8),
.BR mountd (8C),
.BR showmount (8)
.LP
.IR "\s-1NFS\s0 Protocol Spec" ,
in
.TX NETP
  
X  ntohs.3n .3n  5  
Y  	on_exit.3 3n  5  
Z  	opendir.3 t../share/man/man3/move.3v                                                                               755       0      12           65  4424741263  10072                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)move.3v 1.4 89/03/27 SMI;
p.3x ve  1  
  	mrand48.3    1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  1p  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3 u  2(  
+  
mvdelch.3v m  2<  
,  
mvgetch.3v x  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v r./share/man/man3/move.3x                                                                               755       0      12           64  4424741263  10073                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)move.3x 1.6 89/03/27 SMI; 
mrand48.3 1  1,  
  msg_enumrecv.3l   1D  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  
"  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v   1  
(  mvaddstr.3v   1  
)  mvcur.3v  1  2   
<  ndbm.3    2  
*  mvcur.3x  2  2(  
+  
mvdelch.3v (  2<  
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw./share/man/man3/mp.3x                                                                                 755       0      12        11067  4424741263   7626                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mp.3x 1.17 89/03/27 SMI; from UCB 4.2
.TH MP 3X "22 March 1989"
.SH NAME
mp, madd, msub, mult, mdiv, mcmp, min, mout, pow, gcd, rpow, itom, xtom, mtox, mfree \- multiple precision integer arithmetic
.SH SYNOPSIS
.ft B
.nf
#include <mp.h>
.sp .5
madd(a, b, c)
\s-1MINT\s0 *a, *b, *c;
.sp .5
msub(a, b, c)
\s-1MINT\s0 *a, *b, *c;
.sp .5
mult(a, b, c)
\s-1MINT\s0 *a, *b, *c;
.sp .5
mdiv(a, b, q, r)
\s-1MINT\s0 *a, *b, *q, *r;
.sp .5
mcmp(a,b)
\s-1MINT\s0 *a, *b;
.sp .5
min(a)
\s-1MINT\s0 *a;
.sp .5
mout(a)
\s-1MINT\s0 *a;
.sp .5
pow(a, b, c, d)
\s-1MINT\s0 *a, *b, *c, *d;
.sp .5
gcd(a, b, c)
\s-1MINT\s0 *a, *b, *c;
.sp .5
rpow(a, n, b)
\s-1MINT\s0 *a, *b;
short n;
.sp .5
msqrt(a, b, r)
\s-1MINT\s0 *a, *b, *r;
.sp .5
sdiv(a, n, q, r)
\s-1MINT\s0 *a, *q;
short n, *r;
.sp .5
\s-1MINT\s0 *itom(n)
short n;
.sp .5
\s-1MINT\s0 *xtom(s)
char *s;
.sp .5
char *mtox(a)
\s-1MINT\s0 *a;
.sp .5
void mfree(a)
\s-1MINT\s0 *a;
.ft R
.fi
.IX  "itom function"  ""  "\fLitom\fP \(em integer to multiple precision"
.IX  "multiple precision integer arithmetic"  itom  ""  \fLitom\fP
.IX  "madd function"  ""  "\fLmadd\fP \(em multiple precision add"
.IX  "multiple precision integer arithmetic"  madd  ""  \fLmadd\fP
.IX  "msub function"  ""  "\fLmsub\fP \(em multiple precision subtract"
.IX  "multiple precision integer arithmetic"  msub  ""  \fLmsub\fP
.IX  "mult function"  ""  "\fLmult\fP \(em multiple precision multiply"
.IX  "multiple precision integer arithmetic"  mult  ""  \fLmult\fP
.IX  "mdiv function"  ""  "\fLmdiv\fP \(em multiple precision divide"
.IX  "multiple precision integer arithmetic"  mdiv  ""  \fLmdiv\fP
.IX  "sdiv function"  ""  "\fLsdiv\fP \(em multiple precision divide"
.IX  "multiple precision integer arithmetic"  sdiv  ""  \fLsdiv\fP
.IX  "min function"  ""  "\fLmin\fP \(em multiple precision decimal input"
.IX  "multiple precision integer arithmetic"  min  ""  \fLmin\fP
.IX  "mout function"  ""  "\fLmout\fP \(em multiple precision decimal output"
.IX  "multiple precision integer arithmetic"  mout  ""  \fLmout\fP
.IX  "pow function"  ""  "\fLpow\fP \(em multiple precision exponential"
.IX  "multiple precision integer arithmetic"  pow  ""  \fLpow\fP
.IX  "gcd function"  ""  "\fLgcd\fP \(em multiple precision GCD"
.IX  "multiple precision integer arithmetic"  gcd  ""  \fLgcd\fP
.IX  "rpow function"   ""  "\fLrpow\fP \(em multiple precision exponential"
.IX  "multiple precision integer arithmetic"  rpow  ""  \fLrpow\fP
.IX  "msqrt function"   ""  "\fLmsqrt\fP \(em multiple precision exponential"
.IX  "multiple precision integer arithmetic"  msqrt  ""  \fLmsqrt\fP
.IX  "xtom function"  ""  "\fLxtom\fP \(em hexadecimal string to multiple precision"
.IX  "multiple precision integer arithmetic"  xtom   ""  \fLxtom\fP
.IX  "mtox function"  ""  "\fLmtox\fP \(em multiple precision to hexadecimal string"
.IX  "multiple precision integer arithmetic"  mtox   ""  \fLmtox\fP
.IX  "mfree function"  ""  "\fLmfree\fP \(em release multiple precision storage"
.IX  "multiple precision integer arithmetic"  mfree  ""  \fLmfree\fP
.SH DESCRIPTION
.LP
These routines perform arithmetic on integers of arbitrary length.
The integers are stored using the defined type
.SM MINT\s0.
Pointers to a
.SM MINT
should be initialized using the function
.BR itom(\|) ,
which sets the initial value to
.IR n .
Alternatively,
.B xtom(\|)
may be used to initialize a
.SM MINT
from a string of hexadecimal digits.
.B mfree(\|)
may be used to release the storage allocated
by these routines.
.LP
.BR madd(\|) ,
.B msub(\|)
and
.B mult(\|)
assign to their third arguments the sum,
difference, and product,
respectively, of their first two arguments.
.B mdiv(\|)
assigns the quotient and remainder,
respectively, to its third and fourth
arguments.
.B sdiv(\|)
is like
.B mdiv(\|)
except that the divisor is an ordinary integer.
.B msqrt
produces the square root and remainder of
its first argument.
.B mcmp(\|)
compares the values of its arguments and returns
.B 0
if the two values are equal,
.BR >0
if the first argument is greater than the second,
and
.BR <0
if the second argument is greater than the first.
.B rpow
calculates
.I a
raised to the power
.IR b ,
while
.B pow(\|)
calculates this reduced modulo
.IR m .
.B min(\|)
and
.B mout(\|)
do decimal input and output.
.B gcd(\|)
finds the greatest common divisor of the first two arguments,
returning it in the third argument.
.B mtox(\|)
provides the inverse of
.BR xtom(\|) .
.LP
Use the
.B \-lmp
loader option to obtain access to these functions.
.SH DIAGNOSTICS
Illegal operations and running out of
memory produce messages and core images.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/libmp.a
.PD
   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3 f.3v ?  @   
  setlogmask.3  
  @   
  setlogmask.3  
  @   
  setlogmask.3  
  setlogmask.3  .3of the monitor invariant
(a condition that is always true \fIoutside\fP of the monitor)
if a thread unexpectedly terminates.
.SH RETURN VALUE
.B mon_create(\|)
returns the
.SM ID
of a new monitor.
.LP
A 0 return by
.B mon_destroy(\|)
indicates ./share/man/man3/mrand48.3                                                                             755       0      12           70  4424741263  10207                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)mrand48.3 1.5 89/03/27 SMI; 
  
   msg_enumsend.3l   1X  
!  msg_recv.3l   1p  
"  msg_reply.3l  
"  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v   1  
(  mvaddstr.3v   1  
)  mvcur.3v  1  2   
<  ndbm.3   2  
*  mvcur.3x  2  2(  
+  
mvdelch.3v (  2<  
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw.3v   2  
1  
mvscanw.3v   2  
2  ./share/man/man3/msg_enumrecv.3l                                                                       755       0      12           77  4424741263  11607                                                                                                                                                                                                                                                                                                                                                                      .so man3/msg_send.3l
.\" @(#)msg_enumrecv.3l 1.3 89/03/27 SMI;
!  msg_recv.3l   1p  
"  msg_reply.3l  1p  1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3   2(  
+  
mvdelch.3v   2<  
,  
mvgetch.3v (  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v d  2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  ./share/man/man3/msg_enumsend.3l                                                                       755       0      12           77  4424741264  11602                                                                                                                                                                                                                                                                                                                                                                      .so man3/msg_send.3l
.\" @(#)msg_enumsend.3l 1.3 89/03/27 SMI;
msg_reply.3l 3l   1  
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v t  1  
(  mvaddstr.3v   1  
)  mvcur.3v str  2   
<  ndbm.3 u  2  
*  mvcur.3x dbm  2(  
+  
mvdelch.3v x  2<  
,  
mvgetch.3v .  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v tr  2x  
/  
mvinsch.3v 3  2  
0  mvprintw.3v   2  
1  
mvscanw.3v w  2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v 3v   2  
4  ./share/man/man3/msg_recv.3l                                                                           755       0      12           73  4424741264  10717                                                                                                                                                                                                                                                                                                                                                                      .so man3/msg_send.3l
.\" @(#)msg_recv.3l 1.3 89/03/27 SMI;
#  msg_send.3l   1  
$  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v t  1  
(  mvaddstr.3v   1  
)  mvcur.3v str  2   
<  ndbm.3 u  2  
*  mvcur.3x dbm  2(  
+  
mvdelch.3v x  2<  
,  
mvgetch.3v .  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v tr  2x  
/  
mvinsch.3v 3  2  
0  mvprintw.3v   2  
1  
mvscanw.3v w  2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v 3v   2  
4  mvwdelch.3v   2  
5  mvwg./share/man/man3/msg_reply.3l                                                                          755       0      12           74  4424741264  11114                                                                                                                                                                                                                                                                                                                                                                      .so man3/msg_send.3l
.\" @(#)msg_reply.3l 1.3 89/03/27 SMI;
  msub.3x   1  
%  mtox.3x   1  
&  mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3 u  2(  
+  
mvdelch.3v m  2<  
,  
mvgetch.3v x  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v r  2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwg./share/man/man3/msg_send.3l                                                                           755       0      12        14361  4424741264  10776                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)msg_send.3l 1.20 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH MSG_SEND 3L "6 October 1987"
.SH NAME
msg_send, msg_recv, msg_reply, MSG_RECVALL, msg_enumsend, msg_enumrecv \- LWP send and receive messages
.SH SYNOPSIS
.nf
.ft B
#include <lwp/lwp.h>
.LP
.ft B
int
msg_send(dest, arg, argsize, res, ressize)
thread_t dest;	/* destination thread */
caddr_t arg;	/* argument buffer */
int argsize;	/* size of argument buffer */
caddr_t res;	/* result buffer */
int ressize;	/* size of result buffer */
.LP
.ft B
int
msg_recv(sender, arg, argsize, res, ressize, timeout)
thread_t *sender;	/* value-result: sending thread or agent */
caddr_t *arg;		/* argument buffer */
int *argsize;		/* argument size */
caddr_t *res;		/* result buffer */
int *ressize;		/* result size */
struct timeval *timeout;	/* \s-1POLL\s0, \s-1INFINITY\s0, else timeout */
.LP
.ft B
int
msg_reply(sender)
thread_t sender;	/* agent id or thread id */
.LP
.ft B
int
msg_enumsend(vec, maxsize)
thread_t vec[\|];	/* list of blocked senders */
int maxsize;
.LP
.ft B
int
msg_enumrecv(vec, maxsize)
thread_t vec[\|];	/* list of blocked receivers */
int maxsize;
.LP
.ft B
\s-1MSG_RECVALL\s0(sender, arg, argsize, res, ressize, timeout)
.ft R
.fi
.SH DESCRIPTION
.IX "msg_send function" "" "\fLmsg_send()\fP function"
.IX "msg_recv function" "" "\fLmsg_recv()\fP function"
.IX "msg_reply function" "" "\fLmsg_reply()\fP function"
.IX "MSG_RECVALL function" "" "\fLMSG_RECVALL()\fP function"
.IX "msg_enumsend function" "" "\fLmsg_enumsend()\fP function"
.IX "msg_enumrecv function" "" "\fLmsg_enumrecv()\fP function"
.LP
Each thread queues messages addressed to
it as they arrive.
Threads may either specify
that a particular sender's message is
to be received next, or that
.I any
sender's message may be received next.
.LP
.B msg_send(\|)
specifies a message buffer and a reply buffer,
and initiates one half of a rendezvous with the receiver.
The sender will block until the receiver replies using
.BR msg_reply .
.B msg_recv(\|)
initiates the other half of a rendezvous and
blocks the invoking thread until a corresponding
.B msg_send(\|)
is received.  When unblocked by
.BR msg_send ,
the receiver may read the message and
generate a reply by filling in the reply
buffer and issuing
.BR msg_reply .
.B msg_reply(\|)
unblocks the sender.  Once a reply is sent,
the receiver should no longer access either
the message or reply buffer.
.LP
In
.BR msg_send ,
.I argsize
specifies the size in bytes of the argument buffer
.IR argbuf ,
which is intended to be a read-only (to the
receiver) buffer.
.I ressize
specifies the size in bytes of the result buffer
.IR resbuf ,
which is intended to be a write-only
(to the receiver) buffer.
.I dest
is the thread that is the target of the send.
.LP
.B msg_recv(\|)
blocks the receiver until:
.TP
\(bu
A message from the agent or thread bound to
.I sender
has been sent to the receiver or,
.TP
\(bu
.I sender
points to a
.SM THREADNULL\s0-valued
variable and
.I any
message has been sent to
the receiver from an thread or agent, or,
.TP
\(bu
After the time specified by
.I timeout
elapses and no message is received.
.LP
If
.I timeout
is
.BR \s-1POLL\s0 ,
.B msg_recv(\|)
returns immediately, returning success if
the message expected has arrived; otherwise
an error is returned.  If
.I timeout
is
.BR \s-1INFINITY\s0 ,
.B msg_recv(\|)
blocks forever or until the expected
message arrives.  If
.I timeout
is any other value
.B msg_recv(\|)
blocks for the time specified by
.I timeout
or until the expected message arrives,
whichever comes first.  When
.B msg_recv(\|)
returns,
.I sender
is filled in with the identity
of the sending thread or agent, and the
buffer addresses and sizes specified
by the matching send are stored in
.IR arg ,
.IR argsize ,
.IR res ,
and
.IR ressize .
.LP
.B msg_enumsend(\|)
and
.B msg_enumrecv(\|)
are used to list all of the threads blocked
on sends (awaiting
a reply) and receives (awaiting a send), respectively.
The value returned is the number of such blocked threads.
The vector supplied by the client is filled
in (subject to the
.I maxsize
limitation) with the
.SM ID\s0's
of the blocked threads.
.I maxsize
is used to avoid exceeding the capacity of the list.
If the number of threads blocked on sends or receives is greater than
.IR maxsize ,
only
.I maxsize
thread
.SM ID\s0's
are filled in
.IR vec .
If
.I maxsize
is 0, just the total number of blocked threads
is returned.
.LP
.I sender
in
.B msg_recv(\|)
is a reference parameter.
If you wish to receive from \fIany\fP sender,
be sure to reinitialize the thread
.I sender
points to as
.SM THREADNULL
before each use (do not use the address of
.SM THREADNULL
for the sender).
Alternatively, use the
.SM 
.I MSG_RECVALL
macro.
This macro has the same parameters that
.B msg_recv(\|)
does, but will ensure that the sender
is properly initialized to
allow receipt from any sender.
.SM 
.I MSG_RECVALL
returns the result from
.BR msg_recv .
.SH RETURN VALUE
Upon successful completion,
.BR msg_send ,
.B msg_recv(\|)
and
.B msg_reply(\|)
return 0.  Otherwise, -1 is returned.
.LP
.B msg_enumsend(\|)
returns the number of threads
blocked on
.BR msg_send .
.LP
.B msg_enumrecv(\|)
returns the number of threads
blocked on
.BR msg_recv .
.SH ERRORS
.B msg_recv(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_TIMEOUT
Timed out before message arrived.
.TP
.SM LE_INVALIDARG
An illegal timeout was specified or the sender address is that of
.SM THREADNULL.
.TP
.SM LE_NONEXIST
The specified thread or agent does not exist.
.LP
.B msg_send(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_INVALIDARG
Attempt to send a message to yourself.
.TP
.SM LE_NONEXIST
The specified destination thread does not exist or has terminated.
.LP
.B msg_reply(\|)
will fail if one or more of the following is
true:
.TP 20
.SM LE_NOWAIT
Attempt to reply to a sender that is not
expecting a reply.
.TP
.SM LE_NONEXIST
Attempt to reply to a sender that does not
exist or has terminated.
.\".LP
.\" send has no timeout cause receiver could have message but then
.\" attempt to modify buffers that are not valid.
.\" Also, receiver then has input data that may not be relevant.
.\" Only good semantics are to ensure that send is completely cancelled
.\" and that is not possible. Receive can safely timeout since nothing
.\" has happened if it does.
's message may be received next.
.LP
.B msg_send(\|)
specifies a message buffer and a reply buffer,
and initiates one half of a rendezvous with the receiver.
The sender will block until the receiver replies using
.BR msg_reply .
.B msg_recv(\|)
initiates the other half o./share/man/man3/msub.3x                                                                               755       0      12           61  4424741264  10071                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)msub.3x 1.4 89/03/27 SMI;
 mult.3x   1  
'  
mvaddch.3v    1  
(  mvaddstr.3v   1  
)  mvcur.3v 3v   2   
<  ndbm.3 v  2  
*  mvcur.3x 3 u  2(  
+  
mvdelch.3v m  2<  
,  
mvgetch.3v x  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v r  2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v 3v   34  
8  
mvwi./share/man/man3/mtox.3x                                                                               755       0      12           61  4424741265  10113                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)mtox.3x 1.4 89/03/27 SMI;
 
mvaddch.3v   1  
(  mvaddstr.3v   1  
)  mvcur.3v  1  2   
<  ndbm.3    2  
*  mvcur.3x  2  2(  
+  
mvdelch.3v (  2<  
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw.3v   2  
1  
mvscanw.3v   2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  
3  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  
6  3   
7  mvwin.3v  3   34  
8  
mvwinch.3v 4  3H  
9  ./share/man/man3/mult.3x                                                                               755       0      12           61  4424741265  10105                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)mult.3x 1.4 89/03/27 SMI;
 
(  mvaddstr.3v   1  
)  mvcur.3v  1  2   
<  ndbm.3   2  
*  mvcur.3x  2  2(  
+  
mvdelch.3v (  2<  
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw.3v   2  
1  
mvscanw.3v   2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  
3  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  
6  3   
7  mvwin.3v  3   34  
8  
mvwinch.3v 4  3H  
9  mvwinsch.3v   3`  
:./share/man/man3/mvaddch.3v                                                                            755       0      12           70  4424741265  10530                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvaddch.3v 1.4 89/03/27 SMI;
  mvcur.3v  1  2   
<  ndbm.3   2  
*  mvcur.3x  2  2(  
+  
mvdelch.3v (  2<  
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw.3v   2  
1  
mvscanw.3v   2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  
3  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  
6  3   
7  mvwin.3v  3   34  
8  
mvwinch.3v 4  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  
:./share/man/man3/mvaddstr.3v                                                                           755       0      12           71  4424741265  10747                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvaddstr.3v 1.4 89/03/27 SMI;
 ndbm.3 v  2  
*  mvcur.3x 3   2(  
+  
mvdelch.3v   2<  
,  
mvgetch.3v (  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v d  2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  
6  34  
8  
mvwinch.3v    3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v ./share/man/man3/mvcur.3v                                                                              755       0      12           66  4424741265  10263                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvcur.3v 1.4 89/03/27 SMI;
 mvcur.3x 3 v  2(  
+  
mvdelch.3v   2<  
,  
mvgetch.3v   2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v    2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v 6  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host./share/man/man3/ndbm.3                                                                                755       0      12        13751  4424741271   7743                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ndbm.3 1.13 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH NDBM 3 "24 November 1987"
.SH NAME
ndbm, dbm_open, dbm_close, dbm_fetch, dbm_store, dbm_delete, dbm_firstkey, dbm_nextkey, dbm_error, dbm_clearerr \- data base subroutines
.SH SYNOPSIS
.LP
.B #include <ndbm.h>
.LP
.nf
.ft B
typedef struct {
	char *dptr;
	int dsize;
} datum;
.ft R
.fi
.LP
.nf
.ft B
\s-1DBM\s0 *dbm_open(file, flags, mode)
char *file;
int flags, mode;
.ft R
.fi
.LP
.nf
.B void dbm_close (db)
.B \s-1DBM\s0 *db;
.fi
.LP
.nf
.ft B
datum dbm_fetch(db, key)
\s-1DBM\s0 *db;
datum key;
.ft R
.fi
.LP
.nf
.ft B
int dbm_store(db, key, content, flags)
\s-1DBM\s0 *db;
datum key, content;
int flags;
.ft R
.fi
.LP
.nf
.ft B
int dbm_delete(db, key)
\s-1DBM\s0 *db;
datum key;
.ft R
.fi
.LP
.nf
.B datum dbm_firstkey(db)
.B \s-1DBM\s0 *db;
.fi
.LP
.nf
.B datum dbm_nextkey(db)
.B \s-1DBM\s0 *db;
.fi
.LP
.nf
.B int dbm_error(db)
.B \s-1DBM\s0 *db;
.fi
.LP
.nf
.B int dbm_clearerr(db)
.B \s-1DBM\s0 *db;
.fi
.SH DESCRIPTION
.IX "database library" ndbm "" "\fLndbm\fR"
.IX dbm_err "" "\fLdbm_err\fR \(em \fLndbm\fR database routine"
.IX dbm_open "" "\fLdbm_open\fR \(em open \fLndbm\fR database"
.IX dbm_close "" "\fLdbm_close\fR \(em close \fLndbm\fR routine"
.IX dbm_fetch "" "\fLdbm_fetch\fR \(em fetch \fLndbm\fR database data"
.IX dbm_store "" "\fLdbm_store\fR \(em add data to \fLndbm\fR database"
.IX dbm_delete "" "\fLdbm_delete\fR \(em remove data from \fLndbm\fR database"
.IX dbm_firstkey "" "\fLdbm_firstkey\fR \(em access \fLndbm\fR database"
.IX dbm_nextkey "" "\fLdbm_nextkey\fR \(em access \fLndbm\fR database"
.IX dbm_error "" "\fLdbm_error\fR \(em return \fLndbm\fR database error condition"
.IX dbm_clearerr "" "\fLdbm_clearerr\fR \(em clear \fLndbm\fR database error condition"
.IX "database functions \(em \fLndbm\fR"  dbm_err  ""  \fLdbm_err\fP
.IX "database functions \(em \fLndbm\fR"  dbm_open  ""  \fLdbm_open\fP
.IX "database functions \(em \fLndbm\fR"  dbm_close  ""  \fLdbm_close\fP
.IX "database functions \(em \fLndbm\fR"  dbm_fetch  ""  \fLdbm_fetch\fP
.IX "database functions \(em \fLndbm\fR"  dbm_store  ""  \fLdbm_store\fP
.IX "database functions \(em \fLndbm\fR"  dbm_delete  ""  \fLdbm_delete\fP
.IX "database functions \(em \fLndbm\fR"  dbm_firstkey  ""  \fLdbm_firstkey\fP
.IX "database functions \(em \fLndbm\fR"  dbm_nextkey  ""  \fLdbm_nextkey\fP
.IX "database functions \(em \fLndbm\fR"  dbm_error  ""  \fLdbm_error\fP
.IX "database functions \(em \fLndbm\fR"  dbm_clearerr  ""  \fLdbm_clearerr\fP
.LP
These functions maintain key/content pairs
in a data base.
The functions will handle very large (a billion blocks)
databases and will access a keyed item
in one or two file system accesses.
This package replaces the earlier
.BR dbm (3X)
library, which managed only a single database.
.LP
.IR key s
and
.IR content s
are described by the
.B datum
typedef.  A
.B datum
specifies a string of
.I dsize
bytes pointed to by
.IR dptr .
Arbitrary binary data, as well as normal
.SM ASCII
strings, are allowed.
The data base is stored in two files.
One file is a directory containing a bit map and has
.B \.dir
as its suffix.  The second file contains
all data and has
.B \.pag
as its suffix.
.LP
Before a database can be accessed, it must be opened by
.BR dbm_open .
This will open and/or create the files
.IB file .dir
and
.IB file .pag
depending on the flags parameter (see
.BR open (2V)).
.LP
A database is closed by calling
.BR dbm_close .
.LP
Once open, the data stored under a key is accessed by
.B dbm_fetch(\|)
and data is placed under a key by
.BR dbm_store .
The
.I flags
field can be either
.SB DBM_INSERT
or
.BR \s-1DBM_REPLACE\s0 .
.SB DBM_INSERT
will only insert new entries into the
database and will not
change an existing entry with the same key.
.SB DBM_REPLACE
will replace an existing entry if it has the same key.
A key (and its associated contents) is deleted by
.BR dbm_delete .
A linear pass through all keys in a database may be made,
in an (apparently) random order, by use of
.B dbm_firstkey(\|)
and
.BR dbm_nextkey .
.B dbm_firstkey(\|)
will return the first key in the database.
.B dbm_nextkey(\|)
will return the next key in the database.
This code will traverse the data base:
.IP
.B
for
.B
(key = dbm_firstkey(db); key.dptr != \s-1NULL\s0; key = dbm_nextkey(db))
.LP
.B dbm_error(\|)
returns non-zero when an error has occurred
reading or writing the database.
.B dbm_clearerr(\|)
resets the error condition on the named database.
.SH SEE ALSO
.BR open (2V),
.BR dbm (3X)
.SH DIAGNOSTICS
All functions that return an
.B int
indicate errors with negative values.
A zero return indicates no error.
Routines that return a
.B datum
indicate errors with a
.SM NULL
.BR  (0)
.IR dptr .
If
.BR dbm_store
called with a
.I flags
value of
.SB DBM_INSERT
finds an existing entry with the same key
it returns 1.
.SH BUGS
The
.B \.pag
file will contain holes so that its apparent
size is about four times its actual content.  Older
versions of the 
.SM UNIX
operating system may create real file blocks for
these holes when touched.  These files cannot be copied
by normal means (\c
.BR cp (1),
.BR cat (1V),
.BR tar (1),
.BR ar (1))
without filling in the holes.
.LP
.I dptr
pointers returned by these subroutines point
into static storage
that is changed by subsequent calls.
.LP
The sum of the sizes of a key/content pair
must not exceed
the internal block size (currently 4096 bytes).
Moreover all key/content pairs that hash
together must fit on a single block.
.B dbm_store(\|)
will return an error in the event that a
disk block fills with inseparable data.
.LP
.B dbm_delete(\|)
does not physically reclaim file space,
although it does make it available for reuse.
.LP
The order of keys presented by
.B dbm_firstkey(\|)
and
.B dbm_nextkey(\|)
depends on a hashing function, not on
anything interesting.
.LP
There are no interlocks and no reliable cache flushing;
thus concurrent updating and reading is risky.
ad
.I sender
points to ./share/man/man3/mvcur.3x                                                                              755       0      12           67  4424741266  10267                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)mvcur.3x 1.5 89/03/27 SMI; 
,  
mvgetch.3v <  2P  
-  mvgetstr.3v   2d  
.  	mvinch.3v 2d  2x  
/  
mvinsch.3v x  2  
0  mvprintw.3v   2  
1  
mvscanw.3v   2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  
3  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  
6  3   
7  mvwin.3v  3   34  
8  
mvwinch.3v 4  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  
:  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	./share/man/man3/mvdelch.3v                                                                            755       0      12           70  4424741266  10545                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvdelch.3v 1.4 89/03/27 SMI;
  mvgetstr.3v   2d  
.  	mvinch.3v v   2x  
/  
mvinsch.3v d  2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  
6  34  
8  
mvwinch.3v    3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
./share/man/man3/mvgetch.3v                                                                            755       0      12           70  4424741266  10560                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvgetch.3v 1.4 89/03/27 SMI;
  	mvinch.3v v   2x  
/  
mvinsch.3v    2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v 6  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	./share/man/man3/mvgetstr.3v                                                                           755       0      12           71  4424741266  10777                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvgetstr.3v 1.4 89/03/27 SMI;
 
mvinsch.3v    2  
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	./share/man/man3/mvinch.3v                                                                             755       0      12           67  4424741266  10415                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvinch.3v 1.4 89/03/27 SMI;
0  mvprintw.3v   2  
1  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  ./share/man/man3/mvinsch.3v                                                                            755       0      12           70  4424741267  10573                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvinsch.3v 1.4 89/03/27 SMI;
  
mvscanw.3v    2  
2  mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  nextafter.3m  4  4,  
D./share/man/man3/mvprintw.3v                                                                           755       0      12           71  4424741267  11013                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvprintw.3v 1.4 89/03/27 SMI;
 mvwaddch.3v   2  
3  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E./share/man/man3/mvscanw.3v                                                                            755       0      12           70  4424741267  10602                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvscanw.3v 1.4 89/03/27 SMI;
  mvwaddstr.3v  2  2  
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  ./share/man/man3/mvwaddch.3v                                                                           755       0      12           71  4424741267  10722                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwaddch.3v 1.4 89/03/27 SMI;
 
4  mvwdelch.3v   2  
5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint./share/man/man3/mvwaddstr.3v                                                                          755       0      12           72  4424741267  11141                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwaddstr.3v 1.4 89/03/27 SMI;

5  mvwgetch.3v   3  
6  mvwgetstr.3v  3  3   
7  mvwin.3v  3  34  
8  
mvwinch.3v   3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x     4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt./share/man/man3/mvwdelch.3v                                                                           755       0      12           71  4424741270  10730                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwdelch.3v 1.4 89/03/27 SMI;
 mvwgetstr.3v 3v   3   
7  mvwin.3v .3v  34  
8  
mvwinch.3v v  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v 3v   3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v er  3  
@  
newterm.3v 3  3  
A  	newwin.3v m.  4   
B  	newwin.3x .3  4  
C  nextafter.3m      4,  
D  
nextkey.3x m  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J./share/man/man3/mvwgetch.3v                                                                           755       0      12           71  4424741270  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwgetch.3v 1.4 89/03/27 SMI;
 
7  mvwin.3v 3v   34  
8  
mvwinch.3v v  3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v r  3  
A  	newwin.3v  3  4   
B  	newwin.3x m.  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x    4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  ./share/man/man3/mvwgetstr.3v                                                                          755       0      12           72  4424741270  11162                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwgetstr.3v 1.4 89/03/27 SMI;

8  
mvwinch.3v    3H  
9  mvwinsch.3v   3`  
:  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v  r  4   
B  	newwin.3x  3  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  ./share/man/man3/mvwin.3v                                                                              755       0      12           66  4424741270  10263                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwin.3v 1.4 89/03/27 SMI;

9  mvwinsch.3v   3`  
:  mvwprintw.3v 3v   3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v er  3  
@  
newterm.3v 3  3  
A  	newwin.3v m.  4   
B  	newwin.3x .3  4  
C  nextafter.3m   3  4,  
D  
nextkey.3x m  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J  nlist.3   4  
K  nlist.3v lis  4  
L  nlm_prot.3r   4  
M  nocb./share/man/man3/mvwinch.3v                                                                            755       0      12           70  4424741270  10571                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwinch.3v 1.4 89/03/27 SMI;
  mvwprintw.3v  3`  3t  
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v r  3  
A  	newwin.3v  3  4   
B  	newwin.3x m.  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x 3  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocr./share/man/man3/mvwinsch.3v                                                                           755       0      12           71  4424741271  10756                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwinsch.3v 1.4 89/03/27 SMI;
 
;  mvwscanw.3v   3  
=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v  r  4   
B  	newwin.3x  3  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
node./share/man/man3/mvwprintw.3v                                                                          755       0      12           72  4424741271  11176                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwprintw.3v 1.4 89/03/27 SMI;

=  netname2host.3n   3  
>  netname2user.3n   3  
?  	newpad.3v n   3  
@  
newterm.3v    3  
A  	newwin.3v     4   
B  	newwin.3x  r  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noec./share/man/man3/mvwscanw.3v                                                                           755       0      12           71  4424741271  10765                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)mvwscanw.3v 1.4 89/03/27 SMI;
 
>  netname2user.3n   3  
?  	newpad.3v er  3  
@  
newterm.3v 3  3  
A  	newwin.3v m.  4   
B  	newwin.3x .3  4  
C  nextafter.3m   r  4,  
D  
nextkey.3x m  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J  nlist.3   4  
K  nlist.3v lis  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v e  5  
P  	noecho.3v y.  5  
Q  	noecho.3./share/man/man3/netname2host.3n                                                                       755       0      12           72  4424741271  11520                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)netname2host.3n 1.4 89/03/27 SMI;
3  
?  	newpad.3v n   3  
@  
newterm.3v r  3  
A  	newwin.3v  3  4   
B  	newwin.3x m.  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x r  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v  e  5  
Q  	noecho.3x y.  5(  
R  nonl.3v ./share/man/man3/netname2user.3n                                                                       755       0      12           72  4424741272  11522                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)netname2user.3n 1.4 89/03/27 SMI;

@  
newterm.3v 3  3  
A  	newwin.3v m.  4   
B  	newwin.3x .3  4  
C  nextafter.3m  m.  4,  
D  
nextkey.3x m  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J  nlist.3   4  
K  nlist.3v lis  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v e  5  
P  	noecho.3v y.  5  
Q  	noecho.3x .3  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T./share/man/man3/newpad.3v                                                                             755       0      12           67  4424741272  10404                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)newpad.3v 1.4 89/03/27 SMI;
A  	newwin.3v m.  4   
B  	newwin.3x .3  4  
C  nextafter.3m  .3  4,  
D  
nextkey.3x m  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J  nlist.3   4  
K  nlist.3v lis  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v e  5  
P  	noecho.3v y.  5  
Q  	noecho.3x .3  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v onl  5`  
U  ./share/man/man3/newterm.3v                                                                            755       0      12           70  4424741272  10601                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)newterm.3v 1.4 89/03/27 SMI;
  	newwin.3x m.  4  
C  nextafter.3m  4  4,  
D  
nextkey.3x 3  4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v  e  5  
Q  	noecho.3x y.  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x onl  5t  
V  	./share/man/man3/newwin.3v                                                                             755       0      12           67  4424741272  10435                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)newwin.3v 1.4 89/03/27 SMI;
C  nextafter.3m  4  4,  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v     5  
Q  	noecho.3x  e  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 nl  5  
W  ./share/man/man3/newwin.3x                                                                             755       0      12           70  4424741272  10431                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)newwin.3x 1.5 89/03/27 SMI; 
  
D  
nextkey.3x   4<  
E  nice.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v     5  
Q  	noecho.3x     5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  nl  5  
X  ./share/man/man3/nextafter.3m                                                                          755       0      12          102  4424741273  11124                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)nextafter.3m 1.3 89/03/27 SMI;
ce.3c   4L  
F  nice.3v   4\  
G  nint.3m   4l  
H  nl.3v nt  4|  
I  nl.3x .3  4  
J  nlist.3   4  
K  nlist.3v .3   4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v    5  
P  	noecho.3v     5  
Q  	noecho.3x     5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  x   5  
X  ntohs.3n  nl  5  
Y  	./share/man/man3/nextkey.3x                                                                            755       0      12           66  4424741273  10617                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)nextkey.3x 1.5 89/03/27 SMI; 
 nice.3v   4\  
G  nint.3m   4l  
H  nl.3v    4|  
I  nl.3x    4  
J  nlist.3   4  
K  nlist.3v lis  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v e  5  
P  	noecho.3v y.  5  
Q  	noecho.3x .3  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v onl  5`  
U  noraw.3x .3v  5t  
V  	nrand48.3 3x  5  
W  ntohl.3n 48.  5  
X  ntohs.3n .3n  5  
Y  	on_exit.3 3n  5  
Z  	open./share/man/man3/nice.3c                                                                               755       0      12         3047  4424741273  10063                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nice.3c 1.16 89/03/27 SMI; from UCB 4.2
.TH NICE 3C "22 November 1987"
.SH NAME
nice \- change priority of a process
.SH SYNOPSIS
.B int nice(incr)
.SH DESCRIPTION
.IX  "nice function"  ""  "\fLnice\fP \(em change priority of a process"
.IX  process "priority \(em \fLnice\fP"
.IX  "priority of process \(em \fLnice\fP"
.LP
The scheduling priority of the process is augmented by
.IR incr .
Positive priorities get less service than normal.
Priority 10 is recommended to users who wish
to execute long-running programs without
undue impact on system performance.
.LP
Negative increments are illegal, except when
specified by the super-user.
The priority is limited to the range \-20
(most urgent) to 20 (least).
Requests for values above or below these
limits result in the scheduling
priority being set to the corresponding limit.
.LP
The priority of a process is passed to a child process by
.BR fork (2).
For a privileged process to return to
normal priority from an unknown state,
.B nice(\|)
should be called successively with
arguments \-40 (goes to priority
\-20 because of truncation), 20 (to get to 0),
then 0 (to maintain compatibility with previous
versions of this call).
.SH RETURN VALUE
Upon successful completion,
.B nice(\|)
returns 0.  Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
The priority is not changed if:
.TP 20
.SM EACCES
The value of
.I incr
specified was negative, and the effective user
.SM ID
is not super-user.
.SH "SEE ALSO"
.BR nice (1),
.BR fork (2),
.BR getpriority (2),
.BR renice (8)
rt.3   9h  
  quiet_nan.3m  9h  9x  
  rand.3c   9  
  rand.3v   9  
  random.3 3v   9  
  raw.3v 3  9  
  raw.3x .  9  
  rcmd.3n   9  
  	re_comp.3 n   :   
  	re_exec.3 md  :  
  	readdir.3 p.  :(  
  	realloc.3 c.  :<  
  
realpath.3 .  :P  
  
refresh.3v .  :d  
  
refresh.3x h  :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3./share/man/man3/nice.3v                                                                               755       0      12         2546  4424741273  10111                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nice.3v 1.9 89/03/27 SMI; from UCB 4.2
.TH NICE 3V "22 November 1987"
.SH NAME
nice \- change priority of a process
.SH SYNOPSIS
.B int nice(incr)
.SH DESCRIPTION
.IX  "nice function V"  ""  "\fLnice\fP \(em change priority of a process, System V"
.IX  process "priority, System V \(em \fLnice\fP"
.IX  "priority of process, System V \(em \fLnice\fP"
.LP
The scheduling priority of the process is augmented by
.IR incr .
Positive priorities get less service than normal.
Priority 10 is recommended to users who wish
to execute long-running programs without
undue impact on system performance.
.LP
Negative increments are illegal, except when
specified by the super-user.
The priority is limited to the range \-20
(most urgent) to 19 (least).
Requests for values above or below these
limits result in the scheduling
priority being set to the corresponding limit.
.LP
The priority of a process is passed to a child process by
.BR fork (2).
.SH RETURN VALUE
.LP
Upon successful completion,
.B nice(\|)
returns the new scheduling priority.
Otherwise, a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.LP
The priority is not changed if:
.TP 20
.SM EPERM
The value of
.I incr
specified was negative, or greater than 40,
and the effective user
.SM ID
is not super-user.
.SH "SEE ALSO"
.BR nice (1),
.BR fork (2),
.BR getpriority (2),
.BR renice (8)

~  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3  8  9  
  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth../share/man/man3/nint.3m                                                                               755       0      12           63  4424741274  10063                                                                                                                                                                                                                                                                                                                                                                      .so man3/rint.3m
.\" @(#)nint.3m 1.3 89/03/27 SMI;
nl.3x m   4  
J  nlist.3   4  
K  nlist.3v  4  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v   5  
P  	noecho.3v 5  5  
Q  	noecho.3x 5  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v  5L  5`  
U  noraw.3x  5`  5t  
V  	nrand48.3 5t  5  
W  ntohl.3n  5  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]./share/man/man3/nl.3v                                                                                 755       0      12           63  4424741274   7535                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)nl.3v 1.5 89/03/27 SMI;
nlist.3   4  
K  nlist.3v  4  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v   5  
P  	noecho.3v 5  5  
Q  	noecho.3x 5  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v  5L  5`  
U  noraw.3x  5`  5t  
V  	nrand48.3 5t  5  
W  ntohl.3n  5  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  6   6./share/man/man3/nl.3x                                                                                 755       0      12           64  4424741274   7540                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)nl.3x 1.5 89/03/27 SMI; 
nlist.3v  4  4  
L  nlm_prot.3r   4  
M  nocbreak.3v   4  
N  nocrmode.3x   4  
O  
nodelay.3v   5  
P  	noecho.3v 5  5  
Q  	noecho.3x 5  5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v  5L  5`  
U  noraw.3x  5`  5t  
V  	nrand48.3 5t  5  
W  ntohl.3n  5  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  6   6  
^  optind.3  6./share/man/man3/nlist.3                                                                               755       0      12         4034  4424741274  10131                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nlist.3 1.14 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH NLIST 3 "18 February 1988"
.SH NAME
nlist \- get entries from symbol table
.SH SYNOPSIS
.nf
.B #include <nlist.h>
.LP
.B int nlist(filename, nl)
.B char \(**filename;
.B struct nlist \(**nl;
.fi
.IX  "nlist function"  ""  "\fLnlist\fP \(em get entries from symbol table"
.IX  get "entries from symbol table \(em \fLnlist\fP"
.IX  "symbol table, get entries from \(em \fLnlist\fR"
.SH DESCRIPTION
.B nlist(\|)
examines the symbol table from the executable image whose name is pointed
to by
.IR filename ,
and selectively extracts a list of values and puts them in the array of
.B nlist(\|)
structures pointed to by
.IR nl .
The name list pointed to by
.B nl(\|)
consists of an array of structures containing names,
types and values.  The
.I n_name
field of each such structure is taken to be a pointer to a
character string representing a symbol name.  The list is terminated
by an entry with a
.SM NULL
pointer (or a pointer to a
.SM NULL
string) in the
.I n_name
field.  For each entry in
.IR nl ,
if the named symbol is present in the executable image's symbol table,
its value and type are placed in the
.I n_value
and
.I n_type
fields.
If a symbol cannot be located, the corresponding
.I n_type
field of
.B nl(\|)
is set to zero.
.SH RETURN VALUE
Upon normal completion,
.B nlist(\|)
returns the number of symbols that were not
located in the symbol table.    If an error occurs,
.B nlist(\|)
returns \-1 and sets all of the
.I n_type
fields in members of the array pointed to by
.B nl(\|)
to zero.
.SH "SEE ALSO"
.BR a.out (5)
.br
.BR coff (5)
.SH DIAGNOSTICS
.\" Sun386i
On Sun-2, Sun-3, and Sun-4 systems, type entries are set to 0 if 
the file cannot be read
or if it does not contain a valid name list.
.LP
On Sun386i systems, the type entries may be zero even when the name
list succeeded, but the value entries will be zero only when the file
cannot be read or does not contain a valid name list.  Therefore, 
on Sun386i systems,
the value entry can be used to determine whether the command succeeded.
inted
to by
.IR filename ,
and selectively extracts a list of values and puts them in the array of
.B nlist(\|)
structures pointed to by
.IR nl .
The name list pointed to by
.B nl(\|)
consists of an array of structures containing names,
types and values.  The
.I n_name
field of each such structure is taken to be a pointer to a
character string representing a symbol name.  The list is terminated
by an entry with a
.SM NULL
pointer (or a pointer to a
.SM NULL
string) in the
.I n_na./share/man/man3/nlist.3v                                                                              755       0      12         2774  4424741274  10330                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nlist.3v 1.4 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH NLIST 3V "24 November 1987"
.SH NAME
nlist \- get entries from symbol table
.SH SYNOPSIS
.nf
.B #include <nlist.h>
.LP
.B int nlist(filename, nl)
.B char \(**filename;
.B struct nlist \(**nl;
.fi
.IX  "nlist function"  ""  "\fLnlist\fP \(em get entries from symbol table"
.IX  get "entries from symbol table \(em \fLnlist\fP"
.IX  "symbol table, get entries from \(em \fLnlist\fR"
.SH DESCRIPTION
.B nlist(\|)
examines the symbol table from the executable image whose name is pointed
to by
.IR filename ,
and selectively extracts a list of values and puts them in the array of
.B nlist(\|)
structures pointed to by
.IR nl .
The name list pointed to by
.B nl(\|)
consists of an array of structures containing names,
types and values.  The
.I n_name
field of each such structure is taken to be a pointer to a
character string representing a symbol name.  The list is terminated
by an entry with a
.SM NULL
pointer (or a pointer to a
.SM NULL
string) in the
.I n_name
field.  For each entry in
.IR nl ,
if the named symbol is present in the executable image's symbol table,
its value and type are placed in the
.I n_value
and
.I n_type
fields.
If a symbol cannot be located, the corresponding
.I n_type
field of
.B nl(\|)
is set to zero.
.SH RETURN VALUE
Upon normal completion,
.B nlist(\|)
returns 0.  If an error occurs,
.B nlist(\|)
returns \-1 and sets all of the
.I n_type
fields in members of the array pointed to by
.B nl(\|)
to zero.
.SH "SEE ALSO"
.BR a.out (5)
  
./share/man/man3/nlm_prot.3r                                                                           755       0      12         1174  4424741275  11017                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nlm_prot.3r 1.7 89/03/27 SMI;
.TH NLM_PROT 3R "6 October 1987"
.SH NAME
nlm_prot \- protocol between local and remote network lock managers
.SH PROTOCOL
.B /usr/include/rpcsvc/nlm_prot.x
.IX "network lock manager protocol"
.SH DESCRIPTION
The network lock manager protocol is
used for communication between local
and remote lock managers.
.SH PROGRAMMING
.nf
.B #include <rpcsvc/nlm_prot.h>
.SS XDR Routines
.fi
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_nlm_testargs
.B	xdr_nlm_testres
.B	xdr_nlm_lockargs
.B	xdr_nlm_cancargs
.B	xdr_nlm_unlockargs
.B	xdr_nlm_res
.fi
.SH SEE ALSO
.BR lockd (8C)
plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  
s  8   
t  point.3x./share/man/man3/nocbreak.3v                                                                           755       0      12           71  4424741275  10710                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)nocbreak.3v 1.4 89/03/27 SMI;
 
nodelay.3v    5  
P  	noecho.3v     5  
Q  	noecho.3x    5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 5L  5  
W  ntohl.3n  5`  5  
X  ntohs.3n  5t  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v    6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  ./share/man/man3/nocrmode.3x                                                                           755       0      12           72  4424741275  10735                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)nocrmode.3x 1.5 89/03/27 SMI; 
 	noecho.3v     5  
Q  	noecho.3x     5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  5L  5  
X  ntohs.3n  5`  5  
Y  	on_exit.3 5t  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x    6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c./share/man/man3/nodelay.3v                                                                            755       0      12           70  4424741275  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)nodelay.3v 1.4 89/03/27 SMI;
  	noecho.3x     5(  
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  x   5  
X  ntohs.3n  5L  5  
Y  	on_exit.3 5`  5  
Z  	opendir.3 5t  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d./share/man/man3/noecho.3v                                                                             755       0      12           67  4424741275  10404                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)noecho.3v 1.4 89/03/27 SMI;
R  nonl.3v   58  
S  nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  x   5  
X  ntohs.3n  x   5  
Y  	on_exit.3 5L  5  
Z  	opendir.3 5`  5  
[  	openlog.3 5t  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e./share/man/man3/noecho.3x                                                                             755       0      12           70  4424741276  10401                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)noecho.3x 1.5 89/03/27 SMI; 
nonl.3x   5L  
T  noraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  x   5  
X  ntohs.3n  x   5  
Y  	on_exit.3 x   5  
Z  	opendir.3 5L  5  
[  	openlog.3 5`  5  
\  	openpl.3x 5t  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f./share/man/man3/nonl.3v                                                                               755       0      12           65  4424741276  10076                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)nonl.3v 1.4 89/03/27 SMI;
oraw.3v 3x   5`  
U  noraw.3x 3x   5t  
V  	nrand48.3 x   5  
W  ntohl.3n  x   5  
X  ntohs.3n  x   5  
Y  	on_exit.3 x   5  
Z  	opendir.3 x   5  
[  	openlog.3 5L  5  
\  	openpl.3x 5`  6   
]  optarg.3  5t  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  ./share/man/man3/nonl.3x                                                                               755       0      12           66  4424741276  10101                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)nonl.3x 1.5 89/03/27 SMI; 
 noraw.3x  5`  5t  
V  	nrand48.3 5t  5  
W  ntohl.3n  5  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  6   6  
^  optind.3  6  6(  
_  
overlay.3v (  6<  
`  
overlay.3x <  6T  
a  overwrite.3v  
a  6l  
b  overwrite.3x  
b  6  
c  pause.3c  6  6  
d  	pclose.3s 6  6  
e  perror.3  6  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6./share/man/man3/noraw.3v                                                                              755       0      12           66  4424741276  10257                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)noraw.3v 1.4 89/03/27 SMI;

V  	nrand48.3 5t  5  
W  ntohl.3n  5  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  6   6  
^  optind.3  6  6(  
_  
overlay.3v (  6<  
`  
overlay.3x <  6T  
a  overwrite.3v  
a  6l  
b  overwrite.3x  
b  6  
c  pause.3c  6  6  
d  	pclose.3s 6  6  
e  perror.3  6  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport./share/man/man3/noraw.3x                                                                              755       0      12           67  4424741276  10262                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)noraw.3x 1.5 89/03/27 SMI; 
W  ntohl.3n  5t  5  
X  ntohs.3n  5  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  6   6(  
_  
overlay.3v   6<  
`  
overlay.3x (  6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  
b  6  
d  	pclose.3s 6  6  
e  perror.3  6  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmt./share/man/man3/nrand48.3                                                                             755       0      12           70  4424741277  10215                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)nrand48.3 1.5 89/03/27 SMI; 
  ntohs.3n  5t  5  
Y  	on_exit.3 5  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v    6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 
b  6  
e  perror.3  6  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap./share/man/man3/ntohl.3n                                                                              755       0      12           72  4424741277  10243                                                                                                                                                                                                                                                                                                                                                                      .so man3/byteorder.3n
.\" @(#)ntohl.3n 1.5 89/03/27 SMI; 
 	on_exit.3 5t  5  
Z  	opendir.3 5  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x    6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  
b  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap./share/man/man3/ntohs.3n                                                                              755       0      12           72  4424741277  10252                                                                                                                                                                                                                                                                                                                                                                      .so man3/byteorder.3n
.\" @(#)ntohs.3n 1.5 89/03/27 SMI; 
 	opendir.3 5t  5  
[  	openlog.3 5  5  
\  	openpl.3x 5  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  ./share/man/man3/on_exit.3                                                                             755       0      12         2550  4424741277  10451                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)on_exit.3 1.11 89/03/27 SMI; from UCB 4.2
.TH ON_EXIT 3 "22 March 1989"
.SH NAME
on_exit \- name termination handler
.SH SYNOPSIS
.nf
.B
int on_exit(procp, arg)
.B void (*procp)(\|);
.B caddr_t arg;
.fi
.IX  "on_exit function"  ""  "\fLon_exit\fP \(em name termination handler"
.IX  "name termination handler"  ""  "name termination handler \(em \fLon_exit\fP"
.IX  "termination handler, name \(em \fLon_exit\fP"
.SH DESCRIPTION
.LP
.B on_exit(\|)
names a routine to be called after a program calls
.BR exit (3)
or returns normally, and before its process terminates.  The routine named is called as
.RS
.nf
.B (*procp)(status, arg);
.fi
.RE
where
.I status
is the argument with which
.B exit(\|)
was called, or zero if
.I main
returns.  Typically,
.I arg
is the address of an argument vector to
.BI (* procp )\fR,
but may be an integer value.
Several calls may be made to
.BR on_exit ,
specifying several termination handlers.
The order in which
they are called is the reverse of that
in which they were given to
.BR on_exit .
.SH "SEE ALSO"
.BR gprof (1),
.BR tcov (1),
.BR exit (3)
.SH DIAGNOSTICS
.LP
.B on_exit(\|)
returns zero normally, or nonzero if the procedure name could not be stored.
.SH NOTES
.LP
This call is specific to the Sun\s-1OS\s0 operating system
and should not be used if portability is a concern.
.LP
Standard I/O exit processing is always done last.
  
  
realpath.3    :P  
  
refresh.3v   :d  
  
refresh.3x    :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  ./share/man/man3/opendir.3                                                                             755       0      12           72  4424741277  10401                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)opendir.3 1.5 89/03/27 SMI; 
 	openpl.3x 5t  6   
]  optarg.3  5  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  ./share/man/man3/openlog.3                                                                             755       0      12           67  4424741300  10373                                                                                                                                                                                                                                                                                                                                                                      .so man3/syslog.3
.\" @(#)openlog.3 1.5 89/03/27 SMI; 
]  optarg.3  5t  6  
^  optind.3  5  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  ./share/man/man3/openpl.3x                                                                             755       0      12           65  4424741300  10413                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)openpl.3x 1.4 89/03/27 SMI;
 
^  optind.3  5t  6(  
_  
overlay.3v   6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p./share/man/man3/optarg.3                                                                              755       0      12           66  4424741300  10223                                                                                                                                                                                                                                                                                                                                                                      .so man3/getopt.3
.\" @(#)optarg.3 1.5 89/03/27 SMI; 

_  
overlay.3v t  6<  
`  
overlay.3x   6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p./share/man/man3/optind.3                                                                              755       0      12           66  4424741300  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/getopt.3
.\" @(#)optind.3 1.5 89/03/27 SMI; 

`  
overlay.3x t  6T  
a  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsi./share/man/man3/overlay.3v                                                                            755       0      12           70  4424741300  10571                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)overlay.3v 1.4 89/03/27 SMI;
  overwrite.3v  6T  6l  
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_./share/man/man3/overlay.3x                                                                            755       0      12           71  4424741301  10575                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)overlay.3x 1.5 89/03/27 SMI; 
 
b  overwrite.3x  6l  6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   ./share/man/man3/overwrite.3v                                                                          755       0      12           72  4424741301  11141                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)overwrite.3v 1.4 89/03/27 SMI;
6  
c  pause.3c  6l  6  
d  	pclose.3s 6l  6  
e  perror.3  6l  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  
s  8 ./share/man/man3/overwrite.3x                                                                          755       0      12           73  4424741301  11144                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)overwrite.3x 1.5 89/03/27 SMI; 
d  	pclose.3s 3c  6  
e  perror.3 e.3  6  
f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n n   7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r f  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l    7  
p   pod_getmaxpri.3l  7  7  
q   pod_getmaxsize.3l 7  7  
r  pod_setexit.3l q  7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u./share/man/man3/pause.3c                                                                              755       0      12         1476  4424741301  10256                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pause.3c 1.12 89/03/27 SMI; from UCB 4.3 BSD
.TH PAUSE 3C "6 October 1987"
.SH NAME
pause \- stop until signal
.SH SYNOPSIS
.B pause(\|)
.IX  "stop until signal"  ""  "stop until signal \(em \fLpause\fP"
.IX  signal  "stop until"  signal  "stop until \(em \fLpause\fP"
.IX  "pause function"  ""  "\fLpause\fP \(em stop until signal"
.SH DESCRIPTION
.LP
.B pause(\|)
never returns normally.
It is used to give up control while waiting for
a signal from
.BR kill (2V)
or an interval timer, see
.BR getitimer (2).
Upon termination of a signal handler started during a
.BR pause ,
the
.B pause(\|)
call will return.
.SH "RETURN VALUE
.LP
Always returns \-1.
.SH ERRORS
.LP
.B pause(\|)
always returns:
.TP 20
.SM EINTR
The call was interrupted.
.SH "SEE ALSO
.BR kill (2V),
.BR getitimer (2),
.BR select (2),
.BR sigpause (2)
 putw.3s   9@  
  	pwdauth.3 tw  9P  
  qsort.3   9h  
  quiet_nan.3m .3   9x  
  rand.3c   9  
  rand.3v   9  
  random.3 and  9  
  raw.3v d  9  
  raw.3x   9  
./share/man/man3/pclose.3s                                                                             755       0      12           66  4424741301  10400                                                                                                                                                                                                                                                                                                                                                                      .so man3/popen.3s
.\" @(#)pclose.3s 1.4 89/03/27 SMI;

f  plot.3x   6  
g  pmap_getmaps.3n   6  
h  pmap_getport.3n   7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 7,  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  
s  8   
t  point.3x  7  8  
u  popen.3s .3l  8$  
v  pow.3m s  84  
w  pow../share/man/man3/perror.3                                                                              755       0      12         4074  4424741302  10305                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)perror.3 1.16 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH PERROR 3  "22 March 1989"
.SH NAME
perror, errno \- system error messages
.SH SYNOPSIS
.nf
.B perror(s)
.B char *s;
.B int sys_nerr;
.B char *sys_errlist[\|];
.B int errno;
.fi
.IX  "perror function"  ""  "\fLperror\fP \(em system error messages"
.IX  "sys_errlist function"  ""  "\fLsys_errlist\fP \(em system error messages"
.IX  "sys_nerr function"  ""  "\fLsys_nerr\fP \(em system error messages"
.IX  "errno function"  ""  "\fLerrno\fP \(em system error messages"
.IX  "system error messages"  "perror"  ""  "\fLperror\fP \(em system error messages"
.IX  "system error messages"  "sys_errlist"  ""  "\fLsys_errlist\fP \(em system error messages"
.IX  "system error messages"  "sys_nerr"  ""  "\fLsys_nerr\fP \(em system error messages"
.IX  "system error messages"  "errno"  ""  "\fLerrno\fP \(em system error messages"
.IX  "error messages"
.IX  messages  "system error"
.SH DESCRIPTION
.B perror(\|)
produces a short error message on the standard error
describing the last error encountered during a call
to a system or library function.
If
.I s
is not a
.SM NULL
pointer and does not point to a null string, the string it points to is
printed, followed by a colon, followed by
a space, followed by the message and a
.SM NEWLINE\s0.
If
.I s
is a
.SM NULL
pointer or points to a null string, just the message is printed, followed by a
.SM NEWLINE\s0.
To be of most use, the argument string should
include the name of the program that incurred the error.
The error number is taken from the external variable
.B errno
(see
.BR intro (2)),
which is set when errors occur but not cleared when
non-erroneous calls are made.
.LP
To simplify variant formatting of messages, the vector of message strings
.B sys_errlist
is provided;
.B errno
can be used as an index in this table to get the
message string without the newline.
.B sys_nerr
is the number of messages provided for in the table;
it should be checked because new error codes
may be added to the system before
they are added to the table.
.SH "SEE ALSO"
.BR intro (2),
.BR psignal (3)
  =  
  scanw.3x .3s  =  
  	scroll.3v 3v  =  
  	scroll.3x 3v  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 er  >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 3   >  
  setexportent.3   ?  
  
./share/man/man3/plot.3x                                                                               755       0      12         6646  4424741302  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)plot.3x 1.11 89/03/27 SMI; from UCB 6.2 5/15/86
.TH PLOT 3X  "6 October 1987"
.SH NAME
plot, openpl, erase, label, line, circle, arc, move, cont, point, linemod, space, closepl \- graphics interface
.SH SYNOPSIS
.nf
.B openpl(\|)
.LP
.B erase(\|)
.LP
.B label(s)
.B char s[\|];
.LP
.B line(x1, y1, x2, y2)
.LP
.B circle(x, y, r)
.LP
.B arc(x, y, x0, y0, x1, y1)
.LP
.B move(x, y)
.LP
.B cont(x, y)
.LP
.B point(x, y)
.LP
.B linemod(s)
.B char s[\|];
.LP
.B space(x0, y0, x1, y1)
.LP
.B closepl(\|)
.fi
.ft R
.IX  "openpl function"  ""  "\fLopenpl\fP \(em open plot device"
.IX  "graphics interface"  openpl  ""  \fLopenpl\fP
.IX  "erase function"  ""  "\fLerase\fP \(em start new plot frame"
.IX  "graphics interface"  erase  ""  \fLerase\fP
.IX  "label function"  ""  "\fLlabel\fP \(em plot label"
.IX  "graphics interface"  label  ""  \fLlabel\fP
.IX  "line function"  ""  "\fLline\fP \(em plot line"
.IX  "graphics interface"  line  ""  \fLline\fP
.IX  "circle function"  ""  "\fLcircle\fP \(em plot circle"
.IX  "graphics interface"  circle  ""  \fLcircle\fP
.IX  "arc function"  ""  "\fLarc\fP \(em plot arc"
.IX  "graphics interface"  arc  ""  \fLarc\fP
.IX  "move function"  ""  "\fLmove\fP \(em move current point"
.IX  "graphics interface"  move  ""  \fLmove\fP
.IX  "cont function"  ""  "\fLcont\fP \(em continue line"
.IX  "graphics interface"  cont  ""  \fLcont\fP
.IX  "point function"  ""  "\fLpoint\fP \(em plot point"
.IX  "graphics interface"  point  ""  \fLpoint\fP
.IX  "linemod function"  ""  "\fLlinemod\fP \(em set line style"
.IX  "graphics interface"  linemod  ""  \fLlinemod\fP
.IX  "space function"  ""  "\fLspace\fP \(em specify plot space"
.IX  "graphics interface"  space  ""  \fLspace\fP
.IX  "closepl function"  ""  "\fLclosepl\fP \(em close plot device"
.IX  "graphics interface"  closepl  ""  \fLclosepl\fP
.SH DESCRIPTION
These subroutines generate graphic output in a relatively
device-independent manner.  See
.BR plot (5)
for a description of their effect.
.B openpl(\|)
must be used before any of the others
to open the device for writing.
.B closepl(\|)
flushes the output.
.LP
String arguments to
.B label(\|)
and
.B linemod(\|)
are
.SM NULL\s0-terminated,
and do not contain
.SM NEWLINE
characters.
.LP
Various flavors of these functions exist
for different output devices.
They are obtained by the following
.BR ld (1)
options:
.TP 10
.B \-lplot
device-independent graphics stream on standard output for
.BR plot (1G)
filters
.TP
.B \-l300
.SM GSI\s0 300 terminal
.TP
.B \-l300s
.SM GSI\s0 300S terminal
.TP
.B \-l450
.SM GSI\s0 450 terminal
.TP
.B \-l4014
Tektronix 4014 terminal
.TP
.B \-lplotaed
.SM AED\s0 512 color graphics terminal
.TP
.B \-lplotbg
.SM BBN\s0 bitgraph graphics terminal
.TP
.B \-lplotdumb
Dumb terminals without cursor addressing or line printers
.TP
.B \-lplotgigi
.SM DEC\s0 Gigi terminals
.TP
.B \-lplot2648
Hewlett Packard 2648 graphics terminal
.TP
.B \-lplot7221
Hewlett Packard 7221 graphics terminal
.TP
.B \-lplotimagen
Imagen laser printer (default 240 dots-per-inch resolution).
.SH FILES
.PD 0
.TP 20
.B /usr/lib/libplot.a
.TP
.B /usr/lib/lib300.a
.TP
.B /usr/lib/lib300s.a
.TP
.B /usr/lib/lib450.a
.TP
.B /usr/lib/lib4014.a
.TP
.B /usr/lib/libplotaed.a
.TP
.B /usr/lib/libplotbg.a
.TP
.B /usr/lib/libplotdumb.a
.TP
.B /usr/lib/libplotgigi.a
.TP
.B /usr/lib/libplot2648.a
.TP
.B /usr/lib/libplot7221.a
.TP
.B /usr/lib/libplotimagen.a
.PD
.SH "SEE ALSO"
.BR graph (1G),
.BR ld (1),
.BR plot (1G),
.BR plot (5)

  setlogmask.3  
  setlogmask.3  
  setlogmask.3  
  setlogmask.3  
  setl./share/man/man3/pmap_getmaps.3n                                                                       755       0      12           72  4424741303  11562                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)pmap_getmaps.3n 1.4 89/03/27 SMI;
7   
i  pmap_rmtcall.3n   7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n 
k  7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r    7h  
n  pod_exit.3l   7  
o  pod_getexit.3l o  7  
p   pod_getmaxpri.3l     7  
q   pod_getmaxsize.3l    7  
r  pod_setexit.3l r  7  
s   pod_setmaxpri.3l     8   
t  point.3x  8   8  
u  popen.3s  8  8$  
v  pow.3m s  84  
w  pow.3x s  8H  
x  	printf.3s 8H  8\  
y  	printf.3v 8\  8p  
z  	prin./share/man/man3/pmap_getport.3n                                                                       755       0      12           72  4424741303  11606                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)pmap_getport.3n 1.4 89/03/27 SMI;
7  
j  pmap_set.3n   7,  
k  
pmap_unset.3n n   7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r f  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l    7  
p   pod_getmaxpri.3l  7  7  
q   pod_getmaxsize.3l 7  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u  popen.3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n./share/man/man3/pmap_rmtcall.3n                                                                       755       0      12           72  4424741304  11561                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)pmap_rmtcall.3n 1.4 89/03/27 SMI;

k  
pmap_unset.3n n   7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r f  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l    7  
p   pod_getmaxpri.3l  7  7  
q   pod_getmaxsize.3l 7  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u  popen.3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n  8  
|  	psignal.3 of  8./share/man/man3/pmap_set.3n                                                                           755       0      12           66  4424741304  10721                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)pmap_set.3n 1.4 89/03/27 SMI;
7D  
l  pnoutrefresh.3v   7T  
m  pnp.3r f  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l    7  
p   pod_getmaxpri.3l  7  7  
q   pod_getmaxsize.3l 7  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u  popen.3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n  8  
|  	psignal.3 of  8  
}  	public.3r l.  8  
~./share/man/man3/pmap_unset.3n                                                                         755       0      12           70  4424741304  11257                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)pmap_unset.3n 1.4 89/03/27 SMI;
  7T  
m  pnp.3r h  7h  
n  pod_exit.3l   7  
o  pod_getexit.3l   7  
p   pod_getmaxpri.3l  
p  7  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  
s  8   
t  point.3x  7  8  
u  popen.3s .3l  8$  
v  pow.3m s  84  
w  pow.3x .  8H  
x  	printf.3s    8\  
y  	printf.3v w.  8p  
z  	printw.3x .3  8  
{  prof.3 3  8  
|  	psignal.3  n  8  
}  	public.3r of  8  
~  publickey.3r  8  8./share/man/man3/pnoutrefresh.3v                                                                       755       0      12           75  4424741304  11645                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)pnoutrefresh.3v 1.4 89/03/27 SMI;
od_exit.3l   7  
o  pod_getexit.3l    7  
p   pod_getmaxpri.3l  7  7  
q   pod_getmaxsize.3l 7  7  
r  pod_setexit.3l q  7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u  popen.3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n  8  
|  	psignal.3 of  8  
}  	public.3r l.  8  
~  publickey.3r  of  8  
  putc.3s   8  
  
./share/man/man3/pnp.3r                                                                                755       0      12         4513  4424741304   7753                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pnp.3r 1.8 89/03/27 SMI; from UCB 4.2
.TH PNP 3R "2 February 1988"
.SH NAME
pnp - automatic network installation
.SH PROTOCOL
.B /usr/include/rpcsvc/pnprpc.x
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "pnp" "" "\fLpnp\fP \(em automatic network installation"
.IX "automatic network install"
.LP
.B pnp(\|)
is used during unattended network installation, and routine booting,
of Sun386i systems on a Sun386i network.
Each network cable (subnetwork or full network) must have at least one
.BR pnpd (8C)
server running on it to support
.SM PNP.
.SH PROGRAMMING
.B #include <rpcsvc/pnprpc.h>
.LP
The following
.SM RPC
calls are available in version 2 of the
.SM PNP
protocol:
.TP
.SB NULLPROC
Finds a
.SM PNP
daemon on the local network.  Used with
.BR clntudp_broadcast(\|) ,
often to measure network overhead.
.TP
.SB PNP_WHOAMI
Used early in the boot process to acquire network configuration 
information about a system, or to determine that a system is not known by the 
network.
.TP
.SB PNP_ACQUIRE
Used to acquire a server willing to 
configure a new system after a
.SB PNP_WHOAMI
request fails.  This
.SM RPC
is typically broadcast; any successful reply may be used.
.TP
.SB PNP_SETUP
Requests a network configuration from a
.SM PNP
daemon that has responded to a previous
.SB PNP_ACQUIRE
.SM RPC.
.TP
.SB PNP_POLL
After a
.SB PNP_SETUP
request, if the status is 
.BR in_progress ,
the procedure is to wait 20
seconds, and issue a
.SB PNP_POLL
request, and then check the status again.
Once the status is 
.BR success ,
the system will be configured for the network.
Entries in the yp database may be added or old ones deleted, and
file storage may be assigned, according to the architecture and boot type.
.PP
If the server misses 5 
.SB PNP_POLL
requests, it will assume that the client system crashed and
back out of the procedure.
Similarly, if the client system does not receive responses from the server 
for
.SB PNP_MISSEDPOLLS
consecutive requests, it should assume the server crashed and begin its
.SM PNP
sequence again.
.LP
.\"The following XDR routines are available in
.\".I librpcsvc:
.\".nf
.\".ft B
.\"xdr_pnp_errcode
.\"xdr_how_to_boot
.\"xdr_net_type
.\"xdr_hw_addr
.\"xdr_pnp_acquire_arg
.\"xdr_pnp_setup_arg
.\"xdr_pnp_poll_ret
.\"xdr_pnp_whoami_arg
.\"xdr_pnp_whoami_ret
.\".ft R
.\".fi
.SH SEE ALSO
.BR pnpboot (8C),
.BR pnpd (8C)
gid.3 ent  ?4  
  	setgid.3v .3  ?H  
  setgraent.3   ?\  
  
setgrent.3 n  ?t  
  
sethostent.3n  n  ?  
  setjmp.3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3./share/man/man3/pod_exit.3l                                                                           755       0      12           75  4424741305  10723                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_create.3l
.\" @(#)pod_exit.3l 1.3 89/03/27 SMI;
  pod_getmaxpri.3l     7  
q   pod_getmaxsize.3l    7  
r  pod_setexit.3l r  7  
s   pod_setmaxpri.3l     8   
t  point.3x  8   8  
u  popen.3s  8  8$  
v  pow.3m x  84  
w  pow.3x e  8H  
x  	printf.3s 8H  8\  
y  	printf.3v 8\  8p  
z  	printw.3x 8p  8  
{  prof.3 3  8  
|  	psignal.3 8  8  
}  	public.3r 8  8  
~  publickey.3r  
~  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3  8  9  
  
./share/man/man3/pod_getexit.3l                                                                        755       0      12          100  4424741305  11430                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_create.3l
.\" @(#)pod_getexit.3l 1.3 89/03/27 SMI;
  
q   pod_getmaxsize.3l 
q  7  
r  pod_setexit.3l   7  
s   pod_setmaxpri.3l  
s  8   
t  point.3x     8  
u  popen.3s  8   8$  
v  pow.3m s  84  
w  pow.3x .  8H  
x  	printf.3s  e  8\  
y  	printf.3v 8H  8p  
z  	printw.3x 8\  8  
{  prof.3 3  8  
|  	psignal.3  3  8  
}  	public.3r 8  8  
~  publickey.3r  8  8  
  putc.3s   8  
  
putchar.3s    8  
  putenv.3 s   9  
  
putpwent.3   9  
  ./share/man/man3/pod_getmaxpri.3l                                                                      755       0      12          105  4424741305  11764                                                                                                                                                                                                                                                                                                                                                                      .so man3/pod_setmaxpri.3l
.\" @(#)pod_getmaxpri.3l 1.3 89/03/27 SMI;
 
r  pod_setexit.3l q  7  
s   pod_setmaxpri.3l  7  8   
t  point.3x .3l  8  
u  popen.3s .3x  8$  
v  pow.3m e  84  
w  pow.3x   8H  
x  	printf.3s w.  8\  
y  	printf.3v .3  8p  
z  	printw.3x .3  8  
{  prof.3 n  8  
|  	psignal.3 of  8  
}  	public.3r l.  8  
~  publickey.3r  8  8  
  putc.3s   8  
  
putchar.3s c  8  
  putenv.3 ar.  9  
  
putpwent.3 3  9  
  puts.3s   9,  
  putw.3s ./share/man/man3/pod_getmaxsize.3l                                                                     755       0      12          106  4424741305  12145                                                                                                                                                                                                                                                                                                                                                                      .so man3/pod_setmaxpri.3l
.\" @(#)pod_getmaxsize.3l 1.3 89/03/27 SMI;
 pod_setmaxpri.3l l q  8   
t  point.3x xpr  8  
u  popen.3s oin  8$  
v  pow.3m   84  
w  pow.3x v  8H  
x  	printf.3s    8\  
y  	printf.3v in  8p  
z  	printw.3x in  8  
{  prof.3 	  8  
|  	psignal.3    8  
}  	public.3r ig  8  
~  publickey.3r c.3  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3 utc  9  
  
putpwent.3 e  9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3    9P  
./share/man/man3/pod_setexit.3l                                                                        755       0      12          100  4424741305  11444                                                                                                                                                                                                                                                                                                                                                                      .so man3/lwp_create.3l
.\" @(#)pod_setexit.3l 1.3 89/03/27 SMI;
  
t  point.3x xpr  8  
u  popen.3s oin  8$  
v  pow.3m   84  
w  pow.3x v  8H  
x  	printf.3s    8\  
y  	printf.3v in  8p  
z  	printw.3x in  8  
{  prof.3 	  8  
|  	psignal.3    8  
}  	public.3r ig  8  
~  publickey.3r c.3  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3 utc  9  
  
putpwent.3 e  9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3    9P  
  qsort.3   9h  
  quiet_na./share/man/man3/pod_setmaxpri.3l                                                                      755       0      12         4447  4424741305  12035                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pod_setmaxpri.3l 1.16 89/03/27 SMI;
.\" Copyright (C) 1987, Sun Microsystems, Inc.
.TH POD_SETMAXPRI 3L "6 October 1987"
.SH NAME
pod_setmaxpri, pod_getmaxpri, pod_getmaxsize \- control LWP scheduling priority
.SH SYNOPSIS
.nf
.LP
.ft B
int
pod_setmaxpri(maxprio)
int maxprio;
.LP
.ft B
int
pod_getmaxpri(\|)
.LP
.ft B
int
pod_getmaxsize(\|)
.fi
.SH DESCRIPTION
.IX "pod_setmaxpri function" "" "\fLpod_setmaxpri()\fP function"
.IX "pod_getmaxpri function" "" "\fLpod_getmaxpri()\fP function"
.IX "pod_getmaxsize function" "" "\fLpod_getmaxsize()\fP function"
.LP
The lwp library is self-initializing:
the first time  you use a primitive that
requires threads to be supported,
.I main
is automatically converted into a thread.
A pod will terminate when all client-created
lightweight threads
(including the thread bound to
.IR main )
are dead.
.\" the nugget may create some helper threads that are killed automatically
.LP
By default, only a single priority
.RB ( \s-1MINPRIO\s0 )
is available.  However, by using
.BR pod_setmaxpri ,
you can make an arbitrary number
(up to the limit imposed by the implementation)
of priorities available.  The
.I main
thread will receive the highest available scheduling
priority at the time of initialization.  By using
.B pod_setmaxpri(\|)
before any other lwp primitives, you
can ensure that main will receive the
same priority as the argument to
.BR pod_setmaxpri .
.B pod_setmaxpri(\|)
can be called repeatedly, as long as the number of
scheduling priorities
.RI ( maxprio )
increases with each call.
.LP
.B pod_getmaxpri(\|)
returns the current number of available
priorities.
Priorities are numbered from 1
.RB ( \s-1MINPRIO\s0 )
to maxprio.
.LP
The implementation-dependent maximum
number of priorities available
can be retrieved using
.BR pod_getmaxsize .
This value will never be less than 255.
.SH RETURN VALUE
.B pod_setmaxpri(\|)
returns 0 if success; else \-1.
.LP
.B pod_getmaxsize(\|)
returns the maximum number of priorities
that your system supports.
.LP
.B pod_getmaxpri(\|)
returns the number of priority levels set by the
most recent
.B pod_setmaxpri(\|)
call.
.SH ERRORS
.B pod_setmaxpri(\|)
will fail if one or more of the following are
true:
.TP 20
.SM LE_INVALIDARG
Attempt to allocate more priorities than supported.
.TP
.SM LE_NOROOM
No internal memory left to create pod.
3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3  ?  
  
setlinebuf.3s tj  ?  
  
setlinebuf.3v .3  @   
  setlogmask.3  .3  @   
  setlogmask.3 f.3v .3  @   
  setlogmask.3 f.3v ?  @   
  setl./share/man/man3/point.3x                                                                              755       0      12           64  4424741306  10254                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)point.3x 1.4 89/03/27 SMI;
  
v  pow.3m   84  
w  pow.3x v  8H  
x  	printf.3s    8\  
y  	printf.3v in  8p  
z  	printw.3x in  8  
{  prof.3 	  8  
|  	psignal.3    8  
}  	public.3r ig  8  
~  publickey.3r c.3  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3 utc  9  
  
putpwent.3 e  9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3    9P  
  qsort.3   9h  
  quiet_nan.3m sor  9x  
  rand.3c   9  
  rand.3v   9  
  ./share/man/man3/popen.3s                                                                              755       0      12         4733  4424741306  10306                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)popen.3s 1.18 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH POPEN 3S "22 March 1989"
.SH NAME
popen, pclose \- open or close a pipe (for I/O) from or to a process
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B \s-1FILE\s0 *popen(command, type)
.B char *command, *type;
.LP
.B pclose(stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  process  "initiate I/O to or from"
.IX  initiate "I/O to or from process \(em \fLpopen\fR"
.IX  "popen function"  ""  "\fLpopen\fP \(em open stream to process"
.IX  "pclose function"  ""  "\fLpclose\fP \(em close stream to process"
.SH DESCRIPTION
The arguments to
.B popen(\|)
are pointers to
.SM NULL\s0-terminated
strings containing, respectively, a
shell command line and an I/O mode, either
.B r
for reading or
.B w
for writing.
.B popen(\|)
creates a pipe between the calling process and
the command to be executed.  The value
returned is a stream pointer such that
one can write to the standard input of the command,
if the I/O mode is
.BR w ,
by writing to the file
stream;
and one can read from the standard output of the command,
if the I/O mode is
.BR  r ,
by reading from the file
stream.
.LP
A stream opened by
.B popen(\|)
should be closed by
.BR pclose ,
which waits for the associated process to terminate
and returns the exit status of the command.
.LP
Because open files are shared, a type
.B r
command may be used as an input filter,
reading its standard input
(which is also the standard output of
the process doing the
.BR popen )
and providing filtered input on the
stream,
and a type
.B w
command may be used as an output filter,
reading a stream of output written to the
stream
process doing the
.B popen(\|)
and further filtering it and writing it
to its standard output
(which is also the standard input of the
process doing the
.BR popen ).
.LP
.B popen(\|)
always calls
.BR sh (1),
never
.BR csh (1).
.SH "SEE ALSO"
.BR csh (1),
.BR sh (1),
.BR pipe (2),
.BR wait (2),
.BR fclose (3S),
.BR fopen (3S),
.BR system (3)
.SH DIAGNOSTICS
.B popen(\|)
returns a
.SM NULL
pointer if the pipe or process cannot be created,
or if it cannot allocate
as much memory as it needs.
.LP
.B pclose(\|)
returns \-1 if
stream
is not associated with a
.RB ` popen ed'
command.
.SH BUGS
If the original and
.RB ` popen ed'
processes concurrently read or write a common file,
neither should use buffered I/O,
because the buffering gets all mixed up.
Similar problems with an output filter may be
forestalled by careful buffer flushing,
for instance, with
.BR fflush ;
see
.BR fclose (3S).
setlogmask.3 f.3v ?  @   
  setl./share/man/man3/pow.3m                                                                                755       0      12           62  4424741306   7713                                                                                                                                                                                                                                                                                                                                                                      .so man3/exp.3m
.\" @(#)pow.3m 1.5 89/03/27 SMI; 
 	printf.3s  .  8\  
y  	printf.3v  v  8p  
z  	printw.3x    8  
{  prof.3 3  8  
|  	psignal.3  3  8  
}  	public.3r  	  8  
~  publickey.3r  8  8  
  putc.3s   8  
  
putchar.3s    8  
  putenv.3 s    9  
  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3 s   9P  
  qsort.3   9h  
  quiet_nan.3m  9h  9x  
  rand.3c   9  
  rand.3v   9  
  random.3 3v   9  
  raw.3v 3  9  
  raw../share/man/man3/pow.3x                                                                                755       0      12           60  4424741306   7724                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)pow.3x 1.4 89/03/27 SMI;
  
y  	printf.3v 8\  8p  
z  	printw.3x 8p  8  
{  prof.3   8  
|  	psignal.3 8  8  
}  	public.3r 8  8  
~  publickey.3r  
~  8  
  putc.3s   8  
  
putchar.3s   8  
  putenv.3  8  9  
  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3 9@  9P  
  qsort.3   9h  
  quiet_nan.3m  
  9x  
  rand.3c   9  
  rand.3v   9  
  random.3  9  9  
  raw.3v    9  
  raw.3x 3  9  
  rcmd./share/man/man3/printf.3s                                                                             755       0      12        23156  4424741306  10507                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)printf.3s 1.32 89/03/27 SMI; from UCB 4.3 and S5R3
.TH PRINTF 3S "20 January 1988"
.SH NAME
printf, fprintf, sprintf \- formatted output conversion
.SH SYNOPSIS
.LP
.nf
.B #include <stdio.h>
.B "int printf(format [ , arg ] \&.\|.\|. )"
.B char *format;
.fi
.LP
.nf
.B "int fprintf(stream, format [ , arg ] \&.\|.\|. )"
.B \s-1FILE\s0 *stream;
.B char *format;
.fi
.LP
.nf
.B "char *sprintf(s, format [ , arg ] \&.\|.\|. )"
.B char *s, *format;
.fi
.LP
.nf
.B #include <varargs.h>
.B int _doprnt(format, args, stream)
.B char \(**format;
.B va_list args;
.B \s-1FILE\s0 \(**stream;
.fi
.SH DESCRIPTION
.IX printf "" "\fLprintf\fR \(em formatted output conversion"
.IX sprintf "" "\fLsprintf\fR \(em formatted output conversion"
.IX fprintf "" "\fLfprintf\fR \(em formatted output conversion"
.IX  "convert numbers to strings"  printf  "" \fLprintf\fP
.IX  "convert numbers to strings"  fprintf  "" \fLfprintf\fP
.IX  "convert numbers to strings"  sprintf  "" \fLsprintf\fP
.IX  "output conversion"  "printf"  ""  "\fLprintf\fP \(em convert to stdout"
.IX  "output conversion"  "fprintf"  ""  "\fLfprintf\fP \(em convert to stream"
.IX  "output conversion"  "sprintf"  ""  "\fLsprintf\fP \(em convert to string"
.IX  string  "number conversion"  string  "number conversion \(em \fLprintf\fP"
.B printf(\|)
places output on the standard output stream
.BR stdout .
.B fprintf(\|)
places output on the named output
.BR stream .
.B sprintf(\|)
places ``output'',
followed by the
.SM NULL
character
.RB ( \e0 ),
in consecutive bytes starting at
.RI \(** s ;
it is the user's responsibility to ensure that
enough storage is available.
.B printf(\|)
and
.B fprintf(\|)
return the number of characters transmitted.
The return value of
.B sprintf(\|)
is not normally used, but cast to type
.B void
instead.
.B printf(\|)
and
.B fprintf(\|)
return an
.SM EOF
if an output error was encountered.
.LP
Each of these functions converts, formats, and prints its
.IR arg s
under control of the
.IR format .
The
.I format
is a character string which contains
two types of objects:
plain characters, which are simply copied
to the output stream, and
conversion specifications, each of which
causes conversion and printing of zero or more
.IR arg s.
The results are undefined if there are insufficient
.IR arg s
for the format.  If the format is exhausted while
.IR arg s
remain, the excess
.IR arg s
are simply ignored.
.LP
Each conversion specification is introduced
by the character
.BR % .
After the
.BR % ,
the following appear in sequence:
.LP
.RS
Zero or more
.IR flags ,
which modify the meaning of
the conversion specification.
.LP
An optional decimal digit string specifying a minimum
.IR "field width" .
If the converted value has fewer characters
than the field width,
it will be padded on the left (or right,
if the left-adjustment flag
.RB ` \- ',
described below, has been
given) to the field width.
The padding is with blanks unless the
field width digit string
starts with a zero, in which case the
padding is with zeros.
.LP
A
.I precision
that gives the minimum number of digits to appear for the
.BR d ,
.BR i ,
.BR o ,
.BR u ,
.BR x ,
or
.B X
conversions,
the number of digits to appear after the
decimal point for the
.BR e ,
.BR E ,
and
.B f
conversions, the maximum number of
significant digits for the
.B g
and
.B G
conversion,
or the maximum number of characters
to be printed from a string in
.B s
conversion.
The precision takes the form of a period
.RB ( \&. )
followed by a decimal digit string; a
.SM NULL
digit string is treated as zero.
Padding specified  by the precision overrides
the padding specified by the field width.
.LP
An optional
.B l
(ell) specifying that a following
.BR d ,
.BR i ,
.BR o ,
.BR u ,
.BR x ,
or
.B X
conversion character applies to a long integer
.IR arg .
An
.B l
before any other conversion character is ignored.
.LP
A character that indicates the type of
conversion to be applied.
.RE
.LP
A field width or precision or both may be
indicated by an asterisk
.RB ( \(** )
instead of a digit string.
In this case, an integer
.I arg
supplies
the field width or precision.  The
.I arg
that is actually converted is not fetched until
the conversion letter is seen, so the
.IR arg s
specifying field width or precision must appear
.I before
the
.I arg
(if any) to be converted.
A negative field width argument is taken as a
.RB ` \- '
flag followed by a positive field width.
If the precision argument is negative,
it will be changed to zero.
.LP
The flag characters and their meanings are:
.PD 0
.TP 10
.B \-
The result of the conversion will be left-justified within the field.
.TP
.B +
The result of a signed
conversion will always begin with a sign
.RB ( +
or
.BR \- ).
.TP
blank
If the first character of a signed
conversion is not a sign, a blank
will be prefixed to the result.
This implies that if the blank and
.B +
flags both appear, the blank flag will be ignored.
.TP
.B #
This flag specifies that the value is to be converted
to an ``alternate form.''\
For
.BR c ,
.BR d ,
.BR i ,
.BR s ,
and
.B u
conversions, the flag has no effect.  For
.B o
conversion, it increases the precision to force
the first digit of the result to be a zero.  For
.B x or X
conversion, a non-zero result will have
.B 0x or 0X
prefixed to it.  For
.BR e ,
.BR E ,
.BR f ,
.BR g ,
and
.B G
conversions, the result will always
contain a decimal point,
even if no digits follow the point (normally,
a decimal point appears in the result of
these conversions only if a digit follows it).  For
.B g
and
.B G
conversions, trailing zeroes will
.I not
be removed from the result
(which they normally are).
.PD
.LP
The conversion characters and their meanings are:
.LP
.PD 0
.TP 10
.B d\fP,\fBi\fP,\fBo\fP,\fBu\fP,\fBx\fP,\fBX
The integer
.I arg
is converted to signed decimal
.RB ( d
or
.BR i ),
unsigned octal
.RB ( o ),
unsigned decimal
.RB ( u ),
or unsigned hexadecimal notation
.RB ( x
and
.BR X ),
respectively; the letters
.B abcdef
are used for
.B x
conversion and the letters
.SB ABCDEF
for
.B X
conversion.
The precision specifies the minimum number of digits
to appear; if the value being converted can
be represented
in fewer digits, it will be expanded with leading zeroes.
(For compatibility with older versions,
padding with leading zeroes may alternatively
be specified by prepending a zero to the field width.
This does not imply an octal value for the field width.)
The default precision is 1.
The result of converting a zero value with a precision
of zero is a
.SM NULL
string.
.TP
.B f
The float or double
.I arg
is converted to decimal notation in the style
\&``[\fB\-\fR]ddd\fB.\fRddd''
where the number of digits after the decimal point
is equal to the precision specification.
If the precision is missing, 6 digits are given;
if the precision is explicitly 0, no digits and
no decimal point are printed.
.TP
.BR e , E
The float or double
.I arg
is converted in the style
"[\fB\-\fR]d\fB.\fRddd\fBe\(+-\fRddd,"
where there is one digit before the decimal point and
the number of digits after it is equal
to the precision; when the precision is missing,
6 digits are produced; if the precision
is zero, no decimal point appears.  The
.B E
format code will produce a number with
.B E
instead of
.B e
introducing the exponent.
The exponent always contains at least two digits.
.TP
.BR g , G
The float or double
.I arg
is printed in style
.B f
or
.B e
(or in style
.B E
in the case of a
.B G
format code),
with the precision specifying the number
of significant digits.
The style used depends on the value converted:
style
.B e
or
.B E
will be used only if the exponent resulting from
the conversion is less than \-4 or greater
than the precision.  Trailing zeroes are
removed from the result; a decimal point
appears only if it is followed by a digit.
.PD
.LP
The
.BR e ,
.BR E ,
.BR f ,
.BR g,
and
.BR G
formats print
.SM IEEE
indeterminate values (infinity or not-a-number) as ``Infinity'' or ``NaN''
respectively.
.LP
.PD 0
.TP 10
.B c
The character
.I arg
is printed.
.TP
.B s
The
.I arg
is taken to be a string (character pointer)
and characters from the string are printed until a
.SM NULL
character
.RB ( \e0 )
is encountered or until the number
of characters indicated by the precision
specification is reached.
If the precision is missing, it is taken
to be infinite, so all characters up to the first
.SM NULL
character are printed.  A
.SM NULL
value for
.I arg
will yield undefined results.
.TP
.B %
Print a
.BR % ;
no argument is converted.
.PD
.LP
In no case does a non-existent or small
field width cause truncation of a field;
if the result of a conversion is wider
than the field width, the field is simply
expanded to contain the conversion result.
Padding takes place only if the specified field
width exceeds the actual width.  Characters generated by
.B printf(\|)
and
.B fprintf(\|)
are printed as if
.BR putc (3S)
had been called.
.SH EXAMPLES
To print a date and time in the form ``Sunday, July 3, 10:02,'' where
.I weekday
and
.I month
are pointers to
.SM NULL\s0-terminated
strings:
.RS
.LP
.nf
.B
printf("%s,\ %s\ %i,\ %d:%.2d",\ weekday,\ month,\ day,\ hour,\ min);
.fi
.RE
.LP
To print
.if n .I pi
.if t \(*p
to 5 decimal places:
.RS
.LP
.B
printf("pi \|= \|%.5f", \|4 \(** atan(1. 0));
.RE
.SH NOTE
These routines call
.BR _doprnt ,
which is an implementation-dependent routine.
Each uses the variable-length argument facilities of
.BR varargs (3).
Although it is possible to use
.B _doprnt
to take a list of arguments and pass them on to a routine like
.BR printf ,
not all implementations have such a routine.
We strongly recommend that you use the routines described in
.BR vprintf (3S)
instead.
.SH "SEE ALSO"
.BR econvert (3),
.BR printf (3V),
.BR putc (3S),
.BR scanf (3S),
.BR varargs (3),
.BR vprintf (3S)
.SH BUGS
Very wide fields (>128 characters) fail.
rintf, sprintf \- formatted output conversion
.SH SYNOPSIS
.LP
.nf
.B #include <stdio.h>
.B "int printf(format [ , arg ] \&.\|.\|. )"
.B char *format;
.fi
.LP
.nf
.B "int fprintf(stream, format [ , arg ] \&.\|.\|. )"
.B \s-1FILE\s0 *stream;
.B char *format;
.fi
.LP
.nf
.B "char *sprintf(s, format [ , arg ] \&.\|.\|. )"
.B char *s, *format;
.fi
.LP
.nf
.B #include <varargs.h>
.B int _doprnt(format, a./share/man/man3/printf.3v                                                                             755       0      12        25105  4424741307  10507                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)printf.3v 1.19 89/03/27 SMI; from UCB 4.3 and S5R3
.TH PRINTF 3V "22 March 1989"
.SH NAME
printf, fprintf, sprintf \- formatted output conversion
.SH SYNOPSIS
.LP
.nf
.B #include <stdio.h>
.B "int printf(format [ , arg ] \&.\|.\|. )"
.B char *format;
.fi
.LP
.nf
.B "int fprintf(stream, format [ , arg ] \&.\|.\|. )"
.B \s-1FILE\s0 *stream;
.B char *format;
.fi
.LP
.nf
.B "int sprintf(s, format [ , arg ] \&.\|.\|. )"
.B char *s, *format;
.fi
.LP
.nf
.B #include <varargs.h>
.B int _doprnt(format, args, stream)
.B char \(**format;
.B va_list args;
.B \s-1FILE\s0 \(**stream;
.fi
.SH DESCRIPTION
.IX  "printf function V"  ""  "\fLprintf\fP \(em format to stdout, System V"
.IX  "fprintf function V"  ""  "\fLfprintf\fP \(em format to stream, System V"
.IX  "sprintf function V"  ""  "\fLsprintf\fP \(em format to string, System V"
.IX  stream  "printf V"  ""  "\fLprintf\fP \(em format to stdout, System V"
.IX  stream  "fprintf V"  ""  "\fLfprintf\fP \(em format to stream, System V"
.IX  stream  "sprintf V"  ""  "\fLsprintf\fP \(em format to string, System V"
.IX  "stream, formatted output"  "printf V"  ""  "\fLprintf\fP \(em format to stdout, System V"
.IX  "stream, formatted output"  "fprintf V"  ""  "\fLfprintf\fP \(em format to stream, System V"
.IX  "stream, formatted output"  "sprintf V"  ""  "\fLsprintf\fP \(em format to string, System V"
.IX  "output conversion"  "printf V"  ""  "\fLprintf\fP \(em convert to stdout, System V"
.IX  "output conversion"  "fprintf V"  ""  "\fLfprintf\fP \(em convert to stream, System V"
.IX  "output conversion"  "sprintf V"  ""  "\fLsprintf\fP \(em convert to string, System V"
.IX  stream  "output conversion V"  "" "output conversion, System V \(em \fLprintf\fP"
.IX  stdout  "output conversion V"  "" "output conversion, System V \(em \fLprintf\fP"
.IX  string  "number conversion V"  string  "number conversion, System V \(em \fLprintf\fP"
.IX  "write formatted"  "printf V"  ""  "\fLprintf\fP \(em convert to stdout, System V"
.IX  "write formatted"  "fprintf V"  ""  "\fLfprintf\fP \(em convert to stream, System V"
.IX  "write formatted"  "sprintf V"  ""  "\fLsprintf\fP \(em convert to string, System V"
.IX  "convert numbers to strings, System V"  ""  "convert numbers to strings, System V \(em \fLsprintf\fR"
.B printf(\|)
places output on the standard output stream
.BR stdout .
.B fprintf(\|)
places output on the named output
.BR stream .
.B sprintf(\|)
places ``output'',
followed by the
.SM NULL
character
.RB ( \e0 ),
in consecutive bytes starting at
.RI \(** s ;
it is the user's responsibility to ensure that
enough storage is available.
.BR printf ,
.B fprintf(\|)
and
.B sprintf(\|)
return the number of characters
transmitted (excluding the
.SM NULL
character in the case of
.BR sprintf ).
.LP
If an output error is encountered
.BR printf ,
.B fprintf(\|)
and
.B sprintf(\|)
return
.SM EOF.
.LP
Each of these functions converts, formats, and prints its
.IR arg s
under control of the
.IR format .
The
.I format
is a character string which contains
two types of objects:
plain characters, which are simply copied
to the output stream, and
conversion specifications, each of which
causes conversion and printing of zero or more
.IR arg s.
The results are undefined if there are insufficient
.IR arg s
for the format.  If the format is exhausted while
.IR arg s
remain, the excess
.IR arg s
are simply ignored.
.LP
Each conversion specification is introduced
by the character
.BR % .
After the
.BR % ,
the following appear in sequence:
.LP
.RS
Zero or more
.IR flags ,
which modify the meaning of
the conversion specification.
.LP
An optional decimal digit string specifying a minimum
.IR "field width" .
If the converted value has fewer characters
than the field width,
it will be padded on the left (or right,
if the left-adjustment flag
.RB ` \- ',
described below, has been
given) to the field width.
The padding is with blanks unless the
field width digit string
starts with a zero, in which case the
padding is with zeros.
.LP
A
.I precision
that gives the minimum number of digits to appear for the
.BR d ,
.BR i ,
.BR o ,
.BR u ,
.BR x ,
or
.B X
conversions,
the number of digits to appear after the
decimal point for the
.BR e ,
.BR E ,
and
.B f
conversions, the maximum number of
significant digits for the
.B g
and
.B G
conversion,
or the maximum number of characters
to be printed from a string in
.B s
conversion.
The precision takes the form of a period
.RB ( \&. )
followed by a decimal digit string; a
.SM NULL
digit string is treated as zero.
Padding specified  by the precision overrides
the padding specified by the field width.
.LP
An optional
.B l
(ell) specifying that a following
.BR d ,
.BR i ,
.BR o ,
.BR u ,
.BR x ,
or
.B X
conversion character applies to a long integer
.IR arg .
An
.B l
before any other conversion character is ignored.
.LP
A character that indicates the type of
conversion to be applied.
.RE
.LP
A field width or precision or both may be
indicated by an asterisk
.RB ( \(** )
instead of a digit string.
In this case, an integer
.I arg
supplies
the field width or precision.  The
.I arg
that is actually converted is not fetched until
the conversion letter is seen, so the
.IR arg s
specifying field width or precision must appear
.I before
the
.I arg
(if any) to be converted.
A negative field width argument is taken as a
.RB ` \- '
flag followed by a positive field width.
If the precision argument is negative,
it will be changed to zero.
.LP
The flag characters and their meanings are:
.PD 0
.TP 10
.B \-
The result of the conversion will be left-justified within the field.
.TP
.B +
The result of a signed
conversion will always begin with a sign
.RB ( +
or
.BR \- ).
.TP
blank
If the first character of a signed
conversion is not a sign, a blank
will be prefixed to the result.
This implies that if the blank and
.B +
flags both appear, the blank flag will be ignored.
.TP
.B #
This flag specifies that the value is to be converted
to an ``alternate form.''\
For
.BR c ,
.BR d ,
.BR i ,
.BR s ,
and
.B u
conversions, the flag has no effect.  For
.B o
conversion, it increases the precision to force
the first digit of the result to be a zero.  For
.B x or X
conversion, a non-zero result will have
.B 0x or 0X
prefixed to it.  For
.BR e ,
.BR E ,
.BR f ,
.BR g ,
and
.B G
conversions, the result will always
contain a decimal point,
even if no digits follow the point (normally,
a decimal point appears in the result of
these conversions only if a digit follows it).  For
.B g
and
.B G
conversions, trailing zeroes will
.I not
be removed from the result
(which they normally are).
.PD
.LP
The conversion characters and their meanings are:
.LP
.PD 0
.TP 10
.B d\fP,\fBi\fP,\fBo\fP,\fBu\fP,\fBx\fP,\fBX
The integer
.I arg
is converted to signed decimal
.RB ( d
or
.BR i ),
unsigned octal
.RB ( o ),
unsigned decimal
.RB ( u ),
or unsigned hexadecimal notation
.RB ( x
and
.BR X ),
respectively; the letters
.B abcdef
are used for
.B x
conversion and the letters
.SB ABCDEF
for
.B X
conversion.
The precision specifies the minimum number of digits
to appear; if the value being converted can
be represented
in fewer digits, it will be expanded with leading zeroes.
(For compatibility with older versions,
padding with leading zeroes may alternatively
be specified by prepending a zero to the field width.
This does not imply an octal value for the field width.)
The default precision is 1.
The result of converting a zero value with a precision
of zero is a
.SM NULL
string.
.TP
.B f
The float or double
.I arg
is converted to decimal notation in the style
\&``[\fB\-\fR]ddd\fB.\fRddd''
where the number of digits after the decimal point
is equal to the precision specification.
If the precision is missing, 6 digits are given;
if the precision is explicitly 0, no digits and
no decimal point are printed.
.TP
.BR e , E
The float or double
.I arg
is converted in the style
``[\fB\-\fR]d\fB.\fRddd\fBe\(+-\fRddd,''
where there is one digit before the decimal point and
the number of digits after it is equal
to the precision; when the precision is missing,
6 digits are produced; if the precision
is zero, no decimal point appears.  The
.B E
format code will produce a number with
.B E
instead of
.B e
introducing the exponent.
The exponent always contains at least two digits.
.TP
.BR g , G
The float or double
.I arg
is printed in style
.B f
or
.B e
(or in style
.B E
in the case of a
.B G
format code),
with the precision specifying the number
of significant digits.
The style used depends on the value converted:
style
.B e
or
.B E
will be used only if the exponent resulting from
the conversion is less than \-4 or greater
than the precision.  Trailing zeroes are
removed from the result; a decimal point
appears only if it is followed by a digit.
.PD
.LP
The
.BR e ,
.BR E ,
.BR f ,
.BR g,
and
.BR G
formats print
.SM IEEE
indeterminate values (infinity or not-a-number) as ``Infinity'' or ``NaN''
respectively.
.LP
.PD 0
.TP 10
.B c
The character
.I arg
is printed.
.TP
.B s
The
.I arg
is taken to be a string (character pointer)
and characters from the string are printed until a
.SM NULL
character
.RB ( \e0 )
is encountered or until the number
of characters indicated by the precision
specification is reached.
If the precision is missing, it is taken
to be infinite, so all characters up to the first
.SM NULL
character are printed.  A
.SM NULL
value for
.I arg
will yield undefined results.
.TP
.B %
Print a
.BR % ;
no argument is converted.
.PD
.LP
In no case does a non-existent or small
field width cause truncation of a field;
if the result of a conversion is wider
than the field width, the field is simply
expanded to contain the conversion result.
Padding takes place only if the specified field
width exceeds the actual width.  Characters generated by
.B printf(\|)
and
.B fprintf(\|)
are printed as if
.BR putc (3S)
had been called.
.SH EXAMPLES
To print a date and time in the form ``Sunday, July 3, 10:02,'' where
.I weekday
and
.I month
are pointers to
.SM NULL\s0-terminated
strings:
.RS
.LP
.nf
.B
printf("%s,\ %s\ %i,\ %d:%.2d",\ weekday,\ month,\ day,\ hour,\ min);
.fi
.RE
.LP
To print
.if n .I pi
.if t \(*p
to 5 decimal places:
.RS
.LP
.B
printf("pi \|= \|%.5f", \|4 \(** atan(1. 0));
.RE
.SH NOTE
These routines call
.BR _doprnt ,
which is an implementation-dependent routine.
Each uses the variable-length argument facilities of
.BR varargs (3).
Although it is possible to use
.B _doprnt
to take a list of arguments and pass them on to a routine like
.BR printf ,
not all implementations have such a routine.
We strongly recommend that you use the routines described in
.BR vprintf (3S)
instead.
.SH "SEE ALSO"
.BR econvert (3),
.BR printf (3S),
.BR putc (3S),
.BR scanf (3V),
.BR varargs (3),
.BR vprintf (3S)
.SH BUGS
Very wide fields (>128 characters) fail.
(em convert to string, System V"
.IX  stream  "output conversion V"  "" "output conversion, System V \(em \fLprintf\fP"
.IX  stdout  "output conversion V"  "" "output conversion, System V \(em \fLprintf\fP"
.IX  string  "number conversion V"  string  "number conversion, System V \(em \fLprintf\fP"
.IX  "write formatted"  "printf V"  ""  "\fLprintf\fP \(em convert to stdout, System V"
.IX  "write formatted"  "fprintf V"  ""  "\fLfprintf\fP ./share/man/man3/printw.3x                                                                             755       0      12           70  4424741307  10444                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)printw.3x 1.5 89/03/27 SMI; 
psignal.3  3  8  
}  	public.3r  p  8  
~  publickey.3r  8  8  
  putc.3s   8  
  
putchar.3s    8  
  putenv.3 s    9  
  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3 s   9P  
  qsort.3   9h  
  quiet_nan.3m  9h  9x  
  rand.3c   9  
  rand.3v   9  
  random.3 3v   9  
  raw.3v 3  9  
  raw.3x .  9  
  rcmd.3n   9  
  	re_comp.3 n   :   
  	re_exec.3 n   :  
  	read./share/man/man3/prof.3                                                                                755       0      12         3263  4424741307   7746                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)prof.3 1.7 89/03/27 SMI; from  S5
.TH PROF 3 "6 October 1987"
.SH NAME
prof \- profile within a function
.SH SYNOPSIS
.LP
.nf
.B #define \s-1MARK\s+1
.B #include <prof.h>
.LP
.B void \s-1MARK\s+1 (name)
.fi
.SH DESCRIPTION
.IX "prof" "" "\fLprof\fR \(em profile within a function"
.IX "profiling, within a function" "" "\fLprof\fR"
.SM MARK
will introduce a mark called
.I name
that will be treated
the same as a function entry point.
Execution of the
mark will add to a counter for that mark, and
program-counter time spent will be accounted to the
immediately preceding mark or to the function if
there are no preceding marks within the active function.
.LP
.I name
may be any combination of up to six letters, numbers or
underscores.  Each
.I name
in a single compilation must be unique, but may be the same as
any ordinary program symbol.
.LP
For marks to be effective, the symbol
.SM MARK
must be defined before the header file
.B <prof.h>
is included.  This may be defined by a
preprocessor directive as in the synopsis, or by a command
line argument, such as:
.RS
.LP
.B cc \-p \-\s-1DMARK\s+1 foo.c
.RE
.LP
If
.SM MARK
is not defined, the
.SM MARK
.RB ( name )
statements may be left in the source files
containing them and will be ignored.
.SH EXAMPLE
In this example, marks
can be used to determine how much time is spent in each loop.
Unless this example is compiled with
.SM MARK
defined on the command line, the
marks
are ignored.
.IP
.ft B
.nf
#include <prof.h>
func( )
{
	int i, j;
	.
	.
	.
 	\s-1MARK\s+1 (loop1);
	for (i = 0; i < 2000; i++) {
		. . .
	}
 	\s-1MARK\s+1 (loop2);
	for (j = 0; j < 2000; j++) {
		. . .
	}
}
.fi
.ft R
.SH SEE ALSO
.BR prof (1),
.BR profil (2),
.BR monitor (3)
(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setg./share/man/man3/psignal.3                                                                             755       0      12         2743  4424741307  10437                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)psignal.3 1.12 89/03/27 SMI; from UCB 4.2
.TH PSIGNAL 3 "22 November 1987"
.SH NAME
psignal, sys_siglist \- system signal messages
.SH SYNOPSIS
.nf
.B psignal(sig, s)
.B unsigned sig;
.B char *s;
.LP
.B char *sys_siglist[\|];
.fi
.IX  "psignal function"  ""  "\fLpsignal\fP \(em system signal messages"
.IX  "sys_siglist function"  ""  "\fLsys_siglist\fP \(em system signal messages"
.IX  "system signal messages"  psignal  ""  "\fLpsignal\fP"
.IX  "system signal messages"  sys_siglist  ""  "\fLsys_siglist\fP"
.IX  "signal messages"  psignal  "" "\fLpsignal\fP"
.IX  "signal messages"  sys_siglist "" "\fLsys_siglist\fP"
.IX  messages  "system signal"
.SH DESCRIPTION
.B psignal(\|)
produces a short message
on the standard error file
describing the indicated signal.
First the argument string
.I s
is printed, then a colon, then the name of the signal
and a
.SM NEWLINE\s0.
Most usefully, the argument string is the name
of the program which incurred the signal.
The signal number should be from among those found
in
.BR <signal.h> .
.LP
To simplify variant formatting
of signal names, the vector of message strings
.B sys_siglist(\|)
is provided;
the signal number
can be used as an index in this table to get the
signal name without the newline.
The define
.SB NSIG
defined in
.B <signal.h>
is the number of messages provided for in the table;
it should be checked because new
signals may be added to the system before
they are added to the table.
.SH "SEE ALSO"
.BR perror (3),
.BR signal (3)
  scanw.3v  =  =  
  ./share/man/man3/public.3r                                                                             755       0      12           72  4424741307  10373                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)public.3r 1.3 89/03/27 SMI;

  putc.3s   8  
  
putchar.3s    8  
  putenv.3 s   9  
  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3 s   9P  
  qsort.3   9h  
  quiet_nan.3m  9h  9x  
  rand.3c   9  
  rand.3v   9  
  random.3 3v   9  
  raw.3v 3  9  
  raw.3x .  9  
  rcmd.3n   9  
  	re_comp.3 n   :   
  	re_exec.3 9  :  
  	readdir.3 :   :(  
  	realloc.3 :  :<  
  
realpath.3 (  :P  
  
./share/man/man3/publickey.3r                                                                          755       0      12         2330  4424741307  11143                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)publickey.3r 1.10 89/03/27 SMI;
.TH PUBLICKEY 3R  "22 March 1989"
.SH NAME
publickey, getpublickey, getsecretkey \- get public or secret key
.SH SYNOPSIS
.nf
.B #include <rpc/rpc.h>
.B #include <rpc/key_prot.h>
.LP
.B getpublickey(netname, publickey)
.B	char netname[\s-1MAXNETNAMELEN\s0+1];
.B	char publickey[\s-1HEXKEYBYTES\s0+1];
.LP
.B getsecretkey(netname, secretkey, passwd)
.B	char netname[\s-1MAXNETNAMELEN\s0+1];
.B	char secretkey[\s-1HEXKEYBYTES\s0+1];
.B	char *passwd;
.fi
.SH DESCRIPTION
.IX "getpublickey function" "" "\fLgetpublickey()\fP function"
.IX "getsecretkey function" "" "\fLgetsecretkey()\fP function"
These routines are used to get public and secret keys from the
.SM YP
database.
.B getsecretkey(\|)
has an extra argument,
.IR passwd ,
which is used to decrypt the encrypted secret key stored in the database.
Both routines return 1 if they are successful in finding the key, 0 otherwise.
The keys are returned as
.SM NULL\s0-terminated,
hexadecimal strings. If the password supplied to
.B getsecretkey(\|)
fails to decrypt the secret key, the routine will return 1 but the
.I secretkey
argument will be a
.SM NULL
string.
.SH "SEE ALSO"
.BR publickey (5)
.LP
.I \s-1RPC\s0 Programmer's Manual
in
.TX NETP
h>
.LP
.B getpublickey(netname, publickey)
.B	char netname[\s-1MAXNETNAMELEN\s0+1];
.B	char publickey[\s-1HEXKEYBYTES\s0+1];
.LP
.B getsecretkey(netname, secretkey, passwd)
.B	char netname[\s-1MAXNETNAMELEN\s0+1];
.B	char secretkey[\s-1HEXKEYBYTES\s0+1];
.B	char *passwd;
.fi
.SH DESCRIPTION
.IX ./share/man/man3/putc.3s                                                                               755       0      12         7603  4424741310  10132                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)putc.3s 1.16 89/03/27 SMI; from UCB 4.3
.TH PUTC 3S "10 October 1987"
.SH NAME
putc, putchar, fputc, putw \- put character or word on a stream
.SH SYNOPSIS
.LP
.B #include <stdio.h>
.LP
.nf
.B int putc(c, stream)
.B char c;
.B "\s-1FILE\s0 \(**stream;"
.fi
.LP
.nf
.B int putchar(c)
.B char c;
.fi
.LP
.nf
.B int fputc(c, stream)
.B char c;
.B "\s-1FILE\s0 \(**stream;"
.fi
.LP
.nf
.B int putw(w, stream)
.B int w;
.B "\s-1FILE\s0 \(**stream;"
.fi
.SH DESCRIPTION
.IX  "put character to stream putc"  "" "put character to stream \(em \fLputc\fP"
.IX  "put character to stream fputc"  "" "put character to stream \(em \fLfputc\fP"
.IX  "put character to stdout"  "" "put character to stdout \(em \fLputchar\fP"
.IX  "put word to stream"  ""  "put word to stream \(em \fLputw\fP"
.IX  stream  "put character to putc"  stream  "put character to \(em \fLputc\fP"
.IX  stream  "put character to fputc"  stream  "put character to \(em \fLfputc\fP"
.IX  stdout  "put character to"  stdout  "put character to \(em \fLputchar\fP"
.IX  stream  "put word to"  stream  "put word to \(em \fLputw\fP"
.IX  "putc macro"  ""  "\fLputc\fP \(em put character on stream"
.IX  "putchar macro"  ""  "\fLputchar\fP \(em put character on stdout"
.IX  "fputc function"  ""  "\fLfputc\fP \(em put character on stream"
.IX  "putw macro"  ""  "\fLputw\fP \(em put word on stream"
.IX  character  "put to stream putc"  ""  "put to stream \(em \fLputc\fP"
.IX  character  "put to stdin"  ""  "put to stdin \(em \fLputchar\fP"
.IX  character  "put to stream fputc"  ""  "put to stream \(em \fLfputc\fP"
.IX  word  "put to stream"  word  "put to stream \(em \fLputw\fP"
.LP
.B putc(\|)
writes the character
.I c
onto the standard I/O output stream
.I stream
(at the position where the file pointer, if defined,
is pointing).
It returns the character written.
.LP
.BR putchar ( c )
is defined as
.BR putc ( c ,
.BR stdout ).
.B putc(\|)
and
.B putchar(\|)
are macros.
.LP
.B fputc(\|)
behaves like
.BR putc ,
but is a function rather than a macro.
.B fputc(\|)
runs more slowly than
.BR putc ,
but it takes less space per invocation and its name can be
passed as an argument to a function.
.LP
.B putw(\|)
writes the C
.B int
(word)
.B w
to the standard I/O output stream
.I stream
(at the position of the file pointer, if defined).
The size of a word is the size of an integer and
varies from machine to machine.
.B putw(\|)
neither assumes nor causes special alignment in the file.
.LP
Output streams are by default buffered if the output refers to a file
and line-buffered if the output refers to a terminal.
When an output stream is unbuffered,
information is queued for writing on the
destination file or terminal as soon as written;
when it is buffered,
many characters are saved up and written as a block.
When it is line-buffered,
each line of output is queued for writing on the
destination terminal as soon as the line is completed
(that is, as soon as a
.SM NEWLINE
character is written
or terminal input is requested).
.BR setbuf (3S),
.BR setbuffer ,
or
.B setvbuf
may be used to change the
stream's buffering strategy.
.SH "SEE ALSO"
.BR fclose (3S),
.BR ferror (3S),
.BR fopen (3S),
.BR fread (3S),
.BR getc (3S),
.BR printf (3S),
.BR puts (3S),
.BR setbuf (3S),
.SH DIAGNOSTICS
.LP
On success,
.BR putc ,
.BR fputc ,
and
.BR putchar
return the value that was written.
On error, those functions return the constant
.SM
.BR EOF .
.B putw(\|)
returns
.BR ferror(stream) ,
so that it returns 0 on success and 1 on failure.
.SH BUGS
.LP
Because it is implemented as a macro,
.B putc(\|)
treats a
.I stream
argument with side effects improperly.  In particular,
.B putc(c, *f++);
does not work sensibly.
.B fputc(\|)
should be used instead.
.LP
Errors can occur long after the call to
.BR putc .
.LP
Because of possible differences in word length and byte ordering,
files written using
.B putw(\|)
are machine-dependent,
and may not be read using
.B getw(\|)
on a different processor.
ich case the
padding is with zeros.
.LP
A
.I precision
that gives the minimum number of digits to appear for the
.BR d ,
.BR ./share/man/man3/putchar.3s                                                                            755       0      12           66  4424741310  10561                                                                                                                                                                                                                                                                                                                                                                      .so man3/putc.3s
.\" @(#)putchar.3s 1.4 89/03/27 SMI;

  
putpwent.3   9  
  puts.3s   9,  
  putw.3s   9@  
  	pwdauth.3 9@  9P  
  qsort.3   9h  
  quiet_nan.3m  
  9x  
  rand.3c   9  
  rand.3v   9  
  random.3  9  9  
  raw.3v d  9  
  raw.3x d  9  
  rcmd.3n   9  
  	re_comp.3 9  :   
  	re_exec.3 :   :  
  	readdir.3 :  :(  
  	realloc.3 :(  :<  
  
realpath.3 <  :P  
  
refresh.3v P  :d  
  
refresh.3x d  :t  
  regex.3   :  
  rege./share/man/man3/putenv.3                                                                              755       0      12         3114  4424741310  10306                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)putenv.3 1.11 89/03/27 SMI; from S5
.TH PUTENV 3 "22 March 1989"
.SH NAME
putenv \- change or add value to environment
.SH SYNOPSIS
.nf
.B int putenv(string)
.B char \(**string;
.fi
.SH DESCRIPTION
.IX  "putenv function"  ""  "\fLputenv\fP \(em set environment value"
.IX  set "environment value \(em \fLputenv\fP"
.IX  environment  "set value"  ""  "set value \(em \fLputenv\fP"
.LP
.I string
points to a string of the form
.RI ` name
.B =
.IR value '
.B putenv(\|)
makes the value of the environment variable
.I name
equal to
.I value
by altering an existing variable or creating a new one.
In either case, the string pointed to by
.I string
becomes part of the
environment, so altering the string will change the environment.
The space used by
.I string
is no longer used once a new string-defining
.I name
is passed to
.BR putenv .
.SH SEE ALSO
.BR execve (2),
.BR getenv (3),
.BR malloc (3),
.BR environ (5V).
.SH DIAGNOSTICS
.LP
.B putenv(\|)
returns non-zero
if it was unable to obtain enough space using
.BR malloc (3)
for an expanded environment,
otherwise zero.
.SH WARNINGS
.LP
.B putenv(\|)
manipulates the environment pointed to by
.IR environ ,
and can be used in conjunction with
.BR getenv .
However,
.I envp
(the third argument to
.IR main )
is not changed.
.LP
This routine uses
.BR malloc (3)
to enlarge the environment.
.LP
After
.B putenv(\|)
is called, environmental variables are not in
alphabetical order.
.LP
A potential error is to call
.B putenv(\|)
with an automatic variable
as the argument, then exit the calling function while
.I string
is still part of the environment.


dir.3 >(  >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v >t  >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 
  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v ?   ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  
  ?  
  	setjmp.3v ?  ?  
./share/man/man3/putpwent.3                                                                            755       0      12         2316  4424741310  10656                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)putpwent.3 1.8 89/03/27 SMI; from S5
.TH PUTPWENT 3 "6 October 1987"
.SH NAME
putpwent \- write password file entry
.SH SYNOPSIS
.nf
.B #include <pwd.h>
.LP
.B int putpwent(p, f)
.B struct passwd \(**p;
.B \s-1FILE\s+1 \(**f;
.fi
.SH DESCRIPTION
.IX  "putpwent function"  ""  "\fLputpwent\fP \(em add password file entry"
.IX  "add password file entry \(em \fLputpwent\fP"
.IX  "password file"  "add entry putpwent"  ""  "add entry \(em \fLputpwent\fP"
.B putpwent(\|)
is the inverse of
.BR getpwent (3).
Given a pointer to a passwd
structure created by
.B getpwent(\|)
(or
.B getpwuid(\|)
or
.BR getpwnam ),
.B putpwent(\|)
writes a line on the stream
.IR f ,
which matches the format of lines in the password file
.BR /etc/passwd .
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.PD
.SH "SEE ALSO"
.BR getpwent (3)
.SH DIAGNOSTICS
.B putpwent(\|)
returns non-zero if an error was
detected during its operation,
otherwise zero.
.SH WARNING
The above routine uses
.BR <stdio.h> ,
which increases the size of programs,
not otherwise using standard I/O, more
than might be expected.
.SH BUGS
This routine is of limited utility, since most password files are maintained
as Yellow Pages files, and cannot be updated with this routine.
**p;
.B \s-1FILE\s+1 \(**f;
.fi
.SH DESCRIPTION
.IX  "putpwent function"  ""  "\fLputpwent\fP \(em add password file entry"
.IX  "add password file entry \(em \fLputpwent\fP"
.IX  "password file"  "add entry putpwent"  ""  "add entry \(em \fLputpwent\fP"
.B putpwent(\|)
is the inverse of
.BR getpwent (3)../share/man/man3/puts.3s                                                                               755       0      12         2750  4424741310  10150                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)puts.3s 1.12 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH PUTS 3S  "6 October 1987"
.SH NAME
puts, fputs \- put a string on a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B puts(s)
.B char *s;
.LP
.B fputs(s, stream)
.B char *s;
.B \s-1FILE\s0 *stream;
.fi
.IX  "puts function"  ""  "\fLputs\fP \(em put string to stdout"
.IX  "put string to stdout"  ""  "put string to stdout \(em \fLputs\fP"
.IX  "put string to stream"  ""  "put string to stream \(em \fLfputs\fP"
.IX  stream  "put string to stdout"  stream  "put string to \(em \fLputs\fP"
.IX  stream  "put string to stream"  stream  "put string to \(em \fLfputs\fP"
.IX  "fputs function"  ""  "\fLfputs\fP \(em put string to stream"
.IX  "string operations"  "put to stdout"  ""  "put to stdout \(em \fLputs\fP"
.IX  "string operations"  "put to stream"  ""  "put to stream \(em \fLfputs\fP"
.SH DESCRIPTION
.B puts(\|)
writes the
.SM NULL\s0-terminated
string pointed to by
.IR s ,
followed by a
.SM NEWLINE
character, to the standard output stream
.BR stdout .
.LP
.B fputs(\|)
writes the
.SM NULL\s0-terminated
string pointed to by
.I s
to the named output
stream.
.LP
Neither function writes the terminal
SM NULL
character.
.SH DIAGNOSTICS
Both routines return
.SM EOF
on error. This will happen if
the routines try to write on a file that has not been opened for writing.
.SH NOTES
.B puts(\|)
appends a
.SM NEWLINE
while
.B fputs(\|)
does not.
.SH "SEE ALSO"
.BR ferror (3S),
.BR fopen (3S),
.BR fread (3S),
.BR printf (3S),
.BR putc (3S)
secret.3r 3   >(  
  ./share/man/man3/putw.3s                                                                               755       0      12           63  4424741311  10110                                                                                                                                                                                                                                                                                                                                                                      .so man3/putc.3s
.\" @(#)putw.3s 1.4 89/03/27 SMI;
  qsort.3   9h  
  quiet_nan.3m  
  9x  
  rand.3c   9  
  rand.3v   9  
  random.3  9  9  
  raw.3v    9  
  raw.3x 3  9  
  rcmd.3n   9  
  	re_comp.3 9  :   
  	re_exec.3 :   :  
  	readdir.3 :  :(  
  	realloc.3 :(  :<  
  
realpath.3 <  :P  
  
refresh.3v P  :d  
  
refresh.3x d  :t  
  regex.3   :  
  regexp.3  :  :  
  registerrpc.3n   :  
  remainder.3m  
  :  
  remexportent.3 ./share/man/man3/pwdauth.3                                                                             755       0      12         4060  4424741311  10443                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pwdauth.3 1.10 89/03/27 SMI
.TH PWDAUTH 3 "14 December 1987"
.SH NAME
pwdauth, grpauth \- password authentication routines
.SH SYNOPSIS
.LP
.nf
.B int pwdauth(user, password)
.B char *user;
.B char *password;
.fi
.LP
.nf
.B int grpauth(group, password)
.B char *group;
.B char *password;
.fi
.SH DESCRIPTION
.IX "pwdauth function" "" "\fLpwdauth()\fP function"
.IX "grpauth function" "" "\fLgrpauth()\fP function"
.LP
.B pwdauth(\|)
and
.B grpauth(\|)
determine whether the given guess at a
.I password
is valid for the given
.I user
or
.IR group .
If the
.I password
is valid, the functions return 0.
.LP
A
.I password
is valid if the password when encrypted matches the
encrypted password in the appropriate file.  For
.BR pwdauth ,
if the
.B password.adjunct
file exists, the encrypted password will be in
either the local or the Yellow Pages version of that file.
Otherwise, either the local or
.SM YP
.B passwd
file will be used.
For
.BR grpauth ,
the
.B group.adjunct
file (if it exists) or the
.B group
file (otherwise) will be checked on the local machine
and then using the
.SM YP\s0.
In all cases, the local files will be checked before the
.SM YP
files.
Also, if the adjunct files exist, the main file will never
be used for authentication even if they include encrypted passwords.
.LP
Both
.B pwdauth(\|)
and
.B grpauth(\|)
interface to the authentication daemon,
.BR rpc.pwdauthd ,
to do the checking of the adjunct files.
This daemon must be running on any system that
provides password authentication.
.SH FILES
.PD 0
.TP 20
.\" .B /etc/security/passwd.adjunct
.\" .TP
.\" .BI /var/yp/ domainname /passwd.adjunct.byname
.\" .TP
.B /etc/passwd
.\" .TP
.\" .BI /var/yp/ domainname /passwd.byname
.\" .TP
.\" .BI /var/yp/ domainname /passwd.byuid
.\" .TP
.\" .B /etc/security/group.adjunct
.\" .TP
.\" .BI /var/yp/ domainname /group.adjunct.byname
.TP
.B /etc/group
.\" .TP
.\" .BI /var/yp/ domainname /group.byname
.\" .TP
.\" .BI /var/yp/ domainname /group.byuid
.PD
.SH "SEE ALSO"
.BR getgraent (3),
.BR getgrent (3),
.BR getpwaent (3),
.BR getpwent (3),
.BR pwdauthd (8C)
  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  
 putw(\|)
writes the C
.B int
(word)
.B w
to the standard I/O output stream
.I stream
(at the position of the file pointer, if defined).
The size of a word is the size of an integer and
varies from machine to machine.
.B putw(\|)
neither assumes nor causes special alignment in the file.
.LP
Output streams are by default buffered if the output refers to a file
and line-buffered if the o./share/man/man3/qsort.3                                                                               755       0      12         3447  4424741311  10147                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)qsort.3 1.15 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH QSORT 3  "22 March 1989"
.SH NAME
qsort \- quicker sort
.SH SYNOPSIS
.nf
.B qsort(base, nel, width, compar)
.B char *base;
.B int (*compar)(\|);
.fi
.IX  "qsort function"  ""  "\fLqsort\fP \(em quicker sort"
.IX  "quicker sort"  ""  "quicker sort \(em \fLqsort\fP"
.IX  "sort quicker"  ""  "sort quicker \(em \fLqsort\fP"
.SH DESCRIPTION
.B qsort(\|)
is an implementation of the quicker-sort algorithm.
It sorts a table of data in place.
.LP
.I base
points to the element at the base of the table.
.I nel
is the number of elements in the table.
.I width
is the size, in bytes, of each element 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.
As the function must return an integer
less than, equal to, or greater than zero,
so must the first argument to be considered
be less than, equal to, or greater than the second.
.SH NOTES
.LP
The pointer to the base of the table should be
of type pointer-to-element,
and cast to type pointer-to-character.
.LP
The comparison function need not compare every byte,
so arbitrary data may be contained in the elements in addition to the values
being compared.
.LP
The order in the output of two items which compare as equal is unpredictable.
.SH "SEE ALSO"
.BR sort (1V),
.BR bsearch (3),
.BR lsearch (3),
.BR string (3)
.SH EXAMPLE
.LP
The following program sorts a simple array:
.RS
.ft B
.nf
static	int intcompare(i,j)
int *i, *j;
{ 
	return(*i \- *j);
}
.sp .5
main(\|)
{ 
	int a[10];
	int i;
.sp .5
	a[0] = 9;
	a[1] = 8;
	a[2] = 7;
	a[3] = 6;
	a[4] = 5;
	a[5] = 4;
	a[6] = 3;
	a[7] = 2;
	a[8] = 1;
	a[9] = 0;
.sp .5
	qsort(a,10,sizeof(int),intcompare)
.sp .5
	for (i=0; i<10; i++) printf(" %d",a[i]);
	printf "\n");
}
.fi
.ft $
.RE
\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  
  ?  
  	setjmp.3v ?  ?  
  setkey.3  ?  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @ (3),
.BR get./share/man/man3/quiet_nan.3m                                                                          755       0      12           77  4424741311  11073                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)quiet_nan.3m 1.3 89/03/27 SMI;
d.3v   9  
  random.3  9  9  
  raw.3v    9  
  raw.3x 3  9  
  rcmd.3n   9  
  	re_comp.3 9  :   
  	re_exec.3 :   :  
  	readdir.3 :  :(  
  	realloc.3 :(  :<  
  
realpath.3 <  :P  
  
refresh.3v P  :d  
  
refresh.3x d  :t  
  regex.3   :  
  regexp.3  :  :  
  registerrpc.3n   :  
  remainder.3m  
  :  
  remexportent.3   :  
  remque.3  :  :  
  
res_init.3   ;  
  
res_./share/man/man3/rand.3c                                                                               755       0      12         2457  4424741311  10066                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rand.3c 1.13 89/03/27 SMI; from UCB 6.2 9/29/85
.TH RAND 3C "6 October 1987"
.SH NAME
rand, srand \- simple random number generator
.SH SYNOPSIS
.nf
.B srand(seed)
.B int seed;
.LP
.B rand(\|)
.fi
.IX  "random number generator"  "\fLrand\fP"
.IX  "generate random numbers"  "\fLrand\fP"
.IX  "random number generator"  "\fLsrand\fP"
.IX  "generate random numbers"  "\fLsrand\fP"
.IX  "rand function"  ""  "\fLrand\fP \(em generate random numbers"
.IX  "srand function"  ""  "\fLsrand\fP \(em generate random numbers"
.SH DESCRIPTION
.B rand(\|)
uses a multiplicative congruential random number generator
with period
.if t 2\u\s-332\s0\d
.if n 2**32
to return successive pseudo-random
numbers in the range from 0 to
.if t 2\u\s-331\s10\d\(mi1.
.if n (2**31)\(mi1.
.LP
.B srand(\|)
can be called at any time to reset the random-number generator
to a random starting point.
The generator is initially seeded with a value of 1.
.SH NOTE
The spectral properties of
.B rand(\|)
leave a great deal to be desired.
.BR drand48 (3)
and
.BR random (3)
provide much better, though more elaborate, random-number generators.
.SH "SEE ALSO"
.BR drand48 (3),
.BR random (3),
.BR rand (3V)
.SH BUGS
The low bits of the numbers generated are not very random;
use the middle bits.
In particular the lowest bit alternates between 0 and 1.
scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r er  >(  
  seed48.3 t.3  ><  
  	seekdir.3 .3  >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s ta  >  
./share/man/man3/rand.3v                                                                               755       0      12         2562  4424741312  10107                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rand.3v 1.11 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH RAND 3V "6 October 1987"
.SH NAME
rand, srand \- simple random number generator
.SH SYNOPSIS
.nf
.B srand(seed)
.B int seed;
.LP
.B rand(\|)
.fi
.IX  "random number generator, System V"  "\fLrand\fP"
.IX  "generate random numbers, System V"  "\fLrand\fP"
.IX  "random number generator, System V"  "\fLsrand\fP"
.IX  "generate random numbers, System V"  "\fLsrand\fP"
.IX  "rand function V"  ""  "\fLrand\fP \(em generate random numbers, System V"
.IX  "srand function V"  ""  "\fLsrand\fP \(em generate random numbers, System V"
.SH DESCRIPTION
.B rand(\|)
uses a multiplicative congruential random number generator
with period
.if t 2\u\s-332\s0\d
.if n 2**32
to return successive pseudo-random
numbers in the range from 0 to
.if t 2\u\s-315\s10\d\(mi1.
.if n (2**15)\(mi1.
.LP
.B srand(\|)
can be called at any time to reset the random-number generator
to a random starting point.
The generator is initially seeded with a value of 1.
.SH NOTE
The spectral properties of
.B rand(\|)
leave a great deal to be desired.
.BR drand48 (3)
and
.BR random (3)
provide much better, though more elaborate, random-number generators.
.SH "SEE ALSO"
.BR drand48 (3),
.BR random (3),
.BR rand (3C)
.SH BUGS
The low bits of the numbers generated are not very random;
use the middle bits.
In particular the lowest bit alternates between 0 and 1.
>(  
  seed48.3  >(  ><  
  	seekdir.3 ><  >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s >t  >  
  	setbuf.3v >  >./share/man/man3/random.3                                                                              755       0      12        12061  4424741312  10270                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)random.3 1.17 89/03/27 SMI; from UCB 6.2 9/29/85
.TH RANDOM 3 "6 October 1987"
.SH NAME
random, srandom, initstate, setstate \- better random number generator; routines for changing generators
.SH SYNOPSIS
.B long  random(\|)
.LP
.nf
.B srandom(seed)
.B int  seed;
.fi
.LP
.nf
.B char  *initstate(seed, state, n)
.B unsigned  seed;
.B char  *state;
.B int  n;
.fi
.LP
.nf
.B char  *setstate(state)
.B char  *state;
.fi
.IX  "random function"  ""  "\fLrandom\fP \(em generate random number"
.IX  "srandom function"  ""  "\fLsrandom\fP \(em generate random number"
.IX  "initstate function"  ""  "\fLinitstate\fP \(em random number routines"
.IX  "setstate function"  ""  "\fLsetstate\fP \(em random number routines"
.IX  "random number generator"  "\fLrandom\fP"
.IX  "random number generator"  "\fLsrandom\fP"
.IX  "random number generator"  "\fLinitstate\fP"
.IX  "random number generator"  "\fLsetstate\fP"
.IX  "generate random numbers"  "\fLrandom\fP"
.IX  "generate random numbers"  "\fLsrandom\fP"
.IX  "generate random numbers"  "\fLinitstate\fP"
.IX  "generate random numbers"  "\fLsetstate\fP"
.SH DESCRIPTION
.LP
.B random(\|)
uses a non-linear additive feedback random number generator employing a
default table of size 31 long integers to return successive
pseudo-random numbers in the range from 0 to
.if t 2\u\s-231\s0\d\(mi1.
.if n (2**31)\(mi1.
The period of this random number generator is very large, approximately
.if t 16\(mu(2\u\s-231\s0\d\(mi1).
.if n 16*((2**31)\(mi1).
.LP
.BR random / srandom
have (almost) the same calling sequence and initialization properties as
.BR rand / srand .
The difference is that
.BR rand (3C)
produces a much less random sequence \(em in fact, the low dozen bits
generated by rand go through a cyclic pattern.  All the bits generated by
.B random(\|)
are usable.  For example,
.IP
.B random(\|)&01
.LP
will produce a random binary value.
.LP
Unlike
.BR srand ,
.B srandom(\|)
does not return the old seed; the reason for this is that the amount of
state information used is much more than a single word.  (Two other
routines are provided to deal with restarting/changing random number
generators).  Like
.BR rand (3C),
however,
.B random(\|)
will by default produce a sequence of numbers that can be duplicated by calling
.B srandom(\|)
with
.I 1
as the seed.
.LP
The
.B initstate(\|)
routine allows a state array, passed in as an argument, to be
initialized for future use.  The size of the state array (in bytes) is
used by
.B initstate(\|)
to decide how sophisticated a random number generator it should use \(em
the more state, the better the random numbers will be.  (Current
``optimal'' values for the amount of state information are 8, 32, 64,
128, and 256 bytes; other amounts will be rounded down to the nearest
known amount.  Using less than 8 bytes will cause an error).  The seed
for the initialization (which specifies a starting point for the random
number sequence, and provides for restarting at the same point) is also
an argument.
.B initstate(\|)
returns a pointer to the previous state information array.
.LP
Once a state has been initialized, the
.B setstate(\|)
routine provides for rapid switching between states.
.B setstate(\|)
returns a pointer to the previous state array; its argument state array
is used for further random number generation until the next call to
.B initstate(\|)
or
.BR setstate .
.LP
Once a state array has been initialized, it may be restarted at a
different point either by calling
.B initstate(\|)
(with the desired seed, the state array, and its size) or by calling both
.B setstate(\|)
(with the state array) and
.B srandom(\|)
(with the desired seed).  The advantage of calling both
.B setstate(\|)
and
.B srandom(\|)
is that the size of the state array does not have to be remembered
after it is initialized.
.LP
With 256 bytes of state information, the period of the random number
generator is greater than
.if t 2\u\s-269\s0\d,
.if n 2**69
which should be sufficient for most purposes.
.SH "SEE ALSO"
.BR rand (3C)
.br
.ne 10
.SH EXAMPLE
.RS
.ft B
/* Initialize and array and pass it in to initstate. */
.sp .5
static long state1[32] = {
	3,
	0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342,
	0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
	0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86,
	0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7,
	0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
	0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb,
	0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b,
	0xf5ad9d0e, 0x8999220b, 0x27fb47b9
	};
.sp .5
main()
{
	unsigned seed;
	int n;
.sp .5
	seed = 1; 
	n = 128;
	initstate(seed, state1, n);
.sp .5
	setstate(state1);
	printf("%d\n",random());
}
.ft R
.RE
.SH DIAGNOSTICS
If
.B initstate(\|)
is called with less than 8 bytes of state information, or if
.B setstate(\|)
detects that the state information has been garbled, error messages are
printed on the standard error output.
.SH BUGS
About 2/3 the speed of
.BR rand (3C).
sion letter is seen, so the
.IR arg s
specifying field width or precision must appear
.I before
the
.I arg
(if any) to be converted.
A negative field width argument is taken as a
.RB ` \- '
flag followed by a positive field width.
If the precision argument is negative,
it will be changed to zero.
.LP
The flag characters and their meanings are:
.PD 0
.TP 10
.B \-
The result of the conversion will be left-justified within the field.
.TP
.B +
The result of a sig./share/man/man3/raw.3v                                                                                755       0      12           64  4424741312   7707                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)raw.3v 1.4 89/03/27 SMI;
rcmd.3n   9  
  	re_comp.3 n   :   
  	re_exec.3 9  :  
  	readdir.3 :   :(  
  	realloc.3 :  :<  
  
realpath.3 (  :P  
  
refresh.3v <  :d  
  
refresh.3x P  :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v   ;d./share/man/man3/raw.3x                                                                                755       0      12           65  4424741312   7712                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)raw.3x 1.5 89/03/27 SMI; 
e_comp.3 9  :   
  	re_exec.3 :   :  
  	readdir.3 :  :(  
  	realloc.3 :(  :<  
  
realpath.3 <  :P  
  
refresh.3v P  :d  
  
refresh.3x d  :t  
  regex.3   :  
  regexp.3  :  :  
  registerrpc.3n   :  
  remainder.3m  
  :  
  remexportent.3   :  
  remque.3  :  :  
  
res_init.3   ;  
  
res_mkquery.3 
  ;$  
  
res_send.3 $  ;<  
  resetterm.3v  
  ;P  
  
resetty.3v P  ;d  
  
resetty.3x d./share/man/man3/rcmd.3n                                                                               755       0      12        10504  4424741312  10113                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rcmd.3n 1.19 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RCMD 3N "22 November 1987"
.SH NAME
rcmd, rresvport, ruserok \- routines for returning a stream to a remote command
.SH SYNOPSIS
.nf
.B "int rcmd(ahost, inport, locuser, remuser, cmd, fd2p)"
.B char \(**\(**ahost;
.B int inport;
.B "char \(**locuser, \(**remuser, \(**cmd;"
.B int \(**fd2p
.LP
.B int rresvport(port)
.B int \(**port;
.LP
.B "ruserok(rhost, super-user, ruser, luser)"
.B char \(**rhost;
.B int super-user;
.B char \(**ruser, \(**luser;
.fi
.IX  stream  "return to remote command \(em \fLrcmd\fR"
.IX  "return stream to remote command \(em \fLrcmd\fR"
.IX  command  "return stream to remote \(em \fLrcmd\fR"
.IX  "remote command, return stream to \(em \fLrcmd\fR"
.IX  "rcmd function"  ""  "\fLrcmd\fP \(em execute command remotely"
.IX  "rresvport function"  ""  "\fLrresvport\fP \(em get privileged socket"
.IX  "ruserok function"  ""  "\fLruserok\fP \(em authenticate user"
.SH DESCRIPTION
.LP
.B rcmd(\|)
is a routine used by the super-user to execute a command on
a remote machine using an authentication scheme based
on reserved port numbers.
.B rresvport(\|)
is a routine which returns a descriptor to a socket
with an address in the privileged port space.
.B ruserok(\|)
is a routine used by servers
to authenticate clients requesting service with
.BR rcmd .
All three functions are present in the same file and are used
by the
.BR rshd (8C)
server (among others).
.LP
.B rcmd(\|)
looks up the host
.I *ahost
using
.B gethostbyname
(see
.BR gethostent (3N)),
returning \-1 if the host does not exist.  Otherwise
.I *ahost
is set to the standard name of the host
and a connection is established to a server
residing at the well-known Internet port
.IR inport .
.LP
If the connection succeeds,
a socket in the Internet domain of type
.SB SOCK_STREAM
is returned to the caller, and given to the remote
command as its standard input (file descriptor 0)
and standard output (file descriptor 1). If
.I fd2p
is non-zero, then an auxiliary channel to a control
process will be set up, and a descriptor for it will be placed
in
.IR *fd2p .
The control process will return diagnostic
output from the command (file descriptor 2) on this channel, and will also
accept bytes on this channel as
signal numbers, to be
forwarded to the process group of the command.
If
.I fd2p
is 0, then the standard error (file descriptor 2) of the remote
command will be made the same as its standard output
and no
provision is made for sending arbitrary signals to the remote process,
although you may be able to get its attention by using out-of-band data.
.LP
The protocol is described in detail in
.BR rshd (8C).
.LP
The
.B rresvport(\|)
routine is used to obtain a socket with a privileged
address bound to it.  This socket is suitable for use
by
.B rcmd(\|)
and several other routines.  Privileged Internet ports are those
in the range 0 to 1023.  Only the super-user
is allowed to bind an address of this sort to a socket.
.LP
.B ruserok(\|)
takes a remote host's name, as returned by a
.B gethostbyaddr
(see
.BR gethostent (3N))
routine, two user names and a flag indicating whether
the local user's name is that of the super-user.  It then
checks the files
.B /etc/hosts.equiv
and, possibly,
.B .rhosts
in the local user's home directory to see if the request for
service is allowed.  A 0 is returned if the machine
name is listed in the
.B /etc/hosts.equiv
file, or the host and remote user name are found in the
.B .rhosts
file; otherwise
.B ruserok(\|)
returns \-1.  If the super-user
flag is 1, the checking of the
.B /etc/hosts.equiv
file is bypassed.
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.TP
.B .rhosts
.PD
.SH SEE ALSO
.BR rlogin (1C),
.BR rsh (1C),
.BR intro (2),
.BR gethostent (3N),
.BR rexec (3N),
.BR rexecd (8C),
.BR rlogind (8C),
.BR rshd (8C)
.SH DIAGNOSTICS
.LP
.B rcmd(\|)
returns a valid socket descriptor on success.
It returns \-1 on error and prints a diagnostic message on the standard error.
.LP
.B rresvport(\|)
returns a valid, bound socket descriptor on success.
It returns \-1 on error with the global value
.B errno
set according to the reason for failure.
The error code
.SM EAGAIN
is overloaded to mean \(lqAll network ports in use.\(rq
b1dbb0, 0xab5c5918, 0x946554fd,
	0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86,
	0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7,
	0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
	0xde3b81./share/man/man3/re_comp.3                                                                             755       0      12           65  4424741312  10355                                                                                                                                                                                                                                                                                                                                                                      .so man3/regex.3
.\" @(#)re_comp.3 1.4 89/03/27 SMI;
 
  	readdir.3 :  :(  
  	realloc.3 :(  :<  
  
realpath.3 <  :P  
  
refresh.3v P  :d  
  
refresh.3x d  :t  
  regex.3   :  
  regexp.3  :  :  
  registerrpc.3n   :  
  remainder.3m  
  :  
  remexportent.3   :  
  remque.3  :  :  
  
res_init.3   ;  
  
res_mkquery.3 
  ;$  
  
res_send.3 $  ;<  
  resetterm.3v  
  ;P  
  
resetty.3v P  ;d  
  
resetty.3x d  ;x  
  
resolver.3 x  ;  
  	rewi./share/man/man3/re_exec.3                                                                             755       0      12           65  4424741313  10344                                                                                                                                                                                                                                                                                                                                                                      .so man3/regex.3
.\" @(#)re_exec.3 1.4 89/03/27 SMI;
 
  	realloc.3 :  :<  
  
realpath.3 (  :P  
  
refresh.3v <  :d  
  
refresh.3x P  :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v   ;d  
  
resetty.3x P  ;x  
  
resolver.3 d  ;  
  	rewind.3s  x  ;  
  rewi./share/man/man3/readdir.3                                                                             755       0      12           72  4424741313  10342                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)readdir.3 1.5 89/03/27 SMI; 
 
realpath.3   :P  
  
refresh.3v (  :d  
  
refresh.3x <  :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v <  ;d  
  
resetty.3x   ;x  
  
resolver.3 P  ;  
  	rewind.3s  d  ;  
  rewinddir.3   ;  
  rex../share/man/man3/realloc.3                                                                             755       0      12           67  4424741313  10355                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)realloc.3 1.5 89/03/27 SMI; 
  
refresh.3v   :d  
  
refresh.3x (  :t  
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v <  ;d  
  
resetty.3x <  ;x  
  
resolver.3   ;  
  	rewind.3s  P  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n./share/man/man3/realpath.3                                                                            755       0      12         2736  4424741313  10601                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)realpath.3 1.10 89/03/27 SMI;
.TH REALPATH 3  "25 March 1989"
.SH NAME
realpath \- returns the canonicalized absolute pathname.
.SH SYNOPSIS
.PP
.nf
.B "#include <sys/param.h>"
.sp
.B char \(**realpath(file_name, resolved_name)
.B char \(**file_name;
.B char resolved_name[\s-1MAXPATHLEN\s0];
.fi
.SH DESCRIPTION
.IX "realpath function" "" "\fLrealpath()\fP function"
.B realpath(\|)
expands all symbolic links and resolves references to '/./', '/../'
and extra '/' characters in the null terminated string named by
.I file_name
and stores the canonicalized absolute pathname in the buffer named by
.IR resolved_name .
The resulting path will have no symbolic links components, nor
any '/./' or '/../' components.
.SH RETURN VALUE
If there is no error, it returns a pointer to the
.IR resolved_name.
.LP
Otherwise it returns a
.SM NULL
pointer and places in
.I resolved_name
the absolute pathname of the
.I file_name
component which could not be resolved. The global variable
.IR errno
is set to indicate the error. If any of the parameters are
.SM NULL,
.I errno
will be set to 
.SM EINVAL.
.B realpath(\|)
indirectly invokes the readlink(2) system call and getwd(3) library
call (for relative path names), and
.I errno
will be set by them.
.SH SEE ALSO
.BR readlink(2),
.BR getwd(3)
.SH WARNINGS
.LP
It indirectly invokes the readlink(2) system call and getwd(3) library call
(for relative path names), and hence inherits the possibility of hanging due
to inaccessible file system resources.
tgid.3 3   ?4  
  	setgid.3v  ./share/man/man3/refresh.3v                                                                            755       0      12           70  4424741313  10552                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)refresh.3v 1.4 89/03/27 SMI;
  regex.3   :  
  regexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v <  ;d  
  
resetty.3x <  ;x  
  
resolver.3 <  ;  
  	rewind.3s  <  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 r i  ;  
  rint.3m ./share/man/man3/refresh.3x                                                                            755       0      12           71  4424741314  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)refresh.3x 1.5 89/03/27 SMI; 
egexp.3 .3   :  
  registerrpc.3n   :  
  remainder.3m  :  :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v <  ;d  
  
resetty.3x <  ;x  
  
resolver.3 <  ;  
  	rewind.3s  <  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 r i  ;  
  rint.3m   <   
  
rnusers.3r  ./share/man/man3/regex.3                                                                               755       0      12         4066  4424741314  10112                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)regex.3 1.12 89/03/27 SMI; from UCB 4.2
.TH REGEX 3 "6 October 1987"
.SH NAME
regex, re_comp, re_exec \- regular expression handler
.SH SYNOPSIS
.nf
.B char *re_comp(s)
.B char *s;
.LP
.BR \fBre_exec (s)\fP
.B char *s;
.fi
.IX  "re_comp function"  ""  "\fLre_comp\fP \(em compile regular expression"
.IX  "re_exec function"  ""  "\fLre_exec\fP \(em execute regular expression"
.IX  "regular expressions"  compile  "regular expressions"  "compile \(em\fLre_comp\fP"
.IX  "regular expressions"  execute  "regular expressions"  "execute \(em \fLre_exec\fP"
.IX  "compile regular expression"  ""  "compile regular expression \(em \fLre_comp\fP"
.IX  "execute regular expression"  ""  "execute regular expression \(em \fLre_exec\fP"
.SH DESCRIPTION
.LP
.B re_comp(\|)
compiles a string into an internal form suitable for
pattern matching.
.B re_exec(\|) 
checks the argument string against the last string passed to
.BR re_comp .
.LP
.B re_comp(\|)
returns a
.SM NULL
pointer if the string
.I s
was compiled successfully; otherwise a string containing an
error message is returned.  If
.B re_comp(\|)
is passed 0 or a
.SM NULL
string, it returns without changing the currently
compiled regular expression.
.LP
.B re_exec(\|)
returns 1 if the string
.I s
matches the last compiled regular expression, 0 if the string
.I s
failed to match the last compiled regular
expression, and \-1 if the compiled
regular expression was invalid (indicating an internal error).
.LP
The strings passed to both
.B re_comp(\|)
and
.B re_exec(\|)
may have trailing or embedded
.SM NEWLINE
characters; they are terminated by
.SM NULL
characters.  The regular expressions recognized
are described in the manual entry for
.BR ed (1),
given the above difference.
.SH "SEE ALSO"
.BR ed (1),
.BR ex (1),
.BR grep (1V)
.SH DIAGNOSTICS
.LP
.B re_exec(\|)
returns \-1 for an internal error.
.LP
.B re_comp(\|)
returns one of the following strings if an error
occurs:
.TP
.B No previous regular expression
.TP
.B Regular expression too long
.TP
.B unmatched \e(
.TP
.B missing ]
.TP
.B too many \e(\e) pairs
.TP
.B unmatched \e)
 descriptor 0)
and standard output (file descriptor 1). If
.I fd2p
is non-zero, then an auxiliary channel to a control
process will be set up, and a descriptor for it will be placed
in
.IR *fd2p .
The control process will return diagnostic
output from the command (file descriptor 2) on this channel, and will also
accept bytes on this channel as
signal numbers, to be
forwarded to the process group of the command.
If
.I fd2p
is 0, then the standard error (./share/man/man3/regexp.3                                                                              755       0      12        20654  4424741314  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)regexp.3 1.18 89/03/27 SMI; from S5R2
.TH REGEXP 3 "20 January 1988"
.SH NAME
regexp \- regular expression compile and match routines
.SH SYNOPSIS
.B #define
.SB INIT
.B <declarations>
.br
.B #define
.SB GETC\*S(\|)
.B <getc code>
.br
.B #define
.SB PEEKC\*S(\|)
.B <peekc code>
.br
.B #define
.SB UNGETC\*S(c)
.B <ungetc code>
.br
.B #define
.SB RETURN\*S(pointer)
.B <return code>
.br
.B #define
.SB ERROR\*S(val)
.B <error code>
.LP
.B "#include <regexp.h>"
.LP
.B "char \(**compile(instring, expbuf, endbuf, eof)"
.br
.B "char \(**instring, \(**expbuf, \(**endbuf;"
.br
.B int eof;
.LP
.B "int step(string, expbuf)"
.br
.B "char \(**string, \(**expbuf;"
.LP
.B "extern char \(**loc1, \(**loc2, \(**locs;"
.LP
.B "extern int circf, sed, nbra;"
.SH DESCRIPTION
.IX regexp "" "\fLregexp\fR \(em regular expression compile and match routines"
.LP
This page describes general-purpose
regular expression matching routines.
.LP
The interface to this file is unpleasantly complex.
Programs that include this file must have
the following five macros declared before the
.RB ` "#include <regexp.h>" '
statement.  These macros are used by the
.I compile
routine.
.TP 20
.B \s-1GETC\s+1(\|)
Return the value of the next character
in the regular expression pattern.
Successive calls to
.B \s-1GETC\s+1(\|)
should return successive characters
of the regular expression.
.TP
.B \s-1PEEKC\s+1(\|)
Return the next character in the regular
expression.  Successive calls to
.B \s-1PEEKC\s+1(\|)
should return
the same character, which should also be the
next character returned by
.BR \s-1GETC\s+1(\|) .
.TP
.B \s-1UNGETC\s+1(\fIc\fB)
Returns the argument
.I c
by the next call to
.B \s-1GETC\s+1(\|)
or
.BR \s-1PEEKC\s+1(\|) .
No more that one character of pushback
is ever needed and this character is guaranteed
to be the last character read by
.BR \s-1GETC\s+1(\|) .
The value of the macro
.B \s-1UNGETC\s+1(\fIc\fB)
is always ignored.
.TP
.B \s-1RETURN\s+1(\fIpointer\fB)
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 that have
memory allocation to manage.
.SH ERRORS
.TP 20
.B \s-1ERROR\s+1(\fIval\fB)
This is the abnormal return from the
.B compile(\|)
routine.  The argument
.I val
is an error number
(see table below for meanings).
This call should never return.
.LP
.RS 20
.PD 0
.TP 10
ERROR
MEANING
.TP
11
Range endpoint too large.
.TP
16
Bad number.
.TP
25
``\fB\e\fP
digit'' out of range.
.TP
36
Illegal or missing delimiter.
.TP
41
No remembered search string.
.TP
42
.B \e(\| \e)
imbalance.
.TP
43
Too many
.BR \e( .
.TP
44
More than 2 numbers given in
.BR "\e{\| \e}" .
.TP
45
.B }
expected after
.BR \e .
.TP
46
First number exceeds second in
.BR "\e{\| \e}" .
.TP
49
.B [\|]
imbalance.
.TP
50
Regular expression too long.
.RE
.PD
.LP
The syntax of the
.B compile(\|)
routine is as follows:
.RS
.IP
.B compile(instring, expbuf, endbuf, eof)
.RE
.LP
The first parameter
.I instring
is never used explicitly by the
.B compile(\|)
routine but is useful
for programs that pass down different pointers
to input characters.
It is sometimes used in the
.B \s-1INIT\s+1(\|)
declaration (see below).
Programs that call functions to input characters or have
characters in an external array can pass down a value
of ((char \(**) 0) for this parameter.
.LP
The next parameter
.I expbuf
is a character pointer.
It points to the place where the compiled
regular expression will be placed.
.LP
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
.B \s-1ERROR\s+1(50)
is made.
.LP
The parameter
.I eof
is the character that marks
the end of the regular expression.
For example, in an editor like
.BR ed (1),
this character would usually a
.RB ` / '.
.LP
Each program that includes this file must have a
.B #define
statement for
.BR \s-1INIT\s+1(\|) .
This definition will be placed right after
the declaration for the function
.B compile(\|)
and
.RB ` { '
(opening curly brace).
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
.BR \s-1GETC\s+1(\|) ,
.BR \s-1PEEKC\s+1(\|) ,
and
.BR \s-1UNGETC\s+1(\|) .
Otherwise it can be used to declare external variables
that might be used by
.BR \s-1GETC\s+1(\|) ,
.BR \s-1PEEKC\s+1(\|) ,
and
.BR \s-1UNGETC\s+1(\|) .
See the example below of the declarations taken from
.BR grep (1V).
.LP
There are other functions in this file
that perform actual regular expression matching,
one of which is the function
.BR step(\|) .
The call to
.B step(\|)
is as follows:
.IP
.B step(string, expbuf)
.LP
The first parameter to
.B step(\|)
is a pointer to a string
of characters to be checked for a match.
This string should be
.SM NULL\s0-terminated.
.LP
The second parameter
.I expbuf
is the compiled regular expression
that was obtained by a call of the function
.IR compile .
.LP
The function
.B step(\|)
returns non-zero 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
.BR step(\|) .
The variable set in
.B 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
.BR advance(\|) ,
points to
the character after the last character that matches
the regular expression.  Thus if the regular
expression matches the entire line,
.B loc1
will point to the first character of
.I string
and
.B loc2
will point to the
.SM NULL
at the end of
.IR string .
.LP
.B step(\|)
uses the external variable
.B circf
which is set by
.B compile(\|)
if the regular expression begins with
.RB ` \s+2^\s0 '.
If this is set then
.B step(\|)
will try to match the regular expression to
the beginning of the string only.
If more than one regular expression is to be
compiled before the first is executed the value of
.B circf
should be saved for each compiled expression and
.B circf
should be set to that saved value before each call to
.BR step(\|) .
.LP
The function
.B advance(\|)
is called from
.B step(\|)
with the same arguments as
.BR step(\|) .
The purpose of
.B step(\|)
is to step through the
.I string
argument and call
.B advance(\|)
until
.B advance(\|)
returns non-zero 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,
.B step(\|)
need not be called; simply call
.BR advance(\|) .
.LP
When
.B advance(\|)
encounters a
.B \(**
or
.B \e{\| \e}
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 of the regular expression.
As long as there is no match,
.B advance(\|)
will back up along the
string until it finds a match or reaches the
point in the string that initially matched the
.B \(**
or
.BR "\e{\| \e}" .
It is sometimes desirable to stop this backing up before
the initial point in the string is reached.
If the external character pointer
.B locs
is equal to the point in the string
at sometime during the backing up process,
.B advance(\|)
will break out of the loop that backs
up and will return zero.
This could be used by an editor like
.BR ed (1)
or
.BR sed (1)
for substitutions done globally
(not just the first occurrence, but the whole line)
so, for example, expressions like
.B s/y\(**//g
do not loop forever.
.LP
The additional external variables
.BR sed " and " nbra
are used for special purposes.
.SH EXAMPLES
The following is an example of how the
regular expression macros and calls could
look in a command like
.BR grep (1V):
.RS
.nf
.ft B
#define \s-1INIT\s+1	register char \(**sp = instring;
#define \s-1GETC\s+1(\|)	(\(**sp\++)
#define \s-1PEEKC\s+1(\|)	(\(**sp)
#define \s-1UNGETC\s+1(c)	(\-\-sp)
#define \s-1RETURN\s+1(c)	return;
#define \s-1ERROR\s+1(c)	regerr(\|)
.LP
.ft B
#include <regexp.h>
\&.\|.\|.
.ta 8 16
 	 (void) compile(\(**argv, expbuf, &expbuf[\s-1ESIZE\s+1], \(fm\e0\(fm);
\&.\|.\|.
	if (step(linebuf, expbuf))
 		succeed (\|);
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /usr/include/regexp.h
.PD
.SH SEE ALSO
.BR ed (1),
.BR grep (1V),
.BR sed (1V)
.SH BUGS
.LP
The handling of
.B circf
is difficult.
r; if the value being converted can
be represented
in fewer digits, it will be expan./share/man/man3/registerrpc.3n                                                                        755       0      12           71  4424741314  11437                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)registerrpc.3n 1.4 89/03/27 SMI;
 :  
  remexportent.3   :  
  remque.3 3   :  
  
res_init.3   ;  
  
res_mkquery.3 ;  ;$  
  
res_send.3   ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v   ;d  
  
resetty.3x P  ;x  
  
resolver.3 d  ;  
  	rewind.3s  x  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r    ;  
  rindex.3  ;  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_func./share/man/man3/remainder.3m                                                                          755       0      12          102  4424741314  11066                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)remainder.3m 1.3 89/03/27 SMI;
 remque.3 ent  :  
  
res_init.3 3  ;  
  
res_mkquery.3    ;$  
  
res_send.3 .  ;<  
  resetterm.3v 3   ;P  
  
resetty.3v v  ;d  
  
resetty.3x .  ;x  
  
resolver.3 .  ;  
  	rewind.3s er  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n ex.  ;  
  rindex.3 .3n  ;  
  rint.3m   <   
  
rnusers.3r t  <  
  rpc.3n s  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  <D  <T  
  rpow./share/man/man3/remexportent.3                                                                        755       0      12           76  4424741315  11472                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)remexportent.3 1.3 89/03/27 SMI;
 
res_init.3 3  ;  
  
res_mkquery.3  3  ;$  
  
res_send.3 .  ;<  
  resetterm.3v 3 .  ;P  
  
resetty.3v v  ;d  
  
resetty.3x .  ;x  
  
resolver.3 .  ;  
  	rewind.3s er  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n ex.  ;  
  rindex.3 .3n  ;  
  rint.3m   <   
  
rnusers.3r t  <  
  rpc.3n s  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  <D  <T  
  rpow.3x   <h  
  	rquota.3r ow./share/man/man3/remque.3                                                                              755       0      12           66  4424741315  10233                                                                                                                                                                                                                                                                                                                                                                      .so man3/insque.3
.\" @(#)remque.3 1.5 89/03/27 SMI; 

  
res_mkquery.3  3  ;$  
  
res_send.3 .  ;<  
  resetterm.3v 3 .  ;P  
  
resetty.3v v  ;d  
  
resetty.3x .  ;x  
  
resolver.3 .  ;  
  	rewind.3s er  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n ex.  ;  
  rindex.3 .3n  ;  
  rint.3m   <   
  
rnusers.3r t  <  
  rpc.3n s  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  <D  <T  
  rpow.3x   <h  
  	rquota.3r ow  <  
  rresvport.3n  ow./share/man/man3/res_init.3                                                                            755       0      12           71  4424741315  10545                                                                                                                                                                                                                                                                                                                                                                      .so man3/resolver.3
.\" @(#)res_init.3 1.4 89/03/27 SMI;
 
  
res_send.3 3  ;<  
  resetterm.3v  ;<  ;P  
  
resetty.3v .  ;d  
  
resetty.3x v  ;x  
  
resolver.3 .  ;  
  	rewind.3s  .  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 ex.  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  ow./share/man/man3/res_mkquery.3                                                                         755       0      12           74  4424741315  11302                                                                                                                                                                                                                                                                                                                                                                      .so man3/resolver.3
.\" @(#)res_mkquery.3 1.4 89/03/27 SMI;
  resetterm.3v  ;<  ;P  
  
resetty.3v <  ;d  
  
resetty.3x .  ;x  
  
resolver.3 v  ;  
  	rewind.3s  .  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 r i  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  <  <  
  rtime.3n  ow./share/man/man3/res_send.3                                                                            755       0      12           71  4424741315  10533                                                                                                                                                                                                                                                                                                                                                                      .so man3/resolver.3
.\" @(#)res_send.3 1.4 89/03/27 SMI;
 
  
resetty.3v v  ;d  
  
resetty.3x .  ;x  
  
resolver.3 .  ;  
  	rewind.3s er  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n ex.  ;  
  rindex.3 .3n  ;  
  rint.3m   <   
  
rnusers.3r t  <  
  rpc.3n s  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  <D  <T  
  rpow.3x   <h  
  	rquota.3r ow  <  
  rresvport.3n  x   <  
  rstat.3r .3n  <  
  rtime.3n .3r  <  
  
ruserok.3n n  <./share/man/man3/resetterm.3v                                                                          755       0      12           72  4424741315  11132                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)resetterm.3v 1.4 89/03/27 SMI;

  
resetty.3x v  ;x  
  
resolver.3 .  ;  
  	rewind.3s  .  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 ex.  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  x   <  
  rtime.3n .3n  <  
  
ruserok.3n r  <  
  rwall.3r n n  <./share/man/man3/resetty.3v                                                                            755       0      12           70  4424741316  10616                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)resetty.3v 1.4 89/03/27 SMI;
  
resolver.3 .  ;  
  	rewind.3s er  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n ex.  ;  
  rindex.3 .3n  ;  
  rint.3m   <   
  
rnusers.3r t  <  
  rpc.3n s  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  <D  <T  
  rpow.3x   <h  
  	rquota.3r ow  <  
  rresvport.3n  x   <  
  rstat.3r .3n  <  
  rtime.3n .3r  <  
  
ruserok.3n n  <  
  rwall.3r ok.  <  
  saveterm.3v   <  
./share/man/man3/resetty.3x                                                                            755       0      12           71  4424741316  10621                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)resetty.3x 1.5 89/03/27 SMI; 
 	rewind.3s  .  ;  
  rewinddir.3   ;  
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 ex.  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  x   <  
  rtime.3n .3n  <  
  
ruserok.3n r  <  
  rwall.3r n n  <  
  saveterm.3v   <  
  
savetty.3v    =  
./share/man/man3/resolver.3                                                                            755       0      12        12402  4424741316  10654                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)resolver.3 1.12 89/03/27 SMI; from UCB 1.5 3/21/86
.\"
.TH RESOLVER 3 "22 March 1989"
.SH NAME
resolver, res_mkquery, res_send, res_init, dn_comp, dn_expand \- resolver routines
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <netinet/in.h>
.B #include <arpa/nameser.h>
.B #include <resolv.h>
.LP
.B "res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)"
.B int op;
.B char *dname;
.B int class, type;
.B char *data;
.B int datalen;
.B struct rrec *newrr;
.B char *buf;
.B int buflen;
.LP
.B res_send(msg, msglen, answer, anslen)
.B char *msg;
.B int msglen;
.B char *answer;
.B int anslen;
.LP
.B res_init(\|)
.LP
.B dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
.B char *exp_dn, *comp_dn;
.B int length;
.B char **dnptrs, **lastdnptr;
.LP
.B dn_expand(msg, msglen, comp_dn, exp_dn, length)
.B char *msg, *comp_dn, exp_dn;
.B int  msglen, length;
.fi
.SH DESCRIPTION
.IX "Internet name server routines"
.IX "name server routines, Internet"
.IX res_mkquery  "" "\fLres_mkquery\fR \(em Internet name servers"
.IX res_send "" "\fLres_send\fR \(em Internet name server routines"
.IX res_init "" "\fLres_init\fR \(em Internet name server routines"
.IX dn_comp "" "\fLdn_comp\fR \(em Internet name server routines"
.IX dn_expand "" "\fLdn_expand\fR \(em Internet name server routines"
.LP
These routines are used for making,
sending and interpreting packets to
Internet domain name servers.
Global information that is used by the
resolver routines is kept in the variable
.IR _res .
Most of the values have reasonable defaults
and can be ignored.
Options are a simple bit mask and are
.SM OR\s0'ed
in to enable.
Options stored in
.I _res.options
are defined in
.I resolv.h
and are as follows.
.TP 20
.SB RES_INIT
True if the initial name server address
and default domain name are initialized (that is,
.I res_init 
has been called).
.TP
.SB RES_DEBUG
Print debugging messages.
.TP
.SB RES_AAONLY
Accept authoritative answers only.
.I res_send
will continue until it finds an authoritative
answer or finds an error.
Currently this is not implemented.
.TP
.SB RES_USEVC
Use
.SM TCP
connections for queries instead of
.SM UDP\s0.
.TP
.SB RES_STAYOPEN
Used with
.SB RES_USEVC
to keep the
.SM TCP
connection open between queries.
This is useful only in programs that
regularly do many queries.
.SM UDP
should be the normal mode used.
.TP
.SB RES_IGNTC
Unused currently (ignore truncation errors,
that is, do not retry with
.SM TCP\s0).
.TP
.SB RES_RECURSE
Set the recursion desired bit in queries.
This is the default.
.I res_send
does not do iterative queries and expects the name server
to handle recursion.
.TP
.SB RES_DEFNAMES
Append the default domain name to single
label queries.
This is the default.
.LP
.I res_init
reads the initialization file to get the default
domain name and the Internet address of the initial hosts
running the name server.
If this line does
not exist, the host running the resolver is tried.
.I res_mkquery
makes a standard query message and places it in
.IR buf .
.I res_mkquery
will return the size of the query or \-1 if the query is
larger than
.IR buflen .
.I op
is usually
.SB QUERY
but can be any of the query types defined in
.IR nameser.h .
.I dname
is the domain name.  If
.I dname
consists of a single label and the
.SB RES_DEFNAMES
flag is enabled (the default),
.I dname
will be appended with the current domain name.
The current domain name is defined in a system
file and can be overridden by the environment variable
.BR \s-1LOCALDOMAIN\s0 .
.I newrr
is currently unused but is intended for making update messages.
.LP
.I res_send
sends a query to name servers and returns an answer.
It will call
.I res_init
if
.SB RES_INIT
is not set, send the query to the local
name server, and handle timeouts and retries.
The length of the message is returned or
\-1 if there were errors.
.LP
.I dn_expand
Expands the compressed domain name
.I comp_dn
to a full domain name.
Expanded names are converted to upper case.
.I msg
is a pointer to the beginning of the message,
.I exp_dn
is a pointer to a buffer of size
.I length
for the result.
The size of compressed
name is returned or \-1 if there was an error.
.LP
.I dn_comp
Compresses the domain name
.I exp_dn
and stores it in
.IR comp_dn .
The size of the compressed name is returned or \-1
if there were errors.
.I length
is the size of the array pointed to by
.IR comp_dn .
.I dnptrs
is a list of pointers to previously compressed
names in the current message.
The first pointer
points to to the beginning of the message
and the list ends with
.SM NULL\s0.
.I lastdnptr
is a pointer to the end of the array pointed to
.IR dnptrs .
A side effect is to update the list of pointers for
labels inserted into the message by
.I dn_comp
as the name is compressed.  If
.I dnptr
is
.SM NULL\s0,
do not try to compress names. If
.I lastdnptr
is
.SM NULL\s0,
do not update the list.
.SH FILES
.PD 0
.TP 20
.B /etc/resolv.conf
see
.BR resolve.conf (5)
.TP
.B /usr/lib/libresolv.a
.PD
.SH "SEE ALSO"
.BR resolv.conf (5),
.BR named (8)
.SH NOTE
.LP
.B /usr/lib/libresolv.a
is necessary for compiling programs.
.\", RFC882, RFC883, RFC973, RFC974,
.\" BIND - Operations Guide
this register variable can be used in the
declarations for
.BR \s-1GETC\s+1(\|) ,
.BR \s-1PEEKC\s+1(\|) ,
and
.BR \s-1UNGETC\s+1(\|) .
Otherwise it can be used to declare external variables
that might be used by
.BR \s-1GETC\s+1(\|) ,
.BR \s-1PEEKC\s+1(\./share/man/man3/rewind.3s                                                                             755       0      12           67  4424741316  10412                                                                                                                                                                                                                                                                                                                                                                      .so man3/fseek.3s
.\" @(#)rewind.3s 1.5 89/03/27 SMI; 
  rex.3r i  ;  
  rexec.3n r i  ;  
  rindex.3 r i  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  <  <  
  rtime.3n  <  <  
  
ruserok.3n    <  
  rwall.3r n n  <  
  saveterm.3v   <  
  
savetty.3v    =  
  
savetty.3x    =   
  scalb.3m x    =4  
./share/man/man3/rewinddir.3                                                                           755       0      12           74  4424741316  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)rewinddir.3 1.5 89/03/27 SMI; 
c.3n r i  ;  
  rindex.3 r i  ;  
  rint.3m   <   
  
rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  <  <  
  rtime.3n  <  <  
  
ruserok.3n   <  
  rwall.3r n    <  
  saveterm.3v   <  
  
savetty.3v    =  
  
savetty.3x    =   
  scalb.3m x    =4  
  	scalbn.3m     =H  
./share/man/man3/rex.3r                                                                                755       0      12         1576  4424741317   7766                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rex.3r 1.8 89/03/27 SMI;
.TH REX 3R "6 October 1987"
.SH NAME
rex \- remote execution protocol
.SH PROTOCOL
.B /usr/include/rpcsvc/rex.x
.SH DESCRIPTION
.IX "remote execution protocol" "" "remote execution protocol \(em \fLrex\fR"
This server will execute commands remotely.
The working directory and environment
of the command can be specified, and the standard
input and output of the command can be arbitrarily
redirected.  An option is provided for interactive
I/O for programs that expect to be running on terminals.
Note: this service is only provided with the
.SM TCP
transport.
.LP
.SH PROGRAMMING
.nf
.B #include <sys/ioctl.h>
.B #include <rpcsvc/rex.h>	/* not compiled with rpgen */
.fi
.LP
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_rex_start
.B	xdr_rex_result
.B	xdr_rex_ttymode
.B	xdr_rex_ttysize
.fi
.SH SEE ALSO
.BR on (1C),
.BR rexd (8C)
 setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
./share/man/man3/rexec.3n                                                                              755       0      12         4472  4424741317  10270                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rexec.3n 1.13 89/03/27 SMI; from UCB 4.2
.TH REXEC 3N "18 November 1987"
.SH NAME
rexec \- return stream to a remote command
.SH SYNOPSIS
.nf
.B "rem = rexec(ahost, inport, user, passwd, cmd, fd2p);"
.B char **ahost;
.B u_short inport;
.B "char *user, *passwd, *cmd;"
.B int *fd2p;
.fi
.IX  "rexec function"  ""  "\fLrexec\fP \(em return stream to remote command"
.IX  stream  "return to remote command \(em \fLrexec\fR"
.IX  "return stream to remote command \(em \fLrexec\fR"
.IX  command  "return stream to remote \(em \fLrexec\fR"
.IX  "remote command, return stream to \(em \fLrexec\fR"
.SH DESCRIPTION
.LP
.B rexec(\|)
looks up the host
.I *ahost
using
.B gethostbyname 
(see
.BR gethostent (3N)),
returning \-1 if the host does not exist.
Otherwise
.I *ahost
is set to the standard name of the host.
If a username and password are both specified, then these
are used to authenticate to the foreign host; otherwise
the environment and then the user's
.B .netrc
file in his home directory are searched
for appropriate information.  If all this fails,
the user is prompted for the information.
.LP
The port
.B inport
specifies which well-known
.SM DARPA
Internet port to use for the connection; it will
normally be the value returned from
the call
.RB ` "getservbyname(``exec'', ``tcp'')" '
(see
.BR getservent (3N)).
The protocol for connection is described in detail in
.BR rexecd (8C).
.LP
If the call succeeds, a socket of type
.SB SOCK_STREAM
is returned to the caller, and given to
the remote command as its standard input and standard output.
If
.I fd2p
is non-zero, then a auxiliary channel to a control
process will be setup, and a descriptor
for it will be placed in
.IR *fd2p .
The control process will return diagnostic
output from the command (unit 2) on this channel,
and will also accept bytes on this channel as
signal numbers, to be forwarded to the process
group of the command.  If
.I fd2p
is 0, then the standard error
(unit 2 of the remote
command) will be made the same as its standard output
and no provision is made for sending arbitrary
signals to the remote process, although you may be
able to get its attention by using out-of-band data.
.SH SEE ALSO
.BR gethostent (3N),
.BR getservent (3N),
.BR rcmd (3N),
.BR rexecd (8C)
.SH BUGS
.LP
There is no way to specify options to the
.B socket(\|)
call that
.B rexec(\|)
makes.
he message by
.I dn_comp
as the name is compressed.  If
.I dnptr
is
.SM NULL\s0,
do not try to compress names. If
.I lastdnptr
is
.SM NULL\s0,
do not update the list.
.SH FILES
.PD 0
.TP 20
.B /etc/./share/man/man3/rindex.3                                                                              755       0      12           67  4424741317  10231                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)rindex.3 1.6 89/03/27 SMI; 

rnusers.3r    <  
  rpc.3n .  <(  
  rpc_createrr.3n   <D  
   rpc_functions.3n  
  <T  
  rpow.3x   <h  
  	rquota.3r x   <  
  rresvport.3n  <  <  
  rstat.3r  
  <  
  rtime.3n  <  <  
  
ruserok.3n   <  
  rwall.3r n   <  
  saveterm.3v   <  
  
savetty.3v    =  
  
savetty.3x   =   
  scalb.3m x   =4  
  	scalbn.3m =   =H  
  	scandir.3 =4  =\  
  scanf.3s  =H  =p  
  scanf.3v  =\  =./share/man/man3/rint.3m                                                                               755       0      12         6351  4424741317  10133                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rint.3m 1.11 89/03/27 SMI; from UCB 4.3 BSD
.TH RINT 3M  "15 October 1987"
.SH NAME
aint, anint, ceil, floor, rint, irint, nint \- round to integral value in floating-point or integer format
.SH SYNOPSIS
.LP
.B #include <math.h>
.LP
.nf
.B double aint(x)
.B double x;
.fi
.LP
.nf
.B double anint(x)
.B double x;
.fi
.LP
.nf
.B double ceil(x)
.B double x;
.fi
.LP
.nf
.B double floor(x)
.B double x;
.fi
.LP
.nf
.B double rint(x)
.B double x;
.fi
.LP
.nf
.B int irint(x)
.B double x;
.fi
.LP
.nf
.B int nint(x)
.B double x;
.fi
.SH DESCRIPTION
.IX  "aint function"  ""  "\fLaint\fP \(em aint of"
.IX  "mathematical functions"  aint  ""  "\fLaint\fP \(em convert to integral floating"
.IX  "anint function"  ""  "\fLanint\fP \(em anint of"
.IX  "mathematical functions"  anint  ""  "\fLanint\fP \(em convert to integral floating"
.IX  "ceil function"  ""  "\fLceil\fP \(em ceiling of"
.IX  "mathematical functions"  ceil  ""  "\fLceil\fP \(em convert to integral floating"
.IX  "floot function"  ""  "\fLfloor\fP \(em floor of"
.IX  "mathematical functions"  floor  ""  "\fLfloor\fP \(em convert to integral floating"
.IX  "rint function"  ""  "\fLrint\fP \(em rint of"
.IX  "mathematical functions"  rint  ""  "\fLrint\fP \(em convert to integral floating"
.IX  "irint function"  ""  "\fLirint\fP \(em irint of"
.IX  "mathematical functions"  irint  ""  "\fLirint\fP \(em convert to integer"
.IX  "nint function"  ""  "\fLnint\fP \(em nint of"
.IX  "mathematical functions"  nint  ""  "\fLnint\fP \(em convert to integer"
.LP
.BR aint , " anint" , " ceil" ,
.BR floor ,
and
.B rint(\|)
convert a double value into an integral value in double
format.  They vary in how they choose the
result when the argument is not already
an integral value.  Here an \(lqintegral value\(rq
means a value of a mathematical integer, which
however might be too large to fit in a particular
computer's int format.  All sufficiently large values
in a particular floating-point format are
already integral; in
.SM IEEE
double-precision format, that means all values >= 2**52.
Zeros, infinities, and quiet NaNs are treated
as integral values by these functions,
which always preserve their argument's sign.
.LP
.B aint(\|)
returns the integral value between
.I x
and 0, nearest
.IR x .
This corresponds to
.SM IEEE
rounding toward zero and to the Fortran
generic intrinsic function
.BR aint .
.LP
.B anint(\|)
returns the nearest integral value to
.IR x ,
except halfway cases are rounded to the
integral value larger in magnitude.
This corresponds to the Fortran generic
intrinsic function
.BR anint .
.LP
.B ceil(\|)
returns the least integral value greater than or equal to
.IR x .
This corresponds to
.SM IEEE
rounding toward positive infinity.
.LP
.B floor(\|)
returns the greatest integral value less than or equal to
.IR x .
This corresponds to
.SM IEEE
rounding toward negative infinity.
.LP
.B rint(\|)
rounds
.I x
to an integral value according to the current
.SM IEEE
rounding direction.
.LP
.BR irint
converts
.I x
into int format according to the current
.SM IEEE
rounding direction.
.LP
.B nint(\|)
converts
.I x
into int format rounding to the nearest int value, except
halfway cases are rounded to the int value
larger in magnitude.  This corresponds to the
Fortran generic intrinsic function
.BR nint .
|) .
The call to
.B step(\|)
is as follows:
.IP
.B step(string, expbuf)
.LP
The first parameter to
.B step(\|)
is a pointer to a string
of characters to be checked for a match.
This string should be
.SM NULL\s0-terminated.
.LP
The second parameter
.I expbuf
is the compiled regul./share/man/man3/rnusers.3r                                                                            755       0      12         1421  4424741317  10656                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rnusers.3r 1.13 89/03/27 SMI;
.TH RNUSERS 3R "6 October 1987"
.SH NAME
rnusers, rusers \- return information about users on remote machines
.SH PROTOCOL
.B /usr/include/rpcsvc/rnusers.x
.IX "remote users, number of \(em \fLrnusers\fR"
.IX "remote host" "number of users \(em \fLrusers\fR"
.SH PROGRAMMING
.nf
.B #include <rpcsvc/rusers.h>
.B rnusers(host)
.B	char *host
.B rusers(host, up)
.B	char *host
.B	struct utmpidlearr *up;
.fi
.LP
.B rnusers(\|)
returns the number of users logged on to
.I host
(\-1 if it cannot determine that number).
.B rusers(\|)
fills the
.B utmpidlearr
structure with data about
.IR host ,
and returns 0 if successful.
.LP
The following
.SM XDR
routines are also available:
.nf
.B xdr_utmpidle
.B xdr_utmpidlearr
.fi
.SH SEE ALSO
.BR rusers (1C)
etbuf.3v >  >  
  setbuffer.3s  
  >  
  setbuffer.3v  
  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3  ?   ?4  
  	setgid.3v ?4  ?H  
  setgraent.3 ./share/man/man3/rpc.3n                                                                                755       0      12       105527  4424741320  10003                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rpc.3n 1.22 89/03/27 SMI; new on release 3.0
.TH RPC 3N "22 March 1989"
.SH NAME
rpc \- library routines for remote procedure calls
.SH SYNOPSIS AND DESCRIPTION
.IX rpc "" "RPC routines"
.IX "remote procedure calls"
.IX rpc "" "RPC routines"
.IX "remote procedure calls"
.LP
These routines allow C programs to make procedure
calls on other machines across the network.
First, the client calls a procedure to send a
data packet to the server.
Upon receipt of the packet, the server calls a dispatch routine
to perform the requested service, and then sends back a
reply.
Finally, the procedure call returns to the client.
.LP
.ft B
.nf
.sp .5
#include <rpc/rpc.h>
.fi
.ft R
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
auth_destroy(auth)
\s-1AUTH\s0 *auth;
.fi
.ft R
.IP
A macro that destroys the authentication information associated with
.IR auth .
Destruction usually involves deallocation of private data
structures. The use of
.I auth
is undefined after calling
.BR auth_destroy(\|) .
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
\s-1AUTH\s0 *
authdes_create(name, window, syncaddr, ckey)
char *name;
unsigned window;
struct sockaddr_in *addr;
des_block *ckey;
.fi
.ft R
.IP
.B authdes_create(\|)
is the first of two routines which interface to the
.SM RPC
secure authentication system, known as
.SM DES
authentication.
The second is
.BR authdes_getucred(\|) ,
below. Note: the keyserver daemon
.BR keyserv (8C)
must be running for the
.SM DES
authentication system to work.
.IP
.BR authdes_create(\|) ,
used on the client side, returns an authentication handle that
will enable the use of the secure authentication system.
The first parameter
.I name
is the network name, or
.IR netname ,
of the owner of the server process. This field usually
represents a
.I hostname
derived from the utility routine
.BR host2netname(\|) ,
but could also represent a user name using
.BR user2netname(\|) .
The second field is window on the validity of
the client credential, given in seconds.  A small
window is more secure than a large one, but choosing
too small of a window will increase the frequency of
resynchronizations because of clock drift. The third
parameter
.I syncaddr
is optional.  If it is
.SM NULL\s0,
then the authentication system will assume
that the local clock is always in sync with the server's
clock, and will not attempt resynchronizations. If an address
is supplied, however, then the system will use the address
for consulting the remote time service whenever
resynchronization
is required. This parameter is usually the
address of the
.SM RPC
server itself. The final parameter
.I ckey
is also optional.  If it is
.SM NULL\s0,
then the authentication system will
generate a random
.SM DES
key to be used for the encryption of credentials.
If it is supplied, however, then it will be used instead.
.br
.if t .ne 13
.LP
.ft B
.nf
.sp .5
\s-1AUTH\s0 *
authnone_create(\|)
.fi
.ft R
.IP
Create and returns an
.SM RPC
authentication handle that passes nonusable authentication
information with each remote procedure call. This is the
default authentication used by
.SM RPC.
.if t .ne 22
.LP
.ft B
.nf
.sp .5
authdes_getucred(adc, uid, gid, grouplen, groups)
struct authdes_cred *adc;
short *uid;
short *gid;
short *grouplen;
int *groups;
.fi
.ft R
.IP
.BR authdes_getucred(\|) ,
the second of the two
.SM DES
authentication routines,
is used on the server side for converting a
.SM DES
credential, which is
operating system independent, into a
.UX
credential. This routine differs from utility routine
.B netname2user(\|)
in that
.B authdes_getucred(\|)
pulls its information from a cache, and does not have to do a
Yellow Pages lookup every time it is called to get its information.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
\s-1AUTH\s0 *
authunix_create(host, uid, gid, len, aup_gids)
char *host;
int uid, gid, len, *aup.gids;
.fi
.ft R
.IP
Create and return an
.SM RPC
authentication handle that contains
.UX
authentication information.
The parameter
.I host
is the name of the machine on which the information was
created;
.I uid
is the user's user
.SM ID\s0;
.I gid
is the user's current group
.SM ID\s0;
.I len
and
.I aup_gids
refer to a counted array of groups to which the user belongs.
It is easy to impersonate a user.
.br
.if t .ne 5
.LP
.ft B
.nf
.sp .5
\s-1AUTH\s0 *
authunix_create_default(\|)
.fi
.ft R
.IP
Calls
.B authunix_create(\|)
with the appropriate parameters.
.br
.if t .ne 13
.LP
.ft B
.nf
.sp .5
callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
char *host;
u_long prognum, versnum, procnum;
char *in, *out;
xdrproc_t inproc, outproc;
.fi
.ft R
.IP
Call the remote procedure associated with
.IR prognum ,
.IR versnum ,
and
.I procnum
on the machine,
.IR host .
The parameter
.I in
is the address of the procedure's argument(s), and
.I out
is the address of where to place the result(s);
.I inproc
is used to encode the procedure's parameters, and
.I outproc
is used to decode the procedure's results.
This routine returns zero if it succeeds, or the value of
.B "enum clnt_stat(\|)"
cast to an integer if it fails.
The routine
.B clnt_perrno(\|)
is handy for translating failure statuses into messages.
.IP
Warning: calling remote procedures with this routine
uses
.SM UDP/IP
as a transport; see
.B clntudp_create(\|)
for restrictions.
You do not have control of timeouts or authentication using
this routine.
.br
.if t .ne 16
.LP
.ft B
.nf
.sp .5
enum clnt_stat
clnt_broadcast(prognum, versnum, procnum, inproc, in, outproc, out, eachresult)
u_long prognum, versnum, procnum;
char *in, *out;
xdrproc_t inproc, outproc;
resultproc_t eachresult;
.fi
.ft R
.IP
Like
.BR callrpc(\|) ,
except the call message is broadcast to all locally
connected broadcast nets. Each time it receives a
response, this routine calls
.BR eachresult(\|) ,
whose form is:
.IP
.RS 1i
.ft B
.nf
eachresult(out, addr)
char *out;
struct sockaddr_in *addr;
.ft R
.fi
.RE
.IP
where
.I out
is the same as
.I out
passed to
.BR clnt_broadcast(\|) ,
except that the remote procedure's output is decoded there;
.I addr
points to the address of the machine that sent the results.
If
.B eachresult(\|)
returns zero,
.B clnt_broadcast(\|)
waits for more replies; otherwise it returns with appropriate
status.
.IP
Warning: broadcast sockets are limited in size to the
maximum transfer unit of the data link. For Ethernet,
this value is 1500 bytes.
.br
.if t .ne 13
.LP
.ft B
.nf
.sp .5
enum clnt_stat
clnt_call(clnt, procnum, inproc, in, outproc, out, tout)
\s-1CLIENT\s0 *clnt;
u_long procnum;
xdrproc_t inproc, outproc;
char *in, *out;
struct timeval tout;
.fi
.ft R
.IP
A macro that calls the remote procedure
.I procnum
associated with the client handle,
.IR clnt ,
which is obtained with an
.SM RPC
client creation routine such as
.BR clnt_create(\|) .
The parameter
.I in
is the address of the procedure's argument(s), and
.I out
is the address of where to place the result(s);
.I inproc
is used to encode the procedure's parameters, and
.I outproc
is used to decode the procedure's results;
.I tout
is the time allowed for results to come back.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
bool_t
clnt_control(cl, req, info)
\s-1CLIENT\s0 *cl;
char *info;
.fi
.ft R
.IP
A macro used to change or retrieve various information
about a client object.
.I req
indicates the type of operation, and
.I info
is a pointer to the information. For both
.SM UDP
and
.SM TCP\s0,
the supported values of
.I req
and their argument types and what they do are:
.IP
.nf
.ta +2.0i +2.0i +2.0i
.SM CLSET_TIMEOUT\s0	struct timeval	set total timeout
.SM CLGET_TIMEOUT\s0	struct timeval	get total timeout
.fi
.IP
Note: if you set the timeout using
.BR clnt_control(\|) ,
the timeout parameter passed to
.B clnt_call(\|)
will be ignored in all future calls.
.IP
.nf
.SM CLGET_SERVER_ADDR\s0	struct sockaddr_in 	get server's address
.fi
.br
.IP
The following operations are valid for
.SM UDP
only:
.IP
.nf
.ta +2.0i ; +2.0i ; +2.0i
.SM CLSET_RETRY_TIMEOUT\s0		struct timeval	set the retry timeout
.SM CLGET_RETRY_TIMEOUT\s0		struct timeval	get the retry timeout
.fi
.br
.IP
The retry timeout is the time that
.SM "UDP RPC"
waits for the server to reply before
retransmitting the request.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
\s-1CLIENT\s0 *
clnt_create(host, prog, vers, proto)
char *host;
u_long prog, vers;
char *proto;
.fi
.ft R
.IP
Generic client creation routine.
.I host
identifies the name of the remote host where the server
is located.
.I proto
indicates which kind of transport protocol to use. The
currently supported values for this field are \(lqudp\(rq
and \(lqtcp\(rq.
Default timeouts are set, but can be modified using
.BR clnt_control(\|) .
.br
.ne 5
.IP
Warning: Using
.SM UDP
has its shortcomings.  Since
.SM UDP\s0-based
.SM RPC
messages can only hold up to 8 Kbytes of encoded data,
this transport cannot be used for procedures that take
large arguments or return huge results.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
clnt_destroy(clnt)
\s-1CLIENT\s0 *clnt;
.fi
.ft R
.IP
A macro that destroys the client's
.SM RPC
handle. Destruction usually involves deallocation
of private data structures, including
.I clnt
itself.  Use of
.I clnt
is undefined after calling
.BR clnt_destroy(\|) .
If the
.SM RPC
library opened the associated socket, it will close it also.
Otherwise, the socket remains open.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
clnt_freeres(clnt, outproc, out)
\s-1CLIENT\s0 *clnt;
xdrproc_t outproc;
char *out;
.fi
.ft R
.IP
A macro that frees any data allocated by the
.SM RPC/XDR
system when it decoded the results of an
.SM RPC
call.  The
parameter
.I out
is the address of the results, and
.I outproc
is the
.SM XDR
routine describing the results.
This routine returns one if the results were successfully
freed,
and zero otherwise.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
void
clnt_geterr(clnt, errp)
\s-1CLIENT\s0 *clnt;
struct rpc_err *errp;
.fi
.ft R
.IP
A macro that copies the error structure out of the client
handle
to the structure at address
.IR errp .
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
clnt_pcreateerror(s)
char *s;
.fi
.ft R
.IP
Print a message to standard error indicating
why a client
.SM RPC
handle could not be created.
The message is prepended with string
.I s
and a colon.
Used when a
.BR clnt_create(\|) ,
.BR clntraw_create(\|) ,
.BR clnttcp_create(\|) ,
or
.B clntudp_create(\|)
call fails.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
clnt_perrno(stat)
enum clnt_stat stat;
.fi
.ft R
.IP
Print a message to standard error corresponding
to the condition indicated by
.IR stat .
Used after
.BR callrpc(\|) .
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
clnt_perror(clnt, s)
\s-1CLIENT\s0 *clnt;
char *s;
.fi
.ft R
.IP
Print a message to standard error indicating why an
.SM RPC
call failed;
.I clnt
is the handle used to do the call.
The message is prepended with string
.I s
and a colon.
Used after
.BR clnt_call(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
char *
clnt_spcreateerror(s)
char *s;
.fi
.ft R
.IP
Like
.BR clnt_pcreateerror(\|) ,
except that it returns a string
instead of printing to the standard error.
.IP
Bugs: returns pointer to static data that is overwritten
on each call.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
char *
clnt_sperrno(stat)
enum clnt_stat stat;
.fi
.ft R
.IP
Take the same arguments as
.BR clnt_perrno(\|) ,
but instead of sending a message to the standard error
indicating why an
.SM RPC
call failed, return a pointer to a string which contains
the message.  The string ends with a
.SM NEWLINE\s0.
.IP
.B clnt_sperrno(\|)
is used instead of
.B clnt_perrno(\|)
if the program does not have a standard error (as a program
running as a server quite likely does not), or if the
programmer
does not want the message to be output with
.BR printf ,
or if a message format different than that supported by
.B clnt_perrno(\|)
is to be used.
Note: unlike
.B clnt_sperror(\|)
and
.BR clnt_spcreaterror(\|) ,
.B clnt_sperrno(\|)
returns pointer to static data, but the
result will not get overwritten on each call.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
char *
clnt_sperror(rpch, s)
\s-1CLIENT\s0 *rpch;
char *s;
.fi
.ft R
.IP
Like
.BR clnt_perror(\|) ,
except that (like
.BR clnt_sperrno(\|) )
it returns a string instead of printing to standard error.
.IP
Bugs: returns pointer to static data that is overwritten
on each call.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
\s-1CLIENT\s0 *
clntraw_create(prognum, versnum)
u_long prognum, versnum;
.fi
.ft R
.IP
This routine creates a toy
.SM RPC
client for the remote program
.IR prognum ,
version
.IR versnum .
The transport used to pass messages to the service is
actually a buffer within the process's address space, so the
corresponding
.SM RPC
server should live in the same address space; see
.BR svcraw_create(\|) .
This allows simulation of
.SM RPC
and acquisition of
.SM RPC
overheads, such as round trip times, without any
kernel interference. This routine returns
.SM NULL
if it fails.
.br
.if t .ne 15
.LP
.ft B
.nf
.sp .5
\s-1CLIENT\s0 *
clnttcp_create(addr, prognum, versnum, sockp, sendsz, recvsz)
struct sockaddr_in *addr;
u_long prognum, versnum;
int *sockp;
u_int sendsz, recvsz;
.fi
.ft R
.IP
This routine creates an
.SM RPC
client for the remote program
.IR prognum ,
version
.IR versnum ;
the client uses
.SM TCP/IP
as a transport. The remote program is located at Internet
address
.IR addr .
If
.\"The following in-line font conversion is necessary for the hyphen indicator
\fB\%addr\->sin_port\fR
is zero, then it is set to the actual port that the remote
program is listening on (the remote
.B portmap
service is consulted for this information). The parameter
.I sockp
is a socket; if it is
.BR \s-1RPC_ANYSOCK\s0 ,
then this routine opens a new one and sets
.IR sockp .
Since
.SM TCP\s0-based
.SM RPC
uses buffered
.SM I/O\s0,
the user may specify the size of the send and receive buffers
with the parameters
.I sendsz
and
.IR recvsz ;
values of zero choose suitable defaults.
This routine returns
.SM NULL
if it fails.
.br
.if t .ne 15
.LP
.ft B
.nf
.sp .5
\s-1CLIENT\s0 *
clntudp_bufcreate(addr, prognum, versnum, wait, sockp, sendsize, recosize)
struct sockaddr_in *addr;
u_long prognum, versnum;
struct timeval wait;
int *sockp;
unsigned int sendsize;
unsigned int recosize;
.fi
.ft R
.IP
This routine creates an
.SM RPC
client for the remote program
.IR prognum ,
on
.IR versnum ;
the client uses use
.SM UDP/IP
as a transport. The remote program is located at Internet
address
.IR addr .
If
\fB\%addr\->sin_port\fR
is zero, then it is set to actual port that the remote
program is listening on (the remote
.B portmap
service is consulted for this information). The parameter
.I sockp
is a socket; if it is
.BR \s-1RPC_ANYSOCK\s0 ,
then this routine opens a new one and sets
.BR sockp .
The
.SM UDP
transport resends the call message in intervals of
.B wait
time until a response is received or until the call times
out.
The total time for the call to time out is specified by
.BR clnt_call(\|) .
.IP
This allows the user to specify the maximun packet size for sending and receiving 
.SM UDP\s0-based
.SM RPC
messages.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
\s-1CLIENT\s0 *
clntudp_create(addr, prognum, versnum, wait, sockp)
struct sockaddr_in *addr;
u_long prognum, versnum;
struct timeval wait;
int *sockp;
.fi
.ft R
.IP
This routine creates an
.SM RPC
client for the remote program
.IR prognum ,
version
.IR versnum ;
the client uses
.SM UDP/IP
as a transport. The remote program is located at Internet
address
.IR addr .
If
.B \%addr\->sin_port
is zero, then it is set to actual port that the remote
program is listening on (the remote
.B portmap
service is consulted for this information). The parameter
.I *sockp
is a socket; if it is
.BR \s-1RPC_ANYSOCK\s0 ,
then this routine opens a new one and sets
.IR *sockp .
The
.SM UDP
transport resends the call message in intervals of
.B wait
time until a response is received or until the call times
out.
The total time for the call to time out is specified by
.BR clnt_call(\|) .
.IP
Warning: since
.SM UDP\s0-based
.SM RPC
messages can only hold up to 8 Kbytes
of encoded data, this transport cannot be used for procedures
that take large arguments or return huge results.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
get_myaddress(addr)
struct sockaddr_in *addr;
.fi
.ft R
.IP
Stuff the machine's
.SM IP
address into
.IR *addr ,
without consulting the library routines that deal with
.BR /etc/hosts .
The port number is always set to
.BR htons(\s-1PMAPPORT\s0) .
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
getnetname(name)
char name[\s-1MAXNETNAMELEN\s0];
.fi
.ft R
.IP
.B getnetname(\|)
installs the unique, operating-system independent netname of
the
caller in the fixed-length array
.IR name .
Returns
.SM TRUE
if it succeeds and
.SM FALSE
if it fails.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
host2netname(name, host, domain)
char *name;
char *host;
char *domain;
.fi
.ft R
.IP
Convert from a domain-specific hostname to an
operating-system independent netname. Return
.SM TRUE
if it succeeds and
.SM FALSE
if it fails. Inverse of
.BR netname2host(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
key_decryptsession(remotename, deskey)
char *remotename;
des_block *deskey;
.fi
.ft R
.IP
.B key_decryptsession(\|)
is an interface to the keyserver daemon, which is associated
with
.SM RPC\s0's
secure authentication system (\s-1DES\s0
authentication).
User programs rarely need to call it, or its associated routines
.BR key_encryptsession(\|) ,
.B key_gendes(\|)
and
.BR key_setsecret(\|) .
System commands such as
.B login
and the
.SM RPC
library are the main clients of these four routines.
.IP
.B key_decryptsession(\|)
takes a server netname and a des key, and decrypts the key by
using the the public key of the the server and the secret key
associated with the effective uid of the calling process.  It
is the inverse of
.BR key_encryptsession(\|) .
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
key_encryptsession(remotename, deskey)
char *remotename;
des_block *deskey;
.fi
.ft R
.IP
.B key_encryptsession(\|)
is a keyserver interface routine. It
takes a server netname and a des key, and encrypts
it using the public key of the the server and the secret key
associated with the effective uid of the calling process.  It
is the inverse of
.BR key_decryptsession(\|) .
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
key_gendes(deskey)
des_block *deskey;
.fi
.ft R
.IP
.B key_gendes(\|)
is a keyserver interface routine. It
is used to ask the keyserver for a secure conversation key.
Choosing one at \(lqrandom\(rq is usually not good enough,
because
the common ways of choosing random numbers, such as using the
current time, are very easy to guess.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
key_setsecret(key)
char *key;
.fi
.ft R
.IP
.B key_setsecret(\|)
is a keyserver interface routine. It is used to set the key for
the effective
.I uid
of the calling process.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
netname2host(name, host, hostlen)
char *name;
char *host;
int hostlen;
.fi
.ft R
.IP
Convert from an operating-system independent netname to a
domain-specific hostname. Returns
.SM TRUE
if it succeeds and
.SM FALSE
if it fails.  Inverse of
.BR host2netname(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
netname2user(name, uidp, gidp, gidlenp, gidlist)
char *name;
int *uidp;
int *gidp;
int *gidlenp;
int *gidlist;
.fi
.ft R
.IP
Convert from an operating-system independent netname to a
domain-specific user
.SM ID\s0.
Returns
.SM TRUE
if it succeeds and
.SM FALSE
if it fails. Inverse of
.BR user2netname(\|) .
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
struct pmaplist *
pmap_getmaps(addr)
struct sockaddr_in *addr;
.fi
.ft R
.IP
A user interface to the
.B portmap
service, which returns a list of the current
.SM RPC
program-to-port mappings
on the host located at
.SM IP
address
.IR *addr .
This routine can return
.SM NULL .
The command
.RB ` "rpcinfo \-p" '
uses this routine.
.br
.if t .ne 12
.LP
.ft B
.nf
.sp .5
u_short
pmap_getport(addr, prognum, versnum, protocol)
struct sockaddr_in *addr;
u_long prognum, versnum, protocol;
.fi
.ft R
.IP
A user interface to the
.B portmap
service, which returns the port number
on which waits a service that supports program number
.IR prognum ,
version
.IR versnum ,
and speaks the transport protocol associated with
.IR protocol .
The value of
.I protocol
is most likely
.SB IPPROTO_UDP
or
.BR \s-1IPPROTO_TCP\s0 .
A return value of zero means that the mapping does not exist
or that
the
.SM RPC
system failured to contact the remote
.B portmap
service.  In the latter case, the global variable
.B rpc_createerr(\|)
contains the
.SM RPC
status.
.br
.if t .ne 15
.LP
.ft B
.nf
.sp .5
enum clnt_stat
pmap_rmtcall(addr, prognum, versnum, procnum, inproc, in, outproc, out, tout, portp)
struct sockaddr_in *addr;
u_long prognum, versnum, procnum;
char *in, *out;
xdrproc_t inproc, outproc;
struct timeval tout;
u_long *portp;
.fi
.ft R
.IP
A user interface to the
.B portmap
service, which instructs
.B portmap
on the host at
.SM IP
address
.I *addr
to make an
.SM RPC
call on your behalf to a procedure on that host.
The parameter
.I *portp
will be modified to the program's port number if the
procedure
succeeds. The definitions of other parameters are discussed
in
.B callrpc(\|)
and
.BR clnt_call(\|) .
This procedure should be used for a \(lqping\(rq and nothing
else.
See also
.BR clnt_broadcast(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
pmap_set(prognum, versnum, protocol, port)
u_long prognum, versnum;
int protocol;
u_short port;
.fi
.ft R
.IP
A user interface to the
.B portmap
service, which establishes a mapping between the triple
.RI [ prognum , versnum , protocol\fR]
and
.I port
on the machine's
.B portmap
service. The value of
.I protocol
is most likely
.SB IPPROTO_UDP
or
.BR \s-1IPPROTO_TCP\s0 .
This routine returns one if it succeeds, zero otherwise.
Automatically done by
.BR svc_register(\|) .
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
pmap_unset(prognum, versnum)
u_long prognum, versnum;
.fi
.ft R
.IP
A user interface to the
.B portmap
service, which destroys all mapping between the triple
.RI [ prognum , versnum , *\fR]
and
.B ports
on the machine's
.B portmap
service. This routine returns one if it succeeds, zero
otherwise.
.br
.if t .ne 15
.LP
.ft B
.nf
.sp .5
registerrpc(prognum, versnum, procnum, procname, inproc, outproc)
u_long prognum, versnum, procnum;
char *(*procname) (\|) ;
xdrproc_t inproc, outproc;
.fi
.ft R
.IP
Register procedure
.I procname
with the
.SM RPC
service package.  If a request arrives for program
.IR prognum ,
version
.IR versnum ,
and procedure
.IR procnum ,
.I procname
is called with a pointer to its parameter(s);
.I progname
should return a pointer to its static result(s);
.I inproc
is used to decode the parameters while
.I outproc
is used to encode the results.
This routine returns zero if the registration succeeded, \-1
otherwise.
.IP
Warning: remote procedures registered in this form
are accessed using the
.SM UDP/IP
transport; see
.B svcudp_create(\|)
for restrictions.
.br
.if t .ne 5
.LP
.ft B
.nf
.sp .5
struct rpc_createerr
rpc_createerr;
.fi
.ft R
.IP
A global variable whose value is set by any
.SM RPC
client creation routine
that does not succeed.  Use the routine
.B clnt_pcreateerror(\|)
to print the reason why.
.if t .ne 7
.LP
.ft B
.nf
.sp .5
svc_destroy(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
A macro that destroys the
.SM RPC
service transport handle,
.IR xprt .
Destruction usually involves deallocation
of private data structures, including
.I xprt
itself.  Use of
.I xprt
is undefined after calling this routine.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
fd_set svc_fdset;
.fi
.ft R
.IP
A global variable reflecting the
.SM RPC
service side's
read file descriptor bit mask; it is suitable as a parameter
to the
.B select(\|)
system call. This is only of interest
if a service implementor does not call
.BR svc_run(\|) ,
but rather does his own asynchronous event processing.
This variable is read-only (do not pass its address to
.BR select(\|) !),
yet it may change after calls to
.B svc_getreqset(\|)
or any creation routines.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
int svc_fds;
.fi
.ft R
.IP
Similar to
.BR svc_fdset(\|) ,
but limited to 32 descriptors. This
interface is obsoleted by
.BR svc_fdset(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
svc_freeargs(xprt, inproc, in)
\s-1SVCXPRT\s0 *xprt;
xdrproc_t inproc;
char *in;
.fi
.ft R
.IP
A macro that frees any data allocated by the
.SM RPC/XDR
system when it decoded the arguments to a service procedure
using
.BR svc_getargs(\|) .
This routine returns 1 if the results were successfully
freed,
and zero otherwise.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
svc_getargs(xprt, inproc, in)
\s-1SVCXPRT\s0 *xprt;
xdrproc_t inproc;
char *in;
.fi
.ft R
.IP
A macro that decodes the arguments of an
.SM RPC
request
associated with the
.SM RPC
service transport handle,
.IR xprt .
The parameter
.I in
is the address where the arguments will be placed;
.I inproc
is the
.SM XDR
routine used to decode the arguments.
This routine returns one if decoding succeeds, and zero
otherwise.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
struct sockaddr_in *
svc_getcaller(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
The approved way of getting the network address of the caller
of a procedure associated with the
.SM RPC
service transport handle,
.IR xprt .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
svc_getreq(rdfds)
int rdfds;
.fi
.ft R
.IP
Similar to
.BR svc_getreqset(\|) ,
but limited to 32 descriptors. This interface is obsoleted by
.BR svc_getreqset(\|) .
.br
.if t .ne 17
.LP
.ft B
.nf
.sp .5
svc_getreqset(rdfds)
fd_set *rdfds;
.fi
.ft R
.IP
This routine is only of interest if a service implementor
does not call
.BR svc_run(\|) ,
but instead implements custom asynchronous event processing.
It is called when the
.B select(\|)
system call has determined that an
.SM RPC
request has arrived on some
.SM RPC
.B socket(s) ;
.I rdfds
is the resultant read file descriptor bit mask.
The routine returns when all sockets associated with the
value of
.I rdfds
have been serviced.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
svc_register(xprt, prognum, versnum, dispatch, protocol)
\s-1SVCXPRT\s0 *xprt;
u_long prognum, versnum;
void (*dispatch) (\|);
u_long protocol;
.fi
.ft R
.IP
Associates
.I prognum
and
.I versnum
with the service dispatch procedure,
.IR dispatch .
If
.I protocol
is zero, the service is not registered with the
.B portmap
service.  If
.I protocol
is non-zero, then a mapping of the triple
.RI [ prognum , versnum , protocol\fR]
to
\fB\%xprt\->xp_port\fR
is established with the local
.B portmap
service (generally
.I protocol
is zero,
.SB IPPROTO_UDP
or
.BR \s-1IPPROTO_TCP\s0 ).
The procedure
.I dispatch
has the following form:
.RS 1i
.ft B
.nf
dispatch(request, xprt)
struct svc_req *request;
\s-1SVCXPRT\s0 *xprt;
.ft R
.fi
.RE
.IP
The
.B svc_register(\|)
routine returns one if it succeeds, and zero otherwise.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
svc_run(\|)
.fi
.ft R
.IP
This routine never returns. It waits for
.SM RPC
requests to arrive, and calls the appropriate service
procedure using
.B svc_getreq(\|)
when one arrives. This procedure is usually waiting for a
.B select(\|)
system call to return.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
svc_sendreply(xprt, outproc, out)
\s-1SVCXPRT\s0 *xprt;
xdrproc_t outproc;
char *out;
.fi
.ft R
.IP
Called by an
.SM RPC
service's dispatch routine to send the results of a
remote procedure call.  The parameter
.I xprt
is the request's associated transport handle;
.I outproc
is the
.SM XDR
routine which is used to encode the results; and
.I out
is the address of the results.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svc_unregister(prognum, versnum)
u_long prognum, versnum;
.fi
.ft R
.IP
Remove all mapping of the double
.RI [ prognum , versnum ]
to dispatch routines, and of the triple
.RI [ prognum , versnum , *\fR]
to port number.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
void
svcerr_auth(xprt, why)
\s-1SVCXPRT\s0 *xprt;
enum auth_stat why;
.fi
.ft R
.IP
Called by a service dispatch routine that refuses to perform
a remote procedure call due to an authentication error.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svcerr_decode(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called by a service dispatch routine that cannot successfully
decode its parameters. See also
.BR svc_getargs(\|) .
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svcerr_noproc(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called by a service dispatch routine that does not implement
the procedure number that the caller requests.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svcerr_noprog(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called when the desired program is not registered with the
.SM RPC
package. Service implementors usually do not need this routine.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svcerr_progvers(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called when the desired version of a program is not registered
with the
.SM RPC
package. Service implementors usually do not need this routine.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
svcerr_systemerr(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called by a service dispatch routine when it detects a system
error
not covered by any particular protocol.
For example, if a service can no longer allocate storage,
it may call this routine.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
svcerr_weakauth(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Called by a service dispatch routine that refuses to perform
a remote procedure call due to insufficient
authentication parameters.  The routine calls
.BR "svcerr_auth(xprt, \s-1AUTH_TOOWEAK\s0)" .
.br
.if t .ne 11
.LP
.ft B
.nf
.sp .5
\s-1SVCXPRT\s0 *
svcfd_create(fd, sendsize, recvsize)
int fd;
u_int sendsize;
u_int recvsize;
.fi
.ft R
.IP
Create a service on top of any open descriptor. Typically,
this
descriptor is a connected socket for a stream protocol such
as
.SM TCP\s0.
.I sendsize
and
.I recvsize
indicate sizes for the send and receive buffers.  If they are
zero, a reasonable default is chosen.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
\s-1SVCXPRT\s0 *
svcraw_create(\|)
.fi
.ft R
.IP
This routine creates a toy
.SM RPC
service transport, to which it returns a pointer.  The
transport
is really a buffer within the process's address space,
so the corresponding
.SM RPC
client should live in the same
address space;
see
.BR clntraw_create(\|) .
This routine allows simulation of
.SM RPC
and acquisition of
.SM RPC
overheads (such as round trip times), without any kernel
interference.
This routine returns
.SM NULL
if it fails.
.br
.if t .ne 11
.LP
.ft B
.nf
.sp .5
\s-1SVCXPRT\s0 *
svctcp_create(sock, send_buf_size, recv_buf_size)
int sock;
u_int send_buf_size, recv_buf_size;
.fi
.ft R
.IP
This routine creates a
.SM TCP/IP\s0-based
.SM RPC
service transport, to which it returns a pointer.
The transport is associated with the socket
.IR sock ,
which may be
.BR \s-1RPC_ANYSOCK\s0 ,
in which case a new socket is created.
If the socket is not bound to a local
.SM TCP
port, then this routine binds it to an arbitrary port.  Upon
completion,
\fB\%xprt\->xp_sock\fR
is the transport's socket descriptor, and
\fB\%xprt\->xp_port\fR
is the transport's port number.
This routine returns
.SM NULL
if it fails. Since
.SM TCP\s0-based
.SM RPC
uses buffered
.SM I/O\s0,
users may specify the size of buffers; values of zero
choose suitable defaults.
.br
.if t .ne 11
.LP
.ft B
.nf
.sp .5
\s-1SVCXPRT\s0 *
svcudp_bufcreate(sock, sendsize, recosize)
int sock;
.fi
.ft R
.IP
This routine creates a
.SM UDP/IP\s0-based
.SM RPC
service transport, to which it returns a pointer.
The transport is associated with the socket
.IR sock ,
which may be
.B \s-1RPC_ANYSOCK\s0 ,
in which case a new socket is created.
If the socket is not bound to a local
.SM UDP
port, then this routine binds it to an arbitrary port. Upon
completion,
\fB\%xprt\->xp_sock\fR
is the transport's socket descriptor, and
\fB\%xprt\->xp_port\fR
is the transport's port number.
This routine returns
.SM NULL
if it fails.
.IP
This allows the user to specify the maximun packet size for sending and 
receiving
.SM UDP\s0-based
.SM RPC
messages.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
user2netname(name, uid, domain)
char *name;
int uid;
char *domain;
.fi
.ft R
.IP
Convert from a domain-specific username to an operating-system
independent netname. Returns
.SM TRUE
if it succeeds and
.SM FALSE
if it fails. Inverse of
.BR netname2user(\|) .
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_accepted_reply(xdrs, ar)
\s-1XDR\s0 *xdrs;
struct accepted_reply *ar;
.fi
.ft R
.IP
Used for encoding
.SM RPC
reply messages. This routine is useful for users who
wish to generate
.SM RPC\s0-style
messages without using the
.SM RPC
package.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_authunix_parms(xdrs, aupp)
\s-1XDR\s0 *xdrs;
struct authunix_parms *aupp;
.fi
.ft R
.IP
Used for describing
.SM UNIX
credentials. This routine is useful for users
who wish to generate these credentials without using the
.SM RPC
authentication package.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
void
xdr_callhdr(xdrs, chdr)
\s-1XDR\s0 *xdrs;
struct rpc_msg *chdr;
.fi
.ft R
.IP
Used for describing
.SM RPC
call header messages.
This routine is useful for users who wish to generate
.SM RPC\s0-style
messages without using the
.SM RPC
package.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_callmsg(xdrs, cmsg)
\s-1XDR\s0 *xdrs;
struct rpc_msg *cmsg;
.fi
.ft R
.IP
Used for describing
.SM RPC
call messages.
This routine is useful for users who wish to generate
.SM RPC\s0-style
messages without using the
.SM RPC
package.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_opaque_auth(xdrs, ap)
\s-1XDR\s0 *xdrs;
struct opaque_auth *ap;
.fi
.ft R
.IP
Used for describing
.SM RPC
authentication information messages.
This routine is useful for users who wish to generate
.SM RPC\s0-style
messages without using the
.SM RPC
package.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_pmap(xdrs, regs)
\s-1XDR\s0 *xdrs;
struct pmap *regs;
.fi
.ft R
.IP
Used for describing parameters to various
.B portmap
procedures, externally.
This routine is useful for users who wish to generate
these parameters without using the
.B pmap
interface.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_pmaplist(xdrs, rp)
\s-1XDR\s0 *xdrs;
struct pmaplist **rp;
.fi
.ft R
.IP
Used for describing a list of port mappings, externally.
This routine is useful for users who wish to generate
these parameters without using the
.B pmap
interface.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_rejected_reply(xdrs, rr)
\s-1XDR\s0 *xdrs;
struct rejected_reply *rr;
.fi
.ft R
.IP
Used for describing
.SM RPC
reply messages.
This routine is useful for users who wish to generate
.SM RPC\s0-style
messages without using the
.SM RPC
package.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdr_replymsg(xdrs, rmsg)
\s-1XDR\s0 *xdrs;
struct rpc_msg *rmsg;
.fi
.ft R
.IP
Used for describing
.SM RPC
reply messages.
This routine is useful for users who wish to generate
.SM RPC
style messages without using the
.SM RPC
package.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
xprt_register(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
After
.SM RPC
service transport handles are created,
they should register themselves with the
.SM RPC
service package.
This routine modifies the global variable
.BR svc_fds(\|) .
Service implementors usually do not need this routine.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
xprt_unregister(xprt)
\s-1SVCXPRT\s0 *xprt;
.fi
.ft R
.IP
Before an
.SM RPC
service transport handle is destroyed,
it should unregister itself with the
.SM RPC
service package.
This routine modifies the global variable
.BR svc_fds(\|) .
Service implementors usually do not need this routine.
.SH SEE ALSO
.BR xdr (3N),
.BR keyserv (8C)
.LP
.TX NETP
R svc_getreqset(\|) .
.br
.if t .ne 17
.LP
.ft B
.nf
.sp .5
svc_getreqset(rdfds)
fd_set *rdfds;
.fi
.ft R
.IP
This routine is only of interest if a service implementor
d./share/man/man3/rpc_createrr.3n                                                                       755       0      12           72  4424741320  11557                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)rpc_createrr.3n 1.4 89/03/27 SMI;
   <T  
  rpow.3x   <h  
  	rquota.3r <h  <  
  rresvport.3n  
  <  
  rstat.3r  <  <  
  rtime.3n  <  <  
  
ruserok.3n   <  
  rwall.3r  <  <  
  saveterm.3v   <  
  
savetty.3v   =  
  
savetty.3x   =   
  scalb.3m  =   =4  
  	scalbn.3m =4  =H  
  	scandir.3 =H  =\  
  scanf.3s  =\  =p  
  scanf.3v  =p  =  
  scanw.3v  =  =  
  scanw.3x  =  =  
  	scroll.3v =  =  
  	scroll.3./share/man/man3/rpc_functions.3n                                                                      755       0      12         1726  4424741320  12027                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rpc_functions.3n 1.7 89/03/27 SMI; 
.ig
.TH RPC_FUNCTIONS 3N
.SH NAME
auth_destroy, authnon_create, authdes_create, authdes_getcred,
authunix_create, authunix_create_default, callrpc,
clnt_broadcast, clnt_call, clnt_destroy, clnt_freeres,
clnt_geterr, clnt_pcreateerror, clnt_perrno, clnt_perror,
clnt_sperrno, clnt_sperror, clntraw_create, clnttcp_create,
clntudp_create, host2netname, key_decryptsession,
key_encryptsession, key_gendes, key_setsecret, get_myaddress,
getnetname, netname2host, netname2user, pmap_getmaps,
pmap_getport, pmap_rmtcall, pmap_set, pmap_unset, registerrpc,
rpc_createrr, svc_destroy, svc_fds, svc_freeargs, svc_getargs,
svc_getcaller, svc_getreq, svc_register, svc_run,
svc_sendreply, svc_unregister, svcerr_auth, svcerr_decode,
svcerr_noproc, svcerr_noprog, svcerr_progvers, svcerr_systemerr,
svcerr_weakauth, svcraw_create, svctcp_create, svcfd_create,
svcudp_create, user2netname \- RPC functions, see rpc(3N)
.SH
..
.so /usr/man/man3/rpc.3n

  
sethostent.3n  \  ?  
  setjmp.3./share/man/man3/rpow.3x                                                                               755       0      12           61  4424741320  10103                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)rpow.3x 1.4 89/03/27 SMI;
 
  rresvport.3n a.3  <  
  rstat.3r por  <  
  rtime.3n sta  <  
  
ruserok.3n m  <  
  rwall.3r use  <  
  saveterm.3v   <  
  
savetty.3v e  =  
  
savetty.3x e  =   
  scalb.3m ave  =4  
  	scalbn.3m al  =H  
  	scandir.3 al  =\  
  scanf.3s can  =p  
  scanf.3v can  =  
  scanw.3v can  =  
  scanw.3x can  =  
  	scroll.3v an  =  
  	scroll.3x ro  =  
  scrollok.3v   =  
  scrollok.3x   >   
./share/man/man3/rquota.3r                                                                             755       0      12         1160  4424741320  10462                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rquota.3r 1.9 89/03/27 SMI;
.TH RQUOTA 3R "6 October 1987"
.SH NAME
rquota \- implement quotas on remote machines
.SH PROTOCOL
.B /usr/include/rpcsvc/rquota.x
.SH DESCRIPTION
.IX "rquota function" "" "\fLrquota()\fP function"
.LP
The
.B rquota(\|)
protocol inquires about quotas on remote machines.
It is used in conjunction with
.SM NFS\s0,
since
.SM NFS
itself does not implement quotas.
.SH PROGRAMMING
.LP
.B #include <rpcsvc/rquota.h>
.LP
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B xdr_getquota_arg
.B xdr_getquota_rslt
.B xdr_rquota
.fi
.SH SEE ALSO
.BR quota (1),
.BR quotactl (2)
  >t  
  	setbuf.3s >t  >  
  	setbuf.3v >  >  
  setbuffer.3s  
  >  
  setbuffer.3v  
  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3  ?   ?4  
  	setgid.3v ?4  ?H  
  setgraent.3   ?\  
  
setgrent.3 \  ?t  
  
sethostent.3n 
  ?  
  setjmp.3  ?  ?  
  	setjmp.3v ?  ?  
  setkey.3  ?./share/man/man3/rresvport.3n                                                                          755       0      12           71  4424741321  11152                                                                                                                                                                                                                                                                                                                                                                      .so man3/rcmd.3n
.\" @(#)rresvport.3n 1.5 89/03/27 SMI; 
 
  rtime.3n  <  <  
  
ruserok.3n   <  
  rwall.3r n   <  
  saveterm.3v   <  
  
savetty.3v    =  
  
savetty.3x   =   
  scalb.3m x   =4  
  	scalbn.3m =   =H  
  	scandir.3 =4  =\  
  scanf.3s  =H  =p  
  scanf.3v  =\  =  
  scanw.3v  =p  =  
  scanw.3x  =  =  
  	scroll.3v =  =  
  	scroll.3x =  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(./share/man/man3/rstat.3r                                                                              755       0      12         2046  4424741321  10311                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rstat.3r 1.11 89/03/27 SMI;
.TH RSTAT 3R "6 October 1987"
.SH NAME
rstat \- get performance data from remote kernel
.SH PROTOCOL
.B /usr/include/rpcsvc/rstat.x
.SH DESCRIPTION
.IX rstat "" "\fLrstat\fR \(em performance data from remote kernel"
.IX havedisk "" "\fLhavedisk\fR \(em disk inquiry of remote kernel"
.IX "remote kernel performance"
The
.B rstat(\|)
protocol is used to gather statistics from remote kernel.
Statistics are available on items such as
paging, swapping and cpu utilization.
.SH PROGRAMMING
.nf
.B #include <rpcsvc/rstat.h>
.LP
.B havedisk(host)
.B	char *host;
.LP
.B rstat(host, statp)
.B	char *host;
.B	struct statstime *statp;
.fi
.LP
.B havedisk(\|)
returns 1 if
.I host
has a disk, 0 if it does not,
and \-1 if this cannot be determined.
.B rstat(\|)
fills in the
.B statstime
structure for
.IR host ,
and returns 0 if it was successful.
.LP
The following
.SM XDR
routines are available in
.BR  librpcsvc :
.nf
.B xdr_statstime
.B xdr_statsswtch
.B xdr_stats
.fi
.SH SEE ALSO
.BR perfmeter (1),
.BR rup (1C),
.BR rstatd (8C)

  setlogmask.3  @   
  setlogmask.3  
  setlogmask.3 f.3v 
  @   
  setlogmask.3  
  @   
  setlogmask.3  
ckage.
This routine modifies the global variable
.BR svc_fds(\|) .
Service implementors usually do not need this routine.
.SH SEE ALSO
.BR xdr (3N),
.BR keyserv (8C)
.LP
.TX NETP
R svc_getreqset(\|) .
.br
.if t .ne 17
.LP
.ft B
.nf
.sp .5
svc_getreqset(rdfds)
fd_set *rdfds;
.fi
.ft R
.IP
This routine is only of interest if a service implementor
d./share/man/man3/rtime.3n                                                                              755       0      12         1776  4424741321  10301                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rtime.3n 1.10 89/03/27 SMI
.TH RTIME 3  "25 March 1989"
.SH NAME
rtime \- get remote time
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/time.h>
.B #include <netinet/in.h>
.LP
.B int rtime(addrp, timep, timeout)
.B struct sockaddr_in \(**addrp;
.B struct timeval \(**timep;
.B struct timeval \(**timeout;
.fi
.SH DESCRIPTION
.IX "rtime function" "" "\fLrtime()\fP function"
.LP
.B rtime(\|)
consults the Internet Time Server at the address pointed to by
.I addrp
and returns the remote time in the
.B timeval
struct pointed to by
.IR timep .
Normally, the
.SM UDP
protocol is used when consulting the Time Server. The
.I timeout
parameter specifies how long the
routine should wait before giving
up when waiting for a reply.  If
.I timeout
is specified as
.SM NULL\s0,
however, the routine will instead use
.SM TCP
and block until a reply is received from the time server.
.LP
The routine returns 0 if it is successful. Otherwise,
it returns \-1 and
.B errno
is set to reflect the cause of the error.
ma./share/man/man3/ruserok.3n                                                                            755       0      12           67  4424741321  10603                                                                                                                                                                                                                                                                                                                                                                      .so man3/rcmd.3n
.\" @(#)ruserok.3n 1.5 89/03/27 SMI; 
  saveterm.3v   <  
  
savetty.3v    =  
  
savetty.3x    =   
  scalb.3m x m  =4  
  	scalbn.3m  .  =H  
  	scandir.3 y.  =\  
  scanf.3s  3m  =p  
  scanf.3v  .3  =  
  scanw.3v ir.  =  
  scanw.3x .3s  =  
  	scroll.3v 3v  =  
  	scroll.3x 3v  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 er  >P  
  set_term.3v   >`  
./share/man/man3/rwall.3r                                                                              755       0      12         1304  4424741322  10272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rwall.3r 1.9 89/03/27 SMI;
.TH RWALL 3R "6 October 1987"
.SH NAME
rwall \- write to specified remote machines
.SH SYNOPSIS
.ft B
.nf
#include <rpcsvc/rwall.h>
.LP
.ft B
rwall(host, msg);
	char *host, *msg;
.ft R
.fi
.SH DESCRIPTION
.IX rwall "" "\fLrwall\fR \(em write to specified remote machines"
.LP
.I host
prints the string
.I msg
to all its users.
It returns 0 if successful.
.SH RPC INFO
.LP
.nf
.B program number:
.B 	\s-1WALLPROG\s0
.LP
.B procs:
.B 	\s-1WALLPROC_WALL\s0
		Takes string as argument (wrapstring), returns no arguments.
		Executes \fIwall\fP on remote host with string.
.B versions:
.B 	\s-1RSTATVERS_ORIG\s0
.fi
.SH SEE ALSO
.BR rwall (1C),
.BR rwalld (8C),
.BR shutdown (8)
  
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3      ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @ of the error.
ma./share/man/man3/saveterm.3v                                                                           755       0      12           71  4424741322  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)saveterm.3v 1.4 89/03/27 SMI;
 
savetty.3x    =   
  scalb.3m x    =4  
  	scalbn.3m     =H  
  	scandir.3  m  =\  
  scanf.3s   .  =p  
  scanf.3v  y.  =  
  scanw.3v  3m  =  
  scanw.3x  .3  =  
  	scroll.3v r.  =  
  	scroll.3x 3s  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	./share/man/man3/savetty.3v                                                                            755       0      12           70  4424741322  10613                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)savetty.3v 1.4 89/03/27 SMI;
  scalb.3m x    =4  
  	scalbn.3m     =H  
  	scandir.3     =\  
  scanf.3s   m  =p  
  scanf.3v   .  =  
  scanw.3v  y.  =  
  scanw.3x  3m  =  
  	scroll.3v .3  =  
  	scroll.3x r.  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  ./share/man/man3/savetty.3x                                                                            755       0      12           71  4424741322  10616                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)savetty.3x 1.5 89/03/27 SMI; 
 	scalbn.3m     =H  
  	scandir.3     =\  
  scanf.3s      =p  
  scanf.3v   m  =  
  scanw.3v   .  =  
  scanw.3x  y.  =  
  	scroll.3v 3m  =  
  	scroll.3x .3  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
./share/man/man3/scalb.3m                                                                              755       0      12           72  4424741322  10171                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_test.3m
.\" @(#)scalb.3m 1.6 89/03/27 SMI; 
 	scandir.3     =\  
  scanf.3s      =p  
  scanf.3v      =  
  scanw.3v   m  =  
  scanw.3x   .  =  
  	scroll.3v y.  =  
  	scroll.3x 3m  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >./share/man/man3/scalbn.3m                                                                             755       0      12           77  4424741323  10355                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)scalbn.3m 1.3 89/03/27 SMI;
nf.3s      =p  
  scanf.3v      =  
  scanw.3v      =  
  scanw.3x   m  =  
  	scroll.3v  .  =  
  	scroll.3x y.  =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >./share/man/man3/scandir.3                                                                             755       0      12         3334  4424741323  10420                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)scandir.3 1.13 89/03/27 SMI; from UCB 4.2
.TH SCANDIR 3  "22 March 1989"
.SH NAME
scandir, alphasort \- scan a directory
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/dir.h>
.LP
.B scandir(dirname, &namelist, select, compar)
.B char *dirname;
.B struct direct **namelist;
.B int (*select)(\|);
.B int (*compar)(\|);
.LP
.B alphasort(d1, d2)
.B struct direct **d1, **d2;
.fi
.IX  "scandir function"  ""  "\fLscandir\fP \(em scan directory"
.IX  "alphasort function"  ""  "\fLalphasort\fP \(em sort directory"
.IX  "scan directory scandir"  ""   "scan directory \(em \fLscandir\fP"
.IX  "scan directory alphasort"  ""   "scan directory \(em \fLalphasort\fP"
.IX  directory  scan
.SH DESCRIPTION
.B scandir(\|)
reads the directory
.B dirname
and builds an array of pointers to directory entries using
.BR malloc (3).
The second parameter is a pointer to an array of structure pointers.
The third parameter is a pointer to a routine which is called with a
pointer to a directory entry and should return a non zero
value if the directory entry should be included in the array.
If this pointer is
.SM NULL\s0,
then all the directory entries will be included.
The last argument is a pointer to a routine which is passed to
.BR qsort (3)
to sort the completed array. If this pointer is
.SM NULL\s0,
the array is not sorted.
.B alphasort(\|)
is a routine which will sort the array alphabetically.
.LP
.B scandir(\|)
returns the number of entries in the array and a pointer to the
array through the parameter
.I namelist.
.SH "SEE ALSO"
.BR directory (3),
.BR malloc (3),
.BR qsort (3)
.SH DIAGNOSTICS
Returns \-1 if the directory cannot be opened for reading or if
.BR malloc (3)
cannot allocate enough memory to hold all the data structures.
ads the directory
.B dirname
and builds an array of pointers to directory entries using
.BR malloc (3).
The second parameter is a pointer to an array of structure pointers.
The third parameter is a pointer to a routine which is called with a
pointer to a directory entry and should return a n./share/man/man3/scanf.3s                                                                              755       0      12        24405  4424741323  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)scanf.3s 1.19 89/03/27 SMI; from UCB 4.3 and S5R3
.TH SCANF 3S "18 November 1987"
.SH NAME
scanf, fscanf, sscanf \- formatted input conversion
.SH SYNOPSIS
.LP
.B #include <stdio.h>
.LP
.B scanf(format
.B "[ , pointer ] .\|.\|. )"
.br
.B char *format;
.LP
.B fscanf(stream, format
.B "[ , pointer ] \&.\|.\|. )"
.br
.SB FILE
.B *stream;
.br
.B char *format;
.LP
.B sscanf(s, format
.B "[ , pointer ] \&.\|.\|. )"
.br
.B char \(**s, \(**format;
.SH DESCRIPTION
.IX  "formatted input conversion"  scanf  ""  "\fLscanf\fP \(em convert from stdin"
.IX  "formatted input conversion"  fscanf  ""  "\fLfscanf\fP \(em convert from stream"
.IX  "formatted input conversion"  sscanf  ""  "\fLsscanf\fP \(em convert from string"
.IX  "input conversion"  scanf  ""  "\fLscanf\fP \(em convert from stdin"
.IX  "input conversion"  fscanf  ""  "\fLfscanf\fP \(em convert from stream"
.IX  "input conversion"  sscanf  ""  "\fLsscanf\fP \(em convert from string"
.IX  "scanf function"  ""  "\fLscanf\fP \(em convert from stdin"
.IX  "fscanf function"  ""  "\fLfscanf\fP \(em convert from stream"
.IX  "sscanf function"  ""  "\fLsscanf\fP \(em convert from string"
.IX  stream  "input conversion"  stream  "input conversion \(em \fLscanf\fP"
.IX  stdin  "input conversion"  stdin  "input conversion \(em \fLscanf\fP"
.IX  string  "number conversion"  string  "number conversion \(em \fLscanf\fP"
.IX  "read formatted"  scanf  ""  "\fLscanf\fP \(em convert from stdin"
.IX  "read formatted"  fscanf  ""  "\fLfscanf\fP \(em convert from stream"
.IX  "read formatted"  sscanf  ""  "\fLsscanf\fP \(em convert from string"
.IX  "convert strings to numbers"  sscanf  ""  \fLsscanf\fP
.LP
.B scanf(\|)
reads from the standard input stream
.BR stdin .
.B fscanf(\|)
reads from the named input
stream.
.B sscanf(\|)
reads from the character string
.IR s .
Each function reads characters, interprets
them according to a format, and stores the results in its arguments.
Each expects, as arguments,
a control string
.IR format ,
described below, and a set of
.I pointer
arguments
indicating where the converted input should be stored.
The results are undefined in there are insufficient
.IR arg s
for the format.  If the format is exhausted while
.IR arg s
remain, the excess
.IR arg s
are simply ignored.
.LP
The control string usually contains
conversion specifications, which are used to direct interpretation
of input sequences.
The control string may contain:
.RS
.LP
.PD 0
.TP 3
1.
White-space characters (\c
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE\s0)
which, except in two cases described below,
cause input to be read up to the next
non-white-space character.
.TP
2.
An ordinary character (not
.RB ` % '),
which must match the next character of the input stream.
.TP
3.
Conversion specifications, consisting of the
character
.RB ` % ',
an optional assignment suppressing character
.RB ` \(** ',
an optional numerical maximum field width, an optional
.BR l " (ell) or " h
indicating the size of the receiving variable, and a conversion code.
.PD
.RE
.LP
A conversion specification directs the conversion of the
next input field; the result
is placed in the variable pointed to by the corresponding argument,
unless assignment suppression was
indicated by
.RB ` \(** '.
The suppression of assignment provides a way of describing an
input field which is to be skipped.
An input field is defined as a string of non-space characters;
it extends to the next inappropriate character or until the field
width, if specified, is exhausted.
For all descriptors except ``['' and ``c'',
white space leading an input field is ignored.
.LP
The conversion character indicates the interpretation of the
input field; the corresponding pointer argument must
usually be of a restricted type.
For a suppressed field, no pointer argument is given.
The following conversion characters are legal:
.RS
.LP
.PD 0
.TP
.B %
A single
.B %
is expected in the input at this point; no assignment is done.
.TP
.B d
A decimal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B u
An unsigned decimal integer is expected;
the corresponding argument should be an unsigned integer pointer.
.TP
.B o
An octal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B x
A hexadecimal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B i
An integer is expected; the corresponding argument should be an integer
pointer. It will store the value of the next input item interpreted
according to C conventions: a leading ``0'' implies octal; a leading ``0x''
implies hexadecimal; otherwise, decimal.
.TP
.B n
Stores in an integer argument the total number of characters
(including white space) that have been scanned so far
since the function call. No input is consumed.
.br
.ne 8
.TP
.BR e , f , g
A floating point number is expected;
the next field is converted accordingly and stored through the
corresponding argument, which should be a pointer to a
.IR float .
The input format for floating point numbers is as described for
.BR string_to_decimal (3),
with
.I fortran_exponent
zero.
.TP
.B s
A character string is expected;
the corresponding argument should be a character pointer
pointing to an array of characters large enough to accept the
string and a terminating
.BR \e0 ,
which will be added automatically.
The input field is terminated by a white space character.
.TP
.B c
A character is expected; the
corresponding argument should be a character pointer.
The normal skip over white space is suppressed in this case;
to read the next non-space character, use
.BR %1s .
If a field width is given, the corresponding argument
should refer to a character array, and the
indicated number of characters is read.
.TP
.B [
Indicates string data; the normal skip over leading white space
is suppressed.  The left bracket is followed by a set of characters,
which we will call the
.IR scanset ,
and a right bracket; the input field is the maximal
sequence of input characters consisting entirely of
characters in the scanset.
The circumflex
.RB ( \|\s+2^\s0\| ),
when it appears as the first character in the scanset,
serves as a complement operator and redefines the scanset as
the set of all characters
.I not
contained in the remainder of the scanset string.
There are some conventions used in the construction of the scanset.
A range of characters may be represented by the construct
.IR first\-last ,
thus [0123456789] may be expressed [0\-9].  Using this convention,
.I first
must be lexically less than or equal to
.IR last ,
or else the dash will stand for itself.  The dash will also stand for
itself whenever it is the first or the last character in the scanset.
To include the right square bracket as an element of the scanset,
it must appear as the first character (possibly preceded by a
circumflex) of the scanset, and in this case it will not
be syntactically interpreted as the closing bracket.
The corresponding argument must point to a character array large
enough to hold the data field and the terminating
.BR \e0 ,
which will be added automatically.
At least one character must match
for this conversion to be considered successful.
.PD
.RE
.LP
The conversion characters
.BR d ,
.BR u ,
.BR o ,
.BR x ,
and
.B i
may be preceded by
.B l
or
.B h
to indicate that a pointer to
.B long
or to
.B short
rather than to
.B int
is in the argument list.  Similarly, the conversion characters
.BR e ,
.BR f ,
and
.BR g
may be preceded by
.B l
to indicate that a pointer to
.B double
rather than to
.B float
is in the argument list.  The
.BR l " or " h
modifier is ignored for other conversion characters.
.LP
.I Avoid this common error:
because
.BR printf (3S)
does not require that the lengths of conversion descriptors
and actual parameters match, coders sometimes are careless with the
.B scanf(\|)
functions.
But converting %f to &double or %lf to &float
.IR "does not work" ;
the results are quite incorrect.
.LP
.B scanf(\|)
conversion terminates at
.SM EOF\s0,
at the end of the control string,
or when an input character conflicts with
the control string.
In the latter case, the offending character
is left unread in the input stream.
.LP
.B scanf(\|)
returns the number of successfully matched and assigned input
items; this number can be zero
in the event of an early conflict between an input
character and the control string.
The constant
.SM EOF
is returned upon end of input. Note: this is different
from 0, which means that no conversion was done;
if conversion was intended, it was frustrated by an
inappropriate character in the input.
.LP
If the input ends before the first conflict or conversion,
.SM EOF
is returned.  If the input ends after the first conflict or conversion,
the number of successfully matched items is returned.
.SH EXAMPLES
The call:
.RS
.nf
.ft B
int \|i, \|n; \|float \|x; \|char \|name[50];
n = scanf\|("%d%f%s", \|&i, \|&x, \|name);
.fi
.ft R
.RE
.LP
with the input line:
.RS
.B "25 \|54.32E\(mi1 \|thompson"
.RE
.LP
will assign to
.I n
the value
.BR 3 ,
to
.I i
the value
.BR 25 ,
to
.I x
the value
.BR 5.432 ,
and
.I name
will contain
.BR thompson\e0 .
Or:
.RS
.sp .5
.nf
.ft B
int \|i, \|j; \|float \|x; \|char \|name[50];
(void) scanf\|("%i%2d%f%\(**d %[0\-9]", \|&j, \|&i, \|&x, \|name);
.ft R
.fi
.RE
.LP
with input:
.LP
.RS
.sp .5
.B 011 \|56789 \|0123 \|56a72
.RE
.LP
will assign
.B 9
to
.IR j ,
.B 56
to
.IR i ,
.B 789.0
to
.IR x ,
skip
.BR 0123 ,
and place the string
.B 56\e0
in
.IR name .
The next call to
.B getchar(\|)
(see
.BR getc (3S))
will return
.BR a .
Or:
.RS
.sp .5
.nf
.ft B
int \|i, \|j, \|s, \|e; \|char \|name[50];
(void) scanf\|("%i %i %n%s%n", \|&i, \|&j, \|&s, \|name, \|&e);
.ft R
.fi
.RE
.LP
with input:
.RS
.sp .5
.B 0x11 \|0xy \|johnson
.RE
.LP
will assign
.B 17
to
.IR i ,
.B 0
to
.IR j ,
.B 6
to
.IR s ,
will place the string
.B xy\e0
in
.IR name ,
and will assign
.B 8
to
.IR e .
Thus, the length of
.IR name
is
.I e
\-
.I s
= 2.
The next call to
.B getchar(\|)
(see
.BR getc (3S))
will return a
.SM SPACE\s0.
.SH "SEE ALSO"
.BR getc (3S),
.BR printf (3S),
.BR scanf (3V),
.BR stdio (3S),
.BR string_to_decimal (3),
.BR strtol (3)
.SH DIAGNOSTICS
.LP
These functions return
.SM EOF
on end of input,
and a short count for missing or illegal data items.
.SH BUGS
.LP
The success of literal matches and suppressed
assignments is not directly
determinable.
.SH WARNINGS
.LP
Trailing white space (including a
.SM NEWLINE\s0)
is left unread unless matched in the control string.
reads from the character string
.IR s .
Each function reads characters, interprets
them according to a format, and stores the results in its arguments.
Each expects, as arguments,
a control string
.IR format ,
described below, and a set of
.I pointer
./share/man/man3/scanf.3v                                                                              755       0      12        24724  4424741323  10303                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)scanf.3v 1.18 89/03/27 SMI; from UCB 4.3 and S5R3
.TH SCANF 3V "22 March 1989"
.SH NAME
scanf, fscanf, sscanf \- formatted input conversion
.SH SYNOPSIS
.LP
.B #include <stdio.h>
.LP
.B scanf(format
.B "[ , pointer ] .\|.\|. )"
.br
.B char *format;
.LP
.B fscanf(stream, format
.B "[ , pointer ] \&.\|.\|. )"
.br
.SB FILE
.B *stream;
.br
.B char *format;
.LP
.B sscanf(s, format
.B "[ , pointer ] \&.\|.\|. )"
.br
.B char \(**s, \(**format;
.SH DESCRIPTION
.IX  "formatted input conversion"  "scanf V"  ""  "\fLscanf\fP \(em convert from stdin, System V"
.IX  "formatted input conversion"  "fscanf V"  ""  "\fLfscanf\fP \(em convert from stream, System V"
.IX  "formatted input conversion"  "sscanf V"  ""  "\fLsscanf\fP \(em convert from string, System V"
.IX  "input conversion"  "scanf V"  ""  "\fLscanf\fP \(em convert from stdin, System V"
.IX  "input conversion"  "fscanf V"  ""  "\fLfscanf\fP \(em convert from stream, System V"
.IX  "input conversion"  "sscanf V"  ""  "\fLsscanf\fP \(em convert from string, System V"
.IX  "scanf function V"  ""  "\fLscanf\fP \(em convert from stdin, System V"
.IX  "fscanf function V"  ""  "\fLfscanf\fP \(em convert from stream, System V"
.IX  "sscanf function V"  ""  "\fLsscanf\fP \(em convert from string, System V"
.IX  stream  "input conversion V"  stream  "input conversion, System V \(em \fLscanf\fP"
.IX  stdin  "input conversion V"  stdin  "input conversion, System V \(em \fLscanf\fP"
.IX  string  "number conversion V"  string  "number conversion, System V \(em \fLscanf\fP"
.IX  "read formatted"  "scanf V"  ""  "\fLscanf\fP \(em convert from stdin, System V"
.IX  "read formatted"  "fscanf V"  ""  "\fLfscanf\fP \(em convert from stream, System V"
.IX  "read formatted"  "sscanf V"  ""  "\fLsscanf\fP \(em convert from string, System V"
.IX  "convert strings to numbers, System V"  ""  "convert strings to numbers, System V \(em \fLsscanf\fR"
.LP
.B scanf(\|)
reads from the standard input stream
.BR stdin .
.B fscanf(\|)
reads from the named input
stream.
.B sscanf(\|)
reads from the character string
.IR s .
Each function reads characters, interprets
them according to a format, and stores the results in its arguments.
Each expects, as arguments,
a control string
.IR format ,
described below, and a set of
.I pointer
arguments
indicating where the converted input should be stored.
The results are undefined in there are insufficient
.IR arg s
for the format.  If the format is exhausted while
.IR arg s
remain, the excess
.IR arg s
are simply ignored.
.LP
The control string usually contains
conversion specifications, which are used to direct interpretation
of input sequences.
The control string may contain:
.RS
.LP
.PD 0
.TP 3
1.
White-space characters (\c
.SM SPACE\s0,
.SM TAB\s0,
.SM NEWLINE\s0,
or
.SM FORMFEED\s0)
which, except in two cases described below,
cause input to be read up to the next
non-white-space character.
.TP
2.
An ordinary character (not
.RB ` % '),
which must match the next character of the input stream.
.TP
3.
Conversion specifications, consisting of the
character
.RB ` % ',
an optional assignment suppressing character
.RB ` \(** ',
an optional numerical maximum field width, an optional
.BR l " (ell) or " h
indicating the size of the receiving variable, and a conversion code.
.PD
.RE
.LP
A conversion specification directs the conversion of the
next input field; the result
is placed in the variable pointed to by the corresponding argument,
unless assignment suppression was
indicated by
.RB ` \(** '.
The suppression of assignment provides a way of describing an
input field which is to be skipped.
An input field is defined as a string of non-space characters;
it extends to the next inappropriate character or until the field
width, if specified, is exhausted.
For all descriptors except ``['' and ``c'',
white space leading an input field is ignored.
.LP
The conversion character indicates the interpretation of the
input field; the corresponding pointer argument must
usually be of a restricted type.
For a suppressed field, no pointer argument is given.
The following conversion characters are legal:
.RS
.LP
.PD 0
.TP
.B %
A single
.B %
is expected in the input at this point; no assignment is done.
.TP
.B d
A decimal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B u
An unsigned decimal integer is expected;
the corresponding argument should be an unsigned integer pointer.
.TP
.B o
An octal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B x
A hexadecimal integer is expected;
the corresponding argument should be an integer pointer.
.TP
.B i
An integer is expected; the corresponding argument should be an integer
pointer. It will store the value of the next input item interpreted
according to C conventions: a leading ``0'' implies octal; a leading ``0x''
implies hexadecimal; otherwise, decimal.
.TP
.B n
Stores in an integer argument the total number of characters
(including white space) that have been scanned so far
since the function call. No input is consumed.
.TP
.BR e , f , g
A floating point number is expected;
the next field is converted accordingly and stored through the
corresponding argument, which should be a pointer to a
.IR float .
The input format for floating point numbers is as described for
.BR string_to_decimal (3),
with
.I fortran_exponent
zero.
.TP
.B s
A character string is expected;
the corresponding argument should be a character pointer
pointing to an array of characters large enough to accept the
string and a terminating
.BR \e0 ,
which will be added automatically.
The input field is terminated by a white space character.
.TP
.B c
A character is expected; the
corresponding argument should be a character pointer.
The normal skip over white space is suppressed in this case;
to read the next non-space character, use
.BR %1s .
If a field width is given, the corresponding argument
should refer to a character array, and the
indicated number of characters is read.
.TP
.B [
Indicates string data; the normal skip over leading white space
is suppressed.  The left bracket is followed by a set of characters,
which we will call the
.IR scanset ,
and a right bracket; the input field is the maximal
sequence of input characters consisting entirely of
characters in the scanset.
The circumflex
.RB ( \|\s+2^\s0\| ),
when it appears as the first character in the scanset,
serves as a complement operator and redefines the scanset as
the set of all characters
.I not
contained in the remainder of the scanset string.
There are some conventions used in the construction of the scanset.
A range of characters may be represented by the construct
.IR first\-last ,
thus [0123456789] may be expressed [0\-9].  Using this convention,
.I first
must be lexically less than or equal to
.IR last ,
or else the dash will stand for itself.  The dash will also stand for
itself whenever it is the first or the last character in the scanset.
To include the right square bracket as an element of the scanset,
it must appear as the first character (possibly preceded by a
circumflex) of the scanset, and in this case it will not
be syntactically interpreted as the closing bracket.
The corresponding argument must point to a character array large
enough to hold the data field and the terminating
.BR \e0 ,
which will be added automatically.
At least one character must match
for this conversion to be considered successful.
.PD
.RE
.LP
The conversion characters
.BR d ,
.BR u ,
.BR o ,
.BR x ,
and
.B i
may be preceded by
.B l
or
.B h
to indicate that a pointer to
.B long
or to
.B short
rather than to
.B int
is in the argument list.  Similarly, the conversion characters
.BR e ,
.BR f ,
and
.BR g
may be preceded by
.B l
to indicate that a pointer to
.B double
rather than to
.B float
is in the argument list.  The
.BR l " or " h
modifier is ignored for other conversion characters.
.LP
.I Avoid this common error:
because
.BR printf (3V)
does not require that the lengths of conversion descriptors
and actual parameters match, coders sometimes are careless with the
.B scanf(\|)
functions.
But converting %f to &double or %lf to &float
.IR "does not work" ;
the results are quite incorrect.
.LP
.B scanf(\|)
conversion terminates at
.SM EOF\s0,
at the end of the control string,
or when an input character conflicts with
the control string.
In the latter case, the offending character
is left unread in the input stream.
.LP
.B scanf(\|)
returns the number of successfully matched and assigned input
items; this number can be zero
in the event of an early conflict between an input
character and the control string.
The constant
.SM EOF
is returned upon end of input. Note: this is different
from 0, which means that no conversion was done;
if conversion was intended, it was frustrated by an
inappropriate character in the input.
.LP
If the input ends before the first conflict or conversion,
.SM EOF
is returned.  If the input ends after the first conflict or conversion,
the number of successfully matched items is returned.
.SH EXAMPLES
The call:
.RS
.nf
.ft B
int \|i, \|n; \|float \|x; \|char \|name[50];
n = scanf\|("%d%f%s", \|&i, \|&x, \|name);
.fi
.ft R
.RE
.LP
with the input line:
.RS
.B "25 \|54.32E\(mi1 \|thompson"
.RE
.LP
will assign to
.I n
the value
.BR 3 ,
to
.I i
the value
.BR 25 ,
to
.I x
the value
.BR 5.432 ,
and
.I name
will contain
.BR thompson\e0 .
Or:
.RS
.nf
.ft B
int \|i, \|j; \|float \|x; \|char \|name[50];
(void) scanf\|("%i%2d%f%\(**d %[0\-9]", \|&j, \|&i, \|&x, \|name);
.ft R
.fi
.RE
.LP
with input:
.LP
.RS
.B 011 \|56789 \|0123 \|56a72
.RE
.LP
will assign
.B 9
to
.IR j ,
.B 56
to
.IR i ,
.B 789.0
to
.IR x ,
skip
.BR 0123 ,
and place the string
.B 56\e0
in
.IR name .
The next call to
.B getchar(\|)
(see
.BR getc (3S))
will return
.BR a .
Or:
.RS
.nf
.ft B
int \|i, \|j, \|s, \|e; \|char \|name[50];
(void) scanf\|("%i %i %n%s%n", \|&i, \|&j, \|&s, \|name, \|&e);
.ft R
.fi
.RE
.LP
with input:
.RS
.B 0x11 \|0xy \|johnson
.RE
.LP
will assign
.B 17
to
.IR i ,
.B 0
to
.IR j ,
.B 6
to
.IR s ,
will place the string
.B xy\e0
in
.IR name ,
and will assign
.B 8
to
.IR e .
Thus, the length of
.IR name
is
.I e
\-
.I s
= 2.
The next call to
.B getchar(\|)
(see
.BR getc (3S))
will return a
.SM SPACE\s0.
.SH "SEE ALSO"
.BR getc (3S),
.BR printf (3V),
.BR stdio (3V),
.BR string_to_decimal (3),
.BR strtol (3),
.BR scanf (3S)
.SH DIAGNOSTICS
These functions return
.SM EOF
on end of input,
and a short count for missing or illegal data items.
.SH BUGS
The success of literal matches and suppressed
assignments is not directly
determinable.
.SH CAVEATS
Trailing white space (including a
.SM NEWLINE\s0)
is left unread unless matched in the control string.
ecifications, consisting of the
character
.R./share/man/man3/scanw.3v                                                                              755       0      12           66  4424741324  10236                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)scanw.3v 1.4 89/03/27 SMI;

  	scroll.3v     =  
  	scroll.3x     =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3 ./share/man/man3/scanw.3x                                                                              755       0      12           67  4424741324  10241                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)scanw.3x 1.5 89/03/27 SMI; 
  	scroll.3x     =  
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v  ./share/man/man3/scroll.3v                                                                             755       0      12           67  4424741324  10422                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)scroll.3v 1.4 89/03/27 SMI;
  scrollok.3v   =  
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3 ./share/man/man3/scroll.3x                                                                             755       0      12           70  4424741324  10416                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)scroll.3x 1.5 89/03/27 SMI; 
  scrollok.3x   >   
  seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3  ./share/man/man3/scrollok.3v                                                                           755       0      12           71  4424741324  10747                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)scrollok.3v 1.4 89/03/27 SMI;
 seconvert.3   >  
  	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3./share/man/man3/scrollok.3x                                                                           755       0      12           72  4424741325  10753                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)scrollok.3x 1.5 89/03/27 SMI; 
 	secret.3r 3   >(  
  seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3./share/man/man3/seconvert.3                                                                           755       0      12           72  4424741325  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)seconvert.3 1.3 89/03/27 SMI;
 seed48.3  3   ><  
  	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3./share/man/man3/secret.3r                                                                             755       0      12           72  4424741325  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/publickey.3r
.\" @(#)secret.3r 1.3 89/03/27 SMI;
 	seekdir.3 3   >P  
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3./share/man/man3/seed48.3                                                                              755       0      12           67  4424741325  10033                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)seed48.3 1.5 89/03/27 SMI; 
  set_term.3v   >`  
  setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlineb./share/man/man3/seekdir.3                                                                             755       0      12           72  4424741325  10361                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)seekdir.3 1.5 89/03/27 SMI; 
 setac.3   >t  
  	setbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlinebuf.3s ?  ?  
  
setl./share/man/man3/set_term.3v                                                                           755       0      12           71  4424741326  10743                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)set_term.3v 1.4 89/03/27 SMI;
etbuf.3s 3   >  
  	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  ./share/man/man3/setac.3                                                                               755       0      12           67  4424741326  10037                                                                                                                                                                                                                                                                                                                                                                      .so man3/getacinfo.3
.\" @(#)setac.3 1.3 89/03/27 SMI;
	setbuf.3v 3   >  
  setbuffer.3s  >  >  
  setbuffer.3v  >  >  
  	setegid.3 >  >  
  	seteuid.3 >  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  ./share/man/man3/setbuf.3s                                                                             755       0      12        11672  4424741326  10477                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setbuf.3s 1.16 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH SETBUF 3S "30 January 1988"
.SH NAME
setbuf, setbuffer, setlinebuf, setvbuf \- assign buffering to a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B setbuf(stream, buf)
.B \s-1FILE\s0 *stream;
.B char *buf;
.LP
.B setbuffer(stream, buf, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int size;
.LP
.B setlinebuf(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int setvbuf(stream, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, size;
.fi
.IX  "assign buffering to stream"  setbuf  ""  "\fLsetbuf\fP \(em assign buffering"
.IX  "assign buffering to stream"  setbuffer  ""  "\fLsetbuffer\fP \(em assign buffering"
.IX  "assign buffering to stream"  setlinebuf  ""  "\fLsetlinebuf\fP \(em assign buffering"
.IX  "assign buffering to stream"  setvbuf  ""  "\fLsetvbuf\fP \(em assign buffering"
.IX  stream  "assign buffering setbuf"  ""  "assign buffering \(em \fLsetbuf\fP"
.IX  stream  "assign buffering setbuffer"  ""  "assign buffering \(em \fLsetbuffer\fP"
.IX  stream  "assign buffering setlinebuffer"  ""  "assign buffering \(em \fLsetlinebuf\fP"
.IX  stream  "assign buffering setvbuffer"  ""  "assign buffering \(em \fLsetvbuf\fP"
.IX  buffering  "assign to stream setbuf" buffering  "assign to stream \(em \fLsetbuf\fP"
.IX  buffering  "assign to stream setbuffer" buffering  "assign to stream \(em \fLsetbuffer\fP"
.IX  buffering  "assign to stream setlinebuf" buffering  "assign to stream \(em \fLsetlinebuf\fP"
.IX  buffering  "assign to stream setvbuf" buffering  "assign to stream \(em \fLsetvbuf\fP"
.IX  "setbuf function"  ""  "\fLsetbuf\fP \(em assign buffering"
.IX  "setbuffer function"  ""  "\fLsetbuffer\fP \(em assign buffering"
.IX  "setlinebuf function"  ""  "\fLsetlinebuf\fP \(em assign buffering"
.IX  "setvbuf function"  ""  "\fLsetvbuf\fP \(em assign buffering"
.SH DESCRIPTION
The three types of buffering available are unbuffered, block buffered,
and line buffered.
When an output stream is unbuffered, information appears on the
destination file or terminal as soon as written;
when it is block buffered many characters are saved up and written as a block;
when it is line buffered characters are saved up until a
.SM NEWLINE
is encountered or input is read from
.BR stdin .
.B fflush(\|)
(see
.BR fclose (3S))
may be used to force the block out early.
Normally all files are block buffered.
A buffer is obtained from
.BR malloc (3)
upon the first
.B getc(\|)
or
.BR putc (3S)
on the file.
If the standard stream
.B stdout
refers to a terminal it is line buffered.
The standard stream
.B stderr
is unbuffered by default.
.LP
.B setbuf(\|)
can be used after a stream has been opened but before it is read or written.
It causes the array pointed to by
.I buf
to be used instead of an automatically allocated buffer.  If
.I buf
is the
.SM NULL
pointer, input/output will be completely unbuffered.
A manifest constant
.BR \s-1BUFSIZ\*S ,
defined in the
.B <stdio.h>
header file,
tells how big an array is needed:
.IP
.B char
.B buf[\s-1BUFSIZ\s0];
.LP
.BR setbuffer ,
an alternate form of
.BR setbuf ,
can be used after a stream has been opened but before it is read or written.
It uses the character array
.I buf
whose size is determined by the
.I size
argument instead of an automatically allocated buffer.  If
.I buf
is the
.SM NULL
pointer, input/output will be completely unbuffered.
.LP
.B setvbuf(\|)
can be used after a stream has been opened
but before it is read or written.
.I type
determines how
stream
will be buffered.  Legal values for
.I type
(defined in
.BR <stdio.h> )
are:
.TP .85i
.SB     _IOFBF
fully buffers the input/output.
.TP
.SB     _IOLBF
line buffers the output;
the buffer will be flushed when a
.SM NEWLINE
is written, the buffer is full, or input is requested.
.TP
.SB     _IONBF
completely unbuffers the input/output.
.LP
If
.I buf
is not the
.SM NULL
pointer, the array it points to
will be used for buffering, instead of an automatically allocated
buffer.
.I size
specifies the size of the buffer to be used.
.LP
.B setlinebuf(\|)
is used to change the buffering on a stream
from block buffered or unbuffered to line buffered.
Unlike
.BR setbuf ,
.BR setbuffer ,
and
.BR setvbuf ,
it can be used at any time that the file descriptor is active.
.LP
A file can be changed from unbuffered or line buffered to block buffered
by using
.B freopen(\|)
(see
.BR fopen (3S)).
A file can be changed from block buffered or line buffered to unbuffered
by using
.B freopen(\|)
followed by
.B setbuf(\|)
with a buffer argument of
.SM NULL\s0.
.SH NOTE
A common source of error is allocating buffer space
as an ``automatic'' variable in a code block, and then
failing to close the stream in the same block.
.SH "SEE ALSO"
.BR fclose (3S),
.BR fopen (3S),
.BR fread (3S),
.BR getc (3S),
.BR malloc (3),
.BR printf (3S),
.BR putc (3S),
.BR puts (3S),
.BR setbuf (3V)
.SH "DIAGNOSTICS"
If an illegal value for
.I type
or
.I size
is provided,
.B setvbuf(\|)
returns a non-zero value.
Otherwise, the value returned will be zero.
uf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setbuf.3v                                                                             755       0      12        12300  4424741326  10467                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setbuf.3v 1.12 89/03/27 SMI; from UCB 4.3 BSD and S5
.TH SETBUF 3V "30 January 1988"
.SH NAME
setbuf, setbuffer, setlinebuf, setvbuf \- assign buffering to a stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B setbuf(stream, buf)
.B \s-1FILE\s0 *stream;
.B char *buf;
.LP
.B setbuffer(stream, buf, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int size;
.LP
.B setlinebuf(stream)
.B \s-1FILE\s0 *stream;
.LP
.B int setvbuf(stream, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, size;
.fi
.IX  "assign buffering to stream"  "setbuf V"  ""  "\fLsetbuf\fP \(em assign buffering, System V"
.IX  "assign buffering to stream"  "setbuffer V"  ""  "\fLsetbuffer\fP \(em assign buffering, System V"
.IX  "assign buffering to stream"  "setlinebuf V"  ""  "\fLsetlinebuf\fP \(em assign buffering, System V"
.IX  "assign buffering to stream"  "setvbuf V"  ""  "\fLsetvbuf\fP \(em assign buffering, System V"
.IX  stream  "assign buffering setbuf V"  ""  "assign buffering, System V \(em \fLsetbuf\fP"
.IX  stream  "assign buffering setbuffer V"  ""  "assign buffering, System V \(em \fLsetbuffer\fP"
.IX  stream  "assign buffering setlinebuffer V"  ""  "assign buffering, System V \(em \fLsetlinebuf\fP"
.IX  stream  "assign buffering setvbuffer V"  ""  "assign buffering, System V \(em \fLsetvbuf\fP"
.IX  buffering  "assign to stream setbuf V" buffering  "assign to stream, System V \(em \fLsetbuf\fP"
.IX  buffering  "assign to stream setbuffer V" buffering  "assign to stream, System V \(em \fLsetbuffer\fP"
.IX  buffering  "assign to stream setlinebuf V" buffering  "assign to stream, System V \(em \fLsetlinebuf\fP"
.IX  buffering  "assign to stream setvbuf V" buffering  "assign to stream, System V \(em \fLsetvbuf\fP"
.IX  "setbuf function V"  ""  "\fLsetbuf\fP \(em assign buffering, System V"
.IX  "setbuffer function V"  ""  "\fLsetbuffer\fP \(em assign buffering, System V"
.IX  "setlinebuf function V"  ""  "\fLsetlinebuf\fP \(em assign buffering, System V"
.IX  "setvbuf function V"  ""  "\fLsetvbuf\fP \(em assign buffering, System V"
.SH DESCRIPTION
The three types of buffering available are unbuffered, block buffered,
and line buffered.
When an output stream is unbuffered, information appears on the
destination file or terminal as soon as written;
when it is block buffered many characters are saved up and written as a block;
when it is line buffered characters are saved up until a
.SM NEWLINE
is encountered or input is read from any line buffered input stream.
.B fflush(\|)
(see
.BR fclose (3S))
may be used to force the block out early.
Normally all files are block buffered.
A buffer is obtained from
.BR malloc (3)
upon the first
.B getc(\|)
or
.BR putc (3S)
on the file.
.LP
By default, output to a terminal is line buffered, except for output to the
standard stream
.B stderr
which is unbuffered, and all other input/output is fully buffered.
.LP
.B setbuf(\|)
can be used after a stream has been opened but before it is read or written.
It causes the array pointed to by
.I buf
to be used instead of an automatically allocated buffer.  If
.I buf
is the
.SM NULL
pointer, input/output will be completely unbuffered.
A manifest constant
.BR \s-1BUFSIZ\*S ,
defined in the
.B <stdio.h>
header file,
tells how big an array is needed:
.IP
.B char
.B buf[\s-1BUFSIZ\s0];
.LP
.BR setbuffer ,
an alternate form of
.BR setbuf ,
can be used after a stream has been opened but before it is read or written.
It uses the character array
.I buf
whose size is determined by the
.I size
argument instead of an automatically allocated buffer.  If
.I buf
is the
.SM NULL
pointer, input/output will be completely unbuffered.
.LP
.B setvbuf(\|)
can be used after a stream has been opened
but before it is read or written.
.I type
determines how
stream
will be buffered.  Legal values for
.I type
(defined in
.BR <stdio.h> )
are:
.TP .85i
.SB     _IOFBF
fully buffers the input/output.
.TP
.SB     _IOLBF
line buffers the output;
the buffer will be flushed when a
.SM NEWLINE
is written, the buffer is full, or input is requested.
.TP
.SB     _IONBF
completely unbuffers the input/output.
.LP
If
.I buf
is not the
.SM NULL
pointer, the array it points to
will be used for buffering, instead of an automatically allocated
buffer.
.I size
specifies the size of the buffer to be used.
.LP
.B setlinebuf(\|)
is used to change the buffering on a stream
from block buffered or unbuffered to line buffered.
Unlike
.BR setbuf ,
.BR setbuffer ,
and
.BR setvbuf ,
it can be used at any time that the file descriptor is active.
.LP
A file can be changed from unbuffered or line buffered to block buffered
by using
.B freopen(\|)
(see
.BR fopen (3S)).
A file can be changed from block buffered or line buffered to unbuffered
by using
.B freopen(\|)
followed by
.B setbuf(\|)
with a buffer argument of
.SM NULL\s0.
.SH NOTE
A common source of error is allocating buffer space
as an ``automatic'' variable in a code block, and then
failing to close the stream in the same block.
.SH "SEE ALSO"
.BR fclose (3S),
.BR fopen (3V),
.BR fread (3S),
.BR getc (3S),
.BR malloc (3),
.BR printf (3V),
.BR putc (3S),
.BR puts (3S),
.BR setbuf (3S)
.SH "DIAGNOSTICS"
If an illegal value for
.I type
or
.I size
is provided,
.B setvbuf(\|)
returns a non-zero value.
Otherwise, the value returned will be zero.
r
.BR string_to_decimal (3),
with
.I fortran_exponent
zero.
.TP
.B s
A character string is expected;
the corresponding argument should be a character pointer
pointing to an array of characters large enough to accept the
string and a terminating
.BR \e0 ,
which will be added automatically.
The input field is terminated ./share/man/man3/setbuffer.3s                                                                          755       0      12           73  4424741326  11105                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3s
.\" @(#)setbuffer.3s 1.5 89/03/27 SMI; 
  
  	setegid.3 >  >  
  	seteuid.3 
  >  
  setexportent.3   ?  
  
setfsent.3   ?   
  setgid.3 3   ?4  
  	setgid.3v    ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v 
  ?  
  setkey.3  ?  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setbuffer.3v                                                                          755       0      12           72  4424741327  11110                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3v
.\" @(#)setbuffer.3v 1.4 89/03/27 SMI;

  	seteuid.3 d.  >  
  setexportent.3   ?  
  
setfsent.3 t  ?   
  setgid.3 ent  ?4  
  	setgid.3v .3  ?H  
  setgraent.3   ?\  
  
setgrent.3 n  ?t  
  
sethostent.3n     ?  
  setjmp.3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setegid.3                                                                             755       0      12           67  4424741327  10365                                                                                                                                                                                                                                                                                                                                                                      .so man3/setuid.3
.\" @(#)setegid.3 1.5 89/03/27 SMI; 
  setexportent.3 .  ?  
  
setfsent.3 t  ?   
  setgid.3 ent  ?4  
  	setgid.3v .3  ?H  
  setgraent.3   ?\  
  
setgrent.3 n  ?t  
  
sethostent.3n  n  ?  
  setjmp.3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3  ?  
  
setlinebuf.3s .3  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/seteuid.3                                                                             755       0      12           67  4424741327  10403                                                                                                                                                                                                                                                                                                                                                                      .so man3/setuid.3
.\" @(#)seteuid.3 1.5 89/03/27 SMI; 
  
  
setfsent.3 .  ?   
  setgid.3 3 t  ?4  
  	setgid.3v nt  ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3   n  ?  
  	setjmp.3v .3  ?  
  setkey.3  .3  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setexportent.3                                                                        755       0      12           76  4424741327  11505                                                                                                                                                                                                                                                                                                                                                                      .so man3/exportent.3
.\" @(#)setexportent.3 1.3 89/03/27 SMI;
 setgid.3 3 .  ?4  
  	setgid.3v  t  ?H  
  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v  n  ?  
  setkey.3  .3  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setfsent.3                                                                            755       0      12           72  4424741327  10570                                                                                                                                                                                                                                                                                                                                                                      .so man3/getfsent.3
.\" @(#)setfsent.3 1.5 89/03/27 SMI; 
 	setgid.3v .3  ?H  
  setgraent.3   ?\  
  
setgrent.3 n  ?t  
  
sethostent.3n     ?  
  setjmp.3 t.3  ?  
  	setjmp.3v .3  ?  
  setkey.3 p.3  ?  
  
setlinebuf.3s .3  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setgid.3                                                                              755       0      12           66  4424741330  10211                                                                                                                                                                                                                                                                                                                                                                      .so man3/setuid.3
.\" @(#)setgid.3 1.5 89/03/27 SMI; 

  setgraent.3   ?\  
  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3      ?  
  	setjmp.3v .3  ?  
  setkey.3  .3  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setgid.3v                                                                             755       0      12           66  4424741330  10377                                                                                                                                                                                                                                                                                                                                                                      .so man3/setgid.3
.\" @(#)setgid.3v 1.4 89/03/27 SMI;

  
setgrent.3    ?t  
  
sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v     ?  
  setkey.3  .3  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setgraent.3                                                                           755       0      12           73  4424741330  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgraent.3
.\" @(#)setgraent.3 1.3 89/03/27 SMI;

sethostent.3n ?t  ?  
  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3      ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setgrent.3                                                                            755       0      12           72  4424741330  10562                                                                                                                                                                                                                                                                                                                                                                      .so man3/getgrent.3
.\" @(#)setgrent.3 1.5 89/03/27 SMI; 

  setjmp.3  ?t  ?  
  	setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/sethostent.3n                                                                         755       0      12          100  4424741331  11316                                                                                                                                                                                                                                                                                                                                                                      .so man3/gethostent.3n
.\" @(#)sethostent.3n 1.5 89/03/27 SMI; 
setjmp.3v ?t  ?  
  setkey.3  ?t  ?  
  
setlinebuf.3s ?  ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  @   
  setlogmask.3  @   
  setlogmask.3  ?  @   
  setlogmask.3  ?  @   
  setlogmask.3  @ eam, buf, type, size)
.B \s-1FILE\s0 *stream;
.B char *buf;
.B int type, siz./share/man/man3/setjmp.3                                                                              755       0      12        12640  4424741331  10316                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setjmp.3 1.14 89/03/27 SMI; from UCB 4.2
.hw sigsetjmp
.TH SETJMP 3 "24 November 1987"
.SH NAME
setjmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;
.B int val;
.fi
.IX  "setjmpa function"  ""  "\fLsetjmp\fP \(em save stack environment"
.IX  "setjmpb function"  ""  "\fLsetjmp\fP \(em non-local goto"
.IX  "longjmp function"  ""  "\fLlongjmp\fP \(em non-local goto"
.IX  "save stack environment"  ""  "save stack environment \(em \fLsetjmp\fP"
.IX  "return to saved environment"  ""  "return to saved environment \(em \fLlongjmp\fP"
.IX  "non-local goto"  "setjmp"  ""  "non-local goto \(em \fLsetjmp\fP"
.IX  "non-local goto"  "longjmp"  ""  "non-local goto \(em \fLlongjmp\fP"
.SH DESCRIPTION
.B setjmp(\|)
and
.B longjmp(\|)
are useful for dealing with errors and interrupts
encountered in a low-level subroutine of a program.
.LP
.B setjmp(\|)
saves its stack environment in
.I env
for later use by
.BR longjmp .
A normal call to
.B setjmp(\|)
returns zero.
.B setjmp(\|)
also saves the register environment.  If a
.B longjmp(\|)
call will be made, the routine which called
.B setjmp(\|)
should not return until after the
.B longjmp(\|)
has returned control (see below).
.LP
.B longjmp(\|)
restores the environment saved by the last call of
.BR setjmp ,
and then returns in such a way that execution
continues as if the call of
.B setjmp(\|)
had just returned the value
.I val
to the function that invoked
.BR setjmp ;
however, if
.I val
were zero, execution would continue as if the call of
.B setjmp(\|)
had returned one.  This ensures that a ``return'' from
.B setjmp(\|)
caused by a call to
.B longjmp(\|)
can be distinguished from a regular return from
.BR setjmp .
The calling function must not itself have returned in the interim,
otherwise
.B longjmp(\|)
will be returning control to a possibly non-existent environment.
All memory-bound data have values as of the time
.B longjmp(\|)
was called.  The
.SM CPU
and floating-point data registers are restored to the values they had at
the time that
.B setjmp(\|)
was called.  But, because the
.B register
storage class is only a hint to the C compiler, variables declared as
.B register
variables may not necessarily be assigned to machine registers, so
their values are unpredictable after a
.BR longjmp .
This is especially a problem for programmers trying to write
machine-independent C routines.
.LP
.B setjmp(\|)
and
.B longjmp(\|)
save and restore the signal mask (see
.BR sigsetmask (2)),
while
.B _setjmp
and
.B _longjmp
manipulate only the C stack and registers.
If the
.I savemask
flag to
.B sigsetjmp
is non-zero, the signal mask is saved, and a subsequent
.B siglongjmp
using the same
.I env
will restore the signal mask.  If the
.I savemask
flag is zero, the signal mask is not saved, and a subsequent
.B siglongjmp
using the same
.I env
will not restore the signal mask.
In all other ways,
.B _setjmp
and
.B sigsetjmp
function in the same way that
.B setjmp(\|)
does, and
.B _longjmp
and
.B siglongjmp
function in the same way that
.B longjmp(\|)
does.
.LP
None of these functions save or restore any floating-point status or control
registers, in particular the
.SM MC\s068881
.BR fpsr ,
.BR fpcr ,
or
.BR fpiar ,
the Sun-3
.SM FPA
.BR fpamode
or
.BR fpastatus ,
and the Sun-4
.BR %fsr .
See
.BR ieee_flags (3M)
to save and restore floating-point status or control information.
.SH EXAMPLE
.LP
The following code fragment indicates the flow of control of the
.B setjmp(\|)
and
.B longjmp(\|)
combination:
.RS
.LP
.nf
.I function declaration
\&.\|.\|.
.B	jmp_buf	my_environment;
	\&.\|.\|.
.B	if (\|setjmp\|(\|my_environment\|)\|)  {
.B		/* register variables have unpredictable values */
.I		code after the return from longjmp
		\&.\|.\|.
.B	} else {
.B		/* do not modify register vars in this leg of code */
.I		this is the return from setjmp
		\&.\|.\|.
.B	}
.fi
.RE
.SH "SEE ALSO"
.BR cc (1V),
.BR sigsetmask (2),
.BR sigvec (2),
.BR ieee_flags (3M),
.BR signal (3),
.BR setjmp (3V)
.SH BUGS
.B setjmp(\|)
does not save the current notion of whether the process is
executing on the signal stack.  The result is that a
.B longjmp(\|)
to some place on the signal stack leaves the signal stack state incorrect.
.LP
On Sun-2 and Sun-3 systems
.B setjmp(\|)
also saves the register environment.
Therefore, all data that are bound to registers
are restored to the values they had at the time that
.B setjmp(\|)
was called.
All memory-bound data have values as of the time
.B longjmp(\|)
was called.  However, because the
.B register
storage class is only a hint to the C compiler, variables declared as
.B register
variables may not necessarily be assigned to machine registers, so
their values are unpredictable after a
.BR longjmp .
When using compiler options that specify automatic register allocation (see
.BR cc (1V)),
the compiler will not attempt to assign variables to
registers in routines that call
.BR setjmp .
.LP
.B longjmp(\|)
never causes
.B setjmp(\|)
to return zero in the Sun implementation; this is also true of many other
implementations, including all System V implementations, so programmers should
not depend on
.B longjmp(\|)
being able to cause
.B setjmp(\|)
to return zero.
size is determined by the
.I size
argument instead of an automatically allocated buffer.  If
.I ./share/man/man3/setjmp.3v                                                                             755       0      12        12723  4424741331  10506                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setjmp.3v 1.5 89/03/27 SMI; from UCB 4.2
.hw sigsetjmp
.TH SETJMP 3V "24 November 1987"
.SH NAME
setjmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;
.B int val;
.fi
.IX  "setjmpa function"  ""  "\fLsetjmp\fP \(em save stack environment"
.IX  "setjmpb function"  ""  "\fLsetjmp\fP \(em non-local goto"
.IX  "longjmp function"  ""  "\fLlongjmp\fP \(em non-local goto"
.IX  "save stack environment"  ""  "save stack environment \(em \fLsetjmp\fP"
.IX  "return to saved environment"  ""  "return to saved environment \(em \fLlongjmp\fP"
.IX  "non-local goto"  "setjmp"  ""  "non-local goto \(em \fLsetjmp\fP"
.IX  "non-local goto"  "longjmp"  ""  "non-local goto \(em \fLlongjmp\fP"
.SH DESCRIPTION
.B setjmp(\|)
and
.B longjmp(\|)
are useful for dealing with errors and interrupts
encountered in a low-level subroutine of a program.
.LP
.B setjmp(\|)
saves its stack environment in
.I env
for later use by
.BR longjmp .
A normal call to
.B setjmp(\|)
returns zero.
.B setjmp(\|)
also saves the register environment.  If a
.B longjmp(\|)
call will be made, the routine which called
.B setjmp(\|)
should not return until after the
.B longjmp(\|)
has returned control (see below).
.LP
.B longjmp(\|)
restores the environment saved by the last call of
.BR setjmp ,
and then returns in such a way that execution
continues as if the call of
.B setjmp(\|)
had just returned the value
.I val
to the function that invoked
.BR setjmp ;
however, if
.I val
were zero, execution would continue as if the call of
.B setjmp(\|)
had returned one.  This ensures that a ``return'' from
.B setjmp(\|)
caused by a call to
.B longjmp(\|)
can be distinguished from a regular return from
.BR setjmp .
The calling function must not itself have returned in the interim,
otherwise
.B longjmp(\|)
will be returning control to a possibly non-existent environment.
All memory-bound data have values as of the time
.B longjmp(\|)
was called.  The
.SM CPU
and floating-point data registers are restored to the values they had at
the time that
.B setjmp(\|)
was called.  But, because the
.B register
storage class is only a hint to the C compiler, variables declared as
.B register
variables may not necessarily be assigned to machine registers, so
their values are unpredictable after a
.BR longjmp .
This is especially a problem for programmers trying to write
machine-independent C routines.
.LP
.B setjmp(\|)
and
.B longjmp(\|)
manipulate only the C stack and registers; they do not save or
restore the signal mask.
.B _setjmp
behaves identically to
.BR setjmp ,
and
.B _longjmp
behaves identically to
.BR longjmp .
If the
.I savemask
flag to
.B sigsetjmp
is non-zero, the signal mask (see
.BR sigsetmask (2))
is saved, and a subsequent
.B siglongjmp
using the same
.I env
will restore the signal mask.  If the
.I savemask
flag is zero, the signal mask is not saved, and a subsequent
.B siglongjmp
using the same
.I env
will not restore the signal mask.  In all other ways,
.B sigsetjmp
functions in the same way that
.B setjmp(\|)
does, and
.B siglongjmp
functions in the same way that
.B longjmp(\|)
does.
.LP
None of these functions save or restore any floating-point status or control
registers, in particular the
.SM MC\s068881
.BR fpsr ,
.BR fpcr ,
or
.BR fpiar ,
the Sun-3
.SM FPA
.BR fpamode
or
.BR fpastatus ,
and the Sun-4
.BR %fsr .
See
.BR ieee_flags (3M)
to save and restore floating-point status or control information.
.SH EXAMPLE
.LP
The following code fragment indicates the flow of control of the
.B setjmp(\|)
and
.B longjmp(\|)
combination:
.RS
.LP
.nf
.I function declaration
\&.\|.\|.
.B	jmp_buf	my_environment;
	\&.\|.\|.
.B	if (\|setjmp\|(\|my_environment\|)\|)  {
.B		/* register variables have unpredictable values */
.I		code after the return from longjmp
		\&.\|.\|.
.B	} else {
.B		/* do not modify register vars in this leg of code */
.I		this is the return from setjmp
		\&.\|.\|.
.B	}
.fi
.RE
.SH "SEE ALSO"
.BR cc (1V),
.BR sigsetmask (2),
.BR sigvec (2),
.BR ieee_flags (3M),
.BR signal (3V),
.BR setjmp (3)
.SH BUGS
.B setjmp(\|)
does not save the current notion of whether the process is
executing on the signal stack.  The result is that a
.B longjmp(\|)
to some place on the signal stack leaves the signal stack state incorrect.
.LP
On Sun-2 and Sun-3 systems
.B setjmp(\|)
also saves the register environment.
Therefore, all data that are bound to registers
are restored to the values they had at the time that
.B setjmp(\|)
was called.
All memory-bound data have values as of the time
.B longjmp(\|)
was called.  However, because the
.B register
storage class is only a hint to the C compiler, variables declared as
.B register
variables may not necessarily be assigned to machine registers, so
their values are unpredictable after a
.BR longjmp .
When using compiler options that specify automatic register allocation (see
.BR cc (1V)),
the compiler will not attempt to assign variables to
registers in routines that call
.BR setjmp .
.LP
.B longjmp(\|)
never causes
.B setjmp(\|)
to return zero in the Sun implementation; this is also true of many other
implementations, including all System V implementations, so programmers should
not depend on
.B longjmp(\|)
being able to cause
.B setjmp(\|)
to return zero.
automatically.
The input field is terminated ./share/man/man3/setkey.3                                                                              755       0      12           65  4424741331  10236                                                                                                                                                                                                                                                                                                                                                                      .so man3/crypt.3
.\" @(#)setkey.3 1.5 89/03/27 SMI; 
 ?  
  
setlinebuf.3v ?  @   
  setlogmask.3  @ jmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;./share/man/man3/setlinebuf.3s                                                                         755       0      12           74  4424741331  11255                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3s
.\" @(#)setlinebuf.3s 1.5 89/03/27 SMI; 
  
  setlogmask.3  @   
  setlogmask.3  @ jmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;./share/man/man3/setlinebuf.3v                                                                         755       0      12           73  4424741332  11260                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3v
.\" @(#)setlinebuf.3v 1.4 89/03/27 SMI;

  
  setlogmask.3  @   
  setlogmask.3  @ jmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;./share/man/man3/setlogmask.3                                                                          755       0      12           71  4424741332  11101                                                                                                                                                                                                                                                                                                                                                                      .so man3/syslog.3
.\" @(#)setlogmask.3 1.3 89/03/27 SMI;
;

  
  setlogmask.3  @   
  setlogmask.3  @ jmp, longjmp, sigsetjmp, siglongjmp \- non-local goto
.SH SYNOPSIS
.nf
.B #include <setjmp.h>
.LP
.B "int setjmp(env)"
.B jmp_buf env;
.LP
.B longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int _setjmp(env)"
.B jmp_buf env;
.LP
.B _longjmp(env, val)
.B jmp_buf env;
.B int val;
.LP
.B "int sigsetjmp(env, savemask)"
.B sigjmp_buf env;
.B int savemask;
.LP
.B siglongjmp(env, val)
.B sigjmp_buf env;./share/man/man3/setmntent.3                                                                           755       0      12           74  4424741332  10754                                                                                                                                                                                                                                                                                                                                                                      .so man3/getmntent.3
.\" @(#)setmntent.3 1.5 89/03/27 SMI; 
  setnetgrent.3n 3  @\  
  setprotoent.3n    @p  
  setpwaent.3   @  
  
setpwent.3   @  
  setpwent.3v   @  
  setpwfile.3   @  
  setpwfile.3v  @   @  
  	setrgid.3 @   @  
  	setruid.3 @   A  
  setscrreg.3v  @   A  
  
setservent.3n 
  A0  
  
setstate.3   AD  
  
setterm.3v    AX  
  
setterm.3x   Al  
  setttyent.3   A  
  setuid.3 k.3  A  
  	setuid.3v .3  A  
  setupterm.3v  
  A./share/man/man3/setnetent.3n                                                                          755       0      12           76  4424741332  11124                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetent.3n
.\" @(#)setnetent.3n 1.5 89/03/27 SMI; 

  setprotoent.3n \  @p  
  setpwaent.3   @  
  
setpwent.3    @  
  setpwent.3v   @  
  setpwfile.3   @  
  setpwfile.3v  @  @  
  	setrgid.3 @   @  
  	setruid.3 @   A  
  setscrreg.3v  A  A  
  
setservent.3n A  A0  
  
setstate.3   AD  
  
setterm.3v   AX  
  
setterm.3x    Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v .3  A  
  setupterm.3v  A  A  
  setusershell.3 ./share/man/man3/setnetgrent.3n                                                                        755       0      12          102  4424741332  11463                                                                                                                                                                                                                                                                                                                                                                      .so man3/getnetgrent.3n
.\" @(#)setnetgrent.3n 1.5 89/03/27 SMI; 
 setpwaent.3   @  
  
setpwent.3 n  @  
  setpwent.3v   @  
  setpwfile.3   @  
  setpwfile.3v .3   @  
  	setrgid.3 3v  @  
  	setruid.3 d.  A  
  setscrreg.3v  @   A  
  
setservent.3n A  A0  
  
setstate.3 3  AD  
  
setterm.3v e  AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  .3  A  
  setusershell.3   A  
  
setvbuf.3s l  A./share/man/man3/setprotoent.3n                                                                        755       0      12          102  4424741333  11510                                                                                                                                                                                                                                                                                                                                                                      .so man3/getprotoent.3n
.\" @(#)setprotoent.3n 1.5 89/03/27 SMI; 
tpwent.3 n  @  
  setpwent.3v   @  
  setpwfile.3   @  
  setpwfile.3v .3   @  
  	setrgid.3 3v  @  
  	setruid.3 d.  A  
  setscrreg.3v  d.  A  
  
setservent.3n @   A0  
  
setstate.3 3  AD  
  
setterm.3v e  AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  .3  A  
  setusershell.3 3  A  
  
setvbuf.3s l  A  
  
setvbuf.3v .  B   
./share/man/man3/setpwaent.3                                                                           755       0      12           73  4424741333  10745                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwaent.3
.\" @(#)setpwaent.3 1.3 89/03/27 SMI;
setpwent.3v   @  
  setpwfile.3   @  
  setpwfile.3v .3   @  
  	setrgid.3 3v  @  
  	setruid.3 d.  A  
  setscrreg.3v  d.  A  
  
setservent.3n d.  A0  
  
setstate.3 3  AD  
  
setterm.3v e  AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  .3  A  
  setusershell.3 3  A  
  
setvbuf.3s l  A  
  
setvbuf.3v .  B   
  sfconvert.3   B  
  ./share/man/man3/setpwent.3                                                                            755       0      12           72  4424741333  10603                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)setpwent.3 1.5 89/03/27 SMI; 
 setpwfile.3   @  
  setpwfile.3v  @  @  
  	setrgid.3 3   @  
  	setruid.3 3v  A  
  setscrreg.3v  A  A  
  
setservent.3n A  A0  
  
setstate.3 .  AD  
  
setterm.3v 3  AX  
  
setterm.3x e  Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v en  A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s 3  A  
  
setvbuf.3v l  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  ./share/man/man3/setpwent.3v                                                                           755       0      12           74  4424741333  10773                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)setpwent.3v 1.5 89/03/27 SMI; 
setpwfile.3v  @  @  
  	setrgid.3 @  @  
  	setruid.3 3   A  
  setscrreg.3v  A  A  
  
setservent.3n A  A0  
  
setstate.3   AD  
  
setterm.3v .  AX  
  
setterm.3x 3  Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v 3  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  ./share/man/man3/setpwfile.3                                                                           755       0      12           72  4424741334  10735                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3
.\" @(#)setpwfile.3 1.3 89/03/27 SMI;

  	setrgid.3 @  @  
  	setruid.3 @  A  
  setscrreg.3v  A  A  
  
setservent.3n A  A0  
  
setstate.3   AD  
  
setterm.3v   AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v   B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
./share/man/man3/setpwfile.3v                                                                          755       0      12           74  4424741334  11125                                                                                                                                                                                                                                                                                                                                                                      .so man3/getpwent.3v
.\" @(#)setpwfile.3v 1.3 89/03/27 SMI;
  	setruid.3 @  A  
  setscrreg.3v  A  A  
  
setservent.3n A  A0  
  
setstate.3   AD  
  
setterm.3v   AX  
  
setterm.3x   Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v   B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
./share/man/man3/setrgid.3                                                                             755       0      12           67  4424741334  10400                                                                                                                                                                                                                                                                                                                                                                      .so man3/setuid.3
.\" @(#)setrgid.3 1.5 89/03/27 SMI; 
  setscrreg.3v  @  A  
  
setservent.3n A  A0  
  
setstate.3 3  AD  
  
setterm.3v e  AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  3   A  
  setusershell.3   A  
  
setvbuf.3s l  A  
  
setvbuf.3v .  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 ver  B@  
  siginterrupt.3    BT  
  signal.3 upt  Bh  
  	signal.3v .3  B  
   ./share/man/man3/setruid.3                                                                             755       0      12           67  4424741334  10416                                                                                                                                                                                                                                                                                                                                                                      .so man3/setuid.3
.\" @(#)setruid.3 1.5 89/03/27 SMI; 
  
  
setservent.3n A  A0  
  
setstate.3   AD  
  
setterm.3v 3  AX  
  
setterm.3x e  Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v en  A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v l  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3    Bh  
  	signal.3v pt  B  
   signaling_nan.3m  
  B./share/man/man3/setscrreg.3v                                                                          755       0      12           72  4424741334  11122                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)setscrreg.3v 1.4 89/03/27 SMI;
A0  
  
setstate.3   AD  
  
setterm.3v   AX  
  
setterm.3x 3  Al  
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v   B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v     B  
   signaling_nan.3m  
  B  
  
signbit.3m   B./share/man/man3/setservent.3n                                                                         755       0      12          100  4424741335  11324                                                                                                                                                                                                                                                                                                                                                                      .so man3/getservent.3n
.\" @(#)setservent.3n 1.5 89/03/27 SMI; 
setterm.3v e  AX  
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  3   A  
  setusershell.3   A  
  
setvbuf.3s l  A  
  
setvbuf.3v .  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 ver  B@  
  siginterrupt.3    BT  
  signal.3 upt  Bh  
  	signal.3v .3  B  
   signaling_nan.3m  B  B  
  
signbit.3m m  B  
  significand.3m   B./share/man/man3/setstate.3                                                                            755       0      12           70  4424741335  10566                                                                                                                                                                                                                                                                                                                                                                      .so man3/random.3
.\" @(#)setstate.3 1.5 89/03/27 SMI; 
  
setterm.3x .  Al  
  setttyent.3   A  
  setuid.3 yen  A  
  	setuid.3v .3  A  
  setupterm.3v  .3  A  
  setusershell.3    A  
  
setvbuf.3s l  A  
  
setvbuf.3v .  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 ver  B@  
  siginterrupt.3 r  BT  
  signal.3 upt  Bh  
  	signal.3v .3  B  
   signaling_nan.3m  B  B  
  
signbit.3m m  B  
  significand.3m m  B  
  sin.3m c  B  
   ./share/man/man3/setterm.3v                                                                            755       0      12           70  4424741335  10603                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)setterm.3v 1.4 89/03/27 SMI;
  setttyent.3   A  
  setuid.3 .3   A  
  	setuid.3v en  A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s    A  
  
setvbuf.3v l  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 r  Bh  
  	signal.3v pt  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B./share/man/man3/setterm.3x                                                                            755       0      12           71  4424741335  10606                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)setterm.3x 1.5 89/03/27 SMI; 
 setuid.3 .3   A  
  	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v    B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v  r  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decima./share/man/man3/setttyent.3                                                                           755       0      12           71  4424741335  10776                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)setttyent.3 1.5 89/03/27 SMI;
 	setuid.3v 3   A  
  setupterm.3v  A  A  
  setusershell.3   A  
  
setvbuf.3s   A  
  
setvbuf.3v   B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v  @  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m ./share/man/man3/setuid.3                                                                              755       0      12         3276  4424741336  10303                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setuid.3 1.12 89/03/27 SMI; from UCB 4.2
.TH SETUID 3 "22 November 1987"
.SH NAME
setuid, seteuid, setruid, setgid, setegid, setrgid \- set user and group ID
.SH SYNOPSIS
.nf
.B setuid(uid)
.B seteuid(euid)
.B setruid(ruid)
.LP
.B setgid(gid)
.B setegid(egid)
.B setrgid(rgid)
.fi
.IX  "setuid function"  ""  "\fLsetuid\fP \(em set user ID"
.IX  "seteuid function"  ""  "\fLseteuid\fP \(em set effective user ID"
.IX  "setruid function"  ""  "\fLsetruid\fP \(em set real user ID"
.IX  "setgid function"  ""  "\fLsetgid\fP \(em set group ID"
.IX  "setegid function"  ""  "\fLsetegid\fP \(em set effective group ID"
.IX  "setrgid function"  ""  "\fLsetrgid\fP \(em set real group ID"
.IX  "real user ID, set \(em \fLsetruid\fR"
.IX  "effective user ID, set \(em \fLseteuid\fR"
.IX  "both real and effective user ID, set \(em \fLsetuid\fR"
.IX  "real group ID, set \(em \fLsetrgid\fR"
.IX  "effective group ID, set \(em \fLsetegid\fR"
.IX  "both real and effective group ID, set \(em \fLsetgid\fR"
.SH DESCRIPTION
.B setuid(\|)
.RB ( setgid )
sets both the real and effective user
.SM ID
(group
.SM ID\s0)
of the current process to as specified.
.LP
.B seteuid(\|)
.RB ( setegid )
sets the effective user
.SM ID
(group
.SM ID\s0)
of the current process.
.LP
.B setruid(\|)
.RB ( setrgid )
sets the real user
.SM ID
(group
.SM ID\s0)
of the current process.
.LP
These calls are only permitted to the super-user
or if the argument is the real or effective
.SM ID\s0.
.SH "SEE ALSO"
.BR getgid (2),
.BR getuid (2),
.BR setregid (2),
.BR setreuid (2)
.SH DIAGNOSTICS
Zero is returned if the user (group)
.SM ID
is set; \-1 is returned otherwise, with
the global variable
.B errno
set as for
.B setreuid(\|)
or
.BR setregid .
c_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n 9  H4  :  svcfd_create.3n ./share/man/man3/setuid.3v                                                                             755       0      12         2730  4424741336  10463                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setuid.3v 1.9 89/03/27 SMI; from S5R2
.TH SETUID 3V "22 November 1987"
.SH NAME
setuid, setgid \- set user and group IDs
.SH SYNOPSIS
.nf
.B setuid(uid)
.B setgid(gid)
.fi
.SH DESCRIPTION
.IX  "setuid function V"  ""  "\fLsetuid\fP \(em set user ID, System V"
.IX  "setgid function V"  ""  "\fLsetgid\fP \(em set group ID, System V"
.IX  "both real and effective user ID, set, System V \(em \fLsetuid\fR"
.IX  "both real and effective group ID, set, System V \(em \fLsetgid\fR"
.B setuid(\|)
.RB ( setgid )
is used to set the real user (group)
.SM ID
and effective user (group)
.SM ID
of the calling process.
.LP
If the effective user
.SM ID
of the calling process is super-user, the real user (group)
.SM ID
and effective user (group)
.SM ID
are set to
.I uid
.RI ( gid ).
.LP
If the effective user
.SM ID
of the calling process is not super-user, but its real user (group)
.SM ID
is equal to
.I uid
.RI ( gid ),
the effective user (group)
.SM ID
is set to
.I uid
.RI ( gid ).
.LP
If the effective user (group)
.SM ID
of the calling process is not super-user, but the saved set-user (group)
.SM ID
from
.BR execve (2)
is equal to
.I uid
.RI ( gid ),
the effective user (group)
.SM ID
is set to
.I uid
.RI ( gid ).
.SH "SEE ALSO"
.BR execve (2),
.BR getgid (2),
.BR getuid (2),
.BR setregid (2),
.BR setreuid (2),
.SH DIAGNOSTICS
Zero is returned if the user (group)
.SM ID
is set; \-1 is returned otherwise, with
the global variable
.B errno
set as for
.B setreuid(\|)
.RB ( setregid ).
  )  svc_destroy.3n |  F  *  
svc_./share/man/man3/setupterm.3v                                                                          755       0      12           72  4424741336  11153                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)setupterm.3v 1.4 89/03/27 SMI;
A  
  
setvbuf.3s   A  
  
setvbuf.3v   B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v  @  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT./share/man/man3/setusershell.3                                                                        755       0      12          101  4424741336  11470                                                                                                                                                                                                                                                                                                                                                                      .so man3/getusershell.3
.\" @(#)setusershell.3 1.3 89/03/27 SMI;
etvbuf.3v .  B   
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 ver  B@  
  siginterrupt.3    BT  
  signal.3 upt  Bh  
  	signal.3v .3  B  
   signaling_nan.3m  B  B  
  
signbit.3m m  B  
  significand.3m   B  
  sin.3m c  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v lee  C@     sm_inter.3r   CT    space.3x ter  Ch  ./share/man/man3/setvbuf.3s                                                                            755       0      12           70  4424741337  10575                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3s
.\" @(#)setvbuf.3s 1.4 89/03/27 SMI;
  sfconvert.3   B  
  sgconvert.3   B(  
  sigfpe.3 ver  B@  
  siginterrupt.3 r  BT  
  signal.3 upt  Bh  
  	signal.3v .3  B  
   signaling_nan.3m  B  B  
  
signbit.3m m  B  
  significand.3m m  B  
  sin.3m c  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v lee  C@     sm_inter.3r   CT    space.3x ter  Ch    spray.3r .3x  C|    
./share/man/man3/setvbuf.3v                                                                            755       0      12           70  4424741337  10600                                                                                                                                                                                                                                                                                                                                                                      .so man3/setbuf.3v
.\" @(#)setvbuf.3v 1.4 89/03/27 SMI;
  sgconvert.3   B(  
  sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 r  Bh  
  	signal.3v pt  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT    space.3x 3r   Ch    spray.3r ter  C|    
sprintf.3s x  C    
./share/man/man3/sfconvert.3                                                                           755       0      12           72  4424741337  10747                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)sfconvert.3 1.3 89/03/27 SMI;
 sigfpe.3 .3   B@  
  siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v  r  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT    space.3x 3r   Ch    spray.3r 3r   C|    
sprintf.3s r  C    
sprintf.3v x  C    ./share/man/man3/sgconvert.3                                                                           755       0      12           72  4424741337  10750                                                                                                                                                                                                                                                                                                                                                                      .so man3/econvert.3
.\" @(#)sgconvert.3 1.3 89/03/27 SMI;
 siginterrupt.3 @  BT  
  signal.3 3 @  Bh  
  	signal.3v  @  B  
   signaling_nan.3m  
  B  
  
signbit.3m   B  
  significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT    space.3x 3r   Ch    spray.3r 3r   C|    
sprintf.3s    C    
sprintf.3v r  C    sqrt.3m   C    sran./share/man/man3/sigfpe.3                                                                              755       0      12         7723  4424741337  10265                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sigfpe.3 1.14 89/03/27 SMI;
.TH SIGFPE 3 "22 March 1989"
.SH NAME
sigfpe - signal handling for specific SIGFPE codes
.SH SYNOPSIS
.nf
.B #include <signal.h>
.LP
.B #include <floatingpoint.h>
.LP
.B sigfpe_handler_type sigfpe(code, hdl)
.B sigfpe_code_type code;
.B sigfpe_handler_type hdl;
.fi
.SH DESCRIPTION
.IX "sigfpe function" "" "\fLsigfpe()\fP function"
.LP
This function allows signal handling to be specified for particular
.SB SIGFPE
codes.  A call to
.B sigfpe(\|)
defines a new handler
.I hdl
for a particular
.SB SIGFPE
.I code
and returns the old handler as the value of the function
.B sigfpe.
Normally handlers are specified as pointers to functions;
the special cases
.BR \s-1SIGFPE_IGNORE\s0 ,
.BR \s-1SIGFPE_ABORT\s0 ,
and
.SB SIGFPE_DEFAULT
allow ignoring, specifying core dump using
.BR abort (3),
or default handling respectively.
.LP
For these
.SM IEEE\s0-related
codes:
.nf
	\fB\s-1FPE_FLTINEX_TRAP\s0\fR	fp_inexact - floating inexact result
	\fB\s-1FPE_FLTDIV_TRAP\s0\fR	fp_division - floating division by zero
	\fB\s-1FPE_FLTUND_TRAP\s0\fR	fp_underflow - floating underflow
	\fB\s-1FPE_FLTOVF_TRAP\s0\fR	fp_overflow - floating overflow
	\fB\s-1FPE_FLTBSUN_TRAP\s0\fR	fp_invalid - branch or set on unordered
	\fB\s-1FPE_FLTOPERR_TRAP\s0\fR	fp_invalid - floating operand error
	\fB\s-1FPE_FLTNAN_TRAP\s0\fR	fp_invalid - floating Not-A-Number
.fi
.LP
default handling is defined to be to call the handler specified to
.BR ieee_handler (3M).
.LP
For all other
.SB SIGFPE
codes, default handling is to core dump using
.BR abort (3).
.LP
The compilation option \-ffpa causes fpa recomputation to replace
the default abort action
for code
.BR \s-1FPE_FPA_ERROR\s0 .
Note:
.SB SIGFPE_DEFAULT
will restore abort rather than
.SM FPA
recomputation for this code.
.LP
Three steps are required to intercept an
.SM IEEE\s0-related
.SB SIGFPE
code with
.BR sigfpe :
.RS
.TP
1)
Set up a handler with
.BR sigfpe .
.TP
2)
Enable the relevant
.SM IEEE
trapping capability in the hardware, perhaps
by using assembly-language instructions.
.TP
3)
Perform a floating-point operation that generates the intended
.SM IEEE
exception.
.RE
.LP
Unlike
.BR ieee_handler (3M),
.B sigfpe(\|)
never changes floating-point hardware mode bits affecting
.SM IEEE
trapping.  No
.SM IEEE\s0-related
.SB SIGFPE
signals will be generated unless those hardware mode
bits are enabled.
.LP
.SB SIGFPE
signals can be handled using
.BR sigvec (2),
.BR signal (3),
.BR sigfpe (3),
or
.BR ieee_handler (3M).
In a particular program, to avoid confusion,
use only one of these interfaces to handle
.SB SIGFPE
signals.
.br
.ne 20
.SH EXAMPLE
.LP
A user-specified signal handler might look like this:
.nf
.ft B
void sample_handler( sig, code, scp, addr )
	int sig ;		/* sig == \s-1SIGFPE\s0 always */
	int code ;
	struct sigcontext *scp ;
	char *addr ;
	{
		/*
		   Sample user-written sigfpe code handler.
		   Prints a message and continues.
		   struct sigcontext is defined in <signal.h>.
		 */
		printf(" ieee exception code %x occurred at pc %X \\n",code,scp->sc_pc);
	}
.LP
and it might be set up like this:
.ft B
	extern void sample_handler(\|);
 	main(\|)
	{
		sigfpe_handler_type hdl, old_handler1, old_handler2;
	/*
	 * save current overflow and invalid handlers; set the new
	 * overflow handler to sample_handler(\|) and set the new
	 * invalid handler to \s-1SIGFPE_ABORT\s0 (abort on invalid)
	 */
		hdl = (sigfpe_handler_type) sample_handler;
		old_handler1 = sigfpe(\s-1FPE_FLTOVF_TRAP\s0, hdl);
		old_handler2 = sigfpe(\s-1FPE_FLTOPERR_TRAP\s0, \s-1SIGFPE_ABORT\s0);
		\&.\|.\|.
	/*
	 * restore old overflow and invalid handlers
	 */
		sigfpe(\s-1FPE_FLTOVF_TRAP\s0,   old_handler1);
		sigfpe(\s-1FPE_FLTOPERR_TRAP\s0, old_handler2);
	}
.ft R
.fi
.SH FILES
.PD 0
.TP 20
.B /usr/include/floatingpoint.h
.TP
.B /usr/include/signal.h
.PD
.SH "SEE ALSO"
.BR sigvec (2),
.BR abort (3),
.BR floatingpoint (3),
.BR ieee_handler (3M),
.BR signal (3),
.SH DIAGNOSTICS
.LP
.B sigfpe(\|)
returns
.SM BADSIG
if
.I code
is not zero or a defined
.SB SIGFPE
code.
    	werase.3v O  O    	werase.3x O./share/man/man3/siginterrupt.3                                                                        755       0      12         5554  4424741340  11541                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)siginterrupt.3 1.9 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SIGINTERRUPT 3 "22 November 1987"
.SH NAME
siginterrupt \- allow signals to interrupt system calls
.SH SYNOPSIS
.nf
.B int siginterrupt(sig, flag)
.B int sig, flag;
.fi
.SH DESCRIPTION
.IX  "siginterrupt function"  ""  "\fLsiginterrupt\fP \(em interrupt system calls with software signal"
.IX  "software signal"  ""  "interrupt system calls with software signal \(em \fLsiginterrupt\fP"
.B siginterrupt(\|)
is used to change the system call restart
behavior when a system call is interrupted by the specified signal.
If the flag is false (0), then system calls will be restarted if
they are interrupted by the specified signal
and no data has been transferred yet.
System call restart is the default behavior on 4.2\s-1BSD\s0, and on Sun\s-1OS\s0 in
the 4.2 environment, when the
.B signal (3)
routine is used.
.LP
If the flag is true (1), then restarting of system calls is disabled.
If a system call is interrupted by the specified signal
and no data has been transferred,
the system call will return \-1 with
.B errno
set to
.SM EINTR\s0.
Interrupted system calls that have started transferring
data will return the amount of data actually transferred.
System call interrupt is the signal behavior found on older
version of the
.SM UNIX
operating systems, such as 4.1\s-1BSD\s0 and System V
\s-1UNIX\s0.
It is the default behavior on Sun\s-1OS\s0
in the System V environment when the
.B signal(\|)
routine is used; therefore, this routine is useful in that environment
only if a signal that a
.BR sigvec (2)
specified should restart system calls is to be changed not to restart them.
.LP
Note: the new 4.2\s-1BSD\s0 signal handling semantics are not
altered in any other way.
Most notably, signal handlers always remain installed until
explicitly changed by a subsequent
.BR sigvec
call, and the signal mask operates as documented in
.BR sigvec ,
unless the
.SB SV_RESETHAND
bit has been used to specify that the pre-4.2\s-1BSD\s0
signal behavior is to be used.
Programs may switch between restartable and interruptible
system call operation as often as desired in the execution of a program.
.LP
Issuing a
.B siginterrupt(\|)
call during the execution of a signal handler will cause
the new action to take place on the next signal to be caught.
.SH NOTES
This library routine uses an extension of the
.BR sigvec (2)
system call that is not available in 4.2\s-1BSD\s0,
hence it should not be used if backward compatibility is needed.
.SH "RETURN VALUE
A 0 value indicates that the call succeeded.
A \-1 value indicates that an invalid signal number has been supplied.
.SH "SEE ALSO"
.BR sigblock (2),
.BR sigpause (2),
.BR sigsetmask (2),
.BR sigvec (2),
.BR signal (3)
  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzse./share/man/man3/signal.3                                                                              755       0      12        14275  4424741340  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)signal.3 1.30 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SIGNAL 3 "22 November 1987"
.ie t .ds d \(dg
.el .ds d \z|+
.ie t .ds b \(bu
.el .ds b @
.SH NAME
signal \- simplified software signal facilities
.SH SYNOPSIS
.nf
.B #include <signal.h>
.LP
.B void (\(**signal(sig, func))(\|)
.B void (\(**func)(\|);
.fi
.IX  "signal function"  ""  "\fLsignal\fP \(em software signals"
.IX  "software signal"  ""  "software signal \(em \fLsignal\fP"
.SH DESCRIPTION
.B signal(\|)
is a simplified interface to the more general
.BR sigvec (2)
facility.  Programs that use
.B signal(\|)
in preference to
.B sigvec(\|)
are more likely to be portable to all
systems.
.LP
A signal is generated by some abnormal event,
initiated by a user at a terminal
(quit, interrupt, stop),
by a program error (bus error, etc.),
by request of another program (kill),
or when a process is stopped because it wishes to access
its control terminal while in the background (see
.BR termio (4)).
Signals are optionally generated
when a process resumes after being stopped,
when the status of child processes changes,
or when input is ready at the control terminal.
Most signals cause termination of the receiving process if no action
is taken; some signals instead cause the process receiving them
to be stopped, or are simply discarded if the process has not
requested otherwise.
Except for the
.SB SIGKILL
and
.SB SIGSTOP
signals, the
.B signal(\|)
call allows signals either to be ignored
or to interrupt to a specified location.
The following is a list of all signals with
names as in the include file
.BR <signal.h> :
.RS
.LP
.nf
.ta \w'SIGVTALRM 'u +\w'15*  'u
\fB\s-1SIGHUP\s0\fR	1	hangup
\fB\s-1SIGINT\s0\fR	2	interrupt
\fB\s-1SIGQUIT\s0\fR	3*	quit
\fB\s-1SIGILL\s0\fR	4*	illegal instruction
\fB\s-1SIGTRAP\s0\fR	5*	trace trap
\fB\s-1SIGABRT\s0\fR	6*	abort (generated by \fBabort\fP(3) routine)
\fB\s-1SIGEMT\s0\fR	7*	emulator trap
\fB\s-1SIGFPE\s0\fR	8*	arithmetic exception
\fB\s-1SIGKILL\s0\fR	9	kill (cannot be caught, blocked, or ignored)
\fB\s-1SIGBUS\s0\fR	10*	bus error
\fB\s-1SIGSEGV\s0\fR	11*	segmentation violation
\fB\s-1SIGSYS\s0\fR	12*	bad argument to system call
\fB\s-1SIGPIPE\s0\fR	13	write on a pipe or other socket with no one to read it
\fB\s-1SIGALRM\s0\fR	14	alarm clock
\fB\s-1SIGTERM\s0\fR	15	software termination signal
\fB\s-1SIGURG\s0\fR	16\*b	urgent condition present on socket
\fB\s-1SIGSTOP\s0\fR	17\*d	stop (cannot be caught, blocked, or ignored)
\fB\s-1SIGTSTP\s0\fR	18\*d	stop signal generated from keyboard
\fB\s-1SIGCONT\s0\fR	19\*b	continue after stop (cannot be blocked)
\fB\s-1SIGCHLD\s0\fR	20\*b	child status has changed
\fB\s-1SIGTTIN\s0\fR	21\*d	background read attempted from control terminal
\fB\s-1SIGTTOU\s0\fR	22\*d	background write attempted to control terminal
\fB\s-1SIGIO\s0\fR	23\*b	I/O is possible on a descriptor (see \fBfcntl\fR(2V))
\fB\s-1SIGXCPU\s0\fR	24	cpu time limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGXFSZ\s0\fR	25	file size limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGVTALRM\s0\fR	26	virtual time alarm (see \c
.BR getitimer (2))
\fB\s-1SIGPROF\s0\fR	27	profiling timer alarm (see \c
.BR getitimer (2))
\fB\s-1SIGWINCH\s0\fR	28\*b	window changed (see \fBtermio\fR(4) and \fBwin\fR(4S))
\fB\s-1SIGLOST\s0\fR	29*	resource lost (see \c
.BR lockd (8C))
\fB\s-1SIGUSR1\s0\fR	30	user-defined signal 1
\fB\s-1SIGUSR2\s0\fR	31	user-defined signal 2
.fi
.RE
.LP
The starred signals in the list above cause a core image
if not caught or ignored.
.LP
If
.I func
is
.BR \s-1SIG_DFL\s0 ,
the default action for signal
.I sig
is reinstated; this default is termination
(with a core image for starred signals)
except for signals marked with \*b or \*d.
Signals marked with \*b are discarded if the action
is
.BR \s-1SIG_DFL\s0 ;
signals marked with \*d cause the process to stop.  If
.I func
is
.SB SIG_IGN
the signal is subsequently ignored
and pending instances of the signal are discarded.
Otherwise, when the signal occurs
further occurrences of the signal are
automatically blocked and
.I func
is called.
.LP
A return from the function unblocks
the handled signal and
continues the process at the point it was interrupted.
.B
Unlike previous signal facilities, the handler
.I func
.B
remains installed after a signal has been delivered.
.LP
If a caught signal occurs
during certain system calls, 
terminating the call prematurely, the call
is automatically restarted.
In particular this can occur
during a
.BR read (2V)
or
.BR write (2V)
on a slow device (such as a terminal; but not a file)
and during a
.BR wait (2).
.LP
The value of
.B signal(\|)
is the previous (or initial)
value of
.I func
for the particular signal.
.LP
After a
.BR fork (2)
or
.BR vfork (2)
the child inherits all signals.  An
.BR execve (2)
resets all caught signals to the default action;
ignored signals remain ignored.
.SH NOTES
The handler routine can be declared:
.RS
.LP
.nf
.ft B
void handler(sig, code, scp, addr)
int sig, code;
struct sigcontext \(**scp;
char \(**addr;
.ft R
.fi
.RE
.LP
Here
.I sig
is the signal number;
.I code
is a parameter of certain signals that provides additional detail;
.I scp
is a pointer to the
.B sigcontext
structure (defined in
.BR <signal.h> ),
used to restore the context from before the signal;
and
.I addr
is additional address information.
See
.BR sigvec (2)
for more details.
.SH "RETURN VALUE
The previous action is returned on a successful call.
Otherwise, \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B signal(\|)
will fail and no action will take place if one of the
following occur:
.TP 20
.SM EINVAL
.I sig
is not a valid signal number.
.TP
.SM EINVAL
An attempt is made to ignore or supply a handler for
.SB SIGKILL
or
.BR \s-1SIGSTOP\s0 .
.TP 20
.SM EINVAL
An attempt is made to ignore
.SB SIGCONT
(by default
.SB SIGCONT
is ignored).
.SH "SEE ALSO"
.BR kill (1),
.BR execve (2),
.BR fork (2),
.BR getitimer (2),
.BR getrlimit (2),
.BR kill (2V),
.BR ptrace (2),
.BR read (2V),
.BR sigblock (2),
.BR sigpause (2),
.BR sigsetmask (2),
.BR sigstack (2),
.BR sigvec (2),
.BR vfork (2),
.BR wait (2),
.BR write (2V),
.BR setjmp (3),
.BR termio (4)
 V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n r   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n U  V     ypupdate./share/man/man3/signal.3v                                                                             755       0      12        14137  4424741340  10462                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)signal.3v 1.12 89/03/27 SMI; from UCB 4.2
.TH SIGNAL 3V "22 November 1987"
.ie t .ds d \(dg
.el .ds d \z|+
.ie t .ds b \(bu
.el .ds b @
.SH NAME
signal \- simplified software signal facilities
.SH SYNOPSIS
.nf
.B #include <signal.h>
.LP
.B void (\(**signal(sig, func))(\|)
.B void (\(**func)(\|);
.fi
.IX  "signal function V"  ""  "\fLsignal\fP \(em software signals, System V"
.IX  "software signal V"  ""  "software signal \(em \fLsignal\fP, System V"
.SH DESCRIPTION
.B signal(\|)
is a simplified interface to the more general
.BR sigvec (2)
facility.  Programs that use
.B signal(\|)
in preference to
.B sigvec(\|)
are more likely to be portable to all
systems.
.LP
A signal is generated by some abnormal event,
initiated by a user at a terminal (quit, interrupt, stop),
by a program error (bus error, etc.),
by request of another program (kill),
or when a process is stopped because it wishes to access
its control terminal while in the background (see
.BR termio (4)).
Signals are optionally generated
when a process resumes after being stopped,
when the status of child processes changes,
or when input is ready at the control terminal.
Most signals cause termination of the receiving process if no action
is taken; some signals instead cause the process receiving them
to be stopped, or are simply discarded if the process has not
requested otherwise.
Except for the
.SB SIGKILL
and
.SB SIGSTOP
signals, the
.B signal(\|)
call allows signals either to be ignored
or to interrupt to a specified location.
The following is a list of all signals with
names as in the include file
.BR <signal.h> :
.RS
.LP
.nf
.ta \w'SIGVTALRM 'u +\w'15*  'u
\fB\s-1SIGHUP\s0\fR	1	hangup
\fB\s-1SIGINT\s0\fR	2	interrupt
\fB\s-1SIGQUIT\s0\fR	3*	quit
\fB\s-1SIGILL\s0\fR	4*	illegal instruction
\fB\s-1SIGTRAP\s0\fR	5*	trace trap
\fB\s-1SIGABRT\s0\fR	6*	abort (generated by \fBabort\fP(3) routine)
\fB\s-1SIGEMT\s0\fR	7*	emulator trap
\fB\s-1SIGFPE\s0\fR	8*	arithmetic exception
\fB\s-1SIGKILL\s0\fR	9	kill (cannot be caught, blocked, or ignored)
\fB\s-1SIGBUS\s0\fR	10*	bus error
\fB\s-1SIGSEGV\s0\fR	11*	segmentation violation
\fB\s-1SIGSYS\s0\fR	12*	bad argument to system call
\fB\s-1SIGPIPE\s0\fR	13	write on a pipe or other socket with no one to read it
\fB\s-1SIGALRM\s0\fR	14	alarm clock
\fB\s-1SIGTERM\s0\fR	15	software termination signal
\fB\s-1SIGURG\s0\fR	16\*b	urgent condition present on socket
\fB\s-1SIGSTOP\s0\fR	17\*d	stop (cannot be caught, blocked, or ignored)
\fB\s-1SIGTSTP\s0\fR	18\*d	stop signal generated from keyboard
\fB\s-1SIGCONT\s0\fR	19\*b	continue after stop (cannot be blocked)
\fB\s-1SIGCHLD\s0\fR	20\*b	child status has changed
\fB\s-1SIGTTIN\s0\fR	21\*d	background read attempted from control terminal
\fB\s-1SIGTTOU\s0\fR	22\*d	background write attempted to control terminal
\fB\s-1SIGIO\s0\fR	23\*b	I/O is possible on a descriptor (see \fBfcntl\fR(2V))
\fB\s-1SIGXCPU\s0\fR	24	cpu time limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGXFSZ\s0\fR	25	file size limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGVTALRM\s0\fR	26	virtual time alarm (see \c
.BR getitimer (2))
\fB\s-1SIGPROF\s0\fR	27	profiling timer alarm (see \c
.BR getitimer (2))
\fB\s-1SIGWINCH\s0\fR	28\*b	window changed (see \fBtermio\fR(4) and \fBwin\fR(4S))
\fB\s-1SIGLOST\s0\fR	29*	resource lost (see \c
.BR lockd (8C))
\fB\s-1SIGUSR1\s0\fR	30	user-defined signal 1
\fB\s-1SIGUSR2\s0\fR	31	user-defined signal 2
.fi
.RE
.LP
The starred signals in the list above cause a core image
if not caught or ignored.
.LP
If
.I func
is
.BR \s-1SIG_DFL\s0 ,
the default action for signal
.I sig
is reinstated; this default is termination
(with a core image for starred signals)
except for signals marked with \*b or \*d.
Signals marked with \*b are discarded if the action is
.BR \s-1SIG_DFL\s0 ;
signals marked with \*d cause the process to stop.  If
.I func
is
.SB SIG_IGN
the signal is subsequently ignored
and pending instances of the signal are discarded.
Otherwise, when the signal occurs
.I func
is called.
The value of
.I func
for the caught signal is reset to
.SB SIG_DFL
before
.I func
is called, unless the signal is
.SB SIGILL
or
.SB SIGTRAP
.LP
A return from the function
continues the process at the point it was interrupted.
.LP
If a caught signal occurs
during certain system calls, causing
the call to terminate prematurely, the call
is interrupted.
In particular this can occur
during a
.BR read (2V)
or
.BR write (2V)
on a slow device (such as a terminal; but not a file)
and during a
.BR wait (2).
After the signal catching function returns, the
interrupted system call may return a \-1 to the calling process with
.B errno
set to
.SM EINTR\s0.
.LP
The value of
.B signal(\|)
is the previous (or initial)
value of
.I func
for the particular signal.
.LP
After a
.BR fork (2)
or
.BR vfork (2)
the child inherits all signals.  An
.BR execve (2)
resets all caught signals to the default action;
ignored signals remain ignored.
.SH NOTES
The handler routine can be declared:
.RS
.LP
.nf
.ft B
void handler(sig, code, scp, addr)
int sig, code;
struct sigcontext \(**scp;
char \(**addr;
.ft R
.fi
.RE
.LP
Here
.I sig
is the signal number;
.I code
is a parameter of certain signals that provides additional detail;
.I scp
is a pointer to the
.B sigcontext
structure (defined in
.BR <signal.h> ),
used to restore the context from before the signal;
and
.I addr
is additional address information.
See
.BR sigvec (2)
for more details.
.SH "RETURN VALUE
The previous action is returned on a successful call.
Otherwise, \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B signal(\|)
will fail and no action will take place if one of the
following occur:
.TP 20
.SM EINVAL
.I sig
is not a valid signal number.
.TP
.SM EINVAL
An attempt is made to ignore or supply a handler for
.SB SIGKILL
or
.BR \s-1SIGSTOP\s0 .
.TP 20
.SM EINVAL
An attempt is made to ignore
.SB SIGCONT
(by default
.SB SIGCONT
is ignored).
.SH "SEE ALSO"
.BR kill (1),
.BR execve (2),
.BR fork (2),
.BR getitimer (2),
.BR getrlimit (2),
.BR kill (2V),
.BR ptrace (2),
.BR read (2V),
.BR sigblock (2),
.BR sigpause (2),
.BR sigsetmask (2),
.BR sigstack (2),
.BR sigvec (2),
.BR vfork (2),
.BR wait (2),
.BR write (2V),
.BR setjmp (3),
.BR termio (4)
\fB\s-1SIGTTIN\s0\fR	21\*d	background read attempted from control terminal
\fB\s-1SIGTTOU\s0\fR	22\*d	background write attempted to control terminal
\fB\s-1SIGIO\s0\fR	23\*b	I/O is possible on a descriptor (see \fBfcntl\fR(2V))
\fB\s-1SIGXCPU\s0\fR	24	cpu time limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGXFSZ\s0\fR	25	file size limit exceeded (see \c
.BR getrlimit (2))
\fB\s-1SIGVTALRM\s0\fR	26	virtual time./share/man/man3/signaling_nan.3m                                                                      755       0      12          103  4424741340  11727                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_values.3m
.\" @(#)signaling_nan.3m 1.3 89/03/27 SMI;
significand.3m   B  
  sin.3m .  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT    space.3x 3r   Ch    spray.3r 3r   C|    
sprintf.3s r  C    
sprintf.3v x  C    sqrt.3m   C    srand.3c 3m   C    srand.3v 3m   C    	srand48.3 rt  C  	  	srandom.3 3c  D   &  stty.3c   D  
  	sscanf.3s c ./share/man/man3/signbit.3m                                                                            755       0      12          100  4424741342  10556                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_functions.3m
.\" @(#)signbit.3m 1.3 89/03/27 SMI;
sin.3m n  B  
   single_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v    C@     sm_inter.3r   CT    space.3x m_i  Ch    spray.3r pac  C|    
sprintf.3s a  C    
sprintf.3v i  C    sqrt.3m   C    srand.3c    C    srand.3v ran  C    	srand48.3 an  C  	  	srandom.3 an  D   &  stty.3c   D  
  	sscanf.3s    D(    	sscanf.3v ca  D<  ./share/man/man3/significand.3m                                                                        755       0      12           77  4424741342  11372                                                                                                                                                                                                                                                                                                                                                                      .so man3/ieee_test.3m
.\" @(#)significand.3m 1.3 89/03/27 SMI;
gle_precision.3m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v .3   C@     sm_inter.3r   CT    space.3x 3r   Ch    spray.3r m_i  C|    
sprintf.3s c  C    
sprintf.3v a  C    sqrt.3m   C    srand.3c 3m   C    srand.3v    C    	srand48.3 an  C  	  	srandom.3 an  D   &  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v    D<    	ssignal.3 ca  DP  
./share/man/man3/sin.3m                                                                                755       0      12           62  4424741342   7677                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)sin.3m 1.3 89/03/27 SMI;
m   B  
   single_to_decimal.3   C  
  sinh.3m   C  
  sleep.3   C,  
  sleep.3v lee  C@     sm_inter.3r   CT    space.3x ter  Ch    spray.3r .3x  C|    
sprintf.3s r  C    
sprintf.3v .  C    sqrt.3m   C    srand.3c qrt  C    srand.3v .3c  C    	srand48.3 3v  C  	  	srandom.3 8.  D   &  stty.3c   D  
  	sscanf.3s ty  D(    	sscanf.3v .3  D<    	ssignal.3 .3  DP  
  standend.3v   Dd    ./share/man/man3/single_precision.3m                                                                   755       0      12         5744  4424741342  12516                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)single_precision.3m 1.12 89/03/27 SMI;
.TH SINGLE_PRECISION 3M "21 October 1987"
.SH NAME
single_precision - Single-precision access to math library functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.ft B
\s-1FLOATFUNCTIONTYPE\s0 r_acos_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_acosh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_aint_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_anint_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_asin_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_asinh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_atan_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_atanh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_atan2_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_cbrt_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_ceil_ (x)
enum fp_class_type ir_fp_class_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_copysign_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_cos_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_cosh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_erf_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_erfc_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_exp_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_expm1_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_exp2_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_exp10_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_fabs_ (x)
int ir_finite_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_floor_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_fmod_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_hypot_ (x,y)
int ir_ilogb_ (x)
int ir_irint_ (x)
int ir_isinf_ (x)
int ir_isnan_ (x)
int ir_isnormal_ (x)
int ir_issubnormal_ (x)
int ir_iszero_ (x)
int ir_nint_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_infinity_ (\|)
\s-1FLOATFUNCTIONTYPE\s0 r_j0_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_j1_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_jn_ (n,x)
\s-1FLOATFUNCTIONTYPE\s0 r_lgamma_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_logb_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_log_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_log1p_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_log2_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_log10_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_max_normal_ (\|)
\s-1FLOATFUNCTIONTYPE\s0 r_max_subnormal_ (\|)
\s-1FLOATFUNCTIONTYPE\s0 r_min_normal_ (\|)
\s-1FLOATFUNCTIONTYPE\s0 r_min_subnormal_ (\|)
\s-1FLOATFUNCTIONTYPE\s0 r_nextafter_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_pow_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_quiet_nan_ (n)
\s-1FLOATFUNCTIONTYPE\s0 r_remainder_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_rint_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_scalb_ (x,y)
\s-1FLOATFUNCTIONTYPE\s0 r_scalbn_ (x,n)
\s-1FLOATFUNCTIONTYPE\s0 r_signaling_nan_ (n)
int ir_signbit_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_significand_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_sin_ (x)
void r_sincos_ (x,s,c)
\s-1FLOATFUNCTIONTYPE\s0 r_sinh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_sqrt_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_tan_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_tanh_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_y0_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_y1_ (x)
\s-1FLOATFUNCTIONTYPE\s0 r_yn_ (n,x)
.ft
.LP
.B float *x, *y, *s, *c
.B int *n
.fi
.SH DESCRIPTION
.IX "single-precision versions of math functions"
.LP
These functions are single-precision versions of certain
.B libm
functions.
Primarily for use by Fortran programmers,
these functions may also be used in other languages.
The single-precision floating-point results are deviously declared
to avoid C's automatic type conversion to double.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/libm.a
.PD
ATFUNCTIONTYPE\s0 r_atanh_ (./share/man/man3/single_to_decimal.3                                                                   755       0      12          115  4424741343  12412                                                                                                                                                                                                                                                                                                                                                                      .so man3/floating_to_decimal.3
.\" @(#)single_to_decimal.3 1.3 89/03/27 SMI;
 
  sleep.3v    C@     sm_inter.3r   CT    space.3x m_i  Ch    spray.3r pac  C|    
sprintf.3s a  C    
sprintf.3v i  C    sqrt.3m   C    srand.3c    C    srand.3v ran  C    	srand48.3 an  C  	  	srandom.3 an  D   &  stty.3c   D  
  	sscanf.3s    D(    	sscanf.3v ca  D<    	ssignal.3 ca  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    stan./share/man/man3/sinh.3m                                                                               755       0      12           71  4424741344  10051                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)sinh.3m 1.3 89/03/27 SMI;
.3v    C@     sm_inter.3r   CT    space.3x m_i  Ch    spray.3r pac  C|    
sprintf.3s a  C    
sprintf.3v i  C    sqrt.3m   C    srand.3c    C    srand.3v ran  C    	srand48.3 an  C  	  	srandom.3 an  D   &  stty.3c   D  
  	sscanf.3s    D(    	sscanf.3v ca  D<    	ssignal.3 ca  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s tan./share/man/man3/sleep.3                                                                               755       0      12         2525  4424741345  10112                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)sleep.3 1.12 89/03/27 SMI; from UCB 6.2 5/12/86
.TH SLEEP 3  "6 October 1987"
.SH NAME
sleep \- suspend execution for interval
.SH SYNOPSIS
.nf
.B sleep(seconds)
.B unsigned seconds;
.fi
.IX  "sleep function"  ""  "\fLsleep\fP \(em suspend execution"
.IX  "suspend execution for interval"  ""  "suspend execution \(em \fLsleep\fP"
.IX  execution  "suspend for interval"
.SH DESCRIPTION
.B sleep(\|)
suspends the current process from execution for the
number
of seconds specified by the argument.  The actual suspension time may be
up to 1 second less than that requested, because scheduled wakeups occur
at fixed 1-second intervals, and may be an arbitrary amount longer because of
other activity in the system.
.LP
.B sleep(\|)
is implemented by setting an interval timer and pausing
until it expires.  The previous state of this
timer is saved and restored.  If the sleep time
exceeds the time to the expiration of the
previous value of the timer, the process sleeps
only until the timer would have expired, and the
signal which occurs with the expiration
of the timer is sent one second later.
.SH "SEE ALSO"
.BR getitimer (2),
.BR sigpause (2),
.BR usleep (3)
.3n     G  5   svcerr_noproc.3n     G  6   svcerr_noprog.3n     G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4./share/man/man3/sleep.3v                                                                              755       0      12         3105  4424741345  10273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sleep.3v 1.7 89/03/27 SMI; from S5
.TH SLEEP 3V  "6 October 1987"
.SH NAME
sleep \- suspend execution for interval
.SH SYNOPSIS
.nf
.B unsigned sleep(seconds)
.B unsigned seconds;
.fi
.SH DESCRIPTION
.IX  "sleep function"  ""  "\fLsleep\fP \(em suspend execution"
.IX  "suspend execution for interval"  ""  "suspend execution \(em \fLsleep\fP"
.IX  execution  "suspend for interval"
.LP
.B sleep(\|)
suspends the current process from execution for the
number
of seconds specified by the argument.  The actual suspension time may be
less than that requested for two reasons: (1) because scheduled wakeups occur
at fixed 1-second intervals and (2) because any caught
signal will terminate the
.B sleep(\|)
following execution of that signal's catching routine.
Also, the suspension time may be an arbitrary amount longer than requested
because of other activity in the system.
The value returned by
.B sleep(\|)
will be 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
.B sleep(\|)
time, or premature arousal due to another caught signal.
.LP
.B sleep(\|)
is implemented by setting an interval timer and
pausing
until it expires.  The previous state of this timer is saved and restored.
If the sleep time exceeds the time to the expiration of the
previous value of the timer, the process sleeps only until the timer
would have expired, and the signal which occurs with the expiration
of the timer is sent one second later.
.SH "SEE ALSO"
.BR setitimer (2),
.BR sigpause (2),
.BR usleep (3)
 H  =   svcudp_create.3n     H  >  swab.3   H  ?  
sys_errlist.3 ?  H  @  
sys_nerr.3   H  A  
sys_siglist.3 A  H  B  syslog.3  H  I  C  system.3  I  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3 I8  IL  G  	telldir.3 IL  I`  H  
tempnam.3s `  It  I  
termcap.3x t  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x   I  N  
tgetstr.3x   I  O  ./share/man/man3/sm_inter.3r                                                                           755       0      12         1033  4424741345  10775                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sm_inter.3r 1.7 89/03/27 SMI;
.TH SM_INTER 3R "6 October 1987"
.SH NAME
sm_inter \- status monitor protocol
.SH PROTOCOL
.B /usr/include/rpcsvc/sm_inter.x
.IX "status monitor protocol"
.SH DESCRIPTION
The status monitor protocol is used for monitoring
the status of remote hosts.
.SH PROGRAMMING
.nf
.B #include <rpcsvc/sm_inter.h>
.fi
.SS XDR Routines
.LP
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_sm_name
.B	xdr_mon
.B	xdr_mon_id
.B	xdr_sm_stat_res
.B	xdr_sm_stat
.fi
.SH SEE ALSO
.BR statd (8C)
3  D  E    strcmp.3  D  E    strcpy.3  E  E,    	strcspn.3 E  E@    strdup.3  E,  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  Ep  E    	strncat.3 E  E    	strncmp.3 E  E    	strncpy.3 E  E     	strpbrk.3 E  E  !  	strrchr.3 E  F   "  strspn.3  E  F  #  strtod.3  F   F(  $  strtok.3  F  F<  %  strtol.3  F(  FP  '  	subwin.3v F<  Fd  (  	subwin.3x FP  F|  )  svc_destroy.3n |  F  *  
./share/man/man3/space.3x                                                                              755       0      12           64  4424741345  10221                                                                                                                                                                                                                                                                                                                                                                      .so man3/plot.3x
.\" @(#)space.3x 1.4 89/03/27 SMI;
    
sprintf.3s T  C    
sprintf.3v h  C    sqrt.3m   C    srand.3c 3m   C    srand.3v 3m   C    	srand48.3 C  C  	  	srandom.3 C  D   &  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v c   D<    	ssignal.3 D  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x  D  D    strcat.3  D  D    strc./share/man/man3/spray.3r                                                                              755       0      12         1041  4424741345  10312                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)spray.3r 1.10 89/03/27 SMI;
.TH SPRAY 3R "6 October 1987"
.SH NAME
spray \- scatter data in order to check the network
.SH PROTOCOL
.B /usr/include/rpcsvc/spray.x
.SH DESCRIPTION
.IX "spray function" "" "\fLspray()\fP function"
.LP
The spray protocol sends packets to a given
machine to test the speed and reliability of it.
.SH PROGRAMMING
.LP
.nf
.B #include <rpcsvc/spray.h>
.fi
.LP
The following
.SM XDR
routines are available in
.BR librpcsvc :
.nf
.B	xdr_sprayarr
.B	xdr_spraycumul
.fi
.SH SEE ALSO
.BR spray (8C),
.BR sprayd (8C)
 E,    	strcspn.3 D  E@    strdup.3  E  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 Ep  E    	strncpy.3 E  E     	strpbrk.3 E  E  !  	strrchr.3 E  F   "  strspn.3  E  F  #  strtod.3  E  F(  $  strtok.3  E  F<  %  strtol.3  F   FP  '  	subwin.3v F  Fd  (  	subwin.3x F(  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,./share/man/man3/sprintf.3s                                                                            755       0      12           71  4424741345  10604                                                                                                                                                                                                                                                                                                                                                                      .so man3/printf.3s
.\" @(#)sprintf.3s 1.5 89/03/27 SMI; 
 sqrt.3m   C    srand.3c 3m   C    srand.3v 3m   C    	srand48.3 m   C  	  	srandom.3 m   D   &  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v c   D<    	ssignal.3 c   DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3 3x   D    strchr.3  D  E    strcmp.3  D  E    strc./share/man/man3/sprintf.3v                                                                            755       0      12           70  4424741346  10607                                                                                                                                                                                                                                                                                                                                                                      .so man3/printf.3v
.\" @(#)sprintf.3v 1.4 89/03/27 SMI;
srand.3c 3m   C    srand.3v 3m   C    	srand48.3 m   C  	  	srandom.3 m   D   &  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v c   D<    	ssignal.3 c   DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3 3x   D    strchr.3 3x   E    strcmp.3  D  E    strcpy.3  D  E,    	strc./share/man/man3/sqrt.3m                                                                               755       0      12         1553  4424741346  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sqrt.3m 1.15 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SQRT 3M "22 November 1987"
.UC 6
.ds up \fIulp\fR
.SH NAME
sqrt, cbrt \- cube root, square root
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double cbrt(x)
.B double x;
.LP
.B double sqrt(x)
.B double x;
.fi
.SH DESCRIPTION
.IX sqrt "" "\fLsqrt\fR \(em square root function"
.IX cbrt "" "\fLcbrt\fR \(em cube root function"
.BI sqrt( x )
returns the square root of
.IR x ,
correctly rounded according to
.SM ANSI/IEEE
754-1985.  In addition,
.B sqrt(\|)
may also set
.B errno
and call
.BR matherr (3M).
.LP
.BI cbrt( x )
returns the cube root of
.IR x .
.B cbrt(\|)
is accurate to within 0.7 \*(ups.
.SH SEE ALSO
.BR matherr (3M)
svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getr./share/man/man3/srand.3c                                                                              755       0      12           65  4424741346  10212                                                                                                                                                                                                                                                                                                                                                                      .so man3/rand.3c
.\" @(#)srand.3c 1.5 89/03/27 SMI; 
   	srand48.3 C  C  	  	srandom.3 C  D   &  stty.3c   D  
  	sscanf.3s D  D(    	sscanf.3v D(  D<    	ssignal.3 D<  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s  D  D    stdio.3v  D  D    store.3x  D  D    strcat.3  D  D    strchr.3  D  E    strcmp.3  E  E    strcpy.3  E  E,    	strcspn.3 E,  E@    strdup.3  E@  E\     ./share/man/man3/srand.3v                                                                              755       0      12           64  4424741346  10234                                                                                                                                                                                                                                                                                                                                                                      .so man3/rand.3v
.\" @(#)srand.3v 1.4 89/03/27 SMI;
  	  	srandom.3 C  D   &  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v D  D<    	ssignal.3 D(  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v  D  D    store.3x  D  D    strcat.3  D  D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  E  E,    	strcspn.3 E  E@    strdup.3  E,  E\     string_to_decimal.3   Ep./share/man/man3/srand48.3                                                                             755       0      12           70  4424741346  10217                                                                                                                                                                                                                                                                                                                                                                      .so man3/drand48.3
.\" @(#)srand48.3 1.5 89/03/27 SMI; 
  stty.3c   D  
  	sscanf.3s c   D(    	sscanf.3v c   D<    	ssignal.3 D  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x  D  D    strcat.3  D  D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  D  E,    	strcspn.3 E  E@    strdup.3  E  E\     string_to_decimal.3   Ep    	strings.3 3   E./share/man/man3/srandom.3                                                                             755       0      12           67  4424741347  10406                                                                                                                                                                                                                                                                                                                                                                      .so man3/random.3
.\" @(#)srandom.3 1.5 89/03/27 SMI; 
	sscanf.3s c   D(    	sscanf.3v c   D<    	ssignal.3 c   DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3  D  D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  D  E,    	strcspn.3 D  E@    strdup.3  E  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E./share/man/man3/stty.3c                                                                               755       0      12         2571  4424741354  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stty.3c 1.11 89/03/27 SMI; from UCB 4.2
.TH STTY 3C "22 March 1989"
.SH NAME
stty, gtty \- set and get terminal state
.SH SYNOPSIS
.nf
.B #include <sgtty.h>
.LP
.B stty(fd, buf)
.B int fd;
.B struct sgttyb *buf;
.LP
.B gtty(fd, buf)
.B int fd;
.B struct sgttyb *buf;
.fi
.IX  set "terminal state \(em \fLstty\fP"
.IX  get "terminal state \(em \fLgtty\fP"
.IX  "terminal state"  get  ""  "get \(em \fLgtty\fP"
.IX  "terminal state"  set  ""  "set \(em \fLstty\fP"
.IX  "state of terminal"  get  ""  "get \(em \fLgtty\fP"
.IX  "state of terminal"  set  ""  "set \(em \fLstty\fP"
.IX  "stty function"  ""  "\fLstty\fP \(em set terminal state"
.IX  "gtty function"  ""  "\fLgtty\fP \(em get terminal state"
.SH DESCRIPTION
.B
This interface is obsoleted by
.BR ioctl (2).
.LP
.B stty(\|)
sets the state of the terminal associated with
.IR fd .
.B stty(\|)
retrieves the state of the terminal associated with
.IR fd .
To set the state of a terminal the call must have
write permission.
.LP
The
.B stty(\|)
call is actually
.IP
.B ioctl(fd, \s-1TIOCSETP\s0, buf)
.LP
while the
.B gtty(\|)
call is
.IP
.B ioctl(fd, \s-1TIOCGETP\s0, buf)
.LP
See
.BR ioctl (2)
and
.BR ttcompat (4M)
for an explanation.
.SH DIAGNOSTICS
If the call is successful 0 is returned, otherwise \-1 is
returned and the global variable
.B errno
contains the reason for the failure.
.SH SEE ALSO
.BR ioctl (2),
.BR ttcompat (4M)
 state"  get  ""  "get \(em \fLgtty\fP"
.IX  "terminal state"  set  ""  "set \(em \fLstty\fP"
.IX  "state of terminal"  get  ""  "get \./share/man/man3/sscanf.3s                                                                             755       0      12           67  4424741347  10403                                                                                                                                                                                                                                                                                                                                                                      .so man3/scanf.3s
.\" @(#)sscanf.3s 1.5 89/03/27 SMI; 
  	ssignal.3 D<  DP  
  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s  D  D    stdio.3v  D  D    store.3x  D  D    strcat.3  D  D    strchr.3  D  E    strcmp.3  E  E    strcpy.3  E  E,    	strcspn.3 E,  E@    strdup.3  E@  E\     string_to_decimal.3   Ep    	strings.3 Ep  E    strlen.3  E  E    	strncat.3 E  E    	strncmp.3 E./share/man/man3/sscanf.3v                                                                             755       0      12           66  4424741347  10405                                                                                                                                                                                                                                                                                                                                                                      .so man3/scanf.3v
.\" @(#)sscanf.3v 1.4 89/03/27 SMI;

  standend.3v   Dd    standend.3x   Dx    standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v  D  D    store.3x  D  D    strcat.3  D  D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  E  E,    	strcspn.3 E  E@    strdup.3  E,  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  Ep  E    	strncat.3 E  E    	strncmp.3 E  E    	strncpy.3 E./share/man/man3/ssignal.3                                                                             755       0      12         4277  4424741347  10452                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ssignal.3 1.7 89/03/27 SMI; from  S5
.TH SSIGNAL 3 "6 October 1987"
.SH NAME
ssignal, gsignal \- software signals
.SH SYNOPSIS
.nf
.B #include <signal.h>
.LP
.B int (\(**ssignal (sig, action))(\|)
.B int sig, (\(**action)(\|);
.LP
.B int gsignal (sig)
.B int sig;
.fi
.SH DESCRIPTION
.IX  "signal function"  ""  "\fLssignal\fP \(em software signals"
.IX  "software signal"  ""  "software signal \(em \fLssignal\fP"
.IX  "signal function"  ""  "\fLgsignal\fP \(em software signals"
.IX  "software signal"  ""  "software signal \(em \fLgsignal\fP"
.B ssignal(\|)
and
.B ssignal(\|)
implement a software facility similar to
.BR signal (3).
.LP
Software signals made available to users are associated
with integers in the inclusive
range 1 through 15. A call to
.B ssignal(\|)
associates a procedure,
.IR action ,
with the software signal
.IR sig ;
the software signal,
.IR sig ,
is raised by a call to
.BR ssignal .
Raising a software signal causes the
action established for that signal to be
.IR taken .
.LP
The first argument to
.B ssignal(\|)
is a number identifying the type of signal for
which an action is to be established. The second
argument defines the action; it is either the
name of a (user-defined)
.I action function
or one of the manifest constants
.SB SIG_DFL
.BR  (default) or
.SB SIG_IGN
.BR  (ignore).
.B ssignal(\|)
returns the action previously established for
that signal type; if no action has been established
or the signal number is illegal,
.B ssignal(\|)
returns
.BR \s-1SIG_DFL\s0 .
.LP
.B ssignal(\|)
raises the signal identified by its argument,
.IR sig :
.RS 5
.LP
If an action function has been established for
.IR sig ,
then that action is reset to
.SB SIG_DFL
and the action function is entered with argument
.IR sig .
.B ssignal(\|)
returns the value returned to it by the action function.
.LP
If the action for
.I sig
is
.BR \s-1SIG_IGN\s0 ,
.B ssignal(\|)
returns the value 1 and takes no other action.
.LP
If the action for
.I sig
is
.BR \s-1SIG_DFL\s0 ,
.B ssignal(\|)
returns the value 0 and takes no other action.
.LP
If
.I sig
has an illegal value or no action was ever specified for
.IR sig ,
.B ssignal(\|)
returns the value 0 and takes no other action.
.RE
.SH "SEE ALSO"
.BR signal (3)
  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 K  L   i  
ttyslot.3v   L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c o  L  r  	unct./share/man/man3/standend.3v                                                                           755       0      12           71  4424741347  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)standend.3v 1.4 89/03/27 SMI;
 standout.3v   D    standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3  D  D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  D  E,    	strcspn.3 D  E@    strdup.3  E  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 Ep  E    	strncpy.3 E  E     	strpbrk.3 E  E  !  	strrchr.3 E./share/man/man3/standend.3x                                                                           755       0      12           72  4424741350  10721                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)standend.3x 1.5 89/03/27 SMI; 
 standout.3x   D    stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3 3x   D    strchr.3  D  E    strcmp.3  D  E    strcpy.3  D  E,    	strcspn.3 D  E@    strdup.3  D  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 Ep  E     	strpbrk.3 E  E  !  	strrchr.3 E  F   "  strspn.3  E./share/man/man3/standout.3v                                                                           755       0      12           71  4424741350  10757                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)standout.3v 1.4 89/03/27 SMI;
 stdio.3s 3x   D    stdio.3v 3x   D    store.3x 3x   D    strcat.3 3x   D    strchr.3 3x   E    strcmp.3  D  E    strcpy.3  D  E,    	strcspn.3 D  E@    strdup.3  D  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 Ep  E  !  	strrchr.3 E  F   "  strspn.3  E  F  #  strtod.3  E./share/man/man3/standout.3x                                                                           755       0      12           72  4424741350  10762                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)standout.3x 1.5 89/03/27 SMI; 
 stdio.3v 3x   D    store.3x 3x   D    strcat.3 3x   D    strchr.3 3x   E    strcmp.3 3x   E    strcpy.3  D  E,    	strcspn.3 D  E@    strdup.3  D  E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 Ep  F   "  strspn.3  E  F  #  strtod.3  E  F(  $  strtok.3  E./share/man/man3/stdio.3s                                                                              755       0      12        11040  4424741350  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stdio.3s 1.12 89/03/27 SMI; from UCB 4.2
.TH STDIO 3S "30 January 1988"
.SH NAME
stdio \- standard buffered input/output package
.SH SYNOPSIS
.B #include <stdio.h>
.LP
.SM
.B FILE
.B *stdin;
.br
.SM
.B FILE
.B *stdout;
.br
.SM
.B FILE
.B *stderr;
.SH DESCRIPTION
.IX  introduction  "standard I/O library functions"  
.IX  "standard I/O library functions, introduction to"
.IX  "buffered I/O library functions, introduction to"
.IX  "library functions"  "introduction to standard I/O"
.LP
The functions described in section 3S constitute a user-level I/O buffering
scheme.  The in-line macros
.BR getc (3S)
and
.BR putc (3S)
handle characters quickly.  The macros
.BR getchar " and " putchar ,
and the higher level routines
.BR fgetc ,
.BR getw ,
.BR gets ,
.BR fgets ,
.BR scanf ,
.BR fscanf ,
.BR fread ,
.BR fputc ,
.BR putw ,
.BR puts ,
.BR fputs ,
.BR printf ,
.BR fprintf ,
.BR fwrite
all use or act as if they use
.B getc(\|)
and
.B putc(\|) ;
they can be freely intermixed.
.LP
A file with associated buffering is called a
.IR stream ,
and is declared to be a pointer to a defined type
.SM
.BR FILE \s0.
.BR 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
.B <stdio.h>
include file and associated with the standard open files:
.TP 10n
.B stdin
standard input file
.br
.ns
.TP
.B stdout
standard output file
.br
.ns
.TP
.B stderr
standard error file
.LP
A constant
.SM
.B NULL
(0)
designates a nonexistent pointer.
.LP
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).
.LP
Any module that uses this package
must include the header file of pertinent macro definitions,
as follows:
.PP
.RS
#include \|<stdio.h>
.RE
.LP
The functions and constants mentioned in sections labeled 3S of this manual
are declared in that header file and need no further declaration.
The constants and the following `functions' are
implemented as macros; redeclaration of these names is perilous:
.BR getc ,
.BR getchar ,
.BR putc ,
.BR putchar ,
.BR feof ,
.BR ferror ,
.BR fileno ,
and
.BR clearerr .
.LP
Output streams, with the exception of the standard error stream
.BR stderr ,
are by default buffered if the output refers to a file
and line-buffered if the
output refers to a terminal.
The standard error output stream
.B stderr
is by default unbuffered,
but use of
.BR fopen (3S)
will cause it to become buffered or line-buffered.
When an output stream is unbuffered,
information is written to the
destination file or terminal as soon as it is output to the stream;
when it is buffered,
many characters are saved up and written as a block.
When it is line-buffered,
each line of output is written to the
destination file or terminal as soon as the line is completed
(that is, as soon as a
.SM NEWLINE 
character is output
or, if the output stream is
.B stdout
or
.BR stderr ,
as soon as input is read from
.BR stdin ).
.BR setbuf (3S),
.BR setbuffer ,
.BR setlinebuf ,
or
.BR setvbuf
can be used to change the
stream's buffering strategy.
.SH "SEE ALSO"
.BR open (2V),
.BR close (2),
.BR lseek (2),
.BR pipe (2),
.BR read (2V),
.BR write (2V),
.BR ctermid (3S),
.BR cuserid (3S),
.BR fclose (3S),
.BR ferror (3S),
.BR fopen (3S),
.BR fread (3S),
.BR fseek (3S),
.BR getc (3S),
.BR gets (3S),
.BR popen (3S),
.BR printf (3S),
.BR putc (3S),
.BR puts (3S),
.BR scanf (3S),
.BR setbuf (3S),
.BR system (3),
.BR tmpfile (3S),
.BR tmpnam (3S),
.BR ungetc (3S)
.SH DIAGNOSTICS
.LP
The value
.SM
.B EOF
is returned uniformly to indicate that a
.SM
.B FILE
pointer has not been initialized with
.BR fopen ,
input (output) has been attempted on an output (input) stream, or a
.SM
.B FILE
pointer designates corrupt or otherwise unintelligible
.SM
.B FILE
data.
.SH BUGS
.LP
The standard buffered functions do not interact well with certain other
library and system functions, especially
.BR vfork (2).
.SH NOTES
.LP
The line buffering of output to terminals is almost always transparent,
but may cause confusion or malfunctioning of programs which use
standard I/O routines but use
.BR read (2V)
to read from the standard input, as calls to
.B read(\|)
do not cause output to line-buffered streams to be flushed.
.LP
In cases where a large amount of computation is done after printing
part of a line on an output terminal, it is necessary to call
.BR fflush
(see
.BR fclose (3S))
on the standard output before performing the computation so that the output
will appear.
  T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ./share/man/man3/stdio.3v                                                                              755       0      12        11354  4424741350  10326                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)stdio.3v 1.5 89/03/27 SMI; from UCB 4.2
.TH STDIO 3V "30 January 1988"
.SH NAME
stdio \- standard buffered input/output package
.SH SYNOPSIS
.B #include <stdio.h>
.LP
.SM
.B FILE
.B *stdin;
.br
.SM
.B FILE
.B *stdout;
.br
.SM
.B FILE
.B *stderr;
.SH DESCRIPTION
.IX  introduction  "standard I/O library functions"  
.IX  "standard I/O library functions, introduction to"
.IX  "buffered I/O library functions, introduction to"
.IX  "library functions"  "introduction to standard I/O"
.LP
The functions described in sections 3V and 3S constitute a user-level I/O
buffering scheme.  The in-line macros
.BR getc (3V)
and
.BR putc (3S)
handle characters quickly.  The macros
.BR getchar " and " putchar ,
and the higher level routines
.BR fgetc ,
.BR getw ,
.BR gets ,
.BR fgets ,
.BR scanf ,
.BR fscanf ,
.BR fread ,
.BR fputc ,
.BR putw ,
.BR puts ,
.BR fputs ,
.BR printf ,
.BR fprintf ,
.BR fwrite
all use or act as if they use
.B getc(\|)
and
.B putc(\|) ;
they can be freely intermixed.
.LP
A file with associated buffering is called a
.IR stream ,
and is declared to be a pointer to a defined type
.SM
.BR FILE \s0.
.BR fopen (3V)
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
.B <stdio.h>
include file and associated with the standard open files:
.TP 10n
.B stdin
standard input file
.br
.ns
.TP
.B stdout
standard output file
.br
.ns
.TP
.B stderr
standard error file
.LP
A constant
.SM
.B NULL
(0)
designates a nonexistent pointer.
.LP
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).
.LP
Any module that uses this package
must include the header file of pertinent macro definitions,
as follows:
.PP
.RS
#include \|<stdio.h>
.RE
.LP
The functions and constants mentioned in sections labeled 3V and 3S of this
manual are declared in that header file and need no further declaration.
The constants and the following `functions' are
implemented as macros; redeclaration of these names is perilous:
.BR getc ,
.BR getchar ,
.BR putc ,
.BR putchar ,
.BR feof ,
.BR ferror ,
.BR fileno ,
and
.BR clearerr .
.LP
Output streams, with the exception of the standard error stream
.BR stderr ,
are by default buffered if the output refers to a file
and line-buffered if the
output refers to a terminal.
The standard error output stream
.B stderr
is by default unbuffered,
but use of
.BR fopen (3V)
will cause it to become buffered or line-buffered.
When an output stream is unbuffered,
information is written to the
destination file or terminal as soon as it is output to the stream;
when it is buffered,
many characters are saved up and written as a block.
When it is line-buffered,
each line of output is written to the
destination file or terminal as soon as the line is completed
(that is, as soon as a
.SM NEWLINE
character is output
or as soon as input is read from a line-buffered stream).
.BR setbuf (3V),
.BR setbuffer ,
.BR setlinebuf ,
or
.B setvbuf
can be used to change the
stream's buffering strategy.
.SH "SEE ALSO"
.BR open (2V),
.BR close (2),
.BR lseek (2),
.BR pipe (2),
.BR read (2V),
.BR vfork (2),
.BR write (2V),
.BR ctermid (3S),
.BR cuserid (3S),
.BR fclose (3S),
.BR ferror (3V),
.BR fopen (3V),
.BR fread (3S),
.BR fseek (3S),
.BR getc (3V),
.BR gets (3S),
.BR popen (3S),
.BR printf (3V),
.BR putc (3S),
.BR puts (3S),
.BR scanf (3V),
.BR setbuf (3V),
.BR system (3),
.BR tmpfile (3S),
.BR tmpnam (3S),
.BR ungetc (3S)
.SH DIAGNOSTICS
.LP
The value
.SM
.B EOF
is returned uniformly to indicate that a
.SM
.B FILE
pointer has not been initialized with
.BR fopen ,
input (output) has been attempted on an output (input) stream, or a
.SM
.B FILE
pointer designates corrupt or otherwise unintelligible
.SM
.B FILE
data.
.SH BUGS
.LP
The standard buffered functions do not interact well with certain other
library and system functions, especially
.BR vfork (2).
.SH NOTES
.LP
The line buffering of output to terminals is almost always transparent,
but may cause confusion or malfunctioning of programs which use
standard I/O routines but use
.BR read (2V)
to read from the standard input, as calls to
.B read(\|)
do not cause output to line-buffered streams to be flushed.
.LP
Output saved up on
.I all
line-buffered streams is written when input is read from
.I any
line-buffered stream.  Input read from a stream that is not
line-buffered does not flush output on line-buffered streams.
.LP
In cases where a large amount of computation is done after printing
part of a line on an output terminal, it is necessary to call
.BR fflush
(see
.BR fclose (3S))
on the standard output before performing the computation so that the output
will appear.
 FILE
.B *stderr;
.SH DESCRIPTION
.IX  introduction  "standard I/O library functions"  
.IX  "standard I/O library functions, introduction to"
.IX  "buffered I/O library functions, introduction to"
.IX  "library functions"  "introduction to standard I/O"
.LP
The functions des./share/man/man3/store.3x                                                                              755       0      12           64  4424741351  10257                                                                                                                                                                                                                                                                                                                                                                      .so man3/dbm.3x
.\" @(#)store.3x 1.5 89/03/27 SMI; 
    strchr.3 3x   E    strcmp.3 3x   E    strcpy.3 3x   E,    	strcspn.3 x   E@    strdup.3  x   E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  Ep  F<  %  strtol.3  E  FP  '  	subwin.3v E  Fd  (  	subwin.3x E./share/man/man3/strcat.3                                                                              755       0      12           67  4424741351  10236                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strcat.3 1.6 89/03/27 SMI; 
  strcmp.3 3x   E    strcpy.3 3x   E,    	strcspn.3 x   E@    strdup.3  x   E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  Ep  FP  '  	subwin.3v E  Fd  (  	subwin.3x E  F|  )  svc_destroy../share/man/man3/strchr.3                                                                              755       0      12           66  4424741351  10242                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strchr.3 1.5 89/03/27 SMI;
  strcpy.3 3x   E,    	strcspn.3 x   E@    strdup.3  x   E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  3   FP  '  	subwin.3v Ep  Fd  (  	subwin.3x E  F|  )  svc_destroy.3n |  F  *  
svc_fds../share/man/man3/strcmp.3                                                                              755       0      12           67  4424741351  10246                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strcmp.3 1.6 89/03/27 SMI; 
  	strcspn.3 x   E@    strdup.3  x   E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  3   FP  '  	subwin.3v 3   Fd  (  	subwin.3x Ep  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_free./share/man/man3/strcpy.3                                                                              755       0      12           67  4424741351  10262                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strcpy.3 1.6 89/03/27 SMI; 
  strdup.3  x   E\     string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  3   FP  '  	subwin.3v 3   Fd  (  	subwin.3x 3   F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_./share/man/man3/strcspn.3                                                                             755       0      12           67  4424741352  10433                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strcspn.3 1.5 89/03/27 SMI;
   string_to_decimal.3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  3   FP  '  	subwin.3v 3   Fd  (  	subwin.3x 3   F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   ./share/man/man3/strdup.3                                                                              755       0      12           66  4424741352  10257                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strdup.3 1.5 89/03/27 SMI;
3   Ep    	strings.3 3   E    strlen.3  3   E    	strncat.3 3   E    	strncmp.3 3   E    	strncpy.3 3   E     	strpbrk.3 3   E  !  	strrchr.3 3   F   "  strspn.3  3   F  #  strtod.3  3   F(  $  strtok.3  3   F<  %  strtol.3  3   FP  '  	subwin.3v 3   Fd  (  	subwin.3x 3   F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F./share/man/man3/string_to_decimal.3                                                                   755       0      12        13032  4424741352  12501                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)string_to_decimal.3 1.10 89/03/27 SMI;
.TH STRING_TO_DECIMAL 3 "21 January 1988"
.SH NAME
string_to_decimal, file_to_decimal, func_to_decimal \- parse characters into decimal record
.SH SYNOPSIS
.nf
.B #include <floatingpoint.h>
.B #include <stdio.h>
.LP
.B void string_to_decimal(pc,nmax,fortran_conventions,pd,pform,pechar)
.B char **pc;
.B int nmax;
.B int fortran_conventions;
.B decimal_record *pd;
.B enum decimal_string_form *pform;
.B char **pechar;
.LP
.B void   file_to_decimal(pc,nmax,fortran_conventions,pd,pform,pechar,pf,pnread)
.B char **pc;
.B int nmax;
.B int fortran_conventions;
.B decimal_record *pd;
.B enum decimal_string_form *pform;
.B char **pechar;
.B \s-1FILE\s0 *pf;
.B int *pnread;
.LP
.B void   func_to_decimal(pc,nmax,fortran_conventions,pd,pform,pechar,pget,pnread,punget)
.B char **pc;
.B int nmax;
.B int fortran_conventions;
.B decimal_record *pd;
.B enum decimal_string_form *pform;
.B char **pechar;
.B int  (*pget)(\|);
.B int *pnread;
.B int  (*punget)(\|);
.fi
.SH DESCRIPTION
.IX  "string_to_decimal function"  ""  "\fLstring_to_decimal\fP \(em decimal record from character string"
.IX  "file_to_decimal function"  ""  "\fLfile_to_decimal\fP \(em decimal record from character stream"
.IX  "func_to_decimal function"  ""  "\fLfile_to_decimal\fP \(em decimal record from character function"
The
.B char_to_decimal
functions parse a numeric token from at most
.I nmax
characters in a string
.I **pc
or file
.I *pf
or function
.B (*pget)(\|)
into a decimal record
.IR *pd ,
classifying the form of the string in
.I *pform
and
.IR *pechar .
The accepted syntax is intended to be sufficiently
flexible to accomodate many languages:
.IP
.I whitespace value
.LP
or
.IP
.I whitespace sign value
.LP
where
.I whitespace
is any number of characters defined by
.I isspace
in
.BR /usr/include/ctype.h ,
.I sign
is either of [+\-], and
.I value
can be
.IR number ,
.IR nan ,
or
.IR inf .
.I inf
can be
.SM INF
.RI ( inf_form )
or
.SM INFINITY
.RI ( infinity_form )
without regard to case.
.I nan
can be
.SM NAN
.RI ( nan_form )
or
.SM NAN\s0(nstring)
.RI ( nanstring_form )
without regard to case;
nstring
is any string of characters not containing
.RB ' ) '
or
.SM NULL\s0;
nstring
is copied to pd->ds
and, currently, not used subsequently.
.I number
consists of
.IP
.I significand
.LP
or
.IP
.I significand efield
.LP
where
.I significand
must contain one or more digits and may contain
one point; possible forms are
.IP
.nf
.IR digits		(int_form)
.IR digits.		(intdot_form)
.IR .digits		(dotfrac_form)
.IR digits . digits	(intdotfrac_form)
.fi
.LP
.I efield
consists of
.IP
.I echar digits
.LP
or
.IP
.I echar sign digits
.LP
where
.I echar
is one of [Ee], and
.I digits
contains one or more digits.
.LP
When
.I fortran_conventions
is nonzero, additional input forms are accepted
according to various Fortran conventions:
.PD 0
.TP 5
0
no Fortran conventions
.TP
1
Fortran list-directed input conventions
.TP
2
Fortran formatted input conventions, ignore blanks
.BR  (\s-1BN\s0)
.TP
3
Fortran formatted input conventions, blanks are zeros
.BR  (\s-1BZ\s0)
.PD
.LP
When
.I fortran_conventions
is nonzero,
.I echar
may also be one of [Dd], and
.I efield
may also have the form
.IP
.IR "sign digits"
.LP
When
.IR fortran_conventions ">= 2,"
blanks may appear in the
.I digits
strings for the integer, fraction, and exponent
fields and may appear between
.I echar
and the exponent sign and after the infinity
and NaN forms.  If
.IR fortran_conventions "== 2,"
the blanks are ignored.  When
.IR fortran_conventions "== 3,"
the blanks that appear in
.I digits
strings are interpreted as zeros,
and other blanks are ignored.
.LP
The form of the accepted decimal string is placed in
.IR *peform .
If an
.I efield
is recognized,
.I *pechar
is set to point to the
.IR echar .
.LP
On input,
.I *pc
points to the beginning of a character string buffer of length >=
.IR nmax .
On output,
.I *pc
points to a character in that buffer, one past the last accepted character.
.B string_to_decimal(\|)
gets its characters from the buffer;
.B file_to_decimal(\|)
gets its characters from
.I *pf
and records them in the buffer,
and places a null after the last character read.
.B func_to_decimal(\|)
gets its characters from an int function
.IR (*pget)(\|) .
.LP
The scan continues until no more characters
could possibly fit the acceptable syntax or until
.I nmax
characters have been scanned.  If the
.I nmax
limit is not reached then at least one extra
character will usually be scanned that is not
part of the accepted syntax.
.B file_to_decimal(\|)
and
.B func_to_decimal(\|)
set
.I *pnread
to the number of characters read from the file;
if greater than
.IR nmax ,
some characters were lost.
If no characters were lost,
.B file_to_decimal(\|)
and
.B func_to_decimal(\|)
attempt to push back, with
.BR ungetc (3S)
or
.BR (*punget)(\|) ,
as many as possible of the excess characters
read, adjusting
.I *pnread
accordingly.
If all unget calls are successful, then
.I **pc
will be
.SM NULL\s0.
No push back will be attempted if
.B (*punget)(\|)
is
.SM NULL\s0.
.LP
Typical declarations for
.B *pget(\|)
and
.B *punget(\|)
are:
.RS
.nf
.ft B
	int xget(\|)
	{ .\|.\|.  }
	int (*pget)(\|) = xget ;
	int xunget(c)
	char c ;
	{ .\|.\|. }
	int (*punget)(\|) = xunget ;
.ft R
.fi
.RE
.LP
If no valid number was detected,
.I pd->fpclass
is set to
.BR fp_signaling ,
.I *pc
is unchanged,
and
.I *pform
is set to
.BR invalid_form .
.LP
.B atof
and
.BR strtod (3)
use
.BR string_to_decimal .
.BR scanf (3S)
uses
.BR file_to_decimal .
.SH FILES
.PD 0
.TP 20
.B /usr/include/ctype.h
.PD
.SH "SEE ALSO"
.BR scanf (3S),
.BR strtod (3),
.BR ungetc (3S)
rreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_double.3n R  R    xdr_enum.3n   S  ./share/man/man3/strings.3                                                                             755       0      12        21307  4424741352  10510                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)strings.3 1.21 89/03/27 SMI; from UCB 4.2 and S5
.TH STRINGS 3  "25 March 1989"
.SH NAME
strings, strcat, strncat, strdup, strcmp, strncmp, strcasecmp, strncasecmp, strcpy, strncpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok, index, rindex \- string operations
.SH SYNOPSIS
.nf
.B #include <strings.h>
.LP
.B char \(**strcat(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B char \(**strncat(s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B char \(**strdup(s1)
.B char \(**s1;
.LP
.B int strcmp(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B int strncmp(s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B int strcasecmp(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B int strncasecmp(s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B char \(**strcpy(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B char \(**strncpy(s1, s2, n)
.B char \(**s1, \(**s2;
.B int n;
.LP
.B int strlen(s)
.B char \(**s;
.LP
.B char \(**strchr(s, c)
.B char \(**s;
.B int c;
.LP
.B char \(**strrchr(s, c)
.B char \(**s;
.B int c;
.LP
.B char \(**strpbrk(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B int strspn(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B int strcspn(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B char \(**strtok(s1, s2)
.B char \(**s1, \(**s2;
.LP
.B #include <strings.h>
.LP
.B char \(**index(s, c)
.B char \(**s, c;
.LP
.B char \(**rindex(s, c)
.B char \(**s, c;
.fi
.IX  "strcat function"  ""  "\fLstrcat\fP \(em concatenate strings"
.IX  "strncat function"  ""  "\fLstrncat\fP \(em concatenate strings"
.IX  "strdup function"  ""  "\fLstrcat\fP \(em duplicate string"
.IX  "strcmp function"  ""  "\fLstrcmp\fP \(em compare strings"
.IX  "strncmp function"  ""  "\fLstrncmp\fP \(em compare strings"
.IX  "strcasecmp function"  ""  "\fLstrcasecmp\fP \(em compare strings ignoring case"
.IX  "strncasecmp function"  ""  "\fLstrncasecmp\fP \(em compare strings ignoring case"
.IX  "strcpy function"  ""  "\fLstrcpy\fP \(em copy strings"
.IX  "strncpy function"  ""  "\fLstrncpy\fP \(em copy strings"
.IX  "strlen function"  ""  "\fLstrlen\fP \(em get length of string"
.IX  "strchr function"  ""  "\fLindex\fP \(em find character in string"
.IX  "strrchr function"  ""  "\fLrindex\fP \(em find character in string"
.IX  "index function"  ""  "\fLindex\fP \(em find character in string"
.IX  "rindex function"  ""  "\fLrindex\fP \(em find character in string"
.  \"
.IX  "string operations"  "concatenate strcat"  ""  "concatenate \(em \fLstrcat\fP"
.IX  "string operations"  "concatenate strncat"  ""  "concatenate \(em \fLstrncat\fP"
.IX  "string operations"  copy  ""  "copy \(em \fLstrcpy\fP"
.IX  "string operations"  copyn  ""  "copy \(em \fLstrncpy\fP"
.IX  "string operations"  compare  ""  "compare \(em \fLstrcmp\fP"
.IX  "string operations"  comparen  ""  "compare \(em \fLstrncmp\fP"
.IX  "string operations"  index  ""   "index \(em \fLnndex\fP"
.IX  "string operations"  rindex  ""  "reverse index \(em \fLrindex\fP"
.IX  "string operations"  "reverse index"  ""  "reverse index \(em \fLrindex\fP"
.  \"
.IX  "concatenate strings" strcat "" "\fLstrcat\fP"
.IX  "concatenate strings" strncat "" "\fLstrncat\fP"
.IX  "copy" "strings \(em \fLstrcpy\fP"
.IX  "copy" "strings \(em \fLstrncpy\fP"
.IX  "compare" "strings \(em \fLstrcmp\fP"
.IX  "compare" "strings \(em \fLstrncmp\fP"
.IX  "index strings index"  ""  "index strings \(em \fLindex\fP"
.IX  "index strings rindex"  ""  "index strings \(em \fLrindex\fP"
.IX  "reverse index strings"  ""  "reverse index strings \(em \fLrindex\fP"
.  \"
.IX  "null-terminated strings"  "concatenate \(em \fLstrcat\fP"
.IX  "null-terminated strings"  "concatenate \(em \fLstrncat\fP"
.IX  "null-terminated strings"  "copy \(em \fLstrcpy\fP"
.IX  "null-terminated strings"  "copy \(em \fLstrncpy\fP"
.IX  "null-terminated strings"  "compare \(em \fLstrcmp\fP"
.IX  "null-terminated strings"  "compare \(em \fLstrncmp\fP"
.IX  "null-terminated strings"  "index \(em \fLindex\fP"
.IX  "null-terminated strings"  "index \(em \fLrindex\fP"
.IX  "null-terminated strings"  "reverse index"  ""  "reverse index \(em \fLrindex\fP"
.SH DESCRIPTION
These functions operate on
null-terminated
strings.  They do not check for overflow of
any receiving string.
.LP
.B strcat(\|)
appends a copy of string
.I s2
to the end of string
.IR s1 .
.B strncat(\|)
appends at most
.I n
characters.  Each returns a pointer to the
null-terminated
result.
.LP
.B strcmp(\|)
compares its arguments and returns an integer
greater than, equal to, or less than 0, according as
.I s1
is lexicographically greater than, equal to, or less than
.IR s2 .
.B strncmp(\|)
makes the same comparison but compares at most
.I n
characters.
Two additional routines
.B strcasecmp(\|)
and 
.B strncasecmp(\|)
compare the strings and ignore differences in case. 
These routines assume the ASCII character set when equating lower
and upper case characters.
.LP
.B strdup(\|)
returns a pointer to a new string which is a
duplicate of the string pointed to by
.IR s1 .
The space for the new string is obtained using
.BR malloc (3).
If the new string cannot be created, a
.SM NULL
pointer is returned.
.LP
.B strcpy(\|)
copies string
.I s2
to
.IR s1 ,
stopping after the
null character has been copied.
.B strncpy(\|)
copies exactly
.I n
characters, truncating or
null-padding
.IR s2 .
The result will not be
null-terminated
if the length of
.I s2
is
.I n
or more.  Each function returns
.IR s1 .
.LP
.B strlen(\|)
returns the number of characters in
.IR s ,
not including the
null-terminating
character.
.LP
.B strchr(\|)
.RB ( 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.
.LP
.B index(\|)
.RB ( rindex )
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.
These functions are identical to
.B strchr(\|)
.RB ( strchr )
and merely have different names.
.LP
.B 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 .
.LP
.B strspn(\|)
.RB ( strcspn )
returns the length of the initial segment of string
.I s1
which consists entirely of characters from (not from) string
.IR s2 .
.LP
.B strtok(\|)
considers the string
.I s1
to consist of a sequence of zero or more text 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 will have written 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 subsequent calls
(which must be made with the first argument a
.SM NULL
pointer) will work through the string
.I s1
immediately following that token.
In this way subsequent calls
will work through the string
.I s1
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, except for
.B index(\|)
and
.BR rindex ,
are declared in the optional
.B <strings.h>
header file.  All these functions, including
.B index(\|)
and
.B rindex(\|)
but excluding
.BR strchr ,
.BR strrchr ,
.BR strpbrk ,
.BR strspn ,
.BR strcspn ,
and
.BR strtok ,
are declared in the optional
.B <strings.h>
include file; these headers are set this way for backward compatibility.
.SH SEE ALSO
.BR malloc (3),
.BR bstring (3)
.SH WARNINGS
.B strcmp(\|)
and
.B strncmp(\|)
use native character comparison, which is signed on the Sun, but may be
unsigned on other machines.  Thus the sign of the value returned when
one of the characters has its high-order bit set
is implementation-dependent.
.LP
.B strcasecmp(\|)
and
.B strncasecmp(\|)
use native character comparison as above and assume the 
.I ASCII
character set. 
.LP
On the Sun processor, as well as on many other machines, you can
.I not
use a
.SM NULL
pointer to indicate a
null string.  A
.SM NULL
pointer is an error and results in an abort
of the program.  If you wish to indicate a
null string, you must have a pointer that
points to an explicit
null string.  On some implementations of the C
language on some machines, a
.SM NULL
pointer, if dereferenced, would yield a
null string; this highly
non-portable trick was used in some programs.
Programmers using a
.SM NULL
pointer to represent an empty string should be
aware of this portability issue; even on
machines where dereferencing a
.SM NULL
pointer does not cause an abort of the
program, it does not necessarily yield a
null string.
.LP
Character movement is performed differently
in different implementations.
Thus overlapping moves may yield surprises.
ings index"  ""  "index strings \(em \fLindex\fP"
.IX  "index strings rindex"  ""  "index strings \(em \fLrindex\fP"
.IX  "reverse index strings"  ""  "reverse index strings \(em \fLrindex\fP"
.  \"
.IX  "null-terminated strings"  "concatenate \(em \fLstrcat\fP"
.IX  "null-terminated strings"  "concatenate \(em ./share/man/man3/strlen.3                                                                              755       0      12           67  4424741353  10247                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strlen.3 1.6 89/03/27 SMI; 
  	strncmp.3 rl  E    	strncpy.3 rn  E     	strpbrk.3 rn  E  !  	strrchr.3 rn  F   "  strspn.3  rp  F  #  strtod.3 trr  F(  $  strtok.3 trs  F<  %  strtol.3 trt  FP  '  	subwin.3v rt  Fd  (  	subwin.3x rt  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n 3  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<./share/man/man3/strncat.3                                                                             755       0      12           70  4424741353  10410                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strncat.3 1.6 89/03/27 SMI; 
  	strncpy.3 rl  E     	strpbrk.3 rn  E  !  	strrchr.3 rn  F   "  strspn.3  rn  F  #  strtod.3  rp  F(  $  strtok.3 trr  F<  %  strtol.3 trs  FP  '  	subwin.3v rt  Fd  (  	subwin.3x rt  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n./share/man/man3/strncmp.3                                                                             755       0      12           70  4424741353  10420                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strncmp.3 1.6 89/03/27 SMI; 
  	strpbrk.3 rl  E  !  	strrchr.3 rn  F   "  strspn.3  rn  F  #  strtod.3  rn  F(  $  strtok.3  rp  F<  %  strtol.3 trr  FP  '  	subwin.3v rs  Fd  (  	subwin.3x rt  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unre./share/man/man3/strncpy.3                                                                             755       0      12           70  4424741353  10434                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strncpy.3 1.6 89/03/27 SMI; 
  	strrchr.3 rl  F   "  strspn.3  rn  F  #  strtod.3  rn  F(  $  strtok.3  rn  F<  %  strtol.3  rp  FP  '  	subwin.3v rr  Fd  (  	subwin.3x rs  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  ./share/man/man3/strpbrk.3                                                                             755       0      12           67  4424741353  10427                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strpbrk.3 1.5 89/03/27 SMI;
"  strspn.3  rl  F  #  strtod.3  rn  F(  $  strtok.3  rn  F<  %  strtol.3  rn  FP  '  	subwin.3v rp  Fd  (  	subwin.3x rr  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4./share/man/man3/strrchr.3                                                                             755       0      12           67  4424741354  10430                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strrchr.3 1.5 89/03/27 SMI;
#  strtod.3  rl  F(  $  strtok.3  rn  F<  %  strtol.3  rn  FP  '  	subwin.3v rn  Fd  (  	subwin.3x rp  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4./share/man/man3/strspn.3                                                                              755       0      12           66  4424741354  10271                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strspn.3 1.5 89/03/27 SMI;
$  strtok.3  rl  F<  %  strtol.3  rn  FP  '  	subwin.3v rn  Fd  (  	subwin.3x rn  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_nopro./share/man/man3/strtod.3                                                                              755       0      12         3216  4424741354  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)strtod.3 1.12 89/03/27 SMI
.TH STRTOD 3 "22 November 1987"
.SH NAME
strtod, atof \- convert string to double-precision number
.SH SYNOPSIS
.nf
.B double strtod(str, ptr)
.B char \(**str, \(**\(**ptr;
.LP
.B double atof(str)
.B char \(**str;
.fi
.SH DESCRIPTION
.IX  "strtod function"  ""  "\fLstrtod\fP \(em ASCII string to double"
.IX  "ASCII string to double \(em \fLstrtod\fP"
.IX  "convert strings to numbers"  strtod  ""  \fLstrtod\fP
.IX  "atof function"  ""  "\fLatof\fP \(em ASCII to float"
.IX  "ASCII to float \(em \fLatof\fP"
.IX  "convert strings to numbers"  atof  ""  \fLatof\fP
.B strtod(\|)
returns as a double-precision floating-point number
the value represented by the character string pointed to by
.IR str .
The string is scanned up to the first unrecognized character, using
.BR string_to_decimal (3),
with
.I fortran_conventions
set to 0.
.LP
If the value of
.I ptr
is not (char \(**\(**)\s-1NULL\s+1,
a pointer to the character terminating the scan is returned in
the location pointed to by
.IR ptr .
If no number can be formed,
.I \(**ptr
is set to
.IR str ,
and for historical compatibility, 0.0 is returned,
although a NaN would better match the
.SM IEEE
Floating-Point Standard's intent.
.LP
.B atof(str)
is equivalent to
.BR "strtod(str, (char \(**\(**)\s-1NULL\s+1)" .
Thus, when
.B atof(str)
returns 0.0 there is no way to determine whether
.I str
contained a valid numerical string representing 0.0 or an invalid numerical string.
.SH SEE ALSO
.BR scanf (3S),
.BR string_to_decimal (3)
.SH DIAGNOSTICS
Exponent overflow and underflow produce the
results specified by the
.SM IEEE
Standard.  In addition,
.B errno
is set to
.SM ERANGE\s0.
K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	unge./share/man/man3/strtok.3                                                                              755       0      12           66  4424741354  10266                                                                                                                                                                                                                                                                                                                                                                      .so man3/strings.3
.\" @(#)strtok.3 1.5 89/03/27 SMI;
'  	subwin.3v rl  Fd  (  	subwin.3x rn  F|  )  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7./share/man/man3/strtol.3                                                                              755       0      12         4231  4424741354  10325                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)strtol.3 1.8 89/03/27 SMI; from S5
.TH STRTOL 3 "6 October 1987"
.SH NAME
strtol, atol, atoi \- convert string to integer
.SH SYNOPSIS
.nf
.B long strtol(str, ptr, base)
.B char \(**str, \(**\(**ptr;
.B int base;
.LP
.B long atol(str)
.B char \(**str;
.LP
.B int atoi(str)
.B char \(**str;
.fi
.SH DESCRIPTION
.IX  "strtol function"  ""  "\fLstrtol\fP \(em ASCII string to long integer"
.IX  "convert strings to numbers"  strtol  ""  \fLstrtol\fP
.IX  "ASCII" "string to long integer \(em \fLstrtol\fP"
.IX  "atoi function"  ""  "\fLatoi\fP \(em ASCII to integer"
.IX  "convert strings to numbers"  atoi  ""  \fLatoi\fP
.IX  "ASCII" "to integer \(em \fLatoi\fP"
.IX  "atol function"  ""  "\fLatol\fP \(em ASCII to long"
.IX  "convert strings to numbers"  atol  ""  \fLatol\fP
.IX  "ASCII" "to long \(em \fLatol\fP"
.B strtol(\|)
returns as a long integer the value represented by the character string
pointed to by
.IR str .
The string is scanned up to the first
character inconsistent with the base.
Leading ``white-space'' characters
(as defined by
.B isspace(\|)
in
.BR ctype (3))
are ignored.
.LP
If the value of
.I ptr
is not (char \(**\(**)\s-1NULL\s+1,
a pointer to the character terminating the scan
is returned in the location pointed to by
.IR ptr .
If no integer can be formed,
that location is set to
.IR str ,
and zero is returned.
.LP
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,
and ``0x'' or ``0X'' is ignored if
.I base
is 16.
.LP
If
.I base
is zero, the string itself determines the base
thusly: after an optional leading sign a
leading zero indicates octal conversion,
and a leading ``0x'' or ``0X'' hexadecimal conversion.
Otherwise, decimal conversion is used.
.LP
Truncation from long to int can, of course, take
place upon assignment or by an explicit cast.
.LP
.BI atol( str )
is equivalent to
.BI strtol( str ", (" char " \(**\(**)\s-1NULL\s+1, 10)"\fR.
.LP
.BI atoi( str )
is equivalent to
.BR ( int ") strtol(" str ", (" char
.BR "\(**\(**)\s-1NULL\s+1, 10)" .
.SH SEE ALSO
.BR ctype (3),
.BR scanf (3S),
.BR strtod (3)
.SH BUGS
Overflow conditions are ignored.
3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3./share/man/man3/subwin.3v                                                                             755       0      12           67  4424741355  10437                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)subwin.3v 1.4 89/03/27 SMI;
)  svc_destroy.3n |  F  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_syste./share/man/man3/subwin.3x                                                                             755       0      12           70  4424741355  10433                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)subwin.3x 1.5 89/03/27 SMI; 
  *  
svc_fds.3n |  F  +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_systemerr.3n   H  9   svce./share/man/man3/svc_destroy.3n                                                                        755       0      12           71  4424741355  11457                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_destroy.3n 1.4 89/03/27 SMI;
 +  svc_freeargs.3n   F  ,  svc_getargs.3n   F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n 9  H4  :./share/man/man3/svc_fds.3n                                                                            755       0      12           65  4424741355  10545                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_fds.3n 1.4 89/03/27 SMI;
 F  ,  svc_getargs.3n    F  -   svc_getcaller.3n  F  F  .  
svc_getreq.3n -  G  /  svc_register.3n   G   0  
svc_run.3n r  G<  1   svc_sendreply.3n  G<  GX  2   svc_unregister.3n GX  Gp  3  svcerr_auth.3n 2  G  4   svcerr_decode.3n  G  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;./share/man/man3/svc_freeargs.3n                                                                       755       0      12           72  4424741355  11565                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_freeargs.3n 1.4 89/03/27 SMI;
F  -   svc_getcaller.3n  -  F  .  
svc_getreq.3n F  G  /  svc_register.3n   G   0  
svc_run.3n    G<  1   svc_sendreply.3n  1  GX  2   svc_unregister.3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n 9  H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  ;./share/man/man3/svc_getargs.3n                                                                        755       0      12           71  4424741356  11423                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_getargs.3n 1.4 89/03/27 SMI;
 F  F  .  
svc_getreq.3n -  G  /  svc_register.3n   G   0  
svc_run.3n r  G<  1   svc_sendreply.3n  G<  GX  2   svc_unregister.3n GX  Gp  3  svcerr_auth.3n 2  G  4   svcerr_decode.3n  G  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  HP  Hl  <   svctcp_create.3n./share/man/man3/svc_getcaller.3n                                                                      755       0      12           73  4424741356  11733                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_getcaller.3n 1.4 89/03/27 SMI;
  G  /  svc_register.3n   G   0  
svc_run.3n r  G<  1   svc_sendreply.3n  G<  GX  2   svc_unregister.3n GX  Gp  3  svcerr_auth.3n X  G  4   svcerr_decode.3n  G  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  HP  Hl  <   svctcp_create.3n  Hl  H  =   svcudp_creat./share/man/man3/svc_getreq.3n                                                                         755       0      12           70  4424741356  11255                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_getreq.3n 1.4 89/03/27 SMI;
  G   0  
svc_run.3n i  G<  1   svc_sendreply.3n n r  GX  2   svc_unregister.3n G<  Gp  3  svcerr_auth.3n 3  G  4   svcerr_decode.3n n X  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n  HP  H  =   svcudp_create.3n  Hl  H  >  swab.3 c  H./share/man/man3/svc_register.3n                                                                       755       0      12           72  4424741357  11615                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_register.3n 1.4 89/03/27 SMI;
1   svc_sendreply.3n  G<  GX  2   svc_unregister.3n GX  Gp  3  svcerr_auth.3n <  G  4   svcerr_decode.3n  G  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  HP  Hl  <   svctcp_create.3n  Hl  H  =   svcudp_create.3n  H  H  >  swab.3 t  H  ?  
sys_errlist.3  c  H./share/man/man3/svc_run.3n                                                                            755       0      12           65  4424741357  10577                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_run.3n 1.4 89/03/27 SMI;
 G<  GX  2   svc_unregister.3n GX  Gp  3  svcerr_auth.3n X  G  4   svcerr_decode.3n  G  G  5   svcerr_noproc.3n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  HP  Hl  <   svctcp_create.3n  Hl  H  =   svcudp_create.3n  H  H  >  swab.3 t  H  ?  
sys_errlist.3  t  H  @  
sys_nerr.3 .  H  A./share/man/man3/svc_sendreply.3n                                                                      755       0      12           73  4424741357  11777                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_sendreply.3n 1.4 89/03/27 SMI;
3n 2  Gp  3  svcerr_auth.3n p  G  4   svcerr_decode.3n  4  G  5   svcerr_noproc.3n  5  G  6   svcerr_noprog.3n  6  G  7   svcerr_progvers.3n 7  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n 9  H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  ;  Hl  <   svctcp_create.3n  <  H  =   svcudp_create.3n  =  H  >  swab.3 n  H  ?  
sys_errlist.3 H  H  @  
sys_nerr.3 t  H  A  
sys_siglist.3 H  H./share/man/man3/svc_unregister.3n                                                                     755       0      12           74  4424741357  12162                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svc_unregister.3n 1.4 89/03/27 SMI;
  G  4   svcerr_decode.3n n p  G  5   svcerr_noproc.3n  4  G  6   svcerr_noprog.3n  5  G  7   svcerr_progvers.3n 6  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n  ;  H  =   svcudp_create.3n  <  H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  ./share/man/man3/svcerr_auth.3n                                                                        755       0      12           71  4424741360  11434                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_auth.3n 1.4 89/03/27 SMI;
n 3  G  5   svcerr_noproc.3n n p  G  6   svcerr_noprog.3n  4  G  7   svcerr_progvers.3n 5  H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n  ;  H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m ./share/man/man3/svcerr_decode.3n                                                                      755       0      12           73  4424741361  11721                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_decode.3n 1.4 89/03/27 SMI;
n  G  G  6   svcerr_noprog.3n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n   H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n  HP  Hl  <   svctcp_create.3n  Hl  H  =   svcudp_create.3n  H  H  >  swab.3 t  H  ?  
sys_errlist.3  c  H  @  
sys_nerr.3 .  H  A  
sys_siglist.3  l  H  B  syslog.3 st.  I  C  system.3 g.3  I  D  tan.3m t  I$  E  tanh.3m   I8  F./share/man/man3/svcerr_noproc.3n                                                                      755       0      12           73  4424741361  11776                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_noproc.3n 1.4 89/03/27 SMI;
n  G  G  7   svcerr_progvers.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n  HP  H  =   svcudp_create.3n  Hl  H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	tell./share/man/man3/svcerr_noprog.3n                                                                      755       0      12           73  4424741362  12003                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_noprog.3n 1.4 89/03/27 SMI;
.3n   H   8   svcerr_systemerr.3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n  HP  H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l./share/man/man3/svcerr_progvers.3n                                                                    755       0      12           75  4424741363  12351                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_progvers.3n 1.4 89/03/27 SMI;
3n   H  9   svcerr_weakauth.3n    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n 3n   H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J./share/man/man3/svcerr_systemerr.3n                                                                   755       0      12           76  4424741364  12541                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_systemerr.3n 1.4 89/03/27 SMI;
    H4  :  svcfd_create.3n   HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n 3n   H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J  tfind.3   I  K  
tgetent../share/man/man3/svcerr_weakauth.3n                                                                    755       0      12           75  4424741365  12315                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcerr_weakauth.3n 1.4 89/03/27 SMI;
 HP  ;   svcraw_create.3n 3n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n 3n   H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I./share/man/man3/svcfd_create.3n                                                                       755       0      12           72  4424741366  11546                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcfd_create.3n 1.4 89/03/27 SMI;
n   Hl  <   svctcp_create.3n 3n   H  =   svcudp_create.3n 3n   H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x t  I  N  
./share/man/man3/svcraw_create.3n                                                                      755       0      12           73  4424741367  11750                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcraw_create.3n 1.4 89/03/27 SMI;
n  Hl  H  =   svcudp_create.3n  H  H  >  swab.3 t  H  ?  
sys_errlist.3  c  H  @  
sys_nerr.3 .  H  A  
sys_siglist.3  l  H  B  syslog.3 st.  I  C  system.3 g.3  I  D  tan.3m t  I$  E  tanh.3m   I8  F  	tdelete.3 nh  IL  G  	telldir.3 e.  I`  H  
tempnam.3s .  It  I  
termcap.3x .  I  J  tfind.3   I  K  
tgetent.3x n  I  L  tgetflag.3x   I  M  
tgetnum.3x g  I  N  
tgetstr.3x .  I  O  tgot./share/man/man3/svctcp_create.3n                                                                      755       0      12           73  4424741367  11745                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svctcp_create.3n 1.4 89/03/27 SMI;
n  Hl  H  >  swab.3 c  H  ?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x t  I  N  
tgetstr.3x t  I  O  tgoto.3x get  J   P  time.3c   J./share/man/man3/svcudp_create.3n                                                                      755       0      12           73  4424741370  11741                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)svcudp_create.3n 1.4 89/03/27 SMI;
?  
sys_errlist.3 ab  H  @  
sys_nerr.3 l  H  A  
sys_siglist.3 rr  H  B  syslog.3 igl  I  C  system.3 ysl  I  D  tan.3m   I$  E  tanh.3m   I8  F  	tdelete.3    IL  G  	telldir.3 el  I`  H  
tempnam.3s l  It  I  
termcap.3x p  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x t  I  N  
tgetstr.3x t  I  O  tgoto.3x get  J   P  time.3c   J  Q  timegm.3    J(  R  	./share/man/man3/swab.3                                                                                755       0      12         1257  4424741371   7736                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)swab.3 1.11 89/03/27 SMI; from UCB 4.2
.TH SWAB 3 "6 October 1987"
.SH NAME
swab \- swap bytes
.SH SYNOPSIS
.nf
.B swab(from, to, nbytes)
.B char *from, *to;
.fi
.IX  "swab function"  ""  "\fLswab\fP \(em swap bytes"
.IX  "swap bytes"  ""  "swap bytes \(em \fLswab\fP"
.SH DESCRIPTION
.B swab(\|)
copies
.I nbytes
bytes pointed to by
.B from
to the position pointed to by
.IR to ,
exchanging adjacent even and odd bytes.
It is useful for carrying binary data between
high-ender machines (\s-1IBM\s0
360's,
.SM MC\s068000's,
etc) and low-endian machines (such as Sun386i).
.LP
.I nbytes
should be even.
.LP
The
.I from
and
.I to
addresses should not overlap in portable programs.
n  J  [  
toascii.3v s  J  \  	tolower.3 as  K  ]  
tolower.3v o  K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 uc  KX  a  
toupper.3v p  Kl  b  tputs.3x oup  K  c  traceoff.3v   K  d  
traceon.3v c  K  e  trig.3m   K  f  	tsearch.3    K  g  	ttyname.3 ea  K  h  	ttyslot.3 yn  L ./share/man/man3/sys_errlist.3                                                                         755       0      12           72  4424741372  11317                                                                                                                                                                                                                                                                                                                                                                      .so man3/perror.3
.\" @(#)sys_errlist.3 1.4 89/03/27 SMI;
A  
sys_siglist.3 A  H  B  syslog.3  H  I  C  system.3  I  I  D  tan.3m l  I$  E  tanh.3m   I8  F  	tdelete.3 I8  IL  G  	telldir.3 IL  I`  H  
tempnam.3s `  It  I  
termcap.3x t  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x   I  N  
tgetstr.3x   I  O  tgoto.3x  I  J   P  time.3c   J  Q  timegm.3  J  J(  R  	timegm.3v J(  J<  S  timelocal.3   JT  T  time./share/man/man3/sys_nerr.3                                                                            755       0      12           67  4424741372  10605                                                                                                                                                                                                                                                                                                                                                                      .so man3/perror.3
.\" @(#)sys_nerr.3 1.4 89/03/27 SMI;
  B  syslog.3 st.  I  C  system.3 g.3  I  D  tan.3m t  I$  E  tanh.3m   I8  F  	tdelete.3 nh  IL  G  	telldir.3 e.  I`  H  
tempnam.3s .  It  I  
termcap.3x .  I  J  tfind.3   I  K  
tgetent.3x n  I  L  tgetflag.3x   I  M  
tgetnum.3x g  I  N  
tgetstr.3x .  I  O  tgoto.3x tr.  J   P  time.3c   J  Q  timegm.3 ime  J(  R  	timegm.3v .3  J<  S  timelocal.3   JT  T  timelocal.3v .3   Jh  U  time./share/man/man3/sys_siglist.3                                                                         755       0      12           74  4424741372  11313                                                                                                                                                                                                                                                                                                                                                                      .so man3/psignal.3
.\" @(#)sys_siglist.3 1.5 89/03/27 SMI; 
  system.3 st.  I  D  tan.3m 3  I$  E  tanh.3m   I8  F  	tdelete.3 m   IL  G  	telldir.3 nh  I`  H  
tempnam.3s .  It  I  
termcap.3x .  I  J  tfind.3   I  K  
tgetent.3x    I  L  tgetflag.3x   I  M  
tgetnum.3x    I  N  
tgetstr.3x g  I  O  tgoto.3x x .  J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v me  J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c .3   J|  V  time./share/man/man3/syslog.3                                                                              755       0      12        14643  4424741372  10346                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)syslog.3 1.19 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SYSLOG 3 "22 November 1987"
.SH NAME
syslog, openlog, closelog, setlogmask \- control system log
.SH SYNOPSIS
.nf
.B #include <syslog.h>
.LP
.B openlog(ident, logopt, facility)
.B char \(**ident;
.LP
.B syslog(priority, message, parameters \&.\|.\|. )
.B char \(**message;
.LP
.B closelog(\|)
.LP
.B setlogmask(maskpri)
.fi
.IX  "syslog function"  ""  "\fLsyslog\fP \(em write message to system log"
.IX  "openlog function"  ""  "\fLopenlog\fP \(em initialize system log file"
.IX  "closelog function"  ""  "\fLcloselog\fP \(em close system log file"
.IX  "setlogmask function"  ""  "\fLcloselog\fP \(em set log priority mask"
.IX  "control system log"  "write to system log \(em \fLsyslog\fP"
.IX  "control system log"  "start system log \(em \fLopenlog\fP"
.IX  "control system log"  "close system log \(em \fLcloselog\fP"
.IX  "control system log"  "set log priority mask \(em \fLsetlogmask\fP"
.IX  "system log, control \(em \fLsyslog\fR"
.SH DESCRIPTION
.LP
.B syslog(\|)
passes
.I message
to
.BR syslogd (8),
which logs it in an appropriate system log,
writes it to the system console, forwards it to a
list of users, or forwards it to the
.B syslogd
on another host over the network.
The message is tagged with a priority of
.IR priority .
The message looks like a
.BR printf (3S)
string except that
.B %m
is replaced by the current error message (collected from
.BR errno ).
A trailing
.SM NEWLINE
is added if needed.
.LP
Priorities are encoded as a
.I facility
and a
.IR level .
The facility describes the part of the system
generating the message.
The level is selected from an ordered list:
.RS
.TP 20
.SB LOG_EMERG
A panic condition.  This is normally broadcast to all users.
.TP
.SB LOG_ALERT
A condition that should be corrected immediately,
such as a corrupted system database.
.TP
.SB LOG_CRIT
Critical conditions, such as hard device errors.
.TP
.SB LOG_ERR
Errors.
.TP
.SB LOG_WARNING
Warning messages.
.TP
.SB LOG_NOTICE
Conditions that are not error conditions,
but that may require special handling.
.TP
.SB LOG_INFO
Informational messages.
.TP
.SB LOG_DEBUG
Messages that contain information
normally of use only when debugging a program.
.RE
.LP
If special processing is needed,
.B openlog(\|)
can be called to initialize the log file.
The parameter
.I ident
is a string that is prepended to every message.
.I logopt
is a bit field indicating logging options.
Current values for
.I logopt
are:
.RS
.TP 20
.SB LOG_PID
Log the process
.SM ID
with each message.  This is useful for identifying
specific daemon processes (for daemons that fork).
.TP
.SB LOG_CONS
Write messages to the system console if they
cannot be sent to
.BR syslogd .
This option is safe to use in daemon processes
that have no controlling terminal, since
.B syslog(\|)
forks before opening the console.
.TP
.SB LOG_NDELAY
Open the connection to
.B syslogd
immediately.  Normally the open is delayed
until the first message is logged.
This is useful for programs that need to manage the
order in which file descriptors are allocated.
.TP
.SB LOG_NOWAIT
Do not wait for child processes that have been forked
to log messages onto the console.  This option
should be used by processes that enable
notification of child termination using
.BR \s-1SIGCHLD\s0 ,
since
.B syslog(\|)
may otherwise block waiting for a child whose
exit status has already been collected.
.RE
.br
.ne 9
.LP
The
.I facility
parameter encodes a default facility to be
assigned to all messages
that do not have an explicit facility already encoded:
.RS
.TP 20
.SB LOG_KERN
Messages generated by the kernel.
These cannot be generated by any user processes.
.TP
.SB LOG_USER
Messages generated by random user processes.
This is the default facility identifier if none is specified.
.TP
.SB LOG_MAIL
The mail system.
.TP
.SB LOG_DAEMON
System daemons, such as
.BR ftpd (8C),
.BR routed (8C),
etc.
.TP
.SB LOG_AUTH
The authorization system:
.BR login (1),
.BR su (1),
.BR getty (8),
etc.
.TP
.SB LOG_LPR
The line printer spooling system:
.BR lpr (1),
.BR lpc (8),
.BR lpd (8),
etc.
.TP
.SB LOG_NEWS
Reserved for the
.SM USENET
network news system.
.TP
.SB LOG_UUCP
Reserved for the
.SM UUCP
system; it does not currently use
.BR syslog .
.TP
.SB LOG_CRON
The
.BR cron / at
facility;
.BR crontab (1),
.BR at (1),
.BR cron (8),
etc.
.TP
.SB LOG_LOCAL0\-7
Reserved for local use.
.RE
.LP
.B closelog(\|)
can be used to close the log file.
.LP
.B setlogmask(\|)
sets the log priority mask to
.I maskpri
and returns the previous mask.
Calls to
.B syslog(\|)
with a priority not set in
.I maskpri
are rejected.
The mask for an individual priority
.I pri
is calculated by the macro
.SB LOG_MASK\c
.BR  (\fIpri\fP);
the mask for all priorities up to and including
.I toppri
is given by the macro
.SB LOG_UPTO\c
.BR  (\fItoppri\fP).
The default allows all priorities to be logged.
.SH EXAMPLES
This call logs a message at priority
.BR \s-1LOG_ALERT\s0 :
.LP
.RS
.B
syslog(\s-1LOG_ALERT\s0, "who: internal error 23");
.RE
.LP
The
.SM FTP
daemon
.B ftpd
would make this call to
.B openlog(\|)
to indicate that all messages it logs
should have an identifying string of
.BR ftpd ,
should be treated by
.B syslogd
as other messages from system daemons are,
should include the process
.SM ID
of the process logging the message:
.LP
.RS
.B
openlog("ftpd", \s-1LOG_PID\s0, \s-1LOG_DAEMON\s0);
.RE
.LP
Then it would make the following call to
.B setlogmask(\|)
to indicate that messages at priorities from
.SB LOG_EMERG
through
.SB LOG_ERR
should be logged, but that no messages at any
other priority should be logged:
.LP
.RS
.B
.BR setlogmask(\s-1LOG_UPTO\s0 (\s-1LOG_ERR\s0));
.RE
.LP
Then, to log a message at priority
.BR \s-1LOG_INFO\s0 ,
it would make the following call to
.BR syslog :
.LP
.RS
.B
syslog(\s-1LOG_INFO\s0, "Connection from host %d", CallingHost);
.RE
.LP
A locally-written utility could use the following call to
.B syslog(\|)
to log a message at priority
.SB LOG_INFO
to be treated by
.B syslogd
as other messages to the facility
.SB LOG_LOCAL2
are:
.LP
.RS
.B
syslog(\s-1LOG_INFO|LOG_LOCAL\s02, "error: %m");
.RE
.SH "SEE ALSO"
.BR at (1),
.BR crontab (1),
.BR logger (1),
.BR login (1),
.BR lpr (1),
.BR su (1),
.BR printf (3S),
.BR syslog.conf (5),
.BR cron (8),
.BR ftpd (8C),
.BR getty (8),
.BR lpc (8),
.BR lpd (8),
.BR routed (8C),
.BR syslogd (8)
ssage is tagged with a priority of
.IR priority .
The message looks like a
.BR printf (3S)
st./share/man/man3/system.3                                                                              755       0      12         2025  4424741372  10321                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)system.3 1.12 89/03/27 SMI; from UCB 4.2
.TH SYSTEM 3 "22 January 1988"
.SH NAME
system \- issue a shell command
.SH SYNOPSIS
.nf
.B system(string)
.B char *string;
.fi
.IX  "system function"  ""  "\fLsystem\fP \(em issue shell command"
.IX  "issue shell command"  ""  "issue shell command \(em \fLsystem\fP"
.IX  "shell command issuing"  ""  "shell command, issuing \(em \fLsystem\fP"
.SH DESCRIPTION
.B system(\|)
gives the
.I string
to
.BR sh (1)
as input, just as if the string had been
typed as a command from a terminal.
The current process performs a
.BR wait (2)
system call, and waits until the shell terminates.
.B system(\|)
then returns the exit status returned by
.BR wait .
Unless the the shell was interrupted by a
signal, its termination status is contained in the 8 bits higher up from
the low-order 8 bits of the value returned by
.BR wait .
.SH "SEE ALSO"
.BR sh (1),
.BR execve (2),
.BR wait (2),
.BR popen (3S)
.SH DIAGNOSTICS
Exit status 127 (may be displayed as "32512") indicates the shell
could not be executed.
 tzsetwall.3v  Lx  L  p  ualarm.3 .3   L  q  	ulimit.3c 3v  L  r  	unctrl.3v .3  L  s  	unctrl.3x .3  L  t  	ungetc.3s .3  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c ame  M0  x  valloc.3 p.3  MD  y  values.3 .3c  MX  z  	varargs.3 .3  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s f  M    
vprintf.3v 3  M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	./share/man/man3/tan.3m                                                                                755       0      12           63  4424741373   7675                                                                                                                                                                                                                                                                                                                                                                      .so man3/trig.3m
.\" @(#)tan.3m 1.7 89/03/27 SMI; 
	tdelete.3 m   IL  G  	telldir.3 m   I`  H  
tempnam.3s h  It  I  
termcap.3x .  I  J  tfind.3   I  K  
tgetent.3x    I  L  tgetflag.3x   I  M  
tgetnum.3x    I  N  
tgetstr.3x    I  O  tgoto.3x x g  J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v .3   J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3./share/man/man3/tanh.3m                                                                               755       0      12           72  4424741373  10045                                                                                                                                                                                                                                                                                                                                                                      .so man3/hyperbolic.3m
.\" @(#)tanh.3m 1.7 89/03/27 SMI; 
lldir.3 IL  I`  H  
tempnam.3s `  It  I  
termcap.3x t  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x   I  N  
tgetstr.3x   I  O  tgoto.3x  I  J   P  time.3c   J  Q  timegm.3  J  J(  R  	timegm.3v J(  J<  S  timelocal.3   JT  T  timelocal.3v  T  Jh  U  times.3c  Jh  J|  V  times.3v  J|  J  W  timezone.3c   J  X  
tmpfile.3s   J  Y  	tmpnam.3s J  J  Z  	toas./share/man/man3/tdelete.3                                                                             755       0      12           67  4424741373  10370                                                                                                                                                                                                                                                                                                                                                                      .so man3/tsearch.3
.\" @(#)tdelete.3 1.4 89/03/27 SMI;
H  
tempnam.3s `  It  I  
termcap.3x t  I  J  tfind.3   I  K  
tgetent.3x   I  L  tgetflag.3x   I  M  
tgetnum.3x   I  N  
tgetstr.3x   I  O  tgoto.3x  I  J   P  time.3c   J  Q  timegm.3  J  J(  R  	timegm.3v J(  J<  S  timelocal.3   JT  T  timelocal.3v  T  Jh  U  times.3c  Jh  J|  V  times.3v  J|  J  W  timezone.3c   J  X  
tmpfile.3s   J  Y  	tmpnam.3s J  J  Z  	toascii.3 J  J  [  
./share/man/man3/telldir.3                                                                             755       0      12           72  4424741373  10375                                                                                                                                                                                                                                                                                                                                                                      .so man3/directory.3
.\" @(#)telldir.3 1.5 89/03/27 SMI; 
 
termcap.3x `  I  J  tfind.3   I  K  
tgetent.3x    I  L  tgetflag.3x   I  M  
tgetnum.3x    I  N  
tgetstr.3x   I  O  tgoto.3x x   J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v J  J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  T  J|  V  times.3v  Jh  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s    J  Z  	toascii.3 J  J  [  
toascii.3v   J  \  	./share/man/man3/tempnam.3s                                                                            755       0      12           70  4424741373  10560                                                                                                                                                                                                                                                                                                                                                                      .so man3/tmpnam.3s
.\" @(#)tempnam.3s 1.4 89/03/27 SMI;
  tfind.3   I  K  
tgetent.3x    I  L  tgetflag.3x   I  M  
tgetnum.3x    I  N  
tgetstr.3x    I  O  tgoto.3x x   J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v  T  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3    J  [  
toascii.3v   J  \  	tolower.3    K  ]  
./share/man/man3/termcap.3x                                                                            755       0      12        11335  4424741374  10646                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)termcap.3x 1.15 89/03/27 SMI; from UCB 4.2
.TH TERMCAP 3X "6 October 1987"
.SH NAME
termcap, tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs \- terminal independent operation routines
.SH SYNOPSIS
.nf
.ft B
char \s-1PC\s0;
char *\s-1BC\s0;
char *\s-1UP\s0;
short ospeed;
.LP
.ft B
tgetent(bp, name)
char *bp, *name;
.LP
.ft B
tgetnum (id)
char *id;
.LP
.ft B
tgetflag (id)
char *id;
.LP
.ft B
char *
tgetstr(id, area)
char *id, **area;
.LP
.ft B
char *
tgoto(cm, destcol, destline)
char *cm;
.LP
.ft B
tputs(cp, affcnt, outc)
register char *cp;
int affcnt;
int (*outc)(\|);
.fi
.ft R
.SH DESCRIPTION
.IX  "tgetent function"  ""  "\fLtgetent\fP \(em get entry for terminal"
.IX  "terminal independent operations"  tgetent  ""  \fLtgetent\fP
.IX  "tgetnum function"  ""  "\fLtgetnum\fP \(em get numeric cabability"
.IX  "terminal independent operations"  tgetnum  ""  \fLtgetnum\fP
.IX  "tgetflag function"  ""  "\fLtgetflag\fP \(em get Boolean cabability"
.IX  "terminal independent operations"  tgetflag  ""  \fLtgetflag\fP
.IX  "tgetstr function"  ""  "\fLtgetstr\fP \(em get string cabability"
.IX  "terminal independent operations"  tgetstr  ""  \fLtgetstr\fP
.IX  "tgoto function"  ""  "\fLtgoto\fP \(em go to position"
.IX  "terminal independent operations"  tgoto  ""  \fLtgoto\fP
.IX  "tputs function"  ""  "\fLtputs\fP \(em decode padding information"
.IX  "terminal independent operations"  tputs  ""  \fLtputs\fP
.LP
These functions extract and use capabilities
from the terminal capability data base
.BR termcap (5).
These are low level routines; see
.BR curses (3X)
for a higher level package.
.LP
.B tgetent(\|)
extracts the entry for terminal
.I name
into the
.I bp
buffer, with the current size of the tty
(usually a window).  This allows pre-SunWindows
programs to run in a window of arbitrary size.
.I bp
should be a character buffer of size
1024 and must be retained through all subsequent calls to
.BR tgetnum ,
.BR tgetflag ,
and
.BR tgetstr .
.B 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 all goes well.
It will look in the environment for a
.SB TERMCAP
variable.
If found, and the value does not begin with a slash,
and the terminal type
.I name
is the same as the environment string
.BR \s-1TERM\s0 ,
the
.SB TERMCAP
string is used instead of reading the termcap file.
If it does begin with a slash, the string is
used as a path name rather than
.BR /etc/termcap .
This can speed up entry into programs that call
.BR tgetent ,
as well as to help debug new terminal descriptions
or to make one for your terminal if you cannot
write the file
.BR /etc/termcap .
Note: if the window size changes,
the ``lines'' and ``columns'' entries in
.I bp
are no longer correct.  See the
.TX SVPG
for details regarding [how to handle] this.
.LP
.B tgetnum(\|)
gets the numeric value of capability
.BR \s-1ID\s0 ,
returning \-1 if is not given for the terminal.
.B tgetflag(\|)
returns 1 if the specified capability is present in
the terminal's entry, 0 if it is not.
.B tgetstr(\|)
gets the string value of capability
.BR \s-1ID\s0 ,
placing it in the buffer at
.IR area ,
advancing the
.I area
pointer.
It decodes the abbreviations for this field described in
.BR termcap (5),
except for cursor addressing and padding information.
.B tgetstr(\|)
returns the string pointer if successful.
Otherwise it returns zero.
.br
.ne 10
.LP
.B 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
.SB UP
(from the
.B up
capability) and
.SB BC
(if
.B bc
is given rather than
.BR bs )
if necessary to avoid placing
.BR \en ,
.B ^D
or
.B ^@
in the returned string.
(Programs which call
.B tgoto(\|)
should be sure to turn off the
.SB XTABS
.BR bit (s), since
.B tgoto(\|)
may now output a tab.
Note: programs using
.B termcap(\|)
should in general turn off
.SB XTABS
anyway since some terminals use
.B ^I
(\s-1CTRL-I\s0)
for other functions, such as nondestructive space.)
If a
.B %
sequence is given which is not understood, then
.B tgoto(\|)
returns
.BR \s-1OOPS\s0 .
.LP
.B tputs(\|)
decodes the leading padding information of the string
.IR cp ;
.I affcnt
gives the number of lines affected by the operation,
or 1 if this is not applicable,
.I outc
is a routine which is called with each character in turn.
The external variable
.I ospeed
should contain the encoded output speed of
the terminal as described in
.BR tty (4).
The external variable
.SB PC
should contain a pad character to be used (from the
.B pc
capability) if a
.SM NULL
.BR  (\fB^@\fR)
is inappropriate.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/libtermcap.a
\-ltermcap library
.TP
.B /etc/termcap
data base
.PD
.SH SEE ALSO
.BR ex (1),
.BR curses (3X),
.BR tty (4),
.BR termcap (5)
kernel.
These cannot be generated by any user processes.
.TP
.SB LOG_USER
Messages generated by random user processes.
This is the default facility identifier if none is specified.
.TP
.SB LOG_MAIL
The mail system.
.TP
.SB LOG_DAEMON
System daemons, such as
.BR ftpd (8C),
.BR routed (8C),
e./share/man/man3/tfind.3                                                                               755       0      12           65  4424741374  10045                                                                                                                                                                                                                                                                                                                                                                      .so man3/tsearch.3
.\" @(#)tfind.3 1.4 89/03/27 SMI;
 tgetflag.3x   I  M  
tgetnum.3x    I  N  
tgetstr.3x    I  O  tgoto.3x x    J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v  JT  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3     J  [  
toascii.3v    J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  ./share/man/man3/tgetent.3x                                                                            755       0      12           71  4424741374  10600                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tgetent.3x 1.4 89/03/27 SMI;
 
tgetnum.3x   I  N  
tgetstr.3x   I  O  tgoto.3x  I  J   P  time.3c   J  Q  timegm.3  J  J(  R  	timegm.3v J(  J<  S  timelocal.3   JT  T  timelocal.3v  T  Jh  U  times.3c  Jh  J|  V  times.3v  J|  J  W  timezone.3c   J  X  
tmpfile.3s   J  Y  	tmpnam.3s J  J  Z  	toascii.3 J  J  [  
toascii.3v   J  \  	tolower.3 J  K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `./share/man/man3/tgetflag.3x                                                                           755       0      12           72  4424741374  10724                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tgetflag.3x 1.4 89/03/27 SMI;
 
tgetstr.3x   I  O  tgoto.3x x   J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v J  J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  T  J|  V  times.3v  Jh  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s    J  Z  	toascii.3 J  J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a./share/man/man3/tgetnum.3x                                                                            755       0      12           71  4424741374  10611                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tgetnum.3x 1.4 89/03/27 SMI;
 tgoto.3x x   J   P  time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v  T  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3    J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b./share/man/man3/tgetstr.3x                                                                            755       0      12           71  4424741375  10623                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tgetstr.3x 1.4 89/03/27 SMI;
 time.3c   J  Q  timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v  JT  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3     J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c./share/man/man3/tgoto.3x                                                                              755       0      12           67  4424741375  10270                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tgoto.3x 1.4 89/03/27 SMI;
timegm.3 3c   J(  R  	timegm.3v c   J<  S  timelocal.3   JT  T  timelocal.3v  JT  Jh  U  times.3c  JT  J|  V  times.3v  JT  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3     J  [  
toascii.3v    J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d./share/man/man3/time.3c                                                                               755       0      12         3110  4424741375  10075                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)time.3c 1.12 89/03/27 SMI; from UCB 4.2
.TH TIME 3C "6 October 1987"
.SH NAME
time, ftime \- get date and time
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/timeb.h>
.LP
.B time_t timeofday = time((time_t *)0)
.B time_t timeofday = time(tloc)
.B time_t *tloc;
.LP
.B ftime(tp)
.B struct timeb *tp;
.fi
.IX  get "date and time \(em \fLtime\fP"
.IX  "date and time"  get  ""  "get \(em \fLtime\fP"
.IX  "time and date"  get  ""  "get \(em \fLtime\fP"
.IX  get "date and time \(em \fLftime\fP"
.IX  "date and time"  "get ftime"  ""  "get \(em \fLftime\fP"
.IX  "time and date"  "get ftime"  ""  "get \(em \fLftime\fP"
.IX  "time function"  ""  "\fLtime\fP \(em get date and time"
.IX  "ftime function"  ""  "\fLftime\fP \(em get date and time"
.SH DESCRIPTION
.LP
.B time(\|)
returns the time since 00:00:00
.SM GMT\s0,
Jan. 1, 1970, measured in seconds.
.LP
If
.B tloc
is non-\s-1NULL\s0,
the return value is also stored in the place to which
.B tloc
points.
.LP
The
.B ftime(\|)
entry fills in a structure pointed to by its argument,
as defined by
.BR <sys/timeb.h> :
.RS
.ta .5i +\w'unsigned 'u
.nf
.ft B
struct timeb
{
	time_t	time;
	unsigned short millitm;
	short	timezone;
	short	dstflag;
};
.ft R
.fi
.RE
.LP
The structure contains the time since the epoch in seconds,
up to 1000 milliseconds of more-precise interval,
the local time zone (measured in minutes of time westward from Greenwich),
and a flag that, if nonzero, indicates that
Daylight Saving time applies locally during the appropriate part of the year.
.SH "SEE ALSO"
.BR date (1V),
.BR gettimeofday (2),
.BR ctime (3)
  	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<    	winsch.3v    PP    	winsch.3x    Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh./share/man/man3/timegm.3                                                                              755       0      12           65  4424741375  10224                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)timegm.3 1.3 89/03/27 SMI; 
 S  timelocal.3   JT  T  timelocal.3v  T  Jh  U  times.3c  Jh  J|  V  times.3v  J|  J  W  timezone.3c   J  X  
tmpfile.3s   J  Y  	tmpnam.3s J  J  Z  	toascii.3 J  J  [  
toascii.3v   J  \  	tolower.3 J  K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 KD  KX  a  
toupper.3v X  Kl  b  tputs.3x  Kl  K  c  traceoff.3v   K  d  
traceon.3v   K  e  trig.3m   K  f./share/man/man3/timegm.3v                                                                             755       0      12           67  4424741375  10414                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)timegm.3v 1.3 89/03/27 SMI; 
T  timelocal.3v  JT  Jh  U  times.3c  T  J|  V  times.3v  Jh  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s    J  Z  	toascii.3 J  J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v D  Kl  b  tputs.3x v X  K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g./share/man/man3/timelocal.3                                                                           755       0      12           70  4424741376  10710                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)timelocal.3 1.4 89/03/27 SMI; 
  U  times.3c  JT  J|  V  times.3v  T  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3    J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v D  K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h./share/man/man3/timelocal.3v                                                                          755       0      12           72  4424741376  11100                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)timelocal.3v 1.3 89/03/27 SMI; 
V  times.3v  JT  J  W  timezone.3c   J  X  
tmpfile.3s    J  Y  	tmpnam.3s     J  Z  	toascii.3     J  [  
toascii.3v   J  \  	tolower.3    K  ]  
tolower.3v   K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i./share/man/man3/times.3c                                                                              755       0      12         2073  4424741376  10270                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)times.3c 1.12 89/03/27 SMI; from UCB 4.2
.TH TIMES 3C "6 October 1987"
.SH NAME
times \- get process times
.SH SYNOPSIS
.nf
.B "#include <sys/types.h>
.B "#include <sys/times.h>
.LP
.B times(buffer)
.B struct tms *buffer;
.fi
.IX  get "process times \(em \fLtimes\fP"
.IX  process "get times \(em \fLtimes\fP"
.IX  "times function"  ""  "\fLtimes\fP \(em get process times"
.SH DESCRIPTION
.B
This interface is obsoleted by getrusage(2).
.LP
.B times(\|)
returns time-accounting information for the
current process and for the terminated child
processes of the current process.  All times are in
1/\s-1HZ\s0 seconds, where
.SM HZ
is 60.
.LP
This is the structure returned by
.BR times :
.RS
.ft B
.nf
struct tms {
	time_t	tms_utime;		/* user time */
	time_t	tms_stime;		/* system time */
	time_t	tms_cutime;		/* user time, children */
	time_t	tms_cstime;		/* system time, children */
};
.ft R
.fi
.RE
.LP
The children's times are the sum of the children's
process times and
their children's times.
.SH "SEE ALSO"
.BR time (1V),
.BR getrusage (2),
.BR wait (2),
.BR time (3C)
     	vsyslog.3 tf  N    	vtimes.3c g.  N(    	waddch.3v .3  N<    	waddch.3x .3  NP    
waddstr.3v 3  Nd    
waddstr.3x .  Nx    wattroff.3v   N    
wattron.3v f  N    wattrset.3v   N    	wclear.3v et  N    	wclear.3x .3  N    wclrtobot.3v  v   N    wclrtobot.3x  N  O    wclrtoeol.3v  N  O(    wclrtoeol.3x  O  O<    	wdelch.3v 3x  OP    	wdelch.3x .3  Oh    wdeleteln.3v  O(  O./share/man/man3/times.3v                                                                              755       0      12         3616  4424741376  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)times.3v 1.10 89/03/27 SMI; from UCB 4.2
.TH TIMES 3V "25 March 1989"
.SH NAME
times \- get process and child process times
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/times.h>
.LP
.B long times(buffer)
.B struct tms \(**buffer;
.fi
.SH DESCRIPTION
.IX  "get process and child process times V"  ""  "get process times, System V \(em \fLtimes\fP"
.IX  process "and child process times, System V  \(em \fLtimes\fP"
.IX  "times function V"  ""  "\fLtimes\fP \(em get process and child process times, System V"
.LP
.B times(\|)
returns time-accounting information for
the current process and for the terminated
child processes of the current process.
All times are in 1/\s-1HZ\s0 seconds, where
.SM HZ
is 60.
.LP
This is the structure returned by
.BR times :
.RS
.nf
.ft B
struct tms {
	time_t	tms_utime;		/* user time */
	time_t	tms_stime;		/* system time */
	time_t	tms_cutime;		/* user time, children */
	time_t	tms_cstime;		/* system time, children */
};
.ft R
.fi
.RE
.LP
This information comes from the calling process
and each of its terminated child processes
for which it has executed a
.BR wait .
.LP
.B tms_utime
is the
.SM CPU
time used while executing instructions
in the user space of the calling process.
.LP
.B tms_stime
is the
.SM CPU
time used by the system on behalf of the calling process.
.LP
.B tms_cutime
is the sum of the
.BR tms_utime s
and
.BR tms_cutime s
of the child processes.
.LP
.B tms_cstime
is the sum of the
.BR tms_stime s
and
.BR tms_cstime s
of the child processes.
.SH RETURN VALUE
Upon successful completion,
.B times(\|)
returns the elapsed real time, in 60ths of a
second, since an arbitrary point in the past.
This point does not change from one invocation of
.B times(\|)
to another within the same process.  If
.B times(\|)
fails, a \-1 is returned and
.B errno
is set to indicate the error.
.SH "SEE ALSO"
.BR time (1V),
.BR getrusage (2),
.BR wait (2),
.BR time (3C)
ime, children */
	time_t	tms_cstime;		/* system time, children */
};
.ft R
.fi
.RE
.LP
This information comes from./share/man/man3/timezone.3c                                                                           755       0      12         2646  4424741376  11007                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)timezone.3c 1.7 89/03/27 SMI;
.TH TIMEZONE 3C "22 March 1989"
.SH NAME
timezone \- get time zone name given offset from GMT
.SH SYNOPSIS
.B char *timezone(zone, dst)
.SH DESCRIPTION
.IX  "timezone function"  ""  "\fLtimezone\fR \(em get time zone name"
.IX  "get time zone name"  ""  "get time zone name \(em \fLtimezone\fR"
.B timezone(\|)
attempts to return the name of the time zone
associated with its first argument, which is
measured in minutes westward from Greenwich.
If the second argument is 0, the standard name is used,
otherwise the Daylight Savings Time version.
If the required name does not appear in a table
built into the routine, the difference from
.SM GMT
is produced; for instance, in Afghanistan
.RB ` "timezone(\-(60*4+30), 0)" '
is appropriate because it is 4:30 ahead of
.SM GMT
and the string
.B \s-1GMT\s0+4:30
is produced.
.LP
Note: the offset westward from Greenwich and an
indication of whether Daylight Savings Time
is in effect may not be
sufficient to determine the name of the time zone,
as the name may differ between different locations
in the same time zone.  Instead of using
.B timezone(\|)
to determine the name of the time zone for
a given time, that time
should be converted to a
.RB `" struct tm" '
using
.B localtime
(see
.BR ctime (3))
and the
.I tm_zone
field of that structure should be used.
.B timezone(\|)
is retained for compatibility with existing programs.
.SH SEE ALSO
.BR ctime (3)
elch.3x O  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O./share/man/man3/tmpfile.3s                                                                            755       0      12         1353  4424741377  10630                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tmpfile.3s 1.10 89/03/27 SMI; from S5
.TH TMPFILE 3S  "6 October 1987"
.SH NAME
tmpfile \- create a temporary file
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B \s-1FILE\s0 "*tmpfile(\|)"
.fi
.SH DESCRIPTION
.IX tmpfile "" "\fLtmpfile\fR \(em create temporary file"
.B tmpfile(\|)
creates a temporary file using a name generated by
.BR tmpnam (3S),
and returns a corresponding
.SB FILE
pointer.  If the file cannot be opened,
an error message is printed using
.BR perror (3),
and a
.SM NULL
pointer is returned.  The file will
automatically be deleted when the process using
it terminates.  The file is opened for update (``w+'').
.SH SEE ALSO
.BR creat (2),
.BR unlink (2),
.BR fopen (3S),
.BR mktemp (3),
.BR perror (3),
.BR tmpnam (3S)
  w  utime.3c 3n   M0  x  valloc.3 3n   MD  y  values.3 ame  MX  z  	varargs.3 .3  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsys./share/man/man3/tmpnam.3s                                                                             755       0      12         6645  4424741377  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tmpnam.3s 1.12 89/03/27 SMI; from UCB 4.2 and S5
.TH TMPNAM 3S  "1 February 1988"
.SH NAME
tmpnam, tempnam \- create a name for a temporary file
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B char \(**tmpnam (s)
.B char \(**s;
.LP
.B char \(**tempnam (dir, pfx)
.B char \(**dir, \(**pfx;
.fi
.IX  "create" "name for temporary file \(em \fLtmpnam\fP"
.IX  "temporary file"  "create name for"  ""  "create name for \(em \fLtmpnam\fP"
.IX  file  "create temporary name"  file  "create temporary name \(em \fLtmpnam\fP"
.IX  "tmpnam function"  ""  "\fLtmpnam\fP \(em make temporary file name"
.SH DESCRIPTION
These functions generate file names that can
safely be used for a temporary file.
.LP
.B tmpnam(\|)
always generates a file name using the path-prefix
defined as
.B P_tmpdir
in the
.B <stdio.h>
header file.  If
.I s
is
.SM NULL\*S,
.B tmpnam(\|)
leaves its result in an internal static area
and returns a pointer to that area.
The next call to
.B tmpnam(\|)
will destroy the contents of the area.  If
.I s
is not
.SM NULL\*S,
it is assumed to be the address of an array of at least
.B L_tmpnam
bytes, where
.B L_tmpnam
is a constant defined in
.BR <stdio.h> ;
.B tmpnam(\|)
places its result in that array and returns
.IR s .
.LP
.B tempnam(\|)
allows the user to control the choice of a directory.
The argument
.B dir
points to the name of the directory in which
the file is to be created.  If
.B dir
is
.SM NULL
or points to a string which is not a name
for an appropriate directory, the path-prefix defined as
.B P_tmpdir
in the
.B <stdio.h>
header file is used.
If that directory is not accessible,
.B /tmp
will be used as a last resort.
This entire sequence can be up-staged by
providing an environment variable
.SB TMPDIR
in the user's environment, whose value is the name of the
desired temporary-file directory.
.LP
Many applications prefer their temporary
files to have certain favorite initial letter
sequences in their names.  Use the
.I pfx
argument for this.  This argument may be
.SM NULL
or point to a string of up to five characters to
be used as the first few characters of the
temporary-file name.
.LP
.B tempnam(\|)
uses
.BR malloc
to get space for the constructed file name,
and returns a pointer to this area.
Thus, any pointer value returned from
.B tempnam(\|)
may serve as an argument to
.I free
(see
.BR malloc (3)).
If
.B tempnam(\|)
cannot return the expected result for any reason,
that is,
.BR malloc
failed, or none of the above mentioned attempts to find
an appropriate directory was successful, a
.SM NULL
pointer will be returned.
.SH NOTES
These functions generate a different file name each time they are called.
.LP
Files created using these functions and either
.IR fopen
or
.IR creat
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
.BR unlink (2)
to remove the file when its use is ended.
.SH SEE ALSO
.BR creat (2),
.BR unlink (2),
.BR fopen (3S),
.BR malloc (3),
.BR mktemp (3),
.BR tmpfile (3S)
.SH BUGS
If called more than 17,576 times in a single process,
these functions will start recycling
previously used names.
.LP
Between the time a file name 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
these functions or
.IR mktemp ,
and the file names are chosen so as to render
duplication by other means unlikely.
ernal variable
.SB PC
should contain a pad character to be used (from the
.B pc
capability)./share/man/man3/toascii.3                                                                             755       0      12           66  4424741377  10400                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)toascii.3 1.5 89/03/27 SMI; 
\  	tolower.3     K  ]  
tolower.3v e  K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzse./share/man/man3/toascii.3v                                                                            755       0      12           70  4424741377  10561                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)toascii.3v 1.5 89/03/27 SMI; 
  
tolower.3v    K  ^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ./share/man/man3/tolower.3                                                                             755       0      12           66  4424741400  10423                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)tolower.3 1.5 89/03/27 SMI; 
^  touchwin.3v   K0  _  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	./share/man/man3/tolower.3v                                                                            755       0      12           70  4424741401  10605                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)tolower.3v 1.5 89/03/27 SMI; 
  touchwin.3x   KD  `  	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	./share/man/man3/touchwin.3v                                                                           755       0      12           71  4424741401  10753                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)touchwin.3v 1.4 89/03/27 SMI;
 	toupper.3 x   KX  a  
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	./share/man/man3/touchwin.3x                                                                           755       0      12           72  4424741401  10756                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)touchwin.3x 1.5 89/03/27 SMI; 
 
toupper.3v    Kl  b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	./share/man/man3/toupper.3                                                                             755       0      12           66  4424741402  10430                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3
.\" @(#)toupper.3 1.5 89/03/27 SMI; 
b  tputs.3x v    K  c  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	ungetc.3s Lx  L  u  ./share/man/man3/toupper.3v                                                                            755       0      12           70  4424741402  10611                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctype.3v
.\" @(#)toupper.3v 1.5 89/03/27 SMI; 
  traceoff.3v   K  d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	ungetc.3s Lx  L  u  user2netname.3n   M  v./share/man/man3/tputs.3x                                                                              755       0      12           67  4424741402  10302                                                                                                                                                                                                                                                                                                                                                                      .so man3/termcap.3x
.\" @(#)tputs.3x 1.4 89/03/27 SMI;
d  
traceon.3v    K  e  trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	ungetc.3s Lx  L  u  user2netname.3n   M  v  usleep.3 3n   M  w./share/man/man3/traceoff.3v                                                                           755       0      12           71  4424741402  10705                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)traceoff.3v 1.4 89/03/27 SMI;
 trig.3m   K  f  	tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	ungetc.3s Lx  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x./share/man/man3/traceon.3v                                                                            755       0      12           70  4424741402  10546                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)traceon.3v 1.4 89/03/27 SMI;
tsearch.3 m   K  g  	ttyname.3 m   K  h  	ttyslot.3 m   L   i  
ttyslot.3v    L  j  twalk.3   L(  k  typeahead.3v  L(  L8  l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x Lx  L  t  	ungetc.3s Lx  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x  valloc.3 3n   MD  y./share/man/man3/trig.3m                                                                               755       0      12         6452  4424741403  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)trig.3m 1.11 89/03/27 SMI; from UCB 4.3
.TH TRIG 3M  "22 November 1987"
.IX  "trigonometric functions"  ""  ""  ""  PAGE START
.SH NAME
sin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions
.SH SYNOPSIS
.nf
.B #include <math.h>
.LP
.B double sin(x)
.B double x;
.LP
.B double cos(x)
.B double x;
.LP
.B void sincos(x, s, c)
.B double x, *s, *c;
.LP
.B double tan(x)
.B double x;
.LP
.B double asin(x)
.B double x;
.LP
.B double acos(x)
.B double x;
.LP
.B double atan(x)
.B double x;
.LP
.B double atan2(y, x)
.B double y, x;
.fi
.IX  "sin function"  ""  "\fLsin\fP \(em trigonometric sine"
.IX  "mathematical functions"  sin  ""  \fLsin\fP
.IX  "trigonometric functions"  sin  ""  \fLsin\fP
.IX  "cos function"  ""  "\fLcos\fP \(em trigonometric cosine"
.IX  "mathematical functions"  cos  ""  \fLcos\fP
.IX  "trigonometric functions"  cos  ""  \fLcos\fP
.IX  "tan function"  ""  "\fLtan\fP \(em trigonometric tangent"
.IX  "mathematical functions"  tan  ""  \fLtan\fP
.IX  "trigonometric functions"  tan  ""  \fLtan\fP
.IX  "asin function"  ""  "\fLasin\fP \(em trigonometric arcsine"
.IX  "mathematical functions"  asin  ""  \fLasin\fP
.IX  "trigonometric functions"  asin  ""  \fLasin\fP
.IX  "acos function"  ""  "\fLacos\fP \(em trigonometric arccosine"
.IX  "mathematical functions"  acos  ""  \fLacos\fP
.IX  "trigonometric functions"  acos  ""  \fLacos\fP
.IX  "atan function"  ""  "\fLatan\fP \(em trigonometric arctangent"
.IX  "mathematical functions"  atan  ""  \fLatan\fP
.IX  "trigonometric functions"  atan  ""  \fLatan\fP
.IX  "atan2 function"  ""  "\fLatan2\fP \(em trigonometric arctangent"
.IX  "mathematical functions"  atan2  ""  \fLatan2\fP
.IX  "trigonometric functions"  atan2  ""  \fLatan2\fP
.SH DESCRIPTION
.BR sin ,
.B cos, sincos,
and
.B tan(\|)
return trigonometric functions of radian arguments.
The values of trigonometric functions of
arguments exceeding \(*p/4 in magnitude are affected
by the precision of the approximation to \(*p/2 used to
reduce those arguments to the range \-\(*p/4 to \(*p/4.
Argument reduction may occur in hardware or
software; if in software, the variable
.B fp_pi
defined in
.B <math.h>
allows changing that precision at run time.
Trigonometric argument reduction is discussed in the
.TX FPOINT .
Note that
.B sincos(x,s,c)
allows simultaneous computation of
.B *s = sin(x)
and
.B *c = cos(x).
.LP
.B asin(\|)
returns the arc sin in the range \-\(*p/2 to \(*p/2.
.LP
.B acos(\|)
returns the arc cosine in the range 0 to \(*p.
.LP
.B atan(\|)
returns the arc tangent of
.I x
in the range \-\(*p/2 to \(*p/2.
.LP
.BI atan2( y , x )
and
.BR hypot (3M)
convert rectangular coordinates
.BI ( x , y )
to polar
.BI ( r , \(*h )\fR;
.B atan2(\|)
computes
.IR \(*h ,
the argument or phase,
by computing an arc tangent of
.IR y / x
in the range \-\(*p to \(*p.
.BR atan2 (0.0,0.0)
is \(+-0.0 or \(+-\(*p,
in conformance with 4.3\s-1BSD\s0, as discussed in the
.TX FPOINT .
.SH DIAGNOSTICS
These functions handle exceptional
arguments in the spirit of
.SM ANSI/IEEE
Std 754-1985.
.BR "sin(\(+-\(if), cos(\(+-\(if), tan(\(+-\(if)" ,
or
.BI asin( x )
or
.BI acos( x )
with
.RI | x |>1,
return NaN.  In addition,
.BR asin ,
.BR acos ,
and
.B atan2(\|)
may also set
.B errno
and call
.BR matherr (3M).
.SH "SEE ALSO"
.BR hypot (3M),
.BR matherr (3M)
.IX  "trigonometric functions"  ""  ""  ""  PAGE END
s using
these functions or
.IR mktemp ,
and the file names are chosen so as to render
duplication by other means unlikely.
ernal variable
.SB PC
should contain a pad character to be used (from the
.B pc
capability)./share/man/man3/tsearch.3                                                                             755       0      12        15674  4424741403  10457                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tsearch.3 1.9 89/03/27 SMI; from UCB 4.3 BSD
.TH TSEARCH 3 "22 March 1989"
.SH NAME
tsearch, tfind, tdelete, twalk \- manage binary search trees
.SH SYNOPSIS
.nf
.B #include <search.h>
.LP
.B "char \(**tsearch((char \(**) key, (char \(**\(**) rootp, compar)"
.B int (\(**compar)( );
.LP
.B "char \(**tfind((char \(**) key, (char \(**\(**) rootp, compar)"
.B int (\(**compar)( );
.LP
.B "char \(**tdelete((char \(**) key, (char \(**\(**) rootp, compar)"
.B int (\(**compar)( );
.LP
.B "void twalk((char \(**) root, action)"
.B void (\(**action)( );
.fi
.SH DESCRIPTION
.IX tsearch "" "\fLtsearch\fR \(em build and search binary tree"
.IX tfind "" "\fLtfind\fR \(em search binary tree"
.IX tdelete "" "\fLtdelete\fR \(em delete binary tree node"
.IX twalk "" "\fLtwalk\fR \(em traverse binary tree"
.IX "binary tree routines"
.LP
.BR tsearch(\|) ,
.BR tfind(\|) ,
.BR tdelete(\|) ,
and
.B twalk(\|)
are routines for manipulating binary search trees.
They are generalized from Knuth (6.2.2) Algorithms T and D.
All comparisons are done with a user-supplied routine.
This routine is called with two arguments,
the pointers to the elements being compared.
It returns an integer less than, equal to,
or greater than 0, according to whether the first argument
is to be considered less than, equal to or greater than the
second argument.
The comparison function need not compare every byte,
so arbitrary data may be contained in the elements
in addition to the values
being compared.
.LP
.B tsearch(\|)
is used to build and access the tree.
.I key
is a pointer to a datum to be accessed or stored.
If there is a datum in the tree equal to
.BI \(** key
(the value pointed to by
.IR key ),
a pointer to this found
datum is returned.  Otherwise,
.BI \(** key
is inserted, and a pointer to it returned.
Only pointers are copied, so the calling routine must
store the data.
.I rootp
points to a variable that points to the root
of the tree.  A
.SM NULL
value for the variable pointed to by
.I rootp
denotes an empty tree; in this case,
the variable will be set to point to the datum
which will be at the root of the new tree.
.LP
Like
.BR tsearch(\|) ,
.B tfind(\|)
will search for a datum in the tree, returning a pointer
to it if found.  However, if it is not found,
.B tfind(\|)
will return a
.SM NULL
pointer.  The arguments for
.B tfind(\|)
are the same as for
.BR tsearch(\|) .
.LP
.B tdelete(\|)
deletes a node from a binary search tree.
The arguments are the same as for
.BR tsearch(\|) .
The variable pointed to by
.I rootp
will be changed if the deleted node was the root of the tree.
.B tdelete(\|)
returns a pointer to the parent of the deleted node,
or a
.SM NULL
pointer if the node is not found.
.LP
.B 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
value from an enumeration data type
.B "typedef enum { preorder, postorder, endorder, leaf }"
.BR \s-1VISIT\s0 ;
(defined in the
.B <search.h>
header file),
depending 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, with the root being level zero.
.LP
The pointers to the key and the root of the tree should be
of type pointer-to-element,
and cast to type pointer-to-pointer-to-character.
Similarly, although declared as type pointer-to-character,
the value returned should be cast into type pointer-to-element.
.SH EXAMPLE
The following code reads in strings and
stores structures containing a pointer to each string
and a count of its length.
It then walks the tree, printing out the stored strings
and their lengths in alphabetical order.
.br
.ne 10
.RS
.nf
.ft B
#include <search.h>
#include <stdio.h>
.sp .5
void twalk(\|);
char *tsearch(\|);
.sp .5
struct node {		/* pointers to these are stored in the tree */
	char *string;
	int count;
};
.sp .5
#define \s-1MAXNODES\s0	12
#define \s-1MAXSTRING\s0	100
#define \s-1MINSTRING\s0	3		/* char, newline, eos */
.sp .5
char string_space[\s-1MAXSTRING\s0];		/* space to store strings */
struct node node_space[\s-1MAXNODES\s0];	/* nodes to store */
struct node *root = \s-1NULL\s0;		/* this points to the root */
.sp .5
main(\|)
{
	char *strptr = string_space;
	int maxstrlen = \s-1MAXSTRING\s0;
	struct node *nodeptr = node_space;
	int node_compare(\|);
	void print_node(\|);
	struct node **found;
	int length;
.sp .5
	while (fgets(strptr, maxstrlen, stdin) != \s-1NULL\s0) {
		/* remove the trailing newline */
		length = strlen(strptr);
		strptr[length-1] = 0;
		/* set node */
		nodeptr->string = strptr;
		/* locate node into the tree */
		found = (struct node **)
		    tsearch((char *) nodeptr, (char **) &root, node_compare);
		/* bump the count */
		(*found)->count++;
.sp .5
		if (*found == nodeptr) {
			/* node was inserted, so get a new one */
			strptr += length;
			maxstrlen -= length;
			if (maxstrlen < \s-1MINSTRING\s0)
				break;
			if (++nodeptr >= &node_space[\s-1MAXNODES\s0])
				break;
		}
	}
	twalk((char *)root, print_node);
}
.sp .5
.ne 10
/*
     This routine compares two nodes, based on an
     alphabetical ordering of the string field.
*/
.sp .5
int node_compare(node1, node2)
	struct node *node1, *node2;
{
	return strcmp(node1->string, node2->string);
}
.sp .5
/* Print out nodes in alphabetical order */
/*\s-1ARGSUSED2\s0*/
void
print_node(node, order, level)
	struct node **node;
	\s-1VISIT\s0 order;
	int level;
{
	if (order == postorder || order == leaf) {
		(void) printf("string = %20s,  count = %d\n",
		    (*node)->string, (*node)->count);
	}
}
.fi
.ft R
.RE
.SH SEE ALSO
.BR bsearch (3),
.BR hsearch (3),
.BR lsearch (3)
.SH DIAGNOSTICS
A
.SM NULL
pointer is returned by
.B tsearch(\|)
if there is not enough space available to create a new node.
.LP
A
.SM NULL
pointer is returned by
.BR tsearch ,
.B tfind(\|)
and
.B tdelete(\|)
if
.I rootp
is
.SM NULL
on entry.
.LP
If the datum is found, both
.B tsearch(\|)
and
.B tfind(\|)
return a pointer to it.  If not,
.B tfind(\|)
returns
.SM NULL\s0,
and
.B tsearch(\|)
returns a pointer to the inserted item.
.SH WARNINGS
The
.I root
argument to
.B twalk(\|)
is one level of indirection less than the
.I rootp
arguments to
.B tsearch(\|)
and
.BR tdelete .
.LP
There are two nomenclatures used to refer to
the order in which tree nodes are visited.
.B tsearch(\|)
uses preorder, postorder and endorder
to respectively refer to visting a node before
any of its children, after its left child
and before its right, and after both its children.
The alternate nomenclature uses preorder, inorder
and postorder to refer to the same visits, which
could result in some confusion over
the meaning of postorder.
.SH BUGS
If the calling function alters the pointer to the
root, results are unpredictable.
They are generalized from Knuth (6.2.2) Algorithms T and D.
All comp./share/man/man3/ttyname.3                                                                             755       0      12         2040  4424741403  10446                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ttyname.3 1.14 89/03/27 SMI; from UCB 4.2
.TH TTYNAME 3 "6 October 1987"
.SH NAME
ttyname, isatty \- find name of a terminal
.SH SYNOPSIS
.B char *ttyname(filedes)
.LP
.B isatty(filedes)
.IX  "ttyname function"  ""  "\fLttyname\fP \(em find terminal name"
.IX  "isatty function"  ""  "\fLisatty\fP \(em test if device is terminal"
.IX  find "name of terminal \(em \fLttyname\fR"
.IX  "name of terminal, find \(em \fLttyname\fR"
.IX  "terminal"  "find name of \(em \fLttyname\fR"
.SH DESCRIPTION
.LP
.B ttyname(\|)
returns a pointer to the
.SM NULL\s0-terminated
path name of the terminal device associated
with file descriptor
.IR filedes .
.LP
.B isatty(\|)
returns 1 if
.I filedes
is associated with a terminal device, 0 otherwise.
.SH FILES
.PD 0
.TP 20
.B /dev/\(**
.PD
.SH SEE ALSO
.BR ioctl (2),
.BR ttytab (5)
.SH DIAGNOSTICS
.LP
.B ttyname(\|)
returns a
.SM NULL
pointer if
.I filedes
does not describe a terminal device in directory
.BR /dev .
.SH BUGS
.LP
The return value points to static data
whose content is overwritten by each call.
    	wdelch.3x O<  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v   O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x    P(    winch.3x  P  P<    	winsch.3v P(  PP    	winsch.3x P<  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v    P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P  ./share/man/man3/ttyslot.3                                                                             755       0      12         1414  4424741403  10513                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ttyslot.3 1.9 89/03/27 SMI; from S5R2
.TH TTYSLOT 3 "6 October 1987"
.SH NAME
ttyslot \- find the slot in the utmp file of the current process
.SH SYNOPSIS
.B ttyslot(\|)
.IX  "ttyslot function"  ""  "\fLttyslot\fP \(em get utmp slot number"
.SH DESCRIPTION
.B ttyslot(\|)
returns the index of the current user's entry in the
.B /etc/utmp
file.  This is accomplished by actually scanning the file
.B /etc/ttys
for the name of the terminal associated with the standard
input, the standard output, or the error output (0, 1 or 2).
.SH FILES
.PD 0
.TP 20
.B /etc/ttys
.TP
.B /etc/utmp
.PD
.SH DIAGNOSTICS
A value of 0 is returned if an error was
encountered while
searching for the terminal name or if none of the above
file descriptors is associated with a terminal device.
  wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3./share/man/man3/ttyslot.3v                                                                            755       0      12         1434  4424741403  10703                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ttyslot.3v 1.8 89/03/27 SMI; from S5R2
.TH TTYSLOT 3V "6 October 1987"
.SH NAME
ttyslot \- find the slot in the utmp file of the current process
.SH SYNOPSIS
.B ttyslot(\|)
.IX  "ttyslot function V"  ""  "\fLttyslot\fP \(em get utmp slot number, System V"
.SH DESCRIPTION
.B ttyslot(\|)
returns the index of the current user's entry in the
.B /etc/utmp
file.  This is accomplished by actually scanning the file
.B /etc/ttys
for the name of the terminal associated with the standard
input, the standard output, or the error output (0, 1 or 2).
.SH FILES
.PD 0
.TP 20
.B /etc/ttys
.TP
.B /etc/utmp
.PD
.SH DIAGNOSTICS
A value of \-1 is returned if an error was encountered while
searching for the terminal name or if none of the above
file descriptors is associated with a terminal device.
  N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3./share/man/man3/twalk.3                                                                               755       0      12           65  4424741404  10055                                                                                                                                                                                                                                                                                                                                                                      .so man3/tsearch.3
.\" @(#)twalk.3 1.4 89/03/27 SMI;
 l  tzset.3   LL  m  tzset.3v .3   L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  Lx  L  p  ualarm.3  Lx  L  q  	ulimit.3c Lx  L  r  	unctrl.3v Lx  L  s  	unctrl.3x o  L  t  	ungetc.3s L  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x  valloc.3 3n   MD  y  values.3 3n   MX  z  	varargs.3 M  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M./share/man/man3/typeahead.3v                                                                          755       0      12           72  4424741404  11063                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)typeahead.3v 1.4 89/03/27 SMI;
 tzset.3v  LL  L`  n  tzsetwall.3   Lx  o  tzsetwall.3v  o  L  p  ualarm.3  L  L  q  	ulimit.3c L  L  r  	unctrl.3v L  L  s  	unctrl.3x L  L  t  	ungetc.3s L  L  u  user2netname.3n   M  v  usleep.3  M  M  w  utime.3c  M  M0  x  valloc.3  M0  MD  y  values.3  MD  MX  z  	varargs.3 MX  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c M  M  ~  
vprintf.3s   M    
vprintf.3v ./share/man/man3/tzset.3                                                                               755       0      12           64  4424741404  10103                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)tzset.3 1.3 89/03/27 SMI; 
  tzsetwall.3   Lx  o  tzsetwall.3v .3   L  p  ualarm.3 .3v  L  q  	ulimit.3c .3  L  r  	unctrl.3v .3  L  s  	unctrl.3x .3  L  t  	ungetc.3s .3  L  u  user2netname.3n   M  v  usleep.3 ame  M  w  utime.3c p.3  M0  x  valloc.3 .3c  MD  y  values.3 c.3  MX  z  	varargs.3 .3  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c tf  M  ~  
vprintf.3s 3  M    
vprintf.3v .  M    vsprintf.3s   M./share/man/man3/tzset.3v                                                                              755       0      12           66  4424741404  10273                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)tzset.3v 1.5 89/03/27 SMI; 
o  tzsetwall.3v  o  L  p  ualarm.3  L  L  q  	ulimit.3c L  L  r  	unctrl.3v L  L  s  	unctrl.3x L  L  t  	ungetc.3s L  L  u  user2netname.3n   M  v  usleep.3  M  M  w  utime.3c  M  M0  x  valloc.3  M0  MD  y  values.3  MD  MX  z  	varargs.3 MX  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c M  M  ~  
vprintf.3s   M    
vprintf.3v   M    vsprintf.3s   M    vsprintf.3v ./share/man/man3/tzsetwall.3                                                                           755       0      12           70  4424741404  10760                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3
.\" @(#)tzsetwall.3 1.3 89/03/27 SMI; 
  p  ualarm.3  o  L  q  	ulimit.3c L  L  r  	unctrl.3v L  L  s  	unctrl.3x L  L  t  	ungetc.3s L  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c  M  M0  x  valloc.3  M  MD  y  values.3  M0  MX  z  	varargs.3 MD  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s   M    
vprintf.3v   M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v ./share/man/man3/tzsetwall.3v                                                                          755       0      12           72  4424741405  11151                                                                                                                                                                                                                                                                                                                                                                      .so man3/ctime.3v
.\" @(#)tzsetwall.3v 1.3 89/03/27 SMI; 
q  	ulimit.3c o  L  r  	unctrl.3v L  L  s  	unctrl.3x L  L  t  	ungetc.3s L  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x  valloc.3  M  MD  y  values.3  M  MX  z  	varargs.3 M0  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v   M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v ./share/man/man3/ualarm.3                                                                              755       0      12         3133  4424741405  10254                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ualarm.3 1.7 89/03/27 SMI; from UCB 6.4 5/13/86
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH UALARM 3  "6 October 1987"
.SH NAME
ualarm \- schedule signal after interval in microseconds
.SH SYNOPSIS
.nf
.B unsigned ualarm(value, interval)
.B unsigned value;
.B unsigned interval;
.fi
.SH DESCRIPTION
.IX  "ualarm function"  ""  "\fLualarm\fP \(em schedule signal in microsecond precision"
.IX  "schedule signal"  ""  "schedule signal in microsecond precision\(em \fLualarm\fP"
.IX  signal  schedule  signal  "schedule in microsecond precision \(em \fLualarm\fP"
.LP
.B
This is a simplified interface to
.B setitimer
(see
.BR getitimer (2)).
.LP
.B ualarm(\|)
sends signal
.BR \s-1SIGALRM\s0 ,
see
.BR signal (3),
to the invoking process
in a number of microseconds given by the
.I value
argument.  Unless caught or ignored,
the signal terminates the process.
.LP
If the
.I interval
argument is non-zero, the
.SB SIGALRM
signal will be sent to the process every
.I interval
microseconds after the timer expires (for instance, after
.I value
microseconds have passed).
.LP
Because of scheduling delays,
resumption of execution of when the signal is
caught may be delayed an arbitrary amount.
The longest specifiable delay time is
2147483647 microseconds.
.LP
The return value is the amount of time previously remaining in the alarm clock.
.SH "SEE ALSO"
.BR getitimer (2),
.BR sigpause (2),
.BR sigvec (2),
.BR alarm (3C),
.BR signal (3),
.BR sleep (3),
.BR usleep (3)
xdr_accepted_reply.3n   R    xdr_array.3n     R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n d  R    xdr_callmsg.3n |  R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n    R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n   Sd  ./share/man/man3/ulimit.3c                                                                             755       0      12         3556  4424741405  10452                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ulimit.3c 1.15 89/03/27 SMI; from UCB 4.2
.TH ULIMIT 3C "22 November 1987"
.SH NAME
ulimit \- get and set user limits
.SH SYNOPSIS
.ft B
.nf
long ulimit(cmd, newlimit)
int cmd;
long newlimit;
.fi
.ft R
.IX  get "user limits \(em \fLulimit\fP"
.IX  set "user limits \(em \fLulimit\fP"
.IX  "user limits"  get  "user limits"  "get \(em \fLulimit\fP"
.IX  "user limits"  set  "user limits"  "set \(em \fLulimit\fP"
.IX  limits  "get for user"  limits  "get for user \(em \fLulimit\fP"
.IX  limits  "set for user"  limits  "set for user \(em \fLulimit\fP"
.IX  "ulimit function"  ""  "\fLulimit\fP \(em get and set user limits"
.SH DESCRIPTION
.LP
This function is included for System V compatibility.
.LP
This routine provides for control over process limits.  The
.B cmd
values available are:
.RS
.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
.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 super-user may increase the limit.
.B ulimit(\|)
will fail and the limit will be unchanged if a process with an effective
user
.SM ID
other than the super-user attempts to increase its file size limit.
.TP
.B 3
Get the maximum possible break value.  See
.BR brk (2).
.TP
.B 4
Get the size of the process' file descriptor table, as returned by
.BR getdtablesize (2).
.RE
.SH "RETURN VALUE"
.LP
Upon successful completion, a non-negative value is returned.  Otherwise
a value of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.LP
The following error codes may be set in
.BR errno :
.TP 20
.SM EPERM
A user other than the super-user attempted to increase the file size limit.
.SH SEE ALSO
.BR brk (2),
.BR getdtablesize (2),
.BR getrlimit (2),
.BR write (2V)
n   S    xdr_float.3n  S  S    xdr_free.3n   S4     xdr_functions.3n    SL    
xdr_getpos.3n SL  Sd    
xdr_inline.3n Sd  Sx./share/man/man3/unctrl.3v                                                                             755       0      12           67  4424741405  10433                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)unctrl.3v 1.4 89/03/27 SMI;
t  	ungetc.3s .3  L  u  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x  valloc.3 ame  MD  y  values.3 p.3  MX  z  	varargs.3 3c  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v f  M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v tf  N<    	waddch.3x g.  NP    
waddstr.3v 3  Nd./share/man/man3/unctrl.3x                                                                             755       0      12           70  4424741405  10427                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)unctrl.3x 1.5 89/03/27 SMI; 
  user2netname.3n   M  v  usleep.3 3n   M  w  utime.3c 3n   M0  x  valloc.3 3n   MD  y  values.3 ame  MX  z  	varargs.3 .3  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x tf  NP    
waddstr.3v .  Nd    
waddstr.3x 3  Nx./share/man/man3/ungetc.3s                                                                             755       0      12         2636  4424741406  10453                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ungetc.3s 1.14 89/03/27 SMI; from UCB 4.2
.TH UNGETC 3S  "18 November 1987"
.SH NAME
ungetc \- push character back into input stream
.SH SYNOPSIS
.nf
.B #include <stdio.h>
.LP
.B ungetc(c, stream)
.B \s-1FILE\s0 *stream;
.fi
.IX  "push character back to input stream"  "" "push character back to input stream \(em \fLungetc\fP"
.IX  stream  "push character back to"  stream  "push character back to \(em \fLungetc\fP"
.IX  "input stream, push character back to \(em \fLungetc\fP"
.IX  "ungetc function"  ""  "\fLungetc\fP \(em push character back to stream"
.IX  character  "push back to stream"  ""  "push back to stream \(em \fLungetc\fP"
.SH DESCRIPTION
.B ungetc(\|)
pushes the character
.I c
back onto an input stream.
That character will be returned by the next
.B getc(\|)
call on that stream.
.B ungetc(\|)
returns
.IR c ,
and leaves the file
stream
unchanged.
.LP
One character of pushback is guaranteed provided
something has been read from the stream
and the stream is actually buffered.  In the case that
stream
is
.BR stdin ,
one character may be pushed back onto
the buffer without a previous read statement.
.LP
If
.I c
equals
.SM EOF\s0,
.B ungetc(\|)
does nothing to the buffer and returns
.SM EOF\s0.
.LP
An
.BR fseek (3S)
erases all memory of pushed back characters.
.SH "SEE ALSO"
.BR fseek (3S),
.BR getc (3S),
.BR setbuf (3S)
.SH DIAGNOSTICS
.B ungetc(\|)
returns
.SM EOF
if it cannot push a character back.
 
wgetstr.3v x  P     
wgetstr.3x 3  P    winch.3v x 3  P(    winch.3x x 3  P<    	./share/man/man3/user2netname.3n                                                                       755       0      12           72  4424741406  11521                                                                                                                                                                                                                                                                                                                                                                      .so man3/rpc.3n
.\" @(#)user2netname.3n 1.4 89/03/27 SMI;
w  utime.3c 3n   M0  x  valloc.3 3n   MD  y  values.3 3n   MX  z  	varargs.3 n   Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x f  Nx    wattroff.3v   N    
wattron.3v    N./share/man/man3/usleep.3                                                                              755       0      12         3134  4424741406  10272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)usleep.3 1.8 89/03/27 SMI; from UCB 6.3 5/15/86
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH USLEEP 3  "6 October 1987"
.SH NAME
usleep \- suspend execution for interval in microseconds
.SH SYNOPSIS
.nf
.B usleep(useconds)
.B unsigned useconds;
.fi
.SH DESCRIPTION
.IX  "usleep function"  ""  "\fLusleep\fP \(em suspend execution for interval in microseconds"
.IX  "suspend execution for interval in microseconds \(em \fLusleep\fP"
.IX  execution  "suspend for interval in microseconds"
.LP
Suspend the current process for the number
of microseconds specified by the argument.
The actual suspension time may be an arbitrary
amount longer because of other activity in the system,
or because of the time spent in processing the call.
.LP
The routine is implemented by setting an interval timer
and pausing until it occurs.
The previous state of this timer is saved and restored.
If the sleep time exceeds the time to the
expiration of the previous timer,
the process sleeps only until the signal
would have occurred, and the
signal is sent a short time later.
.LP
This routine is implemented using
.B setitimer
(see
.BR getitimer (2));
it requires eight system calls each time it is invoked.
A similar but less compatible function can be obtained with a single
.BR select (2);
it would not restart after signals,
but would not interfere with other uses of
.BR setitimer .
.SH "SEE ALSO"
.BR getitimer (2),
.BR sigpause (2),
.BR alarm (3C),
.BR sleep (3),
.BR ualarm (3)
  xdr_callhdr.3n d  R    xdr_callmsg.3n |  R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n    R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n   Sd    
xdr_inline.3n SL  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S./share/man/man3/utime.3c                                                                              755       0      12         4744  4424741406  10273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)utime.3c 1.13 89/03/27 SMI; from UCB 4.2
.TH UTIME 3C "22 November 1987"
.SH NAME
utime \- set file times
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.LP
.B int utime(file, timep)
.B char \(**file;
.B time_t \(**timep;
.fi
.IX  utime ""  "\fLutime\fP \(em set file times"
.IX  "file system"  utime  ""  "\fLutime\fP \(em set file times"
.IX  "change" "file access times \(em \fLutime\fP"
.IX  "access times of file, change \(em \fLutime\fP"
.SH DESCRIPTION
.B utime(\|)
sets the access and modification times of the file named by
.IR file .
.LP
If the
.I timep
argument is
.SM NULL\s0,
the access and modification times are set to the
current time.  A process must be the owner of
the file or have write permission for the file to use
.B utime(\|)
in this manner.
.LP
If the
.I timep
argument is not
.SM NULL\s0,
it is assumed to point to an array of two
.B time_t
values.  The access time is set to the value of the first member,
and the modification time is set to the value of the second member.
The times contained in that array
are measured in seconds since 00:00:00
.SM GMT
Jan 1, 1970.
Only the owner of the file or the super-user may use
.B utime(\|)
in this manner.
.LP
In either case, the ``inode-changed'' time of the file
is set to the current time.
.SH RETURN VALUE
Upon successful completion a value of 0 is returned.  Otherwise, a value
of \-1 is returned and
.B errno
is set to indicate the error.
.SH ERRORS
.B utime(\|)
will fail if one or more of the following are true:
.TP 20
.SM ENOTDIR
A component of the path prefix of
.I file
is not a directory.
.TP
.SM ENAMETOOLONG
The length of a component of
.I file
exceeds 255 characters, or the length of
.I file
exceeds 1023 characters.
.TP
.SM ENOENT
The file referred to by
.I file
does not exist.
.TP
.SM EACCESS
Search permission is denied for a component of the path prefix of
.IR file .
.TP
.SM ELOOP
Too many symbolic links were encountered in translating
.IR file .
.TP
.SM EPERM
The effective user
.SM ID
of the process is not super-user and not the owner of the
file, and
.I timep
is not
.SM NULL\s0.
.TP
.SM EACCESS
The effective user
.SM ID
is not super-user and not the owner of the file, write permission
is denied for the file, and
.I timep
is
.SM NULL\s0.
.TP
.SM EIO
An I/O error occurred while reading from or writing to the file system.
.TP
.SM EROFS
The file system containing the file is mounted read-only.
.TP
.SM EFAULT
.I file
or
.I timep
points outside the process's allocated address space.
.SH SEE ALSO
.BR stat (2),
.BR utimes (2)
date.3n   V     ypupdate./share/man/man3/valloc.3                                                                              755       0      12           66  4424741406  10216                                                                                                                                                                                                                                                                                                                                                                      .so man3/malloc.3
.\" @(#)valloc.3 1.5 89/03/27 SMI; 
z  	varargs.3 3c  Ml  {  vfprintf.3s   M  |  vfprintf.3v   M  }  	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v f  M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v tf  N<    	waddch.3x g.  NP    
waddstr.3v 3  Nd    
waddstr.3x 3  Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N  ./share/man/man3/values.3                                                                              755       0      12         4226  4424741407  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)values.3 1.7 89/03/27 SMI; from S5
.TH VALUES 3 "6 October 1987"
.SH NAME
values \- machine-dependent values
.SH SYNOPSIS
.B #include <values.h>
.SH DESCRIPTION
.IX values "" "\fLvalues\fR \(em machine-dependent values"
.IX "machine dependent" "" "machine-dependent values \(em \fLvalues\fR"
This file contains a set of manifest constants,
conditionally defined for particular processor architectures.
.LP
The model assumed for integers is binary representation
(one's or two's complement),
where the sign is represented by the value of the high-order bit.
.TP 20
.RI \s-1BITS\s0( type )
The number of bits in a specified type
(for instance, int).
.TP
.SM HIBITS
The value of a short integer with only the high-order bit set
(in most implementations, 0x8000).
.TP
.SM HIBITL
The value of a long integer with only the high-order bit set
(in most implementations, 0x80000000).
.TP
.SM HIBITI
The value of a regular integer with only the high-order bit set
(usually the same as
\s-1HIBITS\s0
or
\s-1HIBITL\s0).
.TP
.SM MAXSHORT
The maximum value of a signed short integer
(in most implementations, 0x7FFF \(== 32767).
.TP
.SM MAXLONG
The maximum value of a signed long integer
(in most implementations, 0x7FFFFFFF \(== 2147483647).
.TP
.SM MAXINT
The maximum value of a signed regular integer
(usually the same as
\s-1MAXSHORT\s0
or
\s-1MAXLONG\s0).
.TP
.SM MAXFLOAT
.TP
.SM LN_MAXFLOAT
The maximum value of a single-precision floating-point number,
and its natural logarithm.
.TP
.SM MAXDOUBLE
.TP
.SM LN_MAXDOUBLE
The maximum value of a double-precision floating-point number,
and its natural logarithm.
.TP
.SM MINFLOAT
.TP
.SM LN_MINFLOAT
The minimum positive value of a single-precision floating-point number,
and its natural logarithm.
.TP
.SM MINDOUBLE
.TP
.SM LN_MINDOUBLE
The minimum positive value of a double-precision floating-point number,
and its natural logarithm.
.TP
.SM FSIGNIF
The number of significant bits in the mantissa of a single-precision
floating-point number.
.TP
.SM DSIGNIF
The number of significant bits in the mantissa of a double-precision
floating-point number.
.SH FILES
.PD 0
.TP 20
.B /usr/include/values.h
.PD
.SH "SEE ALSO"
.BR intro (3),
.BR intro (3M)
 	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_./share/man/man3/varargs.3                                                                             755       0      12        10301  4424741407  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)varargs.3 1.18 89/03/27 SMI; from UCB 4.2 and S5
.TH VARARGS 3  "22 March 1989"
.SH NAME
varargs \- handle variable argument list
.SH SYNOPSIS
.B #include <varargs.h>
.LP
.B function(va_alist) va_dcl
.LP
.B va_list pvar;
.LP
.B va_start(pvar);
.LP
.B f = va_arg(pvar, type);
.LP
.B va_end(pvar);
.IX  "varargs function"  ""  "\fLvarargs\fP \(em variable argument list"
.IX  "va_start function"  ""  "\fLva_start\fP \(em initialize varargs"
.IX  "va_arg function"  ""  "\fLva_arg\fP \(em next argument in variable list"
.IX  "va_end function"  ""  "\fLva_end\fP \(em finish variable argument list"
.IX  "va_dcl"  ""  "\fLva_dcl\fP \(em variable argument declarations"
.IX  "va_list"  ""  "\fLva_list\fP \(em variable argument declarations"
.IX  "variable argument list, \(em \fLvarargs\fR"
.IX  "argument lists, varying length \(em \fLvarargs\fR"
.SH DESCRIPTION
This set of macros provides a means of writing
portable procedures that
accept variable argument lists.
Routines having variable argument lists (such as
.BR printf (3S))
but do not use
.B varargs(\|)
are inherently nonportable, since different
machines use different argument passing conventions.
Routines with variable arguments lists
.I must
use
.B varargs(\|)
functions in order to run correctly on
Sun-4 systems.
.LP
.B va_alist
is used in a function header to declare a variable argument list.
.LP
.B va_dcl
is a declaration for
.BR va_alist .
No semicolon should follow
.BR va_dcl .
.LP
.B va_list
is a type defined for the variable
used to traverse the list.
One such variable must always be declared.
.LP
.B va_start\c
.RI ( pvar )
is called to initialize
.I pvar
to the beginning of the list.
.LP
.B va_arg\c
.RI ( pvar ,
.IR type )
will return the next argument in the list pointed to by
.IR pvar .
The parameter
.I type
is a type name such that the type of a pointer
to an object that has the specified type can be
obtained simply by appending a
.B \(**
to
.IR type .
If
.I type
disagrees with the type of the actual next argument
(as promoted according to the default argument
promotions), the behavior is undefined.
.LP
In standard C, arguments that are
.B char
or
.B short
are converted to
.B int
and should be accessed as
.BR int ,
arguments that are
.B unsigned char
or
.B unsigned short
are converted to
.B unsigned int
and should be accessed as
.BR "unsigned int" ,
and arguments that are
.B float
are converted to
.B double
and should be accessed as
.BR double .
Different types can be mixed, but it is up
to the routine to know what type of argument is
expected, since it cannot be determined at runtime.
.LP
.B va_end\c
.RI ( pvar )
is used to finish up.
.LP
Multiple traversals, each bracketed by
.B va_start
\&.\|.\|.
.BR va_end ,
are possible.
.LP
.B va_alist
must encompass the entire arguments list.
This insures that a
.B #define
statement can be used to redefine or expand its value.
.LP
The argument list (or its remainder)
can be passed to another
function using a pointer to a variable of type
.BR va_list \(em
in which case a call to
.B va_arg
in the subroutine advances the argument-list pointer with
respect to the caller as well.
.br
.if t .ne 20
.SH EXAMPLE
This example is a possible implementation of
.BR execl (3).
.RS
.nf
.ft B
#include <varargs.h>
#define \s-1MAXARGS\s0	100
.sp .5
/\(**	execl is called by
\(**	execl(file, arg1, arg2, .\|.\|., (char \(**)0);
\(**/
execl (va_alist)
va_dcl
{
	va_list ap;
	char \(**file;
	char \(**args[\s-1MAXARGS\s0];
	int argno = 0;
.sp .5
	va_start (ap);
	file = va_arg(ap, char \(**);
	while ((args[argno++] = va_arg(ap, char \(**)) != (char \(**)0)
		;
 	va_end (ap);
	return execv(file, args);
}
.ft R
.fi
.RE
.SH SEE ALSO
.BR execl (3),
.BR printf (3S)
.SH BUGS
It is up to the calling routine to specify
how many arguments there are, since it is not
possible to determine this from the
stack frame.  For example,
.B execl(\|)
is passed a zero pointer to signal the end of the list.
.B printf(\|)
can tell how many arguments are supposed to
be there by the format.
.LP
The macros
.B va_start
and
.B va_end
may be arbitrarily complex; for example,
.B va_start
might contain an opening brace,
which is closed by a matching brace in
.BR va_end .
Thus, they should only be used where they could
be placed within a single complex statement.

STRING\s0	3		/* char, newline, eos */
.sp .5
char string_space[\s-1MAXSTRING\s0];		/* space to store strings */
struct node node_space[\s-1MAXNODES\s0];	/* nodes to store */
struct node *root = \s-1NULL\s0;		/* this points to the root */
.sp .5
main(\|)
{
	char *strptr = string_space;
	int maxstrlen = \s-1MAXSTRING\s0./share/man/man3/vfprintf.3s                                                                           755       0      12           72  4424741407  10755                                                                                                                                                                                                                                                                                                                                                                      .so man3/vprintf.3s
.\" @(#)vfprintf.3s 1.4 89/03/27 SMI;
 	vlimit.3c v   M  ~  
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x f  Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v./share/man/man3/vfprintf.3v                                                                           755       0      12           72  4424741407  10760                                                                                                                                                                                                                                                                                                                                                                      .so man3/vprintf.3v
.\" @(#)vfprintf.3v 1.4 89/03/27 SMI;
 
vprintf.3s    M    
vprintf.3v    M    vsprintf.3s   M    vsprintf.3v   N     	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeo./share/man/man3/vlimit.3c                                                                             755       0      12         5512  4424741407  10447                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vlimit.3c 1.12 89/03/27 SMI; from UCB 4.2
.TH VLIMIT 3C "6 October 1987"
.SH NAME
vlimit \- control maximum system resource consumption
.SH SYNOPSIS
.B "#include <sys/vlimit.h>"
.LP
.B vlimit(resource, value)
.B int resource, value;
.IX  "control resource consumption"  ""  "control resource consumption \(em \fLvlimit\fP"
.IX  "system resource consumption"  control  "system resource consumption"  "control \(em \fLvlimit\fP"
.IX  "resource consumption, control \(em \fLvlimit\fP"
.IX  "vlimit function"  ""  "\fLvlimit\fP \(em control consumption"
.SH DESCRIPTION
.LP
.B
This facility is superseded by getrlimit(2).
.LP
Limits the consumption by the current process
and each process it creates to not individually exceed
.I value
on the specified
.I resource.
If
.I value
is specified as \-1, then the current limit is
returned and the limit is unchanged.
The resources which are currently controllable are:
.TP 20
.SB LIM_NORAISE
A pseudo-limit; if set non-zero then the limits may
not be raised.  Only the super-user may remove the
.I noraise
restriction.
.TP
.SB LIM_CPU
the maximum
number of
.SM CPU\s0-seconds
to be used by each process
.TP
.SB LIM_FSIZE
the largest single file which can be created
.TP
.SB LIM_DATA
the maximum growth of the data+stack region using
.B sbrk
(see
.BR brk (2))
beyond the end of the program text
.TP
.SB LIM_STACK
the maximum
size of the automatically-extended stack region
.TP
.SB LIM_CORE
the size of the largest core dump that will be created.
.TP
.SB LIM_MAXRSS
a soft limit for the amount of physical memory
(in bytes) to be given to the program.  If memory
is tight, the system will prefer to take memory
from processes which are exceeding their declared
.SB LIM_MAXRSS\s0.
.LP
Because this information is stored in the
per-process information this system call must
be executed directly by the shell if it
is to affect all future processes created by the shell;
.I limit
is thus a built-in command to
.BR csh (1).
.LP
The system refuses to extend the data or stack
space when the limits
would be exceeded in the normal way; a
.I break
call fails if the data space limit is reached,
or the process is killed when the stack limit
is reached (since the stack cannot be
extended, there is no way to send a signal!).
.LP
A file I/O operation which would create a
file which is too large will cause a signal
.SB SIGXFSZ
to be generated, this normally terminates
the process, but may be caught.
When the cpu time limit is exceeded, a signal
.SB SIGXCPU
is sent to the offending process; to allow it
time to process the signal it is
given 5 seconds grace by raising the
.SM CPU
time limit.
.SH SEE ALSO
.BR csh (1),
.BR sh (1),
.BR brk (2)
.SH BUGS
.LP
If
.SB LIM_NORAISE
is set, then no grace should be given when the
.SM CPU
time limit is exceeded.
.LP
There should be
.I limit
and
.I unlimit
commands in
.BR sh (1)
as well as in
.BR csh (1).
 yp.3r .3  S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx  ./share/man/man3/vprintf.3s                                                                            755       0      12         3543  4424741410  10647                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vprintf.3s 1.14 89/03/27 SMI; from S5R2
.TH VPRINTF 3S "22 March 1989"
.SH NAME
vprintf, vfprintf, vsprintf \- print formatted output of a varargs argument list
.SH SYNOPSIS
.nf
.B "#include <stdio.h>"
.B "#include <varargs.h>"
.LP
.B "int vprintf(format, ap)
.B "char \(**format;"
.B "va_list ap;
.LP
.B "int vfprintf(stream, format, ap)
.B "\s-1FILE\s0 \(**stream;"
.B "char \(**format;"
.B "va_list ap;
.LP
.B "char \(**vsprintf(s, format, ap)
.B "char \(**s, \(**format;"
.B "va_list ap;
.fi
.SH DESCRIPTION
.IX "vprintf function" "" "\fLvprintf\fR \(em format and print variable argument list"
.IX "vfprintf function" "" "\fLvfprintf\fR \(em format and print variable argument list"
.IX "vsprintf function" "" "\fLvsprintf\fR \(em format and print variable argument list"
.LP
.BR vprintf ,
.BR vfprintf ,
and
.B vsprintf(\|)
are the same as
.BR printf (3S),
.BR fprintf ,
and
.B sprintf
respectively, except that instead of being
called with a variable number of arguments, they
are called with an argument list as defined by
.BR varargs (3).
.SH EXAMPLE
.LP
The following demonstrates how
.B vfprintf(\|)
could be used to write an error routine.
.RS
.nf
.ft B
#include <stdio.h>
#include <varargs.h>
\&.\|.\|.
	/\(**\ \ error should be called like:
	\(**	error(function_name, format, arg1, arg2.\|.\|.);
	\(**\ \ Note: function_name and format cannot be declared
	\(**\ \ separately because of the definition of varargs.
	\(**/
.sp .5v
/\(**\s-1VARARGS\s00\(**/
void
error (va_alist)
	va_dcl
{
	va_list args;
	char \(**fmt;

	va_start(args);
		/\(** print name of function causing error \(**/
	(void) fprintf(stderr, "\s-1ERROR\s0 in %s: ", va_arg(args, char \(**));
	fmt = va_arg(args, char \(**);
		/\(** print out remainder of message \(**/
	(void) vfprintf(stderr, fmt, args);
	va_end(args);
	(void) abort(\|);
}
.fi
.ft R
.RE
.SH SEE ALSO
.BR printf (3S),
.BR varargs (3)
bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T  ./share/man/man3/vprintf.3v                                                                            755       0      12         3613  4424741410  10650                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vprintf.3v 1.6 89/03/27 SMI; from S5R2
.TH VPRINTF 3V "24 November 1987"
.SH NAME
vprintf, vfprintf, vsprintf \- print formatted output of a varargs argument list
.SH SYNOPSIS
.nf
.B "#include <stdio.h>"
.B "#include <varargs.h>"
.LP
.B "int vprintf(format, ap)
.B "char \(**format;"
.B "va_list ap;
.LP
.B "int vfprintf(stream, format, ap)
.B "\s-1FILE\s0 \(**stream;"
.B "char \(**format;"
.B "va_list ap;
.LP
.B "int vsprintf(s, format, ap)
.B "char \(**s, \(**format;"
.B "va_list ap;
.fi
.SH DESCRIPTION
.IX "vprintf function V" "" "\fLvprintf\fR \(em format and print variable argument list, System V"
.IX "vfprintf function V" "" "\fLvfprintf\fR \(em format and print variable argument list, System V"
.IX "vsprintf function V" "" "\fLvsprintf\fR \(em format and print variable argument list, System V"
.LP
.BR vprintf ,
.BR vfprintf ,
and
.B vsprintf(\|)
are the same as
.BR printf (3V),
.BR fprintf ,
and
.B sprintf 
respectively, except that instead of being
called with a variable number of arguments, they
are called with an argument list as defined by
.BR varargs (3).
.SH EXAMPLE
.LP
The following demonstrates how
.B vfprintf(\|)
could be used to write an error routine.
.RS
.nf
.ft B
#include <stdio.h>
#include <varargs.h>
\&.\|.\|.
	/\(**\ \ error should be called like:
	\(**	error(function_name, format, arg1, arg2.\|.\|.);
	\(**\ \ Note that function_name and format cannot be declared
	\(**\ \ separately because of the definition of varargs.
	\(**/
.sp .5v
/\(**\s-1VARARGS\s00\(**/
void
error (va_alist)
	va_dcl;	
{
	va_list args;
	char \(**fmt;

	va_start(args);
		/\(** print name of function causing error \(**/
	(void) fprintf(stderr, "\s-1ERROR\s0 in %s: ", va_arg(args, char \(**));
	fmt = va_arg(args, char \(**);
		/\(** print out remainder of message \(**/
	(void) vfprintf(stderr, fmt, args);
	va_end(args);
	(void) abort(\|);
}
.fi
.ft R
.RE
.SH SEE ALSO
.BR printf (3V),
.BR varargs (3)
in.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T  ./share/man/man3/vsprintf.3s                                                                           755       0      12           72  4424741410  10764                                                                                                                                                                                                                                                                                                                                                                      .so man3/vprintf.3s
.\" @(#)vsprintf.3s 1.4 89/03/27 SMI;
 	vsyslog.3 v   N    	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    ./share/man/man3/vsprintf.3v                                                                           755       0      12           72  4424741410  10767                                                                                                                                                                                                                                                                                                                                                                      .so man3/vprintf.3v
.\" @(#)vsprintf.3v 1.4 89/03/27 SMI;
 	vtimes.3c v   N(    	waddch.3v v   N<    	waddch.3x v   NP    
waddstr.3v    Nd    
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O  ./share/man/man3/vsyslog.3                                                                             755       0      12         2632  4424741410  10500                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vsyslog.3 1.7 89/03/27 SMI
.TH VSYSLOG 3 "10 October 1987"
.SH NAME
vsyslog \- log message with a varargs argument list
.SH SYNOPSIS
.nf
.B "#include <syslog.h>"
.B "#include <varargs.h>"
.LP
.B "int vsyslog(priority, message, ap)
.B "char \(**message;"
.B "va_list ap;
.fi
.SH DESCRIPTION
.IX vsyslog "" "\fLvprintf\fR \(em log message with variable argument list"
.LP
.B vsyslog(\|)
is the same as
.BR syslog (3)
except that instead of being called with a variable number of
arguments, it is called with an argument list as defined by
.BR varargs (3).
.SH EXAMPLE
The following demonstrates how
.B vsyslog(\|)
could be used to write an error routine.
.RS
.nf
.ft B
#include <syslog.h>
#include <varargs.h>
\&.\|.\|.
	/\(**\ \ error should be called like:
	\(**	error(pri, function_name, format, arg1, arg2.\|.\|.);
	\(**\ \ Note that pri, function_name, and format cannot be declared
	\(**\ \ separately because of the definition of varargs.
	\(**/
.sp .5v
/\(**\s-1VARARGS\s00\(**/
void
error(va_alist)
	va_dcl;	
{
	va_list args;
	int pri;
	char \(**message;

	va_start(args);
	pri = va_arg(args, int);
		/\(** log name of function causing error \(**/
	(void) syslog(pri, "\s-1ERROR\s0 in %s", va_arg(args, char \(**));
	message = va_arg(args, char \(**);
		/\(** log remainder of message \(**/
	(void) vsyslog(pri, fmt, args);
	va_end(args);
	(void) abort(\|);
}
.fi
.ft R
.RE
.SH SEE ALSO
.BR syslog (3),
.BR varargs (3)
v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP./share/man/man3/vtimes.3c                                                                             755       0      12         5214  4424741411  10444                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vtimes.3c 1.11 89/03/27 SMI; from UCB 4.2
.TH VTIMES 3C "6 October 1987"
.SH NAME
vtimes \- get information about resource utilization
.SH SYNOPSIS
.nf
.B "vtimes(par_vm, ch_vm)"
.B "struct vtimes *par_vm, *ch_vm;"
.fi
.IX  get "info on resource usage \(em \fLvtimes\fP"
.IX  "resource usage, get information about \(em \fLvtimes\fP"
.IX  "vtimes function"  ""  "\fLvtimes\fP \(em resource use information"
.SH DESCRIPTION
.B
This facility is superseded by getrusage(2).
.LP
.B vtimes(\|)
returns accounting information for the current
process and for the terminated child processes
of the current process.  Either
.I par_vm
or
.I ch_vm
or both may be 0, in which case only the
information for the pointers
which are non-zero is returned.
.LP
After the call, each buffer contains information
as defined by the contents of the include file
.BR <sys/vtimes.h> :
.RS
.nf
.ft B
struct vtimes {
	int	vm_utime;		/* user time (*HZ) */
	int	vm_stime;		/* system time (*HZ) */
	/* divide next two by utime+stime to get averages */
	unsigned vm_idsrss;		/* integral of d+s rss */
	unsigned vm_ixrss;		/* integral of text rss */
	int	vm_maxrss;		/* maximum rss */
	int	vm_majflt;		/* major page faults */
	int	vm_minflt;		/* minor page faults */
	int	vm_nswap;		/* number of swaps */
	int	vm_inblk;		/* block reads */
	int	vm_oublk;		/* block writes */
};
.ft R
.fi
.RE
.LP
The
.B vm_utime
and
.B vm_stime
fields give the user and system time respectively
in 60ths of a second (or 50ths if that
is the frequency of wall current in your locality.) The
.B vm_idrss
and
.B vm_ixrss
measure memory usage.  They are computed by
integrating the number of memory pages in use each
over cpu time.  They are reported as though computed
discretely, adding the current memory usage (in 512 byte
pages) each time the clock ticks.
If a process used 5 core
pages over 1 cpu-second for its data and stack, then
.B vm_idsrss
would have the value 5*60, where
.B vm_utime+vm_stime
would be the 60.
.B vm_idsrss
integrates data and stack segment usage, while
.B vm_ixrss
integrates text segment usage.
.B vm_maxrss
reports the maximum instantaneous sum of the
text+data+stack core-resident page count.
.LP
The
.B vm_majflt
field gives the number of page faults which
resulted in disk activity; the
.B vm_minflt
field gives the number of page faults incurred
in simulation of reference bits;
.B vm_nswap
is the number of swaps which occurred.  The
number of file system input/output events
are reported in
.B vm_inblk
and
.B vm_oublk
These numbers account only for real
I/O; data supplied by the caching mechanism
is charged only to the first process to
read or write the data.
.SH SEE ALSO
.BR getrusage (2),
.BR wait (2)

\&.\|.\|.
.BR va_end ,
are possible.
.LP
.B va_alist
must encompass the entire arguments list.
This insures that a
.B #define
statement can be used to redefine or expand its value.
.LP
The argument list (or its remainder)
can be passed to another
function using a pointer to a variable of type
.BR va_list \(em
in which case a call to
.B va_arg
in the subroutine advances./share/man/man3/waddch.3v                                                                             755       0      12           67  4424741411  10353                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)waddch.3v 1.4 89/03/27 SMI;
  
waddstr.3v    Nd    
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O  ./share/man/man3/waddch.3x                                                                             755       0      12           70  4424741411  10347                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)waddch.3x 1.5 89/03/27 SMI; 
  
waddstr.3x    Nx    wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O  ./share/man/man3/waddstr.3v                                                                            755       0      12           70  4424741411  10563                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)waddstr.3v 1.4 89/03/27 SMI;
  wattroff.3v   N    
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P   ./share/man/man3/waddstr.3x                                                                            755       0      12           71  4424741411  10566                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)waddstr.3x 1.5 89/03/27 SMI; 
 
wattron.3v    N    wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P  ./share/man/man3/wattroff.3v                                                                           755       0      12           71  4424741412  10751                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wattroff.3v 1.4 89/03/27 SMI;
 wattrset.3v   N    	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(  ./share/man/man3/wattron.3v                                                                            755       0      12           70  4424741412  10612                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wattron.3v 1.4 89/03/27 SMI;
  	wclear.3v v   N    	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<  ./share/man/man3/wattrset.3v                                                                           755       0      12           71  4424741412  10772                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wattrset.3v 1.4 89/03/27 SMI;
 	wclear.3x v   N    wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<    	winsch.3v    PP  ./share/man/man3/wclear.3v                                                                             755       0      12           67  4424741412  10377                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wclear.3v 1.4 89/03/27 SMI;
  wclrtobot.3v  N  N    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<    	winsch.3v    PP    	winsch.3x    Ph  ./share/man/man3/wclear.3x                                                                             755       0      12           70  4424741412  10373                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wclear.3x 1.5 89/03/27 SMI; 
    wclrtobot.3x  N  O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<    	winsch.3v    PP    	winsch.3x    Ph    winsertln.3v  Ph  P./share/man/man3/wclrtobot.3v                                                                          755       0      12           72  4424741413  11136                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wclrtobot.3v 1.4 89/03/27 SMI;
O    wclrtoeol.3v  O  O(    wclrtoeol.3x  O(  O<    	wdelch.3v O(  OP    	wdelch.3x O(  Oh    wdeleteln.3v  Oh  O    wdeleteln.3x  O  O    	werase.3v O  O    	werase.3x O  O    	wgetch.3v O  O    	wgetch.3x O  O    
wgetstr.3v   P     
wgetstr.3x   P    winch.3v x   P(    winch.3x x   P<    	winsch.3v    PP    	winsch.3x    Ph    winsertln.3v  Ph  P    winsertln.3x  P./share/man/man3/wclrtobot.3x                                                                          755       0      12           73  4424741413  11141                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wclrtobot.3x 1.5 89/03/27 SMI; 
(    wclrtoeol.3x  O  O<    	wdelch.3v 3x  OP    	wdelch.3x .3  Oh    wdeleteln.3v  O(  O    wdeleteln.3x  Oh  O    	werase.3v 3x  O    	werase.3x .3  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v     P    winsertln.3x  Ph  P    wmove.3v .3x  P./share/man/man3/wclrtoeol.3v                                                                          755       0      12           72  4424741413  11131                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wclrtoeol.3v 1.4 89/03/27 SMI;
O<    	wdelch.3v 3x  OP    	wdelch.3x .3  Oh    wdeleteln.3v  .3  O    wdeleteln.3x  O(  O    	werase.3v 3x  O    	werase.3x .3  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v  .3  P    winsertln.3x     P    wmove.3v .3x  P    wmove.3x .3v  P  ./share/man/man3/wclrtoeol.3x                                                                          755       0      12           73  4424741413  11134                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wclrtoeol.3x 1.5 89/03/27 SMI; 
  	wdelch.3x .3  Oh    wdeleteln.3v  .3  O    wdeleteln.3x  .3  O    	werase.3v 3x  O    	werase.3x .3  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v  .3  P    winsertln.3x  .3  P    wmove.3v .3x  P    wmove.3x .3v  P    wnoutrefresh.3v   P  ./share/man/man3/wdelch.3v                                                                             755       0      12           67  4424741413  10371                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wdelch.3v 1.4 89/03/27 SMI;
  wdeleteln.3v  .3  O    wdeleteln.3x  .3  O    	werase.3v 3x  O    	werase.3x .3  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v  .3  P    winsertln.3x  .3  P    wmove.3v .3x  P    wmove.3x .3v  P    wnoutrefresh.3v   P    
wprintw.3v h  P    
./share/man/man3/wdelch.3x                                                                             755       0      12           70  4424741413  10365                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wdelch.3x 1.5 89/03/27 SMI; 
    wdeleteln.3x  O  O    	werase.3v .3  O    	werase.3x 3x  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x 3  P    winch.3v x .  P(    winch.3x tr.  P<    	winsch.3v 3v  PP    	winsch.3x 3x  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  .3  P    wmove.3x .3x  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x h  P    ./share/man/man3/wdeleteln.3v                                                                          755       0      12           72  4424741414  11103                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wdeleteln.3v 1.4 89/03/27 SMI;
O    	werase.3v O  O    	werase.3x .3  O    	wgetch.3v 3x  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x 3  P    winch.3v x 3  P(    winch.3x x .  P<    	winsch.3v r.  PP    	winsch.3x 3v  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  .3  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    ./share/man/man3/wdeleteln.3x                                                                          755       0      12           73  4424741414  11106                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wdeleteln.3x 1.5 89/03/27 SMI; 
  	werase.3x .3  O    	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v  3v  P    winsertln.3x  Ph  P    wmove.3v .3x  P    wmove.3x .3v  P    wnoutrefresh.3v   P    
wprintw.3v h  P    
wprintw.3x .  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wsca./share/man/man3/werase.3v                                                                             755       0      12           67  4424741414  10412                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)werase.3v 1.4 89/03/27 SMI;
  	wgetch.3v .3  O    	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x .  P    winch.3v tr.  P(    winch.3x .3v  P<    	winsch.3v 3x  PP    	winsch.3x .3  Ph    winsertln.3v  .3  P    winsertln.3x  3v  P    wmove.3v .3x  P    wmove.3x .3v  P    wnoutrefresh.3v   P    
wprintw.3v h  P    
wprintw.3x .  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v sh  Q8    	wscanw.3./share/man/man3/werase.3x                                                                             755       0      12           70  4424741414  10406                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)werase.3x 1.5 89/03/27 SMI; 
  	wgetch.3x .3  O    
wgetstr.3v 3  P     
wgetstr.3x 3  P    winch.3v x .  P(    winch.3x tr.  P<    	winsch.3v 3v  PP    	winsch.3x 3x  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  3v  P    wmove.3x .3x  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x h  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x sh  QP    
wsetscrr./share/man/man3/wgetch.3v                                                                             755       0      12           67  4424741414  10405                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wgetch.3v 1.4 89/03/27 SMI;
  
wgetstr.3v 3  P     
wgetstr.3x 3  P    winch.3v x 3  P(    winch.3x x .  P<    	winsch.3v r.  PP    	winsch.3x 3v  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  3v  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wsta./share/man/man3/wgetch.3x                                                                             755       0      12           70  4424741415  10402                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wgetch.3x 1.5 89/03/27 SMI; 
  
wgetstr.3x 3  P    winch.3v x 3  P(    winch.3x x 3  P<    	winsch.3v  .  PP    	winsch.3x r.  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    ./share/man/man3/wgetstr.3v                                                                            755       0      12           70  4424741415  10616                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wgetstr.3v 1.4 89/03/27 SMI;
  winch.3v x 3  P(    winch.3x x 3  P<    	winsch.3v  3  PP    	winsch.3x  .  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q  ./share/man/man3/wgetstr.3x                                                                            755       0      12           71  4424741415  10621                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wgetstr.3x 1.5 89/03/27 SMI; 
 winch.3x x 3  P<    	winsch.3v  3  PP    	winsch.3x  3  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q./share/man/man3/winch.3v                                                                              755       0      12           66  4424741415  10234                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)winch.3v 1.4 89/03/27 SMI;
  	winsch.3v  3  PP    	winsch.3x  3  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q./share/man/man3/winch.3x                                                                              755       0      12           67  4424741415  10237                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)winch.3x 1.5 89/03/27 SMI; 
  	winsch.3x  3  Ph    winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q./share/man/man3/winsch.3v                                                                             755       0      12           67  4424741416  10421                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)winsch.3v 1.4 89/03/27 SMI;
  winsertln.3v  Ph  P    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R ./share/man/man3/winsch.3x                                                                             755       0      12           70  4424741416  10415                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)winsch.3x 1.5 89/03/27 SMI; 
    winsertln.3x  P  P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_rep./share/man/man3/winsertln.3v                                                                          755       0      12           72  4424741416  11147                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)winsertln.3v 1.4 89/03/27 SMI;
P    wmove.3v  P  P    wmove.3x  P  P    wnoutrefresh.3v   P    
wprintw.3v    P    
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_./share/man/man3/winsertln.3x                                                                          755       0      12           73  4424741416  11152                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)winsertln.3x 1.5 89/03/27 SMI; 
  wmove.3x .3v  P    wnoutrefresh.3v   P    
wprintw.3v h  P    
wprintw.3x .  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v sh  Q8    	wscanw.3x .3  QP    
wsetscrreg.3v x   Qh    wstandend.3v  QP  Q    wstandend.3x  Qh  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n     R8   $ xdr_./share/man/man3/wmove.3v                                                                              755       0      12           66  4424741416  10262                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wmove.3v 1.4 89/03/27 SMI;
  wnoutrefresh.3v   P    
wprintw.3v h  P    
wprintw.3x .  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v sh  Q8    	wscanw.3x .3  QP    
wsetscrreg.3v .3  Qh    wstandend.3v  x   Q    wstandend.3x  QP  Q    wstandout.3v  Qh  Q    wstandout.3x  Q  Q    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n    R8   $ xdr_authunix_parms.3n   RL  ./share/man/man3/wmove.3x                                                                              755       0      12           67  4424741417  10266                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wmove.3x 1.5 89/03/27 SMI; 
    
wprintw.3v    P    
wprintw.3x h  P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x sh  QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd  ./share/man/man3/wnoutrefresh.3v                                                                       755       0      12           75  4424741417  11661                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wnoutrefresh.3v 1.4 89/03/27 SMI;
 
wprintw.3x    P    wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|./share/man/man3/wprintw.3v                                                                            755       0      12           70  4424741417  10633                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wprintw.3v 1.4 89/03/27 SMI;
  wrefresh.3v   Q    wrefresh.3x   Q$    	wscanw.3v sh  Q8    	wscanw.3x .3  QP    
wsetscrreg.3v x   Qh    wstandend.3v  QP  Q    wstandend.3x  Qh  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n     R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n d  R./share/man/man3/wprintw.3x                                                                            755       0      12           71  4424741417  10636                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wprintw.3x 1.5 89/03/27 SMI; 
 wrefresh.3x   Q$    	wscanw.3v x   Q8    	wscanw.3x sh  QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n ./share/man/man3/wrefresh.3v                                                                           755       0      12           72  4424741417  10750                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wrefresh.3v 1.6 89/03/27 SMI; 
 	wscanw.3v x   Q8    	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n ./share/man/man3/wrefresh.3x                                                                           755       0      12           72  4424741420  10744                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wrefresh.3x 1.5 89/03/27 SMI; 
 	wscanw.3x x   QP    
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy../share/man/man3/wscanw.3v                                                                             755       0      12           70  4424741420  10415                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wscanw.3v 1.6 89/03/27 SMI; 
  
wsetscrreg.3v QP  Qh    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_doub./share/man/man3/wscanw.3x                                                                             755       0      12           70  4424741420  10417                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wscanw.3x 1.5 89/03/27 SMI; 
    wstandend.3v  Qh  Q    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_double.3n R  R    xdr_./share/man/man3/wsetscrreg.3v                                                                         755       0      12           74  4424741420  11307                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wsetscrreg.3v 1.6 89/03/27 SMI; 
    wstandend.3x  Q  Q    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r Q  Q    xdr.3n 3  R    $ xdr_accepted_reply.3n    R    xdr_array.3n  R  R8   $ xdr_authunix_parms.3n    RL    xdr_bool.3n   Rd    xdr_bytes.3n  Rd  R|    xdr_callhdr.3n |  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_double.3n R  R    xdr_enum.3n   S    xdr_./share/man/man3/wstandend.3v                                                                          755       0      12           73  4424741421  11106                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wstandend.3v 1.6 89/03/27 SMI; 
    wstandout.3v  Q  Q    wstandout.3x  Q  Q    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n     R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n d  R    xdr_callmsg.3n |  R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n    R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_./share/man/man3/wstandend.3x                                                                          755       0      12           73  4424741421  11110                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wstandend.3x 1.5 89/03/27 SMI; 
    wstandout.3x  Q  Q    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n    R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n    R    xdr_callmsg.3n d  R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n     R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_func./share/man/man3/wstandout.3v                                                                          755       0      12           73  4424741421  11147                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3v
.\" @(#)wstandout.3v 1.6 89/03/27 SMI; 
    	xcrypt.3r 3x  Q    xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n    R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n    R    xdr_callmsg.3n    R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n     R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_./share/man/man3/wstandout.3x                                                                          755       0      12           73  4424741421  11151                                                                                                                                                                                                                                                                                                                                                                      .so man3/curses.3x
.\" @(#)wstandout.3x 1.5 89/03/27 SMI; 
  xdr.3n y  R    $ xdr_accepted_reply.3n   R    xdr_array.3n    R8   $ xdr_authunix_parms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n 3n   R|    xdr_callhdr.3n    R    xdr_callmsg.3n    R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n     R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n S4  Sd    
xdr_./share/man/man3/xcrypt.3r                                                                             755       0      12         2250  4424741421  10503                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xcrypt.3r 1.6 89/03/27 SMI;
.TH XCRYPT 3  "6 October 1987"
.SH NAME
xcrypt, xdecrypt, passwd2des \- hex encryption and utility routines
.SH SYNOPSIS
.nf
.B xencrypt(data, key)
.B	char *data;
.B	char *key;
.LP
.B xdecrypt(data, key)
.B	char *data;
.B	char *key;
.LP
.B passwd2des(pass, key)
.B	char *pass;
.B	char *key;
.fi
.SH DESCRIPTION
.IX "xcrypt function" "" "\fLxcrypt()\fP function"
.IX "xdecrypt function" "" "\fLxdecrypt()\fP function"
.IX "passwd2des function" "" "\fLpasswd2des()\fP function"
.LP
The routines
.B xencrypt
and
.B xdecrypt
take
.SM NULL\s0-terminated
hexadecimal strings as arguments, and encrypt them
using the 8-byte
.I key
as input to the
.SM DES
algorithm. The input strings must have a length that
is a multiple on 16 hex digits (64 bits is the
.SM DES
block size).
.LP
.B passwd2des
converts a password, of arbitrary length, into an 8-byte
.SM DES
key, with odd-parity set in the low bit of
each byte. The high-order bit of each
input byte is ignored.
.LP
These routines are used by the
.SM DES
authentication subsystem for encrypting
and decrypting the secret keys stored in
the publickey database.
.SH "SEE ALSO"
.BR des_crypt (3),
.BR publickey (5)
ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n r   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V   ./share/man/man3/xdr.3n                                                                                755       0      12        34340  4424741422   7771                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xdr.3n 1.20 89/03/27 SMI; new on release 3.0
.TH XDR 3N "16 February 1988"
.SH NAME
xdr \- library routines for external data representation
.SH SYNOPSIS AND DESCRIPTION
.IX "xdr networking functions"  "" "\fLxdr\fP networking functions"
.LP
These routines allow C programmers to describe
arbitrary data structures in a machine-independent fashion.
Data for remote procedure calls are transmitted using these
routines.
.LP
.ft B
.nf
.sp .5
xdr_array(xdrs, arrp, sizep, maxsize, elsize, elproc)
\s-1XDR\s0 *xdrs;
char **arrp;
u_int *sizep, maxsize, elsize;
xdrproc_t elproc;
.fi
.ft R
.IP
A filter primitive that translates between variable-length
arrays
and their corresponding external representations. The
parameter
.I arrp
is the address of the pointer to the array, while
.I sizep
is the address of the element count of the array;
this element count cannot exceed
.IR maxsize .
The parameter
.I elsize
is the
.I sizeof
each of the array's elements, and
.I elproc
is an
.SM XDR
filter that translates between
the array elements' C form, and their external
representation.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdr_bool(xdrs, bp)
\s-1XDR\s0 *xdrs;
bool_t *bp;
.fi
.ft R
.IP
A filter primitive that translates between booleans (C
integers)
and their external representations. When encoding data, this
filter produces values of either one or zero.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
xdr_bytes(xdrs, sp, sizep, maxsize)
\s-1XDR\s0 *xdrs;
char **sp;
u_int *sizep, maxsize;
.fi
.ft R
.IP
A filter primitive that translates between counted byte
strings and their external representations.
The parameter
.I sp
is the address of the string pointer. The length of the
string is located at address
.IR sizep ;
strings cannot be longer than
.IR maxsize .
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_char(xdrs, cp)
\s-1XDR\s0 *xdrs;
char *cp;
.fi
.ft R
.IP
A filter primitive that translates between C characters
and their external representations.
This routine returns one if it succeeds, zero otherwise.
Note: encoded characters are not packed, and occupy 4 bytes
each. For arrays of characters, it is worthwhile to
consider
.BR xdr_bytes(\|) ,
.B xdr_opaque(\|)
or
.BR xdr_string(\|) .
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
void
xdr_destroy(xdrs)
\s-1XDR\s0 *xdrs;
.fi
.ft R
.IP
A macro that invokes the destroy routine associated with the
.SM XDR
stream,
.IR xdrs .
Destruction usually involves freeing private data structures
associated with the stream.  Using
.I xdrs
after invoking
.B xdr_destroy(\|)
is undefined.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_double(xdrs, dp)
\s-1XDR\s0 *xdrs;
double *dp;
.fi
.ft R
.IP
A filter primitive that translates between C
.B double
precision numbers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_enum(xdrs, ep)
\s-1XDR\s0 *xdrs;
enum_t *ep;
.fi
.ft R
.IP
A filter primitive that translates between C
.BR enum s
(actually integers) and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdr_float(xdrs, fp)
\s-1XDR\s0 *xdrs;
float *fp;
.fi
.ft R
.IP
A filter primitive that translates between C
.BR float s
and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
void
xdr_free(proc, objp)
xdrproc_t proc;
char *objp;
.fi
.ft R
.IP
Generic freeing routine. The first argument is the
.SM XDR
routine for the object being freed. The second argument
is a pointer to the object itself. Note: the pointer passed
to this routine is
.I not
freed, but what it points to
.I is
freed (recursively).
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
u_int
xdr_getpos(xdrs)
\s-1XDR\s0 *xdrs;
.fi
.ft R
.IP
A macro that invokes the get-position routine
associated with the
.SM XDR
stream,
.IR xdrs .
The routine returns an unsigned integer,
which indicates the position of the
.SM XDR
byte stream.
A desirable feature of
.SM XDR
streams is that simple arithmetic works with this number,
although the
.SM XDR
stream instances need not guarantee this.
.br
.if t .ne 4
.LP
.ft B
.nf
.sp .5
.br
long *
xdr_inline(xdrs, len)
\s-1XDR\s0 *xdrs;
int len;
.fi
.ft R
.IP
A macro that invokes the in-line routine associated with the
.SM XDR
stream,
.IR xdrs .
The routine returns a pointer
to a contiguous piece of the stream's buffer;
.I len
is the byte length of the desired buffer.
Note: pointer is cast to
.BR "long *" .
.IP
Warning:
.B xdr_inline(\|)
may return
.SM NULL
(0)
if it cannot allocate a contiguous piece of a buffer.
Therefore the behavior may vary among stream instances;
it exists for the sake of efficiency.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_int(xdrs, ip)
\s-1XDR\s0 *xdrs;
int *ip;
.fi
.ft R
.IP
A filter primitive that translates between C integers
and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_long(xdrs, lp)
\s-1XDR\s0 *xdrs;
long *lp;
.fi
.ft R
.IP
A filter primitive that translates between C
.B long
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 12
.LP
.ft B
.nf
.sp .5
void
xdrmem_create(xdrs, addr, size, op)
\s-1XDR\s0 *xdrs;
char *addr;
u_int size;
enum xdr_op op;
.fi
.ft R
.IP
This routine initializes the
.SM XDR
stream object pointed to by
.IR xdrs .
The stream's data is written to, or read from,
a chunk of memory at location
.I addr
whose length is no more than
.I size
bytes long.  The
.I op
determines the direction of the
.SM XDR
stream
(either
.BR \s-1XDR_ENCODE\s0 ,
.BR \s-1XDR_DECODE\s0 ,
or
.BR \s-1XDR_FREE\s0 ).
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
xdr_opaque(xdrs, cp, cnt)
\s-1XDR\s0 *xdrs;
char *cp;
u_int cnt;
.fi
.ft R
.IP
A filter primitive that translates between fixed size opaque
data
and its external representation.
The parameter
.I cp
is the address of the opaque object, and
.I cnt
is its size in bytes.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
xdr_pointer(xdrs, objpp, objsize, xdrobj)
\s-1XDR\s0 *xdrs;
char **objpp;
u_int objsize;
xdrproc_t xdrobj;
.fi
.ft R
.IP
Like
.B xdr_reference(\|)
execpt that it serializes
.SM NULL
pointers, whereas
.B xdr_reference(\|)
does not.  Thus,
.B xdr_pointer(\|)
can represent
recursive data structures, such as binary trees or
linked lists.
.br
.if t .ne 15
.LP
.ft B
.nf
.sp .5
void
xdrrec_create(xdrs, sendsize, recvsize, handle, readit, writeit)
\s-1XDR\s0 *xdrs;
u_int sendsize, recvsize;
char *handle;
int (*readit) (\|), (*writeit) (\|);
.fi
.ft R
.IP
This routine initializes the
.SM XDR
stream object pointed to by
.IR xdrs .
The stream's data is written to a buffer of size
.IR sendsize ;
a value of zero indicates the system should use a suitable
default. The stream's data is read from a buffer of size
.IR recvsize ;
it too can be set to a suitable default by passing a zero
value.
When a stream's output buffer is full,
.I writeit
is called.  Similarly, when a stream's input buffer is empty,
.I readit
is called.  The behavior of these two routines is similar to
the
system calls
.B read
and
.BR write ,
except that
.I handle
is passed to the former routines as the first parameter.
Note: the
.SM XDR
stream's
.I op
field must be set by the caller.
.IP
Warning: this
.SM XDR
stream implements an intermediate record stream.
Therefore there are additional bytes in the stream
to provide record boundary information.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
xdrrec_endofrecord(xdrs, sendnow)
\s-1XDR\s0 *xdrs;
int sendnow;
.fi
.ft R
.IP
This routine can be invoked only on
streams created by
.BR xdrrec_create(\|) .
The data in the output buffer is marked as a completed
record,
and the output buffer is optionally written out if
.I sendnow
is non-zero. This routine returns one if it succeeds, zero
otherwise.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdrrec_eof(xdrs)
\s-1XDR\s0 *xdrs;
int empty;
.fi
.ft R
.IP
This routine can be invoked only on
streams created by
.BR xdrrec_create(\|) .
After consuming the rest of the current record in the stream,
this routine returns one if the stream has no more input,
zero otherwise.
.br
.if t .ne 3
.LP
.ft B
.nf
.sp .5
xdrrec_skiprecord(xdrs)
\s-1XDR\s0 *xdrs;
.fi
.ft R
.IP
This routine can be invoked only on
streams created by
.BR xdrrec_create(\|) .
It tells the
.SM XDR
implementation that the rest of the current record
in the stream's input buffer should be discarded.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 11
.LP
.ft B
.nf
.sp .5
xdr_reference(xdrs, pp, size, proc)
\s-1XDR\s0 *xdrs;
char **pp;
u_int size;
xdrproc_t proc;
.fi
.ft R
.IP
A primitive that provides pointer chasing within structures.
The parameter
.I pp
is the address of the pointer;
.I size
is the
.I sizeof
the structure that
.I *pp
points to; and
.I proc
is an
.SM XDR
procedure that filters the structure
between its C form and its external representation.
This routine returns one if it succeeds, zero otherwise.
.IP
Warning: this routine does not understand
.SM NULL
pointers. Use
.B xdr_pointer(\|)
instead.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
xdr_setpos(xdrs, pos)
\s-1XDR\s0 *xdrs;
u_int pos;
.fi
.ft R
.IP
A macro that invokes the set position routine associated with
the
.SM XDR
stream
.IR xdrs .
The parameter
.I pos
is a position value obtained from
.BR xdr_getpos(\|) .
This routine returns one if the
.SM XDR
stream could be repositioned,
and zero otherwise.
.IP
Warning: it is difficult to reposition some types of
.SM XDR
streams, so this routine may fail with one
type of stream and succeed with another.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdr_short(xdrs, sp)
\s-1XDR\s0 *xdrs;
short *sp;
.fi
.ft R
.IP
A filter primitive that translates between C
.B short
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
void
xdrstdio_create(xdrs, file, op)
\s-1XDR\s0 *xdrs;
\s-1FILE\s0 *file;
enum xdr_op op;
.fi
.ft R
.IP
This routine initializes the
.SM XDR
stream object pointed to by
.IR xdrs .
The
.SM XDR
stream data is written to, or read from, the Standard
.B I/O
stream
.IR file .
The parameter
.I op
determines the direction of the
.SM XDR
stream (either
.BR \s-1XDR_ENCODE\s0 ,
.BR \s-1XDR_DECODE\s0 ,
or
.BR \s-1XDR_FREE\s0 ).
.IP
Warning: the destroy routine associated with such
.SM XDR
streams calls
.B fflush(\|)
on the
.I file
stream, but never
.BR fclose(\|) .
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
xdr_string(xdrs, sp, maxsize)
\s-1XDR\s0
*xdrs;
char **sp;
u_int maxsize;
.fi
.ft R
.IP
A filter primitive that translates between C strings and
their
corresponding external representations.
Strings cannot be longer than
.IR maxsize .
Note: 
.I sp
is the address of the string's pointer.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
xdr_u_char(xdrs, ucp)
\s-1XDR\s0 *xdrs;
unsigned char *ucp;
.fi
.ft R
.IP
A filter primitive that translates between
.B unsigned
C characters and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
xdr_u_int(xdrs, up)
\s-1XDR\s0 *xdrs;
unsigned *up;
.fi
.ft R
.IP
A filter primitive that translates between C
.B unsigned
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_u_long(xdrs, ulp)
\s-1XDR\s0 *xdrs;
unsigned long *ulp;
.fi
.ft R
.IP
A filter primitive that translates between C
.B "unsigned long"
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
xdr_u_short(xdrs, usp)
\s-1XDR\s0 *xdrs;
unsigned short *usp;
.fi
.ft R
.IP
A filter primitive that translates between C
.B "unsigned short"
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 16
.LP
.ft B
.nf
.sp .5
xdr_union(xdrs, dscmp, unp, choices, dfault)
\s-1XDR\s0 *xdrs;
int *dscmp;
char *unp;
struct xdr_discrim *choices;
bool_t (*defaultarm) (\|);  /* may equal \s-1NULL\s0 */
.fi
.ft R
.IP
A filter primitive that translates between a discriminated C
.B union
and its corresponding external representation. It first
translates the discriminant of the union located at
.IR dscmp .
This discriminant is always an
.BR enum_t .
Next the union located at
.I unp
is translated.  The parameter
.I choices
is a pointer to an array of
.B xdr_discrim(\|)
structures. Each structure contains an ordered pair of
.RI [ value , proc ].
If the union's discriminant is equal to the associated
.IR value ,
then the
.I proc
is called to translate the union.  The end of the
.B xdr_discrim(\|)
structure array is denoted by a routine of value
.SM NULL\s0.
If the discriminant is not found in the
.I choices
array, then the
.I defaultarm
procedure is called (if it is not
.SM NULL\s0).
Returns one if it succeeds, zero otherwise.
.br
.if t .ne 6
.LP
.ft B
.nf
.sp .5
xdr_vector(xdrs, arrp, size, elsize, elproc)
\s-1XDR\s0 *xdrs;
char *arrp;
u_int size, elsize;
xdrproc_t elproc;
.fi
.ft R
.IP
A filter primitive that translates between fixed-length
arrays
and their corresponding external representations.  The
parameter
.I arrp
is the address of the pointer to the array, while
.I size
is is the element count of the array.  The parameter
.I elsize
is the
.I sizeof
each of the array's elements, and
.I elproc
is an
.SM XDR
filter that translates between
the array elements' C form, and their external
representation.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 5
.LP
.ft B
.nf
.sp .5
xdr_void(\|)
.fi
.ft R
.IP
This routine always returns one.
It may be passed to
.SM RPC
routines that require a function parameter,
where nothing is to be done.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
xdr_wrapstring(xdrs, sp)
\s-1XDR\s0 *xdrs;
char **sp;
.fi
.ft R
.IP
A primitive that calls
.B "xdr_string(xdrs, sp,\s-1MAXUN.UNSIGNED\s0 );"
where
.SB MAXUN.UNSIGNED
is the maximum value of an unsigned integer.
.B xdr_wrapstring(\|)
is handy because the
.SM RPC
package passes a maximum of two
.SM XDR
routines as parameters, and
.BR xdr_string(\|) ,
one of the most frequently used primitives, requires three.
Returns one if it succeeds, zero otherwise.
.SH SEE ALSO
.BR rpc (3N)
.LP
.TX NETP

xdr_inline(xdrs, len)
\s-1XDR\s0 *xdrs;
int len;
.fi
.ft R
.IP
A macro that invokes the in-line routine associated with the
.SM XDR
stream,
.IR xdrs .
The routine returns a pointer
to a contiguous piece of the stream's buffer;
.I len
is the byte length of the desired buffer.
Note: point./share/man/man3/xdr_accepted_reply.3n                                                                 755       0      12          100  4424741422  12757                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_accepted_reply.3n 1.4 89/03/27 SMI;
  R8   $ xdr_authunix_parms.3n r_  RL    xdr_bool.3n   Rd    xdr_bytes.3n    R|    xdr_callhdr.3n   R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_double.3n   R    xdr_enum.3n   S    xdr_float.3n    S    xdr_free.3n   S4     xdr_functions.3n     SL    
xdr_getpos.3n   Sd    
xdr_inline.3n   Sx    xrd_free.3n   S    xtom.3x   S    y0.3./share/man/man3/xdr_array.3n                                                                          755       0      12           67  4424741422  11106                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_array.3n 1.4 89/03/27 SMI;
rms.3n   RL    xdr_bool.3n   Rd    xdr_bytes.3n dr_  R|    xdr_callhdr.3n e  R    xdr_callmsg.3n l  R    xdr_char.3n   R    xdr_destroy.3n _  R    
xdr_double.3n st  R    xdr_enum.3n   S    xdr_float.3n dr_  S    xdr_free.3n   S4     xdr_functions.3n ree  SL    
xdr_getpos.3n on  Sd    
xdr_inline.3n tp  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m S  S    y1.3m S  S    ./share/man/man3/xdr_authunix_parms.3n                                                                 755       0      12          100  4424741423  13044                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_authunix_parms.3n 1.4 89/03/27 SMI;
    xdr_bytes.3n 3n   R|    xdr_callhdr.3n _  R    xdr_callmsg.3n e  R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n  _  R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n ee  Sd    
xdr_inline.3n on  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r  ./share/man/man3/xdr_bool.3n                                                                           755       0      12           66  4424741423  10723                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_bool.3n 1.4 89/03/27 SMI;
R|    xdr_callhdr.3n e  R    xdr_callmsg.3n l  R    xdr_char.3n   R    xdr_destroy.3n _  R    
xdr_double.3n st  R    xdr_enum.3n   S    xdr_float.3n dr_  S    xdr_free.3n   S4     xdr_functions.3n ree  SL    
xdr_getpos.3n on  Sd    
xdr_inline.3n tp  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m S  S    y1.3m S  S    yn.3m S  S    yp.3r S  S    	yp_all.3n   T     
./share/man/man3/xdr_bytes.3n                                                                          755       0      12           67  4424741424  11120                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_bytes.3n 1.4 89/03/27 SMI;
|  R    xdr_callmsg.3n   R    xdr_char.3n   R    xdr_destroy.3n   R    
xdr_double.3n R  R    xdr_enum.3n   S    xdr_float.3n  S  S    xdr_free.3n   S4     xdr_functions.3n    SL    
xdr_getpos.3n SL  Sd    
xdr_inline.3n Sd  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m om  S    y1.3m .3  S    yn.3m .3  S    yp.3r .3  S    	yp_all.3n S  T     
yp_bind.3n   T    ./share/man/man3/xdr_callhdr.3n                                                                        755       0      12           71  4424741424  11376                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_callhdr.3n 1.4 89/03/27 SMI;
 R    xdr_char.3n   R    xdr_destroy.3n    R    
xdr_double.3n    R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n   Sd    
xdr_inline.3n SL  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_g./share/man/man3/xdr_callmsg.3n                                                                        755       0      12           71  4424741424  11407                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_callmsg.3n 1.4 89/03/27 SMI;
   xdr_destroy.3n    R    
xdr_double.3n     R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n S4  Sd    
xdr_inline.3n   Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP./share/man/man3/xdr_char.3n                                                                           755       0      12           66  4424741424  10706                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_char.3n 1.4 89/03/27 SMI;
R    
xdr_double.3n     R    xdr_enum.3n   S    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n S4  Sd    
xdr_inline.3n S4  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n (   Td./share/man/man3/xdr_destroy.3n                                                                        755       0      12           71  4424741425  11457                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_destroy.3n 1.4 89/03/27 SMI;
 R    xdr_enum.3n   S    xdr_float.3n  S  S    xdr_free.3n   S4     xdr_functions.3n    SL    
xdr_getpos.3n SL  Sd    
xdr_inline.3n Sd  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m om  S    y1.3m .3  S    yn.3m .3  S    yp.3r .3  S    	yp_all.3n    T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx./share/man/man3/xdr_double.3n                                                                         755       0      12           70  4424741425  11237                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_double.3n 1.4 89/03/27 SMI;
    xdr_float.3n 3n   S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n   Sd    
xdr_inline.3n SL  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n p_g  Td    yp_match.3n   Tx    
yp_next.3n h  T  ./share/man/man3/xdr_enum.3n                                                                           755       0      12           66  4424741425  10736                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_enum.3n 1.4 89/03/27 SMI;
S    xdr_free.3n   S4     xdr_functions.3n  S4  SL    
xdr_getpos.3n S4  Sd    
xdr_inline.3n   Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n (   Td    yp_match.3n   Tx    
yp_next.3n h  T    yp_order.3n   T    ./share/man/man3/xdr_float.3n                                                                          755       0      12           67  4424741425  11100                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_float.3n 1.4 89/03/27 SMI;
4     xdr_functions.3n    SL    
xdr_getpos.3n SL  Sd    
xdr_inline.3n Sd  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m om  S    y1.3m .3  S    yn.3m .3  S    yp.3r .3  S    	yp_all.3n    T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T  ./share/man/man3/xdr_free.3n                                                                           755       0      12           66  4424741425  10713                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_free.3n 1.4 89/03/27 SMI;
S4  SL    
xdr_getpos.3n   Sd    
xdr_inline.3n SL  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n p_g  Td    yp_match.3n   Tx    
yp_next.3n h  T    yp_order.3n   T    yp_unbind.3n 3n   T    yp_update.3n  T  T  ./share/man/man3/xdr_functions.3n                                                                      755       0      12          507  4424741426  12023                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xdr_functions.3n 1.7 89/03/27 SMI; 
.ig
.TH XDR_FUNCTIONS 3N
.SH NAME
xdr_accepted_reply, xdr_array, xdr_authunix_parms, xdr_bool, xdr_bytes,
xdr_callhdr, xdr_callmsg, xdr_char, xdr_destroy, xdr_double, xdr_enum,
xdr_float, xdr_free, xdr_getpos, xdr_inline \- XDR functions,
see xdr(3N)
.SH
..
.so /usr/man/man3/xdr.3n
P    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n T  T  ./share/man/man3/xdr_getpos.3n                                                                         755       0      12           70  4424741426  11267                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr.3n
.\" @(#)xdr_getpos.3n 1.5 89/03/27 SMI;
  Sx    xrd_free.3n   S    xtom.3x   S    y0.3m   S    y1.3m   S    yn.3m   S    yp.3r   S    	yp_all.3n    T     
yp_bind.3n a  T    yp_first.3n   T8   ( yp_get_default_domain.3n    TP    yp_master.3n .3n  Td    yp_match.3n   Tx    
yp_next.3n m  T    yp_order.3n   T    yp_unbind.3n der  T    yp_update.3n .3n  T    	ypclnt.3n at  T    yperr_string.3n   T    ./share/man/man3/xdr_inline.3n                                                                         755       0      12          102  4424741427  11261                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr_functions.3n
.\" @(#)xdr_inline.3n 1.3 89/03/27 SMI;
om.3x   S    y0.3m    S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n    Td    yp_match.3n   Tx    
yp_next.3n h  T    yp_order.3n   T    yp_unbind.3n 3n   T    yp_update.3n der  T    	ypclnt.3n 3n  T    yperr_string.3n   T    yppasswd.3r   U    
yppr./share/man/man3/xrd_free.3n                                                                           755       0      12          100  4424741427  10722                                                                                                                                                                                                                                                                                                                                                                      .so man3/xdr_functions.3n
.\" @(#)xrd_free.3n 1.4 89/03/27 SMI;
  S    y1.3m    S    yn.3m    S    yp.3r    S    	yp_all.3n .3  T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n (   TP    yp_master.3n (   Td    yp_match.3n   Tx    
yp_next.3n h  T    yp_order.3n   T    yp_unbind.3n 3n   T    yp_update.3n 3n   T    	ypclnt.3n 3n  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n r   V     ypup./share/man/man3/xtom.3x                                                                               755       0      12           61  4424741427  10113                                                                                                                                                                                                                                                                                                                                                                      .so man3/mp.3x
.\" @(#)xtom.3x 1.4 89/03/27 SMI;
 y1.3m .3  S    yn.3m .3  S    yp.3r .3  S    	yp_all.3n    T     
yp_bind.3n 3  T    yp_first.3n   T8   ( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n n   T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypup./share/man/man3/y0.3m                                                                                 755       0      12           64  4424741427   7444                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)y0.3m 1.7 89/03/27 SMI; 
yn.3m .3  S    yp.3r .3  S    	yp_all.3n S  T     
yp_bind.3n    T    yp_first.3n   T8   ( yp_get_default_domain.3n t_d  TP    yp_master.3n    Td    yp_match.3n   Tx    
yp_next.3n x  T    yp_order.3n   T    yp_unbind.3n    T    yp_update.3n    T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n   V     ypupdate.3n     ypupdate.3n   V     ypup./share/man/man3/y1.3m                                                                                 755       0      12           64  4424741427   7445                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)y1.3m 1.7 89/03/27 SMI; 
yp.3r .3  S    	yp_all.3n S  T     
yp_bind.3n    T    yp_first.3n   T8   ( yp_get_default_domain.3n t_d  TP    yp_master.3n    Td    yp_match.3n   Tx    
yp_next.3n x  T    yp_order.3n   T    yp_unbind.3n    T    yp_update.3n    T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n   V     ypupdate.3n     ypupdate.3n     ypupdate.3n   V     ypup./share/man/man3/yn.3m                                                                                 755       0      12           64  4424741430   7534                                                                                                                                                                                                                                                                                                                                                                      .so man3/bessel.3m
.\" @(#)yn.3m 1.6 89/03/27 SMI; 
yp_all.3n S  T     
yp_bind.3n    T    yp_first.3n   T8   ( yp_get_default_domain.3n t_d  TP    yp_master.3n    Td    yp_match.3n   Tx    
yp_next.3n x  T    yp_order.3n   T    yp_unbind.3n    T    yp_update.3n    T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n   V     ypupdate.3n     ypupdate.3n     ypupdate.3n     ypupdate.3n   V     ypup./share/man/man3/yp.3r                                                                                 755       0      12         1114  4424741430   7600                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yp.3r 1.6 89/03/27 SMI
.TH YP 3R "6 October 1987"
.SH NAME
yp \- Yellow Pages protocol
.SH PROTOCOL
.B /usr/include/rpcsvc/yp.x
.SH DESCRIPTION
.IX "yp function" "" "\fLyp()\fP function"
The Yellow Pages Service is used for the
administration of network-wide databases.
The service is composed mainly of two programs:
.SB YPBINDPROG
for finding a
.SM YP
server and
.SB YPPROG
for accessing the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.SM YP
servers and databases.
.SH SEE ALSO
.BR ypclnt (3N),
.BR yppasswd (3R)
    ypupdate.3n   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n n r   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n n r   V     ypupdate.3n n r   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n ot_err.3n r   V     ypupdate.3n n pa  V     ypupdate.3n ot_err.3n   V     ypupdate.3n ed
C characters and their external representations.
./share/man/man3/yp_all.3n                                                                             755       0      12           70  4424741430  10364                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_all.3n 1.5 89/03/27 SMI; 
  yp_first.3n   T8   ( yp_get_default_domain.3n t_d  TP    yp_master.3n    Td    yp_match.3n   Tx    
yp_next.3n x  T    yp_order.3n   T    yp_unbind.3n    T    yp_update.3n    T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_bind.3n                                                                            755       0      12           71  4424741430  10531                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_bind.3n 1.5 89/03/27 SMI; 
( yp_get_default_domain.3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n   T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_first.3n                                                                           755       0      12           72  4424741431  10746                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_first.3n 1.5 89/03/27 SMI; 
3n p_g  TP    yp_master.3n  TP  Td    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_get_default_domain.3n                                                              755       0      12          107  4424741431  13450                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_get_default_domain.3n 1.5 89/03/27 SMI; 
d    yp_match.3n   Tx    
yp_next.3n    T    yp_order.3n   T    yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_master.3n                                                                          755       0      12           73  4424741431  11113                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_master.3n 1.5 89/03/27 SMI; 
  
yp_next.3n   T    yp_order.3n   T    yp_unbind.3n    T    yp_update.3n p_u  T    	ypclnt.3n    T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_match.3n                                                                           755       0      12           72  4424741432  10714                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_match.3n 1.5 89/03/27 SMI; 
 yp_order.3n   T    yp_unbind.3n 3n   T    yp_update.3n    T    	ypclnt.3n 3n  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n r   V     ypupdate.3n n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_next.3n                                                                            755       0      12           71  4424741432  10575                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_next.3n 1.5 89/03/27 SMI; 
 yp_unbind.3n  T  T    yp_update.3n  T  T    	ypclnt.3n    T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_order.3n                                                                           755       0      12           72  4424741432  10733                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_order.3n 1.5 89/03/27 SMI; 
  yp_update.3n  T  T    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_unbind.3n                                                                          755       0      12           73  4424741432  11100                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yp_unbind.3n 1.5 89/03/27 SMI; 
    	ypclnt.3n T  T    yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/yp_update.3n                                                                          755       0      12           74  4424741432  11104                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypupdate.3n
.\" @(#)yp_update.3n 1.3 89/03/27 SMI;
  yperr_string.3n   T    yppasswd.3r   U    
ypprot_err.3n r   V     ypupdate.3n n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n n    V     ypupdate.3n ypprot_err.3n U  V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n   V     ypupdate.3n g the
.SM YP
databases.
.SH PROGRAMMING
Refer to
.BR ypclnt (3N)
for information on the programmatic interface to
.S./share/man/man3/ypclnt.3n                                                                             755       0      12        30343  4424741433  10506                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypclnt.3n 1.21 89/03/27 SMI
.TH YPCLNT 3N "22 March 1989"
.SH NAME
ypclnt, yp_get_default_domain, yp_bind, yp_unbind, yp_match, yp_first, yp_next, yp_all, yp_order, yp_master, yperr_string, ypprot_err \- Yellow Pages client interface
.SH SYNOPSIS AND DESCRIPTION
.IX  "yp_bind function"  ""  "\fLyp_bind\fP \(em Yellow Pages client interface"
.IX  "yp_get_default_domain function"  ""  "\fLyp_get_default_domain\fP \(em Yellow Pages client interface"
.IX  "yp_unbind function"  ""  "\fLyp_unbind\fP \(em Yellow Pages client interface"
.IX  "yp_match function"  ""  "\fLyp_match\fP \(em Yellow Pages client interface"
.IX  "yp_first function"  ""  "\fLyp_first\fP \(em Yellow Pages client interface"
.IX  "yp_all function"  ""  "\fLyp_all\fP \(em Yellow Pages client interface"
.IX  "yp_next function"  ""  "\fLyp_next\fP \(em Yellow Pages client interface"
.IX  "yp_order function"  ""  "\fLyp_order\fP \(em Yellow Pages client interface"
.IX  "yp_master function"  ""  "\fLyp_master\fP \(em Yellow Pages client interface"
.IX  "yp_next function"  ""  "\fLyp_next\fP \(em Yellow Pages client interface"
.IX  "yperr_string function"  ""  "\fLyperr_string\fP \(em Yellow Pages client interface"
.IX  "ypprot_err function"  ""  "\fLypprot_err\fP \(em Yellow Pages client interface"
.IX  "Yellow Pages client interface"
.LP
This package of functions provides an interface to the
Yellow Pages (\s-1YP\s0)
network lookup service.  The package can be loaded
from the standard library,
.BR /usr/lib/libc.a .
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages, including
.IX rpc "" "RPC routines"
.IX "remote procedure calls"
the definitions of
.B map
and
.BR domain ,
and a description of the various servers, databases,
and commands that comprise the
.SM YP\s0.
.LP
All input parameters names begin with
.IR in .
Output parameters begin with
.IR out .
Output parameters of type
.B "char **"
should be addresses of uninitialized character pointers.
Memory is allocated by the
.SM YP
client package using
.BR malloc (3),
and may be freed if the user code has no continuing need for it.
For each
.I outkey
and
.IR outval ,
two extra bytes of memory are allocated at the end that contain
.SM NEWLINE
and
.SM NULL\s0,
respectively, but these two bytes are not reflected in
.I outkeylen
or
.IR outvallen .
.I indomain
and
.I inmap
strings must be non-\s-1NULL\s0 and
.SM NULL\s0-terminated.
String parameters which are accompanied by a count parameter may
not be
.SM NULL\s0,
but may point to
.SM NULL
strings, with the count parameter indicating this.
Counted strings need not be
.SM NULL\s0-terminated.
.LP
All functions in this package of type
.I int
return 0 if they succeed, and a failure code (\c
.BI \s-1YPERR\s0_ xxxx\fR)
otherwise.  Failure codes are described under
.SM DIAGNOSTICS
below.
.LP
.ft B
.nf
.sp .5
yp_bind (indomain);
char *indomain;
.fi
.ft R
.IP
To use the
.SM YP
services, the client process must be \(lqbound\(rq to a
.SM YP
server that serves the appropriate domain using
.BR yp_bind(\|) .
Binding need not be done explicitly by user code; this
is done automatically whenever a
.SM YP
lookup function is called.
.B yp_bind(\|)
can be called directly for processes
that make use of a backup strategy (for example,
a local file) in cases when
.SM YP
services are not available.
.LP
.ft B
.nf
.sp .5
void
yp_unbind (indomain)
char *indomain;
.fi
.ft R
.IP
Each binding allocates (uses up) one client process
socket descriptor;
each bound domain costs one socket descriptor.  However,
multiple
requests to the same domain use that same descriptor.
.B yp_unbind(\|)
is available at the client interface for processes that
explicitly manage their socket descriptors while accessing
multiple domains.  The call to
.B yp_unbind(\|)
make the domain
.IR unbound ,
and free all per-process and per-node resources used to bind
it.
.IP
If an
.SM RPC
failure results upon use of a binding, that domain will be
unbound automatically.  At that point, the
.B ypclnt
layer will retry
forever or until the operation succeeds, provided that
.B ypbind
is running, and either
.RS
.TP
a)
the client process cannot bind a server for the proper domain,
or
.TP
b)
.SM RPC
requests to the server fail.
.RE
.IP
If an error is not
.SM RPC\s0-related,
or if
.B ypbind
is not running, or if a bound
.B ypserv
process returns any answer (success or failure),
the ypclnt layer will
return control to the user code, either with an error code,
or a
success code and any results.
.br
.if t .ne 9
.LP
.ft B
.nf
.sp .5
yp_get_default_domain (outdomain);
char **outdomain;
.fi
.ft R
.IP
The
.SM YP
lookup calls require a map name and a domain name, at minimum.
It is assumed that the client process knows the name of the map of
interest.  Client processes
should fetch the node's default domain by calling
.BR yp_get_default_domain(\|) ,
and use the returned
.I outdomain
as the
.I indomain
parameter to successive
.SM YP
calls.
.LP
.ft B
.nf
.sp .5
yp_match(indomain, inmap, inkey, inkeylen, outval, outvallen)
char *indomain;
char *inmap;
char *inkey;
int inkeylen;
char **outval;
int *outvallen;
.fi
.ft R
.IP
.B yp_match(\|)
returns the value associated with a passed key.  This key
must be exact; no pattern matching is available.
.LP
.ft B
.nf
.sp .5
yp_first(indomain, inmap, outkey, outkeylen, outval, outvallen)
char *indomain;
char *inmap;
char **outkey;
int *outkeylen;
char **outval;
int *outvallen;
.fi
.ft R
.IP
.B yp_first(\|)
returns the first key-value pair from the named map
in the named domain.
.LP
.ft B
.nf
.sp .5
yp_next(indomain, inmap, inkey, inkeylen, outkey, outkeylen, outval, outvallen);
char *indomain;
char *inmap;
char *inkey;
int inkeylen;
char **outkey;
int *outkeylen;
char **outval;
int *outvallen;
.fi
.ft R
.IP
.B yp_next(\|)
returns the next key-value pair in a named map.  The
.I inkey
parameter should be the
.I outkey
returned from an initial call to
.B yp_first(\|)
(to get the second key-value pair) or the one returned from the nth call to
.B yp_next(\|)
(to get the nth + second key-value pair).
.IP
The concept of first (and, for that matter, of next) is particular
to the structure of the
.SM YP
map being processing; there is no relation in
retrieval order to either the lexical order within
any original (non-\s-1YP\s0)
data base, or to any obvious numerical sorting order on the keys,
values, or key-value pairs.  The only ordering guarantee made is
that if the
.B yp_first(\|)
function is called on a particular map, and then the
.B yp_next(\|)
function is repeatedly called on the same map at the same server
until the call fails with a reason of
.BR \s-1YPERR_NOMORE\s0 ,
every entry in the data base will be seen exactly once.
Further, if the same sequence of operations is performed on the same
map at the same server, the entries will be seen in the same order.
.br
.if t .ne 7
.IP
Under conditions of heavy server load or server failure, it
is possible for the domain to become unbound, then bound
once again (perhaps to a different server)
while a client is running.
This can cause a break in one of the enumeration rules;
specific entries may be seen twice by the client, or not at all.
This approach protects the client from error messages that would
otherwise be returned in the midst of the enumeration.
The next paragraph describes a better solution to enumerating all
entries in a map.
.LP
.ft B
.nf
.sp .5
yp_all(indomain, inmap, incallback);
char *indomain;
char *inmap;
struct ypall_callback *incallback;
.fi
.ft R
.IP
.B yp_all(\|)
provides a way to transfer an entire map
from server to client in a single request using
.SM TCP
(rather than
.SM UDP
as with other functions in this package).
The entire transaction take place as a single
.SM RPC
request and response. You can use
.B yp_all(\|)
just like any other
.SM YP
procedure,
identify the map in the normal manner, and supply the name of a
function which will be called to process each key-value pair
within the map.  You return from the call to
.B yp_all(\|)
only when the transaction is completed
(successfully or unsuccessfully), or your
.RB foreach
function decides that it does not want to see
any more key-value pairs.
.IP
The third parameter to
.B yp_all(\|)
is
.RS 1i
.ft B
.nf
struct ypall_callback *incallback {
int (*foreach)(\|);
char *data;
};
.fi
.ft R
.RE
.IP
The function
.B foreach
is called
.RS 1i
.ft B
.nf
foreach(instatus, inkey, inkeylen, inval, invallen, indata);
int instatus;
char *inkey;
int inkeylen;
char *inval;
int invallen;
char *indata;
.fi
.ft R
.RE
.IP
The
.I instatus
parameter will hold one of the return status values defined in
.RB < rpcsvc/yp_prot.h >
\(em either
.SB YP_TRUE
or an error code. (See
.BR ypprot_err(\|) ,
below, for a function which converts a
.SM YP
protocol error code to a ypclnt layer error code.)
.IP
The key and value parameters are somewhat different
than defined in the
synopsis section above. First, the memory pointed to by the
.I inkey
and
.I inval
parameters is private to the
.B yp_all(\|)
function, and is overwritten with the arrival
of each new key-value pair.
It is the responsibility of the
.B foreach
function to do something useful with the contents
of that memory, but it
does not own the memory itself.  Key and value objects
presented to the
.B foreach
function look exactly as they do in the server's map \(em if they
were not
.SM NEWLINE\s0-terminated
or
.SM NULL\s0-terminated
in the map, they will not be here either.
.IP
The
.I indata
parameter is the contents of the
.B incallback->data
element passed to
.BR yp_all(\|) .
The
.B data
element of the callback structure may be used to share
state information between the
.B foreach
function and the mainline code.  Its use is optional,
and no part of the
.SM YP
client package inspects its contents \(em
cast it to something useful, or ignore it as you see fit.
.IP
The
.B foreach
function is a Boolean. It should return zero to
indicate that it wants to be called again for
further received key-value pairs, or non-zero to stop
the flow of key-value pairs.  If
.B foreach
returns a non-zero value, it is not called again; the functional
value of
.B yp_all(\|)
is then 0.
.br
.if t .ne 8
.LP
.ft B
.nf
.sp .5
yp_order(indomain, inmap, outorder);
char *indomain;
char *inmap;
int *outorder;
.fi
.ft R
.IP
.B yp_order(\|)
returns the order number for a map.
.br
.if t .ne 7
.LP
.ft B
.nf
.sp .5
yp_master(indomain, inmap, outname);
char *indomain;
char *inmap;
char **outname;
.fi
.ft R
.IP
.B yp_master(\|)
returns the machine name of the master
.SM YP
server for a map.
.LP
.ft B
.nf
.sp .5
char *yperr_string(incode)
int incode;
.fi
.ft R
.IP
.B yperr_string(\|)
returns a pointer to an error message string that is
.SM NULL\s0-terminated
but contains no period or
.SM NEWLINE\s0.
.LP
.ft B
.nf
.sp .5
ypprot_err (incode)
unsigned int incode;
.fi
.ft R
.IP
.B ypprot_err(\|)
takes a
.SM YP
protocol error code as input, and returns a ypclnt layer error
code, which may be used in turn as an input to
.BR yperr_string(\|) .
.SH FILES
.PD 0
.TP 20
.B /usr/include/rpcsvc/ypclnt.h
.TP
.B /usr/include/rpcsvc/yp_prot.h
.TP
.B /usr/lib/libc.a
.PD
.SH "SEE ALSO"
.BR malloc (3),
.BR ypupdate (3N),
.BR ypfiles (5),
.BR ypserv (8)
.SH DIAGNOSTICS
.LP
All integer functions return 0 if the
requested operation is successful,
or one of the following errors if the operation fails.
.RS
.TP 8
.B #define \s-1YPERR_BADARGS\s0
.B 1	/* args to function are bad */
.TP
.B #define \s-1YPERR_RPC\s0
.B 2	/* RPC failure - domain has been unbound */
.TP
.B #define \s-1YPERR_DOMAIN\s0
.B 3	/* can't bind to server on this domain */
.TP
.B #define \s-1YPERR_MAP\s0
.B 4	/* no such map in server's domain */
.TP
.B #define \s-1YPERR_KEY\s0
.B 5	/* no such key in map */
.TP
.B #define \s-1YPERR_YPERR\s0
.B 6	/* internal yp server or client error */
.TP
.B #define \s-1YPERR_RESRC\s0
.B 7	/* resource allocation failure */
.TP
.B #define \s-1YPERR_NOMORE\s0
.B 8	/* no more records in map database */
.TP
.B #define \s-1YPERR_PMAP\s0
.B 9	/* can't communicate with portmapper */
.TP
.B #define \s-1YPERR_YPBIND\s0
.B 10	/* can't communicate with ypbind */
.TP
.B #define \s-1YPERR_YPSERV\s0
.B 11	/* can't communicate with ypserv */
.TP
.B #define \s-1YPERR_NODOM\s0
.B 12	/* local domain name not set */
.TP
.B #define	\s-1YPERR_BADDB\s0fR
.B 13	/* yp database is bad */
.TP
.B #define	\s-1YPERR_VERS\s0fR
.B 14	/* yp version mismatch */
.TP
.B #define	\s-1YPERR_ACCESS\s0
.B 15	/* access violation */
.TP
.B #define	\s-1YPERR_BUSY\s0
.B 16	/* database busy */
.RE

 C
.B short
integers and their external representations.
This routine returns one if it succeeds, zero otherwise.
.br
.if t .ne 10
.LP
.ft B
.nf
.sp .5
void
xdrstdio_create(xdrs, file, op)
\s-1XDR\s0 *xdrs;
\s-1FILE\s0 *file;
enum xdr_op op;
.fi
.ft R
.IP
This routine initializes the
./share/man/man3/yperr_string.3n                                                                       755       0      12           76  4424741433  11644                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)yperr_string.3n 1.5 89/03/27 SMI; 
 
ypprot_err.3n U  V     ypupdate.3n f type
.I int
return 0 if they succeed, and a failure code (\c
.BI \s-1YPERR\s0_ xxxx\fR)
otherwise.  Failure codes are described under
.SM DIAGNOSTICS
below.
.LP
.ft B
.nf
.sp .5
yp_bind (indomain);
char *indomain;
.fi
.ft R
.IP
To use the
.SM YP
services, the client process must be \(lqbound\(rq to a
.SM YP
server that serves the appropriate domain using
.BR yp_bind(\|) .
Binding need not be done explic./share/man/man3/yppasswd.3r                                                                           755       0      12         1245  4424741433  11032                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yppasswd.3r 1.10 89/03/27 SMI
.TH YPPASSWD 3R "14 December 1987"
.SH NAME
yppasswd \- update user password in Yellow Pages
.SH PROTOCOL
.B /usr/include/rpcsvc/yppasswd.x
.SH DESCRIPTION
.LP
The yppasswd protocol is used to change a
user's password entry in the
.SM YP
password database.
.SH PROGRAMMING
.nf
.ft B
#include <rpcsvc/yppasswd.h>
.sp .5
yppasswd(oldpass, newpw)
	char *oldpass
	struct passwd *newpw;
.ft R
.fi
.IX yppasswd "" "\fLyppasswd \(em update YP password entry"
.LP
If
.I oldpass
is indeed the old user password,
this routine replaces the password entry with
.IR newpw .
It returns 0 if successful.
.SH SEE ALSO
.BR yppasswd (1),
.BR yppasswdd (8C)
kup strategy (for example,
a local file) in cases when
.SM YP
services are not available.
.LP
.ft B
.nf
.sp .5
void
yp_unbind (indomain)
char *indomain;
.fi
.ft R
.IP
Each binding allocates (uses up) one client process
socket descriptor;
each bound domain costs one socket descriptor.  However,
multiple
requests to the same domain use that same d./share/man/man3/ypprot_err.3n                                                                         755       0      12           74  4424741433  11320                                                                                                                                                                                                                                                                                                                                                                      .so man3/ypclnt.3n
.\" @(#)ypprot_err.3n 1.5 89/03/27 SMI; 
cember 1987"
.SH NAME
yppasswd \- update user password in Yellow Pages
.SH PROTOCOL
.B /usr/include/rpcsvc/yppasswd.x
.SH DESCRIPTION
.LP
The yppasswd protocol is used to change a
user's password entry in the
.SM YP
password database.
.SH PROGRAMMING
.nf
.ft B
#include <rpcsvc/yppasswd.h>
.sp .5
yppasswd(oldpass, newpw)
	char *oldpass
	struct passwd *newpw;
.ft R
.fi
.IX yppasswd "" "\fLyppasswd \(em update YP password entry"
.LP
If
.I oldpass
is i./share/man/man3/ypupdate.3n                                                                           755       0      12         2551  4424741434  11011                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypupdate.3n 1.8 89/03/27 SMI;
.TH YPUPDATE 3  "6 October 1987"
.SH NAME
yp_update \- changes yp information
.SH SYNOPSIS
.nf
.B #include <rpcsvc/ypclnt.h>
.LP
.B
yp_update(domain, map, ypop, key, keylen, data, datalen)
.B	char *domain;
.B	char *map;
.B	unsigned ypop
.B	char *key;
.B	int keylen;
.B	char *data;
.B	int datalen;
.fi
.SH DESCRIPTION
.IX "yp_update function" "" "\fLyp_update()\fP function"
.B yp_update(\|)
is used to make changes to the
.SM YP
database. The syntax is the same as that of
.B yp_match(\|)
except for the extra parameter
.I ypop
which may take on one of four values. If it is
.SB YPOP_CHANGE
then the data associated with the key will
be changed to the new value. If
the key is not found in the database, then
.B yp_update(\|)
will return
.BR \s-1YPERR_KEY\s0 .
If
.I ypop
has the value
.SB YPOP_INSERT
then the key-value pair will be inserted
into the database.  The error
.SB YPERR_KEY
is returned if the key already exists in the database.
To store an item into the database without
concern for whether it exists already or not, pass
.I ypop
as
.SB YPOP_STORE
and no error will be returned if the key
already or does not exist.
To delete an entry, the value of
.I ypop
should be
.BR \s-1YPOP_DELETE\s0 .
.LP
This routine depends upon secure
.SM RPC\s0,
and will not work unless the network is running secure
.SM RPC\s0.
.SH "SEE ALSO"
.TX ADMIN
e
unbound automatically.  At that point, the
.B ypclnt
layer will retry
forever or until the operation succeeds, provided that
.B ypbind
is running, an./share/man/man4/                                                                                      775       0      12            0  4425704207   6622                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man4/List.4                                                                                755       0      12        11630  4424741447   7737                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.4 1.9 88/02/03 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 4 "2 September 1987"
.SH LIST OF DEVICES, PROTOCOLS, AND INTERFACES
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page	Description\fR
.sp
.zZ
\fBalm\fR	\fBmcp\fR(4S)	 Asynchronous Line Multiplexer
\fBar\fR	\fBar\fR(4S)	 Archive 1/4 inch Streaming Tape Drive
\fBarp\fR	\fBarp\fR(4P)	 Address Resolution Protocol
\fBbk\fR	\fBbk\fR(4)	 line discipline for machine-machine communication
\fBbwone\fR	\fBbwone\fR(4S)	 Sun-1 black and white frame buffer
\fBbwtwo\fR	\fBbwtwo\fR(4S)	 Sun-3/Sun-2 black and white frame buffer
\fBcgeight\fR	\fBcgeight\fR(4S)	 24-bitcolor memory frame buffer
\fBcgfour\fR	\fBcgfour\fR(4S)	 Sun-3 color memory frame buffer
\fBcgone\fR	\fBcgone\fR(4S)	 Sun-1 color graphics interface
\fBcgsix\fR	\fBcgsix\fR(4S)	 Sun-3, Sun-4, and Sun-3x low-end graphics accelerator
\fBcgthree\fR	\fBcgthree\fR(4S)	 Sun386i color memory frame buffer
\fBcgtwo\fR	\fBcgtwo\fR(4S)	 Sun-3/Sun-2 color graphics interface
\fBclone\fR	\fBclone\fR(4)	 open any minor device on a STREAMS driver
\fBconsole\fR	\fBconsole\fR(4S)	 console driver and terminal emulator for the Sun workstation
\fBdb\fR	\fBdb\fR(4M)	 SunDials STREAMS module
\fBdes\fR	\fBdes\fR(4S)	 DES encryption chip interface
\fBdkio\fR	\fBdkio\fR(4S)	 generic disk control operations
\fBdrum\fR	\fBdrum\fR(4)	 paging device
\fBec\fR	\fBec\fR(4S)	 3Com 10 Mb/s Ethernet interface
\fBfb\fR	\fBfb\fR(4S)	 driver for Sun console frame buffer
\fBfbio\fR	\fBfbio\fR(4S)	 general properties of frame buffers
\fBfd\fR	\fBfd\fR(4S)	 Disk driver for Floppy Disk Controllers
\fBfilio\fR	\fBfilio\fR(4)	 ioctls that operate directly on files, file descriptors, and sockets
\fBfpa\fR	\fBfpa\fR(4S)	 Sun-3 floating point accelerator
\fBgpone\fR	\fBgpone\fR(4S)	 Sun-3/Sun-2 graphics processor
\fBicmp\fR	\fBicmp\fR(4P)	 Internet Control Message Protocol
\fBie\fR	\fBie\fR(4S)	 Intel 10 Mb/s Ethernet interface
\fBif\fR	\fBif\fR(4N)	 general properties of network interfaces
\fBinet\fR	\fBinet\fR(4F)	 Internet protocol family
\fBip\fR	\fBip\fR(4P)	 Internet Protocol
\fBkb\fR	\fBkb\fR(4M)	 Sun keyboard STREAMS module
\fBkbd\fR	\fBkbd\fR(4S)	 Sun keyboard
\fBkmem\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBldterm\fR	\fBldterm\fR(4M)	 standard terminal STREAMS module
\fBle\fR	\fBle\fR(4S)	 Sun-3/50, Sun-3/60 10MB Ethernet interface
\fBlo\fR	\fBlo\fR(4)	 software loopback network interface
\fBlofs\fR	\fBlofs\fR(4S)	 loopback virtual file system
\fBmbio\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBmbmem\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBmcp\fR	\fBmcp\fR(4S)	 MCP Multiprotocol Communications Processor
\fBmem\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBmouse\fR	\fBmouse\fR(4S)	 Sun mouse
\fBms3\fR	\fBmouse\fR(4S)	 Sun mouse
\fBms\fR	\fBms\fR(4M)	 Sun mouse STREAMS module
\fBmti\fR	\fBmti\fR(4S)	 Systech MTI-800/1600 multi-terminal interface
\fBmtio\fR	\fBmtio\fR(4)	 UNIX system magnetic tape interface
\fBNFS\fR	\fBnfs\fR(4P)	 network file system
\fBnif_pf\fR	\fBnit_pf\fR(4M)	 streams NIT packet filtering module
\fBnit\fR	\fBnit\fR(4P)	 Network Interface Tap facility
\fBnit_buf\fR	\fBnit_buf\fR(4M)	 streams NIT buffering module
\fBnit_if\fR	\fBnit_if\fR(4M)	 streams NIT device interface module
\fBnull\fR	\fBnull\fR(4)	 data sink
\fBpp\fR	\fBpp\fR(4)	 Centronics-compatible parallel printer port
\fBpty\fR	\fBpty\fR(4)	 pseudo terminal driver
\fBroot\fR	\fBroot\fR(4S)	 pseudo-driver for Sun root disk
\fBrouting\fR	\fBrouting\fR(4N)	 system supporting for local network packet routing
\fBsd\fR	\fBsd\fR(4S)	 Disk driver for SCSI Disk Controllers
\fBsockio\fR	\fBsockio\fR(4)	 ioctls that operate directly on sockets
\fBst\fR	\fBst\fR(4S)	 Sysgen SC 4000 and Emulex MT-02 Tape Controller
\fBstreamio\fR	\fBstreamio\fR(4)	 STREAMS ioctl commands
\fBtcp\fR	\fBtcp\fR(4P)	 Transmission Control Protocol
\fBtermio\fR	\fBtermio\fR(4)	 general terminal interface
\fBtm\fR	\fBtm\fR(4S)	 tapemaster 1/2 inch tape drive
\fBttcompat\fR	\fBttcompat\fR(4M)	 V7/4BSD compatibility STREAMS module
\fBtty\fR	\fBtty\fR(4)	 controlling terminal interface
\fBudp\fR	\fBudp\fR(4P)	 User Datagram Protocol
\fBvme16d16\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvme16d32\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvme24d16\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvme24d32\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvme32d16\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvme32d32\fR	\fBmem\fR(4S)	 main memory and bus I/O space
\fBvp\fR	\fBvp\fR(4S)	 Ikon 10071-5 Versatec parallel printer interface
\fBvpc\fR	\fBvpc\fR(4S)	 Systech VPC-2200 Versatec plotter and Centronics printer
\fBwin\fR	\fBwin\fR(4S)	 Sun window system
\fBxd\fR	\fBxd\fR(4S)	 Disk driver for Xylogics 7053 SMD Disk Controller
\fBxt\fR	\fBxt\fR(4S)	 Xylogics 472 1/2 inch tape controller
\fBxy\fR	\fBxy\fR(4S)	 Disk driver for Xylogics SMD Disk Controllers
\fBzero\fR	\fBzero\fR(4S)	 source of zeroes
\fBzs\fR	\fBzs\fR(4S)	 Zilog 8530 SCC serial comunications driver
.fi
un console frame buffer
\fBfbio\fR	\fBfbio\fR(4S)	 general properties of frame buffers
\fBfd\fR	\fBfd\fR./share/man/man4/NFS.4p                                                                                755       0      12           61  4424741447   7546                                                                                                                                                                                                                                                                                                                                                                      .so man4/nfs.4p
.\" @(#)NFS.4p 1.4 89/03/27 SMI;
 ar.4s    h    arp.4p    x    bk.4         bwone.4s         bwtwo.4s k.4       
cgeight.4s s       	cgfour.4s 4s        cgone.4s ht.       cgsix.4s r.4      
cgthree.4s s      cgtwo.4s .4s  (    clone.4   8    cons.4s   L    
console.4s   \    des.4s   l    dkio.4s   |  	  drum.4     
  ec.4s       fb.4s 	      fbio.4s     
  fd.4s       fili./share/man/man4/alm.4s                                                                                755       0      12           61  4424741447   7674                                                                                                                                                                                                                                                                                                                                                                      .so man4/mcp.4s
.\" @(#)alm.4s 1.4 89/03/27 SMI;
 arp.4p    x    bk.4 p        bwone.4s          bwtwo.4s          
cgeight.4s        	cgfour.4s          cgone.4s          cgsix.4s         
cgthree.4s       cgtwo.4s    (    clone.4   8    cons.4s   L    
console.4s L  \    des.4s   l    dkio.4s   |  	  drum.4      
  ec.4s        fb.4s       fbio.4s     
  fd.4s s       filio.4       fpa../share/man/man4/ar.4s                                                                                 755       0      12         4744  4424741447   7601                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ar.4s 1.19 89/03/27 SMI;
.TH AR 4S "18 February 1988"
.SH NAME
ar \- Archive 1/4 inch Streaming Tape Drive
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device ar0 at mbio ? csr 0x200 priority 3
device ar1 at mbio ? csr 0x208 priority 3
.ft R
.fi
.SH AVAILABILITY
Sun-2, Sun-3, and Sun-4 systems only.
.SH DESCRIPTION
.IX  "ar device"  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  ""  PAGE START
.IX  "1/4-inch tape drive"  ar  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  PAGE START
.IX  "streaming 1/4-inch tape drive"  ""  "streaming 1/4-inch tape drive \(em \fLar\fP"  ""  PAGE START
.IX  "tape drive, 1/4-inch"  "ar"  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  PAGE START
.LP
The Archive tape controller is a Sun `\s-1QIC\s0-II'
interface to an Archive streaming tape drive.
It provides a standard tape interface to the device, see
.BR mtio (4),
with some deficiencies listed under
.SM BUGS
below.
.LP
The maximum blocksize for the raw device is limited only by
available memory.
.SH FILES
.PD 0
.TP 20
.B /dev/rar*
.TP
.B /dev/nrar*
non-rewinding
.PD
.SH "SEE ALSO
.BR mtio (4)
.SH DIAGNOSTICS
.TP
.B ar*: would not initialize
.TP
.B ar*: already open
The tape can be open by only one process at a time
.LP
.B ar*: no such drive
.LP
.B ar*: no cartridge in drive
.LP
.B ar*: cartridge is write protected
.LP
.B ar: interrupt from unitialized controller %x
.LP
.B ar*: many retries, consider retiring this tape
.LP
.B ar*: %b error at block # %d punted
.LP
.B ar*: %b error at block # %d
.LP
.B ar: giving up on Rdy, try again
.SH BUGS
The tape cannot reverse direction so the
.SB BSF
and
.SB BSR
ioctls are not supported.
.LP
The
.SB FSR
ioctl is not supported.
.LP
The system will hang if the tape is removed while running.
.LP
When using the raw device, the number of bytes in any given transfer must be
a multiple of 512 bytes.  If it is not, the device driver returns an error.
.LP
The driver will only write an
.SM EOF
mark on close if the last
operation was a write, without regard for the mode used when opening the
file.  This delete empty files on a raw tape copy
operation.
.IX  "ar device"  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  ""  PAGE END
.IX  "1/4-inch tape drive"  ar  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  PAGE END
.IX  "streaming 1/4-inch tape drive"  ""  "streaming 1/4-inch tape drive \(em \fLar\fP"  ""  PAGE END
.IX  "tape drive, 1/4-inch"  "ar"  ""  "\fLar\fP \(em Archive 1/4-inch Streaming Tape Drive"  PAGE END
em\fR(4S)	 main memory and b./share/man/man4/arp.4p                                                                                755       0      12        14672  4424741447   7777                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)arp.4p 1.22 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH ARP 4P "24 November 1987"
.SH NAME
arp \- Address Resolution Protocol
.SH CONFIG
.B "pseudo-device ether"
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
.B #include <net/if_arp.h>
.B #include <netinet/in.h>
.LP
.B s = socket(\s-1AF_INET\s0, \s-1SOCK_DGRAM\s0, 0);
.fi
.SH DESCRIPTION
.IX  "arp protocol"  ""  "\fLarp\fP \(em Address Resolution Protocol"  "" PAGE START
.IX  Internet  "to Ethernet address resolution arp"  ""  "to Ethernet address resolution \(em \fLarp\fP"  PAGE START
.LP
.SM ARP
is a protocol used to dynamically map between
.SM DARPA
Internet Protocol (\s-1IP\s0)
and 10Mb/s Ethernet addresses.  It is
used by all the 10Mb/s Ethernet interface drivers.
It is not specific to the Internet Protocol
or to the 10Mb/s Ethernet, but this implementation
currently supports only that combination.
.LP
.SM ARP
caches
.SM IP\s0-to-Ethernet
address mappings.  When an interface
requests a mapping for an address not in the cache,
.SM ARP
queues the
message which requires the mapping and broadcasts
a message on the associated network requesting the address mapping.
If a response is provided, the new mapping is cached and any pending
message is transmitted.
.SM ARP
will queue
at most one packet while waiting for a mapping request to be responded to;
only the most recently ``transmitted'' packet is kept.
.LP
To facilitate communications with systems which do not use
.SM ARP\s0,
.BR ioctl s
are provided to enter and delete entries in the
.SM IP\s0-to-Ethernet
tables.
.SH USAGE
.LP
.nf
.ft B
	#include <sys/sockio.h>
	#include <sys/socket.h>
	#include <net/if.h>
	#include <net/if_arp.h>
	struct arpreq arpreq;
	ioctl(s, \s-1SIOCSARP\s0, (caddr_t)&arpreq);
	ioctl(s, \s-1SIOCGARP\s0, (caddr_t)&arpreq);
	ioctl(s, \s-1SIOCDARP\s0, (caddr_t)&arpreq);
.fi
.ft R
.LP
Each ioctl takes the same structure as an argument.
.IX  "ioctls for sockets"  "SIOCSARP"  "\fLioctl\fP's for sockets"  "\fLSIOCSARP\fP \(em set arp entry"
.IX  "SIOCSARP set arp entry"  ""  "\fLSIOCSARP\fP \(em set arp entry"
.IX  set "arp entry ioctl \(em \fLSIOCSARP\fP"
.IX  "arp ioctl"  "SIOCSARP set arp entry"  "arp \fLioctl\fP" "\fLSIOCSARP\fP \(em set arp entry"
.SB SIOCSARP
sets an
.SM ARP
entry,
.SB SIOCGARP
gets an
.IX  "ioctls for sockets"  "SIOCGARP"  "\fLioctl\fP's for sockets"  "\fLSIOCGARP\fP \(em get arp entry"
.IX  "SIOCGARP get arp entry"  ""  "\fLSIOCGARP\fP \(em get arp entry"
.IX  get "arp entry \fLioctl\fP \(em \fLSIOCGARP\fP"
.IX  "arp ioctl"  "SIOCGARP get arp entry"  "arp \fLioctl\fP" "\fLSIOCGARP\fP \(em get arp entry"
.SM ARP
entry, and
.SB SIOCDARP
.IX  "ioctls for sockets"  "SIOCDARP"  "\fLioctl\fP's for sockets"  "\fLSIOCDARP\fP \(em delete arp entry"
.IX  "SIOCDARP delete arp entry"  ""  "\fLSIOCDARP\fP \(em delete arp entry"
.IX  "delete arp entry ioctl"  ""  "delete arp entry \fLioctl\fP \(em \fLSIOCDARP\fP"
.IX  "arp ioctl"  "SIOCDARP delete arp entry"  "arp \fLioctl\fP" "\fLSIOCDARP\fP \(em delete arp entry"
deletes an
.SM ARP
entry.  These ioctls may be applied to any socket descriptor
.IR s ,
but only by the super-user.  The
.B arpreq
structure contains:
.LP
.nf
.ft B
	/*
	 * ARP ioctl request
	 */
	struct arpreq {
		struct sockaddr	arp_pa;		/* protocol address */
		struct sockaddr	arp_ha;		/* hardware address */
		int	arp_flags;		/* flags */
	};
	/*  arp_flags field values */
	#define \s-1ATF_COM\s0		0x2	/* completed entry (arp_ha valid) */
	#define	\s-1ATF_PERM\s0		0x4	/* permanent entry */
	#define	\s-1ATF_PUBL\s0		0x8	/* publish (respond for other host) */
	#define	\s-1ATF_USETRAILERS\s0		0x10	/* send trailer packets to host */
.fi
.ft R
.LP
The address family for the
.B arp_pa
sockaddr must be
.BR \s-1AF_INET\s0 ;
for the
.B arp_ha
sockaddr it must be
.BR \s-1AF_UNSPEC\s0 .
The only flag bits which may be written are
.BR \s-1ATF_PERM\s0 ,
.SB ATF_PUBL
and
.BR \s-1ATF_USETRAILERS\s0 .
.SB ATF_PERM
makes the entry permanent if the
.B ioctl
call succeeds.
The peculiar nature of the
.SM ARP
tables may cause the
.B ioctl
to fail if more than 6 (permanent)
.SM IP
addresses hash to the same slot.
.SB ATF_PUBL
specifies that the
.SM ARP
code should respond to
.SM ARP
requests for the indicated host coming from
other machines.  This allows a host to act as an
``\s-1ARP\s0 server'' which may be useful in convincing an
.SM ARP\s0-only
machine to talk to a non-\s-1ARP\s0 machine.
.LP
.SM ARP
is also used to negotiate the use of trailer
.SM IP
encapsulations; trailers are an alternate
encapsulation used to allow efficient packet
alignment for large packets despite variable-sized
headers.  Hosts which wish to receive trailer
encapsulations so indicate
by sending gratuitous
.SM ARP
translation replies along with replies to
.SM IP
requests; they are also sent in reply to
.SM IP
translation replies.  The negotiation is thus
fully symmetrical, in that either or both hosts
may request trailers.  The
.SB ATF_USETRAILERS
flag is used to record the receipt of such a reply,
and enables the transmission of trailer packets to that host.
.LP
.SM ARP
watches passively for hosts impersonating the local host (that is, a host
which responds to an
.SM ARP
mapping request for the local host's address).
.SH SEE ALSO
.BR ec (4S),
.BR ie (4S),
.BR inet (4F),
.BR arp (8C),
.BR ifconfig (8C)
.LP
Plummer, Dave,
.RI `` "An Ethernet Address Resolution Protocol -or- Converting Network Protocol Addresses to 48.bit Ethernet Addresses for Transmission on Ethernet Hardware" ,''
.SM RFC
826, Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
November 1982. (Sun 800-1059-10)
.LP
Leffler, Sam, and Michael Karels,
.RI `` "Trailer Encapsulations" ,''
.SM RFC
893, Network Information Center,
.SM SRI
International, Menlo Park, Calif., April 1984.
.SH DIAGNOSTICS
.B "duplicate \s-1IP\s0 address!! sent from ethernet address: %x:%x:%x:%x:%x:%x."
.SM ARP
has discovered another host on the local network which responds to
mapping requests for its own Internet address.
.SH BUGS
.SM ARP
packets on the Ethernet use only 42 bytes of data, however, the smallest
legal Ethernet packet is 60 bytes (not including
.SM CRC\s0).
Some systems may not enforce the minimum packet size, others will.
.IX  "arp protocol"  ""  "\fLarp\fP \(em Address Resolution Protocol"  "" PAGE END
.IX  Internet  "to Ethernet address resolution arp"  ""  "to Ethernet address resolution \(em \fLarp\fP"  PAGE END
ocal network packet routing
\fBsd\fR	\fBsd\fR(4S)	 Disk driver for SCS./share/man/man4/bk.4                                                                                  755       0      12        10167  4424741450   7416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bk.4 1.15 89/03/27 SMI; from UCB 4.1
.TH BK 4 "9 October 1987"
.SH NAME
bk \- line discipline for machine-machine communication
.SH SYNOPSIS
.B pseudo-device bk
.SH DESCRIPTION
.IX  "bk device"  ""  "\fLbk\fP \(em machine-machine communication line discipline"  ""  PAGE START
.IX  "machine-machine communication line discipline"  ""  "machine-machine communication line discipline \(em \fLbk\fP"  ""  PAGE START
.IX  "line discipline"  ""  "line discipline \(em \fLbk\fP"  ""  PAGE START
.LP
This line discipline provides a replacement for the tty driver
.BR tty (4)
when high speed output to
and especially input from another machine is to be transmitted
over an asynchronous communications line.  The discipline
was designed for use by a (now obsolete) store-and-forward
local network running over serial lines.
It may be suitable for uploading of data from microprocessors into
the system.  If you are going to send data over asynchronous
communications lines at high speed into the system, you must
use this discipline, as the system otherwise may detect high
input data rates on terminal lines and disable the lines;
in any case the processing of such data when normal terminal
mechanisms are involved saturates the system.
.LP
The line discipline is enabled by a sequence:
.IX  "ioctls for terminals"  "TIOCSETD"  "\fLioctl\fP's for terminals"  "\fLTIOCSETD\fP \(em set line discipline"
.IX  "TIOCSETD set line discipline"  ""  "\fLTIOCSETD\fP \(em set line discipline"
.IX  set "line discipline ioctl \(em \fLTIOCSETD\fP"
.IX  "line discipline ioctls"  "TIOCSETD"  "line discipline \fLioctl\fP's" "\fLTIOCSETD\fP \(em set line discipline"
.IX  "bk ioctls"  "TIOCSETD"  "\fLbk ioctl\fP's" "\fLTIOCSETD\fP \(em set line discipline"
.LP
.nf
.ft B
	#include <sgtty.h>
	int ldisc = \s-1NETLDISC\s0, fildes; .\|.\|.
	ioctl(fildes, \s-1TIOCSETD\s0, &ldisc);
.fi
.ft R
.LP
A typical application program then reads a sequence of lines from
the terminal port, checking header and sequencing information on each
line and acknowledging receipt of each line to the sender, who then
transmits another line of data.  Typically several hundred bytes of
data and a smaller amount of control information will be received on
each handshake.
.LP
The old standard teletype discipline can be restored by doing:
.LP
.nf
.ft B
	ldisc = \s-1OTTYDISC\s0;
	ioctl(fildes, \s-1TIOCSETD\s0, &ldisc);
.fi
.ft R
.LP
While in networked mode, normal teletype output functions take place.
Thus, if an 8 bit output data path is desired, it is necessary
to prepare the output line by putting it into
.SM RAW
mode using
.BR ioctl (2).
.IX  "ioctls for terminals"  "TIOCGETD"  "\fLioctl\fP's for terminals"  "\fLTIOCGETD\fP \(em get line discipline"
.IX  "TIOCGETD get line discipline"  ""  "\fLTIOCGETD\fP \(em get line discipline"
.IX  get "line discipline \fLioctl\fP \(em \fLTIOCGETD\fP"
.IX  "line discipline ioctls"  "TIOCGETD"  "line discipline \fLioctl\fP's" "\fLTIOCGETD\fP \(em get line discipline"
.IX  "bk ioctls"  "TIOCGETD"  "\fLbk ioctl\fP's" "\fLTIOCGETD\fP \(em get line discipline"
This must be done
.I before
changing the discipline with
.BR \s-1TIOCSETD\s0 ,
as most
.BR ioctl (2)
calls are disabled while in network line-discipline mode.
.LP
When in network mode, input processing is very limited to reduce overhead.
Currently the input path is only 7 bits wide, with newline the only
character terminating an input record.
Each input record must be read and acknowledged before the next input
is read as the system refuses to accept any new data when there
is a record in the buffer.  The buffer is limited in length, but the
system guarantees to always be willing to accept input resulting in
512 data characters and then the terminating newline.
.LP
User level programs should provide sequencing and checksums on the
information to guarantee accurate data transfer.
.IX  "bk device"  ""  "\fLbk\fP \(em machine-machine communication line discipline"  ""  PAGE END
.IX  "machine-machine communication line discipline"  ""  "machine-machine communication line discipline \(em \fLbk\fP"  ""  PAGE END
.IX  "line discipline"  ""  "line discipline \(em \fLbk\fP"  ""  PAGE END
.SH "SEE ALSO"
.BR ioctl (2),
.BR tty (4)
ame server, the entries will be seen in the same order.
.br
.if t .ne 7
.IP
Under conditions of heavy server load or server failure, it
is possible for the domain to become unbound, then bound
once again (perhaps to a different server)
while a client is running.
This can cause a break in one of the enumeration rules;
specific entries may be seen twice by the client, or not at all.
This appr./share/man/man4/bwone.4s                                                                              755       0      12         2666  4424741450  10304                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bwone.4s 1.17 89/03/27 SMI;
.TH BWONE 4S "9 October 1987"
.SH NAME
bwone \- Sun-1 black and white frame buffer
.SH "CONFIG \(em SUN-2 SYSTEM"
.B "device bwone0 at mbmem ? csr 0xc0000 priority 3"
.SH DESCRIPTION
.IX  "bwone device"  ""  "\fLbwone\fP \(em Sun-1 black and white frame buffer"  ""  PAGE START
.IX  "frame buffer"  "bwone"  ""  "\fLbwone\fP \(em Sun-1 black and white frame buffer"  PAGE START
.IX  "monochrome frame buffer bwone"  ""  "monochrome frame buffer \(em \fLbwone\fP"  ""  PAGE START
.LP
The
.B bwone
interface provides access to Sun-1 system black and
white graphics controller boards.
It supports the ioctls described in
.BR fbio (4S).
.SH FILES
.PD 0
.TP 20
.B /dev/bwone[0-9]
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fb (4S),
.BR fbio (4S)
.SH BUGS
Use of vertical-retrace interrupts is not supported.
.LP
The video state returned by the
.SB FBIOGVIDEO
ioctl may be incorrect.  It
is not possible for the driver to determine the state of the hardware
video enable bit, so it reports the last state stored by the
.SB FBIOSVIDEO
ioctl.  User processes which map the frame buffer can directly enable or
disable the video, unknown to the driver.
.IX  "bwone device"  ""  "\fLbwone\fP \(em Sun-1 black and white frame buffer"  ""  PAGE END
.IX  "frame buffer"  "bwone"  ""  "\fLbwone\fP \(em Sun-1 black and white frame buffer"  PAGE END
.IX  "monochrome frame buffer bwone"  ""  "monochrome frame buffer \(em \fLbwone\fP"  ""  PAGE END
uffer bwone"  ""  "monochrome frame buffer \(em \fLbwone\fP"  ""  PAGE STA./share/man/man4/bwtwo.4s                                                                              755       0      12         5156  4424741450  10331                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bwtwo.4s 1.23 89/03/27 SMI;
.TH BWTWO 4S "25 March 1989"
.SH NAME
bwtwo \- Sun-3/Sun-2 black and white frame buffer
.SH "CONFIG \(em SUN-3/SUN-3x SYSTEMS"
.ft B
.nf
device bwtwo0 at obmem 1 csr 0xff000000 priority 4
device bwtwo0 at obmem 2 csr 0x100000 priority 4
device bwtwo0 at obmem 3 csr 0xff000000 priority 4
device bwtwo0 at obmem 4 csr 0xff000000
device bwtwo0 at obmem 7 csr 0xff000000 priority 4
device bwtwo0 at obmem ? csr 0x50300000 priority 4
.ft R
.fi
.LP
The first synopsis line given above is
used to generate a kernel for Sun-3/75,
Sun-3/140 or Sun-3/160 systems; the second, for a
Sun-3/50 system; the third, for a Sun-3/260
system; the fourth,
for a Sun-3/110 system; the fifth, for a Sun-3/60
system; and the sixth for Sun-3/80 and Sun-3/470 systems.
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device bwtwo0 at obmem 1 csr 0x700000 priority 4
device bwtwo0 at obio 2 csr 0x0 priority 4
.ft R
.fi
.LP
The first synopsis line given above
is used to generate a kernel for a Sun-2/120 or Sun-2/170 system; the
second, for a Sun-2/50 or Sun-2/160 system.
.\" Sun386i
.SH "CONFIG \(em Sun386i SYSTEM"
.ft B
.nf
device bwtwo0 at obmem ? csr 0xA0200000
.ft R
.\" Sun-5
.fi
.LP
.SH DESCRIPTION
.IX  "bwtwo device"  ""  "\fLbwtwo\fP \(em Sun-3/Sun-2 black and white frame buffer"  ""  PAGE START
.IX  "frame buffer"  "bwtwo"  ""  "\fLbwtwo\fP \(em Sun-3/Sun-2 black and white frame buffer"  PAGE START 
.IX  "monochrome frame buffer bwtwo"  ""  "monochrome frame buffer \(em \fLbwtwo\fP"  ""  PAGE START
.LP
The
.B bwtwo
interface provides access to Sun monochrome memory frame buffers.
It supports the ioctls described in
.BR fbio (4S).
.LP
If
.B "flags 0x1"
is specified, frame buffer write operations
are buffered through regular high-speed
.SM RAM\s0.
This \(lqcopy memory\(rq mode of operation speeds frame
buffer accesses, but consumes an extra 128K bytes
of memory.  Only Sun-2, Sun-3/75, and Sun-3/160
systems support copy memory; on other systems a
warning message is printed and the flag is ignored.
.LP
Reading or writing to the frame buffer is not
allowed \(em you must use the
.BR mmap (2)
system call to map the board into your address space.
.SH FILES
.PD 0
.TP 20
.B /dev/bwtwo[0-9]
device files
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR cgfour (4S),
.BR fb (4S),
.BR fbio (4S)
.SH BUGS
Use of vertical-retrace interrupts is not supported.
.IX  "bwtwo device"  ""  "\fLbwtwo\fP \(em Sun-3/Sun-2 black and white frame buffer"  ""  PAGE END
.IX  "frame buffer"  "bwtwo"  ""  "\fLbwtwo\fP \(em Sun-3/Sun-2 black and white frame buffer"  PAGE END
.IX  "monochrome frame buffer bwtwo"  ""  "monochrome frame buffer \(em \fLbwtwo\fP"  ""  PAGE END
or terminals"  "\fLTIOCGETD\fP \(em get line discipline"
.IX  "TIOCGETD get line discipline"  ""  "\fLTIOCGETD\fP \(em get line discipline"
.IX  get "line discipline \fLioctl\fP \(em \fLTIOCGETD\fP"
.IX  "line discipline ioctls"  "TIOCGETD"  "line discipline \fLioctl\fP's" "\fLTIOCGETD\fP \(em get line discipline"
.IX  "bk ioctls"  "TIOCGETD"  "\fLbk ioctl\fP's" "\fLTIOCGETD\fP \(em get line discipl./share/man/man4/cgeight.4s                                                                            755       0      12         5425  4424741450  10600                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgeight.4s 1.6 89/03/27 SMI;
.TH CGEIGHT 4S "22 March 1989"
.SH NAME
cgeight \- 24-bit color memory frame buffer
.SH "CONFIG \(em SUN-3 AND SUN-4 SYSTEMS"
.ft B
.nf
device cgeight0 at obmem 7 csr 0xff300000 priority 4
device cgeight0 at obio 4 csr 0xfb300000 priority 4
.fi
.ft R
.LP
The first synopsis line should be used to generate a
kernel for the Sun-3/60; the second synopsis for
a Sun-4/110 or Sun-4/150 system.
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device cgeight0 at obio ? csr 0x50300000 priority 4
.fi
.ft R
.SH DESCRIPTION
.IX  "cgeight device"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  ""  PAGE START
.IX  "color graphics interface"  "ccgeight"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  PAGE START
.LP
The
.B cgeight
is a 24-bit color memory frame buffer with a
monochrome overlay plane and an overlay enable
plane implemented optionally on the Sun-4/110,
Sun-4/150, Sun-3/60, Sun-3/470 and Sun-3/80 system models.  
It provides the standard frame buffer interface
as defined in
.BR fbio (4S).
.LP
In addition to the ioctls described under
.BR fbio (4S) ,
the
.B cgeight
interface responds to two
.BR cgeight -specific
colormap ioctls,
.SB FBIOPUTCMAP
and
.BR \s-1FBIOGETCMAP\s0 .
.SB FBIOPUTCMAP
returns no information other than success/failure
using the ioctl return value.
.SB FBIOGETCMAP
returns its information in the arrays pointed to by
the red, green, and blue members of its
.B fbcmap
structure argument;
.B fbcmap
is defined in
.B /usr/include/sun/fbio.h
as:
.RS
.nf
.ft B
struct fbcmap {
	int		index;		/* first element (0 origin) */
	int		count;		/* number of elements */
	unsigned char	*red;		/* red color map elements */
	unsigned char	*green;		/* green color map elements */
	unsigned char	*blue;		/* blue color map elements */
};
.ft R
.fi
.RE
.LP
The driver uses color board vertical-retrace
interrupts to load the colormap.
.LP
The systems have an overlay plane colormap,
which is accessed by encoding the plane group
into the index value with the
.SB PIX_GROUP
macro (see
.BR /usr/include/pixrect/pr_planegroups.h ).
.LP
When using the
.B mmap
system call to map in the
.B cgeight
frame buffer.
The device looks like:
.RS
.nf
.ft B
\s-1DACBASE\s0: 0x200000 	-> Brooktree Ramdac		16 bytes
	 0x202000 	-> P4 Regiter			 4 bytes
\s-1OVLBASE\s0: 0x210000	-> Overlay Plane		1152x900x1
	 0x230000	-> Overlay Enable Planea	1152x900x1
	 0x250000	-> 24-bit Frame Buffera		1152x900x32
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/cgeight0
.TP
.B /usr/include/sun/fbio.h
.TP
.B /usr/include/pixrect/pr_planegroups.h
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
.IX  "cgeight device"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  ""  PAGE END
.IX  "color graphics interface"  "cgeight"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  PAGE END
fLioctl\fP \(em \fLTIOCGETD\fP"
.IX  "line discipline ioctls"  "TIOCGETD"  "line discipline \fLioctl\fP's" "\fLTIOCGETD\fP \(em get line discipline"
.IX  "bk ioctls"  "TIOCGETD"  "\fLbk ioctl\fP's" "\fLTIOCGETD\fP \(em get line discipl./share/man/man4/cgfour.4s                                                                             755       0      12         4367  4424741450  10457                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgfour.4s 1.11 89/03/27 SMI;
.TH CGFOUR 4S "25 March 1989"
.SH NAME
cgfour \- Sun-3 color memory frame buffer
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
device cgfour0 at obmem 4 csr 0xff000000 priority 4
device cgfour0 at obmem 7 csr 0xff000000 priority 4
.fi
.ft R
.LP
The first synopsis line given should be used to
generate a kernel for the Sun-3/110 system;
and the second, for a Sun-3/60 system.
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device cgfour0 at obmem ? csr 0x50300000 priority 4
.fi
.ft R
.SH DESCRIPTION
.IX  "cgfour device"  ""  "\fLcgfour\fP \(em Sun-3 color memory frame buffer"  ""  PAGE START
.IX  "color graphics interface"  "cgfour"  ""  "\fLcgfour\fP \(em Sun-3 color memory frame buffer"  PAGE START
.LP
The
.B cgfour
is a color memory frame buffer with a monochrome
overlay plane and an overlay enable plane implemented
on the Sun-3/110 system and some Sun-3/60 system models.
It provides the standard frame buffer interface
as defined in
.BR fbio (4S).
.LP
In addition to the ioctls described under
.BR fbio (4S) ,
the
.B cgfour
interface responds to two
.BR cgfour -specific
colormap ioctls,
.SB FBIOPUTCMAP
and
.BR \s-1FBIOGETCMAP\s0 .
.SB FBIOPUTCMAP
returns no information other than success/failure
using the ioctl return value.
.SB FBIOGETCMAP
returns its information in the arrays pointed to by
the red, green, and blue members of its
.B fbcmap
structure argument;
.B fbcmap
is defined in
.B <sun/fbio.h>
as:
.RS
.nf
.ft B
struct fbcmap {
	int		index;		/* first element (0 origin) */
	int		count;		/* number of elements */
	unsigned char	*red;		/* red color map elements */
	unsigned char	*green;		/* green color map elements */
	unsigned char	*blue;		/* blue color map elements */
};
.ft R
.fi
.RE
The driver uses color board vertical-retrace
interrupts to load the colormap.
.LP
The Sun-3/60 system has an overlay plane colormap,
which is accessed by encoding the plane group
into the index value with the
.SB PIX_GROUP
macro (see
.BR <pixrect/pr_planegroups.h> ).
.SH FILES
.PD 0
.TP 20
.B /dev/cgfour0
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
.IX  "cgfour device"  ""  "\fLcgfour\fP \(em Sun-3 color memory frame buffer"  ""  PAGE END
.IX  "color graphics interface"  "cgfour"  ""  "\fLcgfour\fP \(em Sun-3 color memory frame buffer"  PAGE END
0000 priority 4
.fi
.ft R
.LP
The first synopsis line given should be used to
generate a kernel for the Sun-3/110 system;
and the second, for a Sun-3/60 system.
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device cgfour0 at obmem ? csr 0x50300000 priority 4
.fi
.ft R
./share/man/man4/cgone.4s                                                                              755       0      12         2425  4424741450  10256                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgone.4s 1.14 89/03/27 SMI;
.TH CGONE 4S "9 October 1987"
.SH NAME
cgone \- Sun-1 color graphics interface
.SH "CONFIG \(em SUN-2 SYSTEM"
.B "device cgone0 at mbmem ? csr 0xec000 priority 3"
.SH DESCRIPTION
.LP
.IX  "cgone device"  ""  "\fLcgone\fP \(em Sun-1 color graphics interface"  ""  PAGE START
.IX  "color graphics interface"  "cgone"  ""  "\fLcgone\fP \(em Sun-1 color graphics interface"  PAGE START
.LP
The
.B cgone
interface provides access to the Sun-1 system
color graphics controller board,
which is normally supplied with a 13'' or 19'' RS170
color monitor.  It provides the standard frame
buffer interface as defined in
.BR fbio (4S).
.LP
It supports the
.SB FBIOGPIXRECT
ioctl which allows SunView to be run on it; see
.BR fbio (4S)
.LP
The hardware consumes 16 kilobytes of Multibus
memory space.  The board starts at standard
addresses 0xE8000 or 0x\s-1EC\s0000.  The board
must be configured for interrupt level 3.
.SH FILES
.PD 0
.TP 20
.B /dev/cgone[0-9]
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
.SH BUGS
Use of color board vertical-retrace interrupts
is not supported.
.IX  "cgone device"  ""  "\fLcgone\fP \(em Sun-1 color graphics interface"  ""  PAGE END
.IX  "color graphics interface"  "cgone"  ""  "\fLcgone\fP \(em Sun-1 color graphics interface"  PAGE END
 ttcompat.4m     >  tty.4 at    ?  udp.4p .  ,  @  vme16d16.4s   @  A  vme16d32.4s   T  B  vme24d16.4s   h  C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc../share/man/man4/cgsix.4s                                                                              755       0      12         5041  4424741451  10276                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgsix.4s 1.4 89/04/12 SMI; new for 4.1
.TH CGSIX 4S "22 March 1989"
.SH NAME
cgsix \- low-end graphics accelerator with 8-bit color frame buffer
.SH "CONFIGURATION \(em SUN-3, SUN-4, and SUN-3x SYSTEMS"
.ft B
.nf
device cgsix0 at obmem ? csr 0xff000000 priority 4
device cgsix0 at obmem ? csr 0xfb000000 priority 4
device cgsix0 at obmem ? csr 0x50000000 priority 4
.fi
.ft R
.LP
The first synopsis line is used
for Sun-3 systems, the second for Sun-4
systems, and the third for Sun-3x systems.
.SH DESCRIPTION
.IX  "cgsix device"  ""  "\fLcgsix\fP \(em low-end graphics accelerator with color memory frame buffer"  ""  PAGE START
.IX  "color graphics interface"  "cgsix"  ""  "\fLcgsix\fP \(em Sun-3 color memory frame buffer"  PAGE START
.LP  
.BR cgsix (4S)
is a low-end, P4 graphics accelerator that
increases vector and polygon drawing performance.
It uses an 8-bit color frame buffer and provides
the standard frame buffer interface, as defined in
.BR fbio (4S).
.IX "P4" "S4"
.LP
In addition to the ioctls described under
.BR fbio ,
the
.B cgsix
interface responds to two
.BR cgsix -specific
colormap ioctls,
.SB FBIOPUTCMAP
and
.BR \s-1FBIOGETCMAP\s0 .
.SB FBIOPUTCMAP
returns no information other than success/failure
using the ioctl return value.
.SB FBIOGETCMAP
returns its information in the arrays pointed to by
the red, green, and blue members of its
.B fbcmap
structure argument;
.B fbcmap
is defined in
.B /usr/include/sun/fbio.h
as:
.RS
.nf
.ft B
struct fbcmap {
	int             index;  /* first element (0 origin) */
	int             count;  /* number of elements       */
	unsigned char   *red;   /* red color map elements   */
	unsigned char   *green; /* green color map elements */
	unsigned char   *blue;  /* blue color map elements  */
};
.ft R
.fi
.RE
.LP
The driver uses color board vertical-retrace
interrupts to load the colormap.
.LP
.B cgsix
contains memory that may be mapped in through
calls to the
.BR cgsixmmap (\|)
function.
Each portion of this memory is specified by an
offset from the base address that is
configured into the kernel.
The portions that may be mapped
are the colormap, the
.BR \s-1FBC/TEC\s0 ,
the
.BR \s-1FHC/THC\s0 ,
and the framebuffer.
The exact offsets are defined in
.BR /usr/includesundev/cg6reg.h.
.SH FILES
.PD 0
.TP 20
.B /dev/cgsix0
.TP 20
.B /usr/include/sundev/cg6reg.h
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
.IX "cgsix device"  ""  "\fLcgsix\fP \(em Sun-3 color memory frame buffer"  ""
.IX "color graphics interface"  "cgsix"  ""  "\fLcgsix\fP \(em low-end graphics accelerator with color memory frame buffer"
SEE ALSO
.BR mmap (2),
.BR fbio (4S)
.IX  "cgeight device"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  ""  PAGE END
.IX  "color graphics interface"  "cgeight"  ""  "\fLcgeight\fP \(em 24-bit color memory frame buffer"  PAGE END
fLioctl\fP \(em \fLTIOCGETD\fP"
.IX  "line discipline ioctls"  "TIOCGETD"  "line discipline \fLioctl\fP's" "\fLTIOCGETD\fP \(em get line discipline"
.IX  "bk ioctls"  "TIOCGETD"  "\fLbk ioctl\fP's" "\fLTIOCGETD\fP \(em get line discipl./share/man/man4/cgthree.4s                                                                            755       0      12         2555  4424741451  10611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgthree.4s	1.9 89/03/27 SMI;
.TH CGTHREE 4S "22 March 1989"
.SH NAME
cgthree \- Sun386i color memory frame buffer
.SH CONFIG
.ft B
.nf
device cgthree0 at obmem ? csr 0xA0400000
.fi
.ft R
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX  "cgthree device"  ""  "\fLcgthree\fP \(em Sun386i color memory frame buffer"
.IX  "color graphics interface"  "cgthree"  ""  "\fLcgthree\fP \(em Sun386i color memory frame buffer"
.B cgthree
is a color memory frame buffer.
It provides the standard frame buffer interface as defined in
.BR fbio (4S).
.LP
In addition to the ioctls described under
.BR fbio (4S) ,
the
.B cgthree
interface responds to two 
.BR cgthree -specific
colormap
.BR ioctl (2)
parameters,
.SB FBIOPUTCMAP and .SB FBIOGETCMAP.
.SB FBIOPUTCMAP
returns no information other than success/failure via the
.B ioctl
return value.
.SB FBIOGETCMAP
returns its information in the arrays pointed to by
the red, green, and blue members of its
.B fbcmap
structure argument;
.B fbcmap
is defined in
.B sun/fbio.h
as:
.RS
.nf
.ft B
struct fbcmap {
	int		index;		/* first element (0 origin) */
	int		count;		/* number of elements */
	unsigned char	*red;		/* red color map elements */
	unsigned char	*green;		/* green color map elements */
	unsigned char	*blue;		/* blue color map elements */
};
.fi
.ft
.RE
.SH FILES
.B "/dev/cgthree0"
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
 vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.  ./share/man/man4/cgtwo.4s                                                                              755       0      12         2304  4424741451  10303                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cgtwo.4s 1.20 89/03/27 SMI;
.TH CGTWO 4S "22 March 1989"
.SH NAME
cgtwo \- Sun-3/Sun-2 color graphics interface
.SH "CONFIG \(em SUN-3 SYSTEM"
.B cgtwo0 at vme24d16 ? csr 0x400000 priority 3
.SH "CONFIG \(em SUN-2 SYSTEM"
.B cgtwo0 at vme24 ? csr 0x400000 priority 3
.SH DESCRIPTION
.IX  "cgtwo device"  ""  "\fLcgtwo\fP \(em Sun-3/Sun-2 color graphics interface"  ""  PAGE START
.IX  "color graphics interface"  "cgtwo"  ""  "\fLcgtwo\fP \(em Sun-3/Sun-2 color graphics interface"  PAGE START
.LP
The
.B cgtwo
interface provides access to the Sun-3/Sun-2 system
color graphics controller board,
which is normally supplied with a 19'' 66 Hz non-interlaced color
monitor.
It provides the standard frame buffer interface as defined in
.BR fbio (4S).
.LP
The hardware consumes 4 megabytes of
.SM VME
bus address space.  The board
starts at standard address 0x400000.  The board must be configured for
interrupt level 4.
.SH FILES
.IX  "cgtwo device"  ""  "\fLcgtwo\fP \(em Sun-3/Sun-2 color graphics interface"  ""  PAGE END
.IX  "color graphics interface"  "cgtwo"  ""  "\fLcgtwo\fP \(em Sun-3/Sun-2 color graphics interface"  PAGE END
.PD 0
.TP 20
.B /dev/cgtwo[0-9]
.PD
.SH "SEE ALSO
.BR mmap (2),
.BR fbio (4S)
    =  ttcompat.4m     >  tty.4 at    ?  udp.4p .  ,  @  vme16d16.4s   @  A  vme16d32.4s   T  B  vme24d16.4s   h  C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K./share/man/man4/clone.4                                                                               755       0      12         2651  4424741451  10102                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clone.4 1.7 89/03/27 SMI; from S5
.TH CLONE 4 "24 November 1987"
.SH "NAME"
clone \- open any minor device on a STREAMS driver
.SH "DESCRIPTION"
.IX "clone device" "" "\fLclone\fP, \s-1STREAMS\s0 device driver"
.IX "STREAMS" clone "" "\fLclone\fP device driver"
.LP
.B clone
is a
.SM STREAMS
software driver that finds and opens an
unused minor device on another
.SM STREAMS
driver.  The minor device passed to
.B clone
during the open operation is interpreted as the major device number of
another
.SM STREAMS
driver for which an unused minor device is to be
obtained.
Each such open results in a separate stream to a previously
unused minor device.
.LP
The
.B clone
driver supports only an
.BR open (2V)
function.
This open function performs all of the necessary work so that
subsequent system calls (including
.BR close(2))
require no further involvement of the
.B clone
driver.
.SH ERRORS
.LP
.B clone
generates an
.SM ENXIO
error, without opening the device, if the minor device number provided
does not correspond to a valid major device, or if the driver indicated
is not a
.SM STREAMS
driver.
.SH "CAVEATS"
Multiple opens of the same minor device are not supported through the
.B clone
interface.  Executing
.BR stat (2)
on the file system node for a cloned device yields a
different result than does executing
.B fstat
using a file descriptor obtained from opening that node.
.SH SEE ALSO
.BR close (2),
.BR open (2V),
.BR stat (2)
 H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  ./share/man/man4/cons.4s                                                                               755       0      12           66  4424741451  10065                                                                                                                                                                                                                                                                                                                                                                      .so man4/console.4s
.\" @(#)cons.4s 1.6 89/03/27 SMI;
 des.4s    l    dkio.4s   |  	  drum.4      
  ec.4s  o      fb.4s um      fbio.4s     
  fd.4s s       filio.4       fpa.4s        gpone.4s         icmp.4p       ie.4s p        if.4n mp  0    inet.4f   @    intro.4   P    ip.4p 4   `    kb.4m tr  p    kbd.4s 4      kmem.4 4      kmem.4s       	ldterm.4m       le.4s s       list.4 4./share/man/man4/console.4s                                                                            755       0      12        47050  4424741451  10651                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)console.4s 1.33 89/03/27 SMI
.TH CONSOLE 4S "22 March 1989"
.SH NAME
console \- console driver and terminal emulator for the Sun workstation
.SH CONFIG
None; included in standard system.
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/console", mode);
.ft R
.fi
.SH DESCRIPTION
.IX  "console device"  ""  "\fLconsole\fP \(em console driver/terminal emulator"  ""  PAGE START
.IX  "terminal emulator"  ""  "terminal emulator \(em \fLconsole\fP"  ""  PAGE START
.IX  "ANSI terminal emulation"  ""  "ANSI terminal emulation \(em \fLconsole\fP"  ""  PAGE START
.LP
.B console
is an indirect driver for the Sun console terminal.
On a Sun workstation, this driver refers to
the workstation console driver, which implements
a standard
.SM UNIX
system terminal.  On a Sun server without a
keyboard or a frame buffer, this driver refers to the
.SM CPU
serial port driver
.RB ( zs (4S));
a terminal is normally connected to this port.
.LP
The workstation console does not support any of the
.BR termio (4)
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure or by the
.SM
.BR IGNBRK\*S ,
.SM
.BR IGNPAR\*S ,
.SM
.BR PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure, as these functions apply only to asynchronous serial
ports.  All other
.BR termio (4)
functions must be performed by
.SM STREAMS
modules pushed atop the driver; when a slave device is opened, the
.BR ldterm (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules are automatically pushed on top of the stream, providing the
standard
.BR termio (4)
interface.
.LP
The workstation console driver calls the
.SM PROM
resident monitor to output data to the console frame buffer.
Keystrokes from the
.SM CPU
serial port to which the keyboard is
connected are routed through the keyboard
.SM STREAMS
module
.RB ( kb (4M))
and treated as input.
.LP
When the Sun window system
.BR win (4S)
is active, console input is directed through
the window system rather
than being treated as input by the workstation
console driver.
.SH IOCTLS
.IX  "ioctls for terminals"  "TIOCCONS"  "\fLioctl\fP's for terminals"  "\fLTIOCCONS\fP \(em get console I/O"
.IX  "TIOCCONS get console I/O"  ""  "\fLTIOCCONS\fP \(em get console I/O"
.IX  get "console I/O \fLioctl\fP \(em \fLTIOCCONS\fP"
.IX  "console I/O ioctl, \fLTIOCCONS\fP"
.LP
An ioctl
.SB TIOCCONS
can be applied to pseudo-terminals
.RB ( pty (4))
to route output that would normally appear on the console to the
pseudo-terminal instead.  Thus, the window system does a
.SB TIOCCONS
on a pseudo-terminal so that the system will route console output to
the window to which that pseudo-terminal is connected,
rather than routing output through the
.SM PROM
monitor to the screen, since routing output through the
.SM PROM
monitor destroys the integrity of the screen.  Note:
when you use
.SB TIOCCONS
in this way, the console
.I input
is routed from the pseudo-terminal as well.
.LP
If a
.SB TIOCCONS
is performed on
.BR /dev/console ,
or the pseudo-terminal to which console output is being routed is
closed, output to the console will again be routed to the workstation
console driver.
.SH "ANSI STANDARD TERMINAL EMULATION"
.LP
.IX  "ANSI standard terminal emulation"  ""  ""  ""  PAGE START
.IX  "terminal emulation, ANSI"  ""  ""  ""  PAGE START
The Sun Workstation's
.SM PROM
monitor provides routines that emulates a standard
.SM ANSI
X3.64 terminal.
.LP
Note: the
.SM VT\s0100
also follows the
.SM ANSI
X3.64 standard but both the Sun and the
.SM VT\s0100
have nonstandard extensions to the
.SM ANSI
X3.64 standard.  The Sun terminal emulator and the
.SM VT\s0100
are
.I not
compatible in any true sense.
.LP
The Sun console displays 34 lines of 80
.SM ASCII
characters per line, with scrolling,
.RI ( x , " y" )
cursor
addressability, and a number of other control functions.
.LP
The Sun console displays a non-blinking block cursor which marks the
current line and character position on the screen.
.SM ASCII
characters between 0x20 (space) and 0x7E (tilde) inclusive are printing
characters \(em when one is
written to the Sun console (and is not part of an escape sequence),
it is displayed at the current cursor position and the
cursor moves one position to the right on the current line.  If the
cursor is already at the right edge of the screen, it moves to the
first character position on the next line.  If the cursor is already at
the right edge of the screen on the bottom line, the Line-feed function
is performed (see
.SM CTRL-J
below), which scrolls the screen up by one
or more lines or wraps around, before moving the cursor to the first
character position on the next line.
.LP
.B Control Sequence Syntax
.LP
The Sun console defines a number of control sequences which may occur in its
input.  When such a sequence is written to the Sun console, it is not
displayed on the screen, but effects some control function as
described below, for example, moves the cursor or sets a display mode.
.LP
Some of the control sequences consist of a single character.  The notation
.RS
\s-1CTRL-\fIX\fP\s0
.RE
for some character
.I X ,
represents a control character.
.LP
Other
.SM ANSI
control sequences are of the form
.RS
.nf
.RI "\s-1ESC\s0 [ " params char"
.fi
.RE
.LP
Spaces are included only for readability; these characters must
occur in the given sequence without the intervening spaces.
.LP
.PD 0
.TP
\s-1ESC\s0
represents the
.SM ASCII
escape character (\s-1ESC\s0, \s-1CTRL-[\s0, 0x1B).
.TP
[
The next character is a left square bracket `[' (0x5B).
.TP
.I params
are a sequence of zero or more decimal numbers
made up of digits between 0 and 9, separated by semicolons.
.TP
.I char
represents a function character, which is different for each control sequence.
.PD
.LP
Some examples of syntactically valid escape sequences are (again,
\s-1ESC\s0
represent the single
.SM ASCII
character `Escape'):
.RS
.nf
.ta 2.5i
\s-1ESC\s0\^[\^m	\fIselect graphic rendition with default parameter\fP
\s-1ESC\s0\^[\^7m	\fIselect graphic rendition with reverse image\fP
\s-1ESC\s0\^[\^33;54H	\fIset cursor position\fP
\s-1ESC\s0\^[\^123;456;0;;3;B	\fImove cursor down\fP
.fi
.RE
.LP
Syntactically valid
.SM ANSI
escape sequences which are not currently interpreted by the Sun
console are ignored.  Control characters which are not currently
interpreted by the Sun console are also ignored.
.LP
Each control function requires a specified number of parameters, as
noted below.  If fewer parameters are supplied, the remaining
parameters default to 1, except as noted in the descriptions below.
.LP
If more than the required number of parameters is supplied, only the
last
.I n
are used, where
.I n
is the number required by that particular command character.  Also,
parameters which are omitted or set to zero are reset to the default
value of 1 (except as noted below).
.LP
Consider, for example, the command character M which requires one
parameter.
\s-1ESC\s0\^[\^;M
and
\s-1ESC\s0\^[\^0M
and
\s-1ESC\s0\^[\^M
and
\s-1ESC\s0\^[\^23;15;32;1M
are all equivalent to
\s-1ESC\s0\^[\^1M
and provide a parameter value of 1.  Note:
\s-1ESC\s0\^[\^;5M
(interpreted as
`\s-1ESC\s0\^[\^5M')
is
.I not
equivalent to
\s-1ESC\s0\^[\^5;M
(interpreted as
`\s-1ESC\s0\^[\^5;1M')
which is ultimately interpreted as
`\s-1ESC\s0\^[\^1M').
.LP
In the syntax descriptions below, parameters are represented as
.RB ` # '
or
.RB ` #1;#2 '.
.LP
.B ANSI Control Functions
.LP
The following paragraphs specify the
.SM ANSI
control functions implemented by the Sun console.  Each description gives:
.RS
.TP 2
\(bu
the control sequence syntax
.TP 2
\(bu
the hex equivalent of control characters where applicable
.TP 2
\(bu
the control function name and
.SM ANSI
or Sun abbreviation (if any).
.TP 2
\(bu
description of parameters required, if any
.TP 2
\(bu
description of the control function
.TP 2
\(bu
for functions which set a mode, the initial setting of the mode.
The initial settings can be restored with the
.SM SUNRESET
escape sequence.
.RE
.LP
.B Control Character Functions
.LP
.ta 1.2i
.TP
\s-1CTRL-G\s0 (0x7)	Bell (\s-1BEL\s0)
The Sun Workstation Model 100 and 100U is not equipped with an audible
bell.  It `rings the bell' by flashing the entire screen.  The Sun-2
models have an audible bell which beeps.  The window system flashes the window.
.TP
\s-1CTRL-H\s0 (0x8)	Backspace (\s-1BS\s0)
The cursor moves one position to the left on the current line.  If it
is already at the left edge of the screen, nothing happens.
.TP
\s-1CTRL-I\s0 (0x9)	Tab (\s-1TAB\s0)
The cursor moves right on the current line to the next tab stop.  The
tab stops are fixed at every multiple of 8 columns.  If the cursor is
already at the right edge of the screen, nothing happens; otherwise the
cursor moves right a minimum of one and a maximum of eight character
positions.
.TP
\s-1CTRL-J\s0 (0xA)	Line-feed (\s-1LF\s0)
The cursor moves down one line, remaining at the same character
position on the line.  If the cursor is already at the bottom line, the
screen either scrolls up or ``wraps around'' depending on the setting of
an internal variable
.I S
(initially 1) which can be changed by the
\s-1ESC\s0\^[\^r
control sequence.  If
.I S
is greater than zero, the entire screen
(including the cursor) is scrolled up by
.I S
lines before executing
the line-feed.  The top
.I S
lines scroll off the screen and are lost.
.I S
new blank lines scroll onto the bottom of the screen.
After scrolling, the line-feed is executed by moving the cursor down
one line.
.IP
If
.I S
is zero, `wrap-around' mode is entered.
`\s-1ESC\s0 [ 1 r' exits
back to scroll mode.
If a line-feed occurs on the bottom line in wrap mode, the cursor goes to
the same character position in the top line of
the screen.  When any line-feed occurs, the line that the cursor moves
to is cleared.  This means that no scrolling occurs.  Wrap-around mode is not
implemented in the window system.
.IP
The screen scrolls as fast as possible depending on how much data is
backed up waiting to be printed.  Whenever a scroll must take place and the
console is in normal scroll mode
(`\s-1ESC\s0 [ 1 r'), it scans the rest of
the data awaiting printing to see how many line-feeds occur in it.  This
scan stops when any control character from the set
.RB { \s-1VT\s0 ,
.BR \s-1FF\s0 ,
.BR \s-1SO\s0 ,
.BR \s-1SI\s0 ,
.BR \s-1DLE\s0 ,
.BR \s-1DC\s01 ,
.BR \s-1DC\s02 ,
.BR \s-1DC\s03 ,
.BR \s-1DC\s04 ,
.BR \s-1NAK\s0 ,
.BR \s-1SYN\s0 ,
.BR \s-1ETB\s0 ,
.BR \s-1CAN\s0 ,
.BR \s-1EM\s0 ,
.BR \s-1SUB\s0 ,
.BR \s-1ESC\s0 ,
.BR \s-1FS\s0 ,
.BR \s-1GS\s0 ,
.BR \s-1RS\s0 ,
.BR \s-1US\s0 }
is found.  At that point, the screen is scrolled
by N lines (N \(>= 1) and processing continues.
The scanned text is still processed
normally to fill in the newly created lines.
This results in much faster scrolling with scrolling as long as no escape
codes or other control characters are intermixed with the text.
.IP
See also the discussion of the `Set scrolling'
.BR  (\s-1ESC\s0\^[\^r)
control function below.
.TP
\s-1CTRL-K\s0 (0xB)	Reverse Line-feed
The cursor moves up one line, remaining at the same character position
on the line.  If the cursor is already at the top line, nothing happens.
.TP
\s-1CTRL-L\s0 (0xC)	Form-feed (\s-1FF\s0)
The cursor is positioned to the Home position (upper-left corner) and
the entire screen is cleared.
.TP
\s-1CTRL-M\s0 (0xD)	Return (\s-1CR\s0)
The cursor moves to the leftmost character position on the current
line.
.LP
.B Escape Sequence Functions
.LP
.TP
\s-1CTRL-[\s0 (0x1B)	Escape (\s-1ESC\s0)
This is the escape character.  Escape initiates a multi-character
control sequence.
.TP
\s-1ESC\s0\^[\^#@	Insert Character (\s-1ICH\s0)
Takes one parameter, # (default 1).  Inserts #
spaces at the current
cursor position.  The tail of the current line starting at the current
cursor position inclusive is shifted to the right by #
character
positions to make room for the spaces.  The rightmost #
character
positions shift off the line and are lost.  The position of the cursor
is unchanged.
.TP
\s-1ESC\s0\^[\^#A	Cursor Up (\s-1CUU\s0)
Takes one parameter, # (default 1).  Moves the cursor up # lines.  If
the cursor is fewer than # lines from the top of the screen, moves the
cursor to the topmost line on the screen.  The character position of
the cursor on the line is unchanged.
.br
.ne 5
.TP
\s-1ESC\s0\^[\^#B	Cursor Down (\s-1CUD\s0)
Takes one parameter, # (default 1).  Moves the cursor down # lines.  If
the cursor is fewer than # lines from the bottom of the screen, move
the cursor to the last line on the screen.  The character position of
the cursor on the line is unchanged.
.TP
\s-1ESC\s0\^[\^#C	Cursor Forward (\s-1CUF\s0)
Takes one parameter, # (default 1).  Moves the cursor to the right by #
character positions on the current line.  If the cursor is fewer than #
positions from the right edge of the screen, moves the cursor to the
rightmost position on the current line.
.TP
\s-1ESC\s0\^[\^#D	Cursor Backward (\s-1CUB\s0)
Takes one parameter, # (default 1).  Moves the cursor to the left by #
character positions on the current line.  If the cursor is fewer than #
positions from the left edge of the screen, moves the cursor to the
leftmost position on the current line.
.TP
\s-1ESC\s0\^[\^#E	Cursor Next Line (\s-1CNL\s0)
Takes one parameter, # (default 1).  Positions the cursor at the
leftmost character position on the #-th line below the current line.
If the current line is less than # lines from the bottom of the screen,
positions the cursor at the leftmost character position on the bottom
line.
.TP
\s-1ESC\s0\^[\^#1;#2f	Horizontal And Vertical Position (\s-1HVP\s0)
.PD 0
or
.TP
\s-1ESC\s0\^[\^#1;#2H	Cursor Position (\s-1CUP\s0)
Takes two parameters, #1 and #2 (default 1, 1).  Moves the cursor to
the #2-th character position on the #1-th line.  Character positions
are numbered from 1 at the left edge of the screen; line positions are
numbered from 1 at the top of the screen.  Hence, if both parameters
are omitted, the default action moves the cursor to the home position
(upper left corner).  If only one parameter is supplied, the cursor moves to
column 1 of the specified line.
.PD
.TP
\s-1ESC\s0\^[\^J	Erase in Display (\s-1ED\s0)
Takes no parameters.  Erases from the current cursor position inclusive
to the end of the screen.  In other words, erases from the current
cursor position inclusive to the end of the current line and all lines
below the current line.  The cursor position is unchanged.
.TP
\s-1ESC\s0\^[\^K	Erase in Line (\s-1EL\s0)
Takes no parameters.  Erases from the current cursor position inclusive
to the end of the current line.  The cursor position is unchanged.
.TP
\s-1ESC\s0\^[\^#L	Insert Line (\s-1IL\s0)
Takes one parameter, # (default 1).  Makes room for # new lines
starting at the current line by scrolling down by # lines the portion
of the screen from the current line inclusive to the bottom.  The # new
lines at the cursor are filled with spaces; the bottom # lines shift
off the bottom of the screen and are lost.  The position of the cursor
on the screen is unchanged.
.TP
\s-1ESC\s0\^[\^#M	Delete Line (\s-1DL\s0)
Takes one parameter, # (default 1).  Deletes # lines beginning with the
current line.  The portion of the screen from the current line
inclusive to the bottom is scrolled upward by # lines.  The # new lines
scrolling onto the bottom of the screen are filled with spaces; the #
old lines beginning at the cursor line are deleted.  The position of
the cursor on the screen is unchanged.
.TP
\s-1ESC\s0\^[\^#P	Delete Character (\s-1DCH\s0)
Takes one parameter, # (default 1).  Deletes # characters starting with
the current cursor position.  Shifts to the left by # character
positions the tail of the current line from the current cursor position
inclusive to the end of the line.  Blanks are shifted into the
rightmost # character positions.  The position of the cursor on the
screen is unchanged.
.TP
\s-1ESC\s0\^[\^#m	Select Graphic Rendition (\s-1SGR\s0)
Takes one parameter, # (default 0).  Note: unlike most escape
sequences, the parameter defaults to zero if omitted.  Invokes the
graphic rendition specified by the parameter.  All following printing
characters in the data stream are rendered according to the parameter
until the next occurrence of this escape sequence in the data stream.
Currently only two graphic renditions are defined:
.RS
.TP 3
0
Normal rendition.
.TP 3
7
Negative (reverse) image.
.RE
.IP
Negative image displays characters as white-on-black if the screen mode
is currently black-on white, and vice-versa.  Any non-zero value of #
is currently equivalent to 7 and selects the negative image rendition.
.TP
\s-1ESC\s0\^[\^p	Black On White (\s-1SUNBOW\s0)
Takes no parameters.  Sets the screen mode to black-on-white.  If the
screen mode is already black-on-white, has no effect.  In this mode
spaces display as solid white, other characters as black-on-white.  The
cursor is a solid black block.  Characters displayed in negative image
rendition (see `Select Graphic Rendition' above) is white-on-black in
this mode.  This is the initial setting of the screen mode on reset.
.TP
\s-1ESC\s0\^[\^q	White On Black (\s-1SUNWOB\s0)
Takes no parameters.  Sets the screen mode to white-on-black.  If the
screen mode is already white-on-black, has no effect.  In this mode
spaces display as solid black, other characters as white-on-black.  The
cursor is a solid white block.  Characters displayed in negative image
rendition (see `Select Graphic Rendition' above) is black-on-white in
this mode.  The initial setting of the screen mode on reset is the
alternative mode, black on white.
.TP
\s-1ESC\s0\^[\^#r	Set scrolling (\s-1SUNSCRL\s0)
Takes one parameter, # (default 0).
Sets to # an internal register which
determines how many lines the screen scrolls up when a line-feed
function is performed with the cursor on the bottom line.  A parameter
of 2 or 3 introduces a small amount of ``jump'' when a scroll occurs.  A
parameter of 34 clears the screen rather than scrolling.  The initial setting is 1
on reset.
.IP
A parameter of zero initiates ``wrap mode'' instead of scrolling.  In
wrap mode, if a linefeed occurs on the bottom line, the cursor goes to
the same character position in the top line of the screen.  When any
linefeed occurs, the line that the cursor moves to is cleared.  This
means that no scrolling ever occurs.
`\s-1ESC\s0 [ 1 r'
exits back to scroll mode.
.IP
For more information, see the description of the Line-feed (\s-1CTRL-J\s0)
control function above.
.TP
\s-1ESC\s0\^[\^s	Reset terminal emulator (\s-1SUNRESET\s0)
Takes no parameters.  Resets all modes to default, restores current
font from
.SM PROM\s0.  Screen and cursor position are unchanged.
.IX  "ANSI standard terminal emulation"  ""  ""  ""  PAGE END
.IX  "terminal emulation, ANSI"  ""  ""  ""  PAGE END
.DT
.SH "4014 TERMINAL EMULATION"
.LP
The
.SM PROM
monitor for Sun models 100U and 150U provides the Sun
Workstation with the capability to emulate a subset of the Tektronix
4014 terminal.  This feature does not exist in other Sun
.SM PROM\s0s
and will be removed from models 100U and 150U in future Sun releases.
.BR tektool (1)
provides Tektronix 4014 terminal emulation and should be used instead
of relying on the capabilities of the
.SM PROM
monitor.
.SH FILES
.PD 0
.TP 20
.B /dev/console
.PD
.SH SEE ALSO
.BR tektool (1)
.BR kb (4M),
.BR pty (4),
.BR termio (4),
.BR ttcompat (4M),
.BR ldterm (4M),
.BR win (4S),
.BR zs (4S)
.LP
.SM ANSI
Standard X3.64,
.RI `` "Additional Controls for Use with \s-1ASCII\s0" '',
Secretariat:
.SM CBEMA\s0,
1828 L St., N.W., Washington, D.C.  20036.
.SH BUGS
.SB TIOCCONS
should be restricted to the owner of
.BR /dev/console .
.IX  "console device"  ""  "\fLconsole\fP \(em console driver/terminal emulator"  ""  PAGE END
.IX  "terminal emulator"  ""  "terminal emulator \(em \fLconsole\fP"  ""  PAGE END
.IX  "ANSI terminal emulation"  ""  "ANSI terminal emulation \(em \fLconsole\fP"  ""  PAGE END
ne-feed occurs, the line that the cursor moves
to is cleared.  This means that no scrolling occurs.  Wrap-around mode is not
implemented in the window system.
.IP
The screen scrolls as fast as possible depending on how much data is
backed up waiting to be printed.  Whenever a scroll must take place and the
console is in normal scroll mode
(`\s-1ESC\s0 [ 1 r'), it scans the rest of
the data awaiting printing to see how many line-feeds occur in it.  This
scan stops when./share/man/man4/des.4s                                                                                755       0      12         5133  4424741452   7737                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)des.4s 1.16 89/03/27 SMI;
.TH DES 4S "25 March 1989"
.SH NAME
des \- DES encryption chip interface
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
device des0 at obio ? csr 0x1c0000
.fi
.ft R
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device des0 at obio ? csr 0x66002000
.fi
.ft R
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
des0 at virtual ? csr 0xee1800
.fi
.ft R
.SH SYNOPSIS
.LP
.B #include <sys/des.h>
.SH DESCRIPTION
.IX  "des device"  ""  "\fLdes\fP \(em DES encryption chip interface"  ""  PAGE START
.IX  "encryption chip"  ""  "encryption chip \(em \fLdes\fP"  ""  PAGE START
.LP
The
.B des
driver provides a high level interface to the AmZ8068 Data Ciphering
Processor, a hardware implementation of the
.SM NBS
Data Encryption Standard.
.LP
The high level interface provided by this driver is hardware independent and
could be shared by future drivers in other systems.
.LP
The interface allows
access to two modes of the
.SM DES
algorithm:  Electronic Code Book (\s-1ECB\s0) and
Cipher Block Chaining (\s-1CBC\s0).
All access to the
.SM DES
driver is through
.BR ioctl (2)
calls rather than through reads and writes; all encryption
is done in-place in the user's buffers.
.SH IOCTLS
The ioctls provided are:
.TP
.SB DESIOCBLOCK
.IX  "ioctls for des encryption chip"  "DESIOCBLOCK"  "\fLioctl\fP's for des chip"  "\fLDESIOCBLOCK\fP \(em process block"
.IX  "DESIOCBLOCK process block"  ""  "\fLDESIOCBLOCK\fP \(em process block"
.IX  "process block ioctl"  ""  "process block \fLioctl\fP \(em \fLDESIOCBLOCK\fP"
This call encrypts/decrypts an entire buffer of data, whose address and length
are passed in the
.RB ` "struct desparams" '
addressed by the argument.  The length must be a multiple of 8 bytes.
.TP
.SB DESIOCQUICK
.IX  "ioctls for des encryption chip"  "DESIOCQUICK"  "\fLioctl\fP's for des chip"  "\fLDESIOCQUICK\fP \(em process quickly"
.IX  "DESIOCQUICK process quickly"  ""  "\fLDESIOCQUICK\fP \(em process quickly"
.IX  "process quickly ioctl"  ""  "process quickly \fLioctl\fP \(em \fLDESIOCQUICK\fP"
This call encrypts/decrypts a small amount of data quickly.  The data
is limited to
.SB DES_QUICKLEN
bytes, and must be a multiple of 8 bytes. Rather
than being addresses, the data is passed directly in the
.RB ` "struct desparams" '
argument.
.IX  "des device"  ""  "\fLdes\fP \(em DES encryption chip interface"  ""  PAGE END
.IX  "encryption chip"  ""  "encryption chip \(em \fLdes\fP"  ""  PAGE END
.SH FILES
.PD 0
.TP 20
.B /dev/des
.PD
.SH "SEE ALSO
.BR des (1),
.BR des_crypt (3)
.LP
.I
Federal Information Processing Standards Publication 46
.LP
.I AmZ8068
.I
.SM DCP
.I
Product Description, Advanced Micro Devices
Controls for Use with \s-1ASCII\s0" '',
Secretariat:
.SM CBEMA\s0,
1828 L St., N.W., Washington, D.C.  20036.
.SH BUGS
.SB TIOCCONS
should be restricted to the owner of
.BR /dev/console .
.IX  "console device"  ""  "\fLconsole\fP \(em console driver/terminal emulator"  ""  PAGE END
.IX  "terminal emulator"  ""  "terminal emulator \(em \fLconsole\fP"  ""  PAGE END
.IX  "ANSI terminal emulation"  ""  "ANSI terminal emul./share/man/man4/dkio.4s                                                                               755       0      12        10531  4424741452  10130                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dkio.4s 1.24 89/03/27 SMI;
.TH DKIO 4S "25 March 1989"
.SH NAME
dkio \- generic disk control operations
.SH DESCRIPTION
.IX  "dkio device"  ""  "\fLdkio\fP \(em disk control operations"
.IX  disk "control operations \(em \fLdkio\fP" 
.IX  "generic disk control operations"  ""  "generic disk control operations \(em \fLdkio\fP"
.LP
All Sun disk drivers support a set of
ioctl's for disk formatting and labeling operations.
Basic to these ioctl's are the definitions in
.BR <sun/dkio.h> :
.nf
.sp
.ft B
/*
* Structures and definitions for disk io control commands
*/
/* Disk identification */
struct dk_info {
	int	dki_ctlr;		/* controller address */
	short	dki_unit;		/* unit (slave) address */
	short	dki_ctype;		/* controller type */
	short	dki_flags;		/* flags */
};
/* controller types */
#define	\s-1DKC_UNKNOWN\s0	0
#define	\s-1DKC_SMD\s02180		1
#define	\s-1DKC_DSD\s05215		5
#define	\s-1DKC_XY\s0450		6
#define	\s-1DKC_ACB\s04000		7
#define \s-1DKC_MD\s021		8
#define \s-1DKC_CSS\s0	12
#define \s-1DKC_NEC\s0765	13	/* floppy on Sun386i */
/* flags */
#define	\s-1DKI_BAD\s0144	0x01	/* use \s-1DEC\s0 std 144 bad sector fwding */
#define	\s-1DKI_MAPTRK\s0	0x02	/* controller does track mapping */
#define	\s-1DKI_FMTTRK\s0	0x04	/* formats only full track at a time */
#define	\s-1DKI_FMTVOL\s0	0x08	/* formats only full volume at a time */
/* Definition of a disk's geometry */
struct dk_geom {
	unsigned short	dkg_ncyl;	/* # of data cylinders */
	unsigned short	dkg_acyl;	/* # of alternate cylinders */
	unsigned short	dkg_bcyl;	/* cyl offset (for fixed head area) */
	unsigned short	dkg_nhead;	/* # of heads */
	unsigned short	dkg_bhead;	/* head offset (for Larks, etc.) */
	unsigned short	dkg_nsect;	/* # of sectors per track */
	unsigned short	dkg_intrlv;	/* interleave factor */
	unsigned short	dkg_gap1;	/* gap 1 size */
	unsigned short	dkg_gap2;	/* gap 2 size */
	unsigned short	dkg_apc;	/* alternates per cyl (\s-1SCSI\s0 only) */
	unsigned short	dkg_extra[9];	/* for compatible expansion */
};
/* disk io control commands */
#define	\s-1DKIOCGGEOM\s0	_\s-1IOR\s0(d, 2, struct dk_geom)	/* Get geometry */
#define	\s-1DKIOCSGEOM\s0		_\s-1IOW\s0(d, 3, struct dk_geom)	/* Set geometry */
#define	\s-1DKIOCGPART\s0		_\s-1IOR\s0(d, 4, struct dk_map)	/* Get partition info */
#define	\s-1DKIOCSPART\s0		_\s-1IOW\s0(d, 5, struct dk_map)	/* Set partition info */
#define	\s-1DKIOCINFO\s0		_\s-1IOR\s0(d, 8, struct dk_info)	/* Get info */
#define	\s-1DKIOCWCHK\s0		_\s-1IOWR\s0(d, 115, int)	/* Toggle write check */
.fi
.ft R
.LP
.IX  "ioctls for disks"  "DKIOCGGEOM"  "" "\fLDKIOCGGEOM\fP \(em get disk geometry"
.IX  "DKIOCGGEOM get disk geometry"  ""  "\fLDKIOCGGEOM\fP \(em get disk geometry"
.IX  get "disk geometry ioctl \(em \fLDKIOCGGEOM\fP"
.IX  "ioctls for disks"  "DKIOCSGEOM"  ""  "\fLDKIOCSGEOM\fP \(em set disk geometry"
.IX  "DKIOCSGEOM set disk geometry"  ""  "\fLDKIOCSGEOM\fP \(em set disk geometry"
.IX  set "disk geometry ioctl \(em \fLDKIOCSGEOM\fP"
.IX  "ioctls for disks"  "DKIOCGPART"  ""  "\fLDKIOCGPART\fP \(em get disk partition info"
.IX  "DKIOCGPART get disk partition info"  ""  "\fLDKIOCGPART\fP \(em get disk partition info"
.IX  get "disk partition info ioctl \(em \fLDKIOCGPART\fP"
.IX  "ioctls for disks"  "DKIOCSPART"  ""  "\fLDKIOCSPART\fP \(em set disk partition info"
.IX  "DKIOCSPART set disk partition info"  ""  "\fLDKIOCSPART\fP \(em set disk partition info"
.IX  set "disk partition info \fLioctl\fP \(em \fLDKIOCSPART\fP"
.IX  "ioctls for disks"  "DKIOCINFO"  ""  "\fLDKIOCINFO\fP \(em get disk info"
.IX  "DKIOCINFO get disk info"  ""  "\fLDKIOCINFO\fP \(em get disk info"
.IX  get "disk info ioctl \(em \fLDKIOCINFO\fP"
.IX  "ioctls for disks"  "DKIOCWCHK"  ""  "\fLDKIOCWCHK\fP \(em disk write check"
.IX  "DKIOCWCHK disk write check"  ""  "\fLDKIOCWCHK\fP \(em disk write check"
.LP
The
.SB DKIOCINFO
ioctl returns a
.B dk_info
structure which tells the type of the controller
and attributes about how bad-block
processing is done on the controller.  The
.SB DKIOCGPART
and
.SB DKIOCSPART
get and set the controller's current notion of the partition
table for the disk (without changing the partition table on the disk itself),
while the
.SB DKIOCGGEOM
and
.SB DKIOCSGEOM
ioctl's do similar things for the
per-drive geometry information.
The
.SB DKIOCWCHK
enables or disables a disk's write check capabilities.
.SH "SEE ALSO"
.BR ip (4P),
.BR sd (4S),
.BR xy (4S),
.BR dkctl (8)
*/
	unsigned short	dkg_apc;	/* alternates per cyl (\s-1SCSI\s0 only) */
	unsigned short	dkg_extra[9];	/* for compatible expansion */
};
/* disk io control commands */
./share/man/man4/drum.4                                                                                755       0      12         2044  4424741452   7746                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)drum.4 1.12 89/03/27 SMI; from UCB 4.2
.TH DRUM 4 "24 November 1987"
.SH NAME
drum \- paging device
.SH CONFIG
None; included with standard system.
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>

open("/dev/drum", \fImode\fB);
.ft R
.fi
.SH DESCRIPTION
.IX  "drum device"  ""  "\fLdrum\fP \(em paging device"  ""  PAGE START
.IX  "paging device"  ""  "paging device \(em \fLdrum\fP"  ""  PAGE START
.LP
This file refers to the paging device in use
by the system.  This may actually be a subdevice
of one of the disk drivers, but in a system with
paging interleaved across multiple disk drives
it provides an indirect driver for the multiple drives.
.SH FILES
.PD 0
.TP 20
.B /dev/drum
.PD
.SH BUGS
.LP
Reads from the drum are not allowed across
the interleaving boundaries.
Since these only occur every .5Mbytes or so,
and since the system never allocates blocks
across the boundary, this is usually not a problem.
.IX  "drum device"  ""  "\fLdrum\fP \(em paging device"  ""  PAGE END
.IX  "paging device"  ""  "paging device \(em \fLdrum\fP"  ""  PAGE END
termios.4     <  tm.4s     =  ttcompat.4m     >  tty.4 m     ?  udp.4p    ,  @  vme16d16.4s   @  A  vme16d32.4s   T  B  vme24d16.4s   h  C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s s     G  vpc.4s      H  win.4s 2    I  xd.4s  4    J  xt.4s  .    K  xy.4s n.     L  zero.4s      M  zs.4s s  DKIOCGPART
and
.SB DKIOCSPART
get and set the controller's current notion o./share/man/man4/ec.4s                                                                                 755       0      12         4532  4424741452   7555                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ec.4s 1.21 89/03/27 SMI;
.TH EC 4S "9 October 1987"
.SH NAME
ec \- 3Com 10 Mb/s Ethernet interface
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device ec0 at mbmem ? csr 0xe0000 priority 3
device ec1 at mbmem ? csr 0xe2000 priority 3
.ft R
.fi
.SH DESCRIPTION
.IX  "ec device"  ""  "\fLec\fP \(em 3Com 10 Mb/s Ethernet interface"  ""  PAGE START
.IX  "3Com 10 Mb/s Ethernet interface ec"  ""  "3Com 10 Mb/s Ethernet interface \(em \fLec\fP"  ""  PAGE START
.IX  "10 Mb/s 3Com Ethernet interface ec"  ""  "10 Mb/s 3Com Ethernet interface \(em \fLec\fP"  ""  PAGE START
.IX  "Ethernet controller"  "ec"  ""  "\fLec\fP \(em 10 Mb/s 3Com Ethernet interface"  PAGE START
.LP
The
.B ec
interface provides access to a 10 Mb/s Ethernet
network through a 3\s-1COM\s0 controller.
For a general description of network interfaces see
.BR if (4N).
.LP
The hardware consumes 8 kilobytes of Multibus memory space.
This memory is used for internal buffering by the board.
The board starts at standard addresses 0xE0000 or 0xE2000.  The board
must be configured for interrupt level 3.
.LP
The interface software implements an exponential backoff algorithm
when notified of a collision on the cable.
.LP
The interface handles the Internet protocol family,
with the interface address maintained in Internet format.
The Address Resolution Protocol
.BR arp (4P)
is used to map 32-bit Internet addresses used in
.BR inet (4F)
to the 48-bit addresses used on the Ethernet.
.SH DIAGNOSTICS
.TP 10
.B ec%d: Ethernet jammed
After 16 failed transmissions and
backoffs using the
exponential backoff algorithm, the packet was dropped.
.TP
.B ec%d: can't handle af%d
The interface was handed a message with
addresses formatted in an unsuitable address
family; the packet was dropped.
.SH SEE ALSO
.BR arp (4P),
.BR if (4N),
.BR inet (4F)
.\".br
.\"3COM 3C400 Multibus Ethernet Controller Reference Manual (Sun 800-0398)
.SH BUGS
The interface hardware is not capable of talking to itself, making
diagnosis more difficult.
.IX  "ec device"  ""  "\fLec\fP \(em 3Com 10 Mb/s Ethernet interface"  ""  PAGE END
.IX  "3Com 10 Mb/s Ethernet interface ec"  ""  "3Com 10 Mb/s Ethernet interface \(em \fLec\fP"  ""  PAGE END
.IX  "10 Mb/s 3Com Ethernet interface ec"  ""  "10 Mb/s 3Com Ethernet interface \(em \fLec\fP"  ""  PAGE END
.IX  "Ethernet controller"  "ec"  ""  "\fLec\fP \(em 10 Mb/s 3Com Ethernet interface"  PAGE END
INFO\s0		_\s-1IOR\s0(d, 8, struct dk_info)	/* Get info */
#define	\s-1DKIOCWCHK\s0		_\s-1IOWR\s0(d, 115, int)	/* Toggle write check */
.fi
.ft R
.LP
.IX  "ioctls for ./share/man/man4/fb.4s                                                                                 755       0      12         2512  4424741452   7551                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fb.4s 1.14 89/03/27 SMI;
.TH FB 4S "9 October 1987"
.SH NAME
fb \- driver for Sun console frame buffer
.SH CONFIG
None; included in standard system.
.SH DESCRIPTION
.IX  "fb device"  ""  "\fLfb\fP \(em Sun console frame buffer driver"  ""  PAGE START
.LP
The
.B fb
driver provides indirect access to a
Sun graphics controller board.
It is an indirect driver for the Sun workstation console's frame buffer.
At boot time, the workstation's frame buffer device is determined
from information from the
.SM PROM
monitor and set to be the one that
.B fb
will indirect to.
The device driver for the console's frame buffer must be configured
into the kernel so that this indirect driver can access it.
.LP
The idea behind this driver is that user programs can open a known device,
query its characteristics and access it in a device dependent way,
depending on the type.
.B fb
redirects
.BR open (2V),
.BR close (2),
.BR ioctl (2),
and
.BR mmap (2)
calls to the real frame buffer.
All of the Sun frame buffers support the same general interface; see
.BR fbio (4S)
.IX  "fb device"  ""  "\fLfb\fP \(em Sun console frame buffer driver"  ""  PAGE END
.SH FILES
.PD 0
.TP 20
.B /dev/fb
.PD
.SH "SEE ALSO"
.BR close (2),
.BR ioctl (2),
.BR mmap (2),
.BR open (2V),
.BR bwone (4S),
.BR bwtwo (4S),
.BR cgone (4S),
.BR cgtwo (4S),
.BR fbio (4S),
.BR gpone (4S)
.4s  2    K  xy.4s  4     L  zero.4s      M  zs.4s s t addresses used on the Ethernet.
.SH DIAGNOSTICS
.TP 10
.B ec%d: Ethernet jammed
After 16 failed transmissions and
./share/man/man4/fbio.4s                                                                               755       0      12         6505  4424741452  10107                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fbio.4s 1.24 89/03/27 SMI;
.TH FBIO 4S "25 March 1989"
.SH NAME
fbio \- general properties of frame buffers
.SH DESCRIPTION
.IX  "fbio device"  ""  "\fLfbio\fP \(em frame buffers general properties"  ""  PAGE START
.LP
All of the Sun frame buffers support the same general interface.
Each responds to a
.SB FBIOGTYPE
ioctl which returns information in a structure defined in
.BR <sun/fbio.h> :
.RS
.nf
.ft B
struct	fbtype {
	int	fb_type;      	/* as defined below */
	int	fb_height;	/* in pixels */
	int	fb_width;	/* in pixels */
	int	fb_depth;	/* bits per pixel */
	int	fb_cmsize;	/* size of color map (entries) */
	int	fb_size;      	/* total size in bytes */
};
.sp .5
#define \s-1FBTYPE_SUN1BW\s0         	0
#define \s-1FBTYPE_SUN1COLOR\s0	1
#define \s-1FBTYPE_SUN2BW\s0         	2
#define \s-1FBTYPE_SUN2COLOR\s0	3
#define \s-1FBTYPE_SUN2GP\s0	4
#define \s-1FBTYPE_SUN5COLOR\s0	5
#define \s-1FBTYPE_SUN3COLOR\s0	6
#define \s-1FBTYPE_MEMCOLOR\s0	7
#define \s-1FBTYPE_SUN4COLOR\s0	8
.ft R
.fi
.RE
.LP
Each device has an
.SB FBTYPE
which is used by higher-level software
to determine how to perform raster-op and other functions.  Each
device is used by opening it, doing an
.SB FBIOGTYPE
ioctl to
see which frame buffer type is present, and thereby selecting the
appropriate device-management routines.
.LP
Full-fledged frame buffers (that is,
those that run SunView) implement an
.SB FBIOGPIXRECT
ioctl, which returns a pixrect.
This call is made only from inside the kernel.
The returned pixrect is used by
.BR win (4S)
for cursor tracking and colormap loading.
.LP
.SB FBIOSVIDEO
and
.SB FBIOGVIDEO
are general-purpose ioctls for controlling
possible video features of frame buffers.
They are defined in
.BR <sun/fbio.h> .
These ioctls either set or return the value
of a flags integer.
At this point, only the
.SB FBVIDEO_ON
option is available, controlled by
.BR \s-1FBIOSVIDEO\s0 .
.SB FBIOGVIDEO
returns the current video state.
.LP
The
.SB FBIOSATTR
and
.SB FBIOGATTR
ioctls allow access to special features of
newer frame buffers.
They use the following structures as defined in
.BR <sun/fbio.h>\^ :
.LP
.RS
.nf
.ft B
#define	\s-1FB_ATTR_NDEVSPECIFIC\s0	8	/* no. of device specific values */
#define	\s-1FB_ATTR_NEMUTYPES\s0	4	/* no. of emulation types */
struct fbsattr {
	int	flags;				/* misc flags */
#define	\s-1FB_ATTR_AUTOINIT\s0		1	/* emulation auto init flag */
#define	\s-1FB_ATTR_DEVSPECIFIC\s0	2	/* dev. specific stuff valid flag */
	int	emu_type;			/* emulation type (\-1 if unused) */
	int	dev_specific[\s-1FB_ATTR_NDEVSPECIFIC\s0];	/* catchall */
};
struct fbgattr {
	int	real_type;			/* real device type */
	int	owner;				/* PID of owner, 0 if myself */
	struct fbtype fbtype;			/* fbtype info for real device */
	struct fbsattr sattr;			/* see above */
	int	emu_types[\s-1FB_ATTR_NEMUTYPES\s0];	/* possible emulations */
						/* (\-1 if unused) */
};
.ft R
.fi
.RE
.SH "SEE ALSO"
.BR mmap (2),
.BR bwone (4S),
.BR bwtwo (4S),
.BR cgeight (4S),
.BR cgfour (4S),
.BR cgone (4S),
.BR cgtwo (4S),
.BR fb (4S),
.BR gpone (4S),
.BR win (4S)
.IX  "fbio device"  ""  "\fLfbio\fP \(em frame buffers general properties"  ""  PAGE END
.SH BUGS
.LP
.SB FBIOSATTR
and
.SB FBIOGATTR
are only supported by the
.BR cgfour (4S)
and
.BR cgeight (4S)
frame buffers.
.LP
The
.SB FBVIDEO_ON
flag my be incorrect for
Sun-1 system black and white frame buffers; see
.BR bwone (4S).
 console driver/terminal emulator"  ""  PAGE END
.IX  "terminal emulator"  ""  "terminal emulator \(em \fLconsole\fP"  ""  PAGE END
.IX  "ANSI terminal emulation"  ""  "ANSI terminal emul./share/man/man4/fd.4s                                                                                 755       0      12         5022  4424741453   7553                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fd.4s	1.9 89/03/27 SMI;
.TH FD 4S "25 March 1989"
.SH NAME
fd \- Disk driver for Floppy Disk Controllers
.SH "CONFIG \(em Sun386i SYSTEMS"
.nf
.ft B
controller fdc0 at atmem ? csr 0x1000 dmachan 2 irq 6 priority 2
disk fd0 at fdc0 drive 0 flags 0
.SH "CONFIG \(em SUN-3x SYSTEMS"
.mf
.ft B
controller fdc0 at obio ? csr 0x6e000000 priority 6 vector fdintr 0x5c
.ft R
.fi
.LP
This synopsis should be used to generate a kernel for
a Sun-3/80 system only.
.SH AVAILABILITY
Sun386i and Sun-3/80 systems only.
.SH DESCRIPTION
.IX  "Sun floppy disk driver"  ""  "Sun floppy disk driver \(em \fLfd\fP"
.IX  "disk driver"  "Sun floppy"  ""  "\fLfd\fP \(em Sun floppy"
.LP
The block-files access the disk using the system's normal
buffering mechanism and may be read and written without regard to
physical disk records.  There is also a `raw' interface
that provides for direct transmission between the disk
and the user's read or write buffer.
A single read or write call usually results in one I/O operation;
therefore raw I/O is considerably more efficient when
many words are transmitted.  The names of the raw files conventionally
begin with an extra `r.'
.LP
.SS "Disk Support"
The
.B fd0
partition on a floppy disk is normally used for the file system.  
.SH FILES
.LP
1.44 MB Floppy Disk Drives:
.TP 20
.B /dev/fd0a
.PD 0
block file
.TP
.B /dev/fd0c
block file
.B /dev/rfd0a
raw file
.B /dev/rfd0c
raw file
.PD
.LP
720 K Floppy Disk Drives:
.TP 20
.B /dev/fdl0a
block file
.PD 0
.TP 20
.B /dev/fdl0c
block file
.TP
.B /dev/rfdl0a
raw file
.TP
.B /dev/rfdl0c
raw file
.PD
.SH SEE ALSO
.BR dkio (4S)
.SH DIAGNOSTICS
.TP
.ft B
fd drv %d, trk %d: %s
.ft R
A command such as read or write encountered a format-related  error condition.
The value of
.I %s
is derived from the error number 
given by the controller, indicating the nature of the error. 
The track number is relative to the beginning of the partition involved.
.LP
.TP
.B "fd drv %d, blk %d: %s"
A command such as read or write encountered an error condition related to
I/O.  The value of
.I %s
is derived from the error number returned by the
controller and indicates the nature of the error. 
The block number is relative
to the start of the partition involved.
.TP
.B "fd controller: %s"
An error occurred in the controller.
The value of 
.I %s
is derived from the status returned by the controller
and specifies the error encountered.
.LP
.TP
.B "fd(%d):%s please insert"
I/O was attempted while the floppy drive door was not latched. 
The value of
.I %s
indicates which disk was expected to be in the drive.
"  ""  "\fLfbio\fP \(em frame buffers general properties"  ""  PAGE END
.SH BUGS
.LP
.SB FBIOSATTR
and
.SB FBIOGATTR
are only supported by the
.BR cgfour (4S)
and
.BR cgeight (4S)
frame buffers.
.LP
The
.SB FBVIDEO_ON
flag my be incorrect for
Sun-1 system black and white frame buffers; see
.BR bwone (4S).
 console driver/terminal emulator"  ""  PAGE END
.IX  "terminal emulator"  ""  "terminal emulator \(em \fLconsole\fP"  ""  PAGE END
.IX  "ANSI terminal emulation"  ""  "ANSI terminal emul./share/man/man4/filio.4                                                                               755       0      12         7634  4424741453  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)filio.4 1.7 89/03/27 SMI;
.TH FILIO 4 "23 November 1987"
.SH NAME
filio \- ioctls that operate directly on files, file descriptors, and sockets
.SH SYNOPSIS
.nf
.B #include <sys/filio.h>
.fi
.SH DESCRIPTION
.LP
The
.SM IOCTL\s0's
listed in this manual page apply directly to files, file
descriptors, and sockets, independent of any underlying device
or protocol.
.LP
Note: the
.BR fcntl (2V)
system call is the primary method for operating on
file descriptors as such, rather than on the underlying files.
.SS IOCTLS for File Descriptors
.TP 20
.B FIOCLEX
.IX  "FIOCLEX set close-on-exec flag for fd"  ""  "\fLFIOCLEX\fP \(em set close-on-exec flag for fd"
.IX  set "close-on-exec for fd \fLioctl\fP \(em \fLFIOCLEX\fP"
.IX  "ioctls for files"  "FIOCLEX"  "\fLioctl\fP's for files"  "\fLFIOCLEX\fP \(em set close-on-exec for fd"
The argument is ignored.
Set the close-on-exec flag for the file descriptor passed to
.BR ioctl .
This flag is also manipulated by the
.SB F_SETFD
command of
.BR fcntl (2V).
.TP 20
.B FIONCLEX
.IX  "FIONCLEX remove close-on-exec flag"  ""  "\fLFIONCLEX\fP \(em remove close-on-exec flag"
.IX  remove "close-on-exec flag \fLioctl\fP \(em \fLFIONCLEX\fP"
.IX  "ioctls for files"  "FIONCLEX"  "\fLioctl\fP's for files"  "\fLFIONCLEX\fP \(em remove close-on-exec flag"
The argument is ignored.
Clear the  close-on-exec flag for the file descriptor passed to
.BR ioctl .
.SS IOCTLs for Files
.TP 20
.B FIONREAD
.IX  "FIONREAD get # bytes to read"  ""  "\fLFIONREAD\fP \(em get # bytes to read"
.IX  get "count of bytes to read \fLioctl\fP \(em \fLFIONREAD\fP"
.IX  "ioctls for files"  "FIONREAD"  "\fLioctl\fP's for files"  "\fLFIONREAD\fP \(em get # bytes to read"
The argument is a pointer to a
.BR long .
Set the value of that
.B long
to the number of immediately readable characters from whatever the descriptor
passed to
.B ioctl
refers to.  This works for files, pipes, sockets, and terminals.
.TP 20
.B FIONBIO
.IX  "FIONBIO set/clear non-blocking I/O"  ""  "\fLFIONBIO\fP \(em set/clear non-blocking I/O"
.IX  set/clear "non-blocking I/O \fLioctl\fP \(em \fLFIONBIO\fP"
.IX  "ioctls for files"  "FIONBIO"  "\fLioctl\fP's for files"  "\fLFIONBIO\fP \(em set/clear non-blocking I/O"
The argument is a pointer to an
.BR int .
Set or clear non-blocking I/O.
If the value of that
.B int
is a 1 (one) the descriptor is set for non-blocking I/O.
If the value of that
.B int
is a 0 (zero) the descriptor is cleared for non-blocking I/O.
.TP 20
.B FIOASYNC
.IX  "FIOASYNC set/clear async I/O"  ""  "\fLFIOASYNC\fP \(em set/clear async I/O"
.IX  set/clear "async I/O \fLioctl\fP \(em \fLFIOASYNC\fP"
.IX  "ioctls for files"  "FIOASYNC"  "\fLioctl\fP's for files"  "\fLFIOASYNC\fP \(em set/clear async I/O"
The argument is a pointer to an
.BR int .
Set or clear asynchronous I/O.  If the value of that
.B int
is a 1 (one) the descriptor is set for asynchronous I/O.
If the value of that
.B int
is a 0 (zero) the descriptor is cleared for asynchronous I/O.
.TP 20
.B FIOSETOWN
.IX  "FIOSETOWN set file owner"  ""  "\fLFIOSETOWN\fP \(em set file owner"
.IX  set "file owner \fLioctl\fP \(em \fLFIOSETOWN\fP"
.IX  "ioctls for files"  "FIOSETOWN"  "\fLioctl\fP's for files"  "\fLFIOSETOWN\fP \(em set owner"
The argument is a pointer to an
.BR int .
Set the process-group ID that will subsequently receive
.SB SIGIO
or
.SB SIGURG
signals for the object referred to by the descriptor passed to
.B ioctl
to the value of that
.BR int .
.TP 20
.B FIOGETOWN
.IX  "FIOGETOWN get file owner"  ""  "\fLFIOGETOWN\fP \(em get file owner"
.IX  get "file owner \fLioctl\fP \(em \fLFIOGETOWN\fP"
.IX  "ioctls for files"  "FIOGETOWN"  "\fLioctl\fP's for files"  "\fLFIOGETOWN\fP get owner"
The argument is a pointer to an
.BR int .
Set the value of that
.B int
to the process-group
.SM ID
that is receiving
.SB SIGIO
or
.SB SIGURG
signals for the object referred to by the descriptor passed to
.BR ioctl .
.SH SEE ALSO
.BR ioctl (2),
.BR fcntl (2V),
.BR getsockopt (2),
.BR sockio (4)
BR ioctl .
This flag is also manipulated by the
.SB F_SETFD
command of
.BR fcntl (2V).
.TP 20
.B FIO./share/man/man4/fpa.4s                                                                                755       0      12         6447  4424741453   7744                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fpa.4s 1.9 89/03/27 SMI;
.TH FPA 4S "22 March 1989"
.SH NAME
fpa \- Sun-3/Sun-3x floating-point accelerator
.SH "CONFIG \(em SUN-3/SUN-3X SYSTEM"
.B fpa0 at virtual ? csr 0xe0000000
.SH SYNOPSIS
.nf
.ft B
#include <sundev/fpareg.h>
open("/dev/fpa", flags);
.ft R
.fi
.SH DESCRIPTION
.IX "fpa device" "" "\fLfpa\fP, floating-point accelerator"
.IX "floating-point accelerator, \fLfpa\fP"
.LP
.SM FPA
and
.SM FPA+
are compatible floating point accelerators available
on certain Sun-3 and Sun-3x systems.
They provide hardware contexts for
simultaneous use by up to 32 processes.
The same
.B fpa
device driver manages either
.SM FPA
or
.SM FPA\s0+
hardware.
.LP
Processes access the device using
.BR open (2)
and
.BR close (2)
system calls,
and the
.SM FPA
is automatically mapped into the process' address
space by SunOS.
This is normally
provided transparently at compile time
by a compiler option, such as the
.B \-ffpa
option to
.BR cc (1V).
.LP
The valid
.BR ioctl (2)
system calls are used only by diagnostics and by system administration
programs, such as
.BR fpa_download (8).
.SH IOCTLS
.TP 25
.SB FPA_ACCESS_OFF
Clear
.SB FPA_ACCESS_BIT
in
.SM FPA
state register to disable
access to constants
.SM RAM
using
.SM FPA
load pointer.
.TP
.SB FPA_ACCESS_ON
Set
.SB FPA_ACCESS_BIT
in
.SM FPA
state register to enable
access to constants
.SM RAM
using
.SM FPA
load pointer.
.TP
.SB FPA_FAIL
Disable the
.SM FPA\s+1.
.TP
.SB FPA_GET_DATAREGS
Return the contents of 8
.SM FPA 
registers.
.TP
.SB FPA_INIT_DONE
Called when downloading is complete.
Allows multiple users to access the
.SM FPA\s+1.
.TP
.SB FPA_LOAD_OFF
Set
.SB FPA_LOAD_BIT
in
.SM FPA
state register to disable
access to microstore or map
.SM RAM
via
.SM FPA
load pointer.
.TP
.SB FPA_LOAD_ON
Set
.SB FPA_LOAD_BIT
in
.SM FPA
state register to enable
access to microstore or map
.SM RAM
using
.SM FPA
load pointer.
.LP
The following two ioctls are for diagnostic use only.
.B fpa
must be compiled with
.SB FPA_DIAGNOSTICS_ONLY
defined to enable these two calls.
.TP 25
.SB FPA_WRITE_STATE
Overwrite the
.SM FPA
state register.
.TP
.SB FPA_WRITE_HCP
Write to the hard clear pipe register.
.SH ERRORS
.LP
The following error messages are returned by
.B open
system calls only.
.TP 15
.SM EBUSY
All 32
.SM FPA
contexts are being used.
.TP
.SM EEXIST
The current process has already opened
.BR /dev/fpa .
.TP
.SM EIO
Downloading has not completed,
so only 1 root process can have the
.SM FPA
open at a time.
.TP
.SM ENETDOWN
.SM FPA
is disabled.
.TP
.SM ENOENT
68881 chip does not exist.
.TP
.SM ENXIO
.SM FPA
board does not exist.
.LP
The following error messages are returned
by
.B ioctl
system calls only.
.TP 15
.SM EINVAL
Invalid ioctl.  This may occur if diagnostic only
ioctls,
.SB FPA_WRITE_STATE
or
.BR \s-1FPA_WRITE_HCP\s+1 ,
are used with a driver which didn't compile
in those calls.
.TP
.SM EPERM
All ioctl calls except for
.SB FPA_GET_DATAREGS
require root execution level.
.TP
.SM EPIPE
The
.SM FPA
pipe is not clear.
.SH FILES
.PD 0
.TP 20
.B /dev/fpa
device file for both
.SM FPA
and
.SM FPA\s+1+.
.PD
.SH SEE ALSO
.BR cc (1V),
.BR close (2),
.BR ioctl (2),
.BR open (2V),
.BR fpa_download (8),
.BR fparel (8),
.BR fpaversion (8)
.SH DIAGNOSTICS
.LP
If hardware problems are detected
then all 
processes with
.B /dev/fpa
open are killed,
and future opens of
.B /dev/fpa
are disabled.

 printed.  Whenever a scroll must take place and the
console is in normal scroll mode
(`\s-1ESC\s0 [ 1 r'), it scans the rest of
the data awaiting printing to see how many line-feeds occur in it.  This
scan stops when./share/man/man4/gpone.4s                                                                              755       0      12        15205  4424741453  10316                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gpone.4s 1.21 89/03/27 SMI;
.TH GPONE 4S "22 March 1989"
.SH NAME
gpone \- Sun-3/Sun-2 graphics processor
.SH "CONFIG \(em SUN-3 SYSTEM"
.B device gpone0 at vme24d16 ? csr 0x210000
.SH "CONFIG \(em SUN-2 SYSTEM"
.B device gpone0 at vme24 ? csr 0x210000
.SH DESCRIPTION
.IX  "gpone device"  ""  "\fLgpone\fP \(em graphics processor interface"  ""  PAGE START
.IX  "graphics processor interface"  ""  "graphics processor interface \(em \fLgpone\fP"  ""  PAGE START
The
.B gpone
interface provides access to the optional Graphics Processor Board (\s-1GP\s0).
.LP
The hardware consumes 64 kilobytes of
.SM VME
bus address space.  The
.SM GP
board starts at standard address 0x210000
and must be configured for interrupt level 4.
.SH "IOCTLS"
.LP
The graphics processor responds to a number of ioctl calls as described
here.  One of the calls uses a
.B gp1fbinfo
structure that looks like this:
.RS
.nf
.ft B
struct	gp1fbinfo {
	int		fb_vmeaddr;	/* physical color board address */
	int		fb_hwwidth;	/* fb board width */
	int		fb_hwheight;	/* fb board height */
	int		addrdelta;	/* phys addr diff between fb and gp */
	caddr_t		fb_ropaddr;	/* cg2 va thru kernelmap */
	int		fbunit;		/* fb unit to use  for a,b,c,d */
};
.ft R
.fi
.RE
.LP
The ioctl call looks like this:
.RS
.nf
.B "ioctl(file, request, argp)"
.B "int file, request;"
.fi
.RE
.LP
.B argp
is defined differently for each
.SM GP
ioctl request and is specified in the
descriptions below.
.LP
The following ioctl commands provide for transferring data
between the graphics processor and color boards and processes.
.TP
.SB GP1IO_PUT_INFO
.IX  "ioctls for graphics processor"  "GP1IO_PUT_INFO"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_PUT_INFO\fP \(em pass framebuffer info"
.IX  "GP1IO_PUT_INFO put info"  ""  "\fLGP1IO_PUT_INFO\fP \(em pass framebuffer info"
.IX  "pass framebuffer info ioctl"  ""  "pass framebuffer info \fLioctl\fP \(em \fLGP1IO_PUT_INFO\fP"
Passes information about the frame buffer into driver.
.B argp
points to a
.B "struct gp1fbinfo"
which is passed to the driver.
.TP
.SB GP1IO_GET_STATIC_BLOCK
.IX  "ioctls for graphics processor"  "GP1IO_GET_STATIC_BLOCK"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_GET_STATIC_BLOCK\fP \(em get static block"
.IX  "GP1IO_GET_STATIC_BLOCK get static block"  ""  "\fLGP1IO_GET_STATIC_BLOCK\fP \(em get static block"
.IX  get "static block \fLioctl\fP \(em \fLGP1IO_GET_STATIC_BLOCK\fP"
Hands out a static block from the
.SM GP\s0.
.B argp
points to an
.B int
which is returned from the driver.
.TP
.SB GP1IO_FREE_STATIC_BLOCK
.IX  "ioctls for graphics processor"  "GP1IO_FREE_STATIC_BLOCK"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_FREE_STATIC_BLOCK\fP \(em free static block"
.IX  "GP1IO_FREE_STATIC_BLOCK free static block"  ""  "\fLGP1IO_FREE_STATIC_BLOCK\fP \(em free static block"
.IX  "free static block ioctl"  ""  "free static block \fLioctl\fP \(em \fLGP1IO_FREE_STATIC_BLOCK\fP"
Frees a static block from the
.SM GP\s0.
.B argp
points to an
.B int
which is passed to the driver.
.TP
.SB GP1IO_GET_GBUFFER_STATE
.IX  "ioctls for graphics processor"  "GP1IO_GET_GBUFFER_STATE"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_GET_GBUFFER_STATE\fP \(em check buffer state"
.IX  "GP1IO_GET_GBUFFER_STATEget buffer state"  ""  "\fLGP1IO_GET_GBUFFER_STATE\fP \(em check buffer state"
.IX  "check buffer state ioctl"  ""  "check buffer state \fLioctl\fP \(em \fLGP1IO_GET_GBUFFER_STATE\fP"
Checks to see if there is a buffer present on the
.SM GP\s0.
.B argp
points to an
.B int
which is returned from the driver.
.TP
.SB GP1IO_CHK_GP
.IX  "ioctls for graphics processor"  "GP1IO_CHK_GP"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_CHK_GP\fP \(em restart GP"
.IX  "GP1IO_CHK_GP check GP"  ""  "\fLGP1IO_CHK_GP\fP \(em restart GP"
.IX  "restart GP ioctl"  ""  "restart GP \fLioctl\fP \(em \fLGP1IO_CHK_GP\fP"
Restarts the
.SM GP
if necessary.
.B argp
points to an
.B int
which is passed to the driver.
.TP
.SB GP1IO_GET_RESTART_COUNT
.IX  "ioctls for graphics processor"  "GP1IO_GET_RESTART_COUNT"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_GET_RESTART_COUNT\fP \(em get restart count"
.IX  "GP1IO_GET_RESTART_COUNT get restart count"  ""  "\fLGP1IO_GET_RESTART_COUNT\fP \(em get restart count"
.IX  get "restart count \fLioctl\fP \(em \fLGP1IO_GET_RESTART_COUNT\fP"
Returns the number of restarts of a
.SM GP
since power on.  Needed to differentiate
.SB SIGXCPU
calls in user processes.
.B argp
points to an
.B int
which is returned from the driver.
.TP
.SB GP1IO_REDIRECT_DEVFB
.IX  "ioctls for graphics processor"  "GP1IO_REDIRECT_DEVFB"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_REDIRECT_DEVFB\fP \(em reconfigure fb"
.IX  "GP1IO_REDIRECT_DEVFB redirect fb"  ""  "\fLGP1IO_REDIRECT_DEVFB\fP \(em reconfigure fb"
.IX  "reconfigure fb ioctl"  ""  "reconfigure fb \fLioctl\fP \(em \fLGP1IO_REDIRECT_DEVFB\fP"
Configures
.B /dev/fb
to talk to a graphics processor device.
.B argp
points to an
.B int
which is passed to the driver.
.TP
.SB GP1IO_GET_REQDEV
.IX  "ioctls for graphics processor"  "GP1IO_GET_REQDEV"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_GET_REQDEV\fP \(em get requested minor device"
.IX  "GP1IO_GET_REQDEV get requested device"  ""  "\fLGP1IO_GET_REQDEV\fP \(em get requested minor device"
.IX  get "requested minor device \fLioctl\fP \(em \fLGP1IO_GET_REQDEV\fP"
Returns the requested minor device.
.B argp
points to a
.B dev_t
which is returned from the driver.
.TP
.SB GP1IO_GET_TRUMINORDEV
.IX  "ioctls for graphics processor"  "GP1IO_GET_TRUMINORDEV"  "\fLioctl\fP's for graphics processor"  "\fLGP1IO_GET_TRUMINORDEV\fP \(em get true minor device"
.IX  "GP1IO_GET_TRUMINORDEV get true minor device"  ""  "\fLGP1IO_GET_TRUMINORDEV\fP \(em get true minor device"
.IX  get "true minor device \fLioctl\fP \(em \fLGP1IO_GET_TRUMINORDEV\fP"
Returns the true minor device.
.B argp
points to a
.B char
which is returned from the driver.
.LP
The graphics processor driver also responds to the
.BR \s-1FBIOGTYPE\s0 ,
ioctl which a program can use to inquire as to
the characteristics of the display device, the
.BR \s-1FBIOGINFO\s0 ,
ioctl for passing generic information, and the
.SB FBIOGPIXRECT
ioctl so that SunWindows can run on it.  See
.BR fbio (4S).
.SH FILES
.PD 0
.TP 20
.B /dev/gpone[0-3][abcd]
.TP
.B /usr/include/sun/gpio.h
.TP
.B /usr/include/pixrect/{gp1cmds.h,gp1reg.h,gp1var.h}
.TP
.B /dev/fb
.PD
.SH "SEE ALSO"
.BR fbio (4S),
.BR mmap (2),
.BR gpconfig (8)
.LP
.TX CGI
.SH DIAGNOSTICS
.LP
.B "The Graphics Processor has been restarted.  You may see display garbage as a result."
.IX  "gpone device"  ""  "\fLgpone\fP \(em graphics processor interface"  ""  PAGE END
.IX  "graphics processor interface"  ""  "graphics processor interface \(em \fLgpone\fP"  ""  PAGE END
phics processor"  "\fLGP1IO_GET_STATIC_BLOCK\fP \(em get static block"
.IX  "GP1IO_GET_STATIC_BLOCK get static block"  ""  "\fLGP1IO_GET_STATIC_BLOCK\fP \(em get static block"
.IX  get "static block \fLioctl\fP \(em \fLGP1IO_GET_STATIC_BLOCK\fP"
Hands out a static block from the
.SM GP\s0.
.B argp
points to an
.B int
which is returned from the driver.
.TP
.SB GP1IO_FREE_STATIC./share/man/man4/icmp.4p                                                                               755       0      12         7101  4424741453  10107                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)icmp.4p 1.22 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1986 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH ICMP 4P "24 November 1987"
.SH NAME
icmp \- Internet Control Message Protocol
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.B #include <netinet/ip_icmp.h>
.LP
.B s = socket(\s-1AF_INET\s0, \s-1SOCK_RAW\s0, proto);
.fi
.IX  "icmp protocol"  ""  "\fLicmp\fP \(em Internet Control Message Protocol"  ""  PAGE START
.IX  Internet  "control message protocol icmp"  ""  "control message protocol \(em \fLicmp\fP"  PAGE START
.SH DESCRIPTION
.SM ICMP
is the error and control message protocol used
by the Internet protocol family.
It is used by the kernel to handle and report errors
in protocol processing.
It may also be accessed
through a \*(lqraw socket\*(rq for network monitoring
and diagnostic functions.
The protocol number for
.SM ICMP\s0,
used in the
.I proto
parameter to the socket call,
can be obtained from
.B getprotobyname
(see
.BR getprotoent (3N)).
.SM ICMP
sockets are connectionless,
and are normally used with the
.I sendto
and
.I recvfrom
calls, though the
.BR connect (2)
call may also be used to fix the destination for future
packets (in which case the
.BR read (2V)
or
.BR recv (2)
and
.BR write (2V)
or
.BR send (2)
system calls may be used).
.LP
Outgoing packets automatically have an Internet Protocol (\s-1IP\s0)
header prepended to them.
Incoming packets are provided to the holder of a raw
socket with the
.SM IP
header and options intact.
.LP
.SM ICMP
is an unreliable datagram protocol layered above
.SM IP\s0.
It is used internally by the protcol code
for various purposes including routing,
fault isolation,
and congestion control.
Receipt of an
.SM ICMP
\(lqredirect\(rq message will add a new entry in
the routing table,
or modify an existing one.
.SM ICMP
messages are routinely sent by the protocol code.
Received
.SM ICMP
messages may be reflected back to users
of higher-level protocols such as
.SM TCP
or
.SM UDP
as error returns from system calls.
A copy of all
.SM ICMP
message received by the system
is provided using the
.SM ICMP
raw socket.
.SH ERRORS
A socket operation may fail with one of the following errors returned:
.TP 20
.SM EISCONN
when trying to establish a connection on a socket which
already has one, or when trying to send a datagram with the destination
address specified and the socket is already connected;
.TP
.SM ENOTCONN
when trying to send a datagram, but
no destination address is specified, and the socket hasn't been
connected;
.TP
.SM ENOBUFS
when the system runs out of memory for
an internal data structure;
.TP
.SM EADDRNOTAVAIL
when an attempt is made to create a
socket with a network address for which no network interface
exists.
.SH SEE ALSO
.BR connect (2),
.BR read (2V),
.BR recv (2),
.BR send (2),
.BR write (2V),
.BR getprotoent (3N),
.BR inet (4F),
.BR ip (4P),
.BR routing (4N)
.LP
Postel, Jon,
.IR "Internet Control Message Protocol \(em \s-1DARPA\s0 Internet Program Protocol Specification" ,
.SM RFC
792, Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
September 1981.  (Sun 800-1064-01)
.SH BUGS
.LP
Replies to
.SM ICMP
\(lqecho\(rq messages which are source routed
are not sent back using inverted source routes,
but rather go back through the normal routing mechanisms.
.IX  "icmp protocol"  ""  "\fLicmp\fP \(em Internet Control Message Protocol"  ""  PAGE END
.IX  Internet  "control message protocol icmp"  ""  "control message protocol \(em \fLicmp\fP"  PAGE END
octl\fP's for graphics processor"  "\fLGP1IO_CHK_GP\fP \(em restart GP"
.IX  "GP1IO_CHK_GP check GP"  ""  "\fLGP1IO_CHK_GP\fP \(em restart GP"
.IX  "restart GP ioctl"  ""  "restart GP \fLioctl\fP \(em \fLGP1IO_CHK_GP\fP"
Restarts the
.SM GP
if necessary.
.B argp
points to an
.B int
which is passed to the driver.
.TP
.SB GP1IO_GET_RESTART_COUNT
.IX  "ioctls for graphics processor"  "GP1IO_GET_RESTART_COUNT"  "\fLioctl\fP's for graphics processo./share/man/man4/ie.4s                                                                                 755       0      12        11557  4424741453   7611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ie.4s 1.23 89/03/27 SMI;
.TH IE 4S "25 March 1989"
.SH NAME
ie \- Intel 10 Mb/s Ethernet interface
.SH "CONFIG \(em SUN-4 SYSTEM"
.ft B
.nf
device ie0 at obio ? csr 0x6000000 priority 3
device ie1 at vme24d16 ? csr 0xe88000 priority 3 vector ieintr 0x75
.ft R
.fi
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device ie0 at obio ? csr 0x65000000 priority 3
device ie1 at vme24d16 ? csr 0xe88000 priority 3 vector ieintr 0x75
.fi
.ft R
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
device ie0 at obio ? csr 0xc0000 priority 3
device ie1 at vme24d16 ? csr 0xe88000 priority 3 vector ieintr 0x75
device ie0 at vme24d16 ? csr 0x31ff02 priority 3 vector ieintr 0x74
.ft R
.fi
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device ie0 at obio 2 csr 0x7f0800 priority 3
device ie1 at vme24 ? csr 0xe88000 priority 3 vector ieintr 0x75
device ie0 at mbmem ? csr 0x88000 priority 3
device ie1 at mbmem ? csr 0x8c000 flags 2 priority 3
.ft R
.fi
.SH "CONFIG \(em SUN386i SYSTEM"
.ft B
.nf
device ie0 at obmem ? csr 0xD0000000 irq 21 priority 3
.ft R
.fi
.SH DESCRIPTION
.IX  "ie device"  ""  "\fLie\fP \(em Sun 10 Mb/s Ethernet interface"  ""  PAGE START
.IX  "Sun 10 Mb/s Ethernet interface"  ""  "Sun 10 Mb/s Ethernet interface \(em \fLie\fP"  ""  PAGE START
.IX  "10 Mb/s Sun Ethernet interface"  ""  "10 Mb/s Sun Ethernet interface \(em \fLie\fP"  ""  PAGE START
.IX  "Ethernet controller"  "ie"  ""  "\fLie\fP \(em Sun Ethernet interface"  PAGE START
.LP
The
.B ie
interface provides access to a 10 Mb/s Ethernet network
through the Intel 82586 controller chip.
For a general description of network interfaces see
.BR if (4N).
.LP
The first Sun-4 and Sun-3x lines above specify
.SM CPU\s0-board-resident
Intel Ethernet interfaces; the second Sun-4 and Sun-3x
lines
specify Multibus Intel Ethernet interfaces for use with
.SM VME
adapters.
.LP
In the Sun-3 lines above, the first line specifies the
.SM CPU\s0-board-resident
Intel Ethernet interface.  The second line
specifies a Multibus Intel Ethernet interface for use with a
.SM VME
adapter.  The third line specifies the Intel Ethernet interface
present on a Sun-3 Eurocard board.
.LP
In the Sun-2 lines above, the first line specifies the
.SM CPU\s0-board-resident
Intel Ethernet interface on a Sun-2/50 or
Sun-2/160 system.  The second line specifies a
Multibus Intel Ethernet
controller for use with a
.SM VME
adapter on these systems.  The third line
specifies the first Multibus Intel Ethernet controller for a Sun-2/120
or Sun-2/170 system.  The fourth line specifies the second such
controller for these systems.
.\" Sun386i
.LP
The Sun386i line above specifies the
.SM CPU\s0-board-resident
Intel Ethernet interface.
.\" Sun386i
.SH SEE ALSO
.BR if (4N)
.SH "DIAGNOSTICS"
.LP
There are too many driver messages to list them all individually here.
Some of the more common messages and their meanings follow.
.TP
.B ie%d: Ethernet jammed
Network activity has become so intense that sixteen
successive transmission attempts failed,
and the 82586 gave up on the current packet.
Another possible cause of this message is a noise source
somewhere in the network,
such as a loose transceiver connection.
.TP
.B ie%d: no carrier
The 82586 has lost input to its carrier detect pin
while trying to transmit a packet,
causing the packet to be dropped.
Possible causes include an open circuit somewhere in the network
and noise on the carrier detect line from the transceiver.
.TP
.B ie%d: lost interrupt: resetting
The driver and 82586 chip have lost synchronization with each other.
The driver recovers by resetting itself and the chip.
.TP
.B ie%d: iebark reset
The 82586 failed to complete
a watchdog timeout command in the allotted time.
The driver recovers by resetting itself and the chip.
.TP
.B ie%d: \s-1WARNING\s0: requeueing
The driver has run out of resources while getting a packet
ready to transmit.
The packet is put back on the output queue for retransmission
after more resources become available.
.br
.ne 5
.TP
.B ie%d: panic: scb overwritten
The driver has discovered that memory that should remain
unchanged after initialization has become corrupted.
This error usually is a symptom of a bad 82586 chip.
.TP
.B ie%d: giant packet
Provided that all stations on the Ethernet are operating
according to the Ethernet specification, this error \(lqshould
never happen,\(rq since the driver allocates its receive buffers
to be large enough to hold packets of the largest permitted size.
The most likely cause of this message is that some other station
on the net is transmitting packets whose lengths exceed the maximum
permitted for Ethernet.
.IX  "ie device"  ""  "\fLie\fP \(em Sun 10 Mb/s Ethernet interface"  ""  PAGE END
.IX  "Sun 10 Mb/s Ethernet interface"  ""  "Sun 10 Mb/s Ethernet interface \(em \fLie\fP"  ""  PAGE END
.IX  "10 Mb/s Sun Ethernet interface"  ""  "10 Mb/s Sun Ethernet interface \(em \fLie\fP"  ""  PAGE END
.IX  "Ethernet controller"  "ie"  ""  "\fLie\fP \(em Sun Ethernet interface"  PAGE END
t Multibus Intel Ethernet controller for a Sun-2/120
or Sun-2/170 system.  The fourth line specifies the second such
controller for these systems./share/man/man4/if.4n                                                                                 755       0      12        16300  4424741454   7575                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)if.4n 1.17 89/03/27 SMI;
.TH IF 4N "9 October 1987"
.SH NAME
if \- general properties of network interfaces
.SH DESCRIPTION
.IX  "if device"  ""  "\fLif\fP \(em network interface general properties"  ""  PAGE START
.LP
Each network interface in a system corresponds to a
path through which messages may be sent and received.  A network
interface usually has a hardware device associated with it, though
certain interfaces such as the loopback interface,
.BR lo (4),
do not.
.LP
At boot time, each interface with underlying hardware support
makes itself known to the system during the autoconfiguration
process.  Once the interface has acquired its address, it is
expected to install a routing table entry so that messages can
be routed through it.  Most interfaces require some part of
their address specified with an
.SB SIOCSIFADDR
.SM IOCTL
before they
will allow traffic to flow through them.  On interfaces where
the network-link layer address mapping is static, only the
network number is taken from the ioctl; the remainder is found
in a hardware specific manner.  On interfaces which provide
dynamic network-link layer address mapping facilities (for example,
10Mb/s Ethernets using
.BR arp (4P),),
the entire address specified in the ioctl is used.
.LP
The following
.B ioctl
calls may be used to manipulate network interfaces.  Unless
specified otherwise, the request takes an
.B ifreq
structure as its parameter.  This structure has the form
.RS
.nf
.ft B
struct	ifreq {
	char	ifr_name[16];		/* name of interface (e.g. "ec0") */
	union {
		struct	sockaddr ifru_addr;
		struct	sockaddr ifru_dstaddr;
		short	ifru_flags;
	} ifr_ifru;
#define	ifr_addr		ifr_ifru.ifru_addr	/* address */
#define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
#define	ifr_flags		ifr_ifru.ifru_flags	/* flags */
};
.ft R
.fi
.RE
.TP 20
.SB SIOCSIFADDR
.IX  "ioctls for sockets"  "SIOCSIFADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFADDR\fP \(em set ifnet address"
.IX  "SIOCSIFADDR set ifnet address"  ""  "\fLSIOCSIFADDR\fP \(em set ifnet address"
.IX  set "ifnet address ioctl \(em \fLSIOCSIFADDR\fP"
.IX  "network interface ioctls"  SIOCSIFADDR  "network interface \fLioctl\fP's" "\fLSIOCSIFADDR\fP \(em set ifnet address"
Set interface address.  Following the address
assignment, the ``initialization'' routine for
the interface is called.
.TP
.SB SIOCGIFADDR
.IX  "ioctls for sockets"  "SIOCGIFADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFADDR\fP \(em get ifnet address"
.IX  "SIOCGIFADDR get ifnet address"  ""  "\fLSIOCGIFADDR\fP \(em get ifnet address"
.IX  get "ifnet address \fLioctl\fP \(em \fLSIOCGIFADDR\fP"
.IX  "network interface ioctls"  SIOCGIFADDR  "network interface \fLioctl\fP's" "\fLSIOCGIFADDR\fP \(em get ifnet address"
Get interface address.
.TP
.SB SIOCSIFDSTADDR
.IX  "ioctls for sockets"  "SIOCSIFDSTADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFDSTADDR\fP \(em set p-p address"
.IX  "SIOCSIFDSTADDR set p-p address"  ""  "\fLSIOCSIFDSTADDR\fP \(em set p-p address"
.IX  set "p-p address ioctl \(em \fLSIOCSIFDSTADDR\fP"
.IX  "network interface ioctls"  SIOCSIFDSTADDR  "network interface \fLioctl\fP's" "\fLSIOCSIFDSTADDR\fP \(em set p-p address"
Set point to point address for interface.
.TP
.SB SIOCGIFDSTADDR
.IX  "ioctls for sockets"  "SIOCGIFDSTADDR"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFDSTADDR\fP \(em get p-p address"
.IX  "SIOCGIFDSTADDR get p-p address"  ""  "\fLSIOCGIFDSTADDR\fP \(em get p-p address"
.IX  get "p-p address \fLioctl\fP \(em \fLSIOCGIFDSTADDR\fP"
.IX  "network interface ioctls"  SIOCGIFDSTADDR  "network interface \fLioctl\fP's" "\fLSIOCGIFDSTADDR\fP \(em get p-p address"
Get point to point address for interface.
.TP
.SB SIOCSIFFLAGS
.IX  "ioctls for sockets"  "SIOCSIFFLAGS"  "\fLioctl\fP's for sockets"  "\fLSIOCSIFFLAGS\fP \(em set ifnet flags"
.IX  "SIOCSIFFLAGS set ifnet flags"  ""  "\fLSIOCSIFFLAGS\fP \(em set ifnet flags"
.IX  set "ifnet flags ioctl \(em \fLSIOCSIFFLAGS\fP"
.IX  "network interface ioctls"  SIOCSIFFLAGS  "network interface \fLioctl\fP's" "\fLSIOCSIFFLAGS\fP \(em set ifnet flags"
Set interface flags field.  If the interface is marked down,
any processes currently routing packets through the interface
are notified.
.TP
.SB SIOCGIFFLAGS
.IX  "ioctls for sockets"  "SIOCGIFFLAGS"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFFLAGS\fP \(em get ifnet flags"
.IX  "SIOCGIFFLAGS get ifnet flags"  ""  "\fLSIOCGIFFLAGS\fP \(em get ifnet flags"
.IX  get "ifnet flags \fLioctl\fP \(em \fLSIOCGIFFLAGS\fP"
.IX  "network interface ioctls"  SIOCGIFFLAGS  "network interface \fLioctl\fP's" "\fLSIOCGIFFLAGS\fP \(em get ifnet flags"
Get interface flags.
.TP
.SB SIOCGIFCONF
.IX  "ioctls for sockets"  "SIOCGIFCONF"  "\fLioctl\fP's for sockets"  "\fLSIOCGIFCONF\fP \(em get ifnet list"
.IX  "SIOCGIFCONF get ifnet list"  ""  "\fLSIOCGIFCONF\fP \(em get ifnet list"
.IX  get "ifnet list \fLioctl\fP \(em \fLSIOCGIFCONF\fP"
.IX  "network interface ioctls"  SIOCGIFCONF  "network interface \fLioctl\fP's" "\fLSIOCGIFCONF\fP \(em get ifnet list"
Get interface configuration list.  This request takes an
.B ifconf
structure (see below) as a value-result parameter.  The
.B ifc_len
field should be initially set to the size of the buffer
pointed to by
.BR ifc_buf .
On return it will contain the length, in bytes, of the
configuration list.
.br
.ne 20
.RS
.ft B
.nf
/*
* Structure used in \s-1SIOCGIFCONF\s0 request.
* Used to retrieve interface configuration
* for machine (useful for programs which
* must know all networks accessible).
*/
struct	ifconf {
	int	ifc_len;		/* size of associated buffer */
	union {
		caddr_t	ifcu_buf;
		struct	ifreq *ifcu_req;
	} ifc_ifcu;
#define	ifc_buf	ifc_ifcu.ifcu_buf	/* buffer address */
#define	ifc_req	ifc_ifcu.ifcu_req	/* array of structures returned */
};
.ft R
.fi
.RE
.TP
.SB SIOCADDMULTI
.IX  "ioctls for sockets"  "SIOCADDMULTI"  "\fLioctl\fP's for sockets"  "\fLSIOCADDMULTI\fP \(em set m/c address"
.IX  "SIOCADDMULTI set m/c address"  ""  "\fLSIOCADDMULTI\fP \(em set m/c address"
.IX  set "m/c address ioctl \(em \fLSIOCADDMULTI\fP"
.IX  "network interface ioctls"  SIOCADDMULTI  "network interface \fLioctl\fP's" "\fLSIOCADDMULTI\fP \(em set m/c address"
Enable a multicast address for the interface.  A maximum of 64 multicast
addresses may be enabled for any given interface.
.TP
.SB SIOCDELMULTI
.IX  "ioctls for sockets"  "SIOCDELMULTI"  "\fLioctl\fP's for sockets"  "\fLSIOCDELMULTI\fP \(em delete m/c address"
.IX  "SIOCDELMULTI delete m/c address"  ""  "\fLSIOCDELMULTI\fP \(em delete m/c address"
.IX  delete "m/c address ioctl \(em \fLSIOCDELMULTI\fP"
.IX  "network interface ioctls"  SIOCDELMULTI  "network interface \fLioctl\fP's" "\fLSIOCDELMULTI\fP \(em delete m/c address"
Disable a previously set multicast address.
.TP
.SB SIOCSPROMISC
Toggle promiscuous mode.
.IX  "ioctls for sockets"  "SIOCSPROMISC"  "\fLioctl\fP's for sockets"  "\fLSIOCSPROMISC\fP \(em toggle promiscuous mode"
.IX  "SIOCSPROMISC toggle promiscuous"  ""  "\fLSIOCSPROMISC\fP \(em toggle promiscuous mode"
.IX  "toggle promiscuous mode ioctl \(em \fLSIOCSPROMISC\fP"
.IX  "network interface ioctls"  SIOCSPROMISC  "network interface \fLioctl\fP's" "\fLSIOCSPROMISC\fP toggle promiscuous mode"
.IX  "if device"  ""  "\fLif\fP \(em network interface general properties"  ""  PAGE END
.SH "SEE ALSO
.BR arp (4P),
.BR ec (4S),
.BR lo (4)
al properties"  ""  PAGE START
.LP
Each network interface in a system corresponds to a
path through which messages may be sent and received.  A network
interface usually has a hardware device associated with it, though
certain interfaces such as the loopback interface,
.BR lo (4),
do not.
.LP
At boot time, each interfa./share/man/man4/inet.4f                                                                               755       0      12        15326  4424741454  10135                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)inet.4f 1.23 89/03/27 SMI; from UCB 4.1
.TH INET 4F "18 February 1988"
.SH NAME
inet \- Internet protocol family
.SH SYNOPSIS
.nf
.B options \s-1INET\s0
.LP
.B #include <sys/types.h>
.B #include <netinet/in.h>
.fi
.SH DESCRIPTION
.IX  "inet device"  ""  "\fLinet\fP \(em Internet protocol family"  ""  PAGE START
.IX  Internet  "protocol family inet"  ""  "protocol family \(em \fLinet\fP"  PAGE START
.LP
The Internet protocol family implements a collection of protocols
which are centered around the
.I Internet Protocol
(\s-1IP\s0)
and which share a common address format.
The Internet family provides protocol support for the
.BR \s-1SOCK_STREAM\s0 ,
.BR \s-1SOCK_DGRAM\s0 ,
and
.SB SOCK_RAW
socket types.
.SH PROTOCOLS
The Internet protocol family is comprised of
the Internet Protocol (\s-1IP\s0),
the Address Resolution Protocol (\s-1ARP\s0),
the Internet Control Message Protocol (\s-1ICMP\s0),
the Transmission Control Protocol (\s-1TCP\s0),
and the User Datagram Protocol (\s-1UDP\s0).
.LP
.SM TCP
is used to support the
.SB SOCK_STREAM
abstraction while
.SM UDP
is used to support the
.SB SOCK_DGRAM
abstraction; see
.BR tcp (4P)
and
.BR udp (4P).
A raw interface to
.SM IP
is available by creating an Internet socket of type
.BR \s-1SOCK_RAW\s0;
see
.BR ip (4P).
.SM ICMP
is used by the kernel
to handle and report errors in protocol processing.
It is also accessible to user programs; see
.BR icmp (4P).
.SM ARP
is used to translate 32-bit
.SM IP
addresses into 48-bit Ethernet addresses; see
.BR arp (4P).
.LP
The 32-bit
.SM IP
address is divided into network number and host number parts.
It is frequency-encoded; the most-significant bit is zero
in Class A addresses, in which the high-order 8 bits are the network
number.
Class B addresses have their high order two bits set to 10 and
use the high-order 16 bits as the network number field.
Class C addresses have a 24-bit network number part of which
the high order three bits are 110.
Sites with a cluster of local networks
may chose to use a single network number for the cluster;
this is done by using subnet addressing.
The local (host) portion of the address is further subdivided
into subnet number and host number parts.
Within a subnet, each subnet appears to be an individual network;
externally, the entire cluster appears to be a single, uniform
network requiring only a single routing entry.
Subnet addressing is enabled and examined by the following
.BR ioctl (2)
commands on a datagram socket in the Internet domain;
they have the same form as the
.SB SIOCIFADDR
command (see
.BR intro (4N)).
.LP
.TP 20
.SB SIOCSIFNETMASK
Set interface network mask.
The network mask defines the network part of the address;
if it contains more of the address than the address type would indicate,
then subnets are in use.
.TP
.SB SIOCGIFNETMASK
Get interface network mask.
.SH ADDRESSING
.SM IP
addresses are four byte quantities, stored in network byte order
.\" Sun386i begin
(on
Sun386i
systems
these are word and byte reversed).
.\" Sun386i end
.LP
Sockets in the Internet protocol family use the following
addressing structure:
.RS
.nf
.ft B
struct sockaddr_in {
	short	sin_family;
	u_short	sin_port;
	struct	in_addr sin_addr;
	char	sin_zero[8];
};
.ft R
.fi
.RE
.LP
Library routines are provided to manipulate structures of this form;
see
.BR intro (3N).
.LP
The
.B sin_addr
field of the
.B sockaddr_in
structure specifies a local or remote
.SM IP
address.  Each network interface has its own unique
.SM IP
address.  The special value
.SB INADDR_ANY
may be used in this field to effect \(lqwildcard\(rq matching.
Given in a
.BR bind (2)
call, this value leaves the local
.SM IP
address of the socket unspecified,
so that the socket will receive connections or messages directed
at any of the valid
.SM IP
addresses of the system.
This can prove useful when a process neither knows nor cares
what the local
.SM IP
address is or when a process wishes to receive
requests using all of its network interfaces.
The
.B sockaddr_in
structure given in the
.BR bind (2)
call must specify an
.B in_addr
value of either
.SB IPADDR_ANY
or one of the system's valid
.SM IP
addresses.
Requests to bind any other address will elicit the error 
.SM EADDRNOTAVAIL\s0.
When a
.BR connect (2)
call is made for a socket that has a wildcard local address,
the system sets the
.B sin_addr
field of the socket to the
.SM IP
address of the network interface that the packets for that
connection are routed via.
.LP
The
.B sin_port
field of the
.B sockaddr_in
structure specifies
a port number used by
.SM TCP
or
.SM UDP\s0.
The local port address specified in a
.BR bind (2)
call is restricted to be greater than
.SB IPPORT_RESERVED
(defined in
.BR <netinet/in.h> )
unless the creating process is running
as the super-user, providing a space of protected port numbers.
In addition, the local port address must not be in use by any
socket of same address family and type.
Requests to bind sockets to port numbers being used by other sockets
return the error
.SM EADDRINUSE\s0.
If the local port address is specified as 0, then the system picks
a unique port address greater than
.BR \s-1IPPORT_RESERVED\s0 .
A unique local port address is also picked when a socket
which is not bound is used in a
.BR connect (2)
or
.B sendto
(see
.BR send (2))
call.
This allows programs which do not care which local port number
is used to set up
.SM TCP
connections by simply calling
.BR socket (2)
and then
.BR connect (2),
and to send
.SM UDP
datagrams with a
.BR socket (2)
call followed by a
.BR sendto (2)
call.
.LP
Although this implementation restricts sockets to unique local
port numbers,
.SM TCP
allows multiple simultaneous connections involving the
same local port number so long as the remote
.SM IP
addresses or
port numbers are different for each connection.
Programs may explicitly override the socket restriction
by setting the
.SB SO_REUSEADDR
socket option with
.B setsockopt
(see
.BR getsockopt (2)).
.SH SEE ALSO
.BR bind (2),
.BR connect (2),
.BR getsockopt (2),
.BR ioctl (2),
.BR sendto (2),
.BR socket (2),
.BR byteorder (3N),
.BR gethostent (3N),
.BR getnetent (3N),
.BR getprotoent (3N),
.BR getservent (3N),
.BR inet (3N),
.BR intro (3N),
.BR arp (4P),
.BR icmp (4P),
.BR intro (4N),
.BR ip (4P)
.BR tcp (4P),
.BR udp (4P),
.LP
Network Information Center,
.I "\s-1DDN Protocol Handbook"
(3 vols.),
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
1985.
.br
.I "A 4.2\s-1BSD\s0 Interprocess Communication Primer"
.SH CAVEAT
The Internet protocol support is subject to change as
the Internet protocols develop.  Users should not depend
on details of the current implementation, but rather
the services exported.
.IX  "inet device"  ""  "\fLinet\fP \(em Internet protocol family"  ""  PAGE END
.IX  Internet  "protocol family inet"  ""  "protocol family \(em \fLinet\fP"  PAGE END
P's for sockets"  "\fLSIOCSPROMISC\fP \(em toggle promiscuous mode"
.IX  "SIOCSPROMISC toggle promiscuous"  ""  "\fLSIOCSPROMISC\fP \(em toggle promiscuous mode"
.IX  "toggle promiscuous mode ioctl \(em \fLSIOCSPROMISC\fP"
.IX  "network interface ioctls"  SIOCSPROMISC  "network interface \fLioctl\./share/man/man4/intro.4                                                                               755       0      12           63  4424741454  10073                                                                                                                                                                                                                                                                                                                                                                      .so man4/Intro.4
.\" @(#)intro.4 1.7 89/03/27 SMI;
kb.4m 4   p    kbd.4s        kmem.4        kmem.4s       	ldterm.4m       le.4s       list.4       lo.4 4       lofs.4s        mbio.4s     !  mbmem.4s      "  mcp.4s   (  #  mem.4s   <  $  mouse.4s  <  L  %  ms.4m <  \  &  ms3.4s <  l  '  mti.4s <  |  (  mtio.4     )  nfs.4p s    *  	nif_pf.4m     +  nit.4p     ,  
nit_buf.4m     -  	./share/man/man4/ip.4p                                                                                 755       0      12        17735  4424741454   7626                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ip.4p 1.24 89/03/27 SMI; from UCB 4.1
.TH IP 4P "9 October 1987"
.SH NAME
ip \- Internet Protocol
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.LP
.B s = socket(AF_INET, SOCK_RAW, proto);
.fi
.SH DESCRIPTION
.IX  "ip4p device"  ""  "\fLip\fP \(em Internet Protocol"  ""  PAGE START
.IX  Internet  "Protocol ip4p"  ""  "Protocol \(em \fLip\fP"  PAGE START
.LP
.SM IP
is the internetwork datagram delivery protocol that is central
to the Internet protocol family.
Programs may use
.SM IP
through higher-level protocols
such as the Transmission Control Protocol (\s-1TCP\s0) or the User Datagram
Protocol (\s-1UDP\s0),
or may interface directly using a ``raw socket.''
See
.BR tcp (4P)
and
.BR udp (4P).
The protocol options defined in the
.SM IP
specification may be set
in outgoing datagrams.
.LP
Raw
.SM IP
sockets are connectionless and are normally used
with the
.B sendto
and
.B recvfrom
calls,
(see
.BR send (2)
and
.BR recv (2))
although the
.BR connect (2)
call may also be used to fix the destination for future datagrams
(in which case the
.BR read (2V)
or
.BR recv (2)
and
.BR write (2V)
or
.BR send (2)
calls may be used).
If
.B proto
is zero, the default protocol,
.BR \s-1IPPROTO_RAW\s0 ,
is used.  If
.B proto
is non-zero, that protocol number will be set in outgoing datagrams
and will be used to filter incoming datagrams.
An
.SM IP
header will be generated and prepended to each outgoing datagram;
Received datagrams are returned with the
.SM IP
header and options intact.
.LP
A single socket option,
.BR \s-1IP_OPTIONS\s0 ,
is supported at the
.SM IP
level.  This socket option may be used to set
.SM IP
options to be included in each outgoing datagram.
.SM IP
options to be sent are set with
.B setsockopt
(see
.BR getsockopt (2)).
The
.BR getsockopt (2)
call returns the
.SM IP
options set in the last
.B setsockopt
call.
.SM IP
options on received datagrams are visible to user programs only
using raw
.SM IP
sockets.  The format of
.SM IP
options given in
.B setsockopt
matches those defined in the
.SM IP
specification with one exception:
the list of addresses for the source routing options
must include the first-hop gateway at the beginning of the
list of gateways.
The first-hop gateway address will be extracted from the option
list and the size adjusted accordingly before use.
.SM IP
options may be used with any socket type in the Internet family.
.LP
At the socket level, the socket option
.SB SO_DONTROUTE
may be applied.
This option forces datagrams being sent to bypass the routing step
in output.
Normally,
.SM IP
selects a network interface to send the datagram via,
and possibly an intermediate gateway,
based on an entry in the routing table.
See
.BR routing (4N).
When
.SB SO_DONTROUTE
is set, the datagram will be sent via the interface
whose network number or full
.SM IP
address matches the destination address.
If no interface matches, the error
.SM ENETUNRCH
will be returned.
.LP
Datagrams flow through the
.SM IP
layer in two directions:
from the network
.B ip
to user processes and from user
processes
.I down
to the network.
Using this orientation,
.SM IP
is layered
.I above
the network interface drivers and
.I below
the transport protocols such as
.SM UDP
and
.SM TCP\s0.
The Internet Control Message Protocol (\s-1ICMP\s0) is logically
a part of
.SM IP\s0.
See
.BR icmp (4P).
.LP
IP provides for a checksum of the header part, but not the data
part of the datagram.
The checksum value is computed and set in the process of sending
datagrams and checked when receiving datagrams.
.SM IP
header checksumming may be disabled for debugging purposes
by patching the kernel variable
.B ipcksum
to have the value
zero.
.LP
.SM IP
options in received datagrams are processed in the
.SM IP
layer
according to the protocol specification.
Currently recognized
.SM IP
options include:
security,
loose source and record route (\s-1LSRR\s0),
strict source and record route (\s-1SSRR\s0),
record route,
stream identifier, and
internet timestamp.
.LP
The
.SM IP
layer will normally forward received datagrams that are not addressed
to it.
Forwarding is under the control of the kernel variable
.IR ipforwarding :
if
.I ipforwarding
is zero,
.SM IP
datagrams will not be forwarded;  if
.I ipforwarding
is one,
.SM IP
datagrams will be forwarded.
.I ipforwarding
is usually set to one only in machines with more than one
network interface (internetwork routers).
This kernel variable can be patched to enable or disable forwarding.
.LP
The
.SM IP
layer will send an
.SM ICMP
message back to the source host in many
cases when it receives a datagram that can not be handled.
A ``time exceeded''
.SM ICMP
message will be sent if the ``time to live''
field in the
.SM IP
header drops to zero in the process of forwarding a datagram.
A ``destination unreachable'' message will be sent if a datagram can not
be forwarded because there is no route to the final destination,
or if it can not be fragmented.
If the datagram is addressed to the local host
but is destined for a protocol that is not supported or a port
that is not in use,
a destination unreachable message will also be sent.
The
.SM IP
layer may send an
.SM ICMP
``source quench'' message if it is
receiving datagrams too quickly.
.SM ICMP
messages are only sent for the first fragment of a fragmented
datagram and are never returned in response to errors in other
.SM ICMP
messages.
.LP
The
.SM IP
layer supports fragmentation and reassembly.
Datagrams are fragmented on output if the datagram is larger than the
maximum transmission unit (\s-1MTU\s0) of the network interface.
Fragments of received datagrams are dropped from the reassembly queues
if the complete datagram is not reconstructed within a short time period.
.LP
Errors in sending discovered at the network interface driver layer
are passed by
.SM IP
back up to the user process.
.SH ERRORS
A socket operation may fail with one of the following errors returned:
.TP 20
.SM EACCESS
when specifying an
.SM IP
broadcast destination address
if the caller is not the super-user;
.TP
.SM EISCONN
when trying to establish a connection on a socket which
already has one, or when trying to send a datagram with the destination
address specified and the socket is already connected;
.TP
.SM EMSGSIZE
when sending datagram that is too large for an interface,
but is not allowed be fragmented (such as broadcasts);
.TP
.SM ENETUNREACH
when trying to establish a connection or send a datagram,
if there is no matching entry in the routing table,
or if an
.SM ICMP
``destination unreachable'' message is received.
.TP
.SM ENOTCONN
when trying to send a datagram, but
no destination address is specified, and the socket hasn't been
connected;
.TP
.SM ENOBUFS
when the system runs out of memory for
fragmentation buffers or other internal data structure;
.TP
.SM EADDRNOTAVAIL
when an attempt is made to create a
socket with a local address that matches no network interface,
or when specifying an
.SM IP
broadcast destination address
and the network interface does not support broadcast;
.LP
The following errors
may occur when setting or getting
.SM IP
options:
.TP 20
.SM EINVAL
An unknown socket option name was given.
.TP
.SM EINVAL
The
.SM IP
option field was improperly formed;
an option field was shorter than the minimum value
or longer than the option buffer provided.
.SH SEE ALSO
.BR connect (2),
.BR getsockopt (2),
.BR read (2V),
.BR recv (2),
.BR send (2),
.BR write (2V),
.BR icmp (4P),
.BR inet (4F)
.BR routing (4N),
.BR tcp (4P),
.BR udp (4P),
.LP
Postel, Jon,
.RI `` "Internet Protocol - \s-1DARPA\s0 Internet Program Protocol Specification" ,''
.SM RFC
791, Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
September 1981.
(Sun 800-1063-01)
.br
.ne 8
.SH BUGS
.LP
Raw sockets should receive
.SM ICMP
error packets relating to the protocol;
currently such packets are simply discarded.
.LP
Users of higher-level protocols such as
.SM TCP
and
.SM UDP
should be able to
see received
.SM IP
options.
.IX  "ip4p device"  ""  "\fLip\fP \(em Internet Protocol"  ""  PAGE END
.IX  Internet  "Protocol ip4p"  ""  "Protocol \(em \fLip\fP"  PAGE END
o the end of the screen.  In other ./share/man/man4/kb.4m                                                                                 755       0      12       151334  4424741454   7621                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)kb.4m 1.16 89/03/27 SMI;
.\"
.\" Unconditional section Head
.\" Print, and remember the page number
.\"
.de UH
.SH "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
.nr %p \\n%
..
.\"
.\" Conditional section Head
.\" Print only if it's on a different page from the last one
.\"
.de CH
.if !\\n%==\\n(%p .SH "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
.nr %p \\n%
..
.TH KB 4M "25 March 1989"
.SH NAME
kb \- Sun keyboard STREAMS module
.SH CONFIG
.B "pseudo-device kb\fInumber\fP"
.SH SYNOPSIS
.nf
.ft B
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sundev/vuid_event.h>
#include <sundev/kbio.h>
#include <sundev/kbd.h>
.LP
.ft B
ioctl(fd, \s-1I_PUSH\s0, ``kb'');
.ft R
.fi
.SH DESCRIPTION
.IX  "kb streams module"  ""  "\fLkb\fP \(em Sun keyboard \s-1STREAMS\s0 module"
The
.B kb
.SM STREAMS
module processes byte streams
generated by Sun keyboards attached to a
.SM CPU
serial or parallel port.
Definitions for altering keyboard translation, and reading events
from the keyboard, are in
.B sundev/kbio.h
and
.BR sundev/kbd.h .
.I number
specifies the maximum number of
keyboards supported by the system.
.LP
.B kb
recognizes which keys have been typed using a set of
tables for each known type of keyboard.  Each translation table is
an array of 128 bytes (unsigned characters).
If a character value is less than 0x80, it is treated as an
.SM ASCII
character (perhaps with the
.SM META
bit included).  Higher values indicate special characters that invoke
more complicated actions.
.SS Keyboard Translation State
The keyboard can be in one of the following translation modes:
.LP
.RS
.TP 25
.SB TR_NONE
Keyboard translation is turned off and
up/down key codes are reported.
.TP
.SB TR_ASCII
.SM ASCII
codes are reported.
.TP
.SB TR_EVENT
.B firm_events
(see
.IR "The SunView System Programmer's Guide " \(em
.IR "Appendix: Writing a Virtual User Input Device Driver" )
are reported.
.TP
.SB TR_UNTRANS_EVENT
.B firm_events
containing unencoded keystation codes are reported
for all input events within the window system.
.RE
.SS Keyboard Translation-Table Entries
.LP
All instances of the
.B kb
module share five translation tables used to convert raw keystation codes to
event values.  The tables are:
.LP
.RS
.TP 20
Unshifted
Used when a key is depressed and no shifts are in effect.
.TP
Shifted
Used when a key is depressed and a Shift key is being held down.
.TP
Caps Lock
Used when a key is depressed and Caps Lock is in effect.
.TP
Controlled
Used when a key is depressed and the Control key is being held down (regardless
of whether a Shift key is being held down or Caps Lock is in effect).
.TP
Key Up
Used when a key is released.
.RE
.LP
Each key on the keyboard has a ``key station'' code which is a number from 0 to
127.  This number is used as an index into the translation table that is
currently in effect.  If the corresponding entry in that translation table
is a value from 0 to 127, this value is treated as an
.SM ASCII
character, and that character is the result of the translation.
.LP
If the entry is a value from 128 to 255, it is a ``special'' entry.
Special entry values are classified according to the value of
the high-order bits.  The high-order value for each class is
defined as a constant, as shown in the list below.  The value of
the low-order bits, when added to this constant, distinguishes
between keys within each class:
.TP 20
.SM SHIFTKEYS\s0 0x80
A shift key.  The value of the particular shift
key is added to determine which shift mask to apply:
.RS
.TP 20
.SM CAPSLOCK\s0 0
``Caps Lock'' key.
.TP
.SM SHIFTLOCK\s0 1
``Shift Lock'' key.
.TP
.SM LEFTSHIFT\s0 2
Left-hand ``Shift'' key.
.TP
.SM RIGHTSHIFT\s0 3
Right-hand ``Shift'' key.
.TP
.SM LEFTCTRL\s0 4
Left-hand (or only) ``Control'' key.
.TP
.SM RIGHTCTRL\s0 5
Right-hand ``Control'' key.
.RE
.TP
.SM BUCKYBITS\s0 0x90
Used to toggle mode-key-up/down status without altering the value of
an accompanying
.SM ASCII
character.  (The actual bit-position value, minus 7, is added.)
.RS
.TP 20
.SM METABIT\s0 0
The ``Meta'' key was pressed along with the key.  This is the only
user-accessible bucky bit.
.TP
.SM SYSTEMBIT\s0 1
The ``System'' key was pressed.  This is a place holder to indicate
which key is the system-abort key.
.RE
.TP
.SM FUNNY\s0 0xA0
Performs various functions depending on the value of the low 4
bits:
.RS
.TP 20
.SM NOP\s0 0xA0
Does nothing.
.TP
.SM OOPS\s0 0xA1
Exists, but is undefined.
.TP
.SM HOLE\s0 0xA2
There is no key in this position on the keyboard, and
the position-code should not be used.
.TP
.SM NOSCROLL\s0 0xA3
Alternately sends ^S and ^Q.
.TP
.SM CTRLS\s0 0xA4
Sends ^S and toggles
.SM NOSCROLL\s0
key.
.TP
.SM CTRLQ\s0 0xA5
Sends ^Q and toggles
.SM NOSCROLL
key.
.TP
.SM RESET\s0 0xA6
Keyboard reset.
.TP
.SM ERROR\s0 0xA7
The keyboard driver detected an internal error.
.TP
.SM IDLE\s0 0xA8
The keyboard is idle (no keys down).
.TP
0xA9 \(em 0xAF
Reserved for nonparameterized functions.
.RE
.TP
.SM STRING\s0 0xB0
The low-order bits index a table of strings.  When a key with a
.SB STRING
entry is depressed, the characters in the null-terminated string
for that key are sent, character by character.  The maximum length
is defined as:
.RS
.IP
.SM KTAB_STRLEN\s0 10
.LP
Individual string numbers are defined as:
.RS
.TP 15
.PD 0
.SM HOMEARROW
0x00
.TP
.SM UPARROW
0x01
.TP
.SM DOWNARROW
0x02
.TP
.SM LEFTARROW
0x03
.TP
.SM RIGHTARROW
0x04
.PD
.RE
.LP
String numbers 0x05 \(em 0x0F are available for custom entries.
.RE
.br
.ne 5
.TP
.SM LEFTFUNC\s0 0xC0
.PD 0
.TP
.SM RIGHTFUNC\s0 0xD0
.TP
.SM TOPFUNC\s0 0xE0
.TP
.SM BOTTOMFUNC\s0 0xF0
Function keys.  The low 4 bits indicate the
function key number within the group:
.PD
.RS
.RS
.TP 20
.RI \s-1LF\s0( n )
.RI (\s-1LEFTFUNC\s0+( n )-1)
.PD 0
.TP
.RI \s-1RF\s0( n )
.RI (\s-1RIGHTFUNC\s0+( n )-1)
.TP
.RI \s-1TF\s0( n )
.RI (\s-1TOPFUNC\s0+( n )-1)
.TP
.RI \s-1BF\s0( n )
.RI (\s-1BOTTOMFUNC\s0+( n )-1)
.PD
.RE
.LP
There are 64 keys reserved for function keys.
The actual positions may not be on left/right/top/bottom of the
keyboard, although they usually are.
.LP
In
.SB TR_ASCII
mode, when a function key is pressed, the following escape
sequence is sent:
.RS
\s-1ESC\s0[0\|.\|.\|.\.\|9z
.RE
where \s-1ESC\s0 is a single escape character and ``0\|.\|.\.\|9''
indicates the decimal representation of the function-key value.  For example,
function key R1 sends the sequence:
.RS
\s-1ESC\s0[208z
.RE
because the decimal value of \s-1RF\s0(1) is 208.  In
.SB TR_EVENT
mode, if there is a
.SM VUID
event code for the function key in question, an event with that event code is
generated; otherwise, individual events for the characters of the escape
sequence are generated.
.RE
.SH IOCTLS
Two
.BR ioctl s
set and retrieve the current translation mode of a keyboard:
.TP 15
.SB KIOCTRANS
.IX  "ioctls for keyboards"  "KIOCTRANS"  "\fLioctl\fP's for keyboards"  "\fLKIOCTRANS\fP \(em set keyboard translation"
.IX  "KIOCTRANS set keyboard translation"  ""  "\fLKIOCTRANS\fP \(em set keyboard translation"
.IX  "set keyboard translation ioctl"  ""  "set keyboard translation \fLioctl\fP \(em \fLKIOCTRANS\fP"
The argument is a pointer to an
.BR int .
The translation mode is set to the value in the
.B int
pointed to by the argument.
.TP
.SB KIOCGTRANS
The argument is a pointer to an
.BR int .
The current translation mode is stored in the
.B int
pointed to by the argument.
.IX  "ioctls for keyboards"  "KIOCGTRANS"  "\fLioctl\fP's for keyboards"  "\fLKIOCGTRANS\fP \(em get keyboard translation"
.IX  "KIOCGTRANS get keyboard translation"  ""  "\fLKIOCGTRANS\fP \(em get keyboard translation"
.IX  "get keyboard translation ioctl"  ""  "get keyboard translation \fLioctl\fP \(em \fLKIOCGTRANS\fP"
.LP
.BR ioctl s
for changing and retrieving entries from the keyboard translation table use
the
.B kiockey
structure:
.RS
.sp .5
.nf
.ft B
struct	kiockey {
	int	kio_tablemask;	/* Translation table (one of: 0, \s-1CAPSMASK\s0,
				   \s-1SHIFTMASK\s0, \s-1CTRLMASK\s0, \s-1UPMASK\s0) */
#define \s-1KIOCABORT\s01	-1	/* Special ``mask'': abort1 keystation */
#define \s-1KIOCABORT\s02	-2	/* Special ``mask'': abort2 keystation */
	u_char	kio_station;	/* Physical keyboard key station (0-127) */
	u_char	kio_entry;	/* Translation table station's entry */
	char	kio_string[10];	/* Value for \s-1STRING\s0 entries (null terminated) */
};
.fi
.ft R
.RE
.TP 15
.SB KIOCSETKEY
.IX  "ioctls for keyboards"  "KIOCSETKEY"  "\fLioctl\fP's for keyboards"  "\fLKIOCSETKEY\fP \(em change translation table entry"
.IX  "KIOCSETKEY change translation table entry"  ""  "\fLKIOCSETKEY\fP \(em change translation table entry"
.IX  "change translation table entry ioctl"  ""  "change translation table entry \fLioctl\fP \(em \fLKIOCSETKEY\fP"
The argument is a pointer to a
.B kiockey
structure.  The translation table entry referred to by the values in that
structure is changed.
.IP
.B kio_tablemask
specifies which of the five translation tables contains the entry to be
modified:
.RS
.RS
.TP 20
.SM UPMASK\s0 0x0080
``Key Up'' translation table.
.TP
.SM CTRLMASK\s0 0x0030
``Controlled'' translation table.
.TP
.SM SHIFTMASK\s0 0x000E
``Shifted'' translation table.
.TP
.SM CAPSMASK\s0 0x0001
``Caps Lock'' translation table.
.TP
(No shift keys pressed or locked)
``Unshifted'' translation table.
.RE
.RE
.IP
.B kio_station
specifies the keystation code for the entry to be modified.  The value of
.B kio_entry
is stored in the entry in question.
If
.B kio_entry
is between
.SM STRING
and
.SM STRING+15\s0,
the string contained in
.B kio_string
is copied to the appropriate string table entry.
This call may return
.SB \%EINVAL
if there are invalid arguments.
.IP
There are a couple special values of
.B kio_tablemask
that affect
the two step ``break to the
.SM PROM
monitor'' sequence.
The usual sequence is
.B SETUP\fR\-\fBa
or
.BR L1\fR\-\fBa .
If
.B kio_tablemask
is
.SB KIOCABORT1
then the value of
.B kio_station
is set to be the first keystation in the sequence.
If
.B kio_tablemask
is
.SB KIOCABORT2
then the value of
.B kio_station
is set to be the second keystation in the sequence.
.TP
.SB KIOCGETKEY
.IX  "ioctls for keyboards"  "KIOCGETKEY"  "\fLioctl\fP's for keyboards"  "\fLKIOCGETKEY\fP \(em get translation table entry"
.IX  "KIOCGETKEY get translation table entry"  ""  "\fLKIOCGETKEY\fP \(em get translation table entry"
.IX  "get translation table entry ioctl"  ""  "get translation table entry \fLioctl\fP \(em \fLKIOCGETKEY\fP"
The argument is a pointer to a
.B kiockey
structure.  The current value of the keyboard translation table entry specified
by
.B kio_tablemask
and
.B kio_station
is stored in the structure pointed to by the argument.
This call may return
.SB EINVAL
if there are invalid arguments.
.TP
.SB KIOCTYPE
.IX  "ioctls for keyboards"  "KIOCTYPE"  "\fLioctl\fP's for keyboards"  "\fLKIOCTYPE\fP \(em get keyboard type"
.IX  "KIOCTYPE get keyboard type"  ""  "\fLKIOCTYPE\fP \(em get keyboard type"
.IX  "get keyboard type ioctl"  ""  "get keyboard type \fLioctl\fP \(em \fLKIOCTYPE\fP"
The argument is a pointer to an
.BR int .
A code indicating the type of the keyboard is stored in the
.B int
pointed to by the argument:
.RS
.RS
.PD 0
.TP 15
.SB KB_KLUNK
Micro Switch 103\s-1SD\s032-2
.TP
.B \s-1KB_VT\s0100
Keytronics \s-1VT\s0100 compatible
.TP
.B \s-1KB_SUN\s02
Sun-2 keyboard
.TP
.B \s-1KB_SUN\s03
Type 3 keyboard
.TP
.B \s-1KB_SUN\s04
Type 4 keyboard
.TP
.SB KB_ASCII
\s-1ASCII\s0 terminal masquerading as keyboard
.PD
.RE
.RE
.IP
\-1 is stored in the
.B int
pointed to by the argument if the keyboard type is unknown.
.TP
.SB KIOCCMD
.IX  "ioctls for keyboards"  "KIOCCMD"  "\fLioctl\fP's for keyboards"  "\fLKIOCCMD\fP \(em send a keyboard command"
.IX  "KIOCCMD send a keyboard command"  ""  "\fLKIOCCMD\fP \(em send a keyboard command"
.IX  "send a keyboard command ioctl"  ""  "send a keyboard command \fLioctl\fP \(em \fLKIOCCMD\fP"
The argument is a pointer to an
.BR int .
The command specifed by the value of the
.B int
pointed to by the argument is sent to the keyboard.  The commands that can be
sent are:
.IP
Commands to the Sun-2, Type 3, and Type 4 keyboard:
.RS
.RS
.PD 0
.TP 20
.SB KBD_CMD_RESET
Reset keyboard as if power-up.
.TP
.SB KBD_CMD_BELL
Turn on the bell.
.TP
.SB KBD_CMD_NOBELL
Turn off the bell
.PD
.RE
.RE
.IP
Commands to the Type 3 and Type 4 keyboard:
.RS
.RS
.PD 0
.TP 20
.SB KBD_CMD_CLICK
Turn on the click annunciator.
.TP
.SB KBD_CMD_NOCLICK
Turn off the click annunciator.
.PD
.RE
.RE
.IP
Inappropriate commands for particular keyboard types are ignored.
Since there is no reliable way to get the state of the bell or click
(because we cannot query the keyboard, and also because a process could
do writes to the appropriate serial driver \(em thus going around this
.BR ioctl )
we do not provide an equivalent
.B ioctl
to query its state.
.TP
.SB KIOCSDIRECT
.PD 0
.TP
.SB KIOCGDIRECT
.IX  "ioctls for keyboards"  "KIOCSDIRECT"  "\fLioctl\fP's for keyboards"  "\fLKIOCSDIRECT\fP \(em set keyboard ``direct input'' state"
.IX  "KIOCSDIRECT set keyboard ``direct input'' state"  ""  "\fLKIOCSDIRECT\fP \(em set keyboard ``direct input'' state"
.IX  "set keyboard ``direct input'' state"  ""  "set keyboard ``direct input'' state \fLioctl\fP \(em \fLKIOCSDIRECT\fP"
.IX  "ioctls for keyboards"  "KIOCGDIRECT"  "\fLioctl\fP's for keyboards"  "\fLKIOCGDIRECT\fP \(em get keyboard ``direct input'' state"
.IX  "KIOCGDIRECT get keyboard ``direct input'' state"  ""  "\fLKIOCGDIRECT\fP \(em get keyboard ``direct input'' state"
.IX  "get keyboard ``direct input'' state"  ""  "get keyboard ``direct input'' state \fLioctl\fP \(em \fLKIOCGDIRECT\fP"
These
.BR ioctl s
are supported for compatibility with the system keyboard device
.BR /dev/kbd .
.SB KIOCSDIRECT
has no effect, and
.SB KIOCGDIRECT
always returns 1.
.SH INDEX STRUCTURES
There is a hierarchy of structures for accessing keyboard
translation data.  The array
.I keytables
contains pointers to the translation data for each of the known
keyboard types:
.RS
.nf
.ft B
struct keyboard *keytables[\|] = {
	&keyindex_ms,
	&keyindex_vt,
	&keyindex_s2,
	&keyindex_s3,
};
.ft R
.fi
.RE
.LP
Each keyboard type is described by a
.B "struct keyboard"
that contains pointers to the five translation-tables
(``Unshifted'', ``Shifted'', ``Caps Locked'' ``Controlled'', and ``Key Up'')
associated with that type, plus bit-masks that indicate what
state can persist with no keys pressed, and the key-pair used as
the abort sequence for the system.
.br
.ne 15
.LP
An array
.B keystringtab
contains the strings sent by various keys, and can be accessed
by any translation:
.LP
.ne 7
.ta 8n +\w'CAPSMASK+CTLSMASK,'u+2n
.RS
.nf
.ft B
#define kstescinit(c)   {'\e033', '[', 'c', '\e0'}
char keystringtab[16][\s-1KTAB_STRLEN\s0] = {
.BR 	kstescinit (H),	/* home */
.BR 	kstescinit (A),	/* up */
.BR 	kstescinit (B),	/* down */
.BR 	kstescinit (D),	/* left */
.BR 	kstescinit (C),	/* right */
};
.ft R
.fi
.RE
.ne 13
.SS "Index Structure for the Type 4 Keyboard"
.RS
.nf
.ft B
/* Index to keymaps for Type 4 keyboard */
static struct keyboard keyindex_s4 = {
	&keytab_s4_lc,
	&keytab_s4_uc,
	&keytab_s4_cl,
	&keytab_s4_ct,
	&keytab_s4_up,
	0x0000,		/* Shift bits which stay on with idle keyboard */
	0x0000,		/* Bucky bits which stay on with idle keyboard */
	1,	77, 	/* abort keys */
	\s-1CAPSMASK\s0,	/* Shift bits which toggle on down event */
};
.ft R
.fi
.RE
.SS "Index Structure for the Type 3 Keyboard"
.ta 8n +\w'CAPSMASK+CTLSMASK,'u+2n
.RS
.nf
.ft B
static struct keyboard keyindex_s3 = {
	&keytab_s3_lc,
	&keytab_s3_uc,
	&keytab_s3_cl,
	&keytab_s3_ct,
	&keytab_s3_up,
	0x0000, 	/* Shift bits that stay on with idle keyboard */
	0x0000, 	/* Bucky bits that stay on with idle keyboard */
	0x01, 0x4d, 	/* Abort sequence  L1-A */
	\s-1CAPSMASK\s0,	/* Shift bits that toggle on down event */
};
.ft R
.fi
.RE
.ne 13
.SS "Index Structure for the Sun-2 Keyboard"
.ta 8n +\w'CAPSMASK+CTLSMASK,'u+2n
.RS
.nf
.ft B
static struct keyboard keyindex_s2 = {
	&keytab_s2_lc,
	&keytab_s2_uc,
	&keytab_s2_cl,
	&keytab_s2_ct,
	&keytab_s2_up,
	\s-1CAPSMASK\s0,	/* Shift bits that stay on with idle keyboard */
	0x0000, 	/* Bucky bits that stay on with idle keyboard */
	0x01, 0x4d, 	/* Abort sequence L1-A */
	0x0000, 	/* Shift bits that toggle on down event */
};
.ft R
.fi
.RE
.ne 13
.SS "Index Structure for the Micro Switch 103SD32-2 Keyboard"
.ta 8n +\w'CAPSMASK+CTLSMASK,'u+2n
.RS
.nf
.ft B
static struct keyboard keyindex_ms = {
	&keytab_ms_lc,
	&keytab_ms_uc,
	&keytab_ms_cl,
	&keytab_ms_ct,
	&keytab_ms_up,
	\s-1CTLSMASK\s0,	/* Shift bits that stay on with idle keyboard */
	0x0000, 	/* Bucky bits that stay on with idle keyboard */
	0x01, 0x4d, 	/* Abort sequence L1-A */
	0x0000, 	/* Shift bits that toggle on down event */
};
.ft R
.fi
.RE
.ne 13
.SS Index Structure for the VT100-Style Keyboard
.ta 8n +\w'CAPSMASK+CTLSMASK,'u+2n
.RS
.nf
.ft B
static struct keyboard keyindex_vt = {
	&keytab_vt_lc,
	&keytab_vt_uc,
	&keytab_vt_cl,
	&keytab_vt_ct,
	&keytab_vt_up,
	\s-1CAPSMASK\s0+\s-1CTLSMASK\s0,	/* Shift keys that stay on with idle keyboard */
	0x0000, 	/* Bucky bits that stay on with idle keyboard */
	0x01, 0x3b, 	/* Abort sequence \s-1SETUP\s0-A */
	0x0000, 	/* Shift bits that toggle on down event */
};
.ft R
.fi
.RE
.if t .ne 28
.SH DEFAULT TRANSLATION TABLES
.LP
.ps
.vs
.ne 20
.UH Type 4 Keyboard
.SS Unshifted
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (10)
			SYSTEMBIT
08	TF(3)	09	TF(11)	0A	TF(4)	0B	TF(12)	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'1'	1F	'2'
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	BF(13)	31	LF(5)	32	BF(10)	33	LF (6)	34	HOLE	35	'\et'	36	'q'	37	'w'
38	'e'	39	'r'	3A	't'	3B	'y'	3C	'u'	3D	'i'	3E	'o'	3F	'p'
40	'['	41	']'	42	0x7F	43	OOPS	44	RF(7)	45	STRING+	46	RF(9)	47	BF (15)
							 (temp)				UPARROW
48	LF(7)	49	LF (8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	'a'	4E	's'	4F	'd'
									LEFTCTRL
50	'f'	51	'g'	52	'h'	53	'j'	54	'k'	55	'l'	56	';'	57	'\e''
58	'\e\e'	59	'\er'	5A	BF(11)	5B	STRING+	5C	RF(11)	5D	STRING+	5E	BF(8)	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	HOLE	61	LF(10)	62	BF (16)	63	SHIFTKEYS+	64	'z'	65	'x'	66	'c'	67	'v'
							LEFTSHIFT
68	'b'	69	'n'	6A	'm'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF(15)	73	HOLE	74	HOLE	75	HOLE	76	LF (16)	77	SHIFTKEYS+
			DOWNARROW		 										CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	BF (14)	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.UH Type 4 Keyboard
.SS Shifted
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (10)
			SYSTEMBIT
08	TF(3)	09	TF(11)	0A	TF(4)	0B	TF(12)	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'!'	1F	'@'
20	'#'	21	'$'	22	'%'	23	'^'	24	'&'	25	'*'	26	' ('	27	')'
28	'_'	29	'+'	2A	'~'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	BF(13)	31	LF(5)	32	BF(10)	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'{'	41	'}'	42	0x7F	43	OOPS	44	RF(7)	45	STRING+	46	RF(9)	47	BF (15)
							 (temp)				UPARROW
48	LF(7)	49	LF (8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	':'	57	'"'
58	'|'	59	'\er'	5A	BF(11)	5B	STRING+	5C	RF(11)	5D	STRING+	5E	BF(8)	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	HOLE	61	LF(10)	62	BF (16)	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	'<'	6C	'>'	6D	'?'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF(15)	73	HOLE	74	HOLE	75	HOLE	76	LF (16)	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	BF (14)	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps +3
.vs +3
.ne 20
.UH Type 4 Keyboard
.SS Caps Locked
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (10)
			SYSTEMBIT
08	TF(3)	09	TF(11)	0A	TF(4)	0B	TF(12)	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'1'	1F	'2'
21	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	BF(23)	32	LF(5)	32	BF(20)	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'['	41	']'	43	0x7F	43	OOPS	44	RF(7)	45	STRING+	46	RF(9)	47	BF (15)
							 (temp)				UPARROW
48	LF(7)	49	LF (8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	';'	57	'\e''
58	'\e\e'	59	'\er'	5A	BF(11)	5B	STRING+	5C	RF(11)	5D	STRING+	5E	BF(8)	5F	LF (9)
							LEFTARROW				RIGHTARRROW
60	HOLE	61	LF(10)	62	BF (16)	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF(15)	73	HOLE	74	HOLE	75	HOLE	76	LF (16)	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	BF (14)	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.UH Type 4 Keyboard
.SS Controlled
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (10)
			SYSTEMBIT
08	TF(3)	09	TF(11)	0A	TF(4)	0B	TF(12)	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c('[')	1E	'1'	1F	c ('@')
20	'3'	21	'4'	22	'5'	23	c ('^')	24	'7'	25	'8'	26	'9'	27	'0'
28	c('_')	29	'='	2A	c('^')	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	BF(13)	31	LF(5)	32	BF(10)	33	LF(6)	34	HOLE	35	'\et'	36	c('q')	37	c ('w')
38	c('e')	39	c('r')	3A	c('t')	3B	c('y')	3C	c('u')	3D	c('i')	3E	c('o')	3F	c ('p')
40	c('[')	41	c(']')	42	0x7F	43	OOPS	44	RF(7)	45	STRING+	46	RF(9)	47	BF (15)
							 (temp)				UPARROW
48	LF(7)	49	LF(8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	c('a')	4E	c('s')	4F	c ('d')
									LEFTCTRL
50	c('f')	51	c('g')	52	c('h')	53	c('j')	54	c('k')	55	c ('l')	56	';'	57	'\e''
58	c('\e\e')	59	'\er'	5A	BF(11)	5B	STRING+	5C	RF(11)	5D	STRING+	5E	BF(8)	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	HOLE	61	LF(10)	62	BF(16)	63	SHIFTKEYS+	64	c('z')	65	c('x')	66	c('c')	67	c ('v')
							LEFTSHIFT
68	c('b')	69	c('n')	6A	c('m')	6B	','	6C	'.'	6D	c ('_')	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF(15)	73	HOLE	74	HOLE	75	HOLE	76	LF (16)	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	c('\0')	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	BF (14)	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.UH Type 4 Keyboard
.SS Key Up
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	OOPS	04	HOLE	05	OOPS	06	OOPS	07	HOLE
			SYSTEMBIT
08	OOPS	09	HOLE	0A	OOPS	0B	HOLE	0C	OOPS	0D	HOLE	0E	OOPS	0F	HOLE
10	OOPS	11	OOPS	12	OOPS	13	OOPS	14	HOLE	15	OOPS	16	OOPS	17	NOP
18	HOLE	19	OOPS	1A	OOPS	1B	HOLE	1C	HOLE	1D	NOP	1E	NOP	1F	NOP
20	NOP	21	NOP	22	NOP	23	NOP	24	NOP	25	NOP	26	NOP	27	NOP
28	NOP	29	NOP	2A	NOP	2B	NOP	2C	HOLE	2D	OOPS	2E	OOPS	2F	NOP
30	HOLE	31	OOPS	32	HOLE	33	OOPS	34	HOLE	35	NOP	36	NOP	37	NOP
38	NOP	39	NOP	3A	NOP	3B	NOP	3C	NOP	3D	NOP	3E	NOP	3F	NOP
40	NOP	41	NOP	42	NOP	43	HOLE	44	OOPS	45	OOPS	46	NOP	47	HOLE
48	OOPS	49	OOPS	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	NOP	4E	NOP	4F	NOP
									LEFTCTRL
50	NOP	51	NOP	52	NOP	53	NOP	54	NOP	55	NOP	56	NOP	57	NOP
58	NOP	59	NOP	5A	HOLE	5B	OOPS	5C	OOPS	5D	NOP	5E	HOLE	5F	OOPS
60	OOPS	61	OOPS	62	HOLE	63	SHIFTKEYS+	64	NOP	65	NOP	66	NOP	67	NOP
							LEFTSHIFT
68	NOP	69	NOP	6A	NOP	6B	NOP	6C	NOP	6D	NOP	6E	SHIFTKEYS+	6F	NOP
													RIGHTSHIFT
70	OOPS	71	OOPS	72	NOP	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	NOP
78	BUCKYBITS+	79	NOP	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	RESET
	METABIT				METABIT
.TE
.ps +3
.vs +3
.ne 20
.UH Type 3 Keyboard
.SS Unshifted
.ps -3
.vs -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF (2)	07	HOLE
			SYSTEMBIT
08	TF(3)	09	HOLE	0A	TF(4)	0B	HOLE	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'1'	1F	'2'
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	HOLE	33	LF (6)	34	HOLE	35	'\et'	36	'q'	37	'w'
38	'e'	39	'r'	3A	't'	3B	'y'	3C	'u'	3D	'i'	3E	'o'	3F	'p'
40	'['	41	']'	42	0x7F	43	HOLE	45	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	LF (40)	4B	HOLE	4C	SHIFTKEYS+	4D	'a'	4E	's'	4F	'd'
									LEFTCTRL
50	'f'	51	'g'	52	'h'	53	'j'	54	'k'	55	'l'	56	';'	57	'\e\''
58	'\e'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'z'	65	'x'	66	'c'	67	'v'
							LEFTSHIFT
68	'b'	69	'n'	6A	'm'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT  				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Type 3 Keyboard
.SS Shifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF (2)	07	HOLE
			SYSTEMBIT
08	TF(3)	09	HOLE	0A	TF(4)	0B	HOLE	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'!'	1F	'@'
20	'#'	21	'$'	22	'%'	23	'^'	24	'&'	25	'*'	26	' ('	27	')'
28	'_'	29	'+'	2A	'~'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	HOLE	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'{'	41	'}'	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF (8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	':'	57	'"'
58	'|'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	'<'	6C	'>'	6D	'?'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT 				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Type 3 Keyboard
.SS "Caps Locked"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF (2)	07	HOLE
			SYSTEMBIT
08	TF(3)	09	HOLE	0A	TF(4)	0B	HOLE	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c ('[')	1E	'1'	1F	'2'
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	HOLE	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'['	41	']'	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF (8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	';'	57	'\e\''
58	'\e'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Type 3 Keyboard
.SS Controlled
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	LF(2)	04	HOLE	05	TF(1)	06	TF (2)	07	HOLE
			SYSTEMBIT
08	TF(3)	09	HOLE	0A	TF(4)	0B	HOLE	0C	TF(5)	0D	HOLE	0E	TF (6)	0F	HOLE
10	TF(7)	11	TF(8)	12	TF(9)	13	ALT	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19	LF(3)	1A	LF(4)	1B	HOLE	1C	HOLE	1D	c('[')	1E	'1'	1F	c ('@')
20	'3'	21	'4'	22	'5'	23	c ('^')	24	'7'	25	'8'	26	'9'	27	'0'
28	c('_')	29	'='	2A	c('^')	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	HOLE	33	LF(6)	34	HOLE	35	'\et'	36	c('q')	37	c ('w')
38	c('e')	39	c('r')	3A	c('t')	3B	c('y')	3C	c('u')	3D	c('i')	3E	c('o')	3F	c ('p')
40	c('[')	41	c(']')	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	c('a')	4E	c('s')	4F	c ('d')
									LEFTCTRL
50	c('f')	51	c('g')	52	c('h')	53	c('j')	54	c('k')	55	c ('l')	56	';'	57	'\e\''
58	c('\e')	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF(10)	62	HOLE	63	SHIFTKEYS+	64	c('z')	65	c('x')	66	c('c')	67	c ('v')
							LEFTSHIFT
68	c('b')	69	c('n')	6A	c('m')	6B	','	6C	'.'	6D	c ('_')	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	SHIFTKEYS+
			DOWNARROW												CAPSLOCK
78	BUCKYBITS+	79	c ('\0')	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Type 3 Keyboard
.SS "Key Up"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	OOPS	04	HOLE	05	OOPS	06	OOPS	07	HOLE
			SYSTEMBIT
08	OOPS	09	HOLE	0A	OOPS	0B	HOLE	0C	OOPS	0D	HOLE	0E	OOPS	0F	HOLE
10	OOPS	11	OOPS	12	OOPS	13	OOPS	14	HOLE	15	OOPS	16	OOPS	17	NOP
18	HOLE	19	OOPS	1A	OOPS	1B	HOLE	1C	HOLE	1D	NOP	1E	NOP	1F	NOP
20	NOP	21	NOP	22	NOP	23	NOP	24	NOP	25	NOP	26	NOP	27	NOP
28	NOP	29	NOP	2A	NOP	2B	NOP	2C	HOLE	2D	OOPS	2E	OOPS	2F	NOP
30	HOLE	31	OOPS	32	HOLE	33	OOPS	34	HOLE	35	NOP	36	NOP	37	NOP
38	NOP	39	NOP	3A	NOP	3B	NOP	3C	NOP	3D	NOP	3E	NOP	3F	NOP
40	NOP	41	NOP	42	NOP	43	HOLE	44	OOPS	45	OOPS	46	NOP	47	HOLE
48	OOPS	49	OOPS	4A	HOLE	4B	HOLE	4C	SHIFTKEYS+	4D	NOP	4E	NOP	4F	NOP
									LEFTCTRL
50	NOP	51	NOP	52	NOP	53	NOP	54	NOP	55	NOP	56	NOP	57	NOP
58	NOP	59	NOP	5A	HOLE	5B	OOPS	5C	OOPS	5D	NOP	5E	HOLE	5F	OOPS
60	OOPS	61	OOPS	62	HOLE	63	SHIFTKEYS+	64	NOP	65	NOP	66	NOP	67	NOP
							LEFTSHIFT
68	NOP	69	NOP	6A	NOP	6B	NOP	6C	NOP	6D	NOP	6E	SHIFTKEYS+	6F	NOP
													RIGHTSHIFT
70	OOPS	71	OOPS	72	NOP	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	NOP
78	BUCKYBITS+	79	NOP	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	RESET
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.UH Sun-2 Keyboard
.SS Unshifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(11)	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (11)
			SYSTEMBIT
08	TF (3) 	09	TF(12)	0A	TF(4)	0B	TF(13)	0C	TF(5)	0D	TF(14)	0E	TF(6)	0F	TF(15)
10	TF(7)	11	TF(8)	12	TF(9)	13	TF(10)	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE 	19	LF(3) 	1A	LF(4)	1B	LF(12)	1C	HOLE	1D	c('[')	1E	'1'	1F	'2'
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	LF(13)	33	LF (6)	34	HOLE	35	'\et'	36	'q'	37	'w'
38	'e'	39	'r'	3A	't'	3B	'y'	3C	'u'	3D	'i'	3E	'o'	3F	'p'
40	'['	41	']'	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	LF (14)	4B	HOLE	4C	SHIFTKEYS+	4D	'a' 	4E	's'	4F	'd'
									LEFTCTRL
50	'f'	51	'g'	52	'h'	53	'j'	54	'k'	55	'l'	56	';'	57	'\e\''
58	'\e'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'z'	65	'x'	66	'c'	67	'v'
							LEFTSHIFT
68	'b'	69	'n'	6A	'm'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
			DOWNARROW
70	BUCKYBITS+	71	'\0'	72	BUCKYBITS+	73	HOLE	74	HOLE	75	HOLE	76	ERROR	77	IDLE
	METABIT				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Sun-2 Keyboard
.SS Shifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(11)	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (11)
			SYSTEMBIT
08	TF (3) 	00	TF(12)	0A	TF(4)	0B	TF(13)	0C	TF(5)	0D	TF(14)	0E	TF(6)	0F	TF(15)
10	TF(7)	11	TF(8)	12	TF(9)	13	TF(10)	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE 	19	LF(3) 	1A	LF(4)	1B	LF(12)	1C	HOLE	1D	c('[')	1E	'!'	1F	'@'
20	'#'	21	'$'	22	'%'	23	'^'	24	'&'	25	'*'	26	' ('	27	')'
28	'_'	29	'+'	2A	'~'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	LF(13)	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'{'	41	'}'	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	LF (14)	4B	HOLE	4C	SHIFTKEYS+	4D	'A' 	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	':'	57	'"'
58	'|'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	'<'	6C	'>'	6D	'?'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
			DOWNARROW
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT  				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Sun-2 Keyboard
.SS "Caps Locked"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(11)	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (11)
			SYSTEMBIT
08	TF (3)	09 	TF(12)	0A	TF(4)	0B	TF(13)	0C	TF(5)	0D	TF(14)	0E	TF(6)	0F	TF(15)
10	TF(7)	11	TF(8)	12	TF(9)	13	TF(10)	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19 	LF(3)	1A 	LF(4)	1B	LF(12)	1C	HOLE	1D	c('[')	1E	'1'	1F	'2'
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'='	2A	'`'	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	LF(13)	33	LF (6)	34	HOLE	35	'\et'	36	'Q'	37	'W'
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'['	41	']'	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	LF (14)	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
									LEFTCTRL
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	';'	57	'\e''
58	'\e'	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
							LEFTARROW				RIGHTARROW
60	LF(15)	61	LF (10)	62	HOLE	63	SHIFTKEYS+	64	'Z'	65	'X'	66	'C'	67	'V'
							LEFTSHIFT
68	'B'	69	'N'	6A	'M'	6B	','	6C	'.'	6D	'/'	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
			DOWNARROW
78	BUCKYBITS+	79	'\0'	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT				METABIT
.TE
.ps +3
.vs +3
.ne 20
.CH Sun-2 Keyboard
.SS Controlled
.ps -3
.vs -3
.TS
expand;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(11)	03	LF(2)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (11)
08	TF(3)	09	TF(12)	0A	TF(4)	0B	TF(13)	0C	TF(5)	0D	TF(14)	0E	TF(6)	0F	TF (15)
10	TF(7)	11	TF(8)	12	TF(9)	13	TF(10)	14	HOLE	15	RF(1)	16	RF(2)	17	RF (3)
18	HOLE	19 	LF(3)	1A 	LF(4)	1B	LF(12)	1C	HOLE	1D	c('[')	1E	'1'	1F	c('@')
20	'3'	21	'4'	22	'5'	23	c ('^')	24	'7'	25	'8'	26	'9'	27	'0'
28	c('_')	29	'='	2A	c('^')	2B	'\eb'	2C	HOLE	2D	RF(4)	2E	RF(5)	2F	RF (6)
30	HOLE	31	LF(5)	32	LF(13)	33	LF(6)	34	HOLE	35	'\et'	36	c('q')	37	c ('w')
38	c('e')	39	c('r')	3A	c('t')	3B	c('y')	3C	c('u')	3D	c('i')	3E	c('o')	3F	c ('p')
40	c('[')	41	c(']')	42	0x7F	43	HOLE	44	RF(7)	45	STRING+	46	RF (9)	47	HOLE
											UPARROW
48	LF(7)	49	LF(8)	4A	LF(14)	4B	HOLE	4C	SHIFTKEYS+	4D	c('a')	4E	c('s')	4F	c ('d')
									LEFTCTRL
50	c('f')	51	c('g')	52	c('h')	53	c('j')	54	c('k')	55	c ('l')	56	';'	57	'\e\''
58	c('\e')	59	'\er'	5A	HOLE	5B	STRING+	5C	RF(11)	5D	STRING+	5E	HOLE	5F	LF (9)
								LEFTARROW				RIGHTARROW
60	LF(15)	61	LF(10)	62	HOLE	63	SHIFTKEYS+	64	c('z')	65	c('x')	66	c('c')	67	c ('v')
							LEFTSHIFT
68	c('b')	69	c('n')	6A	c('m')	6B	','	6C	'.'	6D	c ('_')	6E	SHIFTKEYS+	6F	'\en'
													RIGHTSHIFT
70	RF(13)	71	STRING+	72	RF (15)	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
			DOWNARROW
78	BUCKYBITS+	79	c ('\0')	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	ERROR	7F	IDLE
	METABIT  				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.CH Sun-2 Keyboard
.SS "Key Up"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	OOPS	03	OOPS	04	HOLE	05	OOPS	06	OOPS	07	OOPS
			SYSTEMBIT
08	OOPS	09 	OOPS	0A 	OOPS	0B	OOPS	0C	OOPS	0D	OOPS	0E	OOPS	0F	OOPS
10	OOPS	11 	OOPS	12 	OOPS	13	OOPS	14	HOLE	15	OOPS	16	OOPS	17	NOP
18	HOLE	19 	OOPS	1A 	OOPS	1B	OOPS	1C	HOLE	1D	NOP	1E	NOP	1F	NOP
20	NOP	21	NOP	22	NOP	23	NOP	24	NOP	25	NOP	26	NOP	27	NOP
28	NOP	29	NOP	2A	NOP	2B	NOP	2C	HOLE	2D	OOPS	2E	OOPS	2F	NOP
30	HOLE	31	OOPS	32	OOPS	33	OOPS	34	HOLE	35	NOP	36	NOP	37	NOP
38	NOP	39	NOP	3A	NOP	3B	NOP	3C	NOP	3D	NOP	3E	NOP	3F	NOP
40	NOP	41	NOP	42	NOP	43	HOLE	44	OOPS	45	OOPS	46	NOP	47	HOLE
48	OOPS	49	OOPS	4A	OOPS	4B	HOLE	4C	SHIFTKEYS+	4D	NOP	4e 	NOP	4F	NOP
									LEFTCTRL
50	NOP	51	NOP	52	NOP	53	NOP	54	NOP	55	NOP	56	NOP	57	NOP
58	NOP	59	NOP	5A	HOLE	5B	OOPS	5C	OOPS	5D	NOP	5E	HOLE	5F	OOPS
60	OOPS	61	OOPS	62	HOLE	63	SHIFTKEYS+	64	NOP	65	NOP	66	NOP	67	NOP
							LEFTSHIFT
68	NOP	69	NOP	6A	NOP	6B	NOP	6C	NOP	6D	NOP	6E	SHIFTKEYS+	6F	NOP
													RIGHTSHIFT
70	OOPS	71	OOPS	72	NOP	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	BUCKYBITS+	79	NOP	7A	BUCKYBITS+	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	RESET
	METABIT  				METABIT
.TE
.ps  +3
.vs  +3
.ne 20
.UH Micro Switch 103SD32-2 Keyboard
.SS Unshifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(2)	03	LF(3)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (3)
			SYSTEMBIT
08	TF(4)	09	TF(5)	0A	TF(6)	0B	TF(7)	0C	TF(8)	0D	TF(9)	0E	TF(10)	0F	TF (11)
10	TF(12)	11	TF(13)	12	TF(14)	13	c('[')	14	HOLE	15	RF (1)	16	'+'	17	'\-'
18	HOLE	19	LF(4)	1A	'\ef'	1B	LF (6)	1C	HOLE	1D	SHIFTKEYS+	1E	'1'	1F	'2'
											CAPSLOCK
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'~'	2A	'`'	2B	'\eb'	2C	HOLE	2D	'7'	2E	'8'	2F	'9'
30	HOLE	31	LF(7)	32	STRING+	33	LF (9)	34	HOLE	35	'\et'	36	'q'	37	'w'
					UPARROW
38	'e'	39	'r'	3A	't'	3B	'y'	3C	'u'	3D	'i'	3E	'o'	3F	'p'
40	'{'	41	'}'	42	'_'	43	HOLE	44	'4'	45	'5'	46	'6'	47	HOLE
48	STRING+	49	STRING+	4A	STRING+	4B	HOLE	4C	SHIFTKEYS+	4D	'a' 	4E	's'	4F	'd'
	LEFTARROW		HOMEARROW		RIGHTARROW				SHIFTLOCK
50	'f'	51	'g'	52	'h'	53	'j'	54	'k'	55	'l'	56	';'	57	':'
58	'|'	59	'\er'	5A	HOLE	5B	'1'	5C	'2'	5D	'3'	5E	HOLE	5F	NOSCROLL
60	STRING+	61	LF (15)	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	'z'	66	'x'	67	'c'
	DOWNARROW								LEFTSHIFT
68	'v'	69	'b'	6A	'n'	6B	'm'	6C	','	6D	'.'	6E	'/'	6F	SHIFTKEYS+
															RIGHTSHIFT
70	NOP	71	0x7F	72	'0'	73	NOP	74	'.'	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	SHIFTKEYS+	7B	'\0'	7C	SHIFTKEYS+	7D	HOLE	7E	HOLE	7F	IDLE
					LEFTCTRL				RIGHTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.CH Micro Switch 103SD32-2 Keyboard
.SS Shifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS	02	LF(2)	03	LF(3)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (3)
			SYSTEMBIT
08	TF(4)	09	TF(5)	0A	TF(6)	0B	TF(7)	0C	TF(8)	0D	TF(9)	0E	TF(10)	0F	TF (11)
10	TF(12)	11	TF(13)	12	TF(14)	13	c('[')	14	HOLE	15	RF (1)	16	'+'	17	'\-'
18	HOLE	19	LF(4)	1A	'\ef'	1B	LF (6)	1C	HOLE	1D	SHIFTKEYS+	1E	'!'	1F	'"'
											CAPSLOCK
20	'#'	21	'$'	22	'%'	23	'&'	24	'\e\''	25	' ('	26	')'	27	'0'
28	'='	29	'^'	2A	'@'	2B	'\eb'	2C	HOLE	2D	'7'	2E	'8'	2F	'9'
30	HOLE	31	LF(7)	32	STRING+	33	LF (9)	34	HOLE	35	'\et'	36	'Q'	37	'W'
					UPARROW
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'['	41	']'	42	'_'	43	HOLE	44	'4'	45	'5'	46	'6'	47	HOLE
48	STRING+	49	STRING+	4A	STRING+	4B	HOLE	4C	SHIFTKEYS+	4D	'A'	4E	'S'	4F	'D'
	LEFTARROW 		HOMEARROW		RIGHTARROW				SHIFTLOCK
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	'+'	57	'*'
58	'\e'	59	'\er'	5A	HOLE	5B	'1'	5C	'2'	5D	'3'	5E	HOLE	5F	NOSCROLL
60	STRING+	61	LF (15)	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	'Z'	66	'X'	67	'C'
	DOWNARROW								LEFTSHIFT
68	'V'	69	'B'	6A	'N'	6B	'M'	6C	'<'	6D	'>'	6E	'?'	6F	SHIFTKEYS+
															RIGHTSHIFT
70	NOP	71	0x7F	72	'0'	73	NOP	74	'.'	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	SHIFTKEYS+	7B	'\0'	7C	SHIFTKEYS+	7D	HOLE	7E	HOLE	7F	IDLE
					RIGHTSHIFT 				LEFTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.CH Micro Switch 103SD32-2 Keyboard
.SS "Caps Locked"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(2)	03	LF(3)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (3)
			SYSTEMBIT
08	TF(4)	09	TF (5) 	0A	TF(6)	0B	TF(7)	0C	TF(8)	0D	TF(9)	0E	TF(10)	0F	TF(11)
10	TF(12)	11	TF(13)	12	TF(14)	13	c('[')	14	HOLE	15	RF (1)	16	'+'	17	'\-'
18	HOLE 	19	LF(4) 	1A	'\ef'	1B	LF(6)	1C	HOLE	1D	SHIFTKEYS+	1E	'1'	1F	'2'
											CAPSLOCK
20	'3'	21	'4'	22	'5'	23	'6'	24	'7'	25	'8'	26	'9'	27	'0'
28	'\-'	29	'~'	2A	'`'	2B	'\eb'	2C	HOLE	2D	'7'	2E	'8'	2F	'9'
30	HOLE	31	LF(7)	32	STRING+	33	LF (9)	34	HOLE	35	'\et'	36	'Q'	37	'W'
					UPARROW
38	'E'	39	'R'	3A	'T'	3B	'Y'	3C	'U'	3D	'I'	3E	'O'	3F	'P'
40	'{'	41	'}'	42	'_'	43	HOLE	44	'4'	45	'5'	46	'6'	47	HOLE
48	STRING+	49	STRING+	4A	STRING+ 	4B	HOLE	4C	SHIFTKEYS+	4D	'A' 	4E	'S'	4F	'D'
	LEFTARROW		HOMEARROW		RIGHTARROW				SHIFTLOCK
50	'F'	51	'G'	52	'H'	53	'J'	54	'K'	55	'L'	56	';'	57	':'
58	'|'	59	'\er'	5A	HOLE	5B	'1'	5C	'2'	5D	'3'	5E	HOLE	5F	NOSCROLL
60	STRING+	61	LF (15)	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	'Z'	66	'X'	67	'C'
	DOWNARROW								LEFTSHIFT
68	'V'	69	'B'	6A	'N'	6B	'M'	6C	','	6D	'.'	6E	'/'	6F	SHIFTKEYS+
															RIGHTSHIFT
70	NOP	71	0x7F	72	'0'	73	NOP	74	'.'	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	SHIFTKEYS+	7B	'\0'	7C	SHIFTKEYS	7D	HOLE	7E	HOLE	7F	IDLE
					LEFTCTRL				RIGHTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.CH Micro Switch 103SD32-2 Keyboard
.SS Controlled
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(2)	03	LF(3)	04	HOLE	05	TF(1)	06	TF(2)	07	TF (3)
			SYSTEMBIT
08	TF (4) 	09	TF(5) 	0A	TF(6)	0B	TF(7)	0C	TF(8)	0D	TF(9)	0E	TF(10)	0F	TF(11)
10	TF(02)	11	TF(03)	12	TF(04)	13	c('[')	14	HOLE	15	RF (0)	16	OOPS	17	OOPS
18	HOLE	19	LF(4)	1A	'\ef'	1B	LF (6)	1C	HOLE	1D	SHIFTKEYS+	1E	OOPS	1F	OOPS
											CAPSLOCK
20	OOPS	21	OOPS	22	OOPS	23	OOPS	24	OOPS	25	OOPS	26	OOPS	27	OOPS
28	OOPS	29	c('^')	2A	c ('@')	2B	'\eb'	2C	HOLE	2D	OOPS	2E	OOPS	2F	OOPS
30	HOLE	31	LF(7)	32	STRING+	33	F(9)	34	HOLE	35	'\et'	36	CTRLQ	37	c ('W')
					UPARROW
38	c('E')	39	c('R')	3A	c('T')	3B	c('Y')	3C	c('U')	3D	c('I')	3E	c('O')	3F	c ('P')
40	c('[')	41	c(']')	42	c ('_')	43	HOLE	44	OOPS	45	OOPS	46	OOPS	47	HOLE
48	STRING+  	49	STRING+ 	4A	STRING+   	4B	HOLE	4C	SHIFTKEYS+	4D	c('A')	4E	CTRLS	4F	c('D')
	LEFTARROW		HOMEARROW		RIGHTARROW				SHIFTLOCK
50	c('F')	51	c('G')	52	c('H')	53	c('J')	54	c('K')	55	c ('L')	56	OOPS	57	OOPS
58	c ('\e')	59	'\er'	5A	HOLE	5B	OOPS	5C	OOPS	5D	OOPS	5E	HOLE	5F	NOSCROLL
60	STRING+ 	61	LF(15)	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	c('Z')	66	c('X')	67	c('C')
	DOWNARROW								LEFTSHIFT
68	c('V')	69	c('B')	6A	c('N')	6B	c ('M')	6C	OOPS	6D	OOPS	6E	OOPS	6F	SHIFTKEYS+
															RIGHTSHIFT
70	NOP	71	0x7F	72	OOPS	73	NOP	74	OOPS	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	SHIFTKEYS+	7B	'\e0'	7C	SHIFTKEYS+	7D	HOLE	7E	HOLE	7F	IDLE
					LEFTCTRL				RIGHTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.CH Micro Switch 103SD32-2 Keyboard
.SS "Key Up"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	OOPS	03	OOPS	04	HOLE	05	OOPS	06	OOPS	07	OOPS
			SYSTEMBIT
08	OOPS 	09	OOPS 	0A	OOPS	0B	OOPS	0C	OOPS	0D	OOPS	0E	OOPS	0F	OOPS
10	OOPS 	11	OOPS 	12	OOPS	13	NOP	14	HOLE	15	OOPS	16	NOP	17	NOP
18	HOLE 	19	OOPS 	1A	NOP	1B	OOPS	1C	HOLE	1D	SHIFTKEYS+	1E	NOP	1F	NOP
											CAPSLOCK
20	NOP	21	NOP	22	NOP	23	NOP	24	NOP	25	NOP	26	NOP	27	NOP
28	NOP	29	NOP	2A	NOP	2B	NOP	2C	HOLE	2D	NOP	2E	NOP	2F	NOP
30	HOLE	31	OOPS	32	NOP	33	OOPS	34	HOLE	35	NOP	36	NOP	37	NOP
38	NOP	39	NOP	3A	NOP	3B	NOP	3C	NOP	3D	NOP	3E	NOP	3F	NOP
40	NOP	41	NOP	42	NOP	43	HOLE	44	NOP	45	NOP	46	NOP	47	HOLE
48	NOP	49	NOP	4A	NOP	4B	HOLE	4C	SHIFTKEYS+	4D	NOP 	4E	NOP	4F	NOP
									SHIFTLOCK
50	NOP	51	NOP	52	NOP	53	NOP	54	NOP	55	NOP	56	NOP	57	NOP
58	NOP	59	NOP	5A	HOLE	5B	NOP	5C	NOP	5D	NOP	5E	HOLE	5F	NOP
60	NOP	61	OOPS	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	NOP	66	NOP	67	NOP
									LEFTSHIFT
68	NOP	69	NOP	6A	NOP	6B	NOP	6C	NOP	6D	NOP	6E	NOP	6F	SHIFTKEYS+
															RIGHTSHIFT
70	NOP	71	NOP	72	NOP	73	NOP	74	NOP	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	SHIFTKEYS+	7B	NOP	7C	SHIFTKEYS+	7D	HOLE	7E	HOLE	7F	RESET
					LEFTCTRL				RIGHTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.UH VT100-Style Keyboard
.SS Unshifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	HOLE	04	HOLE	05	HOLE	06	HOLE	07	HOLE
			SYSTEMBIT
08	HOLE	09 	HOLE	0A 	STRING+	0B	STRING+	0C	STRING+	0D	STRING+	0E	HOLE	0F	TF(1)
					UPARROW		DOWNARROW		LEFTARROW		RIGHTARROW
10	TF(2)	11	TF(3)	12	TF(4)	13	c ('[')	14	'1'	15	'2'	16	'3'	17	'4'
18	'5'	19 	'6'	1A 	'7'	1B	'8'	1C	'9'	1D	'0'	1E	'\-'	1F	'='
20	'`'	21	c ('H')	22	BUCKYBITS+	23	'7'	24	'8'	25	'9'	26	'\-'	27	'\et'
					METABIT
28	'q'	29	'w'	2A	'e'	2B	'r'	2C	't'	2D	'y'	2E	'u'	2F	'i'
30	'o'	31	'p'	32	'['	33	']'	34	0x7F	35	'4'	36	'5'	37	'6'
38	','	39	SHIFTKEYS+	3A	SHIFTKEYS+	3B	'a'	3C	's'	3D	'd'	3E	'f'	3F	'g'
			LEFTCTRL		CAPSLOCK
40	'h'	41	'j'	42	'k'	43	'l'	44	';'	45	'\e\''	46	'\er'	47	'\e'
48	'1'	49	'2'	4A	'3'	4B	NOP	4C	NOSCROLL	4D	SHIFTKEYS+	4E	'z'	4F	'x'
											LEFTSHIFT
50	'c'	51	'v'	52	'b'	53	'n'	54	'm'	55	','	56	'.'	57	'/'
58	SHIFTKEYS+	59	'\en'	5A	'0'	5B	HOLE	5C	'.'	5D	'\er'	5E	HOLE	5F	HOLE
	RIGHTSHIFT
60	HOLE	61	HOLE	62	'\0'	63	HOLE	64	HOLE	65	HOLE	66	HOLE	67	HOLE
68	HOLE	69	HOLE	6A	HOLE	6B	HOLE	6C	HOLE	6D	HOLE	6E	HOLE	6F	HOLE
70	HOLE	71	HOLE	72	HOLE	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	HOLE	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	IDLE
.TE
.ps  +3
.vs  +3
.ne 20
.CH VT100-Style Keyboard
.SS Shifted
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	HOLE	04	HOLE	05	HOLE	06	HOLE	07	HOLE
			SYSTEMBIT
08	HOLE	09 	HOLE	0A 	STRING+	0B	STRING+	0C	STRING+	0D	STRING+	0E	HOLE	0F	TF(1)
					UPARROW		DOWNARROW		LEFTARROW		RIGHTARROW
10	TF(2)	11	TF(3)	12	TF(4)	13	c ('[')	14	'!'	15	'@'	16	'#'	17	'$'
18	'%'	19 	'^'	1A 	'&'	1B	'*'	1C	'('	1D	')'	1E	'_'	1F	'+'
20	'~'	21	c ('H')	22	BUCKYBITS+	23	'7'	24	'8'	25	'9'	26	'\-'	27	'\et'
					METABIT
28	'Q'	29	'W'	2A	'E'	2B	'R'	2C	'T'	2D	'Y'	2E	'U'	2F	'I'
30	'O'	31	'P'	32	'{'	33	'}'	34	0x7F	35	'4'	36	'5'	37	'6'
38	','	39	SHIFTKEYS+	3A	SHIFTKEYS+	3B	'A'	3C	'S'	3D	'D'	3E	'F'	3F	'G'
			LEFTCTRL		CAPSLOCK
40	'H'	41	'J'	42	'K'	43	'L'	44	':'	45	'"'	46	'\er'	47	'|'
48	'1'	49	'2'	4A	'3'	4B	NOP	4C	NOSCROLL	4D	SHIFTKEYS+	4E	'Z'	4F	'X'
											LEFTSHIFT
50	'C'	51	'V'	52	'B'	53	'N'	54	'M'	55	'<'	56	'>'	57	'?'
58	SHIFTKEYS+	59	'\en'	5A	'0'	5B	HOLE	5C	'.'	5D	'\er'	5E	HOLE	5F	HOLE
	RIGHTSHIFT
60	HOLE	61	HOLE	62	'\0'	63	HOLE	64	HOLE	65	HOLE	66	HOLE	67	HOLE
68	HOLE	69	HOLE	6A	HOLE	6B	HOLE	6C	HOLE	6D	HOLE	6E	HOLE	6F	HOLE
70	HOLE	71	HOLE	72	HOLE	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	HOLE	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	IDLE
.TE
.ps  +3
.vs  +3
.ne 20
.CH VT100-Style Keyboard
.SS "Caps Locked"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	HOLE	04	HOLE	05	HOLE	06	HOLE	07	HOLE
			SYSTEMBIT
08	HOLE	09 	HOLE	0A 	STRING+	0B	STRING+	0C	STRING+	0D	STRING+	0E	HOLE	0F	TF(1)
					UPARROW		DOWNARROW		LEFTARROW		RIGHTARROW
10	TF(2)	11	TF(3)	12	TF(4)	13	c ('[')	14	'1'	15	'2'	16	'3'	17	'4'
18	'5'	19 	'6'	1A 	'7'	1B	'8'	1C	'9'	1D	'0'	1E	'\-'	1F	'='
20	'`'	21	c ('H')	22	BUCKYBITS+	23	'7'	24	'8'	25	'9'	26	'\-'	27	'\et'
					METABIT
28	'Q'	29	'W'	2A	'E'	2B	'R'	2C	'T'	2D	'Y'	2E	'U'	2F	'I'
30	'O'	31	'P'	32	'['	33	']'	34	0x7F	35	'4'	36	'5'	37	'6'
38	','	39	SHIFTKEYS+	3A	SHIFTKEYS+	3B	'A'	3C	'S'	3D	'D'	3E	'F'	3F	'G'
			LEFTCTRL		CAPSLOCK
40	'H'	41	'J'	42	'K'	43	'L'	44	';'	45	'\e\''	46	'\er'	47	'\e'
48	'1'	49	'2'	4A	'3'	4B	NOP	4C	NOSCROLL	4D	SHIFTKEYS+	4E	'Z'	4F	'X'
											LEFTSHIFT
50	'C'	51	'V'	52	'B'	53	'N'	54	'M'	55	','	56	'.'	57	'/'
58	SHIFTKEYS+	59	'\en'	5A	'0'	5B	HOLE	5C	'.'	5D	'\er'	5E	HOLE	5F	HOLE
	RIGHTSHIFT
60	HOLE	61	HOLE	62	'\0'	63	HOLE	64	HOLE	65	HOLE	66	HOLE	67	HOLE
68	HOLE	69	HOLE	6A	HOLE	6B	HOLE	6C	HOLE	6D	HOLE	6E	HOLE	6F	HOLE
70	HOLE	71	HOLE	72	HOLE	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	HOLE	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	IDLE
.TE
.ps  +3
.vs  +3
.ne 20
.CH VT100-Style Keyboard
.SS Controlled
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	HOLE	04	HOLE	05	HOLE	06	HOLE	07	HOLE
			SYSTEMBIT
08	HOLE	09 	HOLE	0A 	STRING+	0B	STRING+	0C	STRING+	0D	STRING+	0E	HOLE	0F	TF(1)
					UPARROW		DOWNARROW		LEFTARROW		RIGHTARROW
10	TF(2)	11	TF(3)	12	TF(4)	13	c('[')	14	'1'	15	c ('@')	16	'3'	17	'4'
18	'5'	19	c('^')	1A	'7'	1B	'8'	1C	'9'	1D	'0'	1E	c ('_')	1F	'='
20	c('^')	21	c ('H')	22	BUCKYBITS+	23	'7'	24	'8'	25	'9'	26	'\-'	27	'\et'
					METABIT
28	CTRLQ	29	c('W')	2A	c('E')	2B	c('R')	2C	c('T')	2D	c('Y')	2E	c('U')	2F	c ('I')
30	c('O')	31	c('P')	32	c('[')	33	c (']')	34	0x7F	35	'4'	36	'5'	37	'6'
38	','	39	SHIFTKEYS+	3A	SHIFTKEYS+	3B	c('A')	3C	CTRLS	3D	c('D')	3E	c('F')	3F	c ('G')
			LEFTCTRL		CAPSLOCK
40	c('H')	41	c('J')	42	c('K')	43	c('L')	44	':'	45	'"'	46	'\er'	47	c ('\e')
48	'1'	49	'2'	4A	'3'	4B	NOP	4C	NOSCROLL	4D	SHIFTKEYS+	4E	c('Z')	4F	c ('X')
											LEFTSHIFT
50	c('C')	51	c('V')	52	c('B')	53	c('N')	54	c('M')	55	','	56	'.'	57	c ('_')
58	SHIFTKEYS+	59	'\en'	5A	'0'	5B	HOLE	5C	'.'	5D	HOLE	5E	HOLE	5F	HOLE
	RIGHTSHIFT
60	HOLE	61	HOLE	62	c ('\0')	63	HOLE	64	HOLE	65	HOLE	66	HOLE	67	HOLE
68	HOLE	69	HOLE	6A	HOLE	6B	HOLE	6C	HOLE	6D	HOLE	6E	HOLE	6F	HOLE
70	HOLE	71	HOLE	72	HOLE	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	HOLE	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	IDLE
.TE
.ps  +3
.vs  +3
.ne 20
.CH VT100-Style Keyboard
.SS "Key Up"
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	HOLE	03	HOLE	04	HOLE	05	HOLE	06	HOLE	07	HOLE
			SYSTEMBIT
08	HOLE	09 	HOLE	0A 	NOP	0B	NOP	0C	NOP	0D	NOP	0E	HOLE	0F	OOPS
10	OOPS	11	OOPS	12	OOPS	13	NOP	14	NOP	15	NOP	16	NOP	17	NOP
18	NOP	19 	NOP	1A 	NOP	1B	NOP	1C	NOP	1D	NOP	1E	NOP	1F	NOP
20	NOP	21	NOP	22	BUCKYBITS+	23	NOP	24	NOP	25	NOP	26	NOP	27	NOP
					METABIT
28	NOP	29	NOP	2A	NOP	2B	NOP	2C	NOP	2D	NOP	2E	NOP	2F	NOP
30	NOP	31	NOP	32	NOP	33	NOP	34	NOP	35	NOP	36	NOP	37	NOP
38	NOP	39	SHIFTKEYS+	3A	SHIFTKEYS+	3B	NOP	3C	NOP	3D	NOP	3E	NOP	3F	NOP
			LEFTCTRL		CAPSLOCK
40	NOP	41	NOP	42	NOP	43	NOP	44	NOP	45	NOP	46	NOP	47	NOP
48	NOP	49	NOP	4A	NOP	4B	NOP	4C	NOP	4D	SHIFTKEYS+	4E	NOP	4F	NOP
											LEFTSHIFT
50	NOP	51	NOP	52	NOP	53	NOP	54	NOP	55	NOP	56	NOP	57	NOP
58	SHIFTKEYS+	59	NOP	5A	NOP	5B	HOLE	5C	NOP	5D	NOP	5E	HOLE	5F	HOLE
	RIGHTSHIFT
60	HOLE	61	HOLE	62	NOP	63	HOLE	64	HOLE	65	HOLE	66	HOLE	67	HOLE
68	HOLE	69	HOLE	6A	HOLE	6B	HOLE	6C	HOLE	6D	HOLE	6E	HOLE	6F	HOLE
70	HOLE	71	HOLE	72	HOLE	73	HOLE	74	HOLE	75	HOLE	76	HOLE	77	HOLE
78	HOLE	79	HOLE	7A	HOLE	7B	HOLE	7C	HOLE	7D	HOLE	7E	HOLE	7F	RESET
.TE
.ps  +3
.vs  +3
.SH SEE ALSO
.BR click (1),
.BR oldsetkeys (1),
.BR kbd (4S),
.BR termio (4),
.BR win (4S)
.LP
.IR "The SunView System Programmer's Guide" \(em
.I "Appendix: Writing a Virtual User Input Device Driver"
(describes
.B firm_event
format)
.IX  "kb device"  ""  "\fLkb\fP \(em Sun keyboard"  ""  PAGE END

					LEFTCTRL				RIGHTCTRL
.TE
.ps  +3
.vs  +3
.ne 20
.CH Micro Switch 103SD32-2 Keyboard
.SS Controlled
.ps  -3
.vs  -3
.TS
expand ;
c l c l c l c l c l c l c l c l .
\fIKey	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value	Key	Value\fR
.sp
00	HOLE	01	BUCKYBITS+	02	LF(2)	03./share/man/man4/kbd.4s                                                                                755       0      12         3477  4424741455   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kbd.4s 1.11 89/03/27 SMI
.TH KBD 4S "24 November 1987"
.SH NAME
kbd \- Sun keyboard
.SH CONFIG
None; included in standard system.
.SH DESCRIPTION
.IX  "keyboard device"  ""  "\fLkbd\fP \(em Sun keyboard"  ""
.IX  "Sun keyboard device"  ""  "Sun keyboard device \(em \fLkbd\fP"  ""
.LP
The
.B kbd
device provides access to the Sun Workstation keyboard.  When
opened, it provides access to the standard keyboard device for the
workstation (attached either to a
.SM CPU
serial or parallel port).  It
is a multiplexing driver; a stream referring to the standard keyboard
device, with the
.BR kb (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules pushed on top of that device, is linked below it.
Normally, this device passes input to the ``workstation console''
driver, which is linked above a special minor device of
.BR kbd ,
so that keystrokes appear as input on
.BR /dev/console ;
the
.SB KIOCSDIRECT
.B ioctl
must be used to direct input towards or away from the
.B /dev/kbd
device.
.SH IOCTLS
.TP 15
.SB KIOCSDIRECT
The argument is a pointer to an
.BR int .
If the value in the
.B int
pointed to by the argument is 1, subsequent keystrokes typed on the system
keyboard will sent to
.BR /dev/kbd ;
if it is 0, subsequent keystrokes will be sent to the ``workstation console''
device.  When the last process that has
.B /dev/kbd
open closes it, if keystrokes had been sent to
.B /dev/kbd
they are redirected back to the ``workstation console'' device.
.TP
.SB KIOCGDIRECT
The argument is a pointer to an
.BR int .
If keystrokes are currently being sent to
.BR /dev/kbd ,
1 is stored in the
.B int
pointed to by the argument; if keystrokes are currently being sent to the
``workstation console'' device, 0 is stored there.
.SH FILES
.PD 0
.TP 20
.B /dev/kbd
.PD
.SH "SEE ALSO
.BR console (4S),
.BR kb (4M),
.BR ttcompat (4M),
.BR win (4S),
.BR zs (4S)
2	c('H')	53	c('J')	54	c('K')	55	c ('L')	56	OOPS	57	OOPS
58	c ('\e')	59	'\er'	5A	HOLE	5B	OOPS	5C	OOPS	5D	OOPS	5E	HOLE	5F	NOSCROLL
60	STRING+ 	61	LF(15)	62	HOLE	63	HOLE	64	SHIFTKEYS+	65	c('Z')	66./share/man/man4/kmem.4                                                                                755       0      12          107  4424741455   7711                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kmem.4 1.9 89/03/27 SMI; from UCB 4.1
.so /usr/man/man4/mem.4s
  le.4s       list.4       lo.4 4       lofs.4s        mbio.4s     !  mbmem.4s      "  mcp.4s   (  #  mem.4s   <  $  mouse.4s  <  L  %  ms.4m <  \  &  ms3.4s <  l  '  mti.4s <  |  (  mtio.4 <    )  nfs.4p <    *  	nif_pf.4m     +  nit.4p     ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4    ./share/man/man4/kmem.4s                                                                               755       0      12           63  4424741455  10055                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)kmem.4s 1.6 89/03/27 SMI; 
  le.4s       list.4       lo.4 4       lofs.4s        mbio.4s     !  mbmem.4s      "  mcp.4s   (  #  mem.4s   <  $  mouse.4s  <  L  %  ms.4m <  \  &  ms3.4s <  l  '  mti.4s <  |  (  mtio.4 <    )  nfs.4p <    *  	nif_pf.4m     +  nit.4p     ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4      1  pty.4    0./share/man/man4/ldterm.4m                                                                             755       0      12        15326  4424741455  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldterm.4m 1.9 89/03/27 SMI
.TH LDTERM 4M "20 November 1987"
.SH NAME
ldterm \- standard terminal STREAMS module
.SH CONFIG
None; included by default.
.SH SYNOPSIS
.nf
.ft B
#include <sys/stream.h>
#include <sys/stropt.h>

ioctl(fd, I_PUSH, "ldterm");
.ft R
.fi
.SH DESCRIPTION
.IX "ldterm module" "" "\fLldterm\fP, terminal \s-1STREAMS\s0 module"
.IX STREAMS ldterm "" "\fLldterm\fP terminal module"
.LP
.B ldterm
is a
.SM STREAMS
module that provides most of the
.B termio (4)
terminal interface.  This module does not perform the low-level
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure or by the
.SM
.BR IGNBRK\*S ,
.SM
.BR IGNPAR\*S ,
.SM
.BR PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure; those functions must be performed by the driver or by
modules pushed below the
.B ldterm
module.
All other
.B termio
functions are performed by
.BR ldterm ;
some of them, however, require the cooperation of the driver or
modules pushed below
.BR ldterm ,
and may not be performed in some cases.  These include the
.SB IXOFF
flag in the
.B c_iflag
word and the delays specified in the
.B c_oflag
word.
.SS "Read-side Behavior"
Various types of
.SM STREAMS
messages are processed as follows:
.TP \w'\s-1M_HANGUP\s+1'+2n
.SB M_BREAK
When this message is received, either an
interrupt signal is generated, or the message is treated as if it
were an
.SB M_DATA
message containing a single
.SM ASCII
.SM NUL
character, depending on the state of the
.SB BRKINT
flag.
.TP
.SB M_DATA
These messages are normally processed using the standard
.B termio
input processing.  If the
.SB ICANON
flag is set, a single input record (``line'') is accumulated in an
internal buffer, and sent upstream when a line-terminating character
is received.  If the
.SB ICANON
flag is not set, other input processing is performed and the
processed data is passed upstream.
.IP
If output is to be stopped or started as a result of the arrival of
characters,
.SB M_STOP
and
.SB M_START
messages are sent downstream, respectively.  If the
.SB IXOFF
flag is set, and input is to be
stopped or started as a result of flow-control considerations,
.SB M_STOPI
and
.SB M_STARTI
messages are sent downstream, respectively.
.IP
.SB M_DATA
messages are sent downstream, as necessary, to perform echoing.
.IP
If a signal is to be generated, a
.SB M_FLUSH
message with a flag byte of
.SB FLUSHR
is placed on the read queue,
and if the signal is also to flush output a
.SB M_FLUSH
message with a flag byte of
.SB FLUSHW
is sent downstream.
.TP
.SB M_CTL
If the first byte of the message is
.SM
.BR MC_NOCANON\*S ,
the input processing normally performed on
.SB M_DATA
messages is disabled, and those messages are passed upstream
unmodified; this is for the use of modules or drivers that perform their own
input processing, such as a pseudo-terminal in
.SB TIOCREMOTE
mode connected to a program that performs this processing.  If the
first byte of the message is
.SM
.BR MC_DOCANON\*S ,
the input processing is enabled.
Otherwise, the message is ignored; in any case, the message is passed
upstream.
.TP
.SB M_FLUSH
The read queue of the module is flushed of all its data messages,
and all data in the record
being accumulated is also flushed.  The message is passed upstream.
.TP
.SB M_HANGUP
Data is flushed as it is for a
.SB M_FLUSH
message, and
.SB M_FLUSH
messages with a flag byte of
.SB FLUSHRW
are sent upstream and downstream.
Then an
.SB M_PCSIG
message is sent upstream with a signal of
.SM
.BR SIGCONT\*S ,
followed by the
.SB M_HANGUP
message.
.TP
.SB M_IOCACK
The data contained within the message, which is to be returned to the
process, is augmented if necessary, and the message
is passed upstream.
.LP
All other messages are passed upstream unchanged.
.SS "Write-side behavior"
Various types of
.SM STREAMS
messages are processed as follows:
.TP \w'\s-1M_HANGUP\s+1'+2n
.SB M_FLUSH
The write queue of the module is flushed of all its data messages,
and the message is passed downstream.
.TP
.SB M_IOCTL
The function to be performed for this
.B ioctl
by the
.B ldterm
module is performed, and the message is passed downstream in most
cases.  The
.SB TCFLSH
and
.SB TCXONC
.BR ioctl s
can be performed entirely in this module, so the reply is sent
upstream and the message is not passed downstream.
.TP
.SB M_DATA
If the
.SB OPOST
flag is set, or both the
.SB XCASE
and
.SB ICANON
flags are set, output processing is performed and the processed
message is passed downstream, along with any
.SB M_DELAY
messages generated.  Otherwise, the message is passed downstream
without change.
.LP
All other messages are passed downstream unchanged.
.SH IOCTLS
The following
.BR ioctl s
are processed by the
.B ldterm
module.  All others are passed downstream.
.TP 15
.SB TCGETS
.PD 0
.TP
.SB TCGETA
The message is passed downstream; if an acknowledgment is seen, the
data provided by the driver and modules downstream is augmented and
the acknowledgement is passed upstream.
.PD
.TP
.SB TCSETS
.PD 0
.TP
.SB TCSETSW
.TP
.SB TCSETSF
.TP
.SB TCSETA
.TP
.SB TCSETAW
.TP
.SB TCSETAF
The parameters that control the behavior of the
.B ldterm
module are changed.
If a mode change requires options at the stream head to be changed, a
.SB M_SETOPT
message is sent upstream.  If the
.SB ICANON
flag is turned on or off, the read mode at the stream head is changed
to message-nondiscard or byte-stream mode, respectively.  If it is
turned on, the
.B vmin
and
.B vtime
values at the stream head are set to 1 and 0, respectively; if it is
turned on, they are set to the values specified by the
.BR ioctl .
The
.B vmin
and
.B vtime
values are also set if
.SB ICANON
is off and the values are changed by the
.BR ioctl .
If the
.SB TOSTOP
flag is turned on or off, the
.B tostop
mode at the stream head is turned on or off, respectively.
.PD
.TP
.SB TCFLSH
If the argument is 0, an
.SB M_FLUSH
message with a flag byte of
.SB FLUSHR
is sent downstream and placed on the read queue.
If the argument is 1, the write queue is flushed of all its data
messages and a
.SB M_FLUSH
message with a flag byte of
.SB FLUSHW
is sent upstream and downstream.
If the argument is 2, the write queue is flushed of all its data
messages and a
.SB M_FLUSH
message with a flag byte of
.SB FLUSHRW
is sent downstream and placed on the read queue.
.TP
.SB TCXONC
If the argument is 0, and output is not already stopped, an
.SB M_STOP
message is sent downstream.
If the argument is 1, and output is stopped, an
.SB M_START
message is sent downstream.
If the argument is 2, and input is not already stopped, an
.SB M_STOPI
message is sent downstream.
If the argument is 3, and input is stopped, an
.SB M_STARTI
message is sent downstream.
.SH SEE ALSO
.BR console (4S),
.BR mcp (4S),
.BR mti (4S),
.BR pty (4),
.BR termio (4),
.BR ttcompat (4M),
.BR zs (4S)
odified; this is for the use of modules or drivers that perform their own
input processing, such as a pseudo-terminal in
.SB TIOCREMOTE
mode connected to a program that performs this processing.  If the
first byte of the message is
.SM
.BR MC_DOCANON\*S ,
the input processing is enabled.
Otherwise./share/man/man4/le.4s                                                                                 755       0      12        13470  4424741455   7612                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)le.4s 1.14 89/03/27 SMI;
.TH LE 4S "25 March 1989"
.SH NAME
le \- Sun-3/50, Sun-3/60, Sun-3/80 10MB Ethernet interface
.SH CONFIG
.ft B
.nf
device le0 at obio ? csr 0x120000 priority 3
device le0 at obio ? csr 0x65002000 priority 3
.ft R
.fi
.LP
The first synopsis given should be used to generate a kernel
for a Sun-3/50, or Sun-3/60 system.
The second synopsis given should be used to generate a kernel
for a Sun-3/80 system only.
.SH DESCRIPTION
.IX  "le device"  ""  "\fLle\fP \(em Sun-3/50 10 Mb/s Ethernet interface"  ""  PAGE START
.IX  "Sun-3/50 10 Mb/s Ethernet interface"  ""  "Sun-3/50 10 Mb/s Ethernet interface \(em \fLle\fP"  ""  PAGE START
.IX  "10 Mb/s Sun-3/50 Ethernet interface"  ""  "10 Mb/s Sun-3/50 Ethernet interface \(em \fLle\fP"  ""  PAGE START
.IX  "LANCE 10 Mb/s Ethernet interface"  ""  "LANCE 10 Mb/s Ethernet interface \(em \fLle\fP"  ""  PAGE START
.IX  "Ethernet controller"  "le"  ""  "\fLle\fP \(em 10 Mb/s LANCE Ethernet interface"  PAGE START
.LP
The
.B le
interface provides access to a 10 Mb/s Ethernet network through a Sun-3
controller using the
.SM AMD
.SM LANCE
(Local Area Network Controller for Ethernet)
Am7990 chip.
For a general description of network interfaces see
.BR if (4N).
.LP
The first synopsis line above specifies the first and only
Ethernet controller on a Sun-3/50 system.
.SH SEE ALSO
.BR if (4N),
.BR kb (4S),
.BR tty_compact (4)
.SH DIAGNOSTICS
.TP 10
.B
le%d: transmitter frozen \(em resetting\ \&
A bug in the
.SM LANCE
chip has stopped the chip's transmitter section.
The driver has detected this condition and reinitialized the chip.
.TP
.B
le%d: out of mbufs: output packet dropped\ \&
The driver has run out of memory to use to buffer
packets on output.
The packet being transmitted at the time of occurrence is lost.
This error is usually symptomatic of trouble elsewhere in the kernel.
.TP
.B
le%d: stray transmitter interrupt\ \&
The
.SM LANCE
chip has signalled that it completed transmitting a packet
but the driver has sent no such packet.
.TP
.B
le%d: \s-1LANCE\s0 Rev C/D Extra Byte(s) bug; Packet dropped\ \&
The
.SM LANCE
chip's internal silo pointers have become misaligned.
This error arises from a chip bug.
.TP
.B
le%d: trailer error\ \&
An incoming packet claimed to have a trailing header but did not.
.TP
.B
le%d: runt packet\ \&
An incoming packet's size was below the Ethernet minimum transmission size.
.TP
.B
le%d: Receive buffer error - \s-1BUFF\s0 bit set in rmd\ \&
This error ``should never happen,''
as it occurs only in conjunction with a
.SM LANCE
feature that the driver does not use.
.TP
.B
le%d: Received packet with \s-1STP\s0 bit in rmd cleared\ \&
The driver has received a packet that straddles multiple receive buffers
and therefore consumes more than one of the
.SM LANCE
chip's receive descriptors.
Provided that all stations on the Ethernet
are operating according to the Ethernet specification,
this error ``should never happen,''
since the driver allocates its receive buffers to be large enough
to hold packets of the largest permitted size.
Most likely, some other station
on the net is transmitting packets whose lengths
exceed the maximum permitted for Ethernet.
.TP
.B
le%d: Received packet with \s-1ENP\s0 bit in rmd cleared\ \&
The driver has received a packet that straddles multiple receive buffers
and therefore consumes more than one of the
.SM LANCE
chip's receive descriptors.
Provided that all stations on the Ethernet
are operating according to the Ethernet specification,
this error ``should never happen,''
since the driver allocates its receive buffers to be large enough
to hold packets of the largest permitted size.
The most likely cause of the message is that some other station
on the net is transmitting packets whose lengths
exceed the maximum permitted for Ethernet.
.br
.ne 5
.TP
.B
le%d: Transmit buffer error - \s-1BUFF\s0 bit set in tmd\ \&
Excessive bus contention has prevented the
.SM LANCE
chip
from gathering packet contents quickly enough to sustain
the packet's transmission over the Ethernet.
The affected packet is lost.
.TP
.B
le%d: Transmit late collision -  Net problem?
A packet collision has occurred
after the channel's slot time has elapsed.
This error usually indicates faulty hardware elsewhere on the net.
.TP
.B
le%d: No carrier - transceiver cable problem?
The
.SM LANCE
chip has lost input to its carrier detect pin
while trying to transmit a packet.
.TP
.B
le%d: Transmit retried more than 16 times - net jammed\ \&
Network activity has become so intense that sixteen successive
transmission attempts failed, the
.SM LANCE
chip gave up on the current packet.
.TP
.B
le%d: missed packet\ \&
The driver has dropped an incoming packet
because it had no buffer space for it.
.TP
.B
le%d: Babble error - sent a packet longer than the maximum length\ \&
While transmitting a packet, the
.SM LANCE
chip has noticed that the packet's length exceeds
the maximum allowed for Ethernet.
This error indicates a kernel bug.
.TP
.B
le%d: Memory Error!  Ethernet chip memory access timed out\ \&
The
.SM LANCE
chip timed out while trying to acquire the bus
for a
.SM DVMA
transfer.
.TP
.B
le%d: Reception stopped\ \&
Because of some other error,
the receive section of the
.SM LANCE
chip shut down
and had to be restarted.
.TP
.B
le%d: Transmission stopped\ \&
Because of some other error,
the transmit section of the
.SM LANCE
chip shut down
and had to be restarted.
.IX  "le device"  ""  "\fLle\fP \(em Sun-3/50 10 Mb/s Ethernet interface"  ""  PAGE END
.IX  "Sun-3/50 10 Mb/s Ethernet interface"  ""  "Sun-3/50 10 Mb/s Ethernet interface \(em \fLle\fP"  ""  PAGE END
.IX  "10 Mb/s Sun-3/50 Ethernet interface"  ""  "10 Mb/s Sun-3/50 Ethernet interface \(em \fLle\fP"  ""  PAGE END
.IX  "LANCE 10 Mb/s Ethernet interface"  ""  "LANCE 10 Mb/s Ethernet interface \(em \fLle\fP"  ""  PAGE END
.IX  "Ethernet controller"  "le"  ""  "\fLle\fP \(em 10 Mb/s LANCE Ethernet interface"  PAGE END
H'	41	'J'	42	'K'	43	'L'	44	':'	45	'"'	46	'\er'	47	'|'
48	'1'	49	'2'	4A	'3'	4B	NOP	4C	NOSCROLL	4D	SHIFTKEYS+	4E	'Z'	4F	'X'
											LEFTSHIFT
50	'C'	51	'V'	52	'B'	53	'N'	54	'M'	55	'<'	56	'>'	57	'?'
5./share/man/man4/list.4                                                                                755       0      12           61  4424741455   7712                                                                                                                                                                                                                                                                                                                                                                      .so man4/List.4
.\" @(#)list.4 1.5 89/03/27 SMI;
 lofs.4s        mbio.4s     !  mbmem.4s      "  mcp.4s    (  #  mem.4s s  <  $  mouse.4s  <  L  %  ms.4m    \  &  ms3.4s s  l  '  mti.4s 4  |  (  mtio.4 .    )  nfs.4p .    *  	nif_pf.4m     +  nit.4p <    ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4 4     1  pty.4 ll  0  2  root.4s   D  3  
routing.4n D  T  4  sd.4s     h./share/man/man4/lo.4                                                                                  755       0      12         2756  4424741456   7427                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lo.4 1.12 89/03/27 SMI; from UCB 4.1
.TH LO 4N "9 October 1987"
.SH NAME
lo \- software loopback network interface
.SH SYNOPSIS
.B pseudo-device loop
.SH DESCRIPTION
.IX  "lo device"  ""  "\fLlo\fP \(em software loopback network interface"  ""  PAGE START
.IX  "network loopback interface"  ""  "network loopback interface \(em \fLlo\fP"  ""  PAGE START
.LP
The
.B loop
device is a software loopback network interface;
see
.BR if (4N)
for a general description of network interfaces.
.LP
The
.B loop
interface is used for performance analysis and software testing, and
to provide guaranteed access to Internet protocols on machines with
no local network interfaces.
A typical application is the
.BR comsat (8C)
server which accepts notification of mail delivery through a particular
port on the loopback interface.
.LP
By default, the loopback interface is
accessible at Internet address 127.0.0.1 (non-standard); this address
may be changed with the
.SB SIOCSIFADDR
ioctl.
.SH SEE ALSO
.BR if (4N),
.BR inet (4F),
.BR comsat (8C)
.SH DIAGNOSTICS
.TP 10
.B lo%d: can't handle af%d
The interface was handed a message with
addresses formatted in an unsuitable address
family; the packet was dropped.
.SH BUGS
It should handle all address and protocol families.
An approved network address should be reserved for this
interface.
.IX  "lo device"  ""  "\fLlo\fP \(em software loopback network interface"  ""  PAGE END
.IX  "network loopback interface"  ""  "network loopback interface \(em \fLlo\fP"  ""  PAGE END
's transmitter sec./share/man/man4/lofs.4s                                                                               755       0      12         6047  4424741456  10140                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lofs.4s 1.8 89/03/27 SMI;
.TH LOFS 4S "22 March 1989"
.SH NAME
lofs \- loopback virtual file system
.SH CONFIG
.B options \s-1LOFS\s0
.SH SYNOPSIS
.ft B
.nf
#include <sys/mount.h>
mount(\s-1MOUNT_LOFS\s0, virtual, flags, dir);
.fi
.ft
.SH DESCRIPTION
.IX  "loopback filesystem"
.LP
The loopback file system device allows new, virtual file systems
to be created, which provide access to existing files using
alternate pathnames.
Once the virtual file system is created,
other file systems can be mounted within it without affecting the
original file system.
File systems that are subsequently mounted onto
the original file system, however,
.I are
visible to the virtual file system, unless or until the corresponding
mount point in the virtual file system is covered by a file
system mounted there.
.LP
.I virtual
is the mount point for the virtual file system.
.I dir
is the pathname of the existing file system.
.I flags
is either 0 or
.BR \s-1M_RDONLY\s0 .
The
.SB M_RDONLY
flag forces all accesses in the new name space to be read-only;
without it, accesses are the same as for the
underlying file system.  All other
.BR mount (2)
flags are preserved from the underlying file systems.
.LP
A loopback mount of
.RB ` / '
onto
.B /tmp/newroot
allows the entire file system hierarchy to appear as if it
were duplicated under
.BR /tmp/newroot ,
including any file systems mounted from remote
.SM NFS
servers.
All files would then be accessible
either from a pathname relative to
.RB ` / ',
or from a pathname relative to
.B /tmp/newroot
until such time as a file system is mounted in
.BR /tmp/newroot ,
or any of its subdirectories.
.LP
Loopback mounts of
.RB ` / '
can be performed in conjunction with the
.BR chroot (2)
system call, to provide a complete virtual file system to a process
or family of processes.
.LP
Recursive traversal of loopback mount points is not allowed;
after the loopback mount of
.BR /tmp/newroot ,
the file
.B /tmp/newroot/tmp/newroot
does not contain yet another file system hierarchy;
rather, it appears just as
.B /tmp/newroot
did before the loopback mount was performed (say,
as an empty directory).
.LP
The standard
.SM RC
files perform first
.B 4.2
mounts, then
.B nfs
mounts, during booting.
On Sun386\fIi\fP systems,
.B lo
(loopback) mounts are performed just after
.B 4.2
mounts.
.B /etc/fstab
files depending on alternate mount orders at
boot time will
fail to work as expected.  Manual
modification of
.B /etc/rc.local
will be needed to make such
mount orders work.
.SH WARNINGS
.LP
Loopback mounts must be used with care;
the potential for confusing users and applications
is enormous.
A loopback mount entry in
.BR /etc/fstab
must be placed after the mount points of both
directories it depends on.  This is most easily accomplished by 
making the loopback mount entry the last in 
.BR /etc/fstab ,
though see
.BR mount (8)
for further warnings.
.SH SEE ALSO
.BR chroot (2),
.BR mount (2),
.BR fstab (5),
.BR mount (8)
.SH BUGS
.LP
Because only directories can be mounted or mounted on,
the structure of a virtual file system can only
be modified at directories.
smitting packets whose lengths
exceed the maximum permitted for Ethernet.
.TP
.B
le%d: Received packet with \s-1ENP\s0 bit in rmd cleared\ \&
The driver has received a packet that straddles multiple receive buffers
and therefore consumes more than one of the
.SM LANCE
chip's receive descriptors.
Provided that all stations on the Ethernet
are operating according to the Ethernet specification,
this error ``should never happen,''
since the driver allocates its receive buf./share/man/man4/mbio.4s                                                                               755       0      12           63  4424741456  10053                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)mbio.4s 1.6 89/03/27 SMI; 
"  mcp.4s   (  #  mem.4s   <  $  mouse.4s  <  L  %  ms.4m <  \  &  ms3.4s <  l  '  mti.4s <  |  (  mtio.4     )  nfs.4p s    *  	nif_pf.4m     +  nit.4p     ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4      1  pty.4    0  2  root.4s   D  3  
routing.4n D  T  4  sd.4s  D  h  5  sockio.4  h  x  6  st.4s h    7  
streamio./share/man/man4/mbmem.4s                                                                              755       0      12           64  4424741456  10223                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)mbmem.4s 1.6 89/03/27 SMI; 
  mem.4s   <  $  mouse.4s  <  L  %  ms.4m <  \  &  ms3.4s <  l  '  mti.4s <  |  (  mtio.4 <    )  nfs.4p     *  	nif_pf.4m     +  nit.4p     ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4      1  pty.4    0  2  root.4s   D  3  
routing.4n D  T  4  sd.4s  D  h  5  sockio.4  h  x  6  st.4s h    7  
streamio.4     8  taac./share/man/man4/mcp.4s                                                                                755       0      12        22332  4424741456   7767                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)mcp.4s 1.17 89/03/27 SMI;
.TH MCP 4S "22 March 1989"
.SH NAME
mcp, alm \- Sun MCP Multiprotocol Communications Processor/ALM-2 Asynchronous Line Multiplexer
.SH "CONFIG \(em SUN-3 SYSTEM"
.SS MCP
.nf
.ft B
device mcp0 at vme32d32 ? csr 0x1000000 flags 0x1ffff priority 4 vector mcpintr 0x8b
device mcp1 at vme32d32 ? csr 0x1010000 flags 0x1ffff priority 4 vector mcpintr 0x8a
device mcp2 at vme32d32 ? csr 0x1020000 flags 0x1ffff priority 4 vector mcpintr 0x89
device mcp3 at vme32d32 ? csr 0x1030000 flags 0x1ffff priority 4 vector mcpintr 0x88
.fi
.ft R
.SS ALM-2
.B pseudo-device mcpa64
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/tty\fIxy\fB", mode);
open("/dev/ttyd\fIn\fB", mode);
open("/dev/cua\fIn\fB", mode);
.ft R
.fi
.SH DESCRIPTION (MCP)
.IX  "mcp device"  ""  "\fLmcp\fP \(em Sun MCP Multiprotocol Communications Processor"
.LP
The Sun
.SM MCP
(Multiprotocol Communications Processor)
supports up to four synchronous serial lines in conjunction
with SunLink\(tm Multiple Communication Protocol products.
.LP
.SH DESCRIPTION (ALM-2)
.IX  "terminal multiplexer"  ""  "\fLalm\fP \(em Sun ALM-2 Asynchronous Line Multiplexer"
.LP
The Sun \s-1ALM\s0-2 Asynchronous Line Multiplexer
provides 16 asynchronous serial communication
lines with modem control and one Centronics-compatible parallel
printer port.
.LP
Each port supports those
.BR termio (4)
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure and by the
.BR \s-1IGNBRK\*S ,
.BR \s-1IGNPAR\*S ,
.BR \s-1PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure are performed by the
.B mcp
driver.  All other
.BR termio (4)
functions must be performed by
.SM STREAMS
modules pushed atop the driver; when a device is opened, the
.BR ldterm (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules are automatically pushed on top of the stream, providing the
standard
.BR termio (4)
interface.
.LP
Bit
.I i
of
.B flags
may be specified to say that a line is not properly
connected, and that the line
.I i
should be treated as hard-wired with carrier
always present.  Thus specifying
.B "flags 0x0004"
in the specification of
.B mcp0
would treat line
.B /dev/ttyh2
in this way.
.LP
Minor device numbers in the range 0 \- 63 correspond directly to the
normal tty lines and are named
\fB/dev/tty\fIXY\fR,
where
.I X
represents the physical board
as one of the characters
.BR h ,
.BR i ,
.BR j ,
or
.BR k ,
and
.I Y
is the line number on the board as a single hexadecimal digit.
(Thus the first line on the first board is
.BR /dev/ttyh0 ,
and the sixteenth line on the third board is
.BR /dev/ttyjf .)
.LP
To allow a single tty line to be connected to a modem and used for
both incoming and outgoing calls, a special feature, controlled by
the minor device number, has been added.
Minor device numbers in the range 128 \- 191 correspond to the same physical
lines as those above (that is,
the same line as the minor device number minus 128).
.LP
A dial-in line has a minor device in the range 0 \- 63 and
is conventionally renamed
\fB/dev/ttyd\fIn\fR,
where
.I n
is a number indicating which dial-in line it is (so that
.B /dev/ttyd0
is the first dial-in line), and the dial-out line corresponding to that dial-in
line has a minor device number 128 greater than the minor device number of the
dial-in line and is conventionally named
\fB/dev/cua\fIn\fR,
where
.I n
is the number of the dial-in line.
.LP
The
.BI /dev/cua n
lines are special in that they can be opened even when
there is no carrier on the line.
Once a
.BI /dev/cua n
line is opened, the corresponding tty line cannot be
opened until the
.BI /dev/cua n
line is closed; a blocking open will wait until the
.BI /dev/cua n
line is closed (which will drop Data Terminal Ready, after which Carrier Detect
will usually drop as well) and carrier is detected again, and a non-blocking
open will return an error.
Also, if the
.BI /dev/ttyd n
line has been opened successfully (usually only
when carrier is recognized on the modem) the corresponding
.BI /dev/cua n
line cannot be opened.
This allows a modem to be attached to e.g.
.B /dev/ttyd0
(renamed from
.BR /dev/ttyh0 )
and used for dialin (by enabling the line for
login in
.BR /etc/ttytab )
and also used for dialout (by
.BR tip (1C)
or
.BR uucp (1C))
as
.B /dev/cua0
when no one is logged in on
the line.
Note: the bit in the
.B flags
word in the configuration file (see above) must be zero
for this line,
which enables hardware carrier detection.
.SS IOCTLS
The standard set of
.B termio
.B ioctl(\|)
calls are supported by the
.SM ALM-2\*S.
.LP
If the
.SB CRTSCTS
flag in the
.B c_cflag
is set, output will be generated only if
.SM CTS
is high; if
.SM CTS
is low,
output will be frozen.   If the
.SB CRTSCTS
flag is clear, the state of
.SM CTS
has no effect.
Breaks can be generated by the
.BR \s-1TCSBRK\s0 ,
.BR \s-1TIOCSBRK\s0 ,
and
.SB TIOCCBRK
.B ioctl(\|)
calls.
The modem control lines
.BR \s-1TIOCM_CAR\s0 ,
.BR \s-1TIOCM_CTS\s0 ,
.BR \s-1TIOCM_RTS\s0 ,
and
.SB TIOCM_DTR
are provided.
.LP
The input and output line speeds may be set to any of the speeds
supported by
.BR termio .
The speeds cannot be set independently; when the output speed is set,
the input speed is set to the same speed.
.IX  "terminal multiplexer"  "\fLalm\fP \(em Sun ALM-2 Asynchronous Line Multiplexer"
.br
.ne 7
.SS ERRORS
An
.B open(\|)
on a
.BR /dev/tty *
or a
.BR /dev/cu *
device will fail if:
.TP 15
ENXIO
The unit being opened does not exist.
.TP 15
EBUSY
The dial-out device is being opened and the dial-in device is already open, or
the dial-in device is being opened with a no-delay open and the dial-out device
is already open.
.TP 15
EBUSY
The unit has been marked as exclusive-use by another process with a
.SB TIOCEXCL
.B ioctl(\|)
call.
.TP 15
EINTR
The open was interrupted by the delivery of a signal.
.SH DESCRIPTION (PRINTER PORT)
The printer port is Centronics-compatible
and is suitable for most common parallel printers.
Devices attached to this interface are
normally handled by the line printer spooling
system, and should not be accessed directly by the user.
.LP
Minor device numbers in the range 64 \- 67 access the printer port,
and the recommended naming is
.BR /dev/mcpp[0-3] .
.SS IOCTLS
Various control flags and status bits may be fetched and set on an
.SM MCP
printer port.  The following flags and status bits are supported;
they are defined in
.BR sundev/mcpcmd.h :
.LP
.TS
expand;
l l l.
\s-1MCPRIGNSLCT\s0	0x02	set if interface ignoring \s-1SLCT\s0\- on open
\s-1MCPRDIAG\s0	0x04	set if printer is in self-test mode
\s-1MCPRVMEINT\s0	0x08	set if \s-1VME\s0 bus interrupts enabled
\s-1MCPRINTPE\s0	0x10	print message when out of paper
\s-1MCPRINTSLCT\s0	0x20	print message when printer offline
\s-1MCPRPE\s0	0x40	set if device ready, cleared if device out of paper
\s-1MCPRSLCT\s0	0x80	set if device online (Centronics \s-1SLCT\s0 asserted)
.TE
.LP
The flags
.SM
.B MCPRINTSLCT\*S,
.SM
.B MCPRINTPE\*S,
and
.SB MCPRDIAG
may be changed; the other bits are status bits and may not be changed.
.LP
The
.B ioctl(\|)
calls supported by
.SM MCP
printer ports are listed below.
.TP 15
.SM MCPIOGPR
The argument is a pointer to an
.BR "unsigned char" .
The printer flags and status bits are stored in the
.B "unsigned char"
pointed to by the argument.
.TP 15
.SM MCPIOSPR
The argument is a pointer to an
.BR "unsigned char" .
The printer flags are set from the
.B "unsigned char"
pointed to by the argument.
.SS ERRORS
Normally, the interface only reports the
status of the device when attempting an
.BR open (2V)
call.
An
.B open(\|)
on a
.BR /dev/mcpp *
device will fail if:
.TP 15
ENXIO
The unit being opened does not exist.
.TP 15
EIO
The device is offline or out of paper.
.LP
Bit 17 of the configuration
.B flags
may be specified to say that the interface should ignore Centronics
.SM SLCT\-
and
.SM RDY/PE\-
when attempting to open the device, but
this is normally useful only for configuration and troubleshooting:
if the
.SM SLCT\-
and
.SM RDY
lines are not asserted during an actual data
transfer (as with a
.BR write (2V)
call), no data is transferred.
.SH FILES
.PD 0
.TP 20
.B /dev/mcpp[0-3]
parallel printer port
.TP
.B /dev/tty[h-k][0-9a-f]
hardwired tty lines
.TP
.B /dev/ttyd[0-9a-f]
dialin tty lines
.TP
.B /dev/cua[0-9a-f]
dialout tty lines
.PD
.SH "SEE ALSO"
.BR tip (1C),
.BR uucp (1C),
.BR mti (4S),
.BR termio (4),
.BR ldterm (4M),
.BR ttcompat (4M),
.BR zs (4S)
.SH DIAGNOSTICS
Most of these diagnostics ``should never happen;'' their occurrence
usually indicates problems elsewhere in the system as well.
.TP
.BI mcpa n ": silo overflow."
More than
.I n
characters
.RI ( n
very large) have been received by the
.B mcp
hardware without being read by the software.
.TP
.BI "***port " n " supports \s-1RS\s0449 interface***"
Probably an incorrect jumper configuration.  Consult the hardware manual.
.TP
.BI "mcp port " n " receive buffer error"
The
.B mcp
encountered an error concerning the synchronous receive buffer.
.TP
.PD 0
.BI "Printer on mcpp" n " is out of paper"
.TP
.BI "Printer on mcpp" n " paper ok"
.TP
.BI "Printer on mcpp" n " is offline"
.TP
.BI "Printer on mcpp" n " online"
Assorted printer diagnostics, if enabled as discussed above.
.PD
.SH BUGS
.LP
Note: pin 4 is used for hardware flow control on
\s-1ALM\s0\-2
ports 0 through 3.
These two pins should
.I not
be tied together on the
.SM ALM
end.
'0'	1E	c ('_')	1F	'='
20	c('^')	21	c ('H')	22	BUCKYBITS+	23	'7'	24	'8'	25	'9'	26	'\-'	27	'\et'
					METABIT
28	CTRLQ	29	c('W')	2A	c('E')	2B	c('R')	2C	c('T')	2D	c('Y')	2E	c('U')	2F	c ('I')
30	c('O')	31	c('P')	32	c('[')	33	c (']')	34	0x7F	35	'4'	36	'5'	37	'6'
38	','	39	SHIFTKEYS+	3A	SHIFTKEYS+	3./share/man/man4/mem.4s                                                                                755       0      12        17017  4424741456   7772                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mem.4s 1.20 89/03/27 SMI;
.TH MEM 4S "22 March 1989"
.SH NAME
mem, kmem, vme16d16, vme24d16, vme32d16, vme16d32, vme24d32, vme32d32, mbmem, mbio, atbus, zero, eeprom \- main memory and bus I/O space
.SH CONFIG
None; included with standard system.
.SH DESCRIPTION
.IX  "mem device"  ""  "\fLmem\fP \(em main memory space"  ""  PAGE START
.IX  "kmem device"  ""  "\fLkmem\fP \(em kernel memory space"  ""  PAGE START
.IX  "mbmem device"  ""  "\fLmbmem\fP \(em Multibus memory space"  ""  PAGE START
.IX  "mbio device"  ""  "\fLmbio\fP \(em Multibus I/O space"  ""  PAGE START
.IX  "vme16 device"  ""  "\fLvme16\fP \(em VMEbus 16-bit space"  ""  PAGE START
.IX  "vme24 device"  ""  "\fLvme24\fP \(em VMEbus 24-bit space"  ""  PAGE START
.IX  "vme16d16 device"  ""  "\fLvme16d16\fP \(em VMEbus address space"  ""  PAGE START
.IX  "vme24d16 device"  ""  "\fLvme24d16\fP \(em VMEbus address space"  ""  PAGE START
.IX  "vme32d16 device"  ""  "\fLvme32d16\fP \(em VMEbus address space"  ""  PAGE START
.IX  "vme16d32 device"  ""  "\fLvme16d32\fP \(em VMEbus address space"  ""  PAGE START
.IX  "vme24d32 device"  ""  "\fLvme24d32\fP \(em VMEbus address space"  ""  PAGE START
.IX  "vme32d32 device"  ""  "\fLvme32d32\fP \(em VMEbus address space"  ""  PAGE START
.IX  "virtual device"  ""  "\fLvirtual\fP \(em virtual address space"  ""  PAGE START
.IX  "memory images"  "mem device"  ""  "\fLmem\fP \(em main memory space"  PAGE START
.IX  "memory images"  "kmem device"  ""  "\fLkmem\fP \(em kernel memory space"  PAGE START
.IX  "memory images"  "mbmem device"  ""  "\fLmbmem\fP \(em Multibus memory space"  PAGE START
.IX  "memory images"  "mbio device"  ""  "\fLmbio\fP \(em Multibus I/O space"  PAGE START
.IX  "memory images"  "vme16 device"  ""  "\fLvme16\fP \(em VMEbus 16-bit space"  PAGE START
.IX  "memory images"  "vme24 device"  ""  "\fLvme24\fP \(em VMEbus 24-bit space"  PAGE START
.IX  "memory images"  "vme16d16 device"  ""  "\fLvme16d16\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme24d16 device"  ""  "\fLvme24d16\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme32d16 device"  ""  "\fLvme32d16\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme16d32 device"  ""  "\fLvme16d32\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme24d32 device"  ""  "\fLvme24d32\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme32d32 device"  ""  "\fLvme32d32\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "virtual device"  ""  "\fLvirtual\fP \(em virtual address space"  PAGE START
.LP
These devices are special files that map memory and bus I/O space.
They may be read, written, seeked and (except for
.BR kmem )
memory-mapped.
See
.BR read (2V),
.BR write (2V),
.BR mmap (2),
and
.BR directory (3),
.LP
.B mem
is a special file that is an image of the physical memory of the computer.
It may be used, for example, to examine (and even to patch) the system.
.LP
.B kmem
is a special file that is an image of the kernel virtual memory of the system.
.LP
.B zero
is a special file which is a source of private zero pages.
.SS Sun-2 and Sun-3 System
.B vme16d16
(also known as
.BR vme16 )
is a special file that is an image of
.SM VME\s0bus
16-bit addresses with 16-bit data.
.B vme16
address space extends from 0 to 64K.
.LP
.B vme24d16
(also known as
.BR vme24 )
is a special file that is an image of
.SM VMEbus
24-bit addresses with 16-bit data.
.B vme24
address space extends from 0 to 16 Megabytes.  The
.SM VME
16-bit address space
overlaps the top 64K of the 24-bit address space.
.SH Sun-3 VMEbus
.LP
.B vme32d16
is a special file that is an image of
.SM VME\s0bus
32-bit addresses with 16-bit data.
.LP
.B vme16d32
is a special file that is an image of
.SM VME\s0bus
16-bit addresses with 32-bit data.
.LP
.B vme24d32
is a special file that is an image of
.SM VMEbus
24-bit addresses with 32-bit data.
.LP
.B vme32d32
(also known as
.BR vme32 )
is a special file that is an image of
.SM VME\s0bus
32-bit addresses with 32-bit data.
.B vme32
address space extends from 0 to 4 Giggabytes.  The
.SM VME
24-bit address space
overlaps the top 16 Megabytes of the 32-bit address space.
.LP
.B vme*
type special files can only be accessed in
.SM VME
based systems.
.SH "Sun-2 MultibuS
.LP
.B mbmem
is a special file that is an image of the Multibus memory of the system.
Multibus memory is in the range from 0 to 16 Megabytes.
.B mbmem
can only be accessed in Multibus based systems.
.LP
.B mbio
is a special file that is an image of the Multibus I/O
space.  Multibus I/O space extends from 0 to 64K.
.B mbio
can only be accessed in Multibus based systems.
.LP
When reading and writing
.B mbmem
and
.B mbio
odd counts or offsets cause byte accesses and even counts
and offsets cause word accesses.
.SH Sun386i
.LP
.B atbus
is a special file that is an image of the AT bus space.
It extends from 0 to 16 Megabytes.
.LP
.B eeprom
is a special file that is an image of the NVRAM. It
extends from 0 to 2Kb.
.SH FILES
.PD 0
.TP 20
.B /dev/mem
.TP
.B /dev/kmem
.TP
.B /dev/mbmem
.TP
.B /dev/mbio
.TP
.B /dev/vme16d16
.TP
.B /dev/vme16
.TP
.B /dev/vme24d16
.TP
.B /dev/vme24
.TP
.B /dev/vme32d16
.TP
.B /dev/vme16d32
.TP
.B /dev/vme24d32
.TP
.B /dev/vme32d32
.TP
.B /dev/vme32
.TP
.B /dev/atbus
.TP
.B /dev/zero
.TP
.B /dev/eeprom
.PD
.SH SEE ALSO
.BR mmap (2),
.BR read (2V),
.BR write (2V),
.BR directory (3)
.IX  "mem device"  ""  "\fLmem\fP \(em main memory space"  ""  PAGE END
.IX  "kmem device"  ""  "\fLkmem\fP \(em kernel memory space"  ""  PAGE END
.IX  "mbmem device"  ""  "\fLmbmem\fP \(em Multibus memory space"  ""  PAGE END
.IX  "mbio device"  ""  "\fLmbio\fP \(em Multibus I/O space"  ""  PAGE END
.IX  "vme16 device"  ""  "\fLvme16\fP \(em VMEbus 16-bit space"  ""  PAGE END
.IX  "vme24 device"  ""  "\fLvme24\fP \(em VMEbus 24-bit space"  ""  PAGE END
.IX  "vme16d16 device"  ""  "\fLvme16d16\fP \(em VMEbus address space"  ""  PAGE END
.IX  "vme24d16 device"  ""  "\fLvme24d16\fP \(em VMEbus address space"  ""  PAGE END
.IX  "vme32d16 device"  ""  "\fLvme32d16\fP \(em VMEbus address space"  ""  PAGE END
.IX  "vme16d32 device"  ""  "\fLvme16d32\fP \(em VMEbus address space"  ""  PAGE END
.IX  "vme24d32 device"  ""  "\fLvme24d32\fP \(em VMEbus address space"  ""  PAGE END
.IX  "vme32d32 device"  ""  "\fLvme32d32\fP \(em VMEbus address space"  ""  PAGE END
.IX  "virtual device"  ""  "\fLvirtual\fP \(em virtual address space"  ""  PAGE END
.IX  "memory images"  "mem device"  ""  "\fLmem\fP \(em main memory space"  PAGE END
.IX  "memory images"  "kmem device"  ""  "\fLkmem\fP \(em kernel memory space"  PAGE END
.IX  "memory images"  "mbmem device"  ""  "\fLmbmem\fP \(em Multibus memory space"  PAGE END
.IX  "memory images"  "mbio device"  ""  "\fLmbio\fP \(em Multibus I/O space"  PAGE END
.IX  "memory images"  "vme16 device"  ""  "\fLvme16\fP \(em VMEbus 16-bit space"  PAGE END
.IX  "memory images"  "vme24 device"  ""  "\fLvme24\fP \(em VMEbus 24-bit space"  PAGE END
.IX  "memory images"  "vme16d16 device"  ""  "\fLvme16d16\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "vme24d16 device"  ""  "\fLvme24d16\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "vme32d16 device"  ""  "\fLvme32d16\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "vme16d32 device"  ""  "\fLvme16d32\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "vme24d32 device"  ""  "\fLvme24d32\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "vme32d32 device"  ""  "\fLvme32d32\fP \(em VMEbus address space"  PAGE END
.IX  "memory images"  "virtual device"  ""  "\fLvirtual\fP \(em virtual address space"  PAGE END
ng opened does not exist.
.TP 15
EIO
The device is offline or out of paper.
.LP
Bit 17 of the configuration
.B flags
may be specified to say that the interface should ignore Centronics
.SM SLCT\-
and
.SM RDY/PE\-
when attempting to open the device, but
this is normally useful only for configuration and troubleshooting:
if the
.SM SLCT\-
and
.SM RDY
lines are not asserted during an actual data
transfer (as with a
.BR write (2V)
call), no data is transferred.
.SH FILES
.PD 0
.TP 20
.B /dev/mcpp./share/man/man4/mouse.4s                                                                              755       0      12         1310  4424741456  10311                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mouse.4s 1.23 89/03/27 SMI;
.TH MOUSE 4S "20 November 1987"
.SH NAME
mouse \- Sun mouse
.SH CONFIG
None; included in standard system.
.SH DESCRIPTION
.IX  "mouse device"  ""  "\fLmouse\fP \(em Sun mouse"  ""
.IX  "Sun mouse device"  ""  "Sun mouse device \(em \fLmouse\fP"  ""
.LP
The
.B mouse
indirect device provides access to the Sun Workstation mouse.  When
opened, it redirects operations to the standard mouse device for the
workstation (attached either to a
.SM CPU
serial or parallel port), and pushes the
.BR ms (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules on top of that device.
.SH FILES
.PD 0
.TP 20
.B /dev/mouse
.PD
.SH "SEE ALSO
.BR ms (4M),
.BR ttcompat (4M),
.BR win (4S),
.BR zs (4S)
vme32d16.4s     E  vme32d32.4s     F  vp.4s s     G  vpc.4s      H  win.4s 2    I  xd.4s  4    J  xt.4s  .    K  xy.4s n.     L  zero.4s      M  zs.4s s evice"  ""  "\fLvme16d16\fP \(em VMEbus address space"  PAGE START
.IX  "memory images"  "vme24d16 device"  ""  "\fL./share/man/man4/ms.4m                                                                                 755       0      12        10401  4424741457   7614                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ms.4m 1.10 89/03/27 SMI
.TH MS 4M "22 March 1989"
.SH NAME
ms \- Sun mouse STREAMS module
.SH CONFIG
.BI pseudo-device ms n
.SH SYNOPSIS
.nf
.ft B
#include <sys/stream.h>
#include <sys/stropt.h>
#include <sundev/vuid_event.h>
#include <sundev/msio.h>
ioctl(fd, \s-1I_PUSH\s0, "ms");
.ft R
.fi
.SH DESCRIPTION
.IX  "mouse streams module"  ""  "\fLmouse\fP \(em Sun mouse"  ""
.IX  "Sun mouse streams module"  ""  "Sun mouse streams module \(em \fLmouse\fP"  ""
The
.B ms
.SM STREAMS
module processes byte streams
generated by mice attached to a
.SM CPU
serial or parallel port.  When this module is pushed onto a
stream, it sends a
.SB TCSETSF
ioctl downstream, setting the baud rate
to 1200 baud and the character size
to 8 bits, and enabling the receiver.  All other flag words are
cleared.  It assumes only that the
.BR termios (4)
functions provided by the
.BR zs (4S)
driver are supported; no other functions need be supported.
.LP
The mouse is expected to generate a stream of bytes
encoding mouse motions and changes in the state of the buttons.
.LP
Each mouse sample in the byte stream consists of three bytes:  the
first byte gives the button state with value
.RI 0x87|~ but ,
where
.I but
is the low three bits giving the mouse buttons, where a 0 (zero) bit
means that a button is pressed, and a 1 (one) bit means a button is not
pressed.  Thus if the left button is down the value of this sample is
0x83, while if the right button is down the byte is 0x86.
.LP
The next two bytes of each sample give the
.I x
and
.I y
deltas of this sample as signed bytes.  The mouse uses a lower-left
coordinate system, so moves to the right on the screen yield positive
.I x
values and moves down the screen yield negative
.I y
values.
.LP
The beginning of a sample is identifiable because the delta's are
constrained to not have values in the range 0x80-0x87.
.LP
A stream with
.B ms
pushed onto it can be used as a device that emits
.I firm_events
as specified by the protocol of a
.IR "Virtual User Input Device" .
It understands
.BR \s-1VUIDSFORMAT\s0,
.BR \s-1VUIDGFORMAT\s0,
.SB VUIDSADDR
and
.SB VUIDGADDR
ioctls (see reference below).
.SH IOCTLS
.B ms
responds to the following
.IR ioctl s,
as defined in
.B <sundev/msio.h>
and
.BR <sundev/vuid_event.h> .
All other
.IR ioctl s
are passed downstream.  As
.B ms
sets the parameters of the serial port when it is opened, no
.BR termios (4)
.IR ioctl s
should be performed on a stream with
.B ms
on it, as
.B ms
expects the device parameters to remain as it set them.
.LP
The
.SB MSIOGETPARMS
and
.SB MSIOSETPARMS
calls use a structure of type
.BR Ms_parms ,
which is a structure defined in
.BR <sundev/msio.h> :
.LP
.nf
.ta 1i 1.7i 2.5i
.ft B
typedef struct {
int             jitter_thresh;
int             speed_law;
int             speed_limit;
}               Ms_parms;
.ft R
.fi
.LP
.I jitter_thresh
is the ``jitter threshold'' of the mouse.  Motions of fewer than
.I jitter_thresh
units along both axes that occur in less than 1/12 second are treated as
``jitter'' and ignored.  Thus, if the mouse moves fewer than
.I jitter_thresh units
and then moves back to its original position in less than 1/12 of a
second, the motion is considered to be ``noise'' and ignored.  If
it moves fewer than
.I jitter_thresh
units and continues to move so that it has not returned to its
original position after 1/12 of a second, the motion is considered to
be real and is reported.
.LP
.I speed_law
indicates whether extremely large motions are to be ignored.  If it
is 1, a ``speed limit'' is applied to mouse motions; motions along
either axis of more than
.I speed_limit
units are discarded.
.LP
Note: these parameters are global; if they are set for any mouse
on a workstation, they apply to any other mice attached to that
workstation as well.
.TP 20
.SB VUIDSFORMAT
.PD 0
.TP
.SB VUIDGFORMAT
.TP
.SB VUIDSADDR
.TP
.SB VUIDGADDR
These are standard
.I Virtual User Input Device
.IR ioctl s.
See
.TX SVSPG
for a description of their operation.
.PD
.TP
.SB MSIOGETPARMS
The argument is a pointer to a
.BR Ms_parms .
The current mouse parameters are stored in that structure.
.TP
.SB MSIOSETPARMS
The argument is a pointer to a
.BR ms_parms .
The current mouse parameters are set from the values in that
structure.
.SH "SEE ALSO
.BR mouse (4S),
.BR termios (4),
.BR win (4S),
.BR zs (4S)
.LP
.TX SVSPG
he Multibus memory of the system.
Multibus memory is in the range from 0 to 16 Megabytes.
.B mbmem
can only be accessed in Multibus based systems.
.LP
.B mbio
is a special file that is an image of the Multibus I/O
space.  Multibus I/O space extends from 0./share/man/man4/ms3.4s                                                                                755       0      12           63  4424741457   7630                                                                                                                                                                                                                                                                                                                                                                      .so man4/mouse.4s
.\" @(#)ms3.4s 1.4 89/03/27 SMI;
mtio.4 .    )  nfs.4p .    *  	nif_pf.4m     +  nit.4p .    ,  
nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4 4     1  pty.4 ll  0  2  root.4s   D  3  
routing.4n D  T  4  sd.4s     h  5  sockio.4  h  x  6  st.4s  D    7  
streamio.4     8  taac.4s     9  tcp.4p      :  termio.4      ;  	termios.4     <  tm.4s     =  ttco./share/man/man4/mti.4s                                                                                755       0      12        16557  4424741457  10016                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mti.4s 1.26 89/03/27 SMI
.TH MTI 4S "22 March 1989"
.SH NAME
mti \- Systech MTI-800/1600 multi-terminal interface
.SH "CONFIG \(em SUN-3 SYSTEM "
.nf
.ft B
device mti0 at vme16d16 ? csr 0x620 flags 0xffff priority 4 vector mtiintr 0x88
device mti1 at vme16d16 ? csr 0x640 flags 0xffff priority 4 vector mtiintr 0x89
device mti2 at vme16d16 ? csr 0x660 flags 0xffff priority 4 vector mtiintr 0x8a
device mti3 at vme16d16 ? csr 0x680 flags 0xffff priority 4 vector mtiintr 0x8b
.fi
.ft R
.SH "CONFIG \(em SUN-2 SYSTEM "
.nf
.ft B
device mti0 at mbio ? csr 0x620 flags 0xffff priority 4
device mti1 at mbio ? csr 0x640 flags 0xffff priority 4
device mti2 at mbio ? csr 0x660 flags 0xffff priority 4
device mti3 at mbio ? csr 0x680 flags 0xffff priority 4
device mti0 at vme16 ? csr 0x620 flags 0xffff priority 4 vector mtiintr 0x88
device mti1 at vme16 ? csr 0x640 flags 0xffff priority 4 vector mtiintr 0x89
device mti2 at vme16 ? csr 0x660 flags 0xffff priority 4 vector mtiintr 0x8a
device mti3 at vme16 ? csr 0x680 flags 0xffff priority 4 vector mtiintr 0x8b
.ft R
.fi
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/tty\fIxy\fB", mode);
open("/dev/ttyd\fIn\fB", mode);
open("/dev/cua\fIn\fB", mode);
.ft R
.fi
.SH DESCRIPTION
.IX  "mti device"  ""  "\fLmti\fP \(em Systech MTI-800/1600 multi-terminal interface"  ""  PAGE START
.LP
The Systech
.SM MTI
card provides 8 (\s-1MTI\s0-800) or 16 (\s-1MTI\s0-1600) serial communication
lines with modem control.
Each port supports those
.BR termio (4)
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure and by the
.BR \s-1IGNBRK\*S ,
.BR \s-1IGNPAR\*S ,
.BR \s-1PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure are performed by the
.B mti
driver.  All other
.BR termio (4)
functions must be performed by
.SM STREAMS
modules pushed atop the driver; when a device is opened, the
.BR ldterm (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules are automatically pushed on top of the stream, providing the
standard
.BR termio (4)
interface.
.LP
Bit
.I i
of
.B flags
may be specified to say that a line is not properly
connected, and that the line
.I i
should be treated as hard-wired with carrier
always present.  Thus specifying
.B "flags 0x0004"
in the specification of
.B mti0
would treat line
.B /dev/tty02
in this way.
.LP
Minor device numbers in the range 0 \- 63 correspond directly to the
normal tty lines and are named
\fB/dev/tty\fIXY\fR,
where
.I X
is the physical board number (0 \- 3), and
.I Y
is the line number on the board as a single hexadecimal digit.
(Thus the first line on the first board is
.BR /dev/tty00 ,
and the sixteenth line on the third board is
.BR /dev/tty2f .)
.LP
To allow a single tty line to be connected to a modem and used for
both incoming and outgoing calls, a special feature, controlled by
the minor device number, has been added.
Minor device numbers in the range 128 \- 191 correspond to the same physical
lines as those above (that is,
the same line as the minor device number minus 128).
.LP
A dial-in line has a minor device in the range 0 \- 63 and
is conventionally renamed
\fB/dev/ttyd\fIn\fR,
where
.I n
is a number indicating which dial-in line it is (so that
.B /dev/ttyd0
is the first dial-in line), and the dial-out line corresponding to that dial-in
line has a minor device number 128 greater than the minor device number of the
dial-in line and is conventionally named
\fB/dev/cua\fIn\fR,
where
.I n
is the number of the dial-in line.
.LP
The
.BI /dev/cua n
lines are special in that they can be opened even when
there is no carrier on the line.
Once a
.BI /dev/cua n
line is opened, the corresponding tty line can not be
opened until the
.BI /dev/cua n
line is closed; a blocking open will wait until the
.BI /dev/cua n
line is closed (which will drop Data Terminal Ready, after which Carrier Detect
will usually drop as well) and carrier is detected again, and a non-blocking
open will return an error.
Also, if the
.BI /dev/ttyd n
line has been opened successfully (usually only
when carrier is recognized on the modem) the corresponding
.BI /dev/cua n
line can not be opened.
This allows a modem to be attached to e.g.
.B /dev/ttyd0
(renamed from
.BR /dev/tty00 )
and used for dialin (by enabling the line for
login in
.BR /etc/ttytab )
and also used for dialout (by
.BR tip (1C)
or
.BR uucp (1C))
as
.B /dev/cua0
when no one is logged in on
the line.
Note: the bit in the
.B flags
word in the configuration file (see above) must be zero
for this line,
which enables hardware carrier detection.
.SH WIRING
The Systech requires the
.SM CTS
modem control signal to operate.
If the device does not supply
.SM CTS
then
.SM RTS
should be jumpered to
.SM CTS
at the distribution panel (short pins 4 to 5).
Also, the
.SM CD
(carrier detect) line does not work properly.
When connecting a modem, the modem's
.SM CD
line should be wired to
.SM DSR\s0,
which the software will treat as carrier detect.
.SH IOCTLS
The standard set of
.B termio
.B ioctl(\|)
calls are supported by
.BR mti .
.LP
The state of the
.SB CRTSCTS
flag in the
.B c_cflag
word has no effect; no output will be generated unless
.SM CTS
is high.  Breaks can be generated by the
.BR \s-1TCSBRK\s0 ,
.BR \s-1TIOCSBRK\s0 ,
and
.SB TIOCCBRK
.B ioctl(\|)
calls.
The modem control lines
.BR \s-1TIOCM_CAR\s0 ,
.BR \s-1TIOCM_CTS\s0 ,
.BR \s-1TIOCM_RTS\s0 ,
and
.SB TIOCM_DTR
are provided; however, as described above, the
.SM DSR
line is treated as
.SM CD
and the
.SM CD
line is ignored.
.LP
The input and output line speeds may be set to any of the speeds
supported by
.BR termio .
The speeds cannot be set independently; when the output speed is set,
the input speed is set to the same speed.
The baud rates
.B B200
and
.B B38400
are not supported by the hardware;
.B B200
selects 2000 baud, and
.B B38400
selects 7200 baud.
.SH ERRORS
An
.B open(\|)
will fail if:
.TP 15
ENXIO
The unit being opened does not exist.
.TP 15
EBUSY
The dial-out device is being opened and the dial-in device is already open, or
the dial-in device is being opened with a no-delay open and the dial-out device
is already open.
.TP 15
EBUSY
The unit has been marked as exclusive-use by another process with a
.SB TIOCEXCL
.B ioctl(\|)
call.
.TP 15
EINTR
The open was interrupted by the delivery of a signal.
.SH FILES
.PD 0
.TP 20
.B /dev/tty[0-3][0-9a-f]
hardwired tty lines
.TP
.B /dev/ttyd[0-9a-f]
dialin tty lines
.TP
.B /dev/cua[0-9a-f]
dialout tty lines
.PD
.SH "SEE ALSO"
.BR tip (1C),
.BR uucp (1C),
.BR mcp (4S),
.BR termio (4),
.BR ldterm (4M),
.BR ttcompat (4M),
.BR zs (4S)
.\".LP
.\"The \fIMTI-800A/1600A Multiple Terminal Interface User's Manual, Rev. D\fP,
.\"which comes with the multiplexer.
.  \"Part Number: 800-1097-01).
.SH DIAGNOSTICS
Most of these diagnostics ``should never happen'' and their occurrence
usually indicates problems elsewhere in the system.
.TP
.BI mti n , " n" ": silo overflow."
More than 512 characters have been received by the mti hardware
without being read by the software.
Extremely unlikely to occur.
.TP
.BI mti n ": read error code <" n ">. Probable hardware fault"
The
.B mti
returned the indicated error code.
See the
.SM MTI
manual.
.TP
.BI mti n ": \s-1DMA\s0 output error."
The
.B mti
encountered an error while trying to do
.SM DMA
output.
.TP
.BI mti n ": impossible response " n .
The
.B mti
returned an error it could not understand.
.IX  "mti device"  ""  "\fLmti \(em Systech MTI-800/1600 multi-terminal interface"  ""  PAGE END
\- 63 correspond directly to the
normal tty lines and are named
\fB/dev/tty\fIXY\fR,
where
.I X
is the physical board number (0 \- 3), and
.I Y
i./share/man/man4/mtio.4                                                                                755       0      12        27645  4424741457  10012                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mtio.4 1.30 89/03/27 SMI; from UCB 4.1
.TH MTIO 4 "22 March 1989"
.SH NAME
mtio \- general magnetic tape interface
.SH SYNOPSIS
.nf
.B #include <sys/ioctl.h>
.B #include <sys/mtio.h>
.fi
.SH DESCRIPTION
.LP
Both 1/2\(rq and 1/4\(rq magnetic tape drives share the same general
interface regardless of the hardware involved.  The remainder of
this section discusses the common features of that interface.
.LP
The \(lqcooked\(rq magnetic tape device files
read and write magnetic tape in 2048 byte blocks
(the 2048 is actually
.SB BLKDEV_IOSIZE
in
.BR /usr/include/sys/param.h ).
The name of such a device file might be
.BR /dev/mt0 .
The final component of the device name is
the type of device the file refers to,
and the unit number of that
device.
.LP
These files are rewound when closed,
except for \(lqno-rewind\(rq versions.
The names of no-rewind device files use 
the letter
.B n
as the beginning of the final component.
The no-rewind version of
.B /dev/mt0
would be
.BR /dev/nmt0 .
When a 1/2\(rq tape file,
opened for writing or just written, is closed, two tape marks are written.
If the tape is not to be rewound, it is positioned with the head 
between the two tapemarks.
.LP
The files discussed above are useful for making taped files consistent 
with ordinary files.  This interface requires that
all blocks be 2048 bytes long, and does not permit special operations
(such as spacing the tape forward or backward) to be performed.
The \(lqraw\(rq interface is appropriate when reading or writing long records
or using foreign tapes.
Raw device files are indicated by
the letter
.B r
before the device type in the
device name:
the raw version of
.B /dev/mt0
would be
.BR /dev/rmt0 ,
and the raw version of
.B /dev/nmt0
would be
.BR /dev/nrmt0 .
.LP
.BR read (2V)
or
.BR write (2V)
calls read or write the next record on the tape.
When the call is to write, the record has the same length as the given buffer.
During a read call, the record size is passed back as the number of bytes read,
provided it is no greater than the buffer size.
In raw tape I/O, seeks are ignored (except 
.BR st ).
When a tape mark is read, a zero byte count is returned;
another read will fetch the first record of the next
tape file.
Two successive reads 
returning zero byte counts indicate
the end of recorded media.
.LP
.SS 1/2\(rq Reel Tape
.LP
Data bytes are recorded in parallel onto the 9\-track tape.
The number of bytes in a physical record varies
between 1 to 65535 bytes.  Files end with one file mark except
for the last, which signals the end of recorded media
with two file marks.
Care should be taken when overwriting records; the
erase head is just forward of the write head and
any following records will also be erased.
.LP
The recording formats available (check specific tape drive) are
800
.SM BPI\s0,
1600
.SM BPI\s0,
and 6250 
.SM BPI\s0,
and data compression.  Actual storage capacity is a function of the
recording format and the length of the tape reel.  For example, using
a 2400 foot tape, 20 MB can be stored using 800
.SM BPI\s0,
40 MB using 1600
.SM BPI\s0,
140 MB using 6250
.SM BPI\s0,
or up to 700 MB using data compression.
.LP
.SS 1/4\(rq Cartridge Tape
Data is recorded serially onto 1/4\-inch cartridge tape.  The number
of bytes per record is determined by the physical record size of the
device.  The I/O request size must be a multiple of the physical
record size of the device.  For
.SM QIC\s0\-11,
.SM QIC\s0\-24,
and 
.SM QIC\s0\-150
tape drives the block size is 512 bytes.
.LP
The records are recorded on tracks
in a serpentine motion.  As one track is completed,
the drive switches to the next and begins writing in the 
opposite direction, eliminating the wasted motion of 
rewinding.  Each file, including the last, ends with
one file mark.
.LP
Files may be written only at the
beginning of the tape or after the last written file.
This prevents corrupting data by overwriting
files.
.LP
Storage capacity is based on the number of tracks
the drive is capable of recording.
For example, 4\-track drives can only record
20 MB of data on a 450 foot tape;
9\-track drives can record up to 45 MB of data
on a tape of the same length..
.SM QIC\s0\-11
is the only tape format available for
4\-track tape drives.  In contrast, 9\-track tape drives can use
either
.SM QIC\s0\-24
or
.SM QIC\s0\-11.  
Storage capacity is not appreciably affected by using either format.
.SM QIC\s0\-24
is preferable to
.SM QIC\s0\-11
because it records a reference signal to mark the position of the
first track on the tape, and each block has a unique block number.  
.LP
The 
.SM QIC\s0\-150
tape drives require 
.SM DC\s0\-6150
(or equivalent)
tape cartridges for writing.  However, they can read
other tape cartridges in
.SM QIC\s0\-11,
.SM QIC\s0\-24,
.SM QIC\s0\-120,
or
.SM QIC\s0\-150
tape formats.
.LP
A number of additional ioctl operations are available on \(lqraw\(rq
devices.  The following definitions are from
.BR /usr/include/sys/mtio.h :
.LP
.nf
.ft B
/*
 * Structures and definitions for mag tape io control commands
 */

/* structure for \s-1MTIOCTOP\s0 - mag tape op command */
struct	mtop	{
	short	mt_op;   	/* operations defined below */
	daddr_t	mt_count;	/* how many of them */
};

#define	\|\s-1MTWEOF\s0	0	/* write an end-of-file record */
#define	\|\s-1MTFSF\s0		1	/* forward space file */
#define	\|\s-1MTBSF\s0		2	/* backward space file */
#define	\|\s-1MTFSR\s0		3	/* forward space record */
#define	\|\s-1MTBSR\s0		4	/* backward space record */
#define	\|\s-1MTREW\s0	5	/* rewind */
#define	\|\s-1MTOFFL\s0	6	/* rewind and put the drive offline */
#define	\|\s-1MTNOP\s0		7	/* no operation, sets status only */
#define	\|\s-1MTRETEN\s0	8	/* retension the tape */
#define	\|\s-1MTERASE\s0   	9	/* erase the entire tape */
#define	\|\s-1MTEOM\s0	10	/* position to end of media (\s-1SCSI\s0 only) */
#define	\|\s-1MTBSFM\s0	11	/* backward space file mark */

/* structure for \s-1MTIOCGET\s0 - mag tape get status command */
struct	mtget {
	short	mt_type;  		/* type of magtape device */
.SP .5
/* the following two registers are grossly device dependent */
	short	mt_dsreg;  		/* ``drive status'' register */
	short	mt_erreg;  		/* ``error'' register */
.SP .5
/* optional error info. */
	daddr_t	mt_resid;  		/* residual count */
	daddr_t	mt_fileno;  		/* file number of current position */
	daddr_t	mt_blkno;  		/* block number of current position */
};

/*
 * Constants for mt_type byte
 */
#define	\s-1MT_ISTS\s0		0x01	/* vax: unibus ts-11 */
#define	\s-1MT_ISHT\s0		0x02	/* vax: massbus tu77, etc */
#define	\s-1MT_ISTM\s0		0x03	/* vax: unibus tm-11 */
#define	\s-1MT_ISMT\s0		0x04	/* vax: massbus tu78 */
#define	\s-1MT_ISUT\s0		0x05	/* vax: unibus gcr */
#define	\s-1MT_ISCPC\s0		0x06	/* sun: Multibus tapemaster */
#define	\s-1MT_ISAR\s0		0x07	/* sun: Multibus archive */
#define	\s-1MT_ISSC\s0		0x08	/* sun: \s-1SCSI\s0 archive */
#define	\s-1MT_ISXY\s0		0x09	/* sun: Xylogics 472 */

#define	\s-1MT_ISSYSGEN11\s0	0x10	/* sun: SCSI Sysgen, QIC-11 only */
#define	\s-1MT_ISSYSGEN\s0		0x11	/* sun: SCSI Sysgen QIC-24/11 */
#define	\s-1MT_ISDEFAULT\s0		0x12	/* sun: SCSI default CCS */
#define	\s-1MT_ISCCS3  \s0		0x13	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISMT02  \s0		0x14	/* sun: SCSI Emulex MT02 */
#define	\s-1MT_ISVIPER1\s0		0x15	/* sun: SCSI Archive QIC-150 Viper */
#define	\s-1MT_ISWANGTEK1\s0	0x16	/* sun: SCSI Wangtek QIC-150 */
#define	\s-1MT_ISCCS7  \s0		0x17	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS8  \s0		0x18	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS9  \s0		0x19	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS11\s0		0x1a	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS12\s0		0x1b	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS13\s0		0x1c	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS14\s0		0x1d	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS15\s0		0x1e	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS16\s0		0x1f	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCDC  \s0		0x20	/* sun: SCSI CDC 1/2\(rq cartridge */
#define	\s-1MT_ISFUJI \s0		0x21	/* sun: SCSI Fujitsu 1/2\(rq cartridge */
#define	\s-1MT_ISKENNEDY\s0	0x22	/* sun: SCSI Kennedy 1/2\(rq reel */
#define	\s-1MT_ISHP   \s0		0x23	/* sun: SCSI HP 1/2\(rq reel */
#define	\s-1MT_ISCCS21\s0		0x24	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS22\s0		0x25	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS23\s0		0x26	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS24\s0		0x27	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISEXABYTE\s0		0x28	/* sun: SCSI Exabyte 8mm cartridge */
#define	\s-1MT_ISCCS26\s0		0x29	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS27\s0		0x2a	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS28\s0		0x2b	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS29\s0		0x2c	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS30\s0		0x2d	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS31\s0		0x2e	/* sun: SCSI generic (unknown) CCS */
#define	\s-1MT_ISCCS32\s0		0x2f	/* sun: SCSI generic (unknown) CCS */

/*
 * Device table structure and data for looking tape name from
 * tape id number.  Used by mt.c.
 */
struct mt_tape_info {
	short	t_type;    	/* type of magtape device */
	char 	*t_name;  	/* printing name */
	char 	*t_dsbits;	/* "drive status" register */
	char 	*t_erbits;	/* "error" register */
};

#define \s-1MT_TAPE_INFO\s0  { \\
{ \s-1MT_ISCPC\s0,		"TapeMaster",		\s-1TMS_BITS\s0, 0 }, \\
{ \s-1MT_ISXY\s0,		"Xylogics 472",		\s-1XTS_BITS\s0, 0 }, \\
{ \s-1MT_ISAR\s0,		"Archive",    		\s-1ARCH_CTRL_BITS\s0, \s-1ARCH_BITS\s0 }, \\
{ \s-1MT_ISSYSGEN\s011,	"Sysgen \s-1QIC\s0-11",	0, 0 }, \\
{ \s-1MT_ISSYSGEN\s0,	"Sysgen",     		0, 0 }, \\
{ \s-1MT_ISMT\s002,		"Emulex \s-1MT\s0-02",	0, 0 }, \\
{ \s-1MT_ISVIPER\s01,	"Archive \s-1QIC\s0-150",	0, 0 }, \\
{ \s-1MT_ISWANGTEK\s01,	"Wangtek \s-1QIC\s0-150",	0, 0 }, \\
{ \s-1MT_ISCDC\s0,		"\s-1CDC\s0",      		0, 0 }, \\
{ \s-1MT_ISKENNEDY\s0,	"Kennedy",		0, 0 }, \\
{ \s-1MT_ISHP\s0,		"\s-1HP\s0-88780",		0, 0 }, \\
{ \s-1MT_ISEXABYTE\s0,	"Exabyte",		0, 0 }, \\
{ 0 } \\
}


/*
 * Constants for mt_type byte
 */

/*
 * Check if mt_type is one of the \s-1SCSI\s0 tape devices.
 */
#define \s-1MT_TYPE_SCSI\s0(mt_type) \\
	((mt_type >= \s-1MT_ISSYSGEN\s011)  &&  (mt_type <= \s-1MT_ISCCS\s032))

/*
 * Older 1/4-inch cartridge tapes devices.
 * A blocking factor of 126 is recommended for compatibility.
 * A larger blocking factor may be used for improved streaming
 * performance.
 */
#define \s-1MT_TYPE_OLD_CARTRIDGE\s0(mt_type) \\
	((mt_type == \s-1MT_ISSYSGEN\s011)  ||  (mt_type == \s-1MT_ISSYSGEN\s0)  || \\
	 (mt_type == \s-1MT_ISAR\s0))

/*
 * Current 1/4-inch cartridge tape devices.
 * A blocking factor of 40 (to 60) is recommended for
 * optimal streaming performance.
 */
#define \s-1MT_TYPE_NEW_CARTRIDGE\s0(mt_type) \\
	(mt_type >= \s-1MT_ISDEFAULT\s0  &&  mt_type <= \s-1MT_ISCCS\s016) 

/*
 * All 1/4-inch cartridge tape devices.
 * A blocking factor of 126 is recommended for compatibility
 * (during writes).  See above for specific recommendations for
 * reading.
 */
#define \s-1MT_TYPE_CARTRIDGE\s0(mt_type) \\
	((mt_type >= \s-1MT_ISSYSGEN\s011  &&  mt_type <= \s-1MT_ISCCS\s016)  ||  \\
	 (mt_type == \s-1MT_ISAR\s0))

/*
 * All 1/2-inch reel tape devices.
 * A blocking factor of 20 is recommended for compatibility.
 */
#define \s-1MT_TYPE_REEL\s0(mt_type) \\
	((mt_type >= \s-1MT_ISCDC\s0  &&  mt_type <= \s-1MT_ISCCS\s032)  || \\
	 (mt_type >= \s-1MT_ISTS\s0   &&  mt_type <= \s-1MT_ISCPC\s0)    || \\
	 (mt_type == \s-1MT_ISXY\s0))

/* mag tape io control commands */
#define	\s-1MTIOCTOP\s0	_\s-1IOW\s0(m, 1, struct mtop)	/* do a mag tape op */
#define	\s-1MTIOCGET\s0	_\s-1IOR\s0(m, 2, struct mtget)	/* get tape status */
#ifndef	\s-1KERNEL\s0
#define	\s-1DEFTAPE\s0	``/dev/rmt12''
#endif
.fi
.ft R
.SH "SEE ALSO"
.BR mt (1),
.BR tar (1),
.BR read (2V),
.BR write (2V),
.BR ar (4S),
.BR st (4S),
.BR tm (4S),
.BR xt (4S)
.br
.SH BUGS
.LP
\(lqCooked\(rq mode does not work for all
magnetic tape devices
.RB ( st ,
.BR tm ,
and
.BR xt
for example).

tape io control commands
 */

/* structure for \s-1MTIOCTOP\s0 - mag tape op command */
str./share/man/man4/nfs.4p                                                                                755       0      12         6413  4424741457   7756                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nfs.4p 1.16 89/03/27 SMI; from UCB 4.3 BSD
.TH NFS 4P "25 March 1989"
.SH NAME
nfs, NFS \- network file system
.SH CONFIG
.B options NFS
.SH DESCRIPTION
.IX  "NFS, network file system protocol"
.LP
The Network File System, or
.SM NFS\s0,
allows a client workstation to perform
transparent file access over the network.  Using it, a client
workstation can operate on files that reside on a variety of servers,
server architectures and across a variety of operating systems.  Client
file access calls are converted to
.SM NFS
protocol requests, and are sent
to the server system over the network.  The server receives the request,
performs the actual file system operation, and sends a response back to
the client.
.LP
The Network File System operates in a stateless fashion using
remote procedure (\s-1RPC\s0) calls built on top of external data
representation (\s-1XDR\s0) protocol.  These protocols are documented in
.TX NETP
The
.SM RPC
protocol provides for version and authentication parameters
to be exchanged for security over the network.
.LP
A server can grant access to a specific filesystem to certain
clients by adding an entry for that filesystem to the server's
.B /etc/exports
file.
.LP
A client gains access to that filesystem with the
.BR mount (2)
system call, which requests a file handle for the filesystem itself.
Once the filesystem is mounted by the client, the server issues a file
handle to the client for each file (or directory) the client accesses.
If the file is somehow removed on the server side, the file handle
becomes stale (dissociated with a known file).
.LP
A server may also be a client with respect to filesystems it
has mounted over the network, but its clients cannot gain access
to those filesystems.  Instead, the client
must mount a filesystem directly from the server on which it resides.
.LP
The user
.SM ID
and group
.SM ID
mappings must be the same between client and
server.  However, the server maps uid 0 (the super-user) to uid \-2
before performing access checks for a client.  This inhibits
super-user privileges on remote filesystems.
.LP
.SM NFS\s0-related
routines and structure definitions are described in
.TX NETP .
.SH ERRORS
.LP
Generally physical disk I/O errors detected at the server are returned
to the client for action.  If the server is down or inaccessible,
the client will see the console message:
.RS
.SB NFS\s0:
.BR "file server not responding: still trying" .
.RE
The client continues (forever) to resend the request until it
receives an acknowledgement from the server.
This means the server can crash or power down, and come back up,
without any special action required by the client.
It also means the client process requesting the I/O will block and
remain insensitive to signals, sleeping inside the kernel at
.SB PRIBIO\s0.
.SH FILES
.PD 0
.TP 20
.B /etc/exports
.PD
.SH "SEE ALSO"
.BR mount (2),
.BR exports (5),
.BR fstab (5),
.BR fstab (5),
.BR mount (8),
.BR nfsd (8)
.LP
.TX NETP
.SH BUGS
.LP
When a file that is opened by a client is unlinked (by the
server), a file with a name of the form
.BI \&.nfs \s-1XXX\s0
(where
.I \s-1XXX\s0
is a number) is created by the client.
When the open file is closed, the
.BI \&.nfs \s-1XXX\s0
file is removed.
If the client crashes before the file can be closed,
the
.BI \&.nfs \s-1XXX\s0
file is not removed.
mpatibility.
 * A larger blocking factor may be used for improved streaming
 * performance.
 */
#define \s-1MT_TYPE_OLD_CARTRIDGE\s0(mt_type) \\
	((mt_type == \s-1MT_ISSYSGEN\s011)  ||  (mt_type == \s-1MT_ISSYSGEN\s0)  || \\
	 (mt_type == \s-1MT./share/man/man4/nif_pf.4m                                                                             755       0      12           67  4424741460  10357                                                                                                                                                                                                                                                                                                                                                                      .so man4/nit_pf.4m
.\" @(#)nif_pf.4m 1.4 89/03/27 SMI;

nit_buf.4m     -  	nit_if.4m     .  	nit_pf.4m      /  null.4     0  pp.4 4      1  pty.4    0  2  root.4s   D  3  
routing.4n D  T  4  sd.4s  D  h  5  sockio.4  h  x  6  st.4s h    7  
streamio.4     8  taac.4s     9  tcp.4p      :  termio.4      ;  	termios.4     <  tm.4s     =  ttcompat.4m     >  tty.4 m     ?  udp.4p    ,  @  vme16d16.4s   @  A./share/man/man4/nit.4p                                                                                755       0      12        15006  4424741460   7772                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nit.4p 1.23 89/03/27 SMI;
.TH NIT 4P "25 March 1989"
.SH NAME
nit \- Network Interface Tap
.SH CONFIG
.nf
.B pseudo-device	clone
.B pseudo-device	snit
.B pseudo-device	pf
.B pseudo-device	nbuf
.fi
.SH SYNOPSIS
.nf
.B #include <sys/file.h>
.B #include <sys/ioctl.h>
.B #include <net/nit_pf.h>
.B #include <net/nit_buf.h>
.sp 0.25v
	\fIfd\fP\fB = open("/dev/nit", \|\fP\fImode\fP\fB);\fP
	\fBioctl(\fP\fIfd\fP\fB, \|I_PUSH, \|"pf");\fP
	\fBioctl(\fP\fIfd\fP\fB, \|I_PUSH, \|"nbuf");\fP
.fi
.SH DESCRIPTION
.IX "NIT facility" "" "NIT, Network Interface Tap"
.IX STREAMS NIT "" "NIT, Network Interface Tap"
.LP
.SM NIT
(the Network Interface Tap)
is a facility composed of several
.SM STREAMS
modules and drivers.
These components collectively provide facilities
for constructing applications
that require link-level network access.
Examples of such applications include
.BR rarpd (8C),
which is a user-level implementation of the Reverse
.SM ARP
protocol, and
.BR etherfind (8C),
which is a network monitoring and trouble-shooting program.
.LP
.SM NIT
consists of several components that are summarized below.
See their Reference Manual entries for detailed information
about their specification and operation.
.nr Xx \w'\fBnit_pf\fP(4M)'u+(3n)u
.TP \n(Xxu
.BR nit_if (4M)
This component is a
.SM STREAMS
device driver that interacts directly with the system's Ethernet drivers.
After opening an instance of this device it must be bound
to a specific Ethernet interface before becoming usable.
Subsequently,
.B nit_if
transcribes packets arriving on the interface
to the read side of its associated stream
and delivers messages reaching it on the write side of its stream
to the raw packet output code for transmission over the interface.
.TP
.BR nit_pf (4M)
This module provides packet-filtering services,
allowing uninteresting incoming packets
to be discarded with minimal loss of efficiency.
It passes through unaltered all outgoing messages
(those on the stream's write side).
.TP
.BR nit_buf (4M)
This module buffers incoming messages into larger aggregates,
thereby reducing the overhead incurred by repeated
.BR read (2V)
system calls.
.LP
.SM NIT
clients mix and match these components,
based on their particular requirements.
For example, the reverse
.SM ARP
daemon concerns itself only with packets of a specific type
and deals with low traffic volumes.
Thus,
it uses
.B nit_if
for access to the network and
.B nit_pf
to filter out all incoming packets except reverse
.SM ARP
packets, but omits the
.B nit_buf
buffering module since traffic is not high enough
to justify the additional complexity of unpacking buffered packets.
On the other hand, the
.BR etherd (8C)
program, which collects Ethernet statistics for
.BR traffic (1C)
to display, must examine every packet on the network.
Therefore, it omits the
.B nit_pf
module, since there is nothing it wishes to screen out,
and includes the
.B nit_buf
module, since most networks have very heavy aggregate packet traffic.
.SH EXAMPLES
.LP
The following code fragments outline how to program
against parts of the
.SM NIT
interface.
For the sake of brevity, all error-handling code has been elided.
.LP
.B initdevice
comes from
.B etherfind
and sets up its input stream configuration.
.LP
.nf
.ft B
.if t .ps -2
.if t .vs -2
initdevice(if_flags, snaplen, chunksize)
	u_long	if_flags,
		snaplen,
		chunksize;
{
	struct strioctl	si;
	struct ifreq	ifr;
	struct timeval	timeout;

	if_fd = open(NIT_DEV, O_RDONLY);

	/* Arrange to get discrete messages from the stream. */
	ioctl(if_fd, I_SRDOPT, (char *)RMSGD);

	si.ic_timout = INFTIM;

	/* Push and configure the buffering module. */
	ioctl(if_fd, I_PUSH, "nbuf");

	timeout.tv_sec = 1;
	timeout.tv_usec = 0;
	si.ic_cmd = NIOCSTIME;
	si.ic_len = sizeof timeout;
	si.ic_dp = (char *)&timeout;
	ioctl(if_fd, I_STR, (char *)&si);

	si.ic_cmd = NIOCSCHUNK;
	si.ic_len = sizeof chunksize;
	si.ic_dp = (char *)&chunksize;
	ioctl(if_fd, I_STR, (char *)&si);

	/* Configure the nit device, binding it to the proper
	   underlying interface, setting the snapshot length,
	   and setting nit_if-level flags. */
	strncpy(ifr.ifr_name, device, sizeof ifr.ifr_name);
	ifr.ifr_name[sizeof ifr.ifr_name - 1] = '\e0';
	si.ic_cmd = NIOCBIND;
	si.ic_len = sizeof ifr;
	si.ic_dp = (char *)&ifr;
	ioctl(if_fd, I_STR, (char *)&si);

	if (snaplen > 0) {
		si.ic_cmd = NIOCSSNAP;
		si.ic_len = sizeof snaplen;
		si.ic_dp = (char *)&snaplen;
		ioctl(if_fd, I_STR, (char *)&si);
	}

	if (if_flags != 0) {
		si.ic_cmd = NIOCSFLAGS;
		si.ic_len = sizeof if_flags;
		si.ic_dp = (char *)&if_flags;
		ioctl(if_fd, I_STR, (char *)&si);
	}

	/* Flush the read queue, to get rid of anything that accumulated
	   before the device reached its final configuration. */
	ioctl(if_fd, I_FLUSH, (char *)FLUSHR);
}
.if t .vs
.if t .ps
.ft R
.fi
.LP
Here is the skeleton of the packet reading loop from
.BR etherfind .
It illustrates how to cope with dismantling the headers the various
.SM NIT
components glue on.
.LP
.nf
.ft B
.if t .ps -2
.if t .vs -2
	while ((cc = read(if_fd, buf, chunksize)) >= 0) {
		register u_char	*bp = buf,
				*bufstop = buf + cc;

		/* Loop through each message in the chunk. */
		while (bp < bufstop) {
			register u_char		*cp = bp;
			struct nit_bufhdr	*hdrp;
			struct timeval		*tvp = NULL;
			u_long			drops = 0;
			u_long			pktlen;

			/* Extract information from the successive objects
			   embedded in the current message.  Which ones we
			   have depends on how we set up the stream (and
			   therefore on what command line flags were set).
			  
			   If snaplen is positive then the packet was truncated
			   before the buffering module saw it, so we must
			   obtain its length from the nit_if-level nit_iflen
			   header.  Otherwise the value in *hdrp suffices. */
			hdrp = (struct nit_bufhdr *)cp;
			cp += sizeof *hdrp;
			if (tflag) {
				struct nit_iftime	*ntp;

				ntp = (struct nit_iftime *)cp;
				cp += sizeof *ntp;

				tvp = &ntp->nh_timestamp;
			}
			if (dflag) {
				struct nit_ifdrops	*ndp;

				ndp = (struct nit_ifdrops *)cp;
				cp += sizeof *ndp;

				drops = ndp->nh_drops;
			}
			if (snaplen > 0) {
				struct nit_iflen	*nlp;

				nlp = (struct nit_iflen *)cp;
				cp += sizeof *nlp;

				pktlen = nlp->nh_pktlen;
			}
			else
				pktlen = hdrp->nhb_msglen;

			sp = (struct sample *)cp;
			bp += hdrp->nhb_totlen;

			/* Process the packet. */
		}
	}
.if t .vs
.if t .ps
.ft R
.fi
.SH FILES
.PD 0
.TP 20
.B /dev/nit
clone device instance referring to
.B nit_if
.PD
.SH "SEE ALSO"
.BR traffic (1C),
.BR read (2V),
.BR nit_if (4M),
.BR nit_pf (4M),
.BR nit_buf (4M),
.BR etherd (8C),
.BR etherfind (8C),
.BR rarpd (8C)
fine	\s-1MT_ISUT\s0		0x05	/* vax: unibus gcr */
#define	\s-1MT_ISCPC\s0		0x06	/* sun: Multibus tapemaster */
#define	\s-1MT_ISAR\s0		0x07	/* sun: Multibus archive */
#define	\s-1MT_ISSC\s0		0x08	/* sun: \s-1SCSI\s0 archive */
#define	\s-1MT_ISXY\s0		0x09	/* sun: Xylogics 472 */

#define	\s-1MT_ISSYSGEN11\s0	0x10	/* sun: SCSI Sysgen, QIC-11 only */
#define	\s-1MT_ISSYSGEN\s0		0x11	/* sun: SCSI Sysgen QIC-24/11 */
#define	\s-1MT_ISDEFAULT\s0		0x12	/* sun: SCSI default CCS */
#define	\s-1MT_ISCCS3  \s0		./share/man/man4/nit_buf.4m                                                                            755       0      12        11674  4424741460  10632                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nit_buf.4m 1.7 89/03/27 SMI;
.TH NIT_BUF 4M "29 December 1987"
.SH NAME
nit_buf \- STREAMS NIT buffering module
.SH CONFIG
.B
pseudo-device	nbuf
.SH SYNOPSIS
.nf
.B
#include <sys/ioctl.h>
.B
#include <net/nit_buf.h>
.B
ioctl(fd, \|\s-1I_PUSH\s0, \|"nbuf");
.fi
.SH DESCRIPTION
.IX "nit_buf module" "" "\fLnit_buf\fP, \s-1NIT\s0 buffering module"
.IX STREAMS nit_buf "" "\fLnit_buf\fP, \s-1NIT\s0 buffering module"
.LP
.B nit_buf
is a
.SM STREAMS
module that buffers incoming messages,
thereby reducing the number of system calls and associated overhead
required to read and process them.
Although designed to be used in conjunction
with the other components of
.SM NIT
(see
.BR nit (4P)),
.B nit_buf
is a general-purpose module and can be used
anywhere
.SM STREAMS
input buffering is required.
.SS "Read-side Behavior"
.B nit_buf
collects incoming
.SB M_DATA
and
.SB M_PROTO
messages into
.IR chunks ,
passing each chunk upward when either the chunk becomes full
or the current read timeout expires.
When a message arrives,
it is processed in two steps.
First,
the message is prepared for inclusion in a chunk,
and then it is added to the current chunk.
The following paragraphs discuss each step in turn.
.LP
Upon receiving a message from below,
.B nit_buf
immediately converts all leading
.SB M_PROTO
blocks in the message to
.SB M_DATA
blocks,
altering only the message type field and leaving the contents alone.
It then prepends a header to the converted message.
This header is defined as follows.
.RS
.ft B
.nf
struct nit_bufhdr {
	u_int	nhb_msglen;
	u_int	nhb_totlen;
};
.fi
.ft R
.RE
The first field of this header gives the length in bytes
of the converted message.
The second field gives the distance in bytes
from the start of the message in the current chunk
(described below)
to the start of the next message in the chunk;
the value reflects any padding necessary to insure
correct data alignment for the host machine
and includes the length of the header itself.
.LP
After preparing a message,
.B nit_buf
attempts to add it to the end of the current chunk,
using the chunk size and timeout values to govern the addition.
(The chunk size and timeout values are set and inspected
using the
.B ioctl
calls described below.)
If adding the new message would make the current chunk grow
larger than the chunk size,
.B nit_buf
closes off the current chunk,
passing it up to the next module in line,
and starts a new chunk,
seeding it with a zero-length message.
If adding the message would still make
the current chunk overflow,
the module passes it upward in an over-size chunk of its own.
Otherwise,
the module concatenates the message to the end of the current chunk.
.LP
To ensure that messages do not languish forever
in an accumulating chunk,
.B nit_buf
maintains a read timeout.
Whenever this timeout expires,
the module closes off the current chunk,
regardless of its length,
and passes it upward;
if no incoming messages have arrived,
the chunk passed upward will have zero length.
Whenever the module passes a chunk upward,
it restarts the timeout period.
These two rules insure that
.B nit_buf
minimizes the number of chunks it produces
during periods of intense message activity
and that it periodically disposes of all messages
during slack intervals.
.LP
.B nit_buf
handles other message types as follows.
Upon receiving an
.SB M_FLUSH
message specifying that the read queue be flushed,
the module does so,
clearing the currently accumulating chunk as well,
and passes the message on to the module or driver above.
It passes all other messages through unaltered to its upper neighbor.
.SS "Write-side Behavior"
.B nit_buf
intercepts
.SB M_IOCTL
messages for the
.IR ioctl s
described below.
Upon receiving an
.SB M_FLUSH
message specifying that the write queue be flushed,
the module does so and
passes the message on to the module or driver below.
The module passes all other messages through unaltered
to its lower neighbor.
.SH IOCTLS
.B nit_buf
responds to the following
.IR ioctl s.
.nr Xx \w'\s-1NIOCSCHUK\s0'u+3nu
.TP \n(Xxu
.SB NIOCSTIME
Set the read timeout value to the value referred to by the
.I "struct timeval"
pointer given as argument.
Setting the timeout value to zero
has the side-effect of forcing the chunk size to zero as well,
so that the module will pass all incoming messages upward
immediately upon arrival.
.TP
.SB NIOCGTIME
Return the read timeout in the
.I "struct timeval"
pointed to by the argument.
If the timeout has been cleared with the
.SB NIOCCTIME
.IR ioctl ,
return with an
.SM ERANGE
error.
.TP
.SB NIOCCTIME
Clear the read timeout,
effectively setting its value to infinity.
.TP
.SB NIOCSCHUNK
Set the chunk size to the value referred to by the
.I u_int
pointer given as argument.
.TP
.SB NIOCGCHUNK
Return the chunk size in the
.I u_int
pointed to by the argument.
.SH CAVEAT
The module name ``nbuf''
used in the system configuration file and as argument to the
.SB I_PUSH
.B ioctl
is provisional and subject to change.
.SH "SEE ALSO"
.BR nit (4P),
.BR nit_if (4M),
.BR nit_pf (4M)
LP
The following code fragments outline how to program
against parts./share/man/man4/nit_if.4m                                                                             755       0      12        13565  4424741460  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nit_if.4m 1.11 89/03/27 SMI;
.TH NIT_IF 4M "22 March 1989"
.SH NAME
nit_if \- STREAMS NIT device interface module
.SH CONFIG
.B
pseudo-device	snit
.SH SYNOPSIS
.nf
.ft B
#include <sys/file.h>
open("/dev/nit", mode);
.ft R
.fi
.SH DESCRIPTION
.IX "nit_if module" "" "\fLnit_if\fP, \s-1NIT\s0 device interface"
.IX STREAMS nit_if "" "\fLnit_if\fP, \s-1NIT\s0 device interface"
.LP
.B nit_if
is a
.SM STREAMS
pseudo-device driver that provides
.SM STREAMS
access to network interfaces.
It is designed to be used in conjunction
with the other components of
.SM NIT
(see
.BR nit (4P)),
but can be used by itself as a raw
.SM STREAMS
network interface.
.LP
.B nit_if
is an exclusive-open device
that is intended to be opened indirectly through the clone device;
.B /dev/nit
is a suitable instance of the clone device.
Before the stream resulting from opening an instance of
.B nit_if
may be used to read or write packets,
it must first be bound to a specific network interface,
using the
.SB NIOCSBIND
ioctl described below.
.SS "Read-side Behavior"
.B nit_if
copies leading prefixes of selected packets
from its associated network interface
and passes them up the stream.
If the
.SB NI_PROMISC
flag is set,
it passes along all packets;
otherwise it passes along only packets addressed
to the underlying interface.
.LP
The amount of data copied from a given packet depends on the current
.IR "snapshot length" ,
which is set with the
.SB NIOCSSNAP
ioctl
described below.
.LP
Before passing each packet prefix upward,
.B nit_if
optionally prepends one or more headers,
as controlled by the state of the flag bits set with the
.SB NIOCSFLAGS
.IR ioctl .
The driver collects headers into
.SB M_PROTO
message blocks,
with the headers guaranteed to be completely contained
in a single message block,
whereas the packet itself goes into
one or more
.SB M_DATA
message blocks.
.SS "Write-side Behavior"
.B nit_if
accepts packets from the module above it in the stream
and relays them to the associated network interface for transmission.
Packets must be formatted with the destination address in a leading
.SB M_PROTO
message block,
followed by the packet itself,
complete with link-level header,
in a sequence of
.SB M_DATA
message blocks.
The destination address must be expressed as a
.RB ` "struct sockaddr" '
whose
.I sa_family
field is
.BR \s-1AF_UNSPEC\s0
and whose
.I sa_data
field is a copy of the link-level header.
(See
.B sys/socket.h
for the definition of this structure.)
.LP
.B nit_if
processes
.SB M_IOCTL
messages as described below.
Upon receiving an
.SB M_FLUSH
message specifying that the write queue be flushed,
.B nit_if
does so and transfers the message to the read side of the stream.
It discards all other messages.
.SH IOCTLS
.B nit_if
responds to the following
.IR ioctl s,
as defined in
.BR net/nit_if.h .
It generates an
.SB M_IOCNAK
message for all others,
returning this message to the invoker along the
read side of the stream.
.TP 20
.SB SIOCGIFADDR
.TP 20
.SB SIOCADDMULTI
.TP 20
.SB SIOCDELMULTI
.B nit_if
passes these
ioctls on to the underlying interface's driver
and returns its response in a
.RB `  "struct ifreq" '
instance,
as defined in
.BR net/if.h .
(See the description of this
ioctl in
.BR if (4N)
for more details.)
.TP
.SB NIOCBIND
This ioctl
attaches the stream represented by its first argument
to the network interface designated by its third argument,
which should be a pointer to an
.I ifreq
structure whose
.I ifr_name
field names the desired interface.
See
.B net/if.h
for the definition of this structure.
.TP
.SB NIOCSSNAP
Set the current snapshot length to the value
given in the
.I u_long
pointed to by the
.IR ioctl 's
final argument.
.B nit_if
interprets a snapshot length value of zero as meaning infinity,
so that it will copy all selected packets in their entirety.
It constrains positive snapshot lengths to be at least
the length of an Ethernet header,
so that it will pass at least the link-level header
of all selected packets to its upstream neighbor.
.TP
.SB NIOCGSNAP
Returns the current snapshot length
for this device instance in the
.I u_long
pointed to by the
.IR ioctl 's
final argument.
.TP
.SB NIOCSFLAGS
.B nit_if
recognizes the following flag bits,
which must be given in the
.I u_long
pointed to by the
.IR ioctl 's
final argument.
This set may be augmented in future releases.
All but the
.SB NI_PROMISC
bit control the addition of headers that precede the packet body.
These headers appear in the order given below,
with the last-mentioned enabled header adjacent to the packet body.
.RS
.TP 20
.SB NI_PROMISC
Requests that the underlying interface
be set into promiscuous mode and that all packets
that the interface receives be passed up through the stream.
.B nit_if
only honors this bit for the super-user.
.TP
.SB NI_TIMESTAMP
Prepend to each selected packet a header
containing the packet arrival time expressed
as a
.RB `  "struct timeval" '.
.TP
.SB NI_DROPS
Prepend to each selected packet a header containing
the cumulative number of packets that this instance of
.B nit_if
has dropped because of flow control requirements or resource exhaustion.
The header value is expressed as a
.IR u_long .
Note: it accounts only for events occurring within
.BR nit_if ,
and does not count packets dropped at the network interface level
or by upstream modules.
.TP
.SB NI_LEN
Prepend to each selected packet a header containing the packet's
original length
(including link-level header),
as it was before being trimmed to the snapshot length.
The header value is expressed as a
.IR u_long .
.RE
.TP 20
.SB NIOCGFLAGS
Returns the current state of the flag bits
for this device instance in the
.I u_long
pointed to by the
.IR ioctl 's
final argument.
.SH FILES
.PD 0
.TP 20
.B /dev/nit
clone device instance referring to
.B nit_if
device
.TP
.B net/nit_if.h
header file containing definitions for the
.IR ioctl s
and packet headers described above.
.PD
.SH "SEE ALSO"
.BR clone (4),
.BR nit (4P),
.BR nit_buf (4M),
.BR nit_pf (4M)
ruct nit_ifdrops	*ndp;

				ndp = (struct nit_ifdrops *)cp;
				cp += sizeof *ndp;

				drops = ndp->nh_drops;
			}
			if (snaplen > 0) {
	./share/man/man4/nit_pf.4m                                                                             755       0      12        30724  4424741460  10460                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nit_pf.4m 1.12 89/03/27 SMI;
.TH NIT_PF 4M "29 December 1987"
.SH NAME
nif_pf \- STREAMS NIT packet filtering module
.SH CONFIG
.B
pseudo-device	pf
.SH SYNOPSIS
.nf
.B
#include <sys/ioctl.h>
.B
#include <net/nit_pf.h>
.sp 0.25v
	\fBioctl(\fP\fIfd\fP\fB, \|\s-1I_PUSH\s0, \|"pf");\fP
.fi
.SH DESCRIPTION
.IX "nit_pf module" "" "\fLnit_pf\fP, \s-1NIT\s0 packet filtering module"
.IX STREAMS nit_pf "" "\fLnit_pf\fP, \s-1NIT\s0 packet filtering module"
.LP
.B nit_pf
is a
.SM STREAMS
module that subjects messages arriving on its read queue
to a packet filter
and passes only those messages that the filter accepts on
to its upstream neighbor.
Such filtering can be very useful for user-level protocol implementations
and for networking monitoring programs
that wish to view only specific types of events.
.SS "Read-side Behavior"
.B nit_pf
applies the current packet filter to all
.SB M_DATA
and
.SB M_PROTO
messages arriving on its read queue.
The module prepares these messages for examination
by first skipping over all leading
.SB M_PROTO
message blocks to arrive at the beginning of the message's data portion.
If there is no data portion,
.B nit_pf
accepts the message and passes it along to its upstream neighbor.
Otherwise,
the module ensures that the part of the message's data
that the packet filter might examine
lies in contiguous memory,
calling the
.I pullupmsg
utility routine if necessary to force contiguity.
(Note:
this action destroys any sharing relationships
that the subject message might have had with other messages.)
Finally,
it applies the packet filter to the message's data,
passing the entire message upstream to the next module
if the filter accepts,
and discarding the message otherwise.
See
.SM "PACKET FILTERS"
below for details on how the filter works.
.LP
If there is no packet filter yet in effect,
the module acts as if the filter exists but does nothing,
implying that all incoming messages are accepted.
.SM IOCTLS
below describes how to associate a packet filter
with an instance of
.BR nit_pf .
.LP
.B nit_pf
handles other message types as follows.
Upon receiving an
.SB M_FLUSH
message specifying that the read queue be flushed,
the module does so,
and passes the message on to its upstream neighbor.
It passes all other messages through unaltered to its upper neighbor.
.SS "Write-side Behavior"
.B nit_pf
intercepts
.SB M_IOCTL
messages for the
.IR ioctl
described below.
Upon receiving an
.SB M_FLUSH
message specifying that the write queue be flushed,
the module does so and
passes the message on to the module or driver below.
The module passes all other messages through unaltered
to its lower neighbor.
.SH IOCTLS
.LP
.B nit_pf
responds to the following
.IR ioctl .
.nr Xx \w'\fB\s-1NIOCSETF\s0\fP'u+(3n)u
.TP \n(Xxu
.SB NIOCSETF
This
.I ioctl
directs the module to replace its current packet filter,
if any,
with the filter specified by the
.RB ` "struct packetfilt" '
pointer named by its final argument.
This structure is defined in
.B <net/packetfilt.h>
as
'\"	Ugh! Nesting shouldn't be required here!
'\"
'\"	The formatting here is ugly and should be fixed
'\"	(and would be if I had any good ideas...).
.RS
.RS
.nf
.ft B
.if t .ta \w'stru'u  +\w'u_short   'u  +\w'Pf_FilterLen;   'u
.if n .ta \w'stru'u  +\w'u_short  'u  +\w'Pf_FilterLen;  'u
struct packetfilt {
	u_char	Pf_Priority;	\fI/* priority of filter */\fP
	u_char	Pf_FilterLen;	\fI/* # of cmds in list */\fP
	u_short	Pf_Filter[\s-1ENMAXFILTERS\s0];
					\fI/* filter command list */\fP
};
.DT
.ft R
.fi
.RE
.RE
.br
.ne 8
.IP
The
.I Pf_Priority
field is included only for compatibility
with other packet filter implementations
and is otherwise ignored.
The packet filter itself is specified in the
.I Pf_Filter
array as a sequence of two-byte commands,
with the
.I Pf_FilterLen
field giving the number of commands in the sequence.
This implementation restricts
the maximum number of commands in a filter
.RB ( \s-1ENMAXFILTERS\s0 )
to 40.
The next section describes the available commands and their semantics.
'\"
.SH "PACKET FILTERS"
.LP
A packet filter consists of the filter command list length
(in units of
.IR u_short s),
and the filter command list itself.
(The priority field mentioned above
is ignored in this implementation.)
Each filter command list specifies a sequence of actions
that operate on an internal stack of
.IR u_short s
(``shortwords'').
Each shortword of the command list specifies one of the actions
.SM ENF_PUSHLIT\s0,
.SM ENF_PUSHZERO\s0,
or
.SM ENF_PUSHWORD\s0\c
.RI + n ,
which respectively push the next shortword of the command list,
zero,
or shortword
.I n
of the subject message on the stack,
and a binary operator
from the set {
.SM ENF_EQ\s0,
.SM ENF_NEQ\s0,
.SM ENF_LT\s0,
.SM ENF_LE\s0,
.SM ENF_GT\s0,
.SM ENF_GE\s0,
.SM ENF_AND\s0,
.SM ENF_OR\s0,
.SM ENF_XOR
}
which then operates on the top two elements of the stack
and replaces them with its result.
When both an action and operator are specified in the same shortword,
the action is performed followed by the operation.
.LP
The binary operator can also be from the set {
.SM ENF_COR\s0,
.SM ENF_CAND\s0,
.SM ENF_CNOR\s0,
.SM ENF_CNAND\s0
}.
These are ``short-circuit'' operators,
in that they terminate the execution of the filter immediately
if the condition they are checking for is found,
and continue otherwise.
All pop two elements from the stack and compare them for equality;
.SM ENF_CAND
returns false if the result is false;
.SM ENF_COR
returns true if the result is true;
.SM ENF_CNAND
returns true if the result is false;
.SM ENF_CNOR
returns false if the result is true.
Unlike the other binary operators,
these four do not leave a result on the stack,
even if they continue.
.LP
The short-circuit operators should be used when possible,
to reduce the amount of time spent evaluating filters.
When they are used,
you should also arrange the order of the tests
so that the filter will succeed or fail as soon as possible;
for example,
checking the
.SM IP
destination field of a
.SM UDP
packet is more likely to indicate failure than the packet type field.
.LP
The
special action
.SM ENF_NOPUSH
and the special operator
.SM ENF_NOP
can be used to only
perform the binary operation or to only push a value on the stack.
Since both are (conveniently) defined to be zero,
indicating only an action actually specifies the action followed by
.SM ENF_NOP\s0,
and indicating only an operation actually specifies
.SM ENF_NOPUSH
followed by the operation.
.LP
After executing the filter command list,
a non-zero value (true) left on top of the stack
(or an empty stack) causes the incoming
packet to be accepted
and a zero value (false) causes the packet to be rejected.
(If the filter exits as the result of a short-circuit operator,
the top-of-stack value is ignored.)
Specifying an undefined operation or action in the command list
or performing an illegal operation or action
(such as pushing a shortword offset past the end of the packet
or executing a binary operator with fewer than two shortwords on the stack)
causes a filter to reject the packet.
'\"
'\" The notion of priority is currently unimplemented. **********
.\".LP
.\"In an attempt to deal with the problem of
.\"overlapping and/or conflicting packet filters,
.\"the filters for each open
.\".I enet
.\"file are ordered by the driver
.\"according to their priority
.\"(lowest priority is 0, highest is 255).
.\"When processing incoming Ethernet packets,
.\"filters are applied according to their priority
.\"(from highest to lowest)
.\"and for identical priority values
.\"according to their relative ``busyness''
.\"(the filter that has previously matched the most packets is checked first)
.\"until one or more filters accept the packet
.\"or all filters reject it and it is discarded.
.\".LP
.\"Filters at a priority of 2 or higher are called ``high priority''
.\"filters.
.\"Once a packet is delivered to one of these ``high priority''
.\".I enet
.\"files,
.\"no further filters are examined,
.\"that is,
.\"the packet is delivered only
.\"to the first
.\".I enet
.\"file with a ``high priority'' filter that accepts the packet.
.\"A packet may be delivered to more than one filter
.\"with a priority below 2;
.\"this might be useful,
.\"for example, in building replicated programs.
.\"However,
.\"the use of low-priority filters imposes an additional cost on the system,
.\"as these filters each must be checked against all packets
.\"not accepted by a high-priority filter.
.\".LP
.\"The packet filter for an
.\".I enet
.\"file is initialized
.\"with length 0 at priority 0 by
.\".BR open (2V),
.\"and hence by default accepts all packets
.\"that no ``high priority'' filter is interested in.
.\".LP
.\"Priorities should be assigned so that,
.\"in general,
.\"the more packets a filter is expected to match,
.\"the higher its priority.
.\"This will prevent a lot of needless checking
.\"of packets against filters that aren't likely to match them.
'\" End of commented out section **********
'\"
.SH EXAMPLES
.LP
The reverse
.SM ARP
daemon program
.RB ( rarpd (8C))
uses code similar to the following fragment to construct a filter
that rejects all but
.SM RARP
packets.
That is,
is accepts only packets whose Ethernet type field
has the value
.SM ETHERTYPE_REVARP\s0.
.LP
.nf
.ft B
	struct ether_header eh;		\fI/* used only for offset values */\fP
	struct packetfilt pf;
	register u_short *fwp = pf.Pf_Filter;
	u_short offset;

	\fI/*
	 * Set up filter.  Offset is the displacement of the Ethernet
	 * type field from the beginning of the packet in units of
	 * u_shorts.
	 */\fP
.br
.ne 10
	offset = ((u_int) &eh.ether_type - (u_int) &eh.ether_dhost) /
sizeof (u_short);
	*fwp++ = \s-1ENF_PUSHWORD\s0 + offset;
	*fwp++ = \s-1ENF_PUSHLIT\s0;
	*fwp++ = htons(\s-1ETHERTYPE_REVARP\s0);
	*fwp++ = \s-1ENF_EQ\s0;
	pf.Pf_FilterLen = fwp - &pf.Pf_Filter[0];
.ft R
.fi
.LP
This filter can be abbreviated by taking advantage
of the ability to combine actions and operations:
.LP
.nf
	.\|.\|.
.ft B
	*fwp++ = \s-1ENF_PUSHWORD\s0 + offset;
	*fwp++ = \s-1ENF_PUSHLIT\s0 | \s-1ENF_EQ\s0;
	*fwp++ = htons(\s-1ETHERTYPE_REVARP\s0);
.ft R
	.\|.\|.
.fi
'\"
'\" XXX: These examples should be revised to better fit the Sun environment.
'\"      If no alternatives come to hand, it'd probably be best simply to
'\"      drop the remaining examples.
'\"
'\"      Done!                                       ****************
.\".LP
.\"The following filter would accept all incoming
.\".I pup
.\"packets on a 3mb Ethernet
.\"with Pup types in the range 1-0200:
.\".LP
.\".nf
.\".ft B
.\".ta \w'struct 'u \w'struct ENF_PUSHWORD+8, ENF_PUSHLIT, 0xFF00, ENF_AND,      'u
.\"struct packetfilt f = {
.\"	10, 19,	/* priority and length */
.\"	\s-1ENF_PUSHWORD\s0+1, \s-1ENF_PUSHLIT\s0, 2, \s-1ENF_EQ\s0,	/* packet type \s-1PUP\s0 */
.\"	\s-1ENF_PUSHWORD\s0+3, \s-1ENF_PUSHLIT\s0, 0x\s-1FF\s000, \s-1ENF_AND\s0,	/* mask hi byte */
.\"	\s-1ENF_PUSHZERO\s0, \s-1ENF_GT\s0,	/* PupType > 0 */
.\"	\s-1ENF_PUSHWORD\s0+3, \s-1ENF_PUSHLIT\s0, 0x\s-1FF\s000, \s-1ENF_AND\s0,	/* mask hi byte */
.\"	\s-1ENF_PUSHLIT\s0, 0100, \s-1ENF_LE\s0,	/* PupType <= 0100 */
.\"	\s-1ENF_AND\s0,	/* 0 < PupType <= 0100 */
.\"	\s-1ENF_AND\s0	/* && packet type == \s-1PUP\s0 */
.\"};
.\".DT
.\".ft R
.\".fi
.\".LP
.\"Note:
.\"shortwords,
.\"such as the packet type field,
.\"are byte-swapped and so the literals you compare them to
.\"must be byte-swapped.
.\"Also,
.\"although for this example the word offsets are constants,
.\"code that must run with either 3mb or 10mb Ethernets must use
.\"offsets that depend on the device type.
.\".LP
.\"A different example shows the use of ``short-circuit'' operators
.\"to create a more efficient filter.
.\"This one accepts Pup packets
.\"(on a 3Mbit Ethernet)
.\"with a Socket field of 12345.
.\"Note:
.\"we check the Socket field before the packet type field,
.\"since in most packets the Socket is not likely to match.
.\".sp
.\".nf
.\".ta \w'struct 'u \w'struct ENF_PUSHWORD+3, ENF_PUSHLIT | ENF_CAND, 12345,      'u
.\".ft B
.\"struct packetfilt f = {
.\"	10, 9,	/* priority and length */
.\"	\s-1ENF_PUSHWORD\s0+7, \s-1ENF_PUSHLIT\s0 | \s-1ENF_CAND\s0, 0,	/* Hi word of socket */
.\"	\s-1ENF_PUSHWORD\s0+8, \s-1ENF_PUSHLIT\s0 | \s-1ENF_CAND\s0, 12345,	/* Lo word of socket */
.\"	\s-1ENF_PUSHWORD\s0+1, \s-1ENF_PUSHLIT\s0 | \s-1ENF_CAN\s0D, 2	/* packet type == Pup */
.\"};
.\".ft R
.\".DT
.\".fi
'\" End of commented out section **********
'\"
.SH WARNINGS
.LP
The module name
.RB ` pf '
used in the system configuration file and as argument to the
.SB I_PUSH
.I ioctl
is provisional and subject to change.
.LP
The
.I Pf_Priority
field of the
.I packetfilt
structure is likely to be removed.
.SH "SEE ALSO"
.BR inet (4F),
.BR nit (4P),
.BR nit_buf (4M),
.BR nit_if (4M)
oes so and
passes the message on to the modu./share/man/man4/null.4                                                                                755       0      12          742  4424741460   7733                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)null.4 1.12 89/03/27 SMI; from UCB 4.1
.TH NULL 4 "24 November 1987"
.SH NAME
null \- data sink
.SH CONFIG
None; included with standard system.
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>

open("/dev/null", \fImode\fB);
.ft R
.fi
.SH DESCRIPTION
.IX  "null device"  ""  "\fLnull\fP \(em null device"
Data written on the
.B null
special file is discarded.
.LP
Reads from the
.B null
special file always return an end-of-file indication.
.SH FILES
.PD 0
.TP 20
.B /dev/null
.PD
s     E  vme32d32.4s   ./share/man/man4/pp.4                                                                                  755       0      12         1535  4424741460   7421                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pp.4	1.9 89/03/27 SMI; from Matt Lennon
.TH PP 4  "25 March 1989"
.SH NAME
pp \- Centronics-compatible parallel printer port
.SH "CONFIG \(em Sun386i SYSTEMS"
.ft B
.nf
device pp0 at obio ? csr 0x378 irq 15 priority 2
.fi
.ft R
.SH "CONFIG \(em SUN-3x SYSTEMS"
.ft B
.nf
device pp0 at obio ? csr 0x6f000000 priority 1
.fi
.ft R
.LP
This synopsis line should be used to generate a kernel
for Sun-3/80 systems only.
.SH AVAILABILITY
Sun386i and Sun-3/80 systems only.
.SH DESCRIPTION
.IX "pp Sun386i device" "" "\fLpp\fP, Sun386i parallel printer port" 
.LP
This device driver provides an interface to the Sun386i
and Sun-3/80 systems'
on-board Centronics-compatible parallel printer port. 
It supports most standard
PC printers with Centronics interfaces.
.SH FILES
.B /dev/pp0
.SH DIAGNOSTICS
.B pp*: printer not online
.br
.B pp*: printer out of paper
 <= 0100 */
.\"	\s-1ENF_AND\s0,	/* 0 < PupType <= 0100 */
.\"	\s-1ENF_AND\s0	/* && packet type == \s-1PUP\s0 */
.\"};
.\".DT
.\".ft R
.\".fi
.\".LP
.\"Note:
.\"sho./share/man/man4/pty.4                                                                                 755       0      12        21353  4424741461   7637                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pty.4 1.22 89/03/27 SMI;
.TH PTY 4 "22 March 1989"
.SH NAME
pty \- pseudo-terminal driver
.SH CONFIG
.B pseudo-device pty\fIn\fP
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/ttyp\fIn\fB", mode);
open("/dev/ptyp\fIn\fB", mode);
.ft R
.fi
.SH DESCRIPTION
.IX  "pty device"  ""  "\fLpty\fP \(em pseudo-terminal driver"  ""  PAGE START
.LP
The
.B pty
driver provides support for a pair of devices collectively
known as a
.IR pseudo-terminal .
The two devices comprising a pseudo-terminal
are known as a
.I controller
and a
.IR slave .
The slave device distinguishes between the
.B B0
baud rate and other baud rates specified in the
.B c_cflag
word of the
.B termios
structure, and the
.SB CLOCAL
flag in that word.
It does not support any of the other
.BR termio (4)
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure and by the
.SM
.BR IGNBRK\*S ,
.SM
.BR IGNPAR\*S ,
.SM
.BR PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure, as these functions apply only to asynchronous serial
ports.  All other
.BR termio (4)
functions must be performed by
.SM STREAMS
modules pushed atop the driver; when a slave device is opened, the
.BR ldterm (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules are automatically pushed on top of the stream, providing the
standard
.BR termio (4)
interface.
.LP
Instead of having a hardware interface and associated hardware
that supports the terminal functions, the functions
are implemented by another process manipulating the controller device of
the pseudo-terminal.
.LP
The controller and the slave devices of the pseudo-terminal are tightly
connected.
Any data written on the controller device is given to the slave device as
input, as though it had been received from a hardware interface.
Any data written on the slave terminal can be read from the controller
device (rather than being transmitted from a
.SM UART\s0).
.LP
In configuring, if no optional ``count'' is given in
the specification, 16 pseudo-terminal pairs are configured.
.SH IOCTLS
The standard set of
.B termio
.BR ioctl s
are supported by the slave device.  None of the bits in the
.B c_cflag
word have any effect on the pseudo-terminal, except that if the baud
rate is set to
.BR B0 ,
it will appear to the process on the controller device as if the last
process on the slave device had closed the line; thus, setting the baud
rate to
.B B0
has the effect of ``hanging up'' the pseudo-terminal, just as it has
the effect of ``hanging up'' a real terminal.
.LP
There is no notion of ``parity'' on a pseudo-terminal, so none of the
flags in the
.B c_iflag
word that control the processing of parity errors have any effect.
Similarly, there is no notion of a ``break'', so none of the flags
that control the processing of breaks, and none of the
.BR ioctl s
that generate breaks, have any effect.
.LP
Input flow control is automatically performed; a process that
attempts to write to the controller device will be blocked if too much
unconsumed data is buffered on the slave device.  The input flow
control provided by the
.SB IXOFF
flag in the
.B c_iflag
word is not supported.
.LP
The delays specified in the
.B c_oflag
word are not supported.
.LP
As there are no modems involved in a pseudo-terminal, the
.BR ioctl s
that return or alter the state of modem control lines are silently
ignored.
.LP
On Sun systems, an additional
.B ioctl
is provided:
.TP
.SB TIOCCONS
The argument is ignored.
All output that would normally be sent to the console
(either from programs writing to
.B /dev/console
or from kernel printouts) is redirected so that it is written
to the pseudo-terminal instead.
.LP
A few special
.BR ioctl s
are provided on the controller devices of pseudo-terminals to provide
the functionality needed by applications programs to emulate
real hardware interfaces:
.TP
.SB TIOCSTOP
.IX  "ioctls for terminals"  "TIOCSTOP"  "\fLioctl\fP's for terminals"  "\fLTIOCSTOP\fP \(em stop output (like control-S)"
.IX  "TIOCSTOP stop output (like control-S)"  ""  "\fLTIOCSTOP\fP \(em stop output (like control-S)"
.IX  "stop output (like control-S) ioctl"  ""  "stop output (like control-S) \fLioctl\fP \(em \fLTIOCSTOP\fP"
The argument is ignored.
Output to the pseudo-terminal is suspended, as if a
.SB STOP
character had been typed.
.TP
.SB TIOCSTART
.IX  "ioctls for terminals"  "TIOCSTART"  "\fLioctl\fP's for terminals"  "\fLTIOCSTART\fP \(em start output (like control-Q)"
.IX  "TIOCSTART start output (like control-Q)"  ""  "\fLTIOCSTART\fP \(em start output (like control-Q)"
.IX  "start output (like control-Q) ioctl"  ""  "start output (like control-Q) \fLioctl\fP \(em \fLTIOCSTART\fP"
The argument is ignored.
Output to the pseudo-terminal is restarted, as if a
.SB START
character had been typed.
.TP
.SB TIOCPKT
.IX  "ioctls for terminals"  "TIOCPKT"  "\fLioctl\fP's for terminals"  "\fLTIOCPKT\fP \(em set/clear packet mode (pty)"
.IX  "TIOCPKT set/clear packet mode (pty)"  ""  "\fLTIOCPKT\fP \(em set/clear packet mode (pty)"
.IX  set/clear "packet mode (pty) ioctl \(em \fLTIOCPKT\fP"
The argument is a pointer to an
.BR int .
If the value of the
.B int
is non-zero,
.I packet
mode is enabled; if the value of the
.B int
is zero,
packet mode is disabled.
When a pseudo-terminal is in packet mode, each subsequent
.BR read (2V)
from the controller device will return data written on the slave device
preceded by a zero byte (symbolically defined as
.SM
.BR TIOCPKT_DATA\*S ),
or a single byte reflecting control
status information.  In the latter case, the byte is an inclusive-or
of zero or more of the bits:
.RS
.TP 20
.SB TIOCPKT_FLUSHREAD
whenever the read queue for the terminal is flushed.
.TP
.SB TIOCPKT_FLUSHWRITE
whenever the write queue for the terminal is flushed.
.TP
.SB TIOCPKT_STOP
whenever output to the terminal is stopped using ^S.
.TP
.SB TIOCPKT_START
whenever output to the terminal is restarted.
.TP
.SB TIOCPKT_DOSTOP
whenever
.SM XON/XOFF
flow control is enabled after being disabled; it is
considered ``enabled'' when the
.SB IXON
flag in the
.B c_iflag
word is set, the
.SB VSTOP
member of the
.B c_cc
array is ^S and the
.SB VSTART
member of the
.B c_cc
array is ^Q.
.TP
.SB TIOCPKT_NOSTOP
whenever
.SM XON/XOFF
flow control is disabled after being enabled.
.RE
.IP
This mode is used by
.BR rlogin (1C)
and
.BR rlogind (8C)
to implement a remote-echoed, locally ^S/^Q flow-controlled
remote login with proper back-flushing of output when interrupts
occur; it can be
used by other similar programs.
.TP
.SB TIOCREMOTE
.IX  "ioctls for terminals"  "TIOCREMOTE"  "\fLioctl\fP's for terminals"  "\fLTIOCREMOTE\fP \(em remote input editing"
.IX  "TIOCREMOTE remote input editing"  ""  "\fLTIOCREMOTE\fP \(em remote input editing"
.IX  "remote input editing ioctl"  ""  "remote input editing \fLioctl\fP \(em \fLTIOCREMOTE\fP"
The argument is a pointer to an
.BR int .
If the value of the
.B int
is non-zero,
.I remote
mode is enabled; if the value of the
.B int
is zero,
remote mode is disabled.
This mode can be enabled or disabled independently of packet mode.
When a pseudo-terminal is in remote mode,
input to the slave device of the pseudo-terminal is flow controlled and not
input edited (regardless of the mode the slave side of the pseudo-terminal).
Each write to the controller device produces
a record boundary for the process reading the slave device.  In
normal usage, a write of data is like the data typed as a line
on the terminal; a write of 0 bytes is like typing an
.SB EOF
character.
Note: this means that a process writing to a pseudo-terminal controller in
.I remote
mode must keep track of line boundaries, and write only one line at a time to
the controller.  If, for example, it were to buffer up several
.SB NEWLINE
characters and write them to the controller with one
.BR write(\|) ,
it would appear to a process reading from the slave as if a single line
containing several
.SB NEWLINE
characters had been typed (as if, for example, a user had typed the
.SB LNEXT
character before typing all but the last of those
.SB NEWLINE
characters).
Remote mode can be used when doing remote line
editing in a window manager, or whenever flow controlled input
is required.
.LP
The
.BR ioctl s
.SM
.BR TIOCGWINSZ\*S ,
.SM
.BR TIOCSWINSZ\*S ,
and, on Sun systems,
.SM
.BR TIOCCONS\*S ,
can be performed on the controller device of a pseudo-terminal; they have the
same effect as when performed on the slave device.
.br
.ne 8
.SH FILES
.PD 0
.TP 20
.B /dev/pty[p-s][0-9a-f]
pseudo-terminal controller devices
.TP
.B /dev/tty[p-s][0-9a-f]
pseudo-terminal slave devices
.TP
.B /dev/console
.PD
.SH "SEE ALSO"
.BR rlogin (1C),
.BR termio (4),
.BR ldterm (4M),
.BR ttcompat (4M),
.BR rlogind (8C)
.SH BUGS
It is apparently not possible to send an
.SB EOT
by writing zero
bytes in
.SB TIOCREMOTE
mode.
.IX  "pty device"  ""  "\fLpty\fP \(em pseudo-terminal driver"  ""  PAGE END
had been typed.
.TP
.SB TIOCSTART
.IX  "ioctls for terminals"  "TIOCSTART"  "\fLioctl\fP's for terminals"  "\fLTIOCSTART\fP \(em start output (like control-Q)"
.IX  "TIOCSTART start output (like control-Q)"  ""  "\fLTIOCSTART\fP \(em start output (like control-Q)"
.IX  "start ./share/man/man4/root.4s                                                                               755       0      12         2620  4424741461  10145                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)root.4s	1.8 89/03/27 SMI;
.TH ROOT 4S "19 February 1988"
.SH NAME
root \- pseudo-driver for Sun386i root disk
.SH CONFIG
.B pseudo-device rootdev
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "root Sun386i device" "" "\fLroot\fP, Sun386i root disk device"
.LP
The
.B root
pseudo-driver provides indirect, device-independent access to the root disk
on a diskful Sun workstation. The root disk is the disk where
the mounted root partition resides - typically the disk from which
the system was booted.
.LP
The intent of the
.B root
device is to allow uniform access to the partitions on the root disk,
regardless of the disk's controller type or unit number.
For example, the following version of
.B /etc/fstab
will work for any disk
(assuming the disk has the standard partitions and filesystems):
.LP
.RS
.nf
.ft B
/dev/roota /       4.2 rw 1 1
/dev/rootg /usr    4.2 ro 1 2
/dev/rooth /export 4.2 rw 1 3
.ft
.fi
.RE
.LP
When the root device is opened, the open and all subsequent operations on
that device
.RB ( read (2V),
.BR write (2V),
.BR ioctl (2),
.BR close (2))
are redirected to the real disk.  Therefore,
all device-dependent operations on a particular disk are still accessible
via the root device (see
.BR dkio (4S)).
.SH FILES
.PD 0
.TP 20
.B /dev/root[a-h]
block partitions
.TP
.B /dev/rroot[a-h]
raw partitions
.PD
.SH "SEE ALSO"
.BR fstab (5),
.BR sd (4S),
.BR open (2V),
.BR dkio (4S),
abled; it is
considered ``enabled'' when the
.SB IXON
flag in the
.B c_iflag
word is set, the
.SB VSTOP
member o./share/man/man4/routing.4n                                                                            755       0      12        11367  4424741461  10674                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)routing.4n 1.18 89/03/27 SMI;
.TH ROUTING 4N "9 October 1987"
.SH NAME
routing \- system supporting for local network packet routing
.SH DESCRIPTION
.IX  "routing device"  ""  "\fLrouting\fR \(em local network packet routing"  ""  PAGE START
.IX  "packet routing device"  ""  "packet routing device \(em \fLrouting\fR"  ""  PAGE START
.IX  "network packet routing device"  ""  "network packet routing device \(em \fLrouting\fR"  ""  PAGE START
.LP
The network facilities provided general packet routing,
leaving routing table maintenance to applications processes.
.LP
A simple set of data structures comprise a ``routing table''
used in selecting the appropriate network interface when
transmitting packets.  This table contains a single entry for
each route to a specific network or host.  A user process,
the routing daemon, maintains this data base with the aid
of two socket specific
.BR ioctl (2)
.IX  "ioctls for sockets"  "SIOCADDRT"  "\fLioctl\fR's for sockets"  "\fLSIOCADDRT\fR \(em add route"
.IX  "SIOCADDRT add route"  ""  "\fLSIOCADDRT\fR \(em add route"
.IX  "add route ioctl"  ""  "add route \fLioctl\fR \(em \fLSIOCADDRT\fR"
.IX  "routing ioctls"  "SIOCADDRT"  "routing \fLioctl\fR's"  "\fLSIOCADDRT\fR \(em add route"
.IX  "packet routing ioctls"  "SIOCADDRT"  "packet routing \fLioctl\fR's"  "\fLSIOCADDRT\fR \(em add route"
.IX  "ioctls for sockets"  "SIOCDELRT"  "\fLioctl\fR's for sockets"  "\fLSIOCDELRT\fR \(em delete route"
.IX  "SIOCDELRT delete route"  ""  "\fLSIOCDELRT\fR \(em delete route"
.IX  "delete route ioctl"  ""  "delete route \fLioctl\fR \(em \fLSIOCDELRT\fR"
.IX  "routing ioctls"  "SIOCDELRT"  "routing \fLioctl\fR's"  "\fLSIOCDELRT\fR \(em delete route"
.IX  "packet routing ioctls"  "SIOCDELRT"  "packet routing \fLioctl\fR's"  "\fLSIOCDELRT\fR \(em delete route"
commands,
.SB SIOCADDRT
and
.BR \s-1SIOCDELRT\s0 .
The commands allow
the addition and deletion of a single routing
table entry, respectively.  Routing table manipulations may
only be carried out by super-user.
.LP
A routing table entry has the following form, as defined
in
.BR <net/route.h> :
.RS
.nf
.ft B
struct rtentry {
	u_long	rt_hash;
	struct	sockaddr rt_dst;
	struct	sockaddr rt_gateway;
	short	rt_flags;
	short	rt_refcnt;
	u_long	rt_use;
	struct	ifnet *rt_ifp;
};
.ft R
.fi
.RE
with
.I rt_flags
defined from:
.RS
.nf
.ft B
.\"._d
#define	\s-1RTF_UP\s0		0x1		/* route usable */
#define	\s-1RTF_GATEWAY\s0	0x2		/* destination is a gateway */
#define	\s-1RTF_HOST\s0	0x4		/* host entry (net otherwise) */
.ft R
.fi
.RE
.LP
Routing table entries come in three flavors: for a specific
host, for all hosts on a specific network, for any destination
not matched by entries of the first two types (a wildcard route).
When the system
is booted, each network interface autoconfigured
installs a routing table entry when it wishes to have packets
sent through it.  Normally the interface specifies the route
through it is a ``direct'' connection to the destination host
or network.  If the route is direct, the transport layer of
a protocol family usually requests the packet be sent to the
same host specified in the packet.  Otherwise, the interface
may be requested to address the packet to an entity different
from the eventual recipient (that is, the packet is forwarded).
.LP
Routing table entries installed by a user process may not specify
the hash, reference count, use, or interface fields; these are filled
in by the routing routines.  If
a route is in use when it is deleted
.RI ( rt_refcnt
is non-zero),
the resources associated with it will not
be reclaimed until all references to it are removed.
.LP
The routing code returns
.SM EEXIST
if requested to duplicate an existing entry,
.SM ESRCH
if requested to delete a non-existent entry, or
.SM ENOBUFS
if insufficient resources were available
to install a new route.
.LP
User processes read the routing tables through the
.B /dev/kmem
device.
.LP
The
.I rt_use
field contains the number of packets sent along the route.
This value is used to select among multiple
routes to the same destination.  When multiple routes to
the same destination exist, the least used route is selected.
.LP
A wildcard routing entry is specified with a zero
destination address value.  Wildcard routes are used
only when the system fails to find a route to the
destination host and network.  The combination of wildcard
routes and routing redirects can provide an economical
mechanism for routing traffic.
.IX  "routing device"  ""  "\fLrouting\fR \(em local network packet routing"  ""  PAGE END
.IX  "packet routing device"  ""  "packet routing device \(em \fLrouting\fR"  ""  PAGE END
.IX  "network packet routing device"  ""  "network packet routing device \(em \fLrouting\fR"  ""  PAGE END
.SH FILES
.PD 0
.TP 20
.B /dev/kmem
.PD
.SH "SEE ALSO
.BR ioctl (2),
.BR route (8C),
.BR routed (8C)
LSIOCDELRT\fR \(em delete route"
commands,
.SB SIOCADDRT
and
.BR \s-1SIOCDELRT\s0 .
The commands allow
the addition and deletion of a single routing
table entry, respectively.  Routing table manipulations may
only be carried out by super-user.
.LP
A routing table e./share/man/man4/sd.4s                                                                                 755       0      12        23357  4424741461   7622                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sd.4s 1.29 89/03/27 SMI;
.TH SD 4S "25 March 1989"
.SH NAME
sd \- driver for SCSI disk devices
.SH "CONFIG \(em SUN-3/4 SYSTEMS"
.ft B
.nf
controller si0 at vme24d16 ? csr 0x200000 priority 2 vector siintr 0x40
controller si0 at obio ? csr 0x140000 priority 2
disk sd0 at si0 drive 0 flags 0
disk sd1 at si0 drive 1 flags 0
disk sd2 at si0 drive 8 flags 0
disk sd3 at si0 drive 9 flags 0
disk sd4 at si0 drive 16 flags 0
disk sd6 at si0 drive 24 flags 0

controller sc0 at vme24d16 ? csr 0x200000 priority 2 vector scintr 0x40
disk sd0 at sc0 drive 0 flags 0
disk sd1 at sc0 drive 1 flags 0
disk sd2 at sc0 drive 8 flags 0
disk sd3 at sc0 drive 9 flags 0
disk sd4 at sc0 drive 16 flags 0
disk sd6 at sc0 drive 24 flags 0
.ft R
.fi
.LP
The first two
.B controller
lines above specify the first and second 
.SM SCSI
host adapters for
Sun-3, Sun-3x, and Sun-4
.SM VME
systems.  The third
.B controller
line specifies the first and only
.SM SCSI
host adapter on Sun-3/50 and Sun-3/60 systems.
.LP
The four lines following the
.B controller
specification lines define the available 
.B disk
devices, sd0 \- sd6.
.LP
The
.B flags
field is used to specify the
.SM SCSI
device type to the host adapter.
.B flags
must be set to 0 to identify
.B disk
devices.
.LP
The
.B drive
value is calculated using the formula:
.RS
.RI 8\|*\| target\ \|+\|\ lun
.RE
where
.I target
is the
.SM SCSI
target, and
.I lun
is the
.SM SCSI
logical unit number.
.LP
The next configuration block, following si0 and si1 above, describes
the configuration for the older sc0 host adapter.  It uses the
same configuration description as the si0 host adapter.
.SH "CONFIG \(em SPARCsystem 330 and SUN-3/80 SYSTEMS"
.ft B
.nf
controller sm0 at obio ? csr 0xfa000000 priority 2
disk sd0 at sm0 drive 0 flags 0
disk sd1 at sm0 drive 1 flags 0
disk sd2 at sm0 drive 8 flags 0
disk sd3 at sm0 drive 9 flags 0
disk sd4 at sm0 drive 16 flags 0
disk sd6 at sm0 drive 24 flags 0
.ft R
.fi
.LP
The SPARCsystem 330 and Sun-3/80 use an on-board
.SM SCSI
host adapter, sm0.  It
follows the same rules as described
above for the 
.B Sun-3, Sun-3x, Sun-4
section.
.SH "CONFIG \(em SUN-4/110 SYSTEM"
.ft B
.nf
controller sw0 at obio 2 csr 0xa000000 priority 2
disk sd0 at sw0 drive 0 flags 0
disk sd1 at sw0 drive 1 flags 0
disk sd2 at sw0 drive 8 flags 0
disk sd3 at sw0 drive 9 flags 0
disk sd4 at sw0 drive 16 flags 0
disk sd6 at sw0 drive 24 flags 0
.ft R
.fi
.LP
The Sun-4/110 uses an on-board
.SM SCSI
host adapter, sw0.  It
follows the same rules as described
above for the Sun-3, Sun-3x, Sun-4
section.
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
controller sc0 at mbmem ? csr 0x80000 priority 2
controller sc1 at mbmem ? csr 0x84000 priority 2
controller sc0 at vme24 ? csr 0x200000 priority 2 vector scintr 0x40
disk sd0 at sc0 drive 0 flags 0
disk sd1 at sc0 drive 1 flags 0
disk sd2 at sc0 drive 8 flags 0
disk sd2 at sc1 drive 0 flags 0
disk sd3 at sc1 drive 1 flags 0
.ft R
.fi
.LP
The
.B controller
lines above specify the first and second
.SM SCSI
host adapters, sc0 and sc1, on Sun-2/120 and
Sun-2/170 systems.  The third
.B controller
line specifies the first and only host adapter on a Sun-2/160 system.
It follows the same rules as described under the Sun-3, Sun-3x, Sun-4
configuration
section above.
.SH "CONFIG \(em SUN-3/E SYSTEM"
.ft B
.nf
controller se0 at vme24d16 ? csr 0x300000 priority 2 vector se_intr 0x40
disk sd0 at se0 drive 0 flags 0
disk sd1 at se0 drive 1 flags 0
disk sd2 at se0 drive 8 flags 0
disk sd3 at se0 drive 9 flags 0
.ft R
.fi
.LP
The Sun-3/E uses a VME-based
.SM SCSI
host adapter, se0.  It
follows the same rules as described
above for the Sun-3, Sun-3x, Sun-4
section.
.LP
.\" Sun386i start
.SH "CONFIG \(em Sun386i"
.nf
.ft B
controller wds0 at obmem ? csr 0xFB000000 dmachan 7 irq 16 priority 2
disk sd0 at wds0 drive 0 flags 0
disk sd1 at wds0 drive 8 flags 0
disk sd2 at wds0 drive 16 flags 0
.fi
.ft R
.LP
The Sun-386\fIi\fP configuration follows the same rules described
above under the Sun-3, Sun-3x, Sun-4
configuration section.
.SH DESCRIPTION
.LP
Files with minor device numbers 0 through 7 refer to various portions
of drive 0.
The standard device names begin with 
.RB \(lq sd \(rq 
followed by the drive number and then a letter a-h for
partitions 0-7 respectively.
The character
.B ?
stands here for a drive number in the range 0-6.
.LP
The block-files access the disk using the system's normal
buffering mechanism and are read and written without regard to
physical disk records.  There is also a \(lqraw\(rq interface
that provides for direct transmission between the disk
and the user's read or write buffer.
A single read or write call usually results in one I/O operation;
raw I/O is therefore considerably more efficient when
many bytes are transmitted.  The names of the raw files conventionally
begin with an extra
.RB ` r ".'"
.LP
I/O requests (for example
.BR lseek (2))
to the
.SM SCSI
disk must have an offset that is a multiple of 512 bytes
(\s-1DEV_BSIZE\s0), or the driver returns an 
.SM EINVAL
error.  If the transfer length is not a multiple of 512 bytes,
the transfer count is rounded up by the driver.
.SS "Disk Support"
.LP
This driver handles the Adaptec 
.SM ACB\s0-4000 
disk controller for
.SM ST\s0-506
drives, the Emulex 
.SM MD\s021 
disk controller for
.SM ESDI
drives, and embedded,  
.SM CCS\s0-compatible
.SM SCSI
disk drives.
.LP
On Sun386\fIi\fP systems, this driver
supports the 
.SM CDC 
Wren
.SM III
half-height,
and Wren
.SM IV
full-height
.SM SCSI
disk drives.
.LP
The type of disk drive is determined using the
.SM SCSI
inquiry command and reading the volume label stored
on block 0 of the drive.
The volume label describes the disk geometry and partitioning; it must
be present or the disk cannot be mounted by the system.
.LP
The
.B sd?a 
partition is normally used for the root file system
on a disk, the
.B sd?b
partition as a paging area (e.g. swap),
and the
.B sd?c
partition for pack-pack copying.
.B sd?c
normally maps the entire disk and may also be used
as the mount point for
secondary disks in the system.  The rest of the disk is normally the
.B sd?g
partition.  For the primary disk, the user file system is located here.
.SH FILES
.PD 0
.TP 20
.B /dev/sd[0-6][a-h]
block files
.TP
.B /dev/rsd[0-6][a-h]
raw files
.PD
.SH SEE ALSO
.BR dkio (4S),
.BR directory (3),
.BR lseek (2),
.BR read (2V),
.BR write (2V)
.LP
Product Specification for Wren
.SM IV
.SM SCSI
Model 94171
.br
Product Specification for Wren
.SM III
.SM SCSI
Model 94161
.br
Product Specification for Wren
.SM III
.SM SCSI
Model 94211
.br
Emulex
.SM MD\s021
Disk Controller Programmer Reference Manual
.br
Adaptec 
.SM ACB\s0-4000
Disk Controller
.SM OEM
Manual
.br
.SH DIAGNOSTICS
.nf
.ft B
.nf
sd?:  sdtimer: \s-1I/O\s+1 request timeout
.fi
.ft R
.in +5m
A tape
.SM I/O
operation has taken too long to complete.
A device or host adapter failure may have occurred.
.LP
.nf
.ft B
.nf
sd?:  sdtimer: can't abort request
.fi
.ft R
.in +5m
The driver is unable to find the request in the disconnect que
to notify the device driver that it has failed.
.LP
.nf
.ft B
.nf
sd?:  no space for inquiry data
sd?:  no space for disk label
.fi
.ft R
.in +5m
The driver was unable to get enough space for temporary
storage.  The driver is unable to open the disk device.
.LP
.nf
.ft B
.nf
sd?:  <%s>
.fi
.ft R
.in +5m
The driver has found a
.SM SCSI
disk device and opened it
for the first time.  The disk label is displayed to 
notify the user.
.LP
.nf
.ft B
.nf
sd?:  \s-1SCSI\s+1 bus failure
.fi
.ft R
.in +5m
A host adapter error was detected.  The system may need to be rebooted.
.LP
.nf
.ft B
.nf
sd?:  single sector \s-1I/O\s+1 failed
.fi
.ft R
.in +5m
The driver attempted to recover from a transfer by
writing each sector, one at a time, and failed.
The disk needs to be reformatted to map out
the new defect causing this error.
.LP
.nf
.ft B
.nf
sd?:  retry failed
sd?:  rezero failed
.fi
.ft R
.in +5m
A disk operation failed.  The driver first tries to recover
by retrying the command, if that fails, the driver rezeros
the heads to cylinder 0 and repeats the retries.
A failure of either the retry or rezero operations
results in these warning messages; the error recovery
operation continues until the retry count is exhausted.
At that time a hard error is posted.
.LP
.nf
.ft B
.nf
sd?:  request sense failed
.fi
.ft R
.in +5m
The driver was attempting to determine the cause of an
.SM I/O
failure and was unable to get more information.
This implies that the disk device may have failed.
.LP
.nf
.ft B
.nf
sd?:  warning, abs. block %d has failed %d times
.fi
.ft R
.in +5m
The driver is warning the user that the specified block has failed
repeatedly.   
.LP
.nf
.ft B
.nf
sd?:  block %d needs mapping
sd?:  reassigning defective abs. block %d
.fi
.ft R
.in +5m
The specified block has failed repeatedly and may soon
become an unrecoverable failure.  If the driver does not
map out the specified block automatically, it is recommend
that the user correct the problem.
.LP
.nf
.ft B
.nf
sd?:  reassign block failed
.fi
.ft R
.in +5m
The driver attempted to map out a block having excessive soft
errors and failed.  The user needs to run format and
repair the disk.
.LP
.nf
.ft B
.nf
sd?%c: cmd how blk %d (rel. blk %d)
       sense key(0x%x): %s, error code(0x%x): %s
.fi
.ft R
.in +5m
An
.SM I/O
operation
.RB ( cmd ),
encountered an error condition at absolute block
.RB ( "blk %d" ),
partition
.RB ( sd?%c: ),
or relative block
.RB ( "rel. block%d" ).
The error recovery operation
.BR ( how )
indicates whether it
.IR retry 'ed, 
.IR restored ,
or 
.IR failed .
The
.B sense key
and
.B error code
of the error are displayed for diagnostic purposes.
The absolute
.B blk
of the the error is used for mapping out the defective
block.  The 
.B rel. blk
is the block (sector) in error, relative to the beginning of
the partition involved.  This is useful for using
.BR icheck (8)
to repair a damaged file structure on the disk.
2 at sw0 drive 8 flags 0
disk sd3 at sw0 drive 9 flags 0
disk sd4 at sw0 drive 16 flags 0
disk sd6 at sw0 drive 24 flags 0
.ft R
.fi
.LP
The Sun-4/110 uses an on-board
.SM SCSI
host adapter, sw0.  It
follows the same rules as described
above for the Sun-3, Sun-3x, Sun-4
se./share/man/man4/sockio.4                                                                              755       0      12         2755  4424741461  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sockio.4 1.5 89/03/27 SMI;
.TH SOCKIO 4 "23 November 1987"
.SH NAME
sockio \- ioctls that operate directly on sockets
.SH SYNOPSIS
.nf
.B #include <sys/sockio.h>
.fi
.SH DESCRIPTION
.IX "socket I/O, see \fLsockio\fP(4)"
.IX I/O "socket, see \fLsockio\fP(4)"
.LP
The
.SM IOCTL\s0's
listed in this manual page apply directly to sockets, independent of any
underlying protocol.
Note: the
.B setsockopt
system call (see
.BR getsockopt (2))
is the primary method for operating on sockets as such, rather
than on the underlying protocol or network interface.
.BR ioctl s
for a specific network interface or protocol are documented in the
manual page for that interface or protocol.
.TP 20
.SB SIOCSPGRP
The argument is a pointer to an
.BR int .
Set the process-group ID that will subsequently receive
.SB SIGIO
or
.SB SIGURG
signals for the socket referred to by the descriptor passed to
.B ioctl
to the value of that
.BR int .
.TP 20
.SB SIOCGPGRP
The argument is a pointer to an
.BR int .
Set the value of that
.B int
to the process-group
.SM ID
that is receiving
.SB SIGIO
or
.SB SIGURG
signals for the socket referred to by the descriptor passed to
.BR ioctl .
.TP 20
.SB SIOCCATMARK
The argument is a pointer to an
.BR int .
Set the value of that
.B int
to 1 if the read pointer for the socket referred to by the descriptor passed
to
.B ioctl
points to a mark in the data stream for an out-of-band message, and to 0 if it
does not point to a mark.
.SH SEE ALSO
.BR ioctl (2),
.BR getsockopt (2),
.BR filio (4)
he disk.
.LP
.nf
.f./share/man/man4/st.4s                                                                                 755       0      12        45151  4424741462   7637                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)st.4s 1.31 89/03/27 SMI;
.TH ST 4S "24 March 1989"
.SH NAME
st \- driver for SCSI tape devices
.SH "CONFIG \(em SUN-3, SUN-3x, SUN-4 SYSTEMS"
.ft B
.nf
controller si0 at vme24d16 ? csr 0x200000 priority 2 vector siintr 0x40
controller si1 at vme24d16 ? csr 0x204000 priority 2 vector siintr 0x41
controller si0 at obio ? csr 0x140000 priority 2
tape st0 at si0 drive 32 flags 1
tape st1 at si0 drive 40 flags 1
tape st2 at si1 drive 32 flags 1
tape st3 at si1 drive 40 flags 1

controller sc0 at vme24d16 ? csr 0x200000 priority 2 vector scintr 0x40
tape st0 at sc0 drive 32 flags 1
tape st1 at sc0 drive 40 flags 1
.ft R
.fi
.LP
The first two
.B controller
lines above specify the first and second 
.SM SCSI
host adapters for Sun-3, Sun-3x, and Sun-4
.SM VME
systems.  The third
.B controller
line specifies the first and only
.SM SCSI
host adapter on Sun-3/50 and Sun-3/60 systems.
.LP
Following the
.B controller
specification lines are four lines which define the available 
.B tape
devices,
.BR st0 \- st3 .
The first two
.B tape
devices,
.B st0
and
.BR st1 ,
are on the first
.BR controller ,
.BR si0 .
The next two 
.B tape
devices,
.B st2
and
.BR st3 ,
are on the second
.BR controller ,
.BR si1 .
.LP
The
.B flags
field is used to specify the
.SM SCSI
device type to the host adapter.  The
.B flags
field must be set to 1 to identify
.B tape
devices.
.LP
The
.B drive
value is calculated using the formula:
.RS
.RI 8\|*\| target\ \|+\|\ lun
.RE
where
.I target
is the
.SM SCSI
target, and
.I lun
is the
.SM SCSI
logical unit number.
.LP
The next configuration block, following
.B si0
and
.B si1
above, describes
the older
.B sc0
host adapter configuration. It 
follows the
same configuration description as the
.B si0
host adapter.
.SH "CONFIG \(em SPARCsystem 330, SUN\-3/80 SYSTEMS"
.ft B
.nf
controller sm0 at obio ? csr 0xfa000000 priority 2
tape st0 at sm0 drive 32 flags 1
tape st1 at sm0 drive 40 flags 1
.ft R
.fi
.LP
The SPARCsystem 330 and Sun-3/80 use an on-board
.SM SCSI
host adapter,
.BR sm0 ,
which follows the rules described
above in the
Sun-3, Sun-3x, Sun-4
section.
.SH "CONFIG \(em SUN\-4/110 SYSTEM"
.ft B
.nf
controller sw0 at obio 2 csr 0xa000000 priority 2
tape st0 at sw0 drive 32 flags 1
tape st1 at sw0 drive 40 flags 1
.ft R
.fi
.LP
The Sun-4/110 uses an on-board
.SM SCSI
host adapter,
.BR sw0 ,
which follows the rules described
above in the Sun-3, Sun-3x, Sun-4
section.
.SH "CONFIG \(em SUN\-3/E SYSTEM"
.ft B
.nf
controller se0 at vme24d16 ? csr 0x300000 priority 2 vector se_intr 0x40
tape st0 at se0 drive 32 flags 1
tape st1 at se0 drive 40 flags 1
.ft R
.fi
.LP
The Sun-3/E uses a \s-1VME\s0-based
.SM SCSI
host adapter,
.BR se0 ,
which follows the rules described above for
Sun-3, Sun-3x, Sun-4
systems.
.\" Sun386i
.br
.ne 4
.SH CONFIG \(em Sun386i
.ft B
.nf
controller wds0 at obmem ? csr 0xFB000000 dmachan 7 irq 16 priority 2
tape st0 at wds0 drive 32 flags 1
.ft R
.fi
.LP
The Sun386\fIi\fP configuration follows the rules described
above in the
Sun-3, Sun-3x, Sun-4
configuration section.
.\" Sun386i
.SH "CONFIG \(em SUN\-2 SYSTEM"
.ft B
.nf
controller sc0 at mbmem ? csr 0x80000 priority 2
controller sc1 at mbmem ? csr 0x84000 priority 2
controller sc0 at vme24 ? csr 0x200000 priority 2 vector scintr 0x40
tape st0 at sc0 drive 32 flags 1
tape st1 at sc0 drive 40 flags 1
tape st0 at sc1 drive 32 flags 1
tape st1 at sc1 drive 40 flags 1
.ft R
.fi
.LP
The
.B controller
lines above specify the first and second
.SM SCSI
host adapters,
.B sc0
and
.BR sc1 ,
on Sun-2/120 and Sun-2/170 systems.  The third
.B controller
line specifies the only host adapter on a Sun-2/160.
It follows the rules described in the Sun-3, Sun-3x, Sun-4
configuration
section above.
.SH DESCRIPTION
.LP
The
.B st
device driver is an interface to various
.SM SCSI
tape devices.  Supported 1/4\-inch cartridge devices include
the Archive Viper
.SM QIC\s0\-150
streaming tape drive, the Emulex
.SM MT\s0\-02
tape controller, and the Sysgen
.SM SC\s04000
tape controller.
.B st
provides a standard interface to these various devices, see 
.BR mtio (4)
for details.
.LP
The driver can be opened with either rewind on close
.RB ( /dev/rst* )
or no rewind on close
.RB ( /dev/nrst* )
options.  A maximum of four tape formats per device are supported
(see
.SM FILES
below).  The tape format is specified using the device name.
The four rewind on close formats for
.BR st0 ,
for example, are
.BR /dev/rst0 ,
.BR /dev/rst8 ,
.BR /dev/rst16 ,
and
.BR /dev/rst24 .
.SS Read Operation
Fixed-length
.SM I/O
tape devices require the number of bytes read or written to be a
multiple of the physical record size.  For example, 1/4\-inch cartridge
tape devices only read or write multiples of 512 bytes.
.LP
Fixed-length tape devices read or write multiple records
if the blocking factor is greater than 64512 bytes (minphys limit).
These multiple writes are limited to 64512 bytes.
For example, if a write request is issued for 65536 bytes using a
1/4\-inch cartridge tape, two writes are issued; the first for
64512 bytes and the second for 1024 bytes.
.LP
Tape devices, which support variable-length
.SM I/O
operations, such as 1/2\-inch reel tape, may
read or write a range of 1 to 65535 bytes.  If the record size
exceeds 65535 bytes, the driver reads or writes
multiple records to satisfy the request.
These multiple records are limited to 65534 bytes.
As an example, if a write request for 65540 bytes is issued using
1/2\-inch reel tape, two records are written;
one for 65534
bytes followed by one for 6 bytes.
.LP
If the driver is opened for reading in a different format than the
tape is written in,
the driver overrides
the user selected format.  For example, if a 1/4\-inch cartridge tape
is written in
.SM QIC\s0-24
format and opened 
for reading in
.SM QIC\s0\-11,
the driver will detect a read failure on the first read and
automatically switch to
.SM QIC\s0\-24
to recover the data.
.LP
Note: If the
.B /dev/*st[0\-3]
format is used, no indication is given that the driver has
overridden the user selected format.  Other formats
issue a warning message 
to inform the user of an overridden format selection.
Some devices automatically perform
this function and do not require driver support
(1/2\-inch reel and
.SM QIC\s0\-150
tape drives for example).  
.LP
If a file mark is encountered during reading, no error
is reported but the number of bytes transferred is zero.
The next read operation reads into the next file.
.LP
End of media is indicated by two successive zero transfer
counts.  No further reading should be performed past
the end of recorded media.
.LP
If the read request size is 2048 bytes, the tape driver
behaves as a disk device and honors seek positioning requests
(see
.BR lseek (2)).
If a file mark is crossed during a
read operation, this function is disabled.
.SS Write Operation
Writing is allowed at either the beginning of tape or after
the last written file on the tape.
Writing from the beginning of tape is performed
in the user-specified format.
The original tape format is used for appending onto 
previously written tapes.
A warning message is
issued if the driver has to override the user-specified
format.
.LP
Care should be used when appending files onto 1/2\-inch reel tape
devices, since an extra file mark is appended after the last
file to mark the end of recorded media.  In other words, the
last file on the tape ends with two file marks instead of
one.  This extra file mark must be overwritten to prevent
the creation of a null file.  To facilitate write append
operations, a space to the end of recorded media ioctl is
provided to eliminate this problem by having the driver
perform the positioning operation.
.LP
If the end of tape is encountered during writing, no
error is reported but the number of bytes
transferred is zero and no further writing is 
allowed.  Trailer records may be written by first
writing a file mark followed by the trailer records.
It is important that these trailer records be kept as
short as possible to prevent data loss.
.LP
.SH Close Operation 
If data was written, a file mark is 
automatically written by the driver upon close.  If the rewinding
device name is used, the tape will be rewound after the file
mark is written.  If the user wrote a file mark prior to closing,
then no file mark is written upon close.  If a file positioning
ioctl, like rewind, is issued after writing, a file mark is written
before repositioning the tape.
.LP
Note:  For 1/2\-inch reel tape devices, two file marks are
written to mark the end of recorded media before rewinding or
performing a file positioning ioctl.  If the user wrote a file
mark before closing a 1/2\-inch reel tape device, the driver will 
always write a file mark before closing to insure that the end
of recorded media is marked properly.
.LP
If no data was written and the driver was opened for
.SM WRITE-ONLY
access, a file mark is written thus creating a null file.
.SH IOCTLS
The following ioctls are supported:  
forwardspace record, forwardspace file,
backspace record, backspace file, backspace file mark,
rewind, write file mark, offline, erase, retension,
space to
.SM EOM\s0,
and get status.
.LP
The backspace file and forwardspace file tape
operations are inverses. Thus, a forwardspace \(lq\-1\(rq file
is equivalent to a backspace \(lq1\(rq file.
A backspace \(lq0\(rq file is the same as forwardspace \(lq0\(rq file;
both position the tape device to the beginning of the current file.
.LP
Backspace file mark moves the tape backwards by file marks.
The tape position will end on the beginning of tape side of the
desired file mark.  Devices which do not support this function,
such as 1/4\-inch cartridge tape, return an
.SM ENXIO
error.
.LP
Backspace record and forwardspace record operations perform
much like space file operations, except that
they move by records instead of files.  Variable-length
.SM I/O
devices
(1/2\-inch reel, for example) space actual records;
fixed-length
.SM I/O
devices space physical records (blocks).
1/4\-inch cartridge tape, for example, spaces 512 byte
physical records.
The status ioctl residue count contains the number of 
files or records not skipped.  Record skipping does not
go past a file mark; file skipping does not go past the
end of recorded media.
.LP
Spacing to the end of recorded media positions
the tape at a location just after the last file written on the tape.
For 1/4\-inch cartridge tape, this is after the last file
mark on the tape.
For 1/2\-inch reel tape, this is just after the first file
mark but before the second (and last) file mark on the tape.
Additional files can then be appended onto the tape from that point.
.LP
The offline ioctl rewinds and, if appropriate, takes the device
offline by unloading the tape.
Tape must be inserted
before the tape device can be used again.
.LP
The erase ioctl rewinds the tape, erases it 
completely, and returns to the beginning of tape.
.LP
The retension ioctl only applies to 1/4\-inch cartridge tape devices.
It is used to restore tape tension improving the tape's soft error rate
after extensive start-stop operations
or long-term storage.  Devices
which do not support
this function, such as 1/2\-inch reel tape,
return an
.SM ENXIO
error.
.LP
The get status ioctl call returns the drive id (mt_type),
sense key error (mt_erreg), file number (mt_fileno),
and record number (mt_blkno) of the last error.  The
residue count (mt_resid) is set to the number of bytes not
transferred or files/records not spaced.
.LP
Note: The error status is reset by the get status ioctl call or
the next read, write, or other ioctl operation.
If no error has occurred (sense key is zero), the current
file and record position are returned.
.LP
.SH ERRORS 
.TP 12
.SM EACCES
The driver is opened for write access and the tape is
write protected, or an attempt is made to write
on a write protected tape.  For writing with
.SM QIC\s0\-150 
tape drives, this error is also reported if the wrong tape media
is used for writing.
.TP
.SM EBUSY
The tape device is already in use.
.TP
.SM EIO\ \ 
During opening, the tape device is not ready because either
no tape is in the drive, or 
the drive is not on-line.  Once open, this error 
is returned if the requested
.SM I/O
transfer could not be completed.
.TP
.SM EINVAL
The number of bytes read or written is not a multiple
of the physical record size (fixed-length tape
devices only).
.TP
.SM ENXIO
During opening, the tape device does not exist.  On ioctl functions,
this indicates that the tape device does not support the ioctl
function.
.SH FILES
.\" These are Singrack and Mantaray - will be needed in 4.0.4
.\".TP
.\"For 1/2\-inch reel tape devices:
.\".br
.\".B /dev/rst[0\-3]\ \ 	
.\"800 \s-1BPI\s0 density
.\".br
.\".B /dev/rst[8\-11]\ 	
.\"1600 \s-1BPI\s0 density
.\".br
.\".B /dev/rst[16\-20]	
.\"6250 \s-1BPI\s0 density
.\".br
.\".B /dev/rst[24\-28]	
.\"data compression
.\".br
.\".B /dev/nrst[0\-3] 	
.\"non-rewinding 800 \s-1BPI\s0 density
.\".br
.\".B /dev/nrst[8\-11]	
.\"non-rewinding 1600 \s-1BPI\s0 density
.\".br
.\".B /dev/nrst[16\-19]	
.\"non-rewinding 6250 density
.\".br
.\".B /dev/nrst[24\-27]	
.\"non-rewinding data compression
.\".LP
.TP
For \s-1QIC\s0\-150 tape devices (Archive Viper):
.br
.B /dev/rst[0\-3]\    	
\s-1QIC\s0\-150 Format
.br
.B /dev/rst[8\-11] 	
\s-1QIC\s0\-150 Format
.br
.B /dev/rst[16\-20]	
\s-1QIC\s0\-150 Format
.br
.B /dev/rst[24\-28]	
\s-1QIC\s0\-150 Format
.br
.B /dev/nrst[0\-3] 	
non-rewinding \s-1QIC\s0\-150 Format
.br
.B /dev/nrst[8\-11]	
non-rewinding \s-1QIC\s0\-150 Format
.br
.B /dev/nrst[16\-19]	
non-rewinding \s-1QIC\s0\-150 Format
.br
.B /dev/nrst[24\-27]	
non-rewinding \s-1QIC\s0\-150 Format
.LP
.TP
For \s-1QIC\s0\-24 tape devices (Emulex \s-1MT\s0\-02 and Sysgen \s-1SC\s04000):
.br
.B /dev/rst[0\-3]\    	
\s-1QIC\s0\-11 Format
.br
.B /dev/rst[8\-11] 	
\s-1QIC\s0\-24 Format
.br
.B /dev/rst[16\-20]	
\s-1QIC\s0\-24 Format
.br
.B /dev/rst[24\-28]	
\s-1QIC\s0\-24 Format
.br
.B /dev/nrst[0\-3] 	
non-rewinding \s-1QIC\s0\-11 Format
.br
.B /dev/nrst[8\-11]	
non-rewinding \s-1QIC\s0\-24 Format
.br
.B /dev/nrst[16\-19]	
non-rewinding \s-1QIC\s0\-24 Format
.br
.B /dev/nrst[24\-27]	
non-rewinding \s-1QIC\s0\-24 Format
.LP
Note:  The
.SM QIC\s0\-24
format is preferred over
.SM QIC\s0\-11
for Sun-3, Sun-3x, Sun-4, and Sun386\fIi\fR systems.
.PD
.SH SEE ALSO
.BR mt (1),
.BR tar (1),
.BR mtio (4),
.BR dump (8),
.BR restore (8)
.LP
Archive Viper
.SM QIC\s0\-150
Tape Drive Product Specification
.br
Emulex
.SM MT\s0\-02
Intelligent Tape Controller Product Specification
.br
Sysgen
.SM SC\s04000
Intelligent Tape Controller Product Specification
.br
.ne 6
.SH DIAGNOSTICS
.nf
.ft B
.nf
st?:  sttimer: \s-1I/O\s0 request timeout
.fi
.ft R
.in +5m
A tape
.SM I/O
operation has taken too long to complete.  A
device or host adapter failure may have occurred.
.LP
.ft B
.nf
st?:  sttimer: can't abort request
.ft R
.fi
.in +5m
The driver is unable to find the request in the disconnect que to notify the
device driver that it has failed.  A 
.SM SCSI
bus reset is issued to recover from this error.
.LP
.nf
.ft B
st?:  unknown \s-1SCSI\s0 device found
.ft R
.fi
.in +5m
The
.SM SCSI
device is not a tape device; it is some other type of
.SM SCSI
device.
.LP
.nf
.ft B
st?:  warning, unknown tape drive found
.ft R
.fi
.in +5m
The driver does not recognize the tape device.  Only the
default tape density is used; block size
is set to the value specified by the tape drive.
.LP
.nf
.ft B
st?:  tape is write protected
.ft R
.fi
.in +5m
The tape is write protected.
.LP
.sp .5
.nf
.ft B
st?:  wrong tape media for writing
.ft R
.fi
.in +5m
For
.SM QIC\s0\-150
tape drives, this indicates that the user is trying to write on a
.SM DC\s0\-300XL
(or equivalent) tape.  Only
.SM DC\s0\-6150
(or equivalent) tapes can be used for writing.
.br
Note: \s-1DC\s0\-6150 was formerly known as \s-1DC\s0\-600\s-1XTD\s+1.
.LP
.nf
.ft B
st?:  warning, rewinding tape
.ft R
.fi
.in +5m
The driver is rewinding tape in order to set the tape format.
.LP
.nf
.ft B
st?:  warning, using alternate tape format
.ft R
.fi
.in +5m
The driver is overriding the user-selected tape format and using
the previously used format.
.LP
.nf
.ft B
st?:  warning, tape rewound
.ft R
.fi
.in +5m
For Sysgen tape controllers, the tape may be rewound as a result
of getting sense data.
.LP
.nf
.ft B
st?:  format change failed
.ft R
.fi
.in +5m
The tape drive rejected the mode select command to change the tape format.
.LP
.nf
.ft B
st?:  file mark write failed
.ft R
.fi
.in +5m
The driver was unable to write a file mark.
.LP
.nf
.ft B
st?:  warning, The tape may be wearing out or the head may need cleaning.
st?:  read retries= %d, file= %d, block= %d
st?:  write  retries= %d, file= %d, block= %d
.ft R
.fi
.in +5m
The number of allowable soft errors has been exceeded for this
tape.  Either the tape heads need cleaning or the tape is wearing out.
If the tape is wearing out, continued usage of it is not
recommended.
.LP
.nf
.ft B
st?:  illegal command
.ft R
.fi
.in +5m
The
.SM SCSI
command just issued was illegal.  This message can
result from issuing an inappropriate command,
such as trying to write over previously written
files on the tape.  On foreign
tape devices, this can also be caused by
selecting the wrong tape format.
.LP
.nf
.ft B
st?:  error:  sense key(0x%x): %s, error code(0x%x): %s
.ft R
.fi
.in +5m
An error has occurred.  The sense key message and error code are
displayed for diagnostic purposes.
.LP
.nf
.ft B
st?:  stread: not modulo %d block size
st?:  stwrite: not modulo %d block size
.ft R
.fi
.in +5m
The read or write request size must be a multiple of the
.B %d
physical block size.
.LP
.nf
.ft B
st?:  file positioning error
st?:  block positioning error
.ft R
.fi
.in +5m
The driver was unable to position the tape to the desired file or block
(record).  This is probably caused by a damaged tape.
.LP
.SH BUGS
Foreign tape devices which do not return a
.SM BUSY
status during tape
loading prevent user commands from being held
until the device is ready.  The user must delay
issuing any tape operations until the tape device is 
ready.  This is not a problem for Sun supplied tape
devices.
.LP
Foreign tape devices which do not report a blank check
error at the end of recorded media cause
file positioning operations to fail.
Some tape drives for example, mistakenly report media error
instead of blank check error. 
.LP
\(lqCooked\(rq mode for read and write operations is not supported.
.LP
Systems using the older
.B sc0
host adapter or the
Sysgen
.SM SC\s04000
tape controller, prevent disk
.SM I/O
over the 
.SM SCSI
bus while the tape is in use (during a rewind for example).
This problem is caused by the fact that they do not
support disconnect/reconnect to free the
.SM SCSI
bus.  Newer tape devices, like the the Emulex
.SM MT\s0\-02,
and host adapters, like
.BR si0 ,
eliminate this problem.
.LP
Some older systems may not support the
.SM QIC\s0\-24
format, and may complain (or exhibit erratic behavior)
when the user attempts to use this format.
.
.LP
If no data was written and the driver was opened for
.SM WRITE-ONLY
access, a file mark is written thus creating a null file.
.SH IOCTLS
The following ioctls are supported:  
forwardspace record, forwardspace file,
backspace record, backspace file, backspace file mark,
rewind, write file mark, offline, erase, retension,
space to
.SM EOM\s0,
and get status.
.LP
The backspace file and forwardspace fi./share/man/man4/streamio.4                                                                            755       0      12        52314  4424741462  10650                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)streamio.4 1.8 89/03/27 SMI; from S5R3
.TH STREAMIO 4 "24 November 1987"
.SH NAME
streamio \- STREAMS ioctl commands
.SH SYNOPSIS
.nf
.B #include <stropts.h>
.B int ioctl (fildes, command, arg)
.B int fildes, command;
.fi
.SH DESCRIPTION
.IX "STREAMS" "I/O, see \fLstreamio\fP(4)"
.IX I/O "STREAMS, see \fLstreamio\fP(4)"
.LP
\s-1STREAMS\s0
(see
.BR intro (2))
ioctl commands are a subset of
.BR ioctl (2)
commands that
perform a variety of control functions on
.SM STREAMS\s0.
The arguments
.I command
and
.I arg
are passed to the file designated by
.I fildes
and are interpreted by the
.IR stream head .
Certain combinations of these arguments may be passed to a module or driver
in the stream.
.LP
.I fildes
is an open file descriptor that refers to a
stream.
.I command
determines the control function to be performed as described below.
.I arg
represents additional information that is needed by this command.
The type of
.I arg
depends upon the command, but it is generally an integer
or a pointer to a
\fIcommand\fP-specific
data structure.
.LP
Since these
\s-1STREAMS\s0
commands are a subset of
.IR ioctl ,
they are
subject to the errors described there.
In addition to those errors, the call will fail with
.I errno
set to
.SM EINVAL\s0,
without processing a control function,
if the
stream
referenced by
.I fildes
is linked below a multiplexor, or if
.I command
is not a valid value for a
.IR stream .
.LP
Also, as described in
.IR ioctl ,
\s-1STREAMS\s0
modules and drivers can detect errors.
In this case, the module or driver sends an error message to the
.I stream head
containing an error value.
Subsequent system calls will fail with
.I errno
set to this value.
.SH IOCTLS
The following
.B ioctl
commands, with error values indicated, are
applicable to all
\s-1STREAMS\s0
files:
.TP 20
.SB I_PUSH
Pushes the module whose name is pointed to by
.I arg
onto the top of the current
stream, just below the
.IR stream head .
It then calls the open routine of the newly-pushed module.
.IP
.SB I_PUSH
will fail if one of the following occurs:
.RS
.TP 20
.SM EINVAL
The module name is invalid.
.TP
.SM EFAULT
.I arg
points outside the allocated address
space.
.TP
.SM ENXIO
The open routine of the new module failed.
.TP
.SM ENXIO
A hangup is received on the
stream
referred to by
.IR fildes .
.RE
.TP
.SB I_POP
Removes the module just below the
.I stream head
of the
stream
pointed to by
.IR fildes .
.I arg
should be 0 in an
.SB I_POP
request.
.IP
.SB I_POP
will fail if one of the following occurs:
.RS
.TP 20
.SM EINVAL
No module is present on
.IR stream .
.TP
.SM ENXIO
A hangup is received on the
stream
referred to by
.IR fildes .
.RE
.TP
.SB I_LOOK
Retrieves the name of the module just below the
.I stream head
of the
stream pointed to by
.IR fildes ,
and places it
in a
.SM NULL
terminated character string pointed at by
.IR arg .
The buffer pointed to by
.I arg
should be at least
.B \s-1FMNAMESZ\s0+1
bytes long.
An
.RB ` "#include <sys/conf.h>" '
declaration is required.
.IP
.SB I_LOOK
will fail if one of the following occurs:
.RS
.TP 20
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.TP
.SM EINVAL
No module is present on
.IR stream .
.RE
.TP
.SB I_FLUSH
This request
flushes all input and/or output queues, depending on the value of
.IR arg .
Legal
.I arg
values are:
.RS
.TP 20
.SB FLUSHR
Flush read queues.
.TP
.SB FLUSHW
Flush write queues.
.TP
.SB FLUSHRW
Flush read and write queues.
.RE
.IP
.SB I_FLUSH
will fail if one of the following occurs:
.RS
.TP 20
.SM EAGAIN
No buffers could be allocated for the flush message.
.TP
.SM EINVAL
The value of
.I arg
is invalid.
.TP
.SM ENXIO
A hangup is received on the
stream
referred to by
.IR fildes .
.RE
.TP
.SB I_SETSIG
Informs the
.I stream head
that the user wishes
the kernel to issue the
.SB SIGPOLL
signal (see
.BR sigvec (2))
when a particular event has occurred on the
stream associated with
.IR fildes .
.SB I_SETSIG
supports an asynchronous processing capability in
\s-1STREAMS\s0.
The value of
.I arg
is a bitmask that specifies
the events for which the user should be signaled.
It is the bitwise-\s-1OR\s0 of any combination of the following constants:
.RS
.TP 20
.SB S_INPUT
A non-priority message has arrived on a
.I stream head
read queue, and no other messages existed on that queue before
this message was placed there.
This is set even if the message is of zero length.
.TP
.SB S_HIPRI
A priority message is present on the
.I stream head
read queue.
This is set even if the message is of zero length.
.TP
.SB S_OUTPUT
The write queue just below the
.I stream head
is no longer full.
This notifies the user that there is room on the queue for
sending (or writing) data downstream.
.TP
.SB S_MSG
A
\s-1STREAMS\s0
signal message
that contains the
.SB SIGPOLL
signal has reached the front of the
.I stream head
read queue.
.RE
.IP
A user process may choose to be signaled only of priority messages by
setting the
.I arg
bitmask to the value
.BR \s-1S_HIPRI\s0 .
.IP
Processes that wish to receive
.SB SIGPOLL
signals must explicitly
register to receive them using
.BR \s-1I_SETSIG\s0 .
If several processes register to receive this signal for the same event on
the same
.IR stream ,
each process will be signaled when the event occurs.
.IP
If the value of
.I arg
is zero,
the calling process will be unregistered and will not receive
further
.SB SIGPOLL
signals.
.IP
.SB I_SETSIG
will fail if one of the following occurs:
.RS
.TP 20
.SM EINVAL
The value of
.I arg
is invalid or
.I arg
is zero and the process is not registered to receive the
.SB SIGPOLL
signal.
.TP
.SM EAGAIN
A data structure could not be allocated to store the signal request.
.RE
.TP
.SB I_GETSIG
Returns the events for which the calling process is
currently registered to be sent a
.SB SIGPOLL
signal.
The events are returned as a bitmask pointed to by
.IR arg ,
where the events are those specified in the description of
.SB I_SETSIG
above.
.br
.ne 5
.IP
.SB I_GETSIG
will fail if one of the following occurs:
.RS
.TP 20
.SM EINVAL
The process is not registered to receive the
.SB SIGPOLL
signal.
.TP
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.RE
.TP
.SB I_FIND
This request compares the names of all modules currently present in
the
stream
to the name pointed to by
.IR arg ,
and returns 1 if
the named module is present in the
stream.
It returns 0 if the named module is not present.
.IP
.SB I_FIND
will fail if one of the following occurs:
.RS
.TP 20
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.TP
.SM EINVAL
.I arg
does not point to a valid module
name.
.RE
.TP
.SB I_PEEK
This request allows a user to retrieve the information in the first
message on the
.I stream head
read queue without taking the
message off the queue.
.I arg
points to a
.I strpeek
structure
which contains the following members:
.IP
.nf
.ft B
	struct strbuf	ctlbuf;
	struct strbuf	databuf;
	long		flags;
.ft R
.fi
.IP
The
.I maxlen
field in the
.I ctlbuf
and
.I databuf
.I strbuf
structures (see
.BR getmsg (2))
must be set to the number of bytes of
control information and/or data information,
respectively, to retrieve.
If the user sets
.I flags
to
.BR \s-1RS_HIPRI\s0,
.SB I_PEEK
will only look
for a priority message on the
.I stream head
read queue.
.IP
.SB I_PEEK
returns 1 if a message was retrieved,
and returns 0 if no message was found on the
.I stream head
read queue, or if the
.SB RS_HIPRI
flag was set in
.I flags
and
a priority message was not present on the
.I stream head
read queue.
It does not wait for a message to arrive.  On return,
.I ctlbuf
specifies information in the control buffer,
.I databuf
specifies information in the data buffer, and
.I flags
contains the value 0 or
.BR \s-1RS_HIPRI\s0.
.IP
.SB I_PEEK
will fail if one of the following occurs:
.RS
.TP 20
.SM EFAULT
.I arg
points, or the buffer area specified in
.I ctlbuf
or
.I databuf
is, outside the allocated address space of the
process.
.RE
.TP
.SB I_SRDOPT
Sets the read mode using the value of the argument
.IR arg .
Legal
.I arg
values are:
.RS
.TP 20
.SB RNORM
Byte-stream mode, the default.
.TP
.SB RMSGD
Message-discard mode.
.TP
.SB RMSGN
Message-nondiscard mode.
.RE
.IP
Read modes are described in
.BR read (2V).
.IP
.SB I_SRDOPT
will fail if one of the following occurs:
.RS
.TP 20
.SM EINVAL
.I arg
is not one of the above legal values.
.RE
.TP
.SB I_GRDOPT
Returns the current read mode setting in an
.I int
pointed to by the argument
.IR arg .
Read modes are described in
.BR read (2V).
.IP
.SB I_GRDOPT
will fail if one of the following occurs:
.RS
.TP 20
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.RE
.TP
.SB I_NREAD
Counts the number of data bytes
in data blocks in the first message
on the
.I stream head
read queue,
and places this value in the location pointed to by
.IR arg .
The return value for the command is the number of messages
on the
.I stream head
read queue.
For example, if zero is returned in
.IR arg ,
but the
.B ioctl
return
value is greater than zero,
this indicates that a zero-length message is next on the queue.
.IP
.SB I_NREAD
will fail if one of the following occurs:
.RS
.TP 20
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.RE
.TP
.SB I_FDINSERT
creates a message from user specified buffer(s), adds information about
another stream
and sends the message downstream.
The message contains a control part and an optional data part.
The data and control parts to be sent are distinguished by placement in separate buffers, as described below.
.IP
.I arg
points to a
.I strfdinsert
structure
which contains the following members:
.IP
.nf
.ft B
	struct strbuf	ctlbuf;
	struct strbuf	databuf;
	long		flags;
	int		fd;
	int		offset;
.fi
.ft R
.IP
The
.I len
field in the
.I ctlbuf
.I strbuf
structure (see
.BR putmsg (2))
must be set to the size of a pointer plus the
number
of bytes of control information to be sent with the message.
.I fd
specifies the file descriptor of the other
stream and
.IR offset ,
which must be word-aligned, specifies the number of
bytes
beyond the beginning of the control buffer where
.SB I_FDINSERT
will store a pointer to the
.I fd
stream's driver read queue
structure.
The
.I len
field in the
.I databuf
.I strbuf
structure must be
set to the number of bytes of data information to be sent with the
message or zero if no data part is to be sent.
.IP
.I flags
specifies the type of message to be created.
A non-priority message is created if
.I flags
is set to 0, and
a priority message is created if
.I flags
is set to
.BR \s-1RS_HIPRI\s0.
For non-priority messages,
.SB I_FDINSERT
will block if the
stream write queue is full due to
internal flow control conditions.
For priority messages,
.SB I_FDINSERT
does not block on this condition.
For non-priority messages,
.SB I_FDINSERT
does not block when the
write queue is full and
.SB O_NDELAY
is set.
Instead, it fails and sets
.I errno
to
.SM EAGAIN\s0.
.IP
.SB I_FDINSERT
also blocks, unless prevented by lack of internal resources,
waiting for the availability of message blocks in the
.IR stream ,
regardless of priority or whether
.SB O_NDELAY
has been specified.
No partial message is sent.
.IP
.SB I_FDINSERT
will fail if one of the following occurs:
.RS
.TP 20
.SM EAGAIN
A non-priority message was specified, the
.SB O_NDELAY
flag is set, and the stream
write queue is full due to internal flow control
conditions.
.TP
.SM EAGAIN
Buffers could not be allocated for the message that was to be created.
.TP
.SM EFAULT
.I arg
points, or the buffer area specified in
.I ctlbuf
or
.I databuf
is, outside the allocated address space of the
process.
.TP
.SM EINVAL
.I fd
in the
.I strfdinsert
structure is not a valid, open
stream
file descriptor;
the size of a pointer plus
.I offset
is greater than the
.I len
field for the buffer specified through
\fIctlptr\fP;
.I offset
does not specify a properly-aligned location in the data
buffer;
an undefined value is pointed to by
.IR flags .
.TP
.SM ENXIO
A hangup is received on the
stream
referred to by
.IR fildes .
.TP
.SM ERANGE
The
.I len
field for the buffer specified through
.I databuf
does
not fall within the range specified by the maximum and minimum packet
sizes of the topmost
stream module, or the
.I len
field for the buffer specified through
.I databuf
is larger than the maximum
configured size of the data part of a message, or the
.I len
field for the buffer specified through
.I ctlbuf
is larger than the
maximum configured size of the control part of a message.
.LP
.RE
.TP
.SB I_STR
Constructs an internal
\s-1STREAMS\s0
ioctl message from the data
pointed to by
.IR arg ,
and sends that message downstream.
.IP
This mechanism is provided to permit a process to specify timeouts
and variable-sized amounts of data when sending an
.B ioctl
request to downstream modules and drivers.
It allows information to be sent with the
.IR ioctl ,
and will return to the user any information sent upstream by the downstream
recipient.
.SB I_STR
blocks until the system responds
with either a positive or negative acknowledgement message,
or until the request ``times out'' after some period of time.
If the request times out, it fails with
.I errno
set to
.SM ETIME\s0.
.IP
At most, one
.SB I_STR
can be active on a stream.
Further
.SB I_STR
calls will block until the active
.SB I_STR
completes at the
.IR "stream head" .
The default timeout interval for these requests is 15 seconds.
The
.SB O_NDELAY
(see
.BR open (2V))
flag has no effect on this call.
.IP
To send requests downstream,
.I arg
must point to a
.I strioctl
structure which contains the following members:
.IP
.nf
.ft B
	int	ic_cmd;		/* downstream command */
	int	ic_timout;	/* \s-1ACK/NAK\s0 timeout */
	int	ic_len;		/* length of data arg */
	char	*ic_dp;		/* ptr to data arg */
.ft R
.fi
.IP
.I ic_cmd
is the internal ioctl command intended for a
downstream
module or driver and
.I ic_timout
is the number of seconds (\-1 =
infinite, 0 = use default, >0 = as specified) an
.SB I_STR
request will wait for acknowledgement before timing out.
.I ic_len
is the number of bytes in the data argument
and
.I ic_dp
is a pointer to the data
argument.  The
.I ic_len
field has two uses:
on input, it contains the length of the data argument
passed in, and on return from the command, it contains the
number of bytes being returned to the user (the buffer pointed to by
.I ic_dp
should be large enough to contain the maximum amount of
data
that any module or the driver in the
stream
can return).
.IP
The
.I stream head
will convert the information pointed to by the
.I strioctl
structure to an internal ioctl command message and send
it
downstream.
.IP
.SB I_STR
will fail if one of the following occurs:
.RS
.TP 20
.SM EAGAIN
Buffers could not be allocated for the
.B ioctl
message.
.TP
.SM EFAULT
.I arg
points, or the buffer area specified by
.I ic_dp
and
.I ic_len
(separately for data sent and data returned) is, outside
the
allocated address space of the process.
.TP
.SM EINVAL
.I ic_len
is less than 0 or
.I ic_len
is larger than the maximum configured size of the data part of a message or
.I ic_timout
is less than
\-1.
.TP
.SM ENXIO
A hangup is received on the
stream referred to by
.IR fildes .
.TP
.SM ETIME
A downstream
.B ioctl
timed out before acknowledgement was received.
.RE
.IP
An
.SB I_STR
can also fail while waiting for an acknowledgement if
a message indicating an error or a hangup is received at the
.IR stream head .
In addition, an error code can be returned in the positive or negative
acknowledgement message, in the event the
.B ioctl
command sent downstream fails.
For these cases,
.SB I_STR
will fail with
.I errno
set to the value in the message.
.TP
.SB I_SENDFD
Requests the
stream associated with
.I fildes
to send a message,
containing a file pointer,
to the
.I stream head
at the other end of a stream pipe.
The file pointer corresponds to
.IR arg ,
which must be an integer file
descriptor.
.IP
.SB I_SENDFD
converts
.I arg
into the corresponding system file pointer.
It allocates a message block and inserts the file pointer in the block.
The user id and group id associated with the sending process are also inserted.
This message is placed directly on the read queue (see
.BR intro (2))
of the
.I stream head
at the other end of the
stream
pipe to which it
is connected.
.IP
.SB I_SENDFD
will fail if one of the following occurs:
.RS
.TP 20
.SM EAGAIN
The sending
stream
is unable to allocate a message block to contain the
file pointer.
.TP
.SM EAGAIN
The read queue of the receiving
.I stream head
is full and
cannot accept the message sent by
.BR \s-1I_SENDFD\s0 .
.TP
.SM EBADF
.I arg
is not a valid, open file
descriptor.
.TP
.SM EINVAL
.I fildes
is not connected to a
stream
pipe.
.TP
.SM ENXIO
A hangup is received on the
stream referred to by
.IR fildes .
.RE
.TP
.SB I_RECVFD
Retrieves the file descriptor associated with the message sent by an
.SB I_SENDFD
.B ioctl
over a
stream
pipe.
.I arg
is a pointer to a data buffer large
enough to hold an
.I strrecvfd
data structure containing the following members:
.IP
.nf
.ft B
	int fd;
	unsigned short uid;
	unsigned short gid;
	char fill[8];
.fi
.ft R
.IP
.I fd
is an integer file descriptor.
.I uid
and
.I gid
are the user
.SM ID
and group
.SM ID\s0,
respectively, of
the
sending
stream.
.IP
If
.SB O_NDELAY
is not set (see
.BR open (2V)),
.SB I_RECVFD
will block
until a message is present at the
.IR stream head .
If
.SB O_NDELAY
is set,
.SB I_RECVFD
will fail with
.I errno
set to
.SM EAGAIN
if no message is present at the
.IR stream head .
.IP
If the message at the
.I stream head
is a message sent by an
.SB I_SENDFD,
a new user file descriptor is allocated for the file pointer contained in the
message.
The new file descriptor is placed in the
.I fd
field of the
.I strrecvfd
structure.
The structure is copied into the user data buffer pointed to by
.IR arg .
.IP
.SB I_RECVFD
will fail if one of the following occurs:
.RS
.TP 20
.SM EAGAIN
A message was not present at the
.I stream head
read queue, and the
.SB O_NDELAY
flag is set.
.TP
.SM EBADMSG
The message at the
.I stream head
read queue was not
a message containing a passed file descriptor.
.TP
.SM EFAULT
.I arg
points outside the allocated address space of the
process.
.TP
.SM EMFILE
Too many descriptors are active.
.TP
.SM ENXIO
A hangup is received on the
stream
referred to by
.IR fildes .
.RE
.LP
The following four commands are used for connecting and disconnecting
multiplexed
\s-1STREAMS\s0
configurations.
.TP 20
.SB I_LINK
Connects two streams, where
.I fildes
is the file descriptor of the
stream
connected to
the multiplexing
driver, and
.I arg
is the file descriptor of the
stream
connected
to another driver.
The
stream designated by
.I arg
gets connected below the multiplexing
driver.
.SB I_LINK
causes the multiplexing driver to send an acknowledgement message to the
.I stream head
regarding the linking
operation.
This call returns a multiplexor
.SM ID
number (an identifier
used to disconnect the multiplexor, see
.BR \s-1I_UNLINK\s0 )
on success, and a \-1 on failure.
.IP
.SB I_LINK
will fail if one of the following occurs:
.RS
.TP 20
.SM ENXIO
A hangup is received on the
stream referred to by
.IR fildes .
.TP
.SM ETIME
The
.B ioctl
timed out before an acknowledgement was received.
.TP
.SM EAGAIN
Storage could not be allocated to perform the
.BR \s-1I_LINK\s0 .
.TP
.SM EBADF
.I arg
is not a valid, open file
descriptor.
.TP
.SM EINVAL
The
stream referred to by
.I fildes
does not support multiplexing.
.TP
.SM EINVAL
.I arg
is not a stream, or is already linked under a
multiplexor.
.TP
.SM EINVAL
The specified link operation
would cause a "cycle" in the resulting configuration;
that is, if a given
.I stream head
is linked into a multiplexing
configuration in more than one place.
.RE
.IP
An
.SB I_LINK
can also fail while waiting for the multiplexing driver
to acknowledge the link request, if a message indicating an error or a hangup
is received at the
.I stream head
of
.IR fildes .
In addition, an error code can be returned in the positive or negative
acknowledgement message.
For these cases,
.SB I_LINK
will fail with
.I errno
set to the value in the message.
.TP
.SB I_UNLINK
Disconnects the two
streams specified by
.I fildes
and
.IR arg .
.I fildes
is the file descriptor of the
stream connected to the
multiplexing driver.
.I arg
is the multiplexor
.SM ID
number that was returned by the
.B ioctl
.SB I_LINK
command when a
stream
was linked below the multiplexing driver.
If
.I arg
is \-1, then all streams
which were linked to
.I fildes
are disconnected.
As in
.BR \s-1I_LINK\s0 ,
this command requires the multiplexing driver to
acknowledge the unlink.
.IP
.SB I_UNLINK
will fail if one of the following occurs:
.RS
.TP 20
.SM ENXIO
A hangup is received on the
stream referred to by
.IR fildes .
.TP
.SM ETIME
The
.B ioctl
timed out before an acknowledgement was received.
.TP
.SM EAGAIN
Buffers could not be allocated for the acknowledgement message.
.TP
.SM EINVAL
The multiplexor
.SM ID
number was invalid.
.RE
.IP
An
.SB I_UNLINK
can also fail while waiting for the multiplexing
driver to acknowledge the link request, if a message indicating an
error or a hangup is received at the
.I stream head
of
.IR fildes .
In addition, an error code can be returned in the positive or negative
acknowledgement message.
For these cases,
.SB I_UNLINK
will fail with
.I errno
set to the
value in the message.
.SH SEE ALSO
.BR close (2),
.BR fcntl (2V),
.BR getmsg (2),
.BR intro (2),
.BR ioctl (2),
.BR open (2V),
.BR poll (2),
.BR putmsg (2),
.BR read (2V),
.BR sigvec (2),
.BR write (2V)
.LP
.I \s-1STREAMS\s0 Programmer's Guide
.br
.I \s-1STREAMS\s0 Primer
could not be allocated for the message that was to be created.
.TP
.SM EFAULT
.I arg
points, or the buffer area specified in
.I ctlbuf
or
.I databuf
is, outside the allocated address space of the
process.
.TP
.SM EINVAL
.I fd
in the
.I strfdinsert
structure is not a valid, open
stream
file descriptor;
the s./share/man/man4/taac.4s                                                                               755       0      12         2256  4424741462  10100                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)taac.4s 1.6 89/03/27 SMI;
.TH TAAC 4S "24 November 1987"
.SH NAME
taac \- Sun applications accelerator
.SH CONFIG
.B taac0 at vme32d32 ? csr 0x28000000
.SH DESCRIPTION
.IX "taac device" "" "\fLtaac\fP device"
.LP
The 
.B taac
interface supports the optional
.SM TAAC-1
Applications Accelerator.
This add-on device is composed of a very-long-instruction-word
computation engine, coupled with an 8MB memory array.  This memory
area can be used either as a frame buffer, or as storage for large
data sets.
.LP
Programs can be downloaded for execution on the 
.SM TAAC-1
directly, they can be executed by the host processor, or
the host processor and the
.SM TAAC-1
engine can be used in combination.
See the
.I
.SM TAAC-1
.I User's Guide
for detailed information on accessing the
.SM TAAC-1
from the host.  This manual also describes the C compiler,
the programming tools, and the support libraries for the
.SM TAAC-1.
.LP
Programs on the host processor gain access to the
.SM TAAC-1
registers and memory by using
.BR mmap (2).
.SH FILES
.PD 0
.TP
.B /dev/taac0
.TP
.B /usr/include/taac1
.TP
.B /usr/lib/taac1
.PD
.SH SEE ALSO 
.BR mmap (2)
.LP
.I "TAAC-1 Application Accelerator: User Guide"
aining the following members:
.IP
.nf
.ft B
	int fd;
	unsigned short uid;
	unsigned short gid;
	char fill[8];
.fi
.ft R
.IP
.I fd
is an integer file descriptor.
.I uid
and
.I gid
are the user
.SM ID
and group
.SM ID\s0,
respectively, of
the
sending
stream.
.IP
If
.SB O_NDELAY
is not set (see
.BR open (2V)),
.SB I_RECVFD
will block
until./share/man/man4/tcp.4p                                                                                755       0      12        20653  4424741462   7774                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tcp.4p 1.25 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH TCP 4P "24 November 1987"
.SH NAME
tcp \- Internet Transmission Control Protocol
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.LP
.B s = socket(\s-1AF_INET\s0, \s-1SOCK_STREAM\s0, 0);
.fi
.SH DESCRIPTION
.IX  "tcp protocol"  ""  "\fLtcp\fP \(em Internet Transmission Control Protocol"  ""  PAGE START
.IX  Internet  "Transmission Control Protocol tcp"  ""  "Transmission Control Protocol \(em \fLtcp\fP"  ""  PAGE START
.LP
.SM TCP
is the virtual circuit protocol of the Internet protocol family.
It provides reliable, flow-controlled, in order,
two-way transmission of data.
It is a byte-stream protocol used to
support the
.SB SOCK_STREAM
abstraction.
.SM TCP
is layered above the Internet Protocol (\s-1IP\s0),
the Internet protocol family's
unreliable internetwork datagram delivery protocol.
.LP
.SM TCP
uses
.SM IP\s0's
host-level addressing and
adds its own per-host collection of \*(lqport addresses\*(rq.
The endpoints of a
.SM TCP
connection are identified by the
combination of an
.SM IP
address and a
.SM TCP
port number.
Although other protocols, such as the User Datagram Protocol (\s-1UDP\s0),
may use the same host and port address format,
the port space of these protocols is distinct.
See
.BR inet (4F)
for details on the common aspects of addressing in the Internet
protocol family.
.LP
Sockets utilizing
.SM TCP
are either \*(lqactive\*(rq or
\*(lqpassive\*(rq.
Active sockets initiate connections to passive sockets.
Both types of sockets must have their local IP address and
.SM TCP
port
number bound with the
.BR bind (2)
system call after the socket is created.
By default,
.SM TCP
sockets are active.
A passive socket is created by calling the
.BR listen (2)
system call after binding the socket with
.B bind .
This establishes a queueing parameter for the passive socket.
After this, connections to the passive socket can be received with the
.BR accept (2)
system call.
Active sockets use the
.BR connect (2)
call after binding to initiate connections.
.LP
By using the special value
.BR \s-1INADDR_ANY\s0 ,
the local
.SM IP
address can be left unspecified in the
.B bind
call by either active or passive
.SM TCP
sockets.
This feature is usually used if
the local address is either unknown or irrelevant.
If left unspecified,
the local
.SM IP
address will be bound at connection
time to the address of the network interface used to
service the connection.
.LP
Once a connection has been established,
data can be exchanged using the
.BR read (2V)
and
.BR write (2V)
system calls.
.LP
.SM TCP
supports one socket option which is set with
.B setsockopt
and tested with
.BR getsockopt (2).
Under most circumstances,
.SM TCP
sends data when it is presented.
When outstanding data has not yet been acknowledged, it gathers
small amounts of output to be sent in a single packet once
an acknowledgement is received.
For a small number of clients, such as window systems
that send a stream of mouse events which receive no replies,
this packetization may cause significant delays.
Therefore,
.SM TCP
provides a boolean option,
.SM TCP_NODELAY
(defined in
.BR <netinet/tcp.h> ),
to defeat this algorithm.
The option level for the
.B setsockopt
call is the protocol number for
.SM TCP\s0,
available from
.B getprotobyname
(see
.BR getprotoent (3N)).
.LP
Options at the
.SM IP
level may be used with
.SM TCP\s0;
see
.BR ip (4P).
.LP
.SM TCP
provides an urgent data mechanism,
which may be invoked using the out-of-band provisions of
.BR send (2).
The caller may mark one byte as \(lqurgent\(rq with the
.SB MSG_OOB
flag to
.BR send (2) .
This causes an \(lqurgent pointer\(rq pointing to this byte to be
set in the
.SM TCP
stream.
The receiver on the other side of the stream is notified
of the urgent data by a SIGURG signal.
The
.SB SIOCATMARK
ioctl returns a value indicating whether the stream
is at the urgent mark.
Because the system never returns data across the urgent mark
in a single
.BR read (2V)
call,
it is possible to advance to the urgent data in a simple loop
which reads data,
testing the socket with the
.SB SIOCATMARK
ioctl,
until it reaches the mark.
.LP
Incoming connection requests that include an
.SM IP
source route
option are noted,
and the reverse source route is used in responding.
.br
.ne 6
.LP
.SM TCP
assumes the datagram service it is layered above is unreliable.
A checksum over all data helps
.SM TCP
implement reliability.
Using a window-based flow control mechanism that
makes use of positive acknowledgements, sequence numbers, and
a retransmission strategy,
.SM TCP
can usually recover when datagrams are damaged,
delayed, duplicated or delivered
out of order by the underlying communication medium.
.LP
If the local
.SM TCP
receives no acknowledgements from its peer for
a period of time,
as would be the case if the remote machine crashed,
the connection is closed and an error is returned to the user.
If the remote machine reboots or otherwise loses state information
about a
.SM TCP
connection,
the connection is aborted and an error is returned to the user.
.SH ERRORS
A socket operation may fail if:
.TP 20
.SM EISCONN
A
.B connect
operation was attempted on a socket on which a
.B connect
operation had already been performed.
.TP
.SM ETIMEDOUT
A connection was dropped
due to excessive retransmissions.
.TP
.SM ECONNRESET
The remote peer
forced the connection to be closed (usually because the remote machine
has lost state information about the connection due to a crash).
.TP
.SM ECONNREFUSED
The remote
peer actively refused connection establishment (usually because
no process is listening to the port).
.TP
.SM EADDRINUSE
A
.B bind
operation was attempted on a socket with a network address/port pair that has
already been bound to another socket.
.TP
.SM EADDRNOTAVAIL
A
.B bind
operation was attempted on a socket with a network address
for which no network interface exists.
.TP 20
.SM EACCES
A
.B bind
operation was attempted with a \(lqreserved\(rq port number and the effective user
.SM ID
of the process was not super-user.
.TP
.SM ENOBUFS
The system ran out of memory for internal data structures.
.SH SEE ALSO
.BR accept (2),
.BR bind (2),
.BR connect (2),
.BR getsockopt (2),
.BR listen (2),
.BR read (2V),
.BR send (2),
.BR write (2V),
.BR getprotoent (3N),
.BR inet (4F),
.BR ip (4P)
.LP
Postel, Jon,
.IR "Transmission Control Protocol - \s-1DARPA\s0 Internet Program Protocol Specification" ,
.SM RFC
793,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
September 1981.
.SH BUGS
.LP
.SB SIOCSHIWAT
and
.SB SIOCGHIWAT
ioctl's to set and get the high water mark
for the socket queue, and so that it can be changed from 2048 bytes
to be larger or smaller, have been defined (in
.BR <sys/ioctl.h> )
but not
implemented.
.IX  "ioctls for sockets"  "SIOCSHIWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  set "high water mark ioctl \(em \fLSIOCSHIWAT\fP"
.IX  "TCP ioctls"  "SIOCSHIWAT"  "TCP \fLioctl\fP's"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "ioctls for sockets"  "SIOCGHIWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  "SIOCGHIWAT get high water mark"  ""  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  get "high water mark \fLioctl\fP \(em \fLSIOCGHIWAT\fP"
.IX  "TCP ioctls"  "SIOCGHIWAT"  "TCP \fLioctl\fP's"  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  "ioctls for sockets"  "SIOCSLOWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  "SIOCSLOWAT set low water mark"  ""  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  set "low water mark ioctl \(em \fLSIOCSLOWAT\fP"
.IX  "TCP ioctls"  "SIOCSLOWAT"  "TCP \fLioctl\fP's"  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  "ioctls for sockets"  "SIOCGLOWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  "SIOCGLOWAT get low water mark"  ""  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  get "low water mark \fLioctl\fP \(em \fLSIOCGLOWAT\fP"
.IX  "TCP ioctls"  "SIOCGLOWAT"  "TCP \fLioctl\fP's"  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  "tcp protocol"  ""  "\fLtcp\fP \(em Internet Transmission Control Protocol"  ""  PAGE END
.IX  Internet  "Transmission Control Protocol tcp"  ""  "Transmission Control Protocol \(em \fLtcp\fP"  ""  PAGE END
ism is provided to permit a process to specify timeouts
and variable-sized amounts of./share/man/man4/termio.4                                                                              755       0      12       135554  4424741463  10355                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)termio.4 1.20 89/03/27 SMI;
.hw CLOCAL
.hw DISCARD
.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 TERMIO 4 "22 March 1989"
.SH NAME
termio \- general terminal interface
.SH SYNOPSIS
.B "#include <sys/termios.h>
.SH DESCRIPTION
.IX "terminal" "I/O, see \fLtermio\fP(4)"
.IX "tty I/O, see \fLtermio\fP(4)"
.IX I/O "terminals, see \fLtermio\fP(4)"
.IX I/O "tty, see \fLtermio\fP(4)"
.LP
Asynchronous communications ports, pseudo-terminals, and the special
interface accessed by
.B /dev/tty
all use the same general interface, no matter what hardware (if any) is
involved.  The remainder of this section discusses the common features of
this interface.
.SS "Opening a Terminal Device File"
.LP
When a terminal file is opened, the process normally
waits until a connection is established.
(In practice, users' programs seldom open these
files; they are opened by
.BR getty (8)
and become a user's
standard input, output, and error files.)  If the
.SB O_NDELAY
flag was set in the second argument to
.BR open (2V),
the
.B open(\|)
will complete immediately without waiting for a connection to be established.
.SS "Process Groups"
.LP
A terminal may have a distinguished process group associated with it.
This distinguished process group plays a special role in handling
signal-generating input characters, as discussed below in the
.B "Special Characters"
section below.
.LP
A command interpreter, such as
.BR csh (1),
that supports \(lqjob control\(rq can allocate the terminal to different
.IR jobs ,
or process groups,
by placing related processes in a single process group and associating this
process group with the terminal.  A terminal's associated process group
may be set or examined by a process with sufficient privileges.
The terminal interface aids in this allocation by restricting access
to the terminal by processes that are not in the current process group;
see
.B "Job Access Control"
below.
.SS "The Controlling Terminal"
.LP
A terminal may belong to a process as its
.IR "controlling terminal" .
If a process that is a \(lqsession process group leader\(rq, and that does not
have a controlling terminal, opens a terminal file not already associated
with a process group, the terminal associated with that terminal file becomes
the controlling terminal for that process, and the terminal's distinguished
process group is set to the process group of that process.
(Currently, this also happens if a process that does not have a
controlling terminal and is not a member of a process group opens a
terminal.  In this case, if the terminal is not associated with a process
group, a new process group is created with a process group
.SM ID
equal to the process
.SM ID
of the process in question, and the terminal is
assigned to that process group.
The process is made a member of the
terminal's process group.)
.LP
The controlling terminal is inherited by a child process during a
.BR fork (2).
A process relinquishes its control terminal when it changes its process
group using
.BR setpgrp (2V)
or when it issues a
.SB TIOCNOTTY
.BR ioctl (2)
call on a file descriptor created by opening the file
.BR /dev/tty .
.LP
When a session process group leader that has a controlling terminal
terminates, the distinguished process group of the controlling terminal
is set to zero (indicating no distinguished process group).
This allows the terminal to be acquired as a controlling terminal
by a new session process group leader.
.SS "Closing a Terminal Device File"
.LP
When a terminal device file is closed, the process closing the file waits
until all output is drained; all pending input is then flushed,
and finally a disconnect is performed.  If
.SB HUPCL
is set, the existing connection is severed (by hanging up the phone line,
if appropriate).
.SS "Job Access Control"
.LP
If a process is in the (non-zero) distinguished process group of its
controlling terminal, or if the terminal's distinguished process group is
zero (if either of these are true, the process is said to be a
.IR "foreground process" ),
then
.BR read (2V)
operations are allowed as described below in
.BR "Input Processing and Reading Characters" .
If a process is not in the (non-zero) distinguished process group of its
controlling terminal (if this is true, the process is said to be a
.IR "background process" ),
then any attempts to read from that terminal
will send that process' process group a
.SB SIGTTIN
signal, unless the process is ignoring
.SM
.BR SIGTTIN\s0 ,
has
.SB SIGTTIN
blocked, or is in the middle of process creation using
.BR vfork (2);
in that case, the read will return \-1 and set
.B errno
to
.BR \s-1EIO\s0 ,
and the
.SB SIGTTIN
signal will not be sent.  The
.SB SIGTTIN
signal will normally stop the members of that process group.
.LP
When the
.SB TOSTOP
bit is set in the
.B c_lflag
field, attempts by a background process to write to its controlling terminal
will send that process' process group a
.SB SIGTTOU
signal, unless the process is ignoring
.SM
.BR SIGTTOU\s0 ,
has
.SB SIGTTOU
blocked, or is in the middle of process creation using
.BR vfork(\|) ;
in that case, the process will be allowed to write to the terminal and the
.SB SIGTTOU
signal will not be sent. The
.SB SIGTTOU
signal will normally stop the members of that process group.  Certain
.B ioctl(\)
calls that set terminal parameters are treated in this same fashion, except
that
.SB TOSTOP
is not checked; the effect is identical to that of terminal writes when
.SB TOSTOP
is set.  See
.SM
.BR IOCTLS\s0 .
.SS "Input Processing and Reading Characters"
A terminal associated with one of these files ordinarily
operates in full-duplex mode.
Characters may be typed at any time,
even while output is occurring, and are only lost when the
system's character input buffers become completely
full, which is rare,
or when the user has accumulated the maximum allowed number of
input characters that have not yet been read by some program.
Currently, this limit is 256 characters.
If the
.SB IMAXBEL
mode has not been selected, all the
saved characters are thrown away without notice
when the input limit is reached; if the
.SB IMAXBEL
mode has been selected, the driver refuses to accept any further
input, and echoes a bell (\s-1ASCII\s+1
.SM BEL\s0).
.LP
Two general kinds of input processing are available, determined by whether
the terminal device file is in canonical mode or non-canonical mode (see
.SB ICANON
in the
.B Local Modes
section).
.LP
The style of input processing can also be very different when
the terminal is put in non-blocking I/O mode; see
.BR read (2V).
In this case, reads from the terminal will never block.
.LP
It is possible to simulate terminal input using the
.SB TIOCSTI
.B ioctl(\|)
call, which takes, as its third argument,
the address of a character.  The system pretends that this character
was typed on the argument terminal, which must be the process' controlling
terminal unless the process' effective user
.SM ID
is super-user.
.SS "Canonical Mode Input Processing"
.LP
In canonical mode input processing, terminal input is processed in units of
lines.  A line is delimited by a 
.SM NEWLINE
(\s-1ASCII\s+1
.SM LF\s0)
character, an 
.SM EOF
(by default, an 
.SM ASCII EOT\s0)
character, or one of two user-specified end-of-line characters,
.SB EOL
and
.SM
.BR EOL2\s0 .
This means that a
.B read(\|)
will not complete until an entire line has been typed or a signal has been
received.  Also, no matter how many characters are requested
in the read call, at most one line will be returned.
It is not, however, necessary to read a whole line at
once; any number of characters may be
requested in a read, even one, without losing information.
.LP
Erase and kill processing occurs during input.  The
.SB ERASE
character (by default, the character
.SM DEL\s0)
erases the
last character typed in the current input line.  The
.SB WERASE
character (by default, the character
.SM CTRL\s0-W)
erases the last \(lqword\(rq
typed in the current input line (but not any preceding
.SM SPACE
or
.SM TAB
characters).
A \(lqword\(rq is defined as a
sequence of non-blank characters, with
.SM TAB
characters counted as blanks.  Neither
.SB ERASE
nor
.SB WERASE
will erase beyond the beginning of the line.  The
.SB KILL
character (by default, the character 
.SM CTRL\s0-U)
kills (deletes) the entire
current input line, and optionally outputs a 
.SM NEWLINE
character.  All these
characters operate on a key-stroke basis, independently
of any backspacing or tabbing that may have been done.
.LP
The
.SB REPRINT
character (the character 
.SM CTRL\s0-R)
prints a 
.SM NEWLINE
followed by all
characters that have not been read.  Reprinting also occurs automatically
if characters that would normally be erased from the screen are fouled by
program output.  The characters are reprinted as if they were being echoed;
as a consequence, if
.SB ECHO
is not set, they are not printed.
.LP
The
.SB ERASE
and
.SB KILL
characters may be entered literally by preceding them with
the escape character
.RB ( \e ).
In this case the escape character is not read.  The
.SB ERASE
and
.SB KILL
characters may be changed.
.SS "Non-Canonical Mode Input Processing"
.LP
In non-canonical mode input processing,
input characters are not assembled into lines, and erase and kill processing
does not occur.
The
.SB MIN
and
.SB TIME
values are used to determine how to process the characters received.
.LP
.SB MIN
represents the minimum number of characters that should be received 
when the read is satisfied (when the characters are returned to the
user).
.SB TIME
is a timer of 0.10 second granularity that is used to timeout
bursty and short term data transmissions.
The four possible values for
.SB MIN
and
.SB TIME
and their interactions are described below.
.SS "Case A: \s-1MIN\s0 > 0, \s-1TIME\s0 > 0"
.LP
In this case
.SB TIME
serves as an intercharacter timer and is activated after
the first character is received. Since it is an intercharacter timer, it
is reset after a character is received.
The interaction between
.SB MIN
and
.SB TIME
is as follows:
as soon as one character is received, the intercharacter timer is started.
If
.SB MIN
characters are received before the intercharacter timer
expires (remember that the timer is reset upon receipt
of each character),
the read is satisfied.
If the timer expires before
.SB MIN
characters are received, 
the characters received to that point
are returned to the user.
Note: if
.SB MIN
expires at least one character will be returned because 
the timer would not have been enabled unless a character was received.
In this case
.RB ( \s-1MIN\s0
> 0,
.SB TIME
> 0)
the read will sleep until the
.SB MIN
and
.SB TIME
mechanisms are activated by the receipt of the first character.
.SS "Case B: \s-1MIN\s0 > 0, \s-1TIME\s0 = 0"
.LP
In this case, since the value of
.SB TIME
is zero, the timer plays no role and only
.SB MIN
is significant.
A pending read is not satisfied until
.SB MIN
characters are received (the pending read will sleep until
.SB MIN
characters are received).
A program that uses this case to read record-based terminal I/O may block
indefinitely in the read operation.
.SS "Case C: \s-1MIN\s0 = 0, \s-1TIME\s0 > 0"
.LP
In this case, since
.SB MIN
= 0,
.SB TIME
no longer represents an intercharacter timer.
It now serves as a read timer that is activated as soon as a
.B read(\|)
is done.
A read is satisfied as soon as a single
character is received or the read timer expires.
Note: in this case if the timer expires,
no character will be returned.
If the timer does not expire, the only way the read can be satisfied is if a 
character is received.
In this case the read will not block indefinitely
waiting for a character \- if no character is received within
.BR \s-1TIME\s0 *.10
seconds after the
read is initiated, the read will return with zero characters.
.SS "Case D: \s-1MIN\s0 = 0, \s-1TIME\s0 = 0"
.LP
In this case return is immediate.
The minimum of either the number of characters requested or the number of
characters currently available will be returned without waiting for more
characters to be input.
.SS "Comparison of the Different Cases of \s-1MIN\s0, \s-1TIME\s0 Interaction"
.LP
Some points to note about
.SB MIN
and
.SM
.BR TIME :
.IP \(bu
In the following explanations one may notice that the interactions of
.SB MIN
and
.SB TIME
are not symmetric.
For example, when
.SB MIN
> 0 and
.SB TIME
= 0,
.SB TIME
has no effect.
However, in the opposite case where
.SB MIN
= 0 and
.SB TIME
> 0, both
.SB MIN
and
.SB TIME
play a role in that
.SB MIN
is satisfied with the receipt of a single character.
.IP \(bu
Also note that in case A
.RB ( \s-1MIN\s0
> 0,
.SB TIME
> 0),
.SB TIME
represents an intercharacter timer while in case C
.RB ( \s-1TIME\s0
= 0,
.SB TIME
> 0)
.SB TIME
represents a read timer.
.LP
These two points highlight the dual purpose of the
.SB MIN/TIME
feature.
Cases A and B, where
.SB MIN
> 0, exist to handle burst mode activity
(for example, file transfer programs) where a program would like to
process at least
.SB MIN
characters at a time.
In case A, the intercharacter timer is activated by a user as a safety
measure; while in case B, it is turned off.
.LP
Cases C and D exist to handle single character timed transfers.
These cases are readily adaptable to screen-based applications that
need to know if a character is present in the input queue
before refreshing the screen. In case C the read is timed; while in case D,
it is not.
.LP
Another important note is that
.SB MIN
is always just a minimum. 
It does not denote a record length.
That is, if a program does a read of 20 bytes,
.SB MIN
is 10, and 25 characters are present, 20 characters will be returned
to the user.
.SS "Writing Characters"
.LP
When one or more
characters are written, they are transmitted
to the terminal as soon as previously-written characters
have finished typing.
Input characters are echoed as they are typed if echoing has been enabled.
If a process produces characters more rapidly than they can be typed,
it will be suspended when its output queue exceeds some limit.
When the queue has drained down to some threshold,
the program is resumed.
.SS "Special Characters"
.LP
Certain characters have special functions on input and/or output.
These functions and their default character values
are summarized as follows:
.TP "\w'MMMMMMM\ \ \ 'u"
.SB INTR
(\s-1CTRL\s0-C
or
.SM ASCII
.SM ETX\s0)
generates a
.SB SIGINT
signal, which is sent to all processes in the distinguished process group
associated with the terminal.
Normally, each such process is forced to terminate,
but arrangements may be made either to
ignore the signal or to receive a
trap to an agreed-upon location; see
.BR sigvec (2).
.TP
.SB QUIT
(\s-1CTRL\s0-\(bv
or
.SM ASCII
.SM FS\s0)
generates a
.SB SIGQUIT
signal, which is sent to all processes in the distinguished process group
associated with the terminal.
Its treatment is identical to the interrupt signal
except that, unless a receiving process has
made other arrangements, it will not only be terminated
but a core image file
(called
.BR core )
will be created in the current working directory.
.TP
.SB ERASE
(Rubout or
.SM ASCII
.SM DEL\s0)
erases the preceding character.
It will not erase beyond the start of a line,
as delimited by a
.SM
.BR NL\s0 ,
.SM
.BR EOF\s0 ,
.SM
.BR EOL\s0 ,
or
.SB EOL2
character.
.TP
.SB WERASE
(\s-1CTRL\s0-W
or
.SM ASCII
.SM ETB\s0)
erases the preceding \(lqword\(rq.
It will not erase beyond the start of a line,
as delimited by a
.SM
.BR NL\s0 ,
.SM
.BR EOF\s0 ,
.SM
.BR EOL\s0 ,
or
.SM
.BR EOL2
character.
.TP
.SB KILL
(\s-1CTRL\s0-U
or
.SM ASCII
.SM NAK\s0)
deletes the entire line,
as delimited by a
.SM
.BR NL\s0 ,
.SM
.BR EOF\s0,
.SM
.BR EOL\s0,
or
.SB EOL2
character.
.TP
.SB REPRINT
(\s-1CTRL\s0-R
or
.SM ASCII
.SM DC2\s0)
reprints all characters that have not been read,
preceded by a
.SM NEWLINE\s0.
.TP
.SB EOF
(\s-1CTRL\s0-D
or
.SM ASCII
.SM EOT\s0)
may be used to generate an end-of-file
from a terminal.
When received, all the characters
waiting to be read are immediately passed to
the program, without waiting for a 
.SM NEWLINE\s0,
and the
.SB EOF
is discarded.
Thus, if there are no characters waiting, which
is to say the
.SB EOF
occurred at the beginning of a line,
zero characters will be passed back,
which is the standard end-of-file indication.
.TP
.SB NL
(\s-1ASCII\s+1
.SM LF\s0)
is the normal line delimiter.
It can not be changed; it can, however, be escaped by the
.SB LNEXT
character.
.TP
.SB EOL
.PD 0
.TP
.SB EOL2
(\s-1ASCII\s+1
.SM NUL\s0)
are additional line delimiters, like
.SM
.BR NL\s0 .
They are not normally used.
.PD
.TP
.SB SUSP
(\s-1CTRL\s0-Z
or
.SM ASCII
.SM EM\s0)
is used by the job control facility to change the current job to
return to the controlling job.
It generates a
.SB SIGTSTP
signal, which stops all processes in the terminal's process group.
.TP
.SB STOP
(\s-1CTRL\s0-S
or
.SM ASCII
.SM DC3\s0)
can be used to temporarily suspend output.
It is useful with
.SM CRT
terminals to prevent output from
disappearing before it can be read.
While output is suspended,
.SB STOP
characters are ignored and not read.
.TP
.SB START
(\s-1CTRL\s0-Q
or
.SM ASCII
.SM DC1\s0)
is used to resume output that has been suspended by a
.SB STOP
character.
While output is not suspended,
.SB START
characters are ignored and not read.
.TP
.SB DISCARD
(\s-1CTRL\s0-O
or
.SM ASCII
.SM SI\s0)
causes subsequent output to be discarded until another
.SB DISCARD
character is typed, more input arrives, or the condition is cleared
by a program.
.TP
.SB LNEXT
(\s-1CTRL\s0-V
or
.SM ASCII
.SM SYN\s0)
causes the special meaning of the next character to be ignored; this works
for all the special characters mentioned above.
This allows characters to be input that would otherwise get
interpreted by the system (for example,
.BR \s-1KILL\s0 ,
.BR \s-1QUIT\s0 .)
.LP
The character values for
.SM
.BR INTR\s0 ,
.SM
.BR QUIT\s0 ,
.SM
.BR ERASE\s0 ,
.SM
.BR WERASE\s0 ,
.SM
.BR KILL\s0 ,
.SM
.BR REPRINT\s0 ,
.SM
.BR EOF\s0 ,
.SM
.BR EOL\s0 ,
.SM
.BR EOL2\s0 ,
.SM
.BR SUSP\s0 ,
.SM
.BR STOP\s0 ,
.SM
.BR START\s0 ,
.SM
.BR DISCARD\s0 ,
and
.SB LNEXT
may be changed to suit individual tastes.  If the value of a
special control character is 0, the function of that special control
character will be disabled.
The
.SM
.BR ERASE\s0 ,
.SM
.BR KILL\s0 ,
and
.SB EOF
characters may be escaped
by a preceding
.B \e
character,
in which case no special function is done.
Any of the special characters may be preceded by the
.SB LNEXT
character, in which case no special function is done.
.SS "Modem Disconnect"
.LP
If a modem disconnect is detected, and the
.SB CLOCAL
flag is not set in the
.B c_cflag
field, a
.SB SIGHUP
signal is sent to all processes
in the distinguished process group associated with this terminal.
Unless other arrangements have been made,
this signal terminates the processes.  If
.SB SIGHUP
is ignored or caught, any subsequent
.B read(\|)
returns with an end-of-file indication until the terminal is closed.
Thus, programs that read a terminal and test for
end-of-file can terminate appropriately after a disconnect.
Any subsequent
.B write(\|)
will return \-1 and set
.B errno
to
.SB EIO
until the terminal is closed.
.SS "Terminal Parameters"
.LP
The parameters that control the behavior of devices and modules
providing the
.B termios
interface are specified by the
.B termios
structure, defined by
.BR <sys/termios.h> .
Several
.B ioctl(\|)
system calls that fetch or change these parameters use this
structure:
.LP
.ta .6i 1.3i 1.8i 2.6i
.RS
.nf
.ft B
#define	\s-1NCCS\s+1	17
struct	termios {
	unsigned	long	c_iflag;	/\(** input modes \(**/
	unsigned	long	c_oflag;	/\(** output modes \(**/
	unsigned	long	c_cflag;	/\(** control modes \(**/
	unsigned	long	c_lflag;	/\(** local modes \(**/
	unsigned	char	c_line;		/\(** line discipline \(**/
	unsigned	char	c_cc[\s-1NCCS\s+1];	/\(** control chars \(**/
};
.ft R
.fi
.RE
.LP
The special control characters are defined by the array
.BR c_cc .
The relative positions and initial values
for each function are as follows:
.RS
.ne 22
.ta 4n +\w'VWERASE\ \ 'u
.nf
0	\s-1VINTR\s+1	\s-1ETX\s+1
1	\s-1VQUIT\s+1	\s-1FS\s+1
2	\s-1VERASE\s+1	\s-1DEL\s+1
3	\s-1VKILL\s+1	\s-1NAK\s+1
4	\s-1VEOF\s+1	\s-1EOT\s+1
5	\s-1VEOL\s+1	\s-1NUL\s+1
6	\s-1VEOL2\s+1	\s-1NUL\s+1
7	\s-1VSWTCH\s+1	\s-1NUL\s+1
8	\s-1VSTART\s+1	\s-1DC1\s+1
9	\s-1VSTOP\s+1	\s-1DC3\s+1
10	\s-1VSUSP\s+1	\s-1EM\s+1
12	\s-1VREPRINT\s+1	\s-1DC2\s+1
13	\s-1VDISCARD\s+1	\s-1SI\s+1
14	\s-1VWERASE\s+1	\s-1ETB\s+1
15	\s-1VLNEXT\s+1	\s-1SYN\s+1
.fi
.RE
.LP
The
.SB MIN
value is stored in the
.SB VMIN
element of the
.B c_cc
array, and the
.SB TIME
value is stored in the
.SB VTIME
element of the
.B c_cc
array.  The
.SB VMIN
element is the same element as the
.SB VEOF
element, and the
.SB VTIME
element is the same element as the
.SB VEOL
element.
.SS "Input Modes"
.LP
The
.B c_iflag
field describes the basic terminal input control:
.LP
.ta \w'MAXMAX\ \ 'u +\w'0100000\ \ 'u
.RS
.nf
\fB\s-1IGNBRK\s0\fP	0000001	Ignore break condition.
\fB\s-1BRKINT\s0\fP	0000002	Signal interrupt on break.
\fB\s-1IGNPAR\s0\fP	0000004	Ignore characters with parity errors.
\fB\s-1PARMRK\s0\fP	0000010	Mark parity errors.
\fB\s-1INPCK\s0\fP	0000020	Enable input parity check.
\fB\s-1ISTRIP\s0\fP	0000040	Strip character.
\fB\s-1INLCR\s0\fP	0000100	Map \s-1NL\s+1 to \s-1CR\s+1 on input.
\fB\s-1IGNCR\s0\fP	0000200	Ignore \s-1CR\s+1.
\fB\s-1ICRNL\s0\fP	0000400	Map \s-1CR\s+1 to \s-1NL\s+1 on input.
\fB\s-1IUCLC\s0\fP	0001000	Map upper-case to lower-case on input.
\fB\s-1IXON\s0\fP	0002000	Enable start/stop output control.
\fB\s-1IXANY\s0\fP	0004000	Enable any character to restart output.
\fB\s-1IXOFF\s0\fP	0010000	Enable start/stop input control.
\fB\s-1IMAXBEL\s0\fP	0020000	Echo \s-1BEL\s+1 on input line too long.
.fi
.RE
.LP
If
.SB IGNBRK
is set, a break condition
(a character framing error with data all zeros)
detected on input is ignored, that is, not put on the input queue
and therefore not read by any process.
Otherwise, if
.SB BRKINT
is set, a break condition will generate a
.SB SIGINT
and flush both the input and output queues.
If neither
.SB IGNBRK
nor
.SB BRKINT
is set, a break condition
is read as a single 
.SM ASCII NUL
character (\(aa\e0\(aa).
.LP
If
.SB IGNPAR
is set,
characters with framing or parity errors (other than break) are ignored.
Otherwise, if
.SB PARMRK
is set,
a character with
a framing or parity error that is not ignored
is read as the three-character sequence:
\(aa\e377\(aa, \(aa\e0\(aa,
.IR X ,
where
.I X
is the data of the character received in error. 
To avoid ambiguity in this case, if
.SB ISTRIP
is not set,
a valid character of \(aa\e377\(aa is read as \(aa\e377\(aa, \(aa\e377\(aa.
If neither
.SB IGNPAR
nor
.SB PARMRK
is set, a framing or parity error (other than break)
is read as a single
.SM ASCII NUL
character (\(aa\e0\(aa).
.LP
If
.SB INPCK
is set,
input parity checking is enabled.
If
.SB INPCK
is not set,
input parity checking is disabled.
This allows output parity generation without
input parity errors.
.LP
If
.SB ISTRIP
is set,
valid input characters are first stripped to
7 bits,
otherwise all 8 bits are processed.
.LP
If
.SB INLCR
is set,
a received
.SM NL
character is translated into a
.SM CR
character.
If
.SB IGNCR
is set,
a received
.SM CR
character is ignored (not read).
Otherwise if
.SB ICRNL
is set,
a received
.SM CR
character is translated into a
.SM NL
character.
.LP
If
.SB IUCLC
is set,
a received upper-case alphabetic character is translated
into the corresponding lower-case character.
.LP
If
.SB IXON
is set,
start/stop output control is enabled.
A received
.SB STOP
character will suspend output
and a received
.SB START
character will restart output.
The
.SB STOP
and
.SB START
characters will not be read, but will merely perform flow control
functions.
If
.SB IXANY
is set, any input character will restart output that has been suspended.
.LP
If
.SB IXOFF
is set,
the system will transmit a
.SB STOP
character when the input queue is nearly full, and a
.SB START
character when enough input has been read that the input queue is nearly
empty again.
.LP
If
.SB IMAXBEL
is set, the
.SM ASCII
.SM BEL
character is echoed if the input stream overflows.  Further input
will not be stored, but any input already present in the input
stream will not be disturbed.
If
.SB IMAXBEL
is not set, no
.SM BEL
character is echoed, and all input present in the input queue is
discarded if the input stream overflows.
.LP
The initial input control value is
.SM
.BR BRKINT\s0 ,
.SM
.BR ICRNL\s0 ,
.SM
.BR IXON\s0 ,
.SM
.BR ISTRIP\s0 .
.SS "Output modes"
The
.B c_oflag
field specifies the system treatment of output:
.LP
.ta \w'MAXMAX\ \ 'u +\w'0100000\ \ 'u
.RS
.nf
\fB\s-1OPOST\s0\fP	0000001	Postprocess output.
\fB\s-1OLCUC\s0\fP	0000002	Map lower case to upper on output.
\fB\s-1ONLCR\s0\fP	0000004	Map \s-1NL\s+1 to \s-1CR-NL\s+1 on output.
\fB\s-1OCRNL\s0\fP	0000010	Map \s-1CR\s+1 to \s-1NL\s+1 on output.
\fB\s-1ONOCR\s0\fP	0000020	No \s-1CR\s+1 output at column 0.
\fB\s-1ONLRET\s0\fP	0000040	\s-1NL\s+1 performs \s-1CR\s+1 function.
\fB\s-1OFILL\s0\fP	0000100	Use fill characters for delay.
\fB\s-1OFDEL\s0\fP	0000200	Fill is \s-1DEL\s+1, else \s-1NUL\s+1.
\fB\s-1NLDLY\s0\fP	0000400	Select new-line delays:
\0\0\fB\s-1NL0\s0\fP	0
\0\0\fB\s-1NL1\s0\fP	0000400
\fB\s-1CRDLY\s0\fP	0003000	Select carriage-return delays:
\0\0\fB\s-1CR0\s0\fP	0
\0\0\fB\s-1CR1\s0\fP	0001000
\0\0\fB\s-1CR2\s0\fP	0002000
\0\0\fB\s-1CR3\s0\fP	0003000
\fB\s-1TABDLY\s0\fP	0014000	Select horizontal-tab delays:
\0\0\fB\s-1TAB0\s0\fP	0\0\0\0\0\0\0\0\0\0or tab expansion:
\0\0\fB\s-1TAB1\s0\fP	0004000
\0\0\fB\s-1TAB2\s0\fP	0010000
\0\0\fB\s-1XTABS\s0\fP	0014000	Expand tabs to spaces.
\fB\s-1BSDLY\s0\fP	0020000	Select backspace delays:
\0\0\fB\s-1BS0\s0\fP	0
\0\0\fB\s-1BS1\s0\fP	0020000
\fB\s-1VTDLY\s0\fP	0040000	Select vertical-tab delays:
\0\0\fB\s-1VT0\s0\fP	0
\0\0\fB\s-1VT1\s0\fP	0040000
\fB\s-1FFDLY\s0\fP	0100000	Select form-feed delays:
\0\0\fB\s-1FF0\s0\fP	0
\0\0\fB\s-1FF1\s0\fP	0100000
.DT
.fi
.RE
.LP
If
.SB OPOST
is set,
output characters are post-processed
as indicated by the remaining flags,
otherwise characters are transmitted without change.
.LP
If
.SB OLCUC
is set,
a lower-case alphabetic character is transmitted as
the corresponding upper-case character.
This function is often used in conjunction with
.SM
.BR IUCLC\s0 .
.LP
If
.SB ONLCR
is set,
the
.SM NL
character is transmitted as the
.SM CR-NL
character pair.
If
.SB OCRNL
is set,
the
.SM CR
character is transmitted as the
.SM NL
character.
If
.SB ONOCR
is set,
no
.SM CR
character is transmitted when at column 0 (first position).
If
.SB ONLRET
is set,
the
.SM NL
character is assumed to do the carriage-return function;
the column pointer will be set to 0 and the delays specified
for
.SM CR
will be used.
Otherwise the
.SM NL
character is assumed
to do just the line-feed function;
the column pointer will remain unchanged.
The column pointer is also set to 0 if the
.SM CR
character is actually transmitted.
.LP
The delay bits specify how long
transmission stops to allow for mechanical or other movement
when certain characters are sent to the terminal.
In all cases a value of 0 indicates no delay.
If
.SB OFILL
is set, fill characters will be transmitted
for delay instead of a timed delay.
This is useful for high baud rate terminals
that need only a minimal delay.
If
.SB OFDEL
is set,
the fill character is
.SM DEL\s0,
otherwise
.SM NUL\s0.
.LP
If a form-feed or vertical-tab delay is specified,
it lasts for about 2 seconds.
.LP
New-line delay lasts about 0.10 seconds.
If
.SB ONLRET
is set, the
.SM RETURN
delays are used instead of the 
.SM NEWLINE
delays.
If
.SB OFILL
is set,
two fill characters will be transmitted.
.LP
Carriage-return delay type 1 is dependent on the current column
position,
type 2 is about 0.10 seconds,
and type 3 is about 0.15 seconds.
If
.SB OFILL
is set,
delay type 1 transmits two fill characters,
and type 2, four fill characters.
.LP
Horizontal-tab delay type 1 is dependent on the current
column position.
Type 2 is about 0.10 seconds.
Type 3, specified by
.SB TAB3
or
.SM
.BR XTABS\s0 ,
specifies that
.SM TAB
characters are to be expanded into
.SM SPACE
characters.
If
.SB OFILL
is set,
two fill characters will be transmitted for any delay.
.LP
Backspace delay lasts about 0.05 seconds.
If
.SB OFILL
is set, one fill character will be transmitted.
.LP
The actual delays depend on line speed and system load.
.LP
The initial output control value is
.SM
.BR OPOST\s0 ,
.SM
.BR ONLCR\s0 ,
.SM
.BR XTABS\s0 .
.LP
The
.B c_cflag
field describes the hardware control of the terminal:
.LP
.ta \w'MAXMAX\ \ 'u +\w'020000000000\ \ 'u
.RS
.nf
\fB\s-1CBAUD\s0\fP	0000017		Baud rate:
\0\0\fBB0\fP	0		Hang up
\0\0\fBB50\fP	0000001		50 baud
\0\0\fBB75\fP	0000002		75 baud
\0\0\fBB110\fP	0000003		110 baud
\0\0\fBB134\fP	0000004		134.5 baud
\0\0\fBB150\fP	0000005		150 baud
\0\0\fBB200\fP	0000006		200 baud
\0\0\fBB300\fP	0000007		300 baud
\0\0\fBB600\fP	0000010		600 baud
\0\0\fBB1200\fP	0000011		1200 baud
\0\0\fBB1800\fP	0000012		1800 baud
\0\0\fBB2400\fP	0000013		2400 baud
\0\0\fBB4800\fP	0000014		4800 baud
\0\0\fBB9600\fP	0000015		9600 baud
\0\0\fBB19200\fP	0000016		19200 baud
\0\0\fBB38400\fP	0000017		38400 baud
\fB\s-1CSIZE\s0\fP	0000060		Character size:
\0\0\fBCS5\fP	0		5 bits
\0\0\fBCS6\fP	0000020		6 bits
\0\0\fBCS7\fP	0000040		7 bits
\0\0\fBCS8\fP	0000060		8 bits
\fB\s-1CSTOPB\s0\fP	0000100		Send two stop bits, else one.
\fB\s-1CREAD\s0\fP	0000200		Enable receiver.
\fB\s-1PARENB\s0\fP	0000400		Parity enable.
\fB\s-1PARODD\s0\fP	0001000		Odd parity, else even.
\fB\s-1HUPCL\s0\fP	0002000		Hang up on last close.
\fB\s-1CLOCAL\s0\fP	0004000		Local line, else dial-up.
\fB\s-1CIBAUD\s0\fP	03600000		Input baud rate, if different from output rate.
\fB\s-1CRTSCTS\s0\fP	020000000000		Enable RTS/CTS flow control.
.fi
.RE
.LP
The
.SB CBAUD
bits specify the baud rate.
The zero baud rate,
.B B0,
is used to hang up the connection.  If
.B B0
is specified, the modem control lines will cease to be asserted.
Normally, this will disconnect the line.
If the
.SB CIBAUD
bits are not zero, they specify the input baud rate, with the
.SB CBAUD
bits specifying the output baud rate;
otherwise, the output and input baud rates are both specified by the
.SB CBAUD
bits.
The values for the
.SB CIBAUD
bits are the same as the values for the
.SB CBAUD
bits, shifted left
.SB IBSHIFT
bits.
For any particular hardware, impossible speed changes are ignored.
.LP
The
.SB CSIZE
bits specify the character size in bits
for both transmission and reception.
This size does not include the parity bit, if any.
If
.SB CSTOPB
is set, two stop bits are used,
otherwise one stop bit.
For example, at 110 baud, two stop bits are required.
.LP
If
.SB PARENB
is set, parity generation and detection is enabled
and a parity bit is added to each character.
If parity is enabled,
the
.SB PARODD
flag specifies odd parity if set,
otherwise even parity is used.
.LP
If
.SB CREAD
is set, the receiver is enabled.
Otherwise no characters will be received.
.LP
If
.SB HUPCL
is set, the modem control lines for the port will be disconnected
when the last process with the line open closes it or terminates.
.LP
If
.SB CLOCAL
is set,
a connection does not depend on the state of the modem status lines.
Otherwise modem control is assumed.
.LP
If
.SB CRTSCTS
is set, and the terminal has modem control lines associated with it,
the Request To Send (\s-1RTS\s0) modem control line will be raised, and
output will occur only if the Clear To Send (\s-1CTS\s0) modem status line is
raised.  If the
.SM CTS
modem status line is lowered, output is suspended until
.SM CTS
is raised.  Some hardware may not support this function,
and other hardware may not permit it to be disabled; in either of
these cases, the state of the
.SB CRTSCTS
flag is ignored.
.LP
The initial hardware control value after open is
.BR B9600 ,
.BR CS7 ,
.SM
.BR CREAD\s0 ,
.SM
.BR PARENB\s0 .
.SS "Local Modes"
The
.B c_lflag
field of the argument structure
is used by the line discipline to control terminal functions.
The basic line discipline provides the following:
.LP
.ta \w'MAXMAX\ \ 'u +\w'01000000\ \ 'u
.RS
.nf
\fB\s-1ISIG\s0\fP	0000001	Enable signals.
\fB\s-1ICANON\s0\fP	0000002	Canonical input (erase and kill processing).
\fB\s-1XCASE\s0\fP	0000004	Canonical upper/lower presentation.
\fB\s-1ECHO\s0\fP	0000010	Enable echo.
\fB\s-1ECHOE\s0\fP	0000020	Echo erase character as \s-1BS-SP-BS\s+1.
\fB\s-1ECHOK\s0\fP	0000040	Echo \s-1NL\s+1 after kill character.
\fB\s-1ECHONL\s0\fP	0000100	Echo \s-1NL\s+1.
\fB\s-1NOFLSH\s0\fP	0000200	Disable flush after interrupt or quit.
\fB\s-1TOSTOP\s0\fP	0000400	Send \fB\s-1SIGTTOU\s0\fP for background output.
\fB\s-1ECHOCTL\s0\fP	0001000	Echo control characters as ^\fIchar\fP, delete as ^?.
\fB\s-1ECHOPRT\s0\fP	0002000	Echo erase character as character erased.
\fB\s-1ECHOKE\s0\fP	0004000	\s-1BS-SP-BS\s+1 erase entire line on line kill.
\fB\s-1FLUSHO\s0\fP	0040000	Output is being flushed.
\fB\s-1PENDIN\s0\fP	0100000	Retype pending input at next read or input character.
.DT
.fi
.RE
.LP
If
.SB ISIG
is set,
each input character is checked against the special
control characters
.SM
.BR INTR\s0 ,
.SM
.BR QUIT\s0 ,
and
.SM
.BR SUSP\s0 .
If an input character matches one of these control characters,
the function associated with that character is performed.
If
.SB ISIG
is not set, no checking is done.
Thus these special input functions
are possible only if
.SB ISIG
is set.
.LP
If
.SB ICANON
is set, canonical processing is enabled.
This enables the erase, word erase, kill, and reprint edit functions,
and the assembly of input characters into lines delimited by
.SM NL\s0,
.SM
.BR EOF\s0 ,
.SM
.BR EOL\s0 ,
and
.SM
.BR EOL2\s0 .
If
.SB ICANON
is not set, read requests are satisfied directly
from the input queue.
A read will not be satisfied until at least
.SB MIN
characters have been received or the timeout value
.SB TIME
has expired between characters.
This allows fast bursts of input to be read
efficiently while still allowing single character input.
The time value represents tenths of seconds.  See the
.I "Non-canonical Mode Input Processing"
section for more details.
.LP
If
.SB XCASE
is set, and if
.SB ICANON
is set, an upper-case letter is accepted on input by preceding
it with a
.B \e
character,
and is output preceded by a
.B \e
character.
In this mode, the following escape sequences are generated
on output and accepted on input:
.br
.ne 7
.LP
.PD 0
.RS
.TP
.IR for :
.IR use :
.TP
.B \*`
.B \e\*'
.TP
.B \(bv
.B \e!
.TP
.B ~
.B \e^
.TP
.B {
.B \e(
.TP
.B }
.B \e)
.TP
.B \e
.B \e\e
.RE
.PD
.LP
For example,
.B A
is input as
.BR \ea ,
.B \en
as
.BR \e\en ,
and
.B \eN
as
.BR \e\e\en .
.LP
If
.SB ECHO
is set,
characters are echoed as received.
If
.SB ECHO
is not set, input characters are not echoed.
.LP
If
.SB ECHOCTL
is not set, all control characters (characters with codes between 0
and 37 octal) are echoed as themselves.
If
.SB ECHOCTL
is set, all control characters other than
.SM ASCII
.SM TAB\s0,
.SM ASCII
.SM NL\s0,
the
.SB START
character, and the
.SB STOP
character,
are echoed as
\fB^\fIX\fR,
where
.I X
is the character given by adding 100 octal to the control character's code
(so that the character with octal code 1 is echoed as
.RB ` ^A '),
and the
.SM ASCII
.SM DEL
character, with code 177 octal, is echoed as
.RB ` ^? '.
.LP
When
.SB ICANON
is set,
the following echo functions are possible:
.IP \(bu
If
.SB ECHO
and
.SB ECHOE
are set, and
.SB ECHOPRT
is not set,
the
.SB ERASE
and
.SB WERASE
characters are echoed as one or more
.SM ASCII
.SM BS SP BS\s0,
which will clear the last character(s) from a
.SM CRT
screen.
.IP \(bu
If
.SB ECHO
and
.SB ECHOPRT
are set, the first
.SB ERASE
and
.SB WERASE
character in a sequence echoes as a backslash (\fB\e\fP) followed by the
characters being erased.  Subsequent
.SB ERASE
and
.SB WERASE
characters echo the characters being erased, in reverse order.
The next non-erase character types a slash (\fB/\fP) before
it is echoed.
.IP \(bu
If
.SB ECHOKE
is set, the kill character is echoed by erasing each character on the line
from the screen (using the mechanism selected by
.SB ECHOE
and
.SM
.BR ECHOPRT\s0 ).
.IP \(bu
If
.SB ECHOK
is set,
and
.SB ECHOKE
is not set,
the
.SM NL
character will be echoed after the
kill character to emphasize that the line
will be deleted.
Note: an escape character
.RB ( \e )
or an
.SB LNEXT
character preceding
the erase or kill character removes any special function.
.IP \(bu
If
.SB ECHONL
is set,
the
.SM NL
character will be echoed even if
.SB ECHO
is not set.
This is useful for terminals
set to local echo (so-called half duplex).
.IP \(bu
If
.SB ECHOCTL
is not set, the
.SB EOF
character is not echoed, unless it is escaped.
Because
.SM EOT
is the default
.SB EOF
character, this prevents terminals that respond to
.SM EOT
from hanging up.
If
.SB ECHOCTL
is set, the
.SB EOF
character is echoed; if it is not escaped,
after it is echoed, one backspace character is output if
it is echoed as itself, and two backspace characters are echoed if it is echoed
as
\fB^\fIX\fR.
.LP
If
.SB NOFLSH
is set, the normal flush of the input and output queues
associated with the
.SM
.BR INTR\s0 ,
.SM
.BR QUIT\s0 ,
and
.SB SUSP
characters will not be done.
.LP
If
.SB TOSTOP
is set, the signal
.SB SIGTTOU
is sent to a process that tries to write to its controlling terminal if it
is not in the distinguished process group for that terminal.  This
signal normally stops the process.  Otherwise, the output generated
by that process is output to the current output stream.  Processes that are
blocking or ignoring
.SB SIGTTOU
signals are excepted and allowed to produce output.
.LP
If
.SB FLUSHO
is set, data written to the terminal will be discarded.  This bit is
set when the
.SB FLUSH
character is typed.  A program can cancel the effect of typing the
.SB FLUSH
character by clearing
.SM
.BR FLUSHO\s0 .
.LP
If
.SB PENDIN
is set, any input that has not yet been read will be reprinted when
the next character arrives as input.
.LP
The initial line-discipline control value is
.SM
.BR ISIG\s0 ,
.SM
.BR ICANON\s0 ,
.SM
.BR ECHO\s0 .
.SS "Minimum and Timeout"
.LP
The
.SB MIN
and
.SB TIME
values are described above under
\fBNon-canonical Mode Input Processing\fP.
The initial value of
.SB MIN
is 1, and the initial value of
.SB TIME
is 0.
.SS "Termio Structure"
.LP
The System V
.B termio
structure is used by other
.B ioctl(\|)
calls; it is defined by
.B <sys/termio.h>
as:
.LP
.ta .6i 1.3i 1.8i 2.6i
.RS
.nf
.ne 9
.ft B
#define	\s-1NCC\s+1	8
struct	termio {
	unsigned	short	c_iflag;	/\(** input modes \(**/
	unsigned	short	c_oflag;	/\(** output modes \(**/
	unsigned	short	c_cflag;	/\(** control modes \(**/
	unsigned	short	c_lflag;	/\(** local modes \(**/
	char		c_line;		/\(** line discipline \(**/
	unsigned	char	c_cc[\s-1NCC\s+1];	/\(** control chars \(**/
};
.ft R
.fi
.RE
.LP
The special control characters are defined by the array
.BR c_cc .
The relative positions for each function are as follows:
.RS
.ta 4n 13n
.nf
0	\fB\s-1VINTR\s0\fP
1	\fB\s-1VQUIT\s0\fP
2	\fB\s-1VERASE\s0\fP
3	\fB\s-1VKILL\s0\fP
4	\fB\s-1VEOF\s0\fP
5	\fB\s-1VEOL\s0\fP
6	\fB\s-1VEOL2\s0\fP
7	reserved
.fi
.RE
.LP
The calls that use the
.B termio
structure only affect the flags and control characters that can be
stored in the
.B termio
structure; all other flags and control characters are unaffected.
.SS "Terminal Size"
.LP
The number of lines and columns on the terminal's display (or page,
in the case of printing terminals) is specified in the
.B winsize
structure, defined by
.BR <sys/termios.h> .
Several
.B ioctl(\|)
system calls that fetch or change these parameters use this
structure:
.LP
.ta .6i 1.3i 1.8i 2.6i
.RS
.nf
.ft B
struct winsize {
	unsigned short	ws_row;		/\(** rows, in characters \(**/
	unsigned short	ws_col;		/\(** columns, in characters \(**/
	unsigned short	ws_xpixel;	/\(** horizontal size, pixels - not used \(**/
	unsigned short	ws_ypixel;	/\(** vertical size, pixels - not used \(**/
};
.ft R
.fi
.RE
.SS "Modem Lines"
.LP
On special files representing serial ports, the modem control lines
supported by the hardware can be read and the modem status lines
supported by the hardware can be changed.  The following modem control
and status lines may be supported by a device; they are defined by
.BR <sys/termios.h> :
.LP
.ta \w'MAXMA_XXX\ \ 'u +\w'MAXMA_XXX\ \ 'u
.RS
.nf
\fB\s-1TIOCM_LE\s0\fP	0001	line enable
\fB\s-1TIOCM_DTR\s0\fP	0002	data terminal ready
\fB\s-1TIOCM_RTS\s0\fP	0004	request to send
\fB\s-1TIOCM_ST\s0\fP	0010	secondary transmit
\fB\s-1TIOCM_SR\s0\fP	0020	secondary receive
\fB\s-1TIOCM_CTS\s0\fP	0040	clear to send
\fB\s-1TIOCM_CAR\s0\fP	0100	carrier detect
\fB\s-1TIOCM_RNG\s0\fP	0200	ring
\fB\s-1TIOCM_DSR\s0\fP	0400	data set ready
.DT
.fi
.RE
.LP
.SB TIOCM_CD
is a synonym for
.SM
.BR TIOCM_CAR\s0 ,
and
.SB TIOCM_RI
is a synonym for
.SM
.BR TIOCM_RNG\s0 .
.LP
Not all of these will necessarily be supported by any particular device; check
the manual page for the device in question.
.SH IOCTLS
.LP
The
.B ioctl(\|)
calls supported by devices and
.SM STREAMS
modules providing the
.B termios
interface are listed below.  Some calls may not be supported by all
devices or modules.
.LP
Unless otherwise noted for a specific
.B ioctl(\|)
call, these functions are restricted from use by background processes.
Attempts to perform these calls will cause the process group of the process
performing the call to be sent a
.SB SIGTTOU
signal.  If the process is ignoring
.SM
.BR SIGTTOU\s0 ,
has
.SB SIGTTOU
blocked, or is in the middle of process creation using
.BR vfork(\|) ,
the process will be allowed to perform the call and the
.SB SIGTTOU
signal will not be sent.
.TP 15
.SB TCGETS
The argument is a pointer to a
.B termios
structure.  The current terminal parameters are fetched and stored into
that structure.  This call is allowed from a background process; however, the
information may subsequently be changed by a foreground process.
.TP
.SB TCSETS
The argument is a pointer to a
.B termios
structure.  The current terminal parameters are set from the values stored
in that structure.  The change is immediate.
.TP
.SB TCSETSW
The argument is a pointer to a
.B termios
structure.  The current terminal parameters are set from the values stored
in that structure.  The change occurs after all characters queued for
output have been transmitted.
This form should be used when changing parameters
that will affect output.
.TP
.SB TCSETSF
The argument is a pointer to a
.B termios
structure.  The current terminal parameters are set from the values stored
in that structure.  The change occurs after all characters queued for
output have been transmitted; all characters queued for input are
discarded and then the change occurs.
.TP 15
.SB TCGETA
The argument is a pointer to a
.B termio
structure.  The current terminal parameters are fetched, and those
parameters that can be stored in a
.B termio
structure are stored into that structure.  This call is allowed from a
background process; however, the information may subsequently be changed
by a foreground process.
.TP
.SB TCSETA
The argument is a pointer to a
.B termio
structure.  Those terminal parameters that can be stored in a
.B termio
structure are set from the values stored
in that structure.  The change is immediate.
.TP
.SB TCSETAW
The argument is a pointer to a
.B termio
structure.  Those terminal parameters that can be stored in a
.B termio
structure are set from the values stored
in that structure.  The change occurs after all characters queued for
output have been transmitted.
This form should be used when changing parameters
that will affect output.
.TP
.SB TCSETAF
The argument is a pointer to a
.B termio
structure.  Those terminal parameters that can be stored in a
.B termio
structure are set from the values stored
in that structure.  The change occurs after all characters queued for
output have been transmitted; all characters queued for input are
discarded and then the change occurs.
.TP
.SB TCSBRK
The argument is an
.B int
value.
Wait for the output to drain.
If the argument is 0,
then send a break (zero-valued bits for 0.25 seconds).
.TP
.SB TCXONC
Start/stop control.
The argument is an
.B int
value.
If the argument
is 0, suspend output;
if 1, restart suspended output;
if 2, suspend input;
if 3, restart suspended input.
.TP
.SB TCFLSH
The argument is an
.B int
value.
If the argument
is 0, flush the input queue;
if 1, flush the output queue;
if 2, flush both the input and output queues.
.TP
.SB TIOCEXCL
The argument is ignored.
Exclusive-use mode is turned on;
no further opens are permitted until the file has been closed, or a
.SB TIOCNXCL
is issued.
The default on open of a terminal
file is that exclusive use mode is off.
.TP
.SB TIOCNXCL
The argument is ignored.
Exclusive-use mode is turned off.
.TP
.SB TIOCGPGRP
The argument is a pointer to an
.BR int .
Set the value of that
.B int
to the process group
.SM ID
of the distinguished process group associated with the terminal.  This call
is allowed from a background process; however, the information may
subsequently be changed by a foreground process.
.TP
.SB TIOCSPGRP
The argument is a pointer to an
.BR int .
Associate the process group whose process group
.SM ID
is specified by the value of that
.B int
with the terminal.  The new process group value must be in the range of
valid process group
.SM ID
values, or it must be zero (\(lqno process group\(rq).
Otherwise, the error
.SB EINVAL
is returned.  If any processes exist with a process
.SM ID
or process group
.SM ID
that is the same as the new process group value, then those processes must
have the same real or saved user
.SM ID
as the real or effective user
.SM ID
of the calling process or be descendants of the calling process,
or the effective user
.SM ID
of the current process must be super-user.  Otherwise, the error
.SB EPERM
is returned.
.TP
.SB TIOCOUTQ
The argument is a pointer to an
.BR int .
Set the value of that
.B int
to the number of characters in the output stream that have not yet
been sent to the terminal.  This call is allowed from a
background process.
.TP
.SB TIOCSTI
The argument is a pointer to a
.BR char .
Pretend that that character had been received as input.
.TP
.SB TIOCGWINSZ
The argument is a pointer to a
.B winsize
structure.
The terminal driver's notion of the terminal size is stored into that
structure.  This call is allowed from a background process.
.TP
.SB TIOCSWINSZ
The argument is a pointer to a
.B winsize
structure.
The terminal driver's notion of the terminal size is set
from the values specified in that structure.  If the new sizes are different
from the old sizes, a
.SB SIGWINCH
signal is sent to the process group of the terminal.
.TP
.SB TIOCMGET
The argument is a pointer to an
.BR int .
The current state of the modem status lines is fetched and stored in the
.B int
pointed to by the argument.  This call is allowed from a background process.
.TP
.SB TIOCMBIS
The argument is a pointer to an
.B int
whose value is a mask containing modem control lines to be turned on.
The control lines whose bits are set in the argument are turned on; no other
control lines are affected.
.TP
.SB TIOCMBIC
The argument is a pointer to an
.B int
whose value is a mask containing modem control lines to be turned off.
The control lines whose bits are set in the argument are turned off; no other
control lines are affected.
.TP
.SB TIOCMSET
The argument is a pointer to an
.B int
containing a new set of modem control lines.
The modem control lines are turned on or off, depending on whether the bit for
that mode is set or clear.
.SH SEE ALSO
.BR csh (1),
.BR stty (1V),
.BR fork (2),
.BR ioctl (2),
.BR open (2V),
.BR read (2V),
.BR setpgrp(2V),
.BR sigvec (2),
.BR vfork (2),
.BR tty(4),
.BR getty (8)
cesses that are
blocking or ignoring
.SB SIGTTOU
signals are excepted and allowed to produce output.
.LP
If
.SB FLUSHO
is set, data written to the t./share/man/man4/termios.4                                                                             755       0      12           66  4424741463  10425                                                                                                                                                                                                                                                                                                                                                                      .so man4/termio.4
.\" @(#)termios.4 1.4 89/03/27 SMI;
 ttcompat.4m     >  tty.4 at    ?  udp.4p .  ,  @  vme16d16.4s   @  A  vme16d32.4s   T  B  vme24d16.4s   h  C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s roat can be stored in a
.B termio
structure are set from the values stored
in that structure.  The cha./share/man/man4/tm.4s                                                                                 755       0      12         4612  4424741463   7607                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tm.4s 1.19 89/03/27 SMI;
.TH TM 4S "9 October 1987"
.SH NAME
tm \- tapemaster 1/2 inch tape drive
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
controller tm0 at vme16d16 ? csr 0xa0 priority 3 vector tmintr 0x60
controller tm1 at vme16d16 ? csr 0xa2 priority 3 vector tmintr 0x61
tape mt0 at tm0 drive 0 flags 1
tape mt0 at tm1 drive 0 flags 1
.ft R
.fi
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
controller tm0 at mbio ? csr 0xa0 priority 3
controller tm0 at vme16 ? csr 0xa0 priority 3 vector tmintr 0x60
controller tm1 at mbio ? csr 0xa2 priority 3
controller tm1 at vme16 ? csr 0xa2 priority 3 vector tmintr 0x61
tape mt0 at tm0 drive 0 flags 1
tape mt0 at tm1 drive 0 flags 1
.fi
.ft R
.SH DESCRIPTION
.IX  "tm device"  ""  "\fLtm\fP \(em tapemaster 1/2-inch tape drive"  ""  PAGE START
.IX  "tapemaster 1/2-inch tape drive"  ""  "tapemaster 1/2-inch tape drive \(em \fLtm\fP"  ""  PAGE START
.IX  "tape drive, 1/2-inch"  tm  ""  "\fLtm\fP \(em tapemaster"  PAGE START
.IX  "1/2-inch tape drive"  tm  ""  "\fLtm\fP \(em tapemaster"  PAGE START
.LP
The Tapemaster tape controller controls Pertec-interface 1/2'' tape
drives such as the
.SM CDC
Keystone, providing
a standard tape interface to the device, see
.BR mtio (4).
.SH SEE ALSO
.BR mt (1),
.BR tar (1),
.BR ar (4S),
.BR mtio (4)
.SH DIAGNOSTICS
.TP
.B
tm\fIn\fP \|: no response from ctlr.
.PD 0
.TP
.B
tm\fIn\fP\|: error \fIn\fR \| during config.
.TP
.B
mt\fIn\fP \|: not online.
.TP
.B
mt\fIn\fP \|: no write ring.
.TP
.B
tmgo: gate wasn't open.  Controller lost synch.
.TP
.B
tmintr: can't clear interrupts.
.TP
.B
tm\fIn\fP \|: stray interrupts.
.TP
.B
mt\fIn\fP\|: hard error bn=\fIn\fP \| er=%x.
.TP
.B
mt\fIn\fP \|: lost interrupt.
.PD
.SH BUGS
The Tapemaster controller does not provide for byte-swapping
and the resultant system overhead prevents streaming transports from streaming.
.LP
If a non-data error is encountered on non-raw tape, it refuses
to do anything more until closed.
.LP
The system should remember which controlling terminal has the
tape drive open and write error messages to that terminal
rather than on the console.
.IX  "tm device"  ""  "\fLtm\fP \(em tapemaster 1/2-inch tape drive"  ""  PAGE END
.IX  "tapemaster 1/2-inch tape drive"  ""  "tapemaster 1/2-inch tape drive \(em \fLtm\fP"  ""  PAGE END
.IX  "tape drive, 1/2-inch"  tm  ""  "\fLtm\fP \(em tapemaster"  PAGE END
.IX  "1/2-inch tape drive"  tm  ""  "\fLtm\fP \(em tapemaster"  PAGE END
r the effective user
.SM ID
of the current process must be super-user.  Otherwise, the error
.SB EPERM
is returned.
.T./share/man/man4/ttcompat.4m                                                                           755       0      12        32104  4424741463  11031                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ttcompat.4m 1.13 89/03/27 SMI;
.TH TTCOMPAT 4M "16 February 1988"
.SH NAME
ttcompat \- V7 and 4BSD STREAMS compatibility module
.SH CONFIG
None; included by default.
.SH SYNOPSIS
.nf
.ft B
#include <sys/stream.h>
#include <sys/stropt.h>
.LP
.ft B
ioctl(fd, \s-1I_PUSH\s0, "ttcompat");
.ft R
.fi
.SH DESCRIPTION
.IX "ttcompat module" "" "\fLttcompat\fP \s-1STREAMS\s0 module"
.IX STREAMS ttcompat "\s-1STREAMS\s0" "\fLttcompat\fP, V7, BSD compatibility module"
.LP
.B ttcompat
is a
.SM STREAMS
module that translates the
.B ioctl 
calls
supported by the older Version 7 and 4\s-1BSD\s0
terminal drivers into the
.B ioctl 
calls
supported by the
.BR termio (4)
interface.  All other messages pass through this module unchanged;
the behavior of
.B read
and
.B write
calls is unchanged, as is the behavior of
.B ioctl
calls other than the ones supported by
.BR ttcompat .
.LP
Normally, this module is automatically pushed onto a stream when a
terminal device is opened; it does not have to be explicitly pushed
onto a stream.  This module requires that the
.B termio
interface be supported by the modules and driver downstream.  The
.BR \s-1TCGETS\s0 ,
.BR \s-1TCSETS\s0 ,
and
.SB TCSETSF
.B ioctl 
calls
must be supported; if any information set or fetched by those
.B ioctl 
calls
is not supported by the modules and driver downstream,
some of the V7/4\s-1BSD\s0 functions may not be supported.
For example, if the
.SB CBAUD
bits in the
.B c_cflag
field are not supported, the functions provided by the
.B sg_ispeed
and
.B sg_ospeed
fields of the
.B sgttyb
structure (see below) will not be supported.
If the
.SB TCFLSH
.B ioctl
is not supported, the function provided by the
.SB TIOCFLUSH
.B ioctl
will not be supported.
If the
.SB TCXONC
.B ioctl
is not supported, the functions provided by the
.SB TIOCSTOP
and
.SB TIOCSTART
.B ioctl 
calls
will not be supported.
If the
.SB TIOCMBIS
and
.SB TIOCMBIC
.B ioctl 
calls
are not supported, the functions provided by the
.SB TIOCSDTR
and
.SB TIOCCDTR
.B ioctl 
calls
will not be supported.
.LP
The basic
.B ioctl 
calls
use the
.B sgttyb
structure defined by
.BR <sys/ioctl.h> :
.RS
.nf
.ft B
.ta .5i 1i
struct sgttyb {
	char	sg_ispeed;
	char	sg_ospeed;
	char	sg_erase;
	char	sg_kill;
	short	sg_flags;
};
.ft R
.fi
.RE
.LP
The
.B sg_ispeed 
and 
.B sg_ospeed
fields describe the input and output speeds of the
device, and reflect the values in the
.B c_cflag
field of the
.B termio
structure.
The
.B sg_erase
and
.B sg_kill
fields of the argument structure
specify the erase and kill characters respectively, and reflect the
values in the
.SB VERASE
and
.SB VKILL
members of the
.B c_cc
field of the
.B termio
structure.
.LP
The
.B sg_flags
field of the argument structure
contains several flags that determine the
system's treatment of the terminal.  They are mapped into flags in
fields of the terminal state, represented by the
.B termio
structure.
.LP
Delay type 0 is always mapped into the equivalent delay type 0 in the
.B c_oflag
field of the
.B termio
structure.  Other delay mappings are performed as follows:
.RS
.TP 12
.B sg_flags
.B c_oflag
.sp .5
.PD 0
.TP 12
.SB BS1
.SB BS1
.TP
.SB FF1
.SB VT1
.TP
.SB CR1
.SB CR2
.TP
.SB CR2
.SB CR3
.TP
.SB CR3
not supported
.TP
.SB TAB1
.SB TAB1
.TP
.SB TAB2
.SB TAB2
.TP
.SB XTABS
.SB TAB3
.TP
.SB NL1
.SB ONLRET|CR1
.TP
.SB NL2
.SB NL1
.RE
.PD
.LP
If previous
.SB TIOCLSET
or
.SB TIOCLBIS
.B ioctl 
calls
have not selected
.SB LITOUT
or
.SB PASS8
mode, and if
.SB RAW
mode is not selected, the
.SB ISTRIP
flag is set in the
.B c_iflag
field of the
.B termio
structure, and the
.SB EVENP
and
.SB ODDP
flags control the parity of characters sent to the terminal and
accepted from the terminal:
.TP 12
.SB 0
Parity is not to be generated on output or checked on input; 
the character size is set to
.B CS8
and the
.SB PARENB
flag is cleared in the
.B c_cflag
field of the
.B termio
structure.
.TP
.SB EVENP
Even parity characters are to be generated on output and accepted on
input; the
.SB INPCK
flag is set in the
.B c_iflag
field of the
.B termio
structure, the character size is set to
.B CS7
and the
.SB PARENB
flag is set in the
.B c_cflag
field of the
.B termio
structure.
.TP
.SB ODDP
Odd parity characters are to be generated on output and accepted on
input; the
.SB INPCK
flag is set in the
.B c_iflag
field, the character size is set to
.B CS7
and the
.SB PARENB
and
.SB PARODD
flags are set in the
.B c_cflag
field of the
.B termio
structure.
.TP
.SB EVENP\||\|ODDP
Even parity characters are to be generated on output
and characters of either parity are to be accepted on input; the
.SB INPCK
flag is cleared in the
.B c_iflag
field, the character size is set to
.B CS7
and the
.SB PARENB
flag is set in the
.B c_cflag
field of the
.B termio
structure.
.LP
The
.SB RAW
flag disables all output processing (the
.SB OPOST
flag in the
.B c_oflag
field, and the
.SB XCASE
flag in the
.B c_lflag
field, are cleared in the
.B termio
structure) and input processing (all flags in the
.B c_iflag
field other than the
.SB IXOFF
and
.SB IXANY
flags are cleared in the
.B termio
structure).
8 bits of data, with no parity bit,
are accepted on input and generated on output; the character size is
set to
.B CS8
and the
.SB PARENB
and
.SB PARODD
flags are cleared in the
.B c_cflag
field of the
.B termio
structure.
The signal-generating and line-editing control characters are
disabled by clearing the
.SB ISIG
and
.SB ICANON
flags in the
.B c_lflag
field of the
.B termio
structure.
.LP
The
.SB CRMOD
flag turn input
.SM RETURN
characters into
.SM NEWLINE
characters, and output and echoed
.SM NEWLINE
characters to be output as a
.SM RETURN
followed by a
.SM LINEFEED\s0.
The
.SB ICRNL
flag in the
.B c_iflag
field, and the
.SB OPOST
and
.SB ONLCR
flags in the
.B c_oflag
field, are set in the
.B termio
structure.
.LP
The
.SB LCASE
flag maps upper-case letters in the
.SM ASCII
character set to their lower-case equivalents on input (the
.SB IUCLC
flag is set in the
.B c_iflag
field), and maps lower-case letters in the
.SM ASCII
character set to their upper-case equivalents on output (the
.SB OLCUC
flag is set in the
.B c_oflag
field).  Escape sequences are accepted on input, and generated on
output, to handle certain
.SM ASCII
characters not supported by older terminals (the
.SB XCASE
flag is set in the
.B c_lflag
field).
.LP
Other flags are directly mapped to flags in the
.B termio
structure:
.RS
.TP 12
.B sg_flags
flags in
.B termio
structure
.sp .5
.PD 0
.TP
.SB CBREAK
complement of
.SB ICANON
in
.B c_lflag
field
.TP
.SB ECHO
.SB ECHO
in
.B c_lflag
field
.TP
.SB TANDEM
.SB IXOFF
in
.B c_iflag
field
.RE
.PD
.LP
Another structure associated with each terminal specifies
characters that are special in both the old Version 7
and the newer 4\s-1BSD\s0 terminal interfaces.
The following structure is defined by
.BR <sys/ioctl.h> :
.RS
.nf
.ft B
.ta .5i 1i 2i 
struct tchars {
	char	t_intrc;	/* interrupt */
	char	t_quitc;	/* quit */
	char	t_startc;	/* start output */
	char	t_stopc;	/* stop output */
	char	t_eofc;		/* end-of-file */
	char	t_brkc;		/* input delimiter (like nl) */
};
.DT
.fi
.ft R
.RE
.LP
The characters are mapped to members of the
.B c_cc
field of the
.B termio
structure as follows:
.RS
.TP 12
.B tchars
.B c_cc
index
.sp .5
.PD 0
.TP
.B t_intrc
.SB VINTR
.TP
.B t_quitc
.SB VQUIT
.TP
.B t_startc
.SB VSTART
.TP
.B t_stopc
.SB VSTOP
.TP
.B t_eofc
.SB VEOF
.TP
.B t_brkc
.SB VEOL
.RE
.PD
.LP
Also associated with each terminal is a local flag
word, specifying flags supported by the new 4\s-1BSD\s0
terminal interface.
Most of these flags are directly mapped to flags in the
.B termio
structure:
.RS
.TP 12
local flags
flags in
.B termio
structure
.sp .5
.PD 0
.TP
.SB LCRTBS
not supported
.TP
.SB LPRTERA
.SB ECHOPRT
in the
.B c_lflag
field
.TP
.SB LCRTERA
.SB ECHOE
in the
.B c_lflag
field
.TP
.SB LTILDE
not supported
.TP
.SB LTOSTOP
.SB TOSTOP
in the
.B c_lflag
field
.TP
.SB LFLUSHO
.SB FLUSHO
in the
.B c_lflag
field
.TP
.SB LNOHANG
.SB CLOCAL
in the
.B c_cflag
field
.TP
.SB LCRTKIL
.SB ECHOKE
in the
.B c_lflag
field
.TP
.SB LCTLECH
.SB CTLECH
in the
.B c_lflag
field
.TP
.SB LPENDIN
.SB PENDIN
in the
.B c_lflag
field
.TP
.SB LDECCTQ
complement of
.SB IXANY
in the
.B c_iflag
field
.TP
.SB LNOFLSH
.SB NOFLSH
in the
.B c_lflag
field
.RE
.PD
.LP
Another structure associated with each terminal is the
.B ltchars
structure which defines control characters
for the new 4\s-1BSD\s0 terminal interface.
Its structure is:
.RS
.nf
.ta .5i 1i 2i
.ft B
struct ltchars {
	char	t_suspc;	/* stop process signal */
	char	t_dsuspc;	/* delayed stop process signal */
	char	t_rprntc;	/* reprint line */
	char	t_flushc;	/* flush output (toggles) */
	char	t_werasc;	/* word erase */
	char	t_lnextc;	/* literal next character */
};
.ft R
.fi
.RE
.LP
The characters are mapped to members of the
.B c_cc
field of the
.B termio
structure as follows:
.RS
.TP 12
.B ltchars
.B c_cc
index
.sp .5
.PD 0
.TP
.B t_suspc
.SB VSUSP
.TP
.B t_dsuspc
.SB VDSUSP
.TP
.B t_rprntc
.SB VREPRINT
.TP
.B t_flushc
.SB VDISCARD
.TP
.B t_werasc
.SB VWERASE
.TP
.B t_lnextc
.SB VLNEXT
.RE
.PD
.SH IOCTLS
.LP
.B ttcompat
responds to the following
.B ioctl
calls.
All others are passed to the module below.
.TP 12
.SB TIOCGETP
The argument is a pointer to an
.B sgttyb
structure.  The current terminal state is fetched; the appropriate
characters in the terminal state are stored in that structure, as are
the input and output speeds.  The values of the flags in the
.B sg_flags
field are derived from the flags in the terminal state and stored in
the structure.
.br
.ne 5
.TP
.SB TIOCSETP
The argument is a pointer to an
.B sgttyb
structure.  The appropriate characters and input and output speeds
in the terminal state are set from the values in that structure, and
the flags in the terminal state are set to match the values of the
flags in the
.B sg_flags
field of that structure.  The state is changed with a
.SB TCSETSF
.IR ioctl ,
so that the interface delays until output is quiescent,
then throws away any unread characters, before changing the modes.
.TP
.SB TIOCSETN
The argument is a pointer to an
.B sgttyb
structure.  The terminal state is changed as
.SB TIOCSETP
would change it, but a
.SB TCSETS
.B ioctl
is used, so that the interface neither delays nor discards input.
.TP
.SB TIOCHPCL
The argument is ignored.  The
.SB HUPCL
flag is set in the
.B c_cflag
word of the terminal state.
.TP
.SB TIOCFLUSH
The argument is a pointer to an
.B int
variable.
If its value is zero, all characters waiting in input or output queues are
flushed.
Otherwise, the value of the
.B int
is treated as the logical
.SM OR
of the
.SB FREAD
and
.SB FWRITE
flags defined by
.BR <sys/file.h> ;
if the
.SB FREAD
bit is set, all characters waiting in input queues are flushed,
and if the
.SB FWRITE
bit is set, all characters waiting in output queues are flushed.
.TP
.SB TIOCSBRK
The argument is ignored.  The break bit is set for the device.
.TP
.SB TIOCCBRK
The argument is ignored.  The break bit is cleared for the device.
.TP
.SB TIOCSDTR 
The argument is ignored.  The Data Terminal Ready bit is set for the device.
.TP
.SB TIOCCDTR
The argument is ignored.  The Data Terminal Ready bit is cleared for
the device.
.TP
.SB TIOCSTOP
The argument is ignored.
Output is stopped as if the
.SB STOP
character had been typed.
.TP
.SB TIOCSTART
The argument is ignored.
Output is restarted as if the
.SB START
character had been typed.
.TP
.SB TIOCGETC
The argument is a pointer to an
.B tchars
structure.  The current terminal state is fetched, and the appropriate
characters in the terminal state are stored in that structure.
.TP
.SB TIOCSETC
The argument is a pointer to an
.B tchars
structure.  The values of the appropriate characters in the terminal
state are set from the characters in that structure.
.TP
.SB TIOCLGET
The argument is a pointer to an
.BR int .
The current terminal state is fetched,
and the values of the local flags are derived from the flags in
the terminal state and stored in the
.B int
pointed to by the argument.
.TP
.SB TIOCLBIS
The argument is a pointer to an
.B int
whose value is a mask containing flags to be set in the local flags
word.  The current terminal state is fetched,
and the values of the local flags are derived from the flags in
the terminal state; the specified flags are set, and the flags in the
terminal state are set to match the new value of the local flags
word.
.TP
.SB TIOCLBIC
The argument is a pointer to an
.B int
whose value is a mask containing flags to be cleared in the local flags
word.  The current terminal state is fetched,
and the values of the local flags are derived from the flags in
the terminal state; the specified flags are cleared, and the flags in the
terminal state are set to match the new value of the local flags
word.
.TP
.SB TIOCLSET
The argument is a pointer to an
.B int
containing a new set of local flags.
The flags in the terminal state are set to match the new value of the
local flags word.
.TP
.SB TIOCGLTC
The argument is a pointer to an
.B ltchars
structure.  The values of the appropriate characters in the terminal
state are stored in that structure.
.br
.ne 3
.TP
.SB TIOCSLTC
The argument is a pointer to an
.B ltchars
structure.  The values of the appropriate characters in the terminal state
are set from the characters in that structure.
.SH SEE ALSO
.BR ioctl (2),
.BR termio (4)
S1
.TP
.SB FF1
.SB VT1
.TP
.SB CR1
.SB CR2
.TP
.SB CR2
.SB CR3
.TP
.SB CR3
not supported
.TP
.SB TAB1
.SB TAB1
.TP
.SB TAB2
.SB TAB2
.TP
.SB XTABS
.SB TAB3
.TP
.SB NL1
.SB ONLRET|CR1
.TP
.SB NL2
.SB NL1
.RE
.PD
.LP
If previous
.SB TIOCLSET
or
.SB TIOCLBIS
.B ioctl 
calls
have not selected
.SB LITOUT
or
.SB PASS8
mode, and if
.SB RAW
mode is not selected, the
.SB ISTRIP
flag is set in the
.B c_iflag
field of the
.B termio
structure, and the
./share/man/man4/tty.4                                                                                 755       0      12         2637  4424741463   7631                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tty.4 1.34 89/03/27 SMI; from S5R2
.hw TIOCNOTTY
.TH TTY 4 "16 February 1988"
.SH NAME
tty \- controlling terminal interface
.SH DESCRIPTION
.IX "tty device" "" "\fLtty\fP terminal interface"
.LP
The file
.B /dev/tty
is, in each process, a synonym for the controlling
terminal of that process, if any. 
It is useful for programs or shell sequences that wish to be sure of
writing messages on the terminal no matter how output has been redirected.
It can also be used for programs that demand the name of a file for output,
when typed output is desired and it is tiresome to find out what terminal
is currently in use.
.SH IOCTLS
.LP
In addition to the
.BR ioctl s
supported by the device that
.B tty
refers to, the following
.B ioctl
is supported:
.TP 12
.SB TIOCNOTTY
Detach the current process from its controlling terminal, and remove it
from its current process group, without attaching it to a new process group
(that is, set its process group
.SM ID
to zero).
This
.B ioctl
call only works on file descriptors connected to
.BR /dev/tty ;
this is used by daemon processes when they are invoked by a user at
a terminal.  The process attempts to open
.BR /dev/tty ;
if the open succeeds, it detaches itself from the terminal by using
.BR \s-1TIOCNOTTY\s0 ,
while if the open fails, it is obviously not attached to a terminal
and does not need to detach itself.
.SH FILES
.PD 0
.TP 20
.B /dev/tty
.PD
.SH SEE ALSO
.BR termio (4)
ed, and the flags in the
terminal state are set to match the new value of the local flags
word.
../share/man/man4/udp.4p                                                                                755       0      12        15707  4424741463  10003                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)udp.4p 1.21 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH UDP 4P "22 March 1989"
.SH NAME
udp \- Internet User Datagram Protocol
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.LP
.B s = socket(\s-1AF_INET\s0, \s-1SOCK_DGRAM\s0, 0);
.fi
.IX  "udp protocol"  ""  "\fLudp\fP \(em Internet User Datagram Protocol"  ""  PAGE START
.IX  Internet  "User Datagram Protocol"  ""  "User Datagram Protocol \(em \fLudp\fP"  ""  PAGE START
.SH DESCRIPTION
.LP
.SM UDP
is a simple, unreliable datagram protocol which is used
to support the
.SB SOCK_DGRAM
abstraction for the Internet
protocol family.
It is layered directly above the
Internet Protocol (\s-1IP\s0).
.SM UDP
sockets are connectionless, and are
normally used with the
.BR sendto ,
.BR sendmsg ,
.BR recvfrom ,
and
.B recvmsg
system calls (see
.BR send (2)
and
.BR recv (2)).
If the
.BR connect (2)
system call is used to fix the destination for future packets,
then the
.BR recv (2)
or
.BR read (2V)
and
.BR send (2)
or
.BR write (2V)
system calls may be used.
.LP
.SM UDP
address formats are identical to those used by the
Transmission Control Protocol (\s-1TCP\s0).
Like
.SM TCP\s0,
.SM UDP
uses a port number along with
an
.SM IP
address to identify the endpoint of communication.
Note: the
.SM UDP
port number
space is separate from the
.SM TCP
port number space (that is, a
.SM UDP
port
may not be \*(lqconnected\*(rq to a
.SM TCP
port).
The
.BR bind (2)
system call can be used to set the local address and port number of
a
.SM UDP
socket.
The local
.SM IP
address may be left unspecified in the
.B bind
call by using the special value
.SM
.BR INADDR_ANY \*S.
If the
.B bind
call is not done,
a local
.SM IP
address and port number will be assigned to each
packet as it is sent.
Broadcast packets may be sent
(assuming the underlying network supports this)
by using a reserved \*(lqbroadcast address\*(rq;
this address is network interface dependent.
Broadcasts may only be sent by the super-user.
.LP
Options at the
.SM IP
level may be used with
.SM UDP\s0;
see
.BR ip (4P).
.LP
There are a variety of ways that a
.SM UDP
packet can be lost or discarded,
including a failure of the underlying communication mechanism.
.SM UDP
implements a checksum over the data portion of the packet.
If the checksum of a received packet is in error,
the packet will be dropped with no indication given to the user.
A queue of received packets is provided for each
.SM UDP
socket.
This queue has a limited capacity.
Arriving datagrams which will not fit within its
.I high-water
capacity are silently discarded.
.LP
.SM UDP
processes Internet Control Message Protocol (\s-1ICMP\s0)
error messages received in response to
.SM UDP
packets it has sent.
See
.BR icmp (4P).
.SM ICMP
\(lqsource quench\(rq messages are ignored.
.SM ICMP
\(lqdestination unreachable,\(rq \(lqtime exceeded\(rq and \(lqparameter
problem\(rq messages disconnect the socket from
its peer so that subsequent attempts to send packets using that socket
will return an error.
.SM UDP
will not guarantee that packets are delivered in the
order they were sent.
As well, duplicate packets may be generated
in the communication process.
.SH ERRORS
A socket operation may fail if:
.TP 20
.SM EISCONN
A
.B connect
operation was attempted on a socket on which a
.B connect
operation had already been performed, and the socket could not be successfully
disconnected before making the new connection.
.TP 20
.SM EISCONN
A
.B sendto
or
.B sendmsg
operation specifying an address to which the message should be sent
was attempted on a socket on which a
.B connect
operation had already been performed.
.TP 20
.SM ENOTCONN
A
.B send
or
.B write
operation, or a
.B sendto
or
.B sendmsg
operation not specifying an address to which the message should be sent,
was attempted on a socket on which a
.B connect
operation had not already been performed.
.TP 20
.SM EADDRINUSE
A
.B bind
operation was attempted on a socket with a network address/port pair that has
already been bound to another socket.
.TP 20
.SM EADDRNOTAVAIL
A
.B bind
operation was attempted on a socket with a network address
for which no network interface exists.
.TP 20
.SM EINVAL
A
.BR sendmsg
operation with a non-\s-1NULL\s0
.B msg_accrights
was attempted.
.TP 20
.SM EACCES
A
.B bind
operation was attempted with a \(lqreserved\(rq port number and the effective user
.SM ID
of the process was not super-user.
.TP 20
.SM ENOBUFS
The system ran out of memory for internal data structures.
.br
.ne 6
.SH SEE ALSO
.BR bind (2),
.BR connect (2),
.BR read (2V),
.BR recv (2),
.BR send (2),
.BR write (2V),
.BR icmp (4P),
.BR inet (4F),
.BR ip (4P),
.BR tcp (4P)
.LP
Postel, Jon,
.IR "User Datagram Protocol" ,
.SM RFC
768,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1980.
(Sun 800-1054-01)
.SH BUGS
.LP
.SB SIOCSHIWAT
and
.SB SIOCGHIWAT
ioctl's to set and get the high water mark
for the socket queue, and so that it can be changed from 2048 bytes
to be larger or smaller, have been defined (in
.BR sys/ioctl.h )
but not
implemented.
.LP
Something sensible should be done with
.SM ICMP
source quench
error messages if the socket is
bound to a peer socket.
.IX  "ioctls for sockets"  "SIOCSHIWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl\fP \(em \fLSIOCSHIWAT\fP"
.IX  "UDP ioctls"  "SIOCSHIWAT"  "UDP \fLioctl\fP's"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "ioctls for sockets"  "SIOCGHIWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  "SIOCGHIWAT get high water mark"  ""  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  "get high water mark ioctl"  ""  "get high water mark \fLioctl\fP \(em \fLSIOCGHIWAT\fP"
.IX  "UDP ioctls"  "SIOCGHIWAT"  "UDP \fLioctl\fP's"  "\fLSIOCGHIWAT\fP \(em get high water mark"
.IX  "ioctls for sockets"  "SIOCSLOWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  "SIOCSLOWAT set low water mark"  ""  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  "set low water mark ioctl"  ""  "set low water mark \fLioctl\fP \(em \fLSIOCSLOWAT\fP"
.IX  "UDP ioctls"  "SIOCSLOWAT"  "UDP \fLioctl\fP's"  "\fLSIOCSLOWAT\fP \(em set low water mark"
.IX  "ioctls for sockets"  "SIOCGLOWAT"  "\fLioctl\fP's for sockets"  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  "SIOCGLOWAT get low water mark"  ""  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  "get low water mark ioctl"  ""  "get low water mark \fLioctl\fP \(em \fLSIOCGLOWAT\fP"
.IX  "UDP ioctls"  "SIOCGLOWAT"  "UDP \fLioctl\fP's"  "\fLSIOCGLOWAT\fP \(em get low water mark"
.IX  "udp protocol"  ""  "\fLudp\fP \(em Internet User Datagram Protocol"  ""  PAGE END
.IX  Internet  "User Datagram Protocol"  ""  "User Datagram Protocol \(em \fLudp\fP"  ""  PAGE END
nderlying network supports this)
by using a reserved \*(l./share/man/man4/vme16d16.4s                                                                           755       0      12           67  4424741464  10401                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme16d16.4s 1.6 89/03/27 SMI; 
B  vme24d16.4s   h  C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s s     G  vpc.4s      H  win.4s 2    I  xd.4s  4    J  xt.4s  .    K  xy.4s n.     L  zero.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vme16d32.4s                                                                           755       0      12           67  4424741464  10377                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme16d32.4s 1.6 89/03/27 SMI; 
C  vme24d32.4s   |  D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s ro.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vme24d16.4s                                                                           755       0      12           67  4424741464  10400                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme24d16.4s 1.6 89/03/27 SMI; 
D  vme32d16.4s     E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vme24d32.4s                                                                           755       0      12           67  4424741464  10376                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme24d32.4s 1.6 89/03/27 SMI; 
E  vme32d32.4s     F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vme32d16.4s                                                                           755       0      12           67  4424741464  10377                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme32d16.4s 1.6 89/03/27 SMI; 
F  vp.4s 32    G  vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vme32d32.4s                                                                           755       0      12           67  4424741465  10376                                                                                                                                                                                                                                                                                                                                                                      .so man4/mem.4s
.\" @(#)vme32d32.4s 1.6 89/03/27 SMI; 
vpc.4s 4    H  win.4s .    I  xd.4s n.    J  xt.4s .4    K  xy.4s .4     L  zero.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s ro.4s      M  zs.4s s sockets"  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "SIOCSHIWAT set high water mark"  ""  "\fLSIOCSHIWAT\fP \(em set high water mark"
.IX  "set high water mark ioctl"  ""  "set high water mark \fLioctl./share/man/man4/vp.4s                                                                                 755       0      12         4312  4424741465   7613                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vp.4s 1.22 89/03/27 SMI;
.TH VP 4S "22 March 1989"
.SH NAME
vp \- Ikon 10071-5 Versatec parallel printer interface
.SH "CONFIG \(em SUN-2 SYSTEM"
.B device vp0 at mbio ? csr 0x400 priority 2
.SH DESCRIPTION
.IX  "vp device"  ""  "\fLvp\fP \(em Ikon 10071-5 Versatec parallel printer interface"  ""  PAGE START
.IX  "printer interface"  "vp"  ""  "\fLvp\fP \(em Ikon 10071-5 Versatec parallel printer interface"  ""  PAGE START
.IX  "Ikon 10071-5 printer interface"  ""  "Ikon 10071-5 printer interface \(em \fLvp\fP"  ""  PAGE START
.LP
This Sun interface to the Versatec printer/plotter
is supported by the Ikon parallel interface board,
a word
.SM DMA
device, which is output only.
.LP
The Versatec is normally handled by the line printer spooling system and
should not be accessed by the user directly.
.LP
Opening the device
.B /dev/vp0
may yield one of two errors:
.SM ENXIO
indicates that the device is already
in use;
.SM EIO
indicates that the device is offline.
.LP
The printer operates in either print or plot mode.
To set the printer into plot mode you should include
.B <vcmd.h>
and use the
.BR ioctl (2)
call
.LP
.RS
.B ioctl(f, \s-1VSETSTATE\s0, plotmd);
.RE
.LP
where
.I plotmd
is defined to be
.LP
.RS
.B
int plotmd[\|] = { \s-1VPLOT\s0, 0, 0 };
.RE
.LP
When going back into print mode from plot mode you normally eject
paper by sending it an
.SM EOT
after putting into print mode:
.LP
.RS
.nf
.ft B
int prtmd[\|] = { \s-1VPRINT\s0, 0, 0 };
\&.\|.\|.
fflush (vp);
f = fileno (vp);
ioctl(f, \s-1VSETSTATE\s0, prtmd);
write(f, "\e04", 1);
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/vp0
.PD
.SH SEE ALSO
.BR ioctl (2)
.SH BUGS
If you use the standard I/O library on the Versatec, be sure to explicitly
set a buffer using
.IR setbuf ,
since the library will not use
buffered output by default, and will run very slowly.
.LP
Writes must start on even byte boundaries and be an even number of bytes
in length.
.IX  "vp device"  ""  "\fLvp\fP \(em Ikon 10071-5 Versatec parallel printer interface"  ""  PAGE END
.IX  "printer interface"  "vp"  ""  "\fLvp\fP \(em Ikon 10071-5 Versatec parallel printer interface"  ""  PAGE END
.IX  "Ikon 10071-5 printer interface"  ""  "Ikon 10071-5 printer interface \(em \fLvp\fP"  ""  PAGE END
rmally handled by the line printer spooling system and
should not be accessed by the user directly.
.LP
Opening the device
.B /dev/vp0
may yield one of two errors:
.SM ENXIO
indicates that the device is already
in use;
.SM EIO
indicates that the device is offline.
.LP
The printer operates in either print or p./share/man/man4/vpc.4s                                                                                755       0      12         4657  4424741465   7772                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vpc.4s 1.20 89/03/27 SMI;
.TH VPC 4S "22 March 1989"
.SH NAME
vpc \- Systech VPC-2200 Versatec printer/plotter and Centronics printer interface
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device vpc0 at mbio ? csr 0x480 priority 2
device vpc1 at mbio ? csr 0x500 priority 2
.ft R
.fi
.SH DESCRIPTION
.IX  "vpc device"  ""  "\fLvpc\fP \(em Systech VPC-2200 Versatec/Centronics interface"  ""  PAGE START
.IX  "Systech VPC-2200 interface"  ""  "Systech VPC-2200 interface \(em \fLvpc\fP"  ""  PAGE START
.IX  "printer interface"  "vpc"  ""  "\fLvpc\fP \(em Systech VPC-2200 Versatec/Centronics interface"  PAGE START
.LP
This Sun interface to the Versatec printer/plotter and to Centronics
printers is supported by the Systech parallel interface board,
an output-only byte-wide
.SM DMA
device.
The device has one channel for Versatec devices and one channel for Centronics
devices, with an optional long lines interface for Versatec devices.
.LP
Devices attached to this interface are normally handled by the line
printer spooling system and should not be accessed by the user directly.
.LP
Opening the device
.B /dev/vpc0
or
.B /dev/lp0
may yield one of two errors:
.SM ENXIO
indicates that the device is already in use;
.SM EIO
indicates that the device is offline.
.LP
The Versatec printer/plotter operates in either print or plot mode.
To set the printer into plot mode you should include
.B <vcmd.h>
and use the
.BR ioctl (2)
call:
.LP
.RS
.B ioctl(f, \s-1VSETSTATE\s0, plotmd);
.RE
.LP
where
.I plotmd
is defined to be
.LP
.RS
.B
int plotmd[\|] = { \s-1VPLOT\s0, 0, 0 };
.RE
.LP
When going back into print mode from plot mode you normally eject
paper by sending it an
.SM EOT
after putting into print mode:
.LP
.RS
.nf
.ft B
int prtmd[\|] = { \s-1VPRINT\s0, 0, 0 };
\&.\|.\|.
fflush (vpc);
f = fileno(vpc);
ioctl(f, \s-1VSETSTATE\s0, prtmd);
write(f, "\e04", 1);
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/vpc0
.TP
.B /dev/lp0
.PD
.SH SEE ALSO
.BR ioctl (2)
.SH BUGS
If you use the standard I/O library on the Versatec, be sure to explicitly
set a buffer using
.IR setbuf ,
since the library will not use
buffered output by default, and will run very slowly.
.IX  "vpc device"  ""  "\fLvpc\fP \(em Systech VPC-2200 Versatec/Centronics interface"  ""  PAGE END
.IX  "Systech VPC-2200 interface"  ""  "Systech VPC-2200 interface \(em \fLvpc\fP"  ""  PAGE END
.IX  "printer interface"  "vpc"  ""  "\fLvpc\fP \(em Systech VPC-2200 Versatec/Centronics interface"  PAGE END
ved packet is in error,
the packet will be dropped with no indication given to th./share/man/man4/win.4s                                                                                755       0      12         3330  4424741465   7762                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)win.4s 1.19 89/03/27 SMI;
.TH WIN 4S "9 October 1987"
.SH NAME
win \- Sun window system
.SH CONFIG
.nf
.B "pseudo-device win\fInumber\fP"
.B "pseudo-device dtop\fInumber\fP"
.fi
.SH DESCRIPTION
.IX  "win device"  ""  "\fLwin\fP \(em Sun window system"  ""  PAGE START
.LP
The
.B win
pseudo-device accesses the system drivers supporting the Sun window system.
.IR number ,
in the device description line above, indicates
the
maximum number of windows supported by the system.
.I number
is set
to 128 in the
.SM GENERIC
system configuration file used to generate the
kernel used in Sun systems as they are shipped.
The
.I dtop
pseudo-device line indicates the number of
separate ``desktops'' (frame buffers) that can be
actively running the Sun window system at once.
In the
.SM GENERIC
file, this number is set to 4.
.LP
Each window in the system is represented by a
.B /dev/win*
device.
The windows are organized as a tree with windows being subwindows of
their parents, and covering/covered by their siblings.  Each window
has a position in the tree, a position on a display screen,
an input queue, and information telling what parts of it are exposed.
.LP
The window driver multiplexes keyboard and mouse input among the
several windows, tracks the mouse with a cursor on the screen,
provides each window access to information about what parts of it are exposed,
and notifies the manager process for a window
when the exposed area of the window changes so that the window may
repair its display.
.LP
Full information on the window system functions is given in the
.TX SVSPG .
.IX  "win device"  ""  "\fLwin\fP \(em Sun window system"  ""  PAGE END
.SH FILES
.PD 0
.TP 20
.B /dev/win[0-9]
.TP
.B /dev/win[0-9][0-9]
.PD
.SH "SEE ALSO
.TX SVSPG
\s-1VPRINT\s0, 0, 0 };
\&.\|.\|.
fflush (vpc);
f = fileno(vpc);
ioctl(f, \s-1VSETSTATE\s0, prtmd);
write(f, "\e04", 1);
.ft R
.fi
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/vpc0
.TP
.B /dev/lp0
.PD
.SH SEE ALSO
.BR ioctl (2)
.SH BUGS
If you use the standard I/O library on the Versatec, be sure to explic./share/man/man4/xd.4s                                                                                 755       0      12        13336  4424741465   7627                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xd.4s 1.7 89/03/27 SMI;
.TH XD 4S "24 November 1987"
.SH NAME
xd \- Disk driver for Xylogics 7053 SMD Disk Controller
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
controller xdc0 at vme16d32 ? csr 0xee80 priority 2 vector xdintr 0x44
controller xdc1 at vme16d32 ? csr 0xee90 priority 2 vector xdintr 0x45
controller xdc2 at vme16d32 ? csr 0xeea0 priority 2 vector xdintr 0x46
controller xdc3 at vme16d32 ? csr 0xeeb0 priority 2 vector xdintr 0x47
disk xd0 at xdc0 drive 0
disk xd1 at xdc0 drive 1
disk xd2 at xdc0 drive 2
disk xd3 at xdc0 drive 3
disk xd4 at xdc1 drive 0
disk xd5 at xdc1 drive 1
disk xd6 at xdc1 drive 2
disk xd7 at xdc1 drive 3
disk xd8 at xdc2 drive 0
disk xd9 at xdc2 drive 1
disk xd10 at xdc2 drive 2
disk xd11 at xdc2 drive 3
disk xd12 at xdc3 drive 0
disk xd13 at xdc3 drive 1
disk xd14 at xdc3 drive 2
disk xd15 at xdc3 drive 3
.fi
.ft R
.LP
The four
.B controller
lines given in the synopsis section above specify
the first, second, third, and fourth Xylogics 7053 SMD disk controller
in a Sun system.
.SH DESCRIPTION
.IX  "xd device"  ""  "\fLxd\fP \(em Xylogics SMD Disk driver"  ""  PAGE START
.IX  "Xylogics SMD Disk driver"  ""  "Xylogics SMD Disk driver \(em \fLxd\fP"  ""  PAGE START
.IX  "7053 SMD Disk driver"  ""  "7053 SMD Disk driver \(em \fLxd\fP"  ""  PAGE START
.IX  "SMD disk controller"  "Xylogics 7053"  ""  "\fLxd\fP \(em Xylogics 7053"  PAGE START
.IX  "disk driver"  "Xylogics"  ""  "\fLxd\fP \(em Xylogics"  PAGE START
.LP
Files with minor device numbers 0 through 7 refer to various portions
of drive 0; minor devices 8 through 15 refer to drive 1, and so on.
The standard device names begin with
.B xd
followed by
the drive number and then a letter a-h for partitions 0-7 respectively.
The character ? stands here for a drive number in the range 0-7.
.LP
The block files access the disk using the system's normal
buffering mechanism and may be read and written without regard to
physical disk records.  There is also a \(lqraw\(rq interface
which provides for direct transmission between the disk
and the user's read or write buffer.
A single read or write call usually results in only one I/O operation;
therefore raw I/O is considerably more efficient when
many words are transmitted.  The names of the raw files conventionally
begin with an extra
.BR r .
.LP
In raw I/O counts should be a multiple of 512 bytes (a disk sector).
Likewise
.BR directory (3)
calls should specify a multiple of 512 bytes.
.LP
If
.B "flags 0x1"
is specified, the overlapped seeks feature for that drive is turned off.
Note: to be effective, the flag must be set on all drives for a
specific controller. This action is necessary for controllers with older
firmware, which have bugs preventing overlapped seeks from working properly.
.SH "DISK SUPPORT"
This driver handles all
.SM SMD
drives by reading a label from sector
0 of the drive which describes the disk geometry and partitioning.
.LP
The
.B xd?a
partition is normally used for the root file system
on a disk, the xd?b partition as a paging area,
and the
.B xd?c
partition for pack-pack copying (it normally maps
the entire disk).  The rest of the disk is normally the
.B xd?g
partition.
.SH FILES
.PD 0
.TP 20
.B /dev/xd[0-7][a-h]
block files
.TP
.B /dev/rxd[0-7][a-h]
raw files
.PD
.SH SEE ALSO
.BR lseek (2),
.BR read (2V),
.BR write (2V),
.BR directory (3),
.BR dkio (4S)
.SH DIAGNOSTICS
.TP
.B xdc\fIn\fP: self test error
Self test error in controller,
see the Maintenance and Reference Manual.
.TP
.B xd\fIn\fP: unable to read bad sector info
The bad sector forwarding information for the disk could not be read.
.TP
.B xd\fIn\fP: initialization failed
The drive could not be successfully initialized.
.TP
.B xd\fIn\fP: unable to read label
The drive geometry/partition table information could not be read.
.TP
.B xd\fIn\fP: Corrupt label
The geometry/partition label checksum was incorrect.
.TP
.B xd\fIn\fP: offline
A drive ready status is no longer detected, so the unit has been logically
removed from the system. If the drive ready status is restored, the unit
will automatically come back online the next time it is accessed.
.TP
.B
xd\fInc\fP: \fIcmd how \fP(\fImsg\|\fP) blk \fI#\fIn\fP \fPabs blk #\fI\fIn\fP
A command such as read or write encountered an error condition (\fIhow\fP):
either it
.IR failed ,
the controller was
.IR reset ,
the unit was
.IR restored ,
or an operation was
\fIretry\fP'ed.
The
.I msg
is derived from the error number
given by the controller, indicating a condition such as \(lqdrive not ready\
(rq,
\(lqsector not found\(rq or \(lqdisk write protected\(rq.  The
.I blk #
is the sector
in error relative to the beginning of the partition involved.
The
.I abs blk #
is the absolute block number of the sector in error.
Some fields of the error message may be missing since the information
is not always available.
.SH BUGS
In raw I/O
.BR read (2V)
and
.BR write (2V)
truncate file offsets to 512-byte block boundaries, and
.BR write (2V)
scribbles on the tail of incomplete blocks.
Thus, in programs that are likely to access raw devices,
.BR read (2V),
.BR write (2V)
and
.BR lseek (2)
should always deal in 512-byte multiples.
.LP
Older revisions of the firmware do not properly support overlapped seeks.
This will only affect systems with multiple disks on a single controller.
If a large number of \(lqzero sector count\(rq errors appear, you should use the
.B flags
field to disable overlapped seeks.
.IX  "xd device"  ""  "\fLxd\fP \(em Xylogics SMD Disk driver"  ""  PAGE END
.IX  "Xylogics SMD Disk driver"  ""  "Xylogics SMD Disk driver \(em \fLxd\fP"  ""  PAGE END
.IX  "7053 SMD Disk driver"  ""  "7053 SMD Disk driver \(em \fLxd\fP"  ""  PAGE END
.IX  "SMD disk controller"  "Xylogics 7053"  ""  "\fLxd\fP \(em Xylogics 7053"  PAGE END
.IX  "disk driver"  "Xylogics"  ""  "\fLxd\fP \(em Xylogics"  PAGE END
RT"
This driver handles all
.SM SMD
drives by reading a label from sector
0 of the drive which describes the disk geometry and partitioning.
.LP
The
.B xd?a
partition is normally used for the root file system
on a disk, the xd?b partition as a paging area,
and the
.B xd?c
partition for pac./share/man/man4/xt.4s                                                                                 755       0      12         4723  4424741465   7627                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xt.4s 1.17 89/03/27 SMI;
.TH XT 4S "9 October 1987"
.SH NAME
xt \- Xylogics 472 1/2 inch tape controller
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
controller xtc0 at vme16d16 ? csr 0xee60 priority 3 vector xtintr 0x64
controller xtc1 at vme16d16 ? csr 0xee68 priority 3 vector xtintr 0x65
tape xt0 at xtc0 drive 0 flags 1
tape xt1 at xtc1 drive 0 flags 1
.ft R
.fi
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
controller xtc0 at mbio ? csr 0xee60 priority 3
controller xtc0 at vme16 ? csr 0xee60 priority 3 vector xtintr 0x64
controller xtc1 at mbio ? csr 0xee68 priority 3
controller xtc1 at vme16 ? csr 0xee68 priority 3 vector xtintr 0x65
tape xt0 at xtc0 drive 0 flags 1
tape xt1 at xtc1 drive 0 flags 1
.ft R
.fi
.SH DESCRIPTION
.IX  "xt device"  ""  "\fLxt\fP \(em Xylogics 472 1/2-inch tape drive"  ""  PAGE START
.IX  "Xylogics 472 1/2-inch tape drive"  ""  "Xylogics 472 1/2-inch tape drive \(em \fLxt\fP"  ""  PAGE START
.IX  "tape drive, 1/2-inch"  xt  ""  "\fLxt\fP \(em Xylogics 472"  PAGE START
.IX  "1/2-inch tape drive"  xt  ""  "\fLxt\fP \(em Xylogics 472"  PAGE START
.IX  "472 1/2-inch tape drive"  ""  "472 1/2-inch tape drive \(em \fLxt\fP"  ""  PAGE START
.LP
The Xylogics 472 tape controller controls  Pertec-interface
1/2'' tape drives such as the
.SM CDC
Keystone III, providing a standard
tape interface to the device, see
.BR mtio (4).
This controller is used to support high speed or
high density drives, which are not supported effectively by the older
TapeMaster controller (see
.BR tm (4S)).
.LP
The flags field is used to control remote density select operation:
a 0 specifies no remote density selection is to be attempted,
a 1 specifies that the Pertec density-select line is used to toggle
between high and low density;
a 2 specifies that the Pertec speed-select line is used to toggle
between high and low density.
The default is 1, which is appropriate for the
.SM CDC
Keystone III (92185) and
the Telex 9250.
In no case will the controller select among more than 2 densities.
.IX  "xt device"  ""  "\fLxt\fP \(em Xylogics 472 1/2-inch tape drive"  ""  PAGE END
.IX  "Xylogics 472 1/2-inch tape drive"  ""  "Xylogics 472 1/2-inch tape drive \(em \fLxt\fP"  ""  PAGE END
.IX  "tape drive, 1/2-inch"  xt  ""  "\fLxt\fP \(em Xylogics 472"  PAGE END
.IX  "1/2-inch tape drive"  xt  ""  "\fLxt\fP \(em Xylogics 472"  PAGE END
.IX  "472 1/2-inch tape drive"  ""  "472 1/2-inch tape drive \(em \fLxt\fP"  ""  PAGE END
.SH SEE ALSO
.BR mt (1),
.BR tar (1),
.BR mtio (4),
.BR tm (4S)
fLxd\fP"  ""  PAGE END
.IX  "7053 SMD Disk dr./share/man/man4/xy.4s                                                                                 755       0      12        15724  4424741466   7660                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)xy.4s 1.26 89/03/27 SMI;
.TH XY 4S "22 March 1989"
.SH NAME
xy \- Disk driver for Xylogics 450 and 451 SMD Disk Controllers
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
controller xyc0 at vme16d16 ? csr 0xee40 priority 2 vector xyintr 0x48
controller xyc1 at vme16d16 ? csr 0xee48 priority 2 vector xyintr 0x49
disk xy0 at xyc0 drive 0
disk xy1 at xyc0 drive 1
disk xy2 at xyc1 drive 0
disk xy3 at xyc1 drive 1
.fi
.ft R
.LP
The two
.B controller
lines given in the synopsis sections above specify
the first and second Xylogics 450 or 451
.SM SMD
disk controller in a Sun system.
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
controller xyc0 at vme16 ? csr 0xee40 priority 2 vector xyintr 0x48
controller xyc1 at vme16 ? csr 0xee48 priority 2 vector xyintr 0x49
controller xyc0 at mbio ? csr 0xee40 priority 2
controller xyc1 at mbio ? csr 0xee48 priority 2
disk xy0 at xyc0 drive 0
disk xy1 at xyc0 drive 1
disk xy2 at xyc1 drive 0
disk xy3 at xyc1 drive 1
.ft R
.fi
.LP
The first two
.B controller
lines specify the first and second Xylogics 450 or 451
.SM SMD
disk controllers in a
Sun-2/160
.SM VME\s0bus
based system.  The third and fourth
.B controller
lines specify the first and second Xylogics 450 or 451
.SM SMD
disk controllers in a
Sun-2/120 or a Sun-2/170 Multibus based system.
.SH DESCRIPTION
.IX  "xy device"  ""  "\fLxy\fP \(em Xylogics SMD Disk driver"  ""  PAGE START
.IX  "Xylogics SMD Disk driver"  ""  "Xylogics SMD Disk driver \(em \fLxy\fP"  ""  PAGE START
.IX  "450 SMD Disk driver"  ""  "450 SMD Disk driver \(em \fLxy\fP"  ""  PAGE START
.IX  "451 SMD Disk driver"  ""  "451 SMD Disk driver \(em \fLxy\fP"  ""  PAGE START
.IX  "SMD disk controller"  "Xylogics 450"  ""  "\fLxy\fP \(em Xylogics 450"  PAGE START
.IX  "SMD disk controller"  "Xylogics 451"  ""  "\fLxy\fP \(em Xylogics 451"  PAGE START
.IX  "disk driver"  "Xylogics"  ""  "\fLxy\fP \(em Xylogics"  PAGE START
.LP
Files with minor device numbers 0 through 7 refer to various portions
of drive 0; minor devices 8 through 15 refer to drive 1, and so on.
The standard device names begin with
.B xy
followed by
the drive number and then a letter a-h for partitions 0-7 respectively.
The character
.RB ` ? '
stands here for a drive number in the range 0-7.
.LP
The block files access the disk using the system's normal
buffering mechanism and may be read and written without regard to
physical disk records.  There is also a \(lqraw\(rq interface
which provides for direct transmission between the disk
and the user's read or write buffer.
A single read or write call usually results in only one I/O operation;
therefore raw I/O is considerably more efficient when
many words are transmitted.  The names of the raw files conventionally
begin with an extra
.BR r .
.LP
When using raw I/O,
transfer counts should be multiples of 512 bytes (the size of a disk sector).
Likewise, when using
.BR lseek (2)
to specify block offsets from which to perform raw I/O,
the logical offset should also be a multiple of 512 bytes.
.LP
Due to word ordering differences between the disk controller
and Sun computers,
user buffers that are used for raw I/O must not begin on odd byte boundaries.
.LP
If
.B "flags 0x1"
is specified, the overlapped seeks feature for that drive is turned off.
Note: to be effective, the flag must be set on all drives for a
specific controller. This action is necessary for controllers with older
firmware, which have bugs preventing overlapped seeks from working properly.
.SH "DISK SUPPORT"
This driver handles all
.SM SMD
drives by reading a label from sector
0 of the drive which describes the disk geometry and partitioning.
.LP
The
.B xy?a
partition is normally used for the root file system
on a disk, the
.B xy?b
partition as a paging area,
and the
.B xy?c
partition for pack-pack copying (it normally maps
the entire disk).  The rest of the disk is normally the
.B xy?g
partition.
.SH FILES
.PD 0
.TP 20
.B /dev/xy[0-7][a-h]
block files
.TP
.B /dev/rxy[0-7][a-h]
raw files
.PD
.SH SEE ALSO
.BR lseek (2),
.BR read (2V),
.BR directory (3),
.BR write (2V),
.BR dkio (4S)
.SH DIAGNOSTICS
.TP
.B xyc\fIn\fP : self test error
Self test error in controller,
see the Maintenance and Reference Manual.
.TP
.B
xyc\fIn\fP: \s-1WARNING\s0: \fIn\fP bit addresses
The controller is strapped incorrectly.  Sun systems use 20-bit addresses
for Multibus based systems and 24-bit addresses for
.SM VME\s0bus
based systems.
.TP
.B
xy\fIn\fP : unable to read bad sector info
The bad sector forwarding information for the disk could not be read.
.TP
.B
xy\fIn\fP and xy\fIn\fP are of same type (\fIn\fP) with different geometries.
The 450 and 451 do not support mixing the drive types found on these units
on a single controller.
.TP
.B xy\fIn\fP : initialization failed
The drive could not be successfully initialized.
.TP
.B xy\fIn\fP : unable to read label
The drive geometry/partition table information could not be read.
.TP
.B xy\fIn\fP : Corrupt label
The geometry/partition label checksum was incorrect.
.TP
.B xy\fIn\fP : offline
A drive ready status is no longer detected, so the unit has been logically
removed from the system. If the drive ready status is restored, the unit
will automatically come back online the next time it is accessed.
.TP
.B
xy\fInc\fP: \fIcmd how \fP(\fImsg\|\fP) blk \fI#\fIn\fP \fPabs blk #\fIn\fP
A command such as read or write encountered an error condition (\fIhow\fP):
either it
.IR failed ,
the controller was
.IR reset ,
the unit
was
.IR restored ,
or an operation
was
\fIretry\fP'ed.
The
.I msg
is derived from the error number
given by the controller, indicating a condition such as \(lqdrive not ready\(rq,
\(lqsector not found\(rq or \(lqdisk write protected\(rq.  The
.I blk #
is the
sector
in error relative to the beginning of the partition involved.
The
.I abs blk #
is the absolute block number of the sector in error.
Some fields of the error message may be missing since the information
is not always available.
.SH BUGS
In raw I/O
.BR read (2V)
and
.BR write (2V)
truncate file offsets to 512-byte block boundaries, and
.BR write (2V)
scribbles on the tail of incomplete blocks.
Thus, in programs that are likely to access raw devices,
.BR read (2V),
.BR write (2V)
and
.BR lseek (2)
should always deal in 512-byte multiples.
.LP
Older revisions of the firmware do not properly support overlapped seeks.
This will only affect systems with multiple disks on a single controller.
If a large number of \(lqzero sector count\(rq errors appear, you should use the
.B flags
field to disable overlapped seeks.
.IX  "xy device"  ""  "\fLxy\fP \(em Xylogics SMD Disk driver"  ""  PAGE END
.IX  "Xylogics SMD Disk driver"  ""  "Xylogics SMD Disk driver \(em \fLxy\fP"  ""  PAGE END
.IX  "450 SMD Disk driver"  ""  "450 SMD Disk driver \(em \fLxy\fP"  ""  PAGE END
.IX  "451 SMD Disk driver"  ""  "451 SMD Disk driver \(em \fLxy\fP"  ""  PAGE END
.IX  "SMD disk controller"  "Xylogics 450"  ""  "\fLxy\fP \(em Xylogics 450"  PAGE END
.IX  "SMD disk controller"  "Xylogics 451"  ""  "\fLxy\fP \(em Xylogics 451"  PAGE END
.IX  "disk driver"  "Xylogics"  ""  "\fLxy\fP \(em Xylogics"  PAGE END
a label from sector
0 of the drive which des./share/man/man4/zero.4s                                                                               755       0      12         1646  4424741466  10155                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)zero.4s 1.5 89/03/27 SMI;
.TH ZERO 4S "9 October 1987"
.SH NAME
zero \- source of zeroes
.SH SYNOPSIS
None; included with standard system.
.IX  "unnamed memory"  ""  "\fLzero\fP \(em source of zeroed unnamed memory"
.SH DESCRIPTION
.LP
A zero special file is a source of zeroed unnamed memory.
.LP
Reads from a zero special file always return a buffer full of zeroes.  The
file is of infinite length.
.LP
Writes to a zero special file are always successful, but the data written is
ignored.
.LP
Mapping a zero special file creates a zero-initialized unnamed memory
object of a length equal to the length of the mapping and rounded up to the
nearest page size as returned by
.BR getpagesize (2).
Multiple processes
can share such a zero special file object provided a common ancestor mapped
the object
.BR \s-1MAP_SHARED\s0 .
.SH FILES
.PD 0
.TP 20
.B /dev/zero
.PD
.SH SEE ALSO
.BR fork (2),
.BR getpagesize (2),
.BR mmap (2)
 not be read.
.TP
.B
xy\fIn\fP and xy\fIn\fP are of same type (\fIn\fP) with different geo./share/man/man4/zs.4s                                                                                 755       0      12        15744  4424741466   7656                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)zs.4s 1.31 89/03/27 SMI;
.TH ZS 4S "25 March 1989"
.SH NAME
zs \- Zilog 8530 SCC serial communications driver
.SH "CONFIG \(em SUN-3 SYSTEM"
.ft B
.nf
device zs0 at obio ? csr 0x20000 flags 3 priority 3
device zs1 at obio ? csr 0x00000 flags 0x103 priority 3
.ft R
.fi
.SH "CONFIG \(em SUN-3x SYSTEM"
.ft B
.nf
device zs0 at obio ? csr 0x62002000 flags 3 priority 3
device zs1 at obio ? csr 0x62000000 flags 0x103 priority 3
.ft R
.fi
.SH "CONFIG \(em SUN-2 SYSTEM"
.ft B
.nf
device zs0 at virtual ? csr 0xeec800 flags 3 priority 3
device zs1 at virtual ? csr 0xeec000 flags 0x103 priority 3
device zs2 at mbmem ? csr 0x80800 flags 3 priority 3
device zs3 at mbmem ? csr 0x81000 flags 3 priority 3
device zs4 at mbmem ? csr 0x84800 flags 3 priority 3
device zs5 at mbmem ? csr 0x85000 flags 3 priority 3
.ft R
.fi
.SH "CONFIG \(em Sun386i SYSTEM"
.ft B
.nf
device zs0 at obmem ? csr 0xFC000000 flags 3 irq 9 priority 6
.br
device zs1 at obmem ? csr 0xA0000020 flags 0x103 irq 9 priority 6
.ft R
.fi
.SH SYNOPSIS
.ft B
.nf
#include <fcntl.h>
#include <sys/termios.h>
open("/dev/tty\fIn\fB", mode);
open("/dev/ttyd\fIn\fB", mode);
open("/dev/cua\fIn\fB", mode);
.ft R
.fi
.SH DESCRIPTION
.IX  "zs device"  ""  "\fLzs\fP \(em zilog 8530 SCC serial communications driver"  ""  PAGE START
.IX  "8530 SCC serial communications driver"  ""  "8530 SCC serial communications driver \(em \fLzs\fP"  ""  PAGE START
.IX  "serial communications driver \(em \fLzs\fP"  ""  "" "" PAGE START
.LP
The Zilog 8530 provides 2 serial communication ports with full modem control
in asynchronous mode.
Each port supports those
.BR termio (4)
device control functions specified by flags in the
.B c_cflag
word of the
.B termios
structure and by the
.BR \s-1IGNBRK\*S ,
.BR \s-1IGNPAR\*S ,
.BR \s-1PARMRK\*S ,
or
.SB INPCK
flags in the
.B c_iflag
word of the
.B termios
structure are performed by the
.B zs
driver.  All other
.BR termio (4)
functions must be performed by
.SM STREAMS
modules pushed atop the driver; when a device is opened, the
.BR ldterm (4M)
and
.BR ttcompat (4M)
.SM STREAMS
modules are automatically pushed on top of the stream, providing the
standard
.BR termio (4)
interface.
.LP
Of the synopsis lines above, the line for
.B zs0
specifies the serial I/O
port(s) provided by the
.SM CPU
board, the line for
.B zs1
specifies the
Video Board ports (which are used for keyboard and mouse),
the lines for
.B zs2
and
.B zs3
specify the first and second ports on the first
.SM SCSI
board in a system, and those for
.B zs4
and
.B zs5
specify the first and
second ports provided by the second
.SM SCSI
board in a system, respectively.
.LP
Bit
.I i
of
.B flags
may be specified to say that a line is not properly
connected, and that the line
.I i
should be treated as hard-wired with carrier
always present.  Thus specifying
.B "flags 0x2"
in the specification of
.B zs0
would treat line
.B /dev/ttyb
in this way.
.LP
Minor device numbers in the range 0 \- 11 correspond directly to the
normal tty lines and are named
.B /dev/ttya
and
.B /dev/ttyb
for the two serial ports on the
.SM CPU
board and
.BI /dev/ttys n
for the ports on the
.SM SCSI
boards;
.I n
is 0 or 1 for the ports on the first
.SM SCSI
board, and 2 or 3 for the ports on the second
.SM SCSI
board.
.LP
To allow a single tty line to be connected to a modem and used for
both incoming and outgoing calls, a special feature, controlled by
the minor device number, has been added.
Minor device numbers in the range 128 \- 139 correspond to the same physical
lines as those above (that is,
the same line as the minor device number minus 128).
.LP
A dial-in line has a minor device in the range 0 \- 11 and
is conventionally renamed
\fB/dev/ttyd\fIn\fR,
where
.I n
is a number indicating which dial-in line it is (so that
.B /dev/ttyd0
is the first dial-in line), and the dial-out line corresponding to that dial-in
line has a minor device number 128 greater than the minor device number of the
dial-in line and is conventionally named
\fB/dev/cua\fIn\fR,
where
.I n
is the number of the dial-in line.
.LP
The
.BI /dev/cua n
lines are special in that they can be opened even when
there is no carrier on the line.
Once a
.BI /dev/cua n
line is opened, the corresponding tty line can not be
opened until the
.BI /dev/cua n
line is closed; a blocking open will wait until the
.BI /dev/cua n
line is closed (which will drop Data Terminal Ready, after which Carrier Detect
will usually drop as well) and carrier is detected again, and a non-blocking
open will return an error.
Also, if the
.BI /dev/ttyd n
line has been opened successfully (usually only
when carrier is recognized on the modem) the corresponding
.BI /dev/cua n
line can not be opened.
This allows a modem to be attached to e.g.
.B /dev/ttyd0
(renamed from
.BR /dev/ttya )
and used for dialin (by enabling the line for
login in
.BR /etc/ttytab )
and also used for dialout (by
.BR tip (1C)
or
.BR uucp (1C))
as
.B /dev/cua0
when no one is logged in on
the line.
Note: the bit in the
.B flags
word in the configuration file (see above) must be zero
for this line,
which enables hardware carrier detection.
.SH IOCTLS
The standard set of
.B termio
.B ioctl(\|)
calls are supported by
.BR zs .
.LP
If the
.SB CRTSCTS
flag in the
.B c_cflag
is set, output will be generated only if
.SM CTS
is high; if
.SM CTS
is low,
output will be frozen.   If the
.SB CRTSCTS
flag is clear, the state of
.SM CTS
has no effect.
Breaks can be generated by the
.BR \s-1TCSBRK\s0 ,
.BR \s-1TIOCSBRK\s0 ,
and
.SB TIOCCBRK
.B ioctl(\|)
calls.
The modem control lines
.BR \s-1TIOCM_CAR\s0 ,
.BR \s-1TIOCM_CTS\s0 ,
.BR \s-1TIOCM_RTS\s0 ,
and
.SB TIOCM_DTR
are provided.
.LP
The input and output line speeds may be set to any of the speeds
supported by
.BR termio .
The speeds cannot be set independently; when the output speed is set,
the input speed is set to the same speed.
.SH ERRORS
An
.B open(\|)
will fail if:
.TP 15
ENXIO
The unit being opened does not exist.
.TP 15
EBUSY
The dial-out device is being opened and the dial-in device is already open, or
the dial-in device is being opened with a no-delay open and the dial-out device
is already open.
.TP 15
EBUSY
The unit has been marked as exclusive-use by another process with a
.SB TIOCEXCL
.B ioctl(\|)
call.
.TP 15
EINTR
The open was interrupted by the delivery of a signal.
.SH FILES
.PD 0
.TP 20
.B /dev/tty{a,b,s[0-3]}
hardwired tty lines
.TP
.B /dev/ttyd[0-9a-f]
dialin tty lines
.TP
.B /dev/cua[0-9a-f]
dialout tty lines
.PD
.SH "SEE ALSO"
.BR tip (1C),
.BR uucp (1C),
.BR mcp (4S),
.BR mti (4S),
.BR termio (4),
.BR ldterm (4M),
.BR ttcompat (4M)
.SH DIAGNOSTICS
.TP
.B zs\fIn\|c\fP\|: silo overflow.
The 8530 character input silo overflowed
before it could be serviced.
.TP
.B zs\fIn\|c\fP\|: ring buffer overflow.
The driver's character input ring buffer overflowed
before it could be serviced.
.IX  "zs device"  ""  "\fLzs\fP \(em zilog 8530 SCC serial communications driver"  ""  PAGE END
.IX  "8530 SCC serial communications driver"  ""  "8530 SCC serial communications driver \(em \fLzs\fP"  ""  PAGE END
.IX  "serial communications driver \(em \fLzs\fP"  ""  "" "" PAGE END
specify the first and
second./share/man/man5/                                                                                      775       0      12            0  4425704301   6616                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man5/Intro.5                                                                               755       0      12          653  4424741501  10053                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.5 1.12 89/03/27 SMI;
.TH INTRO 5 "19 October 1987"
.SH NAME
intro \- file formats used or read by various programs
.SH DESCRIPTION
.IX  "file formats"
.IX  introduction "file formats"
This section describes formats of files used by various programs.
.SH "LIST OF FILE FORMATS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf
.B Name	Appears on Page 	Description
.sp
.nr zZ 1
.so /usr/man/man5/List.5
.nr zZ 0
.fi
  cpio.5    |  z  	crontab.5 M    z  	current.5 M    z  
defaults.5 ./share/man/man5/List.5                                                                                755       0      12        13532  4424741501   7733                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.5 1.12 89/03/27 SMI
.if \n(zZ=1 .ig zZ 
.TH LIST 5 "14 December 1987"
.SH LIST OF FILE FORMATS
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page	Description\fR
.sp
.zZ
\fBa.out\fR	\fBa.out\fR(5)	 assembler and link editor output format
\fBacct\fR	\fBacct\fR(5)	 execution accounting file
\fBaddresses\fR	\fBaliases\fR(5)	 addresses and aliases for sendmail(8)
\fBaliases\fR	\fBaliases\fR(5)	 addresses and aliases for sendmail(8)
\fBar\fR	\fBar\fR(5)	 archive (library) file format
\fBaudit.log\fR	\fBaudit.log\fR(5)	 the security audit trail file
\fBaudit_control\fR	\fBaudit_control\fR(5)	 control information for system audit daemon
\fBaudit_data\fR	\fBaudit_data\fR(5)	 current information on audit daemon
\fBauto.home\fR	\fBauto.home\fR(5)	automount map for home directories
\fBauto.vol\fR	\fBauto.vol\fR(5)	automount map for volumes
\fBbar\fR	\fBbar\fR(5)	 tape archive file format
\fBbootparams\fR	\fBbootparams\fR(5)	 boot parameter data base
\fBCOFF\fR	\fBcoff\fR(5)	 common assembler and link editor output
\fBcore\fR	\fBcore\fR(5)	 format of memory image file
\fBcpio\fR	\fBcpio\fR(5)	 format of cpio archive
\fBcrontab\fR	\fBcrontab\fR(5)	 table of times to run periodic jobs
\fBdefaults\fR	\fBdefaults\fR(5)	 default specifications for SunView
\fBdir\fR	\fBdir\fR(5)	 format of directories
\fBdump\fR	\fBdump\fR(5)	 incremental dump format
\fBdumpdates\fR	\fBdump\fR(5)	 incremental dump format
\fBenviron\fR	\fBenviron\fR(5V)	 user environment
\fBethers\fR	\fBethers\fR(5)	 Ethernet address to hostname database or YP domain
\fBexports\fR	\fBexports\fR(5)	 directories to export to NFS clients
\fBfcntl\fR	\fBfcntl\fR(5)	 file control options
\fBforward\fR	\fBaliases\fR(5)	 addresses and aliases for sendmail(8)
\fBfs\fR	\fBfs\fR(5)	 format of a 4.2 (ufs) file system volume
\fBfspec\fR	\fBfspec\fR(5)	 format specification in text files
\fBfstab\fR	\fBfstab\fR(5)	 static filesystem mounting table, mounted filesystems table
\fBftpusers\fR	\fBftpusers\fR(5)	 list of users prohibited by ftp
\fBgettytab\fR	\fBgettytab\fR(5)	 terminal configuration data base
\fBgroup.adjunct\fR	\fBgroup\fR(5)	 group security data file
\fBgroup\fR	\fBgroup\fR(5)	 group file
\fBhelp\fR	\fBhelp\fR(5)	 help file format
\fBhelp_viewer\fR	\fBhelp_viewer\fR(5)	 help viewer file format
\fBhosts.equiv\fR	\fBhosts\fR(5)	 list of trusted hosts
\fBhosts\fR	\fBhosts\fR(5)	 host name data base
\fBinetd.conf\fR	\fBinetd.conf\fR(5)	 Internet servers database
\fBinode\fR	\fBfs\fR(5)	 format of a 4.2 (ufs) file system volume
\fBinternat\fR	\fBinternat\fR(5)	 key mapping table for internationalization
\fBipalloc.netrange\fR	\fBipalloc.netrange\fR(5)	 range of addresses to allocate
\fBlastlog\fR	\fButmp\fR(5)	 login records
\fBmagic\fR	\fBmagic\fR(5)	 file command's magic number file
\fBmtab\fR	\fBfstab\fR(5)	 static filesystem mounting table, mounted filesystems table
\fBmtab\fR	\fBmtab\fR(5)	 mounted file system table
\fBnetgroup\fR	\fBnetgroup\fR(5)	 list of network groups
\fBnetmasks\fR	\fBnetmasks\fR(5)	 network mask data base
\fBnetrc\fR	\fBnetrc\fR(5)	 file for ftp(1) remote login data
\fBnetworks\fR	\fBnetworks\fR(5)	 network name data base
\fBpasswd.adjunct\fR	\fBpasswd\fR(5)	 user security data file
\fBpasswd\fR	\fBpasswd\fR(5)	 password file
\fBphones\fR	\fBphones\fR(5)	 remote host phone number data base
\fBplot\fR	\fBplot\fR(5)	 graphics interface
\fBpolicies\fR	\fBpolicies\fR(5)	 network administration policies
\fBprintcap\fR	\fBprintcap\fR(5)	 printer capability data base
\fBprotocols\fR	\fBprotocols\fR(5)	 protocol name data base
\fBpublickey\fR	\fBpublickey\fR(5)	 publickey database
\fBqueuedefs\fR	\fBqueuedefs\fR(5)	 at/batch/cron queue description file
\fBrasterfile\fR	\fBrasterfile\fR(5)	 Sun's file format for raster images
\fBremote\fR	\fBremote\fR(5)	 remote host description file
\fBrgb\fR	\fBrgb\fR(5)	 available colors (by name) for coloredit
\fBrootmenu\fR	\fBrootmenu\fR(5)	 root menu specification for SunView
\fBrpc\fR	\fBrpc\fR(5)	 rpc program number data base
\fBsccsfile\fR	\fBsccsfile\fR(5)	 format of SCCS file
\fBservices\fR	\fBservices\fR(5)	 Internet services and aliases
\fBsm.bak\fR	\fBsm\fR(5)	 in.statd directory and file structures
\fBsm.bak\fR	\fBstatmon\fR(5)	 statd directories and file structures
\fBsm.state\fR	\fBsm\fR(5)	 in.statd directory and file structures
\fBsm\fR	\fBsm\fR(5)	 in.statd directory and file structures
\fBsm\fR	\fBstatmon\fR(5)	 statd directories and file structures
\fBstate\fR	\fBstatmon\fR(5)	 statd directories and file structures
\fBsunview\fR	\fBsunview\fR(5)	 initialization file for SunView
\fBsyslog.conf\fR	\fBsyslog.conf\fR(5)	 configuration file for syslogd system log daemon
\fBtar\fR	\fBtar\fR(5)	 tape archive file format
\fBterm\fR	\fBterm\fR(5)	 terminal driving tables for nroff
\fBterm\fR	\fBterm\fR(5V)	 format of compiled term file
\fBtermcap\fR	\fBtermcap\fR(5)	 terminal capability data base
\fBterminfo\fR	\fBterminfo\fR(5V)	 terminal capability data base
\fBtextswrc\fR	\fBtextswrc\fR(5)	 initialization file for SunView text windows
\fBtoc\fR	\fBtoc\fR(5)	 table of contents of optional clusters
\fBtranslate\fR	\fBtranslate\fR(5)	 input and output files for system message translation
\fBttys\fR	\fBttys\fR(5)	 terminal initialization data
\fBttytab\fR	\fBttytab\fR(5)	 terminal initialization data
\fBttytype\fR	\fBttytype\fR(5)	 data base of terminal types by port
\fBtypes\fR	\fBtypes\fR(5)	 primitive system data types
\fBtzfile\fR	\fBtzfile\fR(5)	 time zone information
\fBupdaters\fR	\fBupdaters\fR(5)	 configuration file for YP updating
\fButmp\fR	\fButmp\fR(5)	 login records
\fBuuencode\fR	\fBuuencode\fR(5)	 format of an encoded uuencode file
\fBvfont\fR	\fBvfont\fR(5)	 font formats
\fBvgrindefs\fR	\fBvgrindefs\fR(5)	 vgrind's language definition data base
\fBwtmp\fR	\fButmp\fR(5)	 login records
\fBxtab\fR	\fBexports\fR(5)	 directories to export to NFS clients
\fBypfiles\fR	\fBypfiles\fR(5)	 the Yellow Pages database and directory structure
.fi
liases for sendmail(8)
\fBaliases\fR	\fBaliases\fR(5)	 addresses and aliases for sendmail(8)
\fBar\fR	\fBar\fR(5)	 archive (library) file format
\fBaudit.log\fR	\fBau./share/man/man5/a.out.5                                                                               755       0      12        31520  4424741501  10043                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)a.out.5 1.27 89/03/27 SMI; from UCB 4.2
.TH A.OUT 5 "22 March 1989"
.SH NAME
a.out \- assembler and link editor output format
.SH SYNOPSIS
.nf
.ft B
#include <a.out.h>
#include <stab.h>
#include <nlist.h>
.ft R
.fi
.SH AVAILABILITY
Sun-2, Sun-3, and Sun-4 systems only.  For Sun386i systems refer to
.BR coff (5).
.SH DESCRIPTION
.IX  "a.out file"  ""  "\fLa.out\fP \(em assembler and link editor output"
.IX  "assembler output"  ""  "assembler output \(em \fLa.out\fP"
.IX  "link editor output"  ""  "link editor output \(em \fLa.out\fP"
.B a.out
is the output format of the assembler
.BR as (1)
and the link editor
.BR ld (1).
The link editor makes
.B a.out
executable files.
.LP
A file in
.B a.out
format consists of: a header, the program text, program data, text
and data relocation information, a symbol table,
and a string table (in that order).
In the header, the sizes of each section are given in bytes.  The
last three sections may be absent if the program was loaded with
the
.B \-s
option of
.B ld
or if the symbols and relocation have been removed by
.BR strip (1).
.LP
The machine type in the header indicates the type of hardware on
which the object code can be executed.   Sun-2 code runs on
Sun-3 systems, but not vice versa.  Program files predating release
3.0 are recognized by a machine type of
.RB ` 0 '.
Sun-4 code may not be run on Sun-2 or Sun-3, nor vice versa.
.SS Header
.LP
The header consists of a
.B exec
structure.  The
.B exec
structure has the form:
.LP
.RS
.nf
.ta 1i 2.0i 3.0i
.ft B
struct exec {
	unsigned char	a_dynamic:1;	/* has a __DYNAMIC */
	unsigned char	a_toolversion:7;	/* version of toolset used to create this file */
	unsigned char	a_machtype;	/* machine type */
	unsigned short	a_magic;	/* magic number */
	unsigned long	a_text;		/* size of text segment */
	unsigned long	a_data;		/* size of initialized data */
	unsigned long	a_bss;		/* size of uninitialized data */
	unsigned long	a_syms;		/* size of symbol table */
	unsigned long	a_entry;	/* entry point */
	unsigned long	a_trsize;	/* size of text relocation */
	unsigned long	a_drsize;	/* size of data relocation */
};
.ft R
.fi
.DT
.RE
.LP
The members of the structure are:
.TP 15
.B a_dynamic
.B 1
if the
.B a.out
file is dynamically linked or is a shared object,
.B 0
otherwise.
.TP
.B a_toolversion
The version number of the toolset
.RB ( as ,
.BR ld ,
etc.) used to create the file.
.TP
.B a_machtype
One of the following:
.RS
.TP 12
.B 0
pre-3.0 executable image
.TP
.SB M_68010
executable image using only \s-1MC\s068010 instructions that can run
on a Sun-2 or Sun-3
.TP
.SB M_68020
executable image using \s-1MC\s068020 instructions that can run only
on a Sun-3
.TP
.SB M_SPARC
executable image using \s-1SPARC\s0 instructions that can run only
on a Sun-4
.RE
.TP 15
.B a_magic
One of the following:
.RS
.TP 12
.SB OMAGIC
An text executable image which is not to be
write-protected, so the data segment is immediately contiguous with the
text segment.
.TP
.SB NMAGIC
A write-protected text executable image.
The data segment begins at the first segment boundary following
the text segment, and the text segment is not writable by the program.
When the image is started with
.BR execve (2),
the entire text and data segments will be read into memory.
.TP
.SB ZMAGIC
A page-aligned text executable image.
the data segment begins at the first segment boundary following
the text segment, and the text segment is not writable by the program.
The text and data sizes are both multiples of the page size,
and the pages of the file will be brought into the running image as needed,
and not pre-loaded as with the other formats. 
This is the default format produced by
.BR ld (1).
.RE
.IP
The macro
.SB N_BADMAG
takes an
.B exec
structure as an argument; it evaluates to 1 if the
.B a_magic
field of that structure is invalid, and evaluates to 0 if it is valid.
.TP 15
.B a_text
The size of the text segment, in bytes.
.TP
.B a_data
The size of the initialized portion of the data segment, in bytes.
.TP
.B a_bss
The size of the \(lquninitialized\(rq portion of the data segment, in bytes.
This portion is actually initialized to zero.  The zeroes are not stored in the
.B a.out
file; the data in this portion of the data segment is zeroed out when it is
loaded.
.TP
.B a_syms
The size of the symbol table, in bytes.
.TP
.B a_entry
The virtual address of the entry point of the program; when the image is
started with
.BR execve ,
the first instruction executed in the image is at this address.
.TP
.B a_trsize
The size of the relocation information for the text segment.
.TP
.B a_drsize
The size of the relocation information for the data segment.
.LP
The macros
.SM
.BR N_TXTADDR ,
.SM
.BR N_DATADDR ,
and
.SB N_BSSADDR
give the memory addresses at which the text, data, and bss segments,
respectively, will be loaded.
.LP
In the
.SB ZMAGIC
format, the size of the header is included in the size of the text
section; in other formats, it is not.
.LP
When an
.B a.out
file is executed, three logical segments are set up: the text segment,
the data segment (with uninitialized data, which starts off as all 0,
following initialized data), and a stack.  For the
.SB ZMAGIC
format, the header is loaded with the text segment; for other
formats it is not.
.LP
Program execution begins at the address given by the value of
the
.B a_entry
field. 
.LP
The stack starts at the highest possible location in the memory image,
and grows downwards.  The stack is automatically extended as required.
The data segment is extended as requested by
.BR brk (2)
or
.BR sbrk .
.SS "Text and Data Segments"
.LP
The text segment begins at the start
of the file for
.SB ZMAGIC
format, or just after the header for the other formats.  The
.SB N_TXTOFF
macro returns this absolute file position when given an
.B exec
structure as argument.  The data segment is contiguous with the
text and immediately followed by the text relocation and then the data
relocation information.  The
.SB N_DATOFF
macro returns the absolute file position of the beginning of the data segment
when given an
.B exec
structure as argument.
.SS Relocation
.LP
The relocation information appears after the text and data segments.
The
.SB N_TRELOFF
macro returns the absolute file position of the relocation information
for the text segment, when given an
.B exec
structure as argument.
The
.SB N_DRELOFF
macro returns the absolute file position of the relocation information
for the data segment, when given an
.B exec
structure as argument.
There is no relocation information if
.BR a_trsize + a_drsize ==0.
.SS "Relocation (Sun-2 and Sun-3 Systems)"
If a byte in the text
or data involves a reference to an undefined external symbol, as
indicated by the relocation information, then the value stored in the
file is an offset from the associated external symbol.  When the file
is processed by the link editor and the external symbol becomes
defined, the value of the symbol is added to the bytes in the file.
If a byte involves a reference to a relative location, or
relocatable segment, then the value stored in the file is an
offset from the associated segment.
.br
.ne 12
.LP
If relocation information is present, it amounts to eight bytes per
relocatable datum as in the following structure:
.LP
.RS
.nf
.ft B
.ta +4n; +8n; +8n; +10n
struct reloc_info_68k {
	long 	r_address;	/* address which is relocated */
unsigned int	r_symbolnum:24,	/* local symbol ordinal */
	r_pcrel:1,	/* was relocated pc relative already */
	r_length:2,	/* 0=byte, 1=word, 2=long */
	r_extern:1,	/* does not include value of sym referenced */
	r_baserel:1,	/* linkage table relative */
	r_jmptable:1,	/* pc-relative to jump table */
	r_relative:1,	/* relative relocation */
	:1;
};

.fi
.RE
.LP
If
.B r_extern
is 0, then
.B r_symbolnum
is actually an
.B n_type
for the relocation (for instance,
.SB N_TEXT
meaning relative to segment text origin.)
.SS "Relocation (Sun-4 System)"
.LP
If a byte in the text
or data involves a reference to an undefined external symbol, as
indicated by the relocation information, then the value stored in the
file is ignored. Unlike the Sun-2 and Sun-3 system, the offset from the
associated symbol is kept with the relocation record.  When the file
is processed by the link editor and the external symbol becomes
defined, the value of the symbol is added to this offset, and the
sum is inserted into the bytes in the text or data segment.
.LP
If relocation information is present, it amounts to twelve bytes per
relocatable datum as in the following structure:
.LP
.RS
.nf
.ft B
.ta 4n; +22n; +22n; +22n; +8n; +8n
enum reloc_type
{
	RELOC_8,	RELOC_16,	RELOC_32,	/* simplest relocs */
	RELOC_DISP8,	RELOC_DISP16,	RELOC_DISP32,	/* Disp's (pc-rel) */
	RELOC_WDISP30,	RELOC_WDISP22,	/* SR word disp's */
	RELOC_HI22,	RELOC_22,	/* SR 22-bit relocs */
	RELOC_13,	RELOC_LO10,	/* SR 13&10-bit relocs */
	RELOC_SFA_BASE,	RELOC_SFA_OFF13,	/* SR S.F.A. relocs */
	RELOC_BASE10,	RELOC_BASE13,	RELOC_BASE22,	/* base_relative pic */
	RELOC_PC10,	RELOC_PC22,	/* special pc-rel pic*/
	RELOC_JMP_TBL,	/* jmp_tbl_rel in pic */
	RELOC_SEGOFF16,	/* ShLib offset-in-seg */
	RELOC_GLOB_DAT,	RELOC_JMP_SLOT,	RELOC_RELATIVE,	/* rtld relocs */
};
.sp .5
.ne 9
.ta 4n; +18n; +10n; +10n
struct reloc_info_sparc	/* used when header.a_machtype == M_SPARC */
{
	unsigned long int	r_address;		/* relocation addr (offset in segment) */
	unsigned int	r_index	:24;	/* segment index or symbol index */
	unsigned int	r_extern	:\01;	/* if F, r_index==SEG#; if T, SYM idx */
	int	:\02;		/* <unused> */
	enum reloc_type	r_type	:\05;	/* type of relocation to perform */
	long int	r_addend;		/* addend for relocation value */
};
.fi
.ft
.RE
.LP
If
.B r_extern
is 0, then
.B r_index
is actually a
.B n_type
for the relocation (for instance,
.SB N_TEXT
meaning relative to segment text origin.)
.SS Symbol Table
.LP
The
.SB N_SYMOFF
macro returns the absolute file position of the symbol table when given an
.B exec
structure as argument.
Within this symbol table, distinct symbols point to disjoint
areas in the string table (even when two symbols have the same name).
The string table immediately follows the symbol table; the
.SB N_STROFF
macro returns the absolute file position of the string table when given an
.B exec
structure as argument.
The first 4 bytes of the string table are not used for string storage,
but rather contain the size of the string table. This size
.I includes
the 4 bytes; thus, the minimum string table size is 4.
Layout information as given in the include file for the Sun system is
shown below.
.LP
The layout of a symbol table entry and the principal flag values
that distinguish symbol types are given in the include file as follows:
.LP
.RS
.nf
.ft B
.ta 6; +6; +4; +10
struct nlist {
	union {
		char	*n_name;	/* for use when in-memory */
		long	n_strx;	/* index into file string table */
	} n_un;
	unsigned char	n_type;		/* type flag, that is, \s-1N_TEXT\s0 etc; see below */
	char	n_other;
	short	n_desc;		/* see <stab.h> */
	unsigned	n_value;		/* value of this symbol (or adb offset) */
};
#define	n_hash	n_desc		/* used internally by ld */
/*
* Simple values for n_type.
*/
#define	\s-1N_UNDF\s0	0x0		/* undefined */
#define	\s-1N_ABS\s0	0x2		/* absolute */
#define	\s-1N_TEXT\s0	0x4		/* text */
#define	\s-1N_DATA\s0	0x6		/* data */
#define	\s-1N_BSS\s0	0x8		/* bss */
#define	\s-1N_COMM\s0	0x12		/* common (internal to ld) */
#define	\s-1N_FN\s0	0x1f		/* file name symbol */
#define	\s-1N_EXT\s0	01		/* external bit, or'ed in */
#define	\s-1N_TYPE\s0	0x1e		/* mask for all the type bits */
.sp .5v
/*
* Other permanent symbol table entries have some of the \s-1N_STAB\s0 bits set.
* These are given in <stab.h>
*/
#define	\s-1N_STAB\s0	0xe0		/* if any of these bits set, don't discard */
.ft
.fi
.RE
.LP
In the
.B a.out
file a symbol's
.B n_un.n_strx
field gives an index into the string
table.  A
.B n_strx
value of 0 indicates that no name is associated with a
particular symbol table entry.  The field
.B n_un.n_name
can be used to
refer to the symbol name only if the program sets this up using
.B n_strx
and appropriate data from the string table.  Because of the union in
the
.B nlist
declaration, it is impossible in C to statically initialize
such a structure.  If this must be done (as when using
.BR nlist (3))
include the file
.BR /usr/include/nlist.h ,
rather than
.BR /usr/include/a.out.h .
This contains the declaration without the union.
.fi
.LP
If a symbol's type is undefined external, and the value field is
non-zero, the symbol is interpreted by the loader
.B ld
as the name of a common region whose size
is indicated by the value of the symbol.
.SH FILES
.PD 0
.TP 25
.B /usr/include/a.out.h
symbolic link to
.B /usr/include/machine/a.out.h
.TP
.B /usr/include/machine
symbolic link to one of
.B /usr/include/sun[234...]
.TP
.B /usr/include/sun2/a.out.h
Sun-2 
.B a.out
header
.TP
.B /usr/include/sun3/a.out.h
Sun-3
.B a.out
header
.TP
.B /usr/include/sun4/a.out.h
Sun-4
.B a.out
header
.PD
.SH "SEE ALSO"
.BR coff (5),
.BR adb (1),
.BR as (1),
.BR cc (1V),
.BR dbx (1),
.BR ld (1),
.BR nm (1),
.BR strip (1),
.BR brk (2),
.BR nlist (3)
, in bytes.
.TP
.B a_data
The size of the initialized portion of the data segment, in bytes.
.TP
.B a_bss
The size of the \(lquninitialized\(rq portion of the data segment, in ./share/man/man5/acct.5                                                                                755       0      12         4562  4424741501   7715                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)acct.5 1.11 89/03/27 SMI; from UCB 4.2
.TH ACCT 5 "19 October 1987"
.SH NAME
acct \- execution accounting file
.SH SYNOPSIS
.B #include <sys/acct.h>
.SH DESCRIPTION
.IX  "acct"  "\fLacct\fP \(em execution accounting file" "\fLacct\fR"
.IX  "execution accounting file"  ""  "execution accounting file \(em \fLacct\fP"
.IX  "accounting file"  ""  "accounting file \(em \fLacct\fP"
The
.BR acct (2)
system call makes entries in an accounting file
for each process that terminates.
The accounting file is a sequence of entries whose layout,
as defined by the include file is:
.LP
.nf
.ft B
.ta \w'typedef 'u +\w'ACOMPAT  'u +\w'ac_comm[10];   'u
/*	@(#)acct.h 2.7 87/03/12 SMI; from UCB 7.1 6/4/86	*/

/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 */

/*
 * Accounting structures;
 * these use a comp_t type which is a 3 bits base 8
 * exponent, 13 bit fraction ``floating point'' number.
 * Units are 1/AHZ seconds.
 */
typedef	u_short comp_t;

struct	acct
{
	char	ac_comm[10];		/* Accounting command name */
	comp_t	ac_utime;		/* Accounting user time */
	comp_t	ac_stime;		/* Accounting system time */
	comp_t	ac_etime;		/* Accounting elapsed time */
	time_t	ac_btime;		/* Beginning time */
	uid_t	ac_uid;			/* Accounting user ID */
	gid_t	ac_gid;			/* Accounting group ID */
	short	ac_mem;			/* average memory usage */
	comp_t	ac_io;			/* number of disk IO blocks */
	dev_t	ac_tty;			/* control typewriter */
	char	ac_flag;		/* Accounting flag */
};

#define	AFORK	0001		/* has executed fork, but no exec */
#define	ASU	0002		/* used super-user privileges */
#define	ACOMPAT	0004		/* used compatibility mode */
#define	ACORE	0010		/* dumped core */
#define	AXSIG	0020		/* killed by a signal */

/*
 * 1/AHZ is the granularity of the data encoded in the various
 * comp_t fields.  This is not necessarily equal to hz.
 */
#define AHZ 64

#ifdef KERNEL
#ifdef SYSACCT
struct	acct	acctbuf;
struct	vnode	*acctp;
#else
#define	acct()
#endif
#endif
.ft R
.fi
.LP
If the process does an
.BR execve (2),
the first 10 characters of the filename appear in
.IR ac_comm .
The accounting flag contains bits indicating whether
.BR execve (2)
was ever accomplished, and whether the process ever had super-user privileges.
.SH SEE ALSO
.BR acct (2),
.BR execve (2),
.BR sa (8)
e \s-1N_STAB\s0 bits set.
* These are given in <stab.h>
*/
#define	\s-1N_STAB\s0	0xe0		/* if any of these bits set, don't discard */
.ft
.fi
../share/man/man5/addresses.5                                                                           755       0      12           71  4424741501  10707                                                                                                                                                                                                                                                                                                                                                                      .so man5/aliases.5
.\" @(#)addresses.5 1.5 89/03/27 SMI;
 ar.5        yj  audit.log.5      yk  audit_control.5      yl  audit_data.5  yl     ym  auto.home.5      z  
auto.vol.5     z  backup.5       z  bar.5   8  z  bootparams.5  z  H  z  coff.5   X  z  core.5   h  z  cpio.5 5  |  z  	crontab.5 |    z  	current.5     z  
defaults.5     z  dir.5      z  dump.5     z  dumpdates.5     z  ethers.5       z  	exports.5  ./share/man/man5/aliases.5                                                                             755       0      12        15051  4424741502  10440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)aliases.5 1.25 89/03/27 SMI; from UCB 4.2
.hw sendmail
.TH ALIASES 5 "22 March 1989"
.SH NAME
aliases, addresses, forward \- addresses and aliases for sendmail(8)
.SH SYNOPSIS
.ft B
.nf
/etc/aliases
/etc/aliases.dir
/etc/aliases.pag
~/.forward
.ft R
.fi
.SH DESCRIPTION
.IX  "forward file"  ""  "\fL.forward\fP \(em mail forwarding file"
.IX  "aliases file"  ""  "\fLaliases\fP \(em sendmail aliases file"
.IX  "sendmail aliases file"  ""  "sendmail aliases file \(em \fLaliases\fP"
.IX  "sendmail forward file"  ""  "sendmail aliases file \(em \fL.forward\fP"
.LP
These files contain mail addresses or aliases, recognized by
.BR sendmail (8),
for the local host:
.LP
.PD 0
.TP 20
.B /etc/passwd
Mail addresses (usernames) of local users.
.TP
.B /etc/aliases
Aliases for the local host, in
.SM ASCII
format.  This file can be edited to add, update, or delete
local mail aliases.
.TP
.BR /etc/aliases. { dir , pag }
The aliasing information from
.BR /etc/aliases ,
in binary,
.BR dbm (3X)
format for use by
.BR sendmail (8).
The program
.BR newaliases (8),
which is invoked automatically by
.BR sendmail (8),
maintains these files.
.TP
.B \u\(ap\d/.forward
Addresses to which a user's mail is forwarded (see
.BR "Automatic Forwarding" ,
below).
.PD
.LP
In addition, the Yellow Pages aliases map
.I mail.aliases
contains addresses and aliases available for use across the network.
.SS Addresses
As distributed,
.BR sendmail (8)
supports the following types of addresses:
.SS \fILocal Usernames\fP
.IP
.I username
.LP
Each local
.I username
is listed in the local host's
.B /etc/passwd
file.
.SS \fILocal Filenames\fP
.IP
.I pathname
.LP
Messages addressed to the absolute
.I pathname
of a file are appended to that file.
.SS \fICommands\fP
.IP
.BI |\^ command
.LP
If the first character of the address is a vertical bar,
.RB ( \||\| ),
.BR sendmail (8)
pipes the message to the standard input of the
.I command
the bar precedes.
.SS \s-1DARPA\s0\fI-standard Addresses\fP
.IP
.IB username @ domain
.LP
If
.I domain
does not contain any
.RB ` . '
(dots),
then it is interpreted as the name of a
host in the current domain.  Otherwise, the message is passed to a
.I mailhost
that determines how to get to the specified domain.
Domains are divided into subdomains separated by
dots, with the top-level domain on the right.
Top-level domains include:
.RS
.TP
.SM .COM
Commerical organizations.
.PD 0
.TP
.SM .EDU
Educational organizations.
.TP
.SM .GOV
Government organizations.
.TP
.SM .MIL
Military organizations.
.PD
.RE
.LP
For example, the full address of John Smith could be:
.IP
.B js@jsmachine.Podunk-\s-1U.EDU\s0
.LP
if he uses the machine named
.B jsmachine
at Podunk University.
.SS \fBuucp\fP(1C) \fIAddresses\fP
.IP
\&.\|.\|. [\c
.IB host !\c
]\c
.IB host ! username
.LP
These are sometimes mistakenly referred to as ``Usenet'' addresses.
.BR uucp (1C)
provides links to numerous sites throughout the world for
the remote copying of files.
.LP
Other site-specific forms of addressing can be added by customizing
the
.B sendmail
configuration file.  See the
.BR sendmail (8),
and
.TX ADMIN
for details.  Standard addresses are recommended.
.br
.ne 20
.SS Aliases
.SS \fILocal Aliases\fP
.B /etc/aliases
is formatted as a series of lines of the form
.IP
.IB aliasname : " address"\c
.RB [ ,
.IR " address" ]
.LP
.I aliasname
is the name of the alias or alias group, and
.I address
is the address of a recipient in the group.
Aliases can be nested.  That is, an
.I address
can be the name of another alias group.
Because of the way
.B sendmail
performs mapping from upper-case to lower-case, an
.I address
that is the name of another alias group must not contain any
upper-case letters.
.LP
Lines beginning with white space are treated as continuation lines
for the preceding alias.
Lines beginning with
.B #
are comments.
.SS \fISpecial Aliases\fP
.LP
An alias of the form:
.IP
.BI owner\- aliasname : " address"
.LP
directs error-messages resulting from mail to
.I aliasname
to
.IR address ,
instead of back to the person who sent the
message.
.LP
An alias of the form:
.IP
.IB  aliasname :
.BI :include: pathname
.LP
with colons as shown, adds the recipients listed in the file
.I pathname
to the
.I aliasname
alias.
This allows a private list to be maintained separately from the
aliases file.
.SS \fIYP Domain Aliases\fP
Normally, the aliases file on the master
.SM YP
server is used for the
.I mail.aliases
.SM YP
map, which can be made available to every
.SM YP
client.  Thus, the
.B /etc/aliases*
files on the various hosts in a network will one day be obsolete.
Domain-wide aliases should ultimately be resolved into usernames on
specific hosts.
For example, if the following were in the domain-wide alias file:
.IP
.B jsmith:js@jsmachine
.LP
then any
.SM YP
client could just mail to
.B jsmith
and not have to
remember the machine and username for John Smith.  If a .SM YP
alias does
not resolve to an address with a specific host, then the name of the
.SM YP
domain is used.  There should be an alias of the domain name for a host
in this case.  For example, the alias:
.IP
.B jsmith:root
.LP
sends mail on a
.SM YP
client to
.B root@podunk-u
if the name of the
.SM YP
domain is
.BR podunk-u .
.SS \fIAutomatic Forwarding\fP
When an alias (or address) is resolved to the name of a user on the
local host,
.B sendmail
checks for a
.B .forward
file, owned by the intended recipient, in that user's home directory,
and with universal read access.
This file can contain one or more addresses or aliases as described
above, each of which is sent a copy of the user's mail.
.LP
Care must be taken to avoid creating addressing loops in the
.B .forward
file.
When forwarding mail between machines, be sure that the destination
machine does not return the mail to the sender through
the operation of any
.SM YP
aliases.  Otherwise, copies of
the message may ``bounce.''  Usually, the solution is to change the
.SM YP
alias to direct mail to the proper destination.
.br
.ne 8
.LP
A backslash before a username
inhibits further aliasing.  For instance, to invoke the
.BR vacation (1)
program, user
.B js
creates a
.B .forward
file that contains the line:
.IP
\fB\ejs, "|/usr/ucb/vacation js"\fP
.LP
so that one copy of the message is sent to the
user, and another is piped into the
.BR vacation (1)
program.
.if t .ne 5
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.B /etc/aliases
.TP
.B \u\(ap\d/.forward
.PD
.SH "SEE ALSO"
.BR uucp (1C),
.BR vacation (1),
.BR dbm (3X),
.BR newaliases (8),
.BR sendmail (8),
.LP
.TX ADMIN
.SH BUGS
Because of restrictions in
.BR dbm (3X)
a single alias cannot contain more than about 1000 characters.
Nested aliases can be used to circumvent this limit.
ck.  For the
.SB ZMAGIC
format, the header is loaded with the text segment; for other
formats it is not.
.LP
Program execution begins at the address given by the value of
the
.B a_entry
field. 
.LP
The stack starts at the highest possible location in the memory image,
and grows downwards.  The stack is automatically extended as required.
The data segment is extended as requested by
.BR brk (2)
or
.BR sbrk .
.SS "Text and Data Segments"
.LP
The text segment begins at ./share/man/man5/ar.5                                                                                  755       0      12        10102  4424741502   7411                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ar.5 1.11 89/03/27 SMI; from UCB 4.2
.TH AR 5  "18 February 1988"
.SH NAME
ar \- archive (library) file format
.SH SYNOPSIS
.B #include <ar.h>
.SH DESCRIPTION
.IX  "ar file"  ""  "\fLar\fP \(em archive file format"
.IX  "archive file format"  ""  "archive file format \(em \fLar\fP"
.IX  "library file format"  ""  "library file format \(em \fLar\fP"
.LP
The archive command
.B ar
combines several files into one.
Archives are used mainly as libraries to be searched by the link-editor
.BR ld (1).
.LP
A file produced by
.B ar
has a magic string at the start,
followed by the constituent files, each preceded by a file header.
The magic number and header layout as described in the include file are:
.RS
.LP
.nf
.ft B
.ta \w'#define 'u +\w'SARMAG 'u
.ec %
#define	ARMAG	"!<arch>\n"
#define	SARMAG	8

#define	ARFMAG	"`\n"

struct ar_hdr {
	char	ar_name[16];
	char	ar_date[12];
	char	ar_uid[6];
	char	ar_gid[6];
	char	ar_mode[8];
	char	ar_size[10];
	char	ar_fmag[2];
};
.ec \
.ft R
.fi
.RE
.LP
The name is a blank-padded string.
The
.B ar_fmag
field contains
.SB ARFMAG
to help verify the presence of a header.
The other fields are left-adjusted, blank-padded numbers.
They are decimal except for
.BR ar_mode ,
which is octal.
The date is the modification date of the file
at the time of its insertion into the archive.
.LP
Each file begins on a even (0 mod 2) boundary;
a
.SM NEWLINE
is inserted between files if necessary.
Nevertheless the size given reflects the
actual size of the file exclusive of padding.
.LP
There is no provision for empty areas in an archive file.
.LP
The encoding of the header is portable across machines.
If an archive contains printable files, the archive itself is printable.
.SH Sun386i DESCRIPTION
.LP
The file produced by
.I ar
on Sun386i systems is identical to that described above with the
following changes:
.LP
Each archive containing
.SM COFF
files [see
.BR coff (5)]
includes an archive symbol table.
This symbol table is used by the link editor 
.B ld
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
.BR ar .
.LP
The
.I ar_name\^
field of the ar_hdr structure described above is blank-padded and slash 
.RB ( /\| )
terminated.  
Common format archives can be moved from system to system as long as the
portable archive command
.BR ar
is used.  Conversion tools such as
.BR convert
exist to aid in the transportation
of non-common format archives to this format.
.LP
Each archive file member begins on an even byte boundary; a
.SM NEWLINE
is inserted between files if necessary.
Nevertheless the size given reflects the
actual size of the file exclusive of padding.
.LP
If the archive symbol table exists, the first file in the archive
has a zero length name (i.e.,
.B ar_name[0] == '/'
).  The contents of this file are as follows:
.TP
\(bu
The number of symbols.  Length: 4 bytes.
.TP
\(bu
The array of offsets into the archive file.  Length: 4 bytes \(** \(lqthe
number of symbols\(rq.
.TP
\(bu
The name string table.  Length:
.I ar_size\^
\- (4 bytes \(** (\(lqthe number of symbols\(rq + 1)).
.LP
The number of symbols and the array of offsets are managed with
.IR sgetl " and " sputl .
The string table contains exactly as many null terminated strings
as there are elements in the offsets array.
Each offset from the array is associated 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"
.BR ar (1V),
.BR ld (1),
.BR nm (1)
.SH Sun386i WARNINGS
.LP
.IR strip (1)
will remove all archive symbol entries from the header.  The archive symbol
entries must be restored via the \f3ts\f1 option of the
.IR ar (1V)
command before the archive can be used with the link editor
.IR ld (1).
.SH BUGS
.LP
Filenames lose trailing blanks.
Most software dealing with archives takes even
an included blank as a name terminator.
y 1988"
.SH NAME
ar \- archive (library) file format
.SH SYNOPSIS
.B #include <ar.h>
.SH DESCRIPTION
.IX  "ar file"  ""  "\fLar\fP \(em archive file format"
.IX  "archive file format"  ""  "archive file format \(em \fLar\fP"
.IX  "library file format"  ""  "library file format \(em \fLar\fP"
.LP
The archive command
.B ar
combines several files into one.
Archives are used mainly as libraries to be searched by the link-editor
.BR ld (1).
.LP
A ./share/man/man5/audit.log.5                                                                           755       0      12         4564  4424741502  10674                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit.log.5 1.10 89/03/27 SMI;
.TH AUDIT.LOG 5 "19 October 1987"
.SH NAME
audit.log \- the security audit trail file
.SH SYNOPSIS
.nf
.B #include <sys/label.h>
.B #include <sys/audit.h>
.B #include <sys/user.h>
.fi
.SH DESCRIPTION
.IX  "audit file"  ""  "\fLaudit\fP \(em audit trail file"
.LP
The
.B audit.log
file begins with a header record consisting of an
.B audit_header
structure followed by the previous audit file name.
When the audit daemon is started (usually only at boot time),
the previous audit file name is
.SM NULL\s0.
.RS
.LP
.nf
.ft B
struct audit_header {
	int	ah_magic;	/* magic number */
	time_t	ah_time;  	/* the time */
	short	ah_namelen;	/* length of file name */
};
typedef struct audit_header audit_header_t;
.fi
.ft R
.RE
.LP
The file may end with a trailer record consisting of an
.B audit_trailer
structure followed by the name of the next audit file.
.RS
.LP
.nf
.ft B
struct audit_trailer {
	short	at_record_size;		/* size of this */
	short	at_record_type;		/* its type, a trailer */
	time_t	at_time;   		/* the time */
	short	at_namelen;		/* length of file name */
};
typedef struct audit_trailer audit_trailer_t;
.fi
.ft R
.RE
.LP
The
.B audit.log
file contains audit records in their raw form.
The records are of varying size depending on the record type.
Each record has a header which is an
.B audit_record
structure.
.RS
.LP
.nf
.ft B
struct audit_record {
	short		au_record_size;		/* size of this */
	short		au_record_type;		/* its type */
	time_t		au_time;  		/* the time */
	short		au_uid;			/* real uid */
	short		au_auid;  		/* audit uid */
	short		au_euid;  		/* effective */
	short		au_gid;			/* real group */
	short		au_pid;			/* effective */
	int		au_errno;		/* error code */
	int		au_return;		/* a return value */
	blabel_t       	au_label;		/* also ... */
	short		au_param_count;		/* # of parameters */
};
typedef struct audit_record audit_record_t;
.fi
.ft R
.RE
.LP
Immediately following the header is a set of two byte integers, the number
of which exist for a given record is contained in the
.B au_param_count
field.
These numbers are the lengths of the additional data items.
The additional data items follow the list of lengths, the first
length describing the first data item.
Interpretation of this data is left to the program accessing it.
.br
.ne 8
.SH "SEE ALSO"
.BR audit (2),
.BR getauditfile (2),
.BR getuseraudit (2),
.BR audit (8),
.LP
.TX SECUR
ong as the
portable archive command
.BR ar
is used.  Conversion tools such as
.BR convert
exist to aid in the transportation
of non-common f./share/man/man5/audit_control.5                                                                       755       0      12        11337  4424741502  11670                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit_control.5 1.9 89/03/27 SMI;
.TH AUDIT_CONTROL 5 "22 March 1989"
.SH NAME
audit_control \- control information for system audit daemon
.SH SYNOPSIS
.B /etc/security/audit/audit_control
.IX  "audit file"  ""  "\fLaudit\fP \(em audit control file"
.SH DESCRIPTION
.LP
The
.B audit_control
file contains audit control information read by
.BR auditd (8).
Each line consists of a title and a string, separated by a colon.
There are no restrictions on the order of lines in the file,
although some lines must appear only once.
A line beginning with
.RB ` # '
is a comment.
.LP
Directory definition lines list the directories to be used
when creating audit files, in the order in which they are to be used.
The format of a directory line is:
.RS
.BI dir:\0 directory-name
.RE
where
.I directory-name
is the name of a directory in which to create audit files,
with the form:
.RS
.BI /etc/security/audit/ server / machine
.RE
where
.I server
is the name of an audit file system on the machine
where this audit directory resides, and
.I machine
is the name of the local machine,
since audit files belonging to different machines are, by convention,
stored in separate subdirectories of a single audit directory.
The naming convention normally has
.I server
be the name of a server machine, and all clients mount
.BI /etc/security/audit/ server
at the same location in their local file systems.
If the same server exports several different file systems for auditing, their
.I server
names will, of course, be different.
.LP
The audit threshold line specifies the percentage of free space
that must be present in the file system containing the current audit file.
The format of the threshold line is:
.RS
.BI minfree:\0 percentage
.RE
where
.I percentage
is indicates the amount of free space required.
If free space falls below this threshold, the audit daemon
.BR auditd (8)
invokes the shell script
.B /etc/security/audit/audit_warn.
If no threshold is specified, the default is 0%.
.LP
The audit flags line specifies the default system audit value.
This value is combined with the user audit value read from
.B /etc/security/passwd.adjunct
to form the process audit state.  The user audit value overrides
the system audit value.
The format of a flags line is:
.RS
.BI flags:\0 audit-flags
.RE
where
.I audit-flags
specifies which event classes are to be audited.
The character string representation of
.I audit-flags
contains a series of flag
names, each one identifying a single audit class, separated by commas.
A name preceded by
.B \-
means that the class should be audited for failure only;
successful attempts are not audited.
A name preceded by
.B +
means that the class should be audited for success only;
failing attempts are not audited.
Without a prefix, the name indicates that the class is to be audited
for both successes and failures.
The special string
.B all
indicates that all events should be audited;
.B \-all
indicates that all failed attempts are to be audited, and
.B +all
all successful attempts.
The prefixes
.BR ^ ,
.BR ^\- ,
and
.B ^+
turn off
flags specified earlier in the string
.RB ( ^\-
and
.B ^+
for failing and successful attempts,
.B ^
for both).
They are typically used to reset flags.
.LP
The following table lists the audit classes:
.LP
.TS
c c c
lb lb l .
short name	long name	short description
.sp .5
dr	data_read	Read of data, open for reading, etc.
dw	data_write	Write or modification of data
dc	data_create	Creation or deletion of any object
da	data_access_change	Change in object access (modes, owner)
lo	login_logout	Login, logout, creation by \fBat\fR(1)
ad	administrative	Normal administrative operation
p0	minor_privilege	Privileged operation
p1	major_privilege	Unusual privileged operation
.TE
.SH EXAMPLE
.LP
Here is a sample
.B /etc/security/audit_control
file for the machine eggplant:
.RS
.LP
.nf
.ft B
dir: /etc/security/audit/jedgar/eggplant
dir: /etc/security/audit/jedgar.aux/eggplant
#
# Last-ditch audit file system when jedgar fills up.
#
dir: /etc/security/audit/global/eggplant
minfree: 20
flags: lo,p0,p1,ad,-all,^-da
.ft R
.fi
.LP
.RE
This identifies server
.B jedgar
with two file systems normally used for audit data, another server
.B global
used only when
.B jedgar
fills up or breaks,
and specifies that the warning script is run
when the file systems are 80% filled.
It also specifies that all logins, privileged and administrative operations
are to be audited (whether or not they succeed),
and that failures of all types except failures to access data
are to be audited.
.SH FILES
.PD 0
.TP 20
.B /etc/security/audit/audit_control
.TP
.B /etc/security/audit/audit_warn
.TP
.B /etc/security/audit/*/*/*
.TP
.B /etc/security/passwd_adjunct
.PD
.SH "SEE ALSO"
.BR at (1),
.BR audit (2),
.BR getfaudflgs (3),
.BR audit.log (5),
.BR audit (8),
.BR auditd (8)
d
.TP
.B /etc/aliases
.TP
.B \u\(ap\d/.forward
.PD
.SH "SEE ALSO"
.BR uucp (1C),
.BR vacation (1),
.BR dbm (3X),
.BR newaliases (8),
.BR sendmail (8),
.LP
.TX ADMIN
.SH BUGS
Because of restrictions in
.BR dbm (3X)
a single alias cannot contain more than about 1000 characters.
Nested alias./share/man/man5/audit_data.5                                                                          755       0      12         1472  4424741502  11100                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit_data.5 1.5 89/03/27 SMI;
.TH AUDIT_DATA 5 "19 October 1987"
.SH NAME
audit_data \- current information on audit daemon
.SH SYNOPSIS
.B /etc/security/audit/audit_data
.IX  "audit file"  ""  "\fLaudit\fP \(em audit data file"
.SH DESCRIPTION
.LP
The
.B audit_data
file contains information about the audit daemon.
The file contains the process
.SM ID
of the audit daemon,
and the pathname of the current audit log file.
The format of the file is:
.RS
.BI < pid >:< pathname >
.RE
Where
.I pid
is the process
.SM ID
for the audit daemon, and
.I pathname
is the full pathname for the current audit log file.
.SH EXAMPLE
.B 64:/etc/security/audit/auditserv/auditclient/2df0504
.SH FILES
.PD 0
.TP 20
.B /etc/security/audit/audit_data
.PD
.SH "SEE ALSO"
.BR audit (2),
.BR audit.log (5),
.BR audit (8),
.BR auditd (8)
dit daemon.
The file contains the process
.SM ID
of the audit daemon,
and the pathname of the current audit log file.
The format of the file is:
.RS
.BI < pid >:< pathname >
.RE
Where
.I pid
is the ./share/man/man5/auto.home.5                                                                           755       0      12         4260  4424741502  10676                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)auto.home.5	1.9 89/04/21 SMI;
.TH AUTO.HOME 5 "19 February 1988"
.SH NAME
auto.home \- automount map for home directories
.SH SYNOPSIS
.B /etc/auto.home
.LP
.SH AVAILABILTITY
Sun386i systems only.
.SH DESCRIPTION
.IX  "auto.home"  
.LP
.B auto.home
resides in the
.B /etc
directory, and contains
.BR automount (8)
map entries for user's home directories.
On Sun386i systems, this file is used to build the 
.B auto.home
Yellow Pages map used by
.B automount
at system startup and reads the 
.B auto.master
Yellow Pages database, which contains an entry for 
.B auto.home 
and 
.B /home .
The 
.B auto.home
map contains entries for each username in the YP
.B passwd
map, and the
.IB hostname :/ directory
to
.SM NFS
mount. 
.LP
References to
.BI /home/ username
are translated by the automount daemon using the 
.B auto.home 
map,
and cause the directory specified in the map entry to be nfs mounted
and that directory returned to the user's program.
.LP
User accounts created using
.BR snap (1)
or
.BR logintool (8)
have
.BR passwd (5)
entries where the
initial (home) directory name is, in the form
.BI /home/ username.
.BR snap
and
.B logintool
also automatically create the 
.B auto.home
entry for a user account.  The format of the entry is described in 
.BR automount (8).
An example entry is:
.IP
.ft B
mtravis		system2:/export/home/users/mtravis
.ft R
.LP
Thus when the user
.B mtravis
logs into a Sun386i systems, the automounter
automatically mounts his home directory from
.BR  system2 .
This allows a user to log in to any RR workstation on the network
and be automatically placed in his or her home directory.
.LP
The convention for the format of home directory names used by
.BR snap
and
.B logintool
is:
.IP
.BI /export/home/ groupname / username
.LP
Note that this is a different map and mechanism for home directories than the
one that the automount daemon provides with the
.B \-homes
switch. This is
because the Sun386i convention for the format of home directory names
differs and provides directories that can be used as mount points
on a per user and per group basis.
.SH FILES
.PD 0
.TP 20
.B /etc/auto.home
.PD
.SH "SEE ALSO"
.BR snap (1),
.BR passwd (5),
.BR automount (8),
.BR logintool (8)
it value.
The format of a flags line is:
.RS
.BI flags:\0 audit-flags
.RE
where
.I audit-flags
specifies which event classes are to be audited.
The character string representation of
.I audit-flags
contains a series of flag
names, each one identifying a single audit class, separated by commas.
A name preceded by
.B \-
means that the c./share/man/man5/auto.vol.5                                                                            755       0      12         3671  4424741502  10553                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)auto.vol.5 1.9 89/04/21 SMI;
.TH AUTO.VOL 5 "19 February 1988"
.SH NAME
auto.vol \- automount map for volumes
.SH SYNOPSIS
.B /etc/auto.vol
.LP
.SH AVAILABILTITY
Sun386i systems only.
.SH DESCRIPTION
.IX  "auto.vol"  
.LP
.B auto.vol
resides in the
.B /etc
directory, and contains automount(8) map entries for 
.BR volumes .
On Sun386i systems, this file is used to build the 
.B auto.vol
Yellow Pages map used by
.BR automount (8)
at system startup.
.B automouunt
reads the 
.B auto.master
Yellow Pages map, which contains an entry for
.B auto.vol
and
.BR /vol .
.LP
References to
.BI /vol/ volume_name
are translated by the automount daemon using the 
.B auto.vol
map,
and cause the directory specified in the map entry to be mounted.
.LP
The concept of a volume is that it is a self contained directory hierarchy
that can be NFS mounted. It is referenced using a known
.IR volume_name .
The use of an automount map is suggested so that the volume and its
contents can be
referenced through
.BR /vol .
This is advantageous because location-transparency
(i.e., which host the volume is on) and replication of read-only
volumes can be provided using the automount mechanism.
The format of the entry is described in 
.BR automount
An example entry is:
.IP
.ft B
archive		system4:/export/archive
.ft R
.LP
In the above example, the
.B archive
volume is currently on line on
.BR system4 .
Users and programs can reference it via
.BR /vol/archive .
If for some reason the volume had to be moved to another system,
.B system2
for example,
the network or system administrator simply edits the map entry for
the archive volume and changes the hostname to
.B system2
and then rebuilds the Yellow Pages maps.
.IP
.ftB
archive		system2:/export/archive
.ft R
.LP
Users and programs can continue to refer to the archive volume using 
.B /vol/archive,
unaware that the volume was moved to another system.
.SH FILES
.PD 0
.TP 20
.B /etc/auto.vol
.PD
.SH "SEE ALSO"
.BR automount (8)
font.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p./share/man/man5/backup.5                                                                              755       0      12           66  4424741503  10205                                                                                                                                                                                                                                                                                                                                                                      .so man5/statmon.5
.\" @(#)backup.5 1.4 89/03/27 SMI;
 bootparams.5  8  H  z  coff.5 5  X  z  core.5 f  h  z  cpio.5 e  |  z  	crontab.5  e    z  	current.5      z  
defaults.5 o    z  dir.5 ts    z  dump.5 .    z  dumpdates.5     z  ethers.5 .5      z  	exports.5 5     z  fcntl.5   $  z  	forward.5 5   4  z  fs.5 rd.  D  z  fspec.5   T  z  fstab.5   h  z  
ftpusers.5    |  z  
gettytab.5      z  group.5     z  group.adjunc./share/man/man5/bar.5                                                                                 755       0      12        10545  4424741503   7567                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bar.5 1.9 89/03/27 SMI; from UCB 4.2
.TH BAR 5  "19 February 1988"
.SH NAME
bar \- tape archive file format
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX  "bar file"  ""  "\fLbar\fR \(em tape archive file format"
.BR bar (1),
(the tape archive command)
dumps several files into one, in a medium suitable for transportation.
This format is not compatible with the format generated by 
.BR tar (1).
.PP
A ``bar tape'' or file is a series of blocks.  Each block is of size TBLOCK.
A file on the tape is represented by a header block that describes
the file, followed by zero or more blocks that give the contents of the
file.  At the end of the tape are two blocks filled with binary
zeros, as an end-of-file indicator.  
.PP
The blocks are grouped for physical I/O operations.  Each group of
.I n
blocks (where
.I n
is set by the 
.B b
keyletter on the 
.BR bar (1)
command line \(em default is 20 blocks) is written with a single system
call; on nine-track tapes, the result of this write is a single tape
record.  The last group is always written at the full size, so blocks after
the two zero blocks contain random data.  On reading, the specified or
default group size is used for the
first read, but if that read returns less than a full tape block, the reduced
block size is used for further reads, unless the \fBB\fP keyletter is used.
.PP
The header block looks like:
.RS
.nf
.ft B
#define TBLOCK	512
.sp .5
union hblock {
	char dummy[TBLOCK];
	struct header {
		char mode[8];
		char uid[8];
		char gid[8];
		char size[12];
		char mtime[12];
		char chksum[8];
		char rdev[8];
		char linkflag;
		char bar_magic[2];
		char volume_num[4];
		char compressed;
		char date[12];
		char start_of_name;
	} dbuf;
};
.ft
.fi
.RE
.LP
.IR start_of_name
is a null-terminated string.  
.IR date 
is the date of the archive.
.IR bar_magic
is a special number indicating that this is a 
.B bar 
archive.
.IR rdev
is the device type, for files that are devices.
The other fields are zero-filled octal numbers in ASCII.  Each field
(of width w) contains w-2 digits, a space, and a null, except
.IR size ,
.IR rdev ,
and
.IR mtime ,
which do not contain the trailing null.
.IR start_of_name
is the name of the file, as specified on the 
.I bar
command line.  Files dumped because they were in a directory that
was named in the command line have the directory name as prefix and
.I /filename
as suffix.
.  \"Whatever format was used in the command line
.  \"will appear here, such as
.  \".I \&./yellow
.  \"or
.  \".IR \&../../brick/./road/.. .
.  \"To retrieve a file from a bar tape, an exact prefix match must be specified,
.  \"including all of the directory prefix information used on the command line
.  \"that dumped the file (if any).
.IR mode
is the file mode, with the top bit masked off.
.IR uid
and
.IR gid
are the user and group numbers that own the file.
.IR size
is the size of the file in bytes.  Links and symbolic links, and special
files, are dumped
with this field specified as zero.
.IR mtime
is the modification time of the file at the time it was dumped.
.IR chksum
is a decimal ASCII value that represents the sum of all the bytes in the
header block.  When calculating the checksum, the 
.IR chksum
field is treated as if it were all blanks.
.IR linkflag
is
.SM ASCII
0
if the file is ``normal'' or a special file,
1 if it is an hard link, 2
if it is a symbolic link, and
3 if it is a special file (device or
.SM FIFO\c
). 
The name linked-to, if any, is in
a null-terminated string, following 
.IR start_of_name .
Unused fields of the header are binary zeros (and are included in the
checksum).
.PP
The first time a given i-node number is dumped, it is dumped as a regular
file.  The second and subsequent times, it is dumped as a link instead.
Upon retrieval, if a link entry is retrieved, but not the file it was
linked to, an error message is printed and the tape must be manually
re-scanned to retrieve the linked-to file.
.PP
When the 
.B H
modifier is used with
.B bar ,
an additional header block (one that does not pertain to a particular
file) is written to the first block of each volume of the archive.  The 
header ID, as specified on the command line, is copied to 
.IR start_of_name .
The size reflects the number of bytes to skip to the start of
the first full file (always zero on the first volume).  
.PP
The encoding of the header is designed to be portable across machines.
.SH "SEE ALSO"
.BR bar (1)
 a 
.B bar 
archive.
.IR rdev
is the device type, for files that are devices.
The other fields are zero-filled octal numbers in ASCII.  Each field
(of widt./share/man/man5/bootparams.5                                                                          755       0      12         2072  4424741503  11146                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bootparams.5 1.8 89/03/27 SMI;
.TH BOOTPARAMS 5 "16 February 1988"
.SH NAME
bootparams \- boot parameter data base
.SH SYNOPSIS
.B /etc/bootparams
.SH DESCRIPTION
.IX  "bootparams file"  ""  "\fLbootparams\fP \(em boot parameter database"
.IX  "boot parameter database"  ""  "boot parameter database \(em \fLbootparams\fP"
.LP
The
.B bootparams
file contains the list of client entries that diskless clients use for booting.
For each diskless client the entry should contain the following information:
.LP
.nf
	name of client
	a list of keys, names of servers, and pathnames.
.fi
.LP
The first item of each entry is the name of the diskless client. The
subsequent item is a list of keys, names of servers, and pathnames.
.LP
Items are separated by
.SM TAB
characters.
.SH EXAMPLE
.LP
Here is an example of the
.B /etc/bootparams
taken from a Sun\s-1OS\s0 system.
.sp
.ft B
.nf
myclient	root=myserver:/nfsroot/myclient \e
	swap=myserver:/nfsswap/myclient \e
	dump=myserver:/nfsdump/myclient
.fi
.SH FILES
.PD 0
.TP 20
.B /etc/bootparams
.PD
.SH "SEE ALSO"
.BR bootparamd (8)
ap.5     z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5     z  rasterfile.5  z    z  remote.5    4  z  
resolv.conf.5 z  D  z  rgb.5 4  X  z  rhosts.5  X  l  z  
rootmenu.5 l  |  z  rpc.5  .    z  
sccsfile.5     z  
services.5     z  sm.5 5 u    z  sm.bak.5      z  
sm.state.5     z  state.5      z  	statmon.5      z  	sunview.5   ,./share/man/man5/coff.5                                                                                755       0      12        26736  4424741503   7751                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)coff.5 1.12 89/03/27 SMI; S5 via ECD
.TH COFF 5 "22 March 1989"
.SH NAME
coff \- common assembler and link editor output
.SH SYNOPSIS
.nf
.ft B
#include <filehdr.h>
#include <aouthdr.h>
#include <scnhdr.h>
#include <reloc.h>
#include <linenum.h>
#include <storclass.h>
#include <syms.h>
.ft R
.fi
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "COFF file" "" "\s-1COFF\s0, Sun386i executable file format"
.LP
The output from
the link editor and the assembler (named
.B a.out
by default) is in
.SM COFF
format (Common Object File Format) on the Sun386i system.
.LP
A common object file consists of a file header, a
system header (if the file is link editor output),
a table of section headers, a data section, relocation information,
(optional) line numbers, a symbol table, and a string table.
The general format looks like this:
.LP
.RS
.nf
.ft I
file-header
system-header
section-headers
data
relocation
line-numbers
symbol-table
string-table
.ft
.fi
.RE
.LP
.I section-headers
contains a number of section headers:
.LP
.RS
.nf
.ft I
section 1 header
\fR\&.\|.\|.\fP
section n header
.ft
.fi
.RE
.LP
Similarly,
.IR data ,
.IR relocation ,
and
.I line-numbers
are each divided into
.I n
sections.
.LP
The last three parts of an object file (line numbers, symbol table and
string table) may be missing if the program was linked with the
.B \-s
option of
.BR ld (1)
or if they were removed by
.BR strip (1).
Also note that
the relocation information will be absent after linking unless the 
.B \-r
option of
.BR ld (1)
was used.
The string table exists only if the symbol table contains symbols
with names longer than eight characters.
.LP
The sizes of each section (contained in the header, discussed below)
are in bytes.
.LP
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, the latter actually being
initialized to all 0's),
and a stack.  The text segment starts at
location 0x1000 by default.
.\" On the \s-13B5\s+1 computer the text segment starts at location 0x80800000.
.LP
The
.B a.out
file produced by
.BR ld (1)
has the magic number 0413 in the first field of the
system header.  The headers (file header,
system header, and section headers) are loaded at the
beginning of the text segment and the text immediately follows the
headers in the user address space.  The first text address will
equal 0x1000 plus the size of the headers, and will vary depending upon the
number of section headers in the
.B a.out
file.  In an
.B a.out
file with three sections (.text, .data, .bss, and .comment), the first
text address is at
0x000010D0. The text segment is not writable by the program;
if other processes are executing the same
.B a.out
file, the processes will share a single text segment.
.LP
The data segment starts at the next 4K boundary past the last 
text address.  The first data address is determined by the following:
If an
.B a.out
file were split into 4K chunks, one of the chunks would contain both
the end of text and the beginning of data.
When the
.B a.out
file is loaded into memory for execution, that chunk will appear twice; once at the end of text and
once at the beginning of data (with some unused space in between).
The duplicated chunk of text that appears at the beginning of data
is never executed; it is duplicated so that the operating system may
bring in pieces of the file in multiples of the page size without
having to realign the beginning of the data section to a page
boundary.
Therefore the first data address is the sum of the next
segment boundary past the end of text plus the remainder of the
last text address divided by 4K.
If the last text address is a multiple of 4K no duplication is necessary.
.LP
On the Sun386i computer the stack begins at
location
.SM 0xFBFFFFFF
and grows toward lower addresses.
The stack is automatically extended as required.
The data segment is extended only as requested by the
.BR brk (2)
system call.
.LP
For relocatable files 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,
there will be a relocation entry for the word,
the storage class of the symbol-table entry for
the symbol will be marked as an \(lqexternal symbol\(rq, 
and the value and section number of the symbol-table entry will be
undefined.
When the file is processed by the
link editor and the external symbol becomes
defined, the value of the symbol will
be added to the word in the file.
.br
.ne 12
.SS File Header
The format of the file header is:
.LP
.RS
.ta \w'struct\ \ 'u +\w'unsigned'u +\w'\ short\ \ 'u +\w'f_symptr;\ \ 'u
.nf
.lg 0
.ft B
struct filehdr
{
	unsigned short	f_magic;	/\(** magic number \(**/
	unsigned short	f_nscns;	/\(** number of sections \(**/
	long		f_timdat;	/\(** time and date stamp \(**/
	long		f_symptr;	/\(** file ptr to symtab \(**/
	long		f_nsyms;	/\(** # symtab entries \(**/
	unsigned short	f_opthdr;	/\(** sizeof(opt hdr) \(**/
	unsigned short	f_flags;	/\(** flags \(**/
};
.fi
.ft
.RE
.br
.ne 15
.SS System Header
The format of the system header is:
.LP
.RS
.nf
.lg 0
.ft B
typedef struct aouthdr
{
	short	magic;		/\(** magic number \(**/
	short	vstamp;		/\(** version stamp \(**/
	long	tsize;		/\(** text size in bytes, padded \(**/
	long	dsize;		/\(** initialized data (.data) \(**/
	long	bsize;		/\(** uninitialized data (.bss) \(**/
	long	entry;		/\(** entry point \(**/
	long	text_start;	/\(** base of text used for this file \(**/
	long	data_start;	/\(** base of data used for this file \(**/
} \s-1AOUTHDR\s+1;
.fi
.ft
.lg
.B
.RE
.br
.ne 14
.SS Section Header
The format of the section header is:
.LP
.RS
.ta \w'struct\ \ 'u +\w'unsign'u +\w'ed\ short\ \ 'u +\w's_lnnoptr;\ \ 'u
.nf
.lg 0
.ft B
struct scnhdr
{
	char		s_name[\s-1SYMNMLEN\s+1];/\(** section name \(**/
	long		s_paddr;	/\(** physical address \(**/
	long		s_vaddr;	/\(** virtual address \(**/
	long		s_size;		/\(** section size \(**/
	long		s_scnptr;	/\(** file ptr to raw data \(**/
	long		s_relptr;	/\(** file ptr to relocation \(**/
	long		s_lnnoptr;	/\(** file ptr to line numbers \(**/
	unsigned short	s_nreloc;	/\(** # reloc entries \(**/
	unsigned short	s_nlnno;	/\(** # line number entries \(**/
	long		s_flags;	/\(** flags \(**/
};
.fi
.ft
.lg
.RE
.br
.ne 12v
.SS Relocation
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:
.LP
.RS
.ta \w'#define\ \ 'u +\w'R_DIR32S\ \ 'u +\w'r_symndx;\ \ 'u
.nf
.lg 0
.ft B
struct reloc
{
	long	r_vaddr;	/\(** (virtual) address of reference \(**/
	long	r_symndx;	/\(** index into symbol table \(**/
	ushort	r_type;		/\(** relocation type \(**/
};
.if ''b16' \{\
#define	R_ABS	0
#define	R_DIR16	01
#define	R_REL16	02
#define	R_IND16	03\}
.fi 
.ft
.DT
.lg
.RE
.LP
The start of the relocation information is
.B s_relptr
from the section
header.
If there is no relocation information,
.B s_relptr
is 0.
.SS Line Number
The 
.BR cc (1V)
command generates an entry in the object file for
each C source line on which a breakpoint is possible (when
invoked with the
.BR \-g\f1
option.
Users can refer to line numbers when using
the appropriate debugger, such as
.BR dbx (1)).
The structure of these line number entries appears below.
.LP
.RS
.ta \w'struct\ \ 'u +\w'unsigne'u +\w'd\ short\ \ 'u
.nf
.lg 0
.ft B
struct	lineno
{
	union
	{
		long	l_symndx ;
		long	l_paddr ;
	}		l_addr ;
	unsigned short	l_lnno ;
} ;
.fi
.lg
.ft
.RE
.LP
Numbering starts with one at the top of the source file and increments
independent of transition between functions.
The initial line number entry for a function has
.B l_lnno
equal to zero, and the symbol table index of the function's
entry is in
.BR l_symndx .
Otherwise,
.B l_lnno
is non-zero, and
.B l_paddr
is the physical address of the code for the referenced line.
Thus the overall structure is the following:
.sp
.RS
.ft B
.ta \w'function\ symtab\ index\ \ \ \ 'u
.nf
.B 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
.ft
.sp
.RE
.DT
.SS Symbol Table
The format of each symbol in the symbol table is described by the 
syment structure, shown below. This structure is compatible with 
System V
.SM COFF,
but has an added
.B _n_dbx
structure which is needed by
.B dbx (1).
.br
.ne 27v
.PP
.RS
.ta \w'#define\ \ 'u +\w'\s-1SYMNMLEN\s+1\ \ 'u +\w'n_numaux;\ \ 'u
.nf
.lg 0
.ft B
#define  \s-1SYMNMLEN\s+1	8
#define  \s-1FILNMLEN\s+1	14
#define  \s-1DIMNUM\s+1	4

.ds H1 xxxxunsignedxshortxx
.ds H2 xxxxunsignedxshortxx*_n_nptr[2];xx
struct syment
{
    union\h'|\w'\*(H2'u'/\(** all ways to get a symbol name \(**/
    {
        char\h'|\w'\*(H1'u'_n_name[\s-1SYMNMLEN\s+1]; /\(** name of symbol \(**/
        struct
        {
            long\h'|\w'\*(H1'u'_n_zeroes;\h'|\w'\*(H2'u'/\(** == 0L if in string table \(**/
            long\h'|\w'\*(H1'u'_n_offset;\h'|\w'\*(H2'u'/\(** location in string table \(**/
        } _n_n;
        char\h'|\w'\*(H1'u'\(**_n_nptr[2];\h'|\w'\*(H2'u'/\(** allows overlaying \(**/
        struct
        {
            char\h'|\w'\*(H1'u'_n_leading_zero;\h'|\w'\*(H2'u'/\(** null char \(**/
            char\h'|\w'\*(H1'u'_n_dbx_type;\h'|\w'\*(H2'u'/\(** stab type \(**/
            short\h'|\w'\*(H1'u'_n_dbx_desc;\h'|\w'\*(H2'u'/\(** value of desc field \(**/
            long\h'|\w'\*(H1'u'_n_stab_ptr;\h'|\w'\*(H2'u'/\(** table ptr \(**/
        } _n_dbx;
    } _n;
    long\h'|\w'\*(H1'u'n_value;\h'|\w'\*(H2'u'/\(** value of symbol \(**/
    short\h'|\w'\*(H1'u'n_scnum;\h'|\w'\*(H2'u'/\(** section number \(**/
    unsigned short\h'|\w'\*(H1'u'n_type;\h'|\w'\*(H2'u'/\(** type and derived type \(**/
    char\h'|\w'\*(H1'u'n_sclass;\h'|\w'\*(H2'u'/\(** storage class \(**/
    char\h'|\w'\*(H1'u'n_numaux;\h'|\w'\*(H2'u'/\(** number of aux entries \(**/
};
.sp
#define  n_name	_n._n_name
#define  n_zeroes	_n._n_n._n_zeroes
#define  n_offset	_n._n_n._n_offset
#define  n_nptr	_n._n_nptr[1]
.fi
.DT
.lg
.ft B
.RE
.LP
The storage class member
.RB ( n_sclass )
is set to one of the constants defined in
.BR <storclass.h> .
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.
.br
.ne 38v
.LP
.RS
.ft B
.ta \w'struct\ 'u +\w'struct\ 'u +\w'unsigne'u +\w'd\ short\ \ 'u +\w'unsigne'u +\w'd\ short\ \ 'u
.nf
.lg 0
union auxent {
	struct {
		long	x_tagndx;
		union {
			struct {
				unsigned short	x_lnno;
				unsigned short	x_size;
			} x_lnsz;
			long	x_fsize;
		} x_misc;
		union {
			struct {
				long	x_lnnoptr;
				long	x_endndx;
			}  x_fcn;
			struct {
				unsigned short	x_dimen[\s-1DIMNUM\s+1];
			} x_ary;
		} x_fcnary;
		unsigned short  x_tvndx;
	} x_sym;

	struct {
		char	x_fname[\s-1FILNMLEN\s+1];
	} x_file;

	struct {
		long	    x_scnlen;	  
		unsigned short  x_nreloc;  
		unsigned short  x_nlinno;  
	} x_scn;

	struct {
		long		x_tvfill;
		unsigned short	x_tvlen;
		unsigned short	x_tvran[2];
	} x_tv;
};
.fi
.DT
.lg
.ft
.RE
.LP
Indexes of symbol table entries begin at
.IR zero .
The start of the symbol table is
.B f_symptr
(from the file header)
bytes from the beginning of the file.
If the symbol table is stripped,
.B f_symptr
is 0.
The string table (if one exists) begins at
.B f_symptr
+
.RB ( f_nsyms
\(** \s-1SYMESZ\s+1)
bytes from the beginning of the file.
.SH SEE ALSO
.BR as (1),
.BR cc (1V), 
.BR ld (1), 
.BR brk( 2),
.BR ldfcn (3)
 Relocation
.LP
The relocation inf./share/man/man5/core.5                                                                                755       0      12         7067  4424741503   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)core.5 1.18 89/03/27 SMI; from UCB 4.2
.TH CORE 5  "22 March 1989"
.SH NAME
core \- format of memory image file
.SH SYNOPSIS
.B #include <sys/core.h>
.SH DESCRIPTION
.IX  "core file"  ""  "\fLcore\fP \(em memory image file format"
.IX  "memory image file format"  ""  "memory image file format \(em \fLcore\fP"
.IX  "format of memory image file"  ""  "format of memory image file \(em \fLcore\fP"
.LP
The operating system writes out a memory image of a
terminated process when any of various errors occur.  See
.BR sigvec (2)
for the list of reasons; the most common are memory violations, illegal
instructions, bus errors, and user-generated
quit signals.  The memory image is called
.B core
and is written in the process's working
directory (provided it can be; normal access controls apply).
Set-user-\s-1ID\s0 and set-group-\s-1ID\s0 programs do not produce core files
when they terminate as this would cause a security loophole.
.LP
The maximum size of a
.B core
file is limited by
.B setrlimit
(see
.BR getrlimit (2)).
Files which would be larger than the limit are not created.
.LP
The core file consists of a 
.B core
structure, as defined in the
.B <sys/core.h>
file, followed by the data pages and then the stack pages of the process image.
The
.B core
structure includes
the program's header, the size of the text, data, and stack
segments, the name of the program and the number of the signal
that terminated the process.  The program's 
header is described by the 
.B exec
structure defined in the
.B <sys/exec.h>
file, except on Sun386i systems.
.LP
.RS
.nf
.ta 1i 1.5i 2.5i
.ft B
struct core {
	int	c_magic;		/* Corefile magic number */
	int	c_len;			/* Sizeof (struct core) */
	struct	regs c_regs;		/* General purpose registers */
	struct 	exec c_aouthdr;		/* A.out header */
	int	c_signo;		/* Killing signal, if any */
	int	c_tsize;		/* Text size (bytes) */
	int	c_dsize;		/* Data size (bytes) */
	int	c_ssize;		/* Stack size (bytes) */
	char	c_cmdname[CORE_NAMELEN + 1]; /* Command name */
	struct	fpu c_fpu;		/* external FPU state */
	int	c_ucode;		/* Exception no. from u_code */
};
.ft R
.fi
.DT
.RE
.LP
The members of the structure are:
.TP 15
.B c_magic
The magic number
.SB CORE_MAGIC ,
as defined in
.BR <sys/core.h> .
.TP
.B c_len
The length of the
.B core
structure in the core file.  This need not be equal to the current size of a 
.B core
structure as defined in
.BR <sys/core.h> ,
as the core file may have been produced on a different release of
the SunOS operating system.
.TP
.B c_regs
The general purpose registers at the time the core file was produced.  This
structure is machine-dependent.
.TP
.B c_aouthdr
The executable image header of the program.
.TP
.B c_signo
The number of the signal that terminated the process; see
.BR sigvec (2).
.TP
.B c_tsize
The size of the text segment of the process at the time the core file was
produced.
.TP
.B c_dsize
The size of the data segment of the process at the time the core file was
produced.  This gives the amount of data space image in the core file.
.TP
.B c_ssize
The size of the stack segment of the process at the time the core file was
produced.  This gives the amount of stack space image in the core file.
.TP
.B c_cmdname
The first
.SB CORE_NAMELEN
characters of the last component of the path name of the program.
.br
.ne 4
.TP
.B c_fpu
The status of the floating point hardware at the time the core file was
produced.  This member is not present on Sun-2s.
.TP
.B c_ucode
The signal code of the signal that terminated the process, if any.  See
.BR sigvec (2).
.SH "SEE ALSO"
.BR adb (1),
.BR dbx (1),
.BR getrlimit (2),
.BR sigvec (2)
 5  "22 March 1989"
.SH NAME
core \- format of memory image file
.SH SYNOPSIS
.B #include <sys/core.h>
.SH DESCRIPTION
.IX  "core file"  ""  "\fLcore\fP \(em memory image file format"
.IX  "memory image file format"  ""  "memory image file format \(em \fLcore\fP"
.IX  "format of memory image file"  ""  "format of memory image file \(em \fLcore\fP"
.LP
The operating system writes out a memory image of a
terminated process when any of various errors occur./share/man/man5/cpio.5                                                                                755       0      12         4651  4424741503   7736                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cpio.5 1.12 89/03/27 SMI; from UCB 4.2
.TH CPIO 5  "22 March 1989"
.SH NAME
cpio \- format of cpio archive
.SH DESCRIPTION
.IX  "cpio file"  ""  "\fLcpio\fP \(em cpio archive format"
.LP
The old format
.I header
structure, when the
.B \-c
option of
.B cpio
is not used, is:
.LP
.RS
.nf
.ft B
struct {
	short	h_magic,
		h_dev;
	ushort	h_ino,
		h_mode,
		h_uid,
		h_gid;
	short	h_nlink,
		h_rdev,
		h_mtime[2],
		h_namesize,
		h_filesize[2];
	char	h_name[h_namesize rounded to a word];
} Hdr;
.fi
.ft R
.RE
.LP
The byte order here is that of the machine on which the tape was written.
If the tape is being read on a machine with a different byte order, you have
to use
.BR swab (3)
after reading the header.  You can determine what byte order the tape was
written with by examining the
.I h_magic
field; if it is equal to
0143561 (octal), which is the standard magic number 070707 (octal) with the
bytes swapped, the tape was written in a byte order opposite to that of the
machine on which it is being read.  If you are producing a tape to be read
on a machine with the opposite byte order to that of the machine on which it
is being produced, you can use
.B swap
before writing the header.
.LP
When the
.B \-c
option is used, the
.I header
information is
described by the statement below:
.LP
.ft B
.nf
	sscanf(Chdr, "%6o%6o%6o%6o%6o%6o%6o%6o%11lo%6o%11lo%s",
		&Hdr.h_magic, &Hdr.h_dev, &Hdr.h_ino, &Hdr.h_mode,
		&Hdr.h_uid, &Hdr.h_gid, &Hdr.h_nlink, &Hdr.h_rdev,
		&Hdr.h_mtime, &Hdr.h_namesize, &Hdr.h_filesize, &Hdr.h_name);
.fi
.ft R
.LP
.I Longtime
and
.I Longfile
are equivalent to
.I Hdr.h_mtime
and
.IR Hdr.h_filesize ,
respectively.  The contents of each file is
recorded in an element of the array of varying length structures,
.IR archive ,
together with other 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
.BR stat (2).
The length of the
.SM NULL\s0-terminated
path name
.IR h_name ,
including the
.SM NULL
byte, is given by
.IR h_namesize .
.LP
The last record of the
.I archive
always contains the name
.BR \s-1TRAILER\s0!!! .
Special files, directories, and the trailer, are recorded
with
.I h_filesize
equal to zero.  Symbolic links are recorded similarly
to regular files, with the ``contents'' of the file being the name of the
file the symbolic link points to.
.SH "SEE ALSO"
.BR cpio (1),
.BR find (1),
.BR stat (2),
.BR swab (3)
t release of
the SunOS operating system.
.TP
.B c_regs
The general purpose registers at./share/man/man5/crontab.5                                                                             755       0      12         7373  4424741504  10441                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)crontab.5 1.21 89/03/27 SMI; from S5R3
.TH CRONTAB 5 "22 March 1989"
.SH NAME
crontab \- table of times to run periodic jobs
.SH SYNOPSIS
.B /var/spool/cron/crontabs/*
.SH DESCRIPTION
.IX  "crontab file"  ""  "\fLcrontab\fP \(em periodic jobs table"
.IX  "periodic jobs table"  ""  "periodic jobs table \(em \fLcrontab\fP"
.IX  "timed event jobs table"  ""  "timed event jobs table \(em \fLcrontab\fP"
.LP
The
.B cron
utility is a permanent process, started by
.BR /etc/rc.local .
.B cron
consults the files in the directory
.B /var/spool/cron/crontabs
to find out what tasks are to be done, and at what time.
.LP
Each line in a
.B crontab
file consists of six fields, separated by spaces or tabs, as follows:
.IP
.I minutes	hours	day-of-month	month	day-of-week	command
.LP
.TP 15
.I minutes
Minutes field, which can have values in the range 0 through 59.
.TP
.I hours
Hours field, which can have values in the range 0 through 23.
.TP
.I day-of-month
Day of the month, in the range 1 through 31.
.TP
.I month
Month of the year, in the range 1 through 12.
.TP
.I day-of-week
Day of the week, in the range 0 through 6.
Sunday is day 0 in this scheme of things.  For backward compatibility
with older systems, Sunday may also be specified as day 7.
.TP
.I command
Command to be run.
A percent character in this field (unless escaped by
.BR \e )
is translated to a
.SM NEWLINE
character.
Only the first line (up to a % or end of line)
of the command field is executed by the Shell.
The other lines are made available to the command as standard input.
.LP
Any of fields 1 through 5 can be a list of values separated by commas.
A value can either be a number, or a pair of numbers separated by a hyphen,
indicating that the job is to be done for all the times in the
specified range.  If a field is an asterisk character
.RB ( \(** )
it means that the job is done for all possible values of the field.
.LP
Note: the specification of days
may be made by two fields
(day of the month and day of the week).
If both are specified as a list of elements,
both are adhered to.
For example,
.IP
.B 0 0 1,15 \(** 1
.LP
would run a command on the
first and fifteenth of each month, as well as on every Monday.
To specify days by only one field,
the other field should be set to \(**.
For example,
.IP
.B 0 0 \(** \(** 1
.LP
would run a command only on Mondays.
.LP
The command is run from your home directory with an
.BR arg0 " of " sh.
Users who desire to have their
.B .profile
executed must
explicitly do so in the command.
.B cron
supplies a default environment for every shell, defining
.BR \s-1HOME\s+1 ", " \s-1LOGNAME\s+1 ", " \s-1USER\s+1 ,
.BR \s-1SHELL\s+1(=/bin/sh) ,
and
.BR \s-1PATH\s0(=:/usr/ucb:/bin:/usr/bin) .
.LP
NOTE:
Users should remember to redirect the standard output
and standard error of their commands!
If this is not done, any generated output or errors
will be mailed to the user.
.LP
Lines that start with
.B #
are treated as comments.
.SH EXAMPLE
.IP
.nf
.ft B
0 0 * * * calendar \-
15 0 * * * /usr/etc/sa \-s >/dev/null
15 4 * * * find /etc/preserve \-mtime +7 \-a \-exec rm \-f {\|} \;
40 4 * * * find / \-name '#*' \-atime +3 \-exec rm \-f {\|} \;
0 0 * * 1-5 /usr/local/weekdays
0 0 * * 0,6 /usr/local/weekends
.ft R
.fi
.LP
The
.B calendar
command runs at minute 0 of hour 0 (midnight) of every day.  The
.B /usr/etc/sa
command runs at 15 minutes after midnight every day.  The two
.B find
commands run at 15 minutes past four and at 40 minutes past four,
respectively, every day of the year.  The
.B /usr/local/weekdays
command is run at midnight on weekdays.  Finally, the
.B /usr/local/weekends
command is run at midnight on weekends.
.SH FILES
.PD 0
.TP 20
.B /var/spool/cron/crontabs/*
tables of times to run periodic jobs
.TP
.B /etc/rc.local
.TP
.B .profile
.PD
.SH SEE ALSO
.BR cron (8),
.BR rc (8)
har\h'|\w'\*(H1'u'_n_dbx_type;\h'|\w'\*(H2'u'/\(** stab type \(**/
            short\h'|\w'\*(H1'u'_n_dbx_desc;\h'|\w'\*(H2'u'/\(** value of desc field \(**/
            long\h'|\w'\*(H1'u'_n_stab_ptr;\h'|\w'\*(H2'u'/\(** table ptr \(**/
        } _n_dbx;
    }./share/man/man5/current.5                                                                             755       0      12           67  4424741504  10424                                                                                                                                                                                                                                                                                                                                                                      .so man5/statmon.5
.\" @(#)current.5 1.4 89/03/27 SMI;
  dir.5 ts    z  dump.5 .    z  dumpdates.5     z  ethers.5 .5      z  	exports.5     z  fcntl.5   $  z  	forward.5 5   4  z  fs.5 rd.  D  z  fspec.5   T  z  fstab.5   h  z  
ftpusers.5    |  z  
gettytab.5 h    z  group.5     z  group.adjunct.5     z  help.5 c    z  
help_viewer.5     z  hosts.5     z  
hosts.equiv.5     z  indent.pro.5    $  z  inetd.conf.5  $./share/man/man5/defaults.5                                                                            755       0      12          324  4424741504  10565                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)defaults.5 1.4 89/03/27 SMI;
.TH DEFAULTS 5 "2 September 1987"
.SH NAME
defaults \- default specifications for SunView
.SH SYNOPSIS
.B ~/.defaults
.br
.B /usr/lib/defaults
.SH DESCRIPTION
To be supplied.
fspec.5   T  z  fstab.5   h  z  
ftpusers.5    |  z  
gettytab.5      z  group.5     z  group.adjunct.5     z  help.5 c    z  
help_viewer.5     z  hosts.5     z  
hosts.equiv.5     z  indent.pro.5    $  z  inetd.conf.5  $  4  z  inode.5   H./share/man/man5/dir.5                                                                                 755       0      12         6103  4424741504   7555                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dir.5 1.12 89/03/27 SMI; from UCB 4.2 BSD
.TH DIR 5  "19 October 1987"
.SH NAME
dir \- format of directories
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/dir.h>
.fi
.SH DESCRIPTION
.IX  "dir file"  ""  "\fLdir\fP \(em directory format"
.LP
A directory behaves exactly like an ordinary file, save that no
user may write into a directory and directories must be read using the
.BR getdirentries (2)
system call or the
.BR directory (3)
library routines.
The fact that a file is a directory is indicated by
a bit in the flag word of its inode entry; see
.BR fs (5).
.LP
A directory consists of some number of blocks of
.SM DIRBLKSIZ
bytes, where
.SM DIRBLKSIZ
is chosen such that it can be transferred
to disk in a single atomic operation (512 bytes on most machines):
.IP
.ft B
.nf
#ifdef \s-1KERNEL\s0
#define \s-1DIRBLKSIZ DEV_BSIZE\s0
#else
#define \s-1DIRBLKSIZ\s0 512
#endif
.sp
#define \s-1MAXNAMLEN\s0 255
.fi
.ft R
.LP
Each
.SM DIRBLKSIZ
byte block contains some number of directory entry
structures, which are of variable length.  Each directory entry has a
.B struct direct
at the front of it, containing its inode number,
the length of the entry, and the length of the name contained in
the entry.  These are followed by the name padded to a 4-byte boundary
with
.SM NULL
bytes.  All names are guaranteed
.SM NULL\s0-terminated.
The maximum length of a name in a directory is
.BR \s-1MAXNAMLEN\s0 .
.LP
The macro
.B \s-1DIRSIZ\s0(dp)
gives the amount of space required to represent
a directory entry.  Free space in a directory is represented by
entries that have:
.IP
.B dp->d_reclen >
.SB DIRSIZ\s0(dp)
.LP
All
.SM DIRBLKSIZ
bytes in a directory block are claimed by the directory entries.  This
usually results in the last entry in a directory having a large
.BR dp->d_reclen .
When entries are deleted from a directory, the
space is returned to the previous entry in the same directory
block by increasing its
.BR dp->d_reclen .
If the first entry of a directory block is free, then its
.B dp->d_ino
is set to 0.
Entries other than the first in a directory do not normally have
.B dp->d_ino
set to 0.
.LP
The
.SB DIRSIZ
macro gives the minimum record length which will hold
the directory entry.  This requires the amount of space in struct direct
without the
.B d_name
field, plus enough space for the name with a terminating
.SM NULL
byte
.BR (dp->d_namlen+1) ,
rounded up to a 4-byte boundary.
.IP
.ft B
.nf
#undef \s-1DIRSIZ\s0
#define \s-1DIRSIZ\s0(dp)      ((sizeof (struct direct) - (\s-1MAXNAMLEN\s0+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
struct	direct {
	u_long	d_ino;
	short	d_reclen;
	short	d_namlen;
	char	d_name[\s-1MAXNAMLEN\s0 + 1];
	/* typically shorter */
};
.fi
.ft R
.LP
By convention, the first two entries in each directory
are for
.RB ` . '
and
.RB ` .\|. '.
The first is an entry for the
directory itself.  The second is for the parent directory.
The meaning of
.RB ` .\|. '
is modified for the root directory
of the master file system
.RB (\*(lq / \*(rq),
for which
.RB ` .\|. '
has the same meaning as
.RB ` . '.
.SH "SEE ALSO"
.BR getdirentries (2),
.BR directory (3),
.BR fs (5)
' \-atime +3 \-exec rm \-f {\|} \;
0 0 * * 1-5 /usr/local/weekdays
0 0 * * 0,6 /usr/local/weekends
.ft R
.fi
.LP
The
.B calendar
command runs at minute 0 of hour 0 (midnight) of every day.  The
.B /usr/etc/sa
command runs at 15 minutes after midnight every day.  The two
.B find
commands run at 15 minutes past four and at 40 minutes past four,
respectively, every day of the year.  The
.B /usr/local/weekdays
command is run at midnight on weekd./share/man/man5/dump.5                                                                                755       0      12        11036  4424741504   7765                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dump.5 1.13 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH DUMP 5  "26 March 1989"
.SH NAME
dump, dumpdates \- incremental dump format
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <sys/inode.h>
.B #include <protocols/dumprestore.h>
.fi
.SH DESCRIPTION
.IX  "dump file"  ""  "\fLdump\fP \(em incremental dump format"
.IX  "incremental dump format"  ""  "incremental dump format \(em \fLdump\fP"
.LP
Tapes used by
.B dump
and
.BR restore (8)
contain:
.LP
.nf
	a header record
	two groups of bit map records
	a group of records describing directories
	a group of records describing files
.fi
.LP
The format of the header record and of the first
record of each description as given in the
include file
.B /usr/include/protocols/dumprestore.h
is:
.LP
.RS
.nf
.ft B
#define \s-1NTREC\s0	10
#define \s-1MLEN\s0		16
#define \s-1MSIZ\s0		4096
#define \s-1TS_TAPE\s0	1
#define \s-1TS_INODE\s0	2
#define \s-1TS_BITS\s0	3
#define \s-1TS_ADDR\s0	4
#define \s-1TS_END\s0	5
#define \s-1TS_CLRI\s0	6
#define \s-1MAGIC\s0	(int) 60011
#define \s-1CHECKSUM\s0	(int) 84446
struct	spcl {
	int		c_type;
	time_t		c_date;
	time_t		c_ddate;
	int		c_volume;
	daddr_t		c_tapea;
	ino_t		c_inumber;
	int		c_magic;
	int		c_checksum;
	struct		dinode		c_dinode;
	int		c_count;
	char		c_addr[\s-1BSIZE\s0];
} spcl;
struct	idates {
	char		id_name[16];
	char		id_incno;
	time_t		id_ddate;
};
#define	\s-1DUMPOUTFMT\s0	"%-16s %c %s"		/* for printf */
						/* name, incno, ctime(date) */
#define	\s-1DUMPINFMT\s0	"%16s %c %[^\en]\en"	/* inverse for scanf */
.fi
.ft
.SB NTREC
is the default number of 1024 byte records in a physical
tape block, changeable by the
.B b
option to
.BR dump .
.SB MLEN
is the number of bits in a bit map word.
.SB MSIZ
is the number of bit map words.
.LP
The
.SB TS_
entries are used in the
.B c_type
field to indicate what sort of header
this is.
The types and their meanings are as follows:
.LP
.TP 20
.SB TS_TAPE
Tape volume label
.TP
.SB TS_INODE
A file or directory follows.
The
.B c_dinode
field is a copy of the disk inode and contains
bits telling what sort of file this is.
.TP
.SB TS_BITS
A bit map follows.
This bit map has a one bit
for each inode that was dumped.
.TP
.SB TS_ADDR
A subrecord of a file description.
See
.B c_addr
below.
.TP
.SB TS_END
End of tape record.
.TP
.SB TS_CLRI
A bit map follows.
This bit map contains a zero bit for
all inodes that were empty on the file system when dumped.
.TP
.SB MAGIC
All header records have this number in
.BR c_magic .
.TP
.SB CHECKSUM
Header records checksum to this value.
.LP
The fields of the header structure are as follows:
.LP
.TP 20
.B c_type
The type of the header.
.TP
.B c_date
The date the dump was taken.
.TP
.B c_ddate
The date the file system was dumped from.
.TP
.B c_volume
The current volume number of the dump.
.TP
.B c_tapea
The current number of this (1024-byte) record.
.TP
.B c_inumber
The number of the inode being dumped if this
is of type
.BR \s-1TS_INODE\s0 .
.TP
.B c_magic
This contains the value
.SB MAGIC
above, truncated as needed.
.TP
.B c_checksum
This contains whatever value is needed to
make the record sum to
.BR \s-1CHECKSUM\s0 .
.TP
.B c_dinode
This is a copy of the inode as it appears on the
file system; see
.BR fs (5).
.TP
.B c_count
The count of characters in
.BR c_addr .
.TP
.B c_addr
An array of characters describing the blocks of the
dumped file.
A character is zero if the block associated with that character was not
present on the file system, otherwise the character is non-zero.
If the block was not present on the file system, no block was dumped;
the block will be restored as a hole in the file.
If there is not sufficient space in this record to describe
all of the blocks in a file,
.SB TS_ADDR
records will be scattered through the file, each one
picking up where the last left off.
.LP
Each volume except the last ends with a tapemark (read as an end
of file).
The last volume ends with a
.SB TS_END
record and then the tapemark.
.LP
The structure
.B idates
describes an entry in the file
.B /etc/dumpdates
where dump history is kept.
The fields of the structure are:
.TP 20
.B id_name
The dumped filesystem is
.BR /dev/id_nam .
.PD 0
.TP
.B id_incno
The level number of the dump tape;
see
.BR dump (8).
.TP
.B id_ddate
The date of the incremental dump in system format
see
.BR types (5).
.SH FILES
.PD 0
.TP 20
.B /etc/dumpdates
.TP
.B /dev/id_nam
.PD
.SH "SEE ALSO"
.BR fs (5),
.BR types (5),
.BR dump (8),
.BR restore (8)
g
.ft B
.RE
.LP
The storage class member
.RB ( n_sclass )
is set to one of the constants defined in
.BR <storclass.h> .
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.
.br
.ne 38v
.LP
.RS
.ft B
.ta \w'struct\ 'u +\w'struct\ 'u +\w'unsigne'u +\w'd\ short\ \ 'u +\w'unsigne'u +\w'd\ short\ \ 'u
.nf
.lg 0
union auxent {
	struct {
		long	x_tagndx;
		union {
			struct ./share/man/man5/dumpdates.5                                                                           755       0      12           67  4424741504  10730                                                                                                                                                                                                                                                                                                                                                                      .so man5/dump.5
.\" @(#)dumpdates.5 1.6 89/03/27 SMI; 
  	exports.5      z  fcntl.5   $  z  	forward.5 $  4  z  fs.5  $  D  z  fspec.5   T  z  fstab.5   h  z  
ftpusers.5 h  |  z  
gettytab.5 |    z  group.5     z  group.adjunct.5     z  help.5      z  
help_viewer.5 z    z  hosts.5     z  
hosts.equiv.5 z    z  indent.pro.5  z  $  z  inetd.conf.5  z  4  z  inode.5   H  z  
internat.5 H  X  z  intro.5   t  z   ipalloc.netr./share/man/man5/ethers.5                                                                              755       0      12         2472  4424741505  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ethers.5 1.13 89/03/27 SMI; new on release 3.0
.TH ETHERS 5 "22 March 1989"
.SH NAME
ethers \- Ethernet address to hostname database or YP domain
.SH DESCRIPTION
.IX "ethers file" "" "\fLethers\fR file \(em Ethernet addresses"
.LP
The
.B ethers
file contains information regarding the
known (48 bit) Ethernet addresses of hosts on the Internet.
For each host on an Ethernet,
a single line should be present with the following information:
.IP
.I Ethernet-address	official-host-name
.LP
Items are separated by any number of blanks and/or
.SM TAB
characters.  A
.RB ` # '
indicates the beginning of a comment
extending to the end of line.
.LP
The standard form for Ethernet addresses is
``\fIx\fB:\fIx\fB:\fIx\fB:\fIx\fB:\fIx\fB:\fIx\fR'' where
.I x
is a hexadecimal number between 0 and ff, representing one byte.
The address bytes are always in network order.
Host names may contain any printable character other than
a
.SM SPACE\s0,
.SM TAB\s0,
.SM NEWLINE\s0,
or comment character.
It is intended that host names in the
.B ethers
file correspond to the host names in the
.BR hosts (5)
file.
.LP
The
.BR ether_line (\|)
routine from the Ethernet address manipulation library,
.BR ethers (3N)
may be used to scan lines of the
.B ethers
file.
.SH FILES
.PD 0
.TP 20
.B /etc/ethers
.PD
.SH "SEE ALSO"
.BR ethers (3N),
.BR hosts (5)
<  z  tar.5 f.  L  z  term.5 .  \  z  term.5v   p  z  	termcap.5 v     z  terminfo.5v     z  
textswrc.5      z  toc.5 rc    z  translate.5     z  ttys.5 t  ./share/man/man5/exports.5                                                                             755       0      12        10170  4424741505  10523                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exports.5 1.25 89/03/27 SMI;
.TH EXPORTS 5 "22 March 1989"
.SH NAME
exports, xtab \- directories to export to NFS clients
.SH SYNOPSIS
.B /etc/exports
.LP
.B /etc/xtab
.SH DESCRIPTION
.IX  "NFS directories to export"  ""  "NFS directories to export\(em \fLexports\fP"
.IX  "NFS exported directories"  ""  "NFS exported directories\(em \fLxtab\fP"
.IX  "xtab file"  ""  "\fLxtab\fP \(em exported file system table"
.IX  "exports file"  ""  "\fLexports\fP \(em exported file system table"
.IX  "exported file system table"  ""  "exported file system table \(em \fLxtab\fP"
.IX  "exportable file system table"  ""  "exportable file system table \(em \fLexports\fP"
.IX  "file system"  "exported table"  ""  "exported table \(em \fLxtab\fP"
.IX  "file system"  "exports table"  ""  "exports table \(em \fLexports\fP"
.LP
The
.B /etc/exports
file contains entries for directories that can be exported to
.SM NFS
clients.  This file is read automatically by the
.BR exportfs (8)
command.  If you change this file, you must run
.BR exportfs (8)
for the changes to affect the daemon's operation.
.LP
Only when this file is present at boot time does the
.B rc.local
script execute
.BR exportfs (8)
and start the
.SM NFS
file-system daemon,
.BR nfsd (8).
.LP
The
.B /etc/xtab
file contains entries for directories that are
.I currently
exported.  This file should only be accessed by programs using
.B getexportent
(see
.BR exportent (3)).
(Use the
.B \-u
option of
.B exportfs
to remove entries from this file).
.LP
An entry for a directory consists of a line of the following form:
.IP
.I directory\ \ \ \fB\-\fIoption\fR[\fB,\|\fIoption\fR ]\|.\|.\|.
.TP 15
.I directory
is the pathname of a directory (or file).
.TP
.I option
is one of
.RS
.TP
.B ro
Export the directory read-only. If not specified, the directory is
exported read-write.
.TP
.BI rw= hostnames [: hostname ]\|.\|.\|.
Export the directory read-mostly. Read-mostly means read-only to most
machines, but read-write to those specified. If not specified, the directory is
exported read-write to all.
.TP
.BI anon=\fP uid
If a request comes from an unknown user, use
.I uid
as the effective user
.SM ID\s0.
Note: root users (uid 0) are always
considered \(lqunknown\(rq by the
.SM NFS
server, unless they are included in
the \(lqroot\(rq option below. The default value for this option is \-2.
Setting \(lqanon\(rq
to \-1 disables anonymous access. Note: by default secure
.SM NFS
will accept 
insecure requests as anonymous, and those wishing for extra security can
disable this feature by setting \(lqanon\(rq to \-1.
.TP
.BI root= hostnames [: hostname ]\|.\|.\|.
Give root access only to the root users from a specified
.IR hostname .
The default is for no hosts to be granted root access. 
.TP
.BI access= client [: client ]\|.\|.\|.
Give mount access to each
.I client
listed.  A
.I client
can either be a hostname, or a netgroup (see
.BR netgroup (5)).
Each
.I client
in the list is first checked for in the netgroup
database, and then the hosts database.  The default value allows any
machine to mount the given directory.
.TP
.B secure
Require clients to use a more secure protocol when
accessing the directory.
.RE
.LP
A
.RB ` # '
(pound-sign)
anywhere in the file indicates a comment that extends to the end of the
line.
.br
.ne 5
.SH EXAMPLE
.LP
.ft B
.ta 1i 3i
.nf
/usr	\-access=clients	# export to my clients
/usr/local	# export to the world
/usr2	\-access=hermes:zip:tutorial	# export to only these machines
/usr/sun	\-root=hermes:zip	# give root access only to these
/usr/new	\-anon=0	# give all machines root access
/usr/bin	\-ro	# export read-only to everyone
/usr/stuff	\-access=zip,anon=\-3,ro	# several options on one line
.fi
.ft R
.br
.ne 6
.SH FILES
.PD 0
.TP 20
.B /etc/exports
.TP
.B /etc/xtab
.TP
.B /etc/hosts
.TP
.B /etc/netgroup
.TP
.B rc.local
.PD
.SH SEE ALSO
.BR exportent (3),
.BR hosts (5),
.BR netgroup (5),
.BR exportfs (8),
.BR nfsd (8)
.SH WARNINGS
.LP
You cannot export either a parent directory or a subdirectory
of an exported directory that is
.IR "within the same filesystem" .
It would be illegal, for instance, to export both
.B /usr
and
.B /usr/local
if both directories resided on the same
disk partition.
tes
where dump history is kept.
The fields of the structure are:
.TP 20
.B id_name
The dumped filesystem is
.BR /dev/id_nam .
.PD 0
.TP
.B id_incno
The level number of the dump tape;
see
.BR dump (8).
.TP
.B id_ddate
The date of the incremental dump in system format
see
.BR types (5).
.SH FILES
.PD 0
.TP 20
.B /etc/dumpdates
.TP
.B /dev/id_nam
.PD
.SH "SEE ALSO"
.BR fs (5),
.BR types (5),
./share/man/man5/fcntl.5                                                                               755       0      12         3002  4424741505  10101                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fcntl.5 1.13 89/03/27 SMI; from UCB 4.2
.TH FCNTL 5 "19 October 1987"
.SH NAME
fcntl \- file control options
.SH SYNOPSIS
.B "#include <fcntl.h>"
.SH DESCRIPTION
.IX  "fcntl file"  ""  "\fLfcntl\fP \(em file control options"
.IX  "file control" "options header file \(em \fLfcntl\fP"
The
.BR fcntl (2V)
function provides for control over open files.  This include file describes
.I requests
and
.I arguments
to
.B fcntl
and
.BR open (2V)
as shown below:
.LP
.ta 1i 3i 4i
.nf
.ft B
/*	@ (#)fcntl.h 1.2 83/12/08 SMI; from UCB 4.2 83/09/25	*/
/*
* Flag values accessible to open(2V) and fcntl(2)
*  (The first three can only be set by open)
*/
#define	\s-1O_RDONLY\s0	0
#define	\s-1O_WRONLY\s0	1
#define	\s-1O_RDWR\s0	2
#define	\s-1O_NDELAY	FNDELAY\s0	/* Non-blocking I/O */
#define	\s-1O_APPEND	FAPPEND\s0	/* append (writes guaranteed at the end) */
#ifndef	\s-1F_DUPFD\s0
/* fcntl(2) requests */
#define	\s-1F_DUPFD\s0	0	/* Duplicate fildes */
#define	\s-1F_GETFD\s0	1	/* Get fildes flags */
#define	\s-1F_SETFD\s0	2	/* Set fildes flags */
#define	\s-1F_GETFL\s0	3	/* Get file flags */
#define	\s-1F_SETFL\s0	4	/* Set file flags */
#define	\s-1F_GETOWN\s0	5	/* Get owner */
#define	\s-1F_SETOWN\s0	6	/* Set owner */
/* flags for \s-1F_GETFL\s0, \s-1F_SETFL\s0\(em copied from <sys/file.h> */
#define	\s-1FNDELAY\s0		00004		/* non-blocking reads */
#define	\s-1FAPPEND\s0		00010		/* append on each write */
#define	\s-1FASYNC\s0		00100		/* signal pgrp when data ready */
#endif
.fi
.ft R
.SH "SEE ALSO
.BR fcntl (2V),
.BR open (2V)
z  tzfile.5        z  
updaters.5   ,  z  utmp.5 s  @  {   
uuencode.5 s  P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5  pne of
.RS
.TP
.B ro
Export the directory read-only. If not specified, the directory is
exported read-write.
.TP
.BI rw= hostnames [: hostname ]\|.\|.\|.
Export the directory read-mostly. Read-mostly means read-only to most
machines, but read-write to those specified. If not specified, the directory is
exported read./share/man/man5/forward.5                                                                             755       0      12           67  4424741505  10407                                                                                                                                                                                                                                                                                                                                                                      .so man5/aliases.5
.\" @(#)forward.5 1.5 89/03/27 SMI;
fspec.5   T  z  fstab.5   h  z  
ftpusers.5 h  |  z  
gettytab.5 |    z  group.5     z  group.adjunct.5     z  help.5      z  
help_viewer.5 z    z  hosts.5     z  
hosts.equiv.5 z    z  indent.pro.5  z  $  z  inetd.conf.5  z  4  z  inode.5   H  z  
internat.5 H  X  z  intro.5   t  z   ipalloc.netrange.5     z  	lastlog.5     z  link.5     z  list.5 .    z  magic.5 ./share/man/man5/fs.5                                                                                  755       0      12        15075  4424741505   7440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fs.5 1.15 89/03/27 SMI; from UCB 4.2
.TH FS 5 "22 March 1989"
.UC 4
.SH NAME
fs, inode \- format of a 4.2 (ufs) file system volume
.SH SYNOPSIS
.nf
.B #include <sys/types.h>
.B #include <ufs/fs.h>
.B #include <ufs/inode.h>
.fi
.SH DESCRIPTION
.IX  "fs file"  ""  "\fLfs\fP \(em 4.2 file system format"
.IX  "file system" "4.2 format \(em \fLfs\fP"
.LP
Standard 4.2 (ufs) file system storage volumes
have a common format for certain vital information.
Every such volume is divided into a certain number of blocks.
The block size is a parameter of the file system.
Sectors 0 to 15 contain primary
and secondary bootstrapping programs.
.LP
The actual file system begins at sector 16 with the
.IR super-block .
The layout of the super block is defined by the include file
.B ufs/fs.h
.LP
Each disk drive contains some number of file systems.
A file system consists of a number of cylinder groups.
Each cylinder group contains inodes and data.
.LP
A file system is described by its super-block, which in turn
describes the cylinder groups.  The super-block is critical
data and is replicated in each cylinder group to protect against
catastrophic loss.  This is done at file system creation
time and the critical
super-block data does not change, so the copies need not be
referenced further unless disaster strikes.
.LP
Addresses stored in inodes are capable of addressing fragments
of ``blocks.'' File system blocks of at most size
.SB MAXBSIZE
can be optionally broken into 2, 4, or 8 pieces,
each of which is addressable;
these pieces may be
.BR \s-1DEV_BSIZE ,
or some multiple of a
.SB DEV_BSIZE
unit.
.LP
Large files consist of exclusively large data blocks.  To avoid
undue wasted disk space, the last data block of a small file is
allocated as only as many fragments of a large block as are
necessary.  The file system format retains only a single pointer
to such a fragment, which is a piece of a single large block that
has been divided.  The size of such a fragment is determinable from
information in the inode, using the
.RB ` "blksize(fs, ip, lbn)" '
macro.
.LP
The file system records space availability at the fragment level;
to determine block availability, aligned fragments are examined.
.LP
The root inode is the root of the file system.
Inode 0 cannot be used for normal purposes and
historically bad blocks were linked to inode 1,
thus the root inode is 2 (inode 1 is no longer used for
this purpose, however numerous dump tapes make this
assumption, so we are stuck with it).
The
.I lost+found
directory is given the next available
inode when it is initially created by
.BR mkfs (8).
.LP
.B fs_minfree
gives the minimum acceptable percentage of file system
blocks which may be free. If the freelist drops below this level
only the super-user may continue to allocate blocks. This may
be set to 0 if no reserve of free blocks is deemed necessary,
however severe performance degradations will be observed if the
file system is run at greater than 90% full; thus the default
value of
.B fs_minfree
is 10%.
.LP
Empirically the best trade-off between block fragmentation and
overall disk utilization at a loading of 90% comes with a
fragmentation of 4, thus the default fragment size is a fourth
of the block size.
.LP
.I Cylinder group related
.IR limits :
Each cylinder keeps track of the availability of blocks at different
rotational positions, so that sequential blocks can be laid out
with minimum rotational latency.
.SB NRPOS
is the number of rotational
positions which are distinguished.  With
.SB NRPOS
8 the resolution of the
summary information is 2ms for a typical 3600 rpm drive.
.LP
.B fs_rotdelay
gives the minimum number of milliseconds to initiate
another disk transfer on the same cylinder.  It is used in
determining the rotationally optimal layout for disk blocks
within a file; the default value for
.B fs_rotdelay
is 2ms.
.LP
Each file system has a statically allocated number of inodes.
An inode is allocated for each
.SB NBPI
bytes of disk space.
The inode allocation strategy is extremely conservative.
.LP
.SB MAXIPG
bounds the number of inodes per cylinder group, and
is needed only to keep the structure simpler by having the
only a single variable size element (the free bit map).
.LP
Note:
.SB MAXIPG
must be a multiple of
.BR \s-1INOPB\s0(fs) .
.LP
.SB MINBSIZE
is the smallest allowable block size.
With a
.SB MINBSIZE
of 4096 it is possible to create files of size
2^32 with only two levels of indirection.
.SB MINBSIZE
must be big enough to hold a cylinder group block,
thus changes to
.B (struct cg)
must keep its size within
.BR \s-1INBSIZE\s0.
.SB MAXCPG
is limited only to dimension an array in
.BR "(struct cg)" ;
it can be made larger as long as that structure's size remains
within the bounds dictated by
.BR \s-1MINBSIZE\s0 .
Note: super blocks are never more than size
.BR \s-1SBSIZE\s0 .
.LP
The path name on which the file system is mounted is maintained
in
.BR fs_fsmnt .
.SB MAXMNTLEN
defines the amount of space allocated in
the super block for this name.
The limit on the amount of summary information per file system
is defined by
.BR \s-1MAXCSBUFS\s0.
It is currently parameterized for a
maximum of two million cylinders.
.LP
Per cylinder group information is summarized in blocks allocated
from the first cylinder group's data blocks.
These blocks are read in from
.B fs_csaddr
(size
.BR fs_cssize )
in addition to the super block.
.LP
Note:
sizeof
.B (struct csum)
must be a power of two in order for
the
.B fs_cs
macro to work.
.LP
.I Super block for a file
.IR system :
.SB MAXBPC
bounds the size of the rotational layout tables and
is limited by the fact that the super block is of size
.BR \s-1SBSIZE\s0 .
The size of these tables is
.B inversely
proportional to the block
size of the file system. The size of the tables is
increased when sector sizes are not powers of two,
as this increases the number of cylinders
included before the rotational pattern repeats (\c
.BR fs_cpc ).
The size of the rotational layout
tables is derived from the number of bytes remaining in
.BR "(struct fs)" .
.LP
.SB MAXBPG
bounds the number of blocks of data per cylinder group,
and is limited by the fact that cylinder groups are at most one block.
The size of the free block table
is derived from the size of blocks and the number
of remaining bytes in the cylinder group structure
.BR "(struct cg)" .
.LP
.IR inode :
The inode is the focus of all file activity in the
file system.  There is a unique inode allocated
for each active file,
each current directory, each mounted-on file,
text file, and the root.
An inode is ``named'' by its device/i-number pair.
For further information, see the include file
.BR ufs/inode.h .
.SH SEE ALSO
.BR mkfs (8)
the relocation information, then the value stored in the
file is an offset from the associated external symbol.  When the file
is processed by the link editor and the external symbol becomes
defined, the value of the symbol is added to the bytes in the file.
If a byte involves a reference to a relative location, or
relocatable segment, then the value stored in the file is an
offset from the associated segment.
.br
.ne 12
.LP
If relocation informat./share/man/man5/fspec.5                                                                               755       0      12        10731  4424741505  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fspec.5 1.11 89/03/27 SMI; from S5R3
.TH FSPEC 5 "22 March 1989"
.SH NAME
fspec \- format specification in text files
.SH DESCRIPTION
.IX fspec "" "\fLfspec\fR text file tabstop specifications"
.IX tabstops "" "tabstop specifications in text files \(em \fLfspec\fR"
.LP
It is sometimes convenient to
maintain text files on the
operating system with non-standard tab stop settings, (that is,
tab stops that are not set at every eighth column).
Such files must generally be converted
to a standard format,
frequently by replacing all
.SM TAB
characters with the appropriate number of
.SM SPACE
characters, before they can be processed by
operating system commands.
A format specification
occurring in the first line of a text file
specifies how
.SM TAB
characters are to be expanded in the remainder of the file.
.LP
A format specification consists of a sequence of parameters
separated by blanks and surrounded by the brackets
.B <:
and
.BR :> .
Each parameter consists of a keyletter,
possibly followed immediately by a value.
The following parameters are recognized:
.LP
.TP
.BI t \|tabs
The
.B t
parameter specifies
the tab stop settings for the file.
The value of
.I tabs
must be one of the following:
.RS
.TP 3
\(bu
A list of column numbers separated by commas,
indicating tab stops set at the specified columns;
.TP
\(bu
A
.RB ` \- '
followed immediately by an integer
.IR n ,
indicating tab stops set at intervals of
.I n
columns, that is, at
.RI 1+ n ,
.RI 1+2* n ,
and so on;
.TP
\(bu
A
.RB ` \- '
followed by the name of a ``canned'' tab stop specification.
.RE
.LP
Up to 40 numbers are allowed in a comma-separated list of tab stop settings.
If any number (except the first one) is preceded by a plus sign, it is taken
as an increment to be added to the previous value.
Thus, the formats
.B "t1, 10, 20, 30"
and
.B "t1, 10, +10, +10"
are considered identical.
.LP
Standard tab stops are specified by
.BR t\-8 ,
or equivalently,
.BR "t1, 9, 17, 25, " etc.
This is the tab stop setting that most operating system utilities assume, and
is the most likely setting to be found at a terminal.
The specification
.B t\-0
specifies no tab stops at all.
.LP
The ``canned'' tab stops specifications that are recognized are as follows:
.RS
.TP 10
.B a
1, 10, 16, 36, 72
.br
Assembler,
.SM IBM
S/370, first format
.TP
.B a2
1, 10, 16, 40, 72
.br
Assembler,
.SM IBM
S/370, second format
.TP
.B c
1, 8, 12, 16, 20, 55
.br
.SM COBOL\s0,
normal format
.TP
.B c2
1, 6, 10, 14, 49
.br
.SM COBOL\s0
compact format (columns 1-6 omitted).
Using this code, the first typed
character corresponds to card column 7,
one space gets you to column 8, and a
.SM TAB
reaches column 12.  Files using this tab stop
setup should include a format specification
as follows:
.RS
.RS
.B "<:t\-c2 \|m6 \|s66 \|d:>"
.RE
.RE
.TP
.B c3
1, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 67
.br
.SM COBOL\s0
compact format (columns 1-6 omitted), with more tab stops than
.BR c2 .
This is the recommended format for
.SM COBOL\s0.
The appropriate format specification is:
.RS
.RS
.B "<:t\-c3 \|m6 \|s66 \|d:>"
.RE
.RE
.TP
.B f
1, 7, 11, 15, 19, 23
.br
.SM FORTRAN
.TP
.B p
1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61
.br
.SM PL/I
.TP
.B s
1, 10, 55
.br
.SM SNOBOL
.TP
.B u
1, 12, 20, 44
.br
.SM UNIVAC
1100
Assembler
.RE
.TP
.BI s \|size
The
.B s
parameter specifies a maximum line size.
The value of
.B size
must be an integer.
Size checking is performed after
.SM TAB
characters have been expanded,
but before the margin is prepended.
.TP
.BI m \|margin
The
.B m
parameter specifies a number of
.SM SPACE
characters to be prepended to each line.
The value of
.I margin
must be an integer.
.TP
.B d
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.
.TP
.B e
The
.B e
parameter takes no value.
Its presence indicates that the current format is to prevail
only until another format specification
is encountered in the file.
.LP
Default values, which are assumed for parameters not supplied,
are
.B t\-8
and
.BR m0 .
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:
.LP
.RS
.B \(** <:t5,10,15 s72:> \(**
.RE
.LP
If a format specification can be disguised as a comment,
it is not necessary to code the
.B d
parameter.
.SH SEE ALSO
.BR ed (1),
.BR tabs (1)
lution of the
summary information is 2m./share/man/man5/fstab.5                                                                               755       0      12        13031  4424741506  10116                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fstab.5 1.25 89/03/27 SMI;
.TH FSTAB 5 "25 March 1989"
.SH NAME
fstab, mtab \- static filesystem mounting table, mounted filesystems table
.SH SYNOPSIS
.B /etc/fstab
.LP
.B /etc/mtab
.SH DESCRIPTION
.IX  "fstab file"  ""  "\fLfstab\fP \(em file mountable information"
.IX  "file system"  "fstab file"  ""  "\fLfstab\fP \(em static information"
.IX  "static file system information mntent"  ""  "static file system information \(em \fLfstab\fP"
.IX  "mtab file"  ""  "\fLmtab\fP \(em mounted file system table"
.IX  "mounted file system table"  ""  "mounted file system table \(em \fLmtab\fP"
.IX  "file system"  "mounted table"  ""  "mounted table \(em \fLmtab\fP"
.LP
The
.B /etc/fstab
file contains entries for filesystems and disk partitions to mount
using the
.BR mount (8)
command, which is normally invoked by the
.B rc.boot
script at boot time.  This file is used by various utilities that
mount, unmount, check the consistency of, dump, and restore file
systems.  It is also used by the system itself when locating
the swap partition.
.LP
The
.B /etc/mtab
file contains entries for filesystems
.I currently
mounted, and is read by programs using the routines described in
.BR getmntent (3).
.B umount
(see
.BR mount (8))
removes entries from this file.
.LP
Each entry consists of a line of the form:
.IP
.I
filesystem\ \ \ directory\ \ \ type\ \ \ options\ \ \ freq\ \ \ pass
.LP
.TP 10
.I filesystem
is the pathname of a block-special device, the name of a remote
filesystem in
.IB host : pathname
form, or the name of a \(swap file\(rq made with
.BR mkfile (8).
.TP
.I directory
is the pathname of the directory on which to mount the filesystem.
.TP
.I type
is the filesystem type, which can be one of:
.RS
.RS
.PD 0
.TP 8
.B 4.2
to mount a block-special device
.TP
.B nfs
to mount an exported
.SM NFS
filesystem
.TP
.B swap
to indicate a swap partition
.TP
.B ignore
to have the
.B mount
command ignore the current entry (good
for noting disk partitions that are not being used)
.TP
.B lo
loopback file system (See
.BR lofs (4S)).
.TP
.B vm
filesystem in virtual memory
.PD
.RE
.RE
.TP
.I options
contains a comma-separated list (no spaces) of mounting options,
some of which can be applied to all types of filesystems, and
others which only apply to specific types.
.RS
.LP
.B 4.2
options:
.RS
.TP 8
.BR quota \||\| noquota
Disk quotas are enforced or not enforced.
.RE
.LP
.B nfs
options:
.RS
.PD 0
.TP 14
.BR bg \||\| fg
If the first attempt fails, retry in the background, or,
in the foreground.
.TP 8
.BR quota \||\| noquota
disk quotas are enforced or not enforced.
.TP
.BI retry= n
The number of times to retry the mount operation.
.TP
.BI rsize= n
Set the read buffer size to
.I n
bytes.
.TP
.BI wsize= n
Set the write buffer size to
.I n
bytes.
.TP
.BI timeo= n
Set the
.SM NFS
timeout to
.I n
tenths of a second.
.TP
.BI retrans= n
The number of
.SM NFS
retransmissions.
.TP
.BI port= n
The server
.SM IP
port number.
.TP
.BR soft \||\| hard
Return an error if the server does not
respond, or continue the
retry request until the server responds.
.TP
.B intr
Allow keyboard interrupts on hard mounts.
.TP
.B secure
Use a more secure protocol for
.SM NFS
transactions.
.TP
.BI acregmin= n
Hold cached attributes for at least
.I n
seconds after file modification.
.TP
.BI acregmax= n
Hold cached attributes for no more than
.I n
seconds after file modification.
.TP
.BI acdirmin= n
Hold cached attributes for at least
.I n
seconds after directory update.
.TP
.BI acdirmax= n
Hold cached attributes for no more than
.I n
seconds after directory update.
.TP
.BI actimeo= n
Set
.I min
and
.I max
times for regular files and directories to
.I n
seconds.
.TP
.B noac
Suppress attribute caching.
.PD
.RE
.LP
Common options:
.RS
.TP 8
.BR ro \||\| rw
mount either read-only or read-write
.PD 0
.TP
.BR suid \||\| nosuid
setuid execution allowed or disallowed
.TP
.B grpid
Create files with
.SM BSD
semantics for propagation of the group
.SM ID\s0.
With this option, files inherit the group
.SM ID
of the directory in
which they are created, regardless of the directory's setgid bit.
.TP
.B noauto
Do not mount this file system automatically (using
.BR "mount \-a" ).
.PD
.RE
.RE
.TP
.I freq
is the interval (in days) between dumps.
.TP
.I pass
is the
.BR fsck (8)
pass in which to check the partition.
Filesystems with
.I pass
0 are not checked.
Filesystems with the pass 1 are checked sequentially.  In
general, the root filesystem should be checked in pass 1, with
others checked in higher (later) passes.
For passes higher than 1, multiple filesystems in the same pass
are checked simultaneously.
.LP
A pound-sign
.RB ( # )
as the first character indicates a comment line which
is ignored by routines that read this file.
The order of records in
.B /etc/fstab
is important because
.BR fsck ,
.BR mount ,
and
.B umount
process the file sequentially; an entry for a file system must appear
.I after
the entry for any file system it is to be mounted
on
top of.
.SH EXAMPLES
In this example, the
.B /home/user
directory is hard mounted read-write over the
.SM NFS\s0,
along with  additional swap space in the form of a mounted swap file
(see
.TX ADMIN
for details on adding swap space):
.RS
.ft B
.nf
/dev/xy0a / 4.2 rw,noquota 1 1
/dev/xy0g /usr 4.2 rw,noquota 1 2
/dev/xy0h /var 4.2 rw,noquota 1 3
/dev/xy1g /misc 4.2 rw,noquota 1 3
example:/home/user /home/user nfs rw,hard,fg 0 0
/export/swap/myswap swap swap rw 0 0
.fi
.ft R
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/fstab
.TP
.B /etc/mtab
.PD
.SH SEE ALSO
.BR swapon (2),
.BR getmntent (3),
.BR fsck (8),
.BR mkfile (8),
.BR mount (8),
.BR quotacheck (8),
.BR quotaon (8),
.BR swapon (8)
 of size
.BR \s-1SBSIZE\s0 .
The size of these tables is
.B inversely
proportional to the block
size of the file system. The size of the tables is
increased when sector sizes are not powers of two,
as this increases the number of cylinders
included before the rotational pattern repeats (\c
.BR fs_cpc ).
The size of the rotational layout
tables is derived from the number of bytes remaining in
.BR "(struct fs)" .
.LP
.SB MAXBPG
bounds the number of blocks of data per cylinder group,
a./share/man/man5/ftpusers.5                                                                            755       0      12         1176  4424741506  10661                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ftpusers.5 1.10 89/03/27 SMI;
.TH FTPUSERS 5 "25 March 1989"
.SH NAME
ftpusers \- list of users prohibited by FTP
.SH SYNOPSIS
.B /etc/ftpusers
.SH DESCRIPTION
.IX  "ftpusers file"  ""  "\fLftpusers\fP \(em ftp prohibited users list"
.LP
.B ftpusers
contains a list of users who cannot access this system using the
File Transfer Protocol (\s-1FTP\s0).
.B ftpusers
contains one user name per line.
.LP
If this file is missing, the list of users is considered to be empty, so that
any user may use
.SM FTP
to access the system if the other criteria for access are met (see
.BR ftpd (8C).)
.SH "SEE ALSO"
.BR ftp (1C),
.BR ftpd (8C)
.5  l  |  z  plot.5 l    z  
policies.5     z  
printcap.5     z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5     z  rasterfile.5  z    z  remote.5    4  z  
resolv.conf.5 z  D  z  rgb.5 z  X  z  rhosts.5  X  l  z  
rootmenu.5 l  |  z  rpc.5  l    z  
sccsfile.5     z  
services.5   ./share/man/man5/gettytab.5                                                                            755       0      12        16601  4424741506  10650                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)gettytab.5 1.21 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETTYTAB 5 "19 October 1987"
.SH NAME
gettytab \- terminal configuration data base
.SH SYNOPSIS
.B /etc/gettytab
.SH DESCRIPTION
.IX  "gettytab file"  ""  "\fLgettytab\fP \(em terminal configuration data base"
.IX  terminal  "configuration data base"  ""  "configuration data base \(em \fLgettytab\fP"
.LP
.B gettytab
is a simplified version of the
.BR termcap (5)
data base used to describe terminal lines.
The initial terminal login process
.BR getty (8)
accesses the
.B gettytab
file each time it starts, allowing simpler
reconfiguration of terminal characteristics.
Each entry in the data base is used to describe one
class of terminals.
.LP
There is a default terminal class,
.BR default ,
that is used to set global defaults for
all other classes.  (That is, the
.B default
entry is read, then the entry for the class
required is used to override particular settings.)
.SH CAPABILITIES
Refer to
.BR termcap (5)
for a description of the file layout.  The
.I Default
column below lists defaults obtained if there is
no entry in the table obtained, nor one in the special
default table.
.LP
.TS
c c l l
cfB l l l.
\fIName	Type	Default	Description\fP
.sp .5
ab	bool	false	read a \er first and guess the baud rate from it
ap	bool	false	terminal uses 7 bits, any parity
bd	num	0	backspace delay
bk	str	0377	alternate end of line character (input break)
cb	bool	false	use crt backspace mode
cd	num	0	carriage-return delay
ce	bool	false	use crt erase algorithm
ck	bool	false	use crt kill algorithm
cl	str	\s-1NULL\s0	screen clear sequence
co	bool	false	console - add \\n after login prompt
dx	bool	false	set \s-1DECCTLQ\s0
ds	str	^Y	delayed suspend character
ec	bool	false	leave echo \s-1OFF\s0
ep	bool	false	terminal uses 7 bits, even parity
er	str	^?	erase character
et	str	^D	end of text (\s-1EOF\s0) character
ev	str	\s-1NULL\s0	initial environment
f0	num	unused	tty mode flags to write messages
f1	num	unused	tty mode flags to read login name
f2	num	unused	tty mode flags to leave terminal as
fd	num	0	form-feed (vertical motion) delay
fl	str	^O	output flush character
hc	bool	false	do \s-1NOT\s0 hangup line on last close
he	str	\s-1NULL\s0	hostname editing string
hn	str	hostname	hostname
ht	bool	false	terminal has real tabs
ig	bool	false	ignore garbage characters in login name
im	str	\s-1NULL\s0	initial (banner) message
in	str	^C	interrupt character
is	num	unused	input speed
kl	str	^U	kill character
lc	bool	false	terminal has lower case
lm	str	login:	login prompt
ln	str	^V	``literal next'' character
lo	str	/usr/bin/login	program to exec when name obtained
nd	num	0	newline (line-feed) delay
nl	bool	false	terminal has (or might have) a newline character
nx	str	default	next table (for auto speed selection)
op	bool	false	terminal uses 7 bits, odd parity
os	num	unused	output speed
p8	bool	false	terminal uses 8 bits, no parity
pc	str	\\0	pad character
pe	bool	false	use printer (hard copy) erase algorithm
pf	num	0	delay between first prompt and following flush (seconds)
ps	bool	false	line connected to a \s-1MICOM\s0 port selector
qu	str	^\\	quit character
rp	str	^R	line retype character
rw	bool	false	do \s-1NOT\s0 use \s-1RAW\s0 for input, use \s-1CBREAK\s0
sp	num	0	line speed (input and output)
su	str	^Z	suspend character
tc	str	none	table continuation
td	num	0	tab delay
to	num	0	timeout (seconds)
tt	str	\s-1NULL\s0	terminal type (for enviroment)
ub	bool	false	do unbuffered output (of prompts etc)
uc	bool	false	terminal is known upper case only
we	str	^W	word erase character
xc	bool	false	do \s-1NOT\s0 echo control chars as ^X
xf	str	^S	\s-1XOFF\s0 (stop output) character
xn	str	^Q	\s-1XON\s0 (start output) character
.TE
.LP
If no line speed is specified, speed will not be altered from that
which prevails when
.B getty
is entered.  Specifying an input or output
speed overrides line speed for stated direction only. If
.B ab
is specified,
.B getty
will initially read a character from the tty, assumed to be a carriage
return, and will attempt to figure out the baud rate based on what the
character appears as.  It will then look for a table entry for that baud
rate; if the line appears to be a 300 baud line, it will look for an entry
.BR 300-baud ,
if it appears to be a 1200 baud line, it will look for an entry
.BR 1200-baud ,
etc.\|.
.LP
Terminal modes to be used for the output of the message, for input of
the login name, and to leave the terminal set as upon completion, are
derived from the Boolean flags specified.  If the derivation should
prove inadequate, any (or all) of these three may be overridden with one
of the
.BR f0 ,
.BR f1 ", or"
.B f2
numeric specifications, which can be used to specify (usually in octal,
with a leading `0') the exact values of the flags.  Local (new tty)
flags are set in the top 16 bits of this (32 bit) value.
.LP
Should
.B getty
receive a
.SM NULL
character (presumed to indicate a line break) it will
restart using the table indicated by the
.B nx
entry. If there is none, it will re-use its original table.
.LP
Delays are specified in milliseconds, the nearest possible delay
available in the tty driver will be used.
Should greater certainty be desired, delays with
values 0, 1, 2, and 3 are interpreted as choosing
that particular delay algorithm from the driver.
.LP
The
.B cl
screen clear string may be preceded by a (decimal) number of
milliseconds of delay required
(as with 
.BR termcap (5)).
This delay is simulated
by repeated use of the pad character
.BR pc .
.LP
The initial message, and login message,
.B im
and
.B lm
may include the character sequence
.B %h
or
.B %t
to obtain the hostname or tty name respectively.
.RB ( %%
obtains a single
.RB ` % '
character.) The hostname is normally
obtained from the system, but may be set by the
.B hn
table entry.  In either case it may be edited with
.BR he .
The
.B he
string is a sequence of characters, each character that is neither
.RB ` @ '
nor
.RB ` # '
is copied into the final hostname.  A
.RB ` @ '
in the
.B he
string, copies one character from the real
hostname to the final hostname.  A
.RB ` # '
in the
.B he
string, skips the next character of the real hostname.
Surplus
.RB ` @ '
and
.RB ` # '
characters are ignored.
.LP
When
.B getty
execs the login process, given in the
.B lo
string (usually
.BR /usr/bin/login ),
it will have set the enviroment to
include the terminal type, as indicated by the
.B tt
string (if it exists).  The
.B ev
string, can be used to enter additional data into the environment.  It
is a list of comma separated strings, each of which will presumably be
of the form
.IR name=value .
.LP
If a non-zero timeout is specified, with
.BR to ,
then
.B getty
will exit within the indicated number of seconds, either
having received a login name and passed control to
.IR login ,
or having received an alarm signal, and exited.  This may be useful to
hangup dial in lines.
.LP
Output from
.B getty
is even parity unless
.B op
or
.B p8
is specified.
.B op
may be specified with
.B ap
to allow any parity on input, but generate odd parity output.  Note:
this only applies while
.B getty
is being run, terminal driver limitations
prevent a more complete implementation.
.B getty
does not check parity of input characters in
.SM RAW
mode.
.SH FILES
.PD 0
.TP 20
.B /etc/gettytab
.PD
.SH "SEE ALSO"
.BR termcap (5),
.BR getty (8)
t include value of sym referenced */
	r_baserel:1,	/* linkage table relative */
	r_jmptable:1,	/* pc-relative to jump table */
./share/man/man5/group.5                                                                               755       0      12         7124  4424741506  10141                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)group.5 1.25 89/03/27 SMI; from UCB 4.2
.TH GROUP 5 "22 March 1989"
.SH NAME
group \- group file
.SH SYNOPSIS
.B /etc/group
.SH DESCRIPTION
.IX  "group file"  ""  "\fLgroup\fP \(em group file format"
.LP
The
.B group
file contains a one-line entry for
each group recognized by the system,
of the form:
.IP
.IB groupname : password :\c
.IB gid : user-list
.LP
where:
.TP 15
.I "groupname"
is the name of the group.
.\" .TP
.\" .I "password"
.\" is the encrypted group password, or the string
.\" .BI  #$ groupname
.\" if the encrypted password is to be found in the
.\" .B /etc/security/group.adjunct
.\" file (see
.\" .BR group.adjunct (5)).
.TP
.I "gid"
is the group's numerical
.SM ID
within the system; it must be unique.
.TP
.I "user-list"
is a comma-separated list of users allowed in the group.
.LP
If the password field is empty, no password is demanded.
The
.B group
file is an
.SM ASCII
file.  Because of the encrypted passwords, the
.B group
file can and does have general read permission,
and can be used as a mapping of numerical group
.SM ID\s0s
to user names.
.LP
A group entry beginning with a
.RB ` + '
(plus sign), means to incorporate an entry
or entries from the Yellow Pages.  A
.RB ` + '
on a line by itself means to insert the entire contents
of the Yellow Pages group file at that point in the file.  An
entry of the form:
.RB ` + \fIgroupname\fR'
means to insert the entry (if any) for
.BR groupname .
If a
.RB ` + '
entry has a non-empty
.I password
or
.I user-list
field, the contents of that field override
the corresponding field from the Yellow Pages.
The
.I gid
field cannot be overridden in this way.
.LP
An entry of the form:
.BI \- groupname
indicates that the group is disallowed.
All subsequent entries for the indicated
.IR groupname ,
whether originating from the Yellow Pages, or the local
.B group
file, are ignored.
.LP
Malformed entries cause routines that
read this file to halt, in which case group
assignments specified further along are never
made.  To prevent this from happening, use
.BR grpck (8)
to check the
.B /etc/group
database from time to time.
.LP
The Sun386i system uses the following group IDs as program 
privileges:
.LP
.TS
lb r l .
operator	5	Privilege to do backup as root.
accounts	11	Privilege to update user accounts.
networks	12	Privilege to change network configuration.
devices	13	Privilege to modify printer, terminal, or modem configurations.
.TE
.LP
On all Sun systems, SunOS uses group ID 0 as privilege
to run 
.BR su (1).
.SH EXAMPLE
.LP
Here is a sample group file when the
.B group.adjunct
file does not exist:
.RS
.LP
.ft B
.nf
primary:q.mJzTnu8icF.:10:fred,mary
+myproject:::bill,steve
+:
.fi
.ft R
.LP
.RE
Here is a sample group file when the
.B group.adjunct
file does exist:
.LP
.RS
.ft B
.nf
primary:#$primary:10:fred,mary
+myproject:::bill,steve
+:
.fi
.ft R
.LP
.RE
If these entries appear at the end of
a group file, then the group
.I primary
will have members
.B fred
and
.BR mary ,
and a group
.SM ID
of
.BR 10 .
The group
.I myproject
will have members
.B bill
and
.BR steve ,
and the password and group
.SM ID
of the Yellow Pages entry for the group
.BR myproject .
All groups listed in the Yellow Pages
are pulled in and placed after the entry for
.BR myproject .
.SH FILES
.PD 0
.TP 20
.B /etc/group
.\" .TP
.\" .BI /var/yp/ domainname /group.byname
.\" .TP
.\" .BI /var/yp/ domainname /group.bygid
.\" .TP
.\" .B /etc/security/group.adjunct
.PD
.SH "SEE ALSO"
.BR passwd (1),
.BR su (1),
.BR getgroups (2),
.BR initgroups (3),
.BR crypt (3),
.BR group.adjunct (5),
.BR passwd (5),
.BR grpck (8)
.SH BUGS
.LP
The
.BR passwd (1)
command will not change group passwords.
ts etc)
uc	bool	false	terminal is known upper case only
we	str	^W	word erase character
xc	bool	false	do \s-1NOT\s0 echo control chars as ^X
xf	str	^S	\s-1XOFF\s0 (stop output) character
xn	str	^Q	\s-1XON\s0 (start output) character
.TE
.LP
If no line speed is specified, speed will not be altered from that
which prevails when
.B getty
is entered.  Specifying an input or output
speed overrides line speed for stated direction o./share/man/man5/group.adjunct.5                                                                       755       0      12         3461  4424741506  11570                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)group.adjunct.5 1.8 89/03/27 SMI
.TH GROUP.ADJUNCT 5 "22 March 1989"
.SH NAME
group.adjunct \- group security data file
.SH SYNOPSIS
.B /etc/security/group.adjunct
.SH DESCRIPTION
.IX  "group.adjunct file"  ""  "\fLgroup.adjunct\fP \(em password file"
.LP
The
.B group.adjunct
file contains the following information for each group:
.IP
.IB groupname : password
.TP 20
.I groupname
The group's name in the system; it must be unique.
.TP
.I password
The encrypted password, formerly field two of the
.B /etc/group
file.
.LP
The
.B group.adjunct
file is in
.SM ASCII\s0.
Fields are separated by a colon,
and each group is separated from the next by a
.SM NEWLINE\s0.
.LP
A
.B group.adjunct
file can have a line beginning with a
.RB ` + '
(plus sign), which means to incorporate
entries from the Yellow Pages.
There are two styles of
.RB ` + '
entries: all by itself,
.RB ` + '
means to insert the entire contents of the
.B group.adjunct
Yellow Pages file at that point;
.BI + name
means to insert the entry (if any) for
.I name
from the Yellow Pages at that point.  If a
.RB ` + '
entry has a non-\s-1NULL\s0
password, the contents of that field will override
what is contained in the Yellow Pages.
.\" .SH EXAMPLE
.\" .LP
.\" Here is a sample
.\" .B /etc/security/group.adjunct
.\" file:
.\" .RS
.\" .LP
.\" .ft B
.\" .nf
.\" primary:q.mJzTnu8icF.
.\" tuttles:7\s-1KCFRPNVX\s0gfrw
.\" phish:7\s-1HU\s08\s-1RPNVX\s0ga9o
.\" reew:
.\" +:
.\" .fi
.\" .ft R
.\" .LP
.\" .RE
.\" The group security data file resides in the
.\" .B /etc/security
.\" directory.
.\" Because of the encrypted passwords,
.\" it does not have general read permission.
.SH FILES
.PD 0
.TP 20
.\" .B /etc/security/group.adjunct
.\" .TP
.B /etc/group
.\" .TP
.\" .B /etc/security
.PD
.SH "SEE ALSO"
.BR crypt (3),
.BR getgraent (3),
.BR getgrent (3),
.BR group (5)
oup
file, are ignored.
.LP
Malformed entries cause routines that
read this file to halt, in which case group
assignments specified further along are never
made.  To prevent this from happening, use
.BR grpck./share/man/man5/help.5                                                                                755       0      12         5306  4424741506   7735                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)help.5	1.8 89/03/27 SMI;
.TH HELP 5 "22 March 1989"
.SH NAME
help \- help file format
.SH SYNOPSIS
.B /usr/lib/help/*
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "help datafile"  ""  "\fLhelp\fP \(em get help"
.IX " datafile"  "help datafile"  ""  "\fLhelp\fP \(em get help"
Each SunView application using the 
.B help
feature has a simple
.SM ASCII
file in
.B /usr/lib/help
with the name
.IB application-name .info .
.LP
This file contains the text of help messages for each SunView object
within that program. Each help message is separated in the file by a line
beginning with a colon and identified by a keyword
which matches the
.SM HELP_DATA
attribute of the SunView object.
.LP
The first character of each line in the file may be:
.sp
	#			comment line
.br
	:			keyword line
.br
	any other		1-32 help text lines
.sp
If the line is a keyword line, it has the following structure\(em
.sp
	:keyword[s]:datastring [pagenumber]\s-1NEWLINE\s0
.sp
.nf
\fIkeyword\fP			is a 1-65 character keyword 
.br
				--any displayable characters may be used
.br
				--several keywords may be present
.br
				--keywords are separated by 1-or-more blanks
.sp
\fIdatastring\fP		is 1-256 \s-1ASCII\s0 bytes, and describes the path of the data files for 
.br
			help_viewer, relative to /usr/lib/help.
.sp
\fIpagenumber\fP		is an optional page number within the help_viewer data file.

.fi
.LP
The help text which follows the :keyword line will be displayed in
an Alert Box when help is requested for one of the keywords by pressing
the help key.
.sp
The datastring will be sent (by
.SM RPC\s0)
to the
.B help_viewer
procedure when the user selects the More Help box in the Alert Box window.
.SH EXAMPLE
Here is part of a typical help file, called
.BR mailtool.info .
.LP
.nf
.ft B
:abort
   Abort button

o  Quits the Mail application (click 
   left on button). Tentative message
   deletions do not become permanent.

o  Provides a menu of Abort options
   (click right on button).

:cancel:mailtool/Writing_and_Sending_Mail 1
   Cancel button

o  Closes the message composition 
   window without sending message
   (click left on button).

o  Provides a menu of Cancel options
   (click right on button).
.fi
.ft
.LP
Pressing the help key while in the cancel or abort buttons triggers 
the display of the corresponding text. The words 
.I cancel
and
.I abort
in this file are the keywords. In the case of abort, there is no
More Help available. For cancel, More Help is available and it is stored in
the first page of the
.B Writing_and_Sending_Mail
file in the mailtool directory.
.SH FILES
.LP
.TP 20
.B /usr/lib/help/*
files for the pop-up help facility
.SH SEE ALSO
.BR help_viewer (1),
.BR help_viewer (5)
.LP
\fISun386i Developer's Guide\fP
xist:
.LP
.RS
.ft B
.nf
primary:#$primary:10:fred,mary
+myproject:::bill,steve
+:
.fi
.ft R
.LP
.RE
If these entries appear at the end of
a group file, then the group
.I primary
will have members
.B fred
and
.BR mary ,
and a group
.SM ID
of
.BR 10 .
The group
.I myproject
will have members
.B bill
and
.BR steve ,./share/man/man5/help_viewer.5                                                                         755       0      12         2422  4424741507  11313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)help_viewer.5	1.7 89/03/27 SMI;
.TH HELP_VIEWER 5 "19 February 1988"
.SH NAME
help_viewer \- help viewer file format
.SH SYNOPSIS
.B /usr/lib/help/*/*
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "help datafile"  ""  "\fLhelp\fP \(em get help"
.IX " datafile"  "help datafile"  ""  "\fLhelp\fP \(em get help"
The
.B help_viewer
reads files of various types.
The Top Level list of applications documented is
.BR /usr/lib/help/Top_Level .
The Master Index shown at the top level is
.BR /usr/lib/help/Master_Index .
These files are FrameMaker files. To add or remove a heading from this list,
use FrameMaker (1.1 or later).
.LP
Each directory within
.B /usr/lib/help
that corresponds to a SunView 
application name contains detailed information about
that application. These are also FrameMaker files.
The
.B *.rf
files are rasterfiles, of standard image format created by FrameMaker.
These are the pictures that are interleaved into the text.
.LP
The
.B Frame/
subdirectory of
.B /usr/lib/help
contains topic, contents, and
index templates which can be used to create new Help Viewer handbooks.
The
.B Interleaf/
subdirectory
contains Interleaf templates, fonts, and initialization files.
.SH FILES
.LP
.TP 20
.B /usr/lib/help/*/*
.SH SEE ALSO
.BR help (5),
.BR help_viewer (1)
 	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5 5  @  {   
uuencode.5 @  P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5      {  xtab.5 i     {  	ypfiles.5  f the keywords by pressi./share/man/man5/hosts.5                                                                               755       0      12         2641  4424741507  10145                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hosts.5 1.12 89/03/27 SMI; from UCB 4.2
.TH HOSTS 5  "22 March 1989"
.SH NAME
hosts \- host name data base
.SH SYNOPSIS
.B /etc/hosts
.SH DESCRIPTION
.IX  "hosts file"  ""  "\fLhosts\fP \(em host name data base"
.LP
The
.B hosts
file contains information regarding the known hosts on the
.SM DARPA
Internet.  For each host a single line should be present
with the following information:
.IP
.I Internet-address	official-host-name	aliases
.LP
Items are separated by any number of blanks and/or
.SM TAB
characters.  A
.RB ` # '
indicates the beginning of a comment;
characters up to the end of the line are not
interpreted by routines which search the file.  This
file is normally created from the official
host data base maintained at the Network Information
Control Center (\s-1NIC\s0), though local changes may
be required to bring it up to date
regarding unofficial aliases and/or unknown hosts.
.LP
Network addresses are specified in the conventional
.RB ` . '
notation using the
.B inet_addr (\|)
routine from the Internet address manipulation library,
.BR inet (3N).
Host names may contain any printable
character other than a field
delimiter,
.SM NEWLINE\s0,
or comment character.
.SH EXAMPLE
.LP
Here is a typical line from the
.B /etc/hosts
file:
.RS
.nf
.ft B
192.9.1.20        gaia                        # John Smith
.fi
.ft R
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
.PD
.SH "SEE ALSO"
.BR gethostent (3N),
.BR inet (3N)
   {  xtab.5      {  	ypfiles.5 ab.5 i     {  	ypfiles.5  f the keywords by pressi./share/man/man5/hosts.equiv.5                                                                         755       0      12         7141  4424741507  11275                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hosts.equiv.5 1.16 89/03/27 SMI; from UCB 4.2
.TH HOSTS.EQUIV 5 "19 October 1987"
.SH NAME
hosts.equiv, rhosts \- trusted hosts by system and by user
.SH DESCRIPTION
.IX  "hosts.equiv file"  ""  "\fLhosts.equiv\fP \(em trusted hosts list"
.IX  "trusted hosts list"  ""  "trusted hosts list \(em \fLhosts.equiv\fP"
.LP
The 
.B /etc/hosts.equiv
file contains a list of trusted hosts.
When an
.BR rlogin (1C)
or
.BR rsh (1C)
request is received from a host listed in this file,
and when the user making the request is listed in the
.B /etc/passwd
file, then the remote login is allowed with no further checking.
In this case,
.B rlogin
does not prompt for a password, and commands submitted through
.BR rsh
are executed.
Thus, a remote user with a local user ID is said to have ``equivalent''
access from a remote host named in this file.
.LP
The format of the
.B hosts.equiv
file consists of a one-line entry for each host, of the form:
.IP
.IR hostname " [" username "] "
.LP
The
.I hostname
field normally contains the name of a trusted host from which a remote
login can be made.  However, an entry consisting of a single
.RB ` + '
indicates that all known hosts are to be trusted.
A hostname must be the ``official'' name as listed in the 
.BR hosts (5)
database.  This is the first name given in the hosts database entry;
hostname aliases are not recognized.  Remote login access can also be
given or denied for all hosts within a specific network group.  An entry
of the form:
.IP
.BI +@ group
.LP
means that all hosts in the named network group
are trusted.  An entry of the form:
.IP
.BI \-@ group
.LP
means that all hosts in the group
are not trusted; remote login access is denied to hosts
in that group, except when an entry for a specific host appears ahead
of the ``minus'' group entry.
.LP
The 
.I username
field can be used to specify a user who is
allowed to log in under any valid user ID.  Careful thought about
security should be given before providing this privilege to a user.
You can also specify a network group in the 
.I username
field with an entry of the form:
.IP
.BI +@ group1
.BI +@ group2
.LP
in which case any user in
.I group2
logging in from a host in
.I group1
may log in as anyone.  Again, security is an important consideration
here.
.SS The User's .rhosts File
.LP
Whenever a remote login is attempted, the remote login daemon
checks for a
.B .rhosts
file in the home directory of the user attempting to log in.  A user's
.BR .rhosts
file has the same format as the
.BR hosts.equiv 
file, and is used to give or deny access only for the
.I specific user
attempting to log in from a given host.
While an entry in the
.B hosts.equiv
file allows remote login access to
.I any
user from the indicated host, an entry in a user's
.B .rhosts
file only allows access from a named host to the user in
whose home directory the
.B .rhosts
file appears.  (When this file is used, permissions in the user's home
directory should allow read and search access by anyone, so it may be
located and read.)  When a user attempts a remote login, his
.B .rhosts
file is, in effect, prepended to the
.B hosts.equiv
file for permission checking.  Thus, if a host is specified in the
user's
.B .rhosts
file, login access is allowed, even if it would otherwise be
excluded by a minus group entry in
.BR /etc/hosts.equiv .
.SS The Root .rhosts File
.LP
When the user attempting a remote login is 
.BR root ,
only the
.B /.rhosts
file is checked, not 
.BR /etc/hosts.equiv .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.TP
.B /etc/passwd
.TP
.B ~/.rhosts
.TP
.B /etc
.PD
.SH "SEE ALSO"
.BR rlogin (1C),
.BR rsh (1C),
.BR hosts (5),
.BR netgroup (5),
.BR passwd (5)
ol	false	terminal is known upper case only
we	str	^W	word erase character
xc	bool	false	do \s-1NOT\s0 echo control chars as ^X
xf	str	^S	\s-1XOFF\s0 (stop output) character
xn	str	^Q	\s-1XON\s0 (start output) character
.TE
.LP
If no line speed is specified, speed will not be altered from that
which prevails when
.B getty
is entered.  Specifying an input or output
speed overrides line speed for stated direction o./share/man/man5/indent.pro.5                                                                          755       0      12         1520  4424741507  11060                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)indent.pro.5 1.4 89/03/27 SMI;
.TH INDENT.PRO 5 "16 February 1988"
.SH NAME
\&indent.pro \- default options for indent
.SH DESCRIPTION
.IX  indent  ""  "\&\fL\&.indent.pro\fP \(em default options database"
The
.B \&.indent.pro
file in either the current or home directory contains default command
line options for the
.BR indent (1)
program.
It is a text file that contains space-seperated command line options.
For a description of these options, see
.BR indent (1).
.LP
Explicit command line options override options taken from
.BR .indent.pro .
.LP
Here is a sample
.B .indent.pro
file:
.IP
.ft B
\-bap \-nbad \-nbbb \-bc \-br \-cdb \-nce
.br
\-fc1 \-ip \-lp \-npcs \-psl \-sc \-nsob \-cli0
.br
\-di12 \-l79 \-i4  \-d0 \-c33
.in
.ft R
.SH FILES
.TP
.B \&./.indent.pro
.PD 0
.br
.TP
.B ~/.indent.pro
.PD
.SH "SEE ALSO"
.LP
.BR indent (1)
    z  sm.bak.5 m.5    z  
sm.state.5 5    z  state.5      z  	statmon.5 at    z  	sunview.5 n.  ,  z  
syslog.conf.5   <  z  tar.5 .c  L  z  ./share/man/man5/inetd.conf.5                                                                          755       0      12         6275  4424741507  11043                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)inetd.conf.5 1.21 89/03/27 SMI; from UCB 4.3 BSD 6.4
.\"
.TH INETD.CONF 5 "19 October 1987"
.SH NAME
inetd.conf \- Internet servers database
.SH DESCRIPTION
.IX  "inetd.conf file"  ""  "\fLinetd.conf\fP \(em Internet server database"
.IX  "internet servers"  ""  "Internet servers database \(em \fLservers\fP"
.LP
The
.B inetd.conf
file contains the list of servers that
.BR inetd (8C)
invokes when it receives an Internet
request over a socket.  Each server entry is
composed of a single line of the form:
.IP
.I
service-name\ \ \ socket-type\ \ \ protocol\ \ \ wait-status\ \ \ uid\ \ \ server-program\ \ \ server-arguments
.LP
Fields can be separated by either spaces or
.SM TAB
characters. A
.RB ` # '
(pound-sign) indicates the beginning of a
comment; characters up to the end of the
line are not interpreted by routines that
search this file.
.TP 20
.I service-name
is the name of a valid service listed in the file
.BR /etc/services .
For
.SM RPC
services, the value of the
.I service-name
field consists of the
.SM RPC
service name, followed by a slash and either
a version number or a range of version numbers
(for example,
.BR mountd/1 ).
.TP
.I socket-type
can be one of:
.RS
.RS
.PD 0
.TP 10
.B stream
for a stream socket,
.TP
.B dgram
for a datagram socket,
.TP
.B raw
for a raw socket,
.TP
.B rdm
for a \(lqreliably delivered message\(rq socket, or
.TP
.B seqpacket
for a sequenced packet socket.
.PD
.RE
.RE
.TP
.I protocol
must be a recognized protocol listed in the file
.BR /etc/protocols .
For
.SM RPC
services, the field consists of the string \(lqrpc\(rq
followed by a slash and the name of
the protocol (for example,
.B rpc/udp
for an
.SM RPC
service using the
.SM UDP
protocol as a transport mechanism).
.TP
.I wait-status
is
.B nowait
for all but \(lqsingle-threaded\(rq datagram servers \(em servers which
do not release the socket until a timeout occurs (such as
.BR comsat (8C)
and
.BR talkd (8C)).
These must have the status
.BR wait .
Although
.BR tftpd (8C)
establishes separate \(lqpseudo-connections\(rq, its forking
behavior can lead to a race condition unless
it is also given the status
.BR wait .
.TP
.I uid
is the user
.SM ID
under which the server should run.  This allows
servers to run with access privileges
other than those for root.
.TP
.I server-program
is either the pathname of a server program
to be invoked by
.B inetd
to perform the requested service, or the value
.B internal
if
.B inetd
itself provides the service.
.TP
.I server-arguments
If a server must be invoked with command-line
arguments, the
entire command line (including argument 0) must appear
in this field (which consists of all remaining words in the entry).
If the server expects
.B inetd
to pass it the address of its peer
(for compatibility with 4.2\s-1BSD\s0
executable daemons), then the first argument
to the command should be specified as
.RB ` %A '.
.SH FILES
.PD 0
.TP 20
.B /etc/inetd.conf
.TP
.B /etc/services
.TP
.B /etc/protocols
.PD
.SH "SEE ALSO"
.BR services (5),
.BR comsat (8C),
.BR inetd (8C),
.BR talkd (8C),
.BR tftpd (8C)
it would otherwise be
excluded by a minus group entry in
.BR /etc/hosts.equiv .
.SS The Root .rhosts File
.LP
When the user attempting a remote login is 
.BR root ,
only the
.B /.rhosts
file is checked, not 
.BR /etc/hosts.equiv .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.TP
.B /etc/passwd
.TP
.B ~/.rhosts
.TP
.B /etc
../share/man/man5/inode.5                                                                               755       0      12           61  4424741507  10035                                                                                                                                                                                                                                                                                                                                                                      .so man5/fs.5
.\" @(#)inode.5 1.6 89/03/27 SMI; 
 z  intro.5   t  z   ipalloc.netrange.5 t    z  	lastlog.5 ge    z  link.5 t    z  list.5     z  magic.5     z  
mailaddr.5 i    z  mtab.5 l    z  
netgroup.5 b     z  netrc.5     z  
netmasks.5 r  (  z  
networks.5 s  <  z  passwd.5 rks  X  z   passwd.adjunct.5  X  l  z  phones.5 t.5  |  z  plot.5 n    z  
policies.5 t    z  
printcap.5 s    z  proto.5     z  protocols.5   ./share/man/man5/internat.5                                                                            755       0      12         4331  4424741510  10621                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)internat.5	1.9 89/03/27 SMI;
.TH INTERNAT 5 "22 March 1989"
.SH NAME
internat \- key mapping table for internationalization
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX internat "" "\fLinternat\fR \(em key mapping table for internationalization"
This file format is used for the file specified by the \-f option of
.BR oldsetkeys (1).
.LP
The file has three columns.  First column is keytable identifier, one of:
.SM "BASE, CTRL, SHIFT, CAPS, UP, BASE_ISO, SHIFT_ISO or ALTG."
The second column is a decimal keystation number.
The third column is hexadecimal keytable entry value.
The file must end with line of "END, 0, 0".
As usual, comment lines start with #.
.SH EXAMPLES
This is the file for mapping keys to Canadian standards:
.LP
.in 10
.ft B
.nf
# /usr/lib/.setkeys: Key remapping, used by "setkeys remap"
#	
# First column is keytable identifier:
#		BASE, CTRL, SHIFT, CAPS, UP, BASE_ISO, SHIFT_ISO or ALTG
# Second column is decimal keystation number
# Third column is hexadecimal keytable entry value
# File must end with line of "END, 0, 0"
# Comment lines must start with #
#
#
# --- Keymaps for Canadian keyboard ---
# > Define Alt Graph key (SHIFTKEYS+ALTGRAPH=86)
BASE 119 86
CTRL 119 86
SHIFT 119 86
CAPS 119 86
UP 119 86
# > Define Caps key (SHIFTKEYS+CAPSLOCK=80)
BASE 13 80
CTRL 13 80
SHIFT 13 80
CAPS 13 80
# > Define Floating Accent keys
#		FA_UMLAUT = A9
#		FA_CFLEX = AA
#		FA_TILDE = AB
#		FA_CEDILLA = AC
#		FA_ACUTE = AD
#		FA_GRAVE = AE
BASE 64 AA
SHIFT 64 A9
CAPS 64 A9
BASE 65 AC
SHIFT 65 AB
CAPS 65 AB
BASE 87 AE
SHIFT 87 AD
CAPS 87 AD
# > Define ASCII values
BASE 88 5B
SHIFT 88 7B
CAPS 88 7B
BASE 15 5D
SHIFT 15 7D
CAPS 15 7D
SHIFT 31 22
SHIFT 32 2F
SHIFT 35 3F
SHIFT 107 27
CAPS 107 27
SHIFT 108 60
CAPS 108 60
BASE 124 3C
SHIFT 124 3E
CAPS 124 3E
# > Define ISO values
BASE_ISO 109 E9
SHIFT_ISO 109 C9
# > Define Alternate Graph ISO values
ALTG 88 AB
ALTG 15 BB
ALTG 30 B1
ALTG 31 B2
ALTG 32 B3
ALTG 33 A2
ALTG 34 A4
ALTG 35 5E
ALTG 36 40
ALTG 37 A3
ALTG 38 5C
ALTG 40 AC
ALTG 41 23
ALTG 63 B6
ALTG 64 BC
ALTG 65 BD
ALTG 42 BE
ALTG 106 B5
ALTG 105 BA
# > End of file
END 0 0
.ft
.fi
.in 0
.\" end of page
.SH SEE ALSO
.BR oldsetkeys (1)
.LP
The
.I "Sun386i Developer's Guide"
for keystation number diagrams.
ad to a race condition unless
it is also given the status
.BR wait .
.TP
.I uid
is the user
.SM ID
under which the server should run.  This allows
servers to run with access privileges
other than those for root.
.TP
.I server-program
is either the pathname of a server program
to be invoked by
../share/man/man5/intro.5                                                                               755       0      12           64  4424741510  10067                                                                                                                                                                                                                                                                                                                                                                      .so man5/Intro.5
.\" @(#)intro.5 1.5 89/03/27 SMI; 
    z  	lastlog.5      z  link.5 .    z  list.5 k    z  magic.5     z  
mailaddr.5      z  mtab.5 r    z  
netgroup.5 i     z  netrc.5     z  
netmasks.5    (  z  
networks.5   <  z  passwd.5 5 (  X  z   passwd.adjunct.5  z  l  z  phones.5     |  z  plot.5 5    z  
policies.5 5    z  
printcap.5     z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5 ./share/man/man5/ipalloc.netrange.5                                                                    755       0      12         4262  4424741510  12225                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ipalloc.netrange.5	1.7 Copyright 1988 Sun Microsystems Inc.
.TH IPALLOC.NETRANGE 5 "19 February 1988"
.SH NAME
ipalloc.netrange \- range of addresses to allocate
.SH SYNOPSIS 
.B /etc/ipalloc.netrange
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ipalloc.netrange file" "" "\fLipalloc.netrange\fP file"
.LP
This file, if it exists on the YP master of the
.B hosts.byaddr
YP map, specifies the ranges of IP addresses
that can be allocated by the
.BR ipallocd (8C)
daemon.
This allows multiple address assignment authorities, probably in
multiple administrative domains, to coexist
on the same IP network by preallocating ranges of addresses.
If the file does not exist, the daemon assumes that all
addresses not listed in the
.B hosts
map may be freely allocated.
.PP
This file can contain blank lines.  Comments begin with a
.B #
character and extend to the end of the current line.
Ranges of free addresses are specified on one line per network
or subnetwork.
.PP
The first token on the line is the IP address, in four part "dot" notation
as also used in the
.B hosts
file, of the network or subnetwork described.
It is separated from the second token by white space.
The second token is a comma-separated list of local host number ranges on that
network.
These ranges take two forms:  a single number specifies just that local
host number, and two numbers separated by a dash specify all local host
numbers starting at the first number and ending at the second.  (In the
case of a subnet, host numbers not in that subnet are excluded.) 
.PP
For example, the following file would specify that a subset of the
addresses on the class C network 192.9.200.0 may be allocated, and
only some of the addresses on two particular
subnets of the class B network 128.255.0.0 may be allocated.  In
any case, only non-broadcast addresses not listed in the
.B hosts
map are subject to allocation:
.LP
.RS
.ft B
# We have three network cables administered using automatic
# IP address allocation.
.sp
192.9.200.0		50-100,200-254
128.255.210.0		3,5,7,9,100-110
128.255.211.0		1-254
.ft
.RE
.SH "SEE ALSO"
.BR hosts (5),
.BR netmasks (5),
.BR ipallocd (8C)
.SH BUGS
There is a silent limit of twenty ranges per network.
3F
SHIFT 107 27
CAPS 107 27
SHIFT 108 60
CAPS 108 60
BASE 124 3C
SHIFT 124 3E
CAPS 124 3E
# > Define ISO values
BASE_ISO 109 E9
SHIFT_ISO 109 C9
# > Define Alternate Graph ISO values
ALTG 88 AB
ALTG 15 BB
ALTG 30 B1
ALTG 31 B2
ALTG 32 B3
ALTG 33 A2
ALTG 34 A4
ALTG 35 5E
ALTG 36 40
ALTG 37 A3
ALTG 38 5C
ALTG 40 AC
ALTG 41 23
ALTG 63 ./share/man/man5/lastlog.5                                                                             755       0      12           65  4424741510  10402                                                                                                                                                                                                                                                                                                                                                                      .so man5/utmp.5
.\" @(#)lastlog.5 1.6 89/03/27 SMI; 
 list.5     z  magic.5     z  
mailaddr.5     z  mtab.5 
    z  
netgroup.5      z  netrc.5     z  
netmasks.5   (  z  
networks.5 m  <  z  passwd.5 etw  X  z   passwd.adjunct.5  <  l  z  phones.5 jun  |  z  plot.5     z  
policies.5     z  
printcap.5 i    z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5     z  rasterfile.5 def    z  remote.5 rfi./share/man/man5/link.5                                                                                755       0      12         6122  4424741510   7732                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)link.5 1.4 89/03/27 SMI
.TH LINK 5 "22 March 1989"
.SH NAME
link \- link editor interfaces
.SH SYNOPSIS
.B #include <link.h>
.SH DESCRIPTION
.IX "link editor" "" "link editor data structures"
.LP
Dynamically linked executables created by
.BR ld (1)
contain a number of data structures that are used by the dynamic link editor
to finish link-editing the program during program execution.  These data
structures are described with a 
.B link_dynamic 
structure, as defined in the
.B link.h
file.  
.B ld
always identifies the location of this structure in the executable file with
the symbol
.BR _\^_DYNAMIC .
This symbol is 
.BR ld -defined
and if referenced in an executable that does not require dynamic linking 
will have the value zero.
.LP
The program stub linked with ``main'' programs by compiler drivers such as
.BR cc (1)
(called 
.BR crt0 )
tests the definition of
.B _\^_DYNAMIC
to determine whether or not the dynamic link editor should be invoked.
Programs supplying a substitute for 
.B crt0
must either duplicate this functionality or else require that the programs with
which they are linked be linked 
.IR statically .
Otherwise, such replacement
.BR crt0 's
must open and map in the executable
.B /usr/lib/ld.so
using 
.BR mmap (2).
Care should be taken to ensure that the expected mapping relationship between
the ``text'' and ``data'' segments of the executable is maintained in the
same manner that the 
.BR execve (2)
system call does.
The first location following the
.B a.out
header of this executable is the entry point to a function that begins the
dynamic link-editing process.  This function must be called and supplied
with two
arguments.  The first argument is an integer representing the revision level
of the argument list, and should have the value ``1''.  The second should be a
pointer to an argument list structure of the form:
.LP
.RS
.nf
.ta .75i 1.25i 2.75i
.ft B
struct {
	int	crt_ba;			/* base address of ld.so */
	int	crt_dzfd;		/* open fd to /dev/zero */
	int	crt_ldfd;		/* open fd to ld.so */
	struct	link_dynamic *crt_dp;	/* pointer to program's _\^_DYNAMIC */
	char	**crt_ep;		/* environment strings */
	caddr_t	crt_bp;			/* debugger hook */
}
.ft R
.fi
.DT
.RE
.LP
The members of the structure are:
.TP 15
.B crt_ba
The address at which 
.B /usr/lib/ld.so
has been mapped.
.TP 
.B crt_dzfd
An open file descriptor for 
.BR /dev/zero .
.B ld.so
will close this file descriptor before returning.
.TP 
.B crt_ldfd
The file descriptor used to map 
.BR /usr/lib/ld.so .
.B ld.so
will close this file descriptor before returning.
.TP 
.B crt_dp
A pointer to the label
.B _\^_DYNAMIC
in the executable which is calling 
.BR ld.so .
.TP 
.B crt_ep
A pointer to the environment strings provided to the program.
.TP 
.B crt_bp
A location in the executable which contains an instruction that will
be executed after the call to
.B ld.so
returns.  This location is used as a breakpoint in programs that are
being executed under the control of a debugger such as
.BR adb (1).
.SH "SEE ALSO"
.BR ld (1),
.BR mmap (2),
.BR a.out (5)
.SH "BUGS"
These interfaces are under development and are subject to rapid change.
ocols
.PD
.SH "SEE ALSO"
.BR services (5),
.BR comsat (8C),
.BR inetd (8C),
.BR talkd (8C),
.BR tftpd (8C)
it would otherwise be
excluded by a minus group entry in
.BR /etc/hosts.equiv .
.SS The Root .rhosts File
.LP
When the user attempting a remote login is 
.BR root ,
only the
.B /.rhosts
file is checked, not 
.BR /etc/hosts.equiv .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.TP
.B /etc/passwd
.TP
.B ~/.rhosts
.TP
.B /etc
../share/man/man5/list.5                                                                                755       0      12           62  4424741501   7705                                                                                                                                                                                                                                                                                                                                                                      .so man5/List.5
.\" @(#)list.5 1.4 89/03/27 SMI; 
 
mailaddr.5     z  mtab.5      z  
netgroup.5      z  netrc.5     z  
netmasks.5   (  z  
networks.5 (  <  z  passwd.5  <  X  z   passwd.adjunct.5     l  z  phones.5  l  |  z  plot.5 <    z  
policies.5     z  
printcap.5     z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5     z  rasterfile.5  z    z  remote.5    4  z  
resolv.conf.5 z  D  z  rgb../share/man/man5/magic.5                                                                               755       0      12         7063  4424741510  10062                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)magic.5 1.10 89/03/27 SMI;
.TH MAGIC 5 "22 March 1989"
.SH NAME
magic \- file command's magic number file
.SH DESCRIPTION
.IX "magic file" "" "\fLmagic\fR file \(em \fLfile\fR command's magic numbers table"
.LP
The
.BR file (1)
command identifies the type of a file using,
among other tests,
a test for whether the file begins with a certain
.IR "magic number" .
The file
.B /etc/magic
specifies what magic numbers are to be tested for,
what message to print if a particular magic
number is found,
and additional information to extract from the file.
.LP
Each line of the file specifies a test to be performed.
A test compares the data starting at a particular offset
in the file with a 1-byte, 2-byte, or 4-byte
numeric value or a string.  If the test succeeds,
a message is printed.
The line consists of the following fields:
.IP
.I offset	type	value	message
.TP 10
.I offset
A number specifying the offset, in bytes,
into the file of the data which is to be tested.
.TP
.I type
The type of the data to be tested.
The possible values are:
.RS
.TP
.B byte
A one-byte value.
.TP
.B short
A two-byte value.
.TP
.B long
A four-byte value.
.TP
.B string
A string of bytes.
.RE
.IP
The types
.BR byte ,
.BR short ,
and
.B long
may optionally be followed by a mask
specifier of the form
.BI & number\fR.
If a mask specifier is given, the value is
.SM AND\s0'ed
with the
.I number
before any comparisons are done.  The
.I number
is specified in C form.
For instance,
.B 13
is decimal,
.B 013
is octal, and
.B 0x13
is hexadecimal.
.TP
.I value
The value to be compared with the value from
the file.  If the type is numeric, this value
is specified in
.B C
form.
If it is a string, it is specified as a
.B C
string with the usual escapes permitted
(for instance, \en for
.SM NEWLINE\s0).
.IP
.I Numeric values
may be preceded by a character indicating
the operation to be performed.  It may be
.RB ` = ',
to specify that the value from the file
must equal the specified value,
.RB  ` < ',
to specify that the value from the file
must be less than the specified value,
.RB ` > ',
to specify that the value from the file
must be greater than the specified value,
.RB ` & ',
to specify that all the bits in the specified
value must be set in the value from the file,
.RB ` ^ ',
to specify that at least one of the bits in
the specified value must not be set in the
value from the file, or
.B x
to specify that any value will match.
If the character is omitted, it is assumed to be
.RB ` = '.
.IP
For string values, the byte string from the
file must match the specified byte string.
The byte string from the file which is matched
is the same length as the specified byte string.
.TP
.I message
The message to be printed if the comparison
succeeds.  If the string contains a
.BR printf (3S)
format specification, the value from the
file (with any specified masking performed) is
printed using the message as the format string.
.LP
Some file formats contain additional information
which is to be printed along with the file type.
A line which begins with the character
.RB ` > '
indicates additional tests and messages to be
printed.  If the test on the line preceding the
first line with a
.RB ` > '
succeeds, the tests specified in all the subsequent
lines beginning with
.RB ` > '
are performed, and the messages printed if the
tests succeed.  The next line which does not
begin with a
.RB ` > '
terminates this.
.SH FILES
.PD 0
.TP 20
.B /etc/magic
.PD
.SH SEE ALSO
.BR file (1),
.BR printf (3S)
.SH BUGS
There should be more than one level of subtests,
with the level indicated by the number of
.RB ` > '
at the beginning of the line.
\^_DYNAMIC */
	char	**crt_ep;		/* environment strings */
	caddr_t	crt_bp;			/* debugger hook */
}
.ft R
.fi
.DT
.RE
.LP
The members of the structure are:
.TP 15
.B crt_ba
The address at which 
.B /usr/lib/ld.so
has been mapped.
.TP 
.B crt_dzfd
An open file descriptor for 
.BR /dev/zero .
.B ld.so
will close this file descriptor before returning.
.TP 
.B crt_ldfd
The file descriptor used to map 
.BR /usr/lib/ld.so .
.B ld.so
will close this file descriptor ./share/man/man5/mailaddr.5                                                                            755       0      12           70  4424741510  10506                                                                                                                                                                                                                                                                                                                                                                      .so man5/aliases.5
.\" @(#)mailaddr.5 1.8 89/03/27 SMI;
netgroup.5      z  netrc.5     z  
netmasks.5   (  z  
networks.5 (  <  z  passwd.5  <  X  z   passwd.adjunct.5     l  z  phones.5  l  |  z  plot.5 l    z  
policies.5     z  
printcap.5     z  proto.5     z  protocols.5     z  publickey.5     z  queuedefs.5     z  rasterfile.5  z    z  remote.5    4  z  
resolv.conf.5 z  D  z  rgb.5 z  X  z  rhosts.5  X  l  z  
./share/man/man5/mtab.5                                                                                755       0      12         2125  4424741511   7720                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mtab.5 1.18 89/03/27 SMI;
.TH MTAB 5 "19 October 1987"
.SH NAME
mtab \- mounted file system table
.SH SYNOPSIS
.B /etc/mtab
.LP
.B #include <mntent.h>
.SH DESCRIPTION
.IX  "mtab file"  ""  "\fLmtab\fP \(em mounted file system table"
.IX  "mounted file system table"  ""  "mounted file system table \(em \fLmtab\fP"
.IX  "file system"  "mounted table"  ""  "mounted table \(em \fLmtab\fP"
.LP
.B mtab
resides in the
.B /etc
directory, and contains a table of filesystems
currently mounted by the
.BR mount (8)
command.
.B umount
removes entries from this file.
.LP
The file contains a line of information for each mounted filesystem,
structurally identical to the contents of
.BR /etc/fstab ,
described in
.BR fstab (5).
There are a number of lines of the form:
.IP
.I fsname dir type opts freq passno
.LP
for example:
.IP
.ft B
/dev/xy0a / 4.2 rw,noquota 1 2
.ft R
.LP
The file is accessed by programs using
.BR getmntent (3),
and by the system administrator using a text editor.
.SH FILES
.PD 0
.TP 20
.B /etc/mtab
.TP
.B /etc/fstab
.PD
.SH "SEE ALSO"
.BR getmntent (3),
.BR fstab (5),
.BR mount (8)
.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5        {  	ypfiles.5  ucceeds.  If the string contains a
.BR printf (3S)
format specification, the value from the
file (with any specified masking performed) is
printed using the message as the format string.
.LP
Some file formats contain additional information
which is to be printed along with the file type.
A line which begins with the character
.RB ` > ./share/man/man5/netgroup.5                                                                            755       0      12         5220  4424741511  10637                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)netgroup.5 1.18 89/03/27 SMI
.TH NETGROUP 5 "22 December 1987"
.SH NAME
netgroup \- list of network groups
.SH DESCRIPTION
.IX  "netgroup file"  ""  "\fLnetgroup\fP \(em network groups list"
.LP
.B netgroup
defines network wide groups,
used for permission checking when doing
remote mounts, remote logins, and remote shells.
For remote mounts, the information in
.B netgroup
is used to classify machines;
for remote logins and remote shells,
it is used to classify users.
Each line of the
.B netgroup
file defines a group and has the format
.IP
.I groupname member1 member2 .\|.\|.\|.
.LP
where
.RI member i
is either another group name, or a triple:
.IP
.RI ( hostname ,
.IR username ,
.IR domainname )
.LP
Any of these three fields can be empty,
in which case it signifies a wild card.
Thus
.IP
.B universal (\|,\|,\|)
.LP
defines a group to which everyone belongs.
.LP
A gateway machine should be listed under all possible hostnames by
which it may be recognized:
.IP
.B wan (gateway,\|,\|) (gateway-ebb,\|,\|)
.LP
Field names that begin with something
other than a letter, digit or underscore
(such as
.RB ` \- ')
work in precisely the opposite fashion.
For example, consider the following entries:
.RS
.nf
.ft B
justmachines	(analytica,\-,sun)
justpeople	(\-,babbage,sun)
.fi
.ft R
.RE
.LP
The machine
.B analytica
belongs to the group
.B justmachines
in the domain
.BR sun ,
but no users belong to it.
Similarly, the user
.B babbage
belongs to the group
.B justpeople
in the domain
.BR sun ,
but no machines belong to it.
.LP
The
.I domainname
field refers to the domain
.I n
which the triple is valid, not the
name containing the trusted host.
.\" .LP
.\" Network groups are contained in the Yellow Yages,
.\" and are accessed through these files:
.\" .RS
.\" .nf
.\" .BI /var/yp/ domainname /netgroup.dir
.\" .BI /var/yp/ domainname /netgroup.pag
.\" .BI /var/yp/ domainname /netgroup.byuser.dir
.\" .BI /var/yp/ domainname /netgroup.byuser.pag
.\" .BI /var/yp/ domainname /netgroup.byhost.dir
.\" .BI /var/yp/ domainname /netgroup.byhost.pag
.\" .fi
.\" .RE
.\" .LP
.\" These files can be created from
.\" .B /etc/netgroup
.\" using
.\" .BR makedbm (8).
.SH FILES
.PD 0
.TP 20
.B /etc/netgroup
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.pag
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byuser.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byuser.pag
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byhost.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byhost.pag
.PD
.IX  "trusted hosts list"  ""  "trusted hosts list \(em \fLhosts.equiv\fP"
.SH "SEE ALSO"
.BR getnetgrent (3N),
.BR exports (5),
.BR makedbm (8),
.BR ypserv (8)
to the environment strings provided to the program.
.TP 
.B crt_bp
A location in the executable which contains an instruction that will
be executed after the call to
.B ld.so
returns.  This location is used as a breakpoint in programs that are
being executed under the control of a debugger such as
.BR adb (1).
.SH "SEE ALSO"
.BR ld (1),
.BR mmap (2),
.BR a.out (5)
../share/man/man5/netrc.5                                                                               755       0      12         5067  4424741511  10120                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)netrc.5 1.18 89/03/27 SMI;
.TH NETRC 5 "19 October 1987"
.SH NAME
netrc \- file for ftp(1C) remote login data
.SH DESCRIPTION
.IX  "ftp remote login data"  ""  "\fLftp\fR \(em remote login data \(em \fL.netrc\fR file"
.IX  "ftp remote login data file"  ""  "\fL.netrc\fP \(em \fLftp\fR remote login data file"
.LP
The
.B .netrc
file contains data for logging in to a
remote host over the network for file transfers by
.BR ftp (1C).
This file resides in the user's home directory
on the machine initiating the file transfer.
Its permissions should be set to
disallow read access by group and others (see
.BR chmod (1V)).
.LP
The following tokens
are recognized; they may be separated by
.SM SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE
characters:
.TP
.BI machine\fP  name
Identify a remote machine name.
The auto-login process searches the
.B .netrc
file for a
.B machine
token that matches the remote machine specified on the
.B ftp
command line or as an
.B open
command argument.
Once a match is made, the subsequent
.B .netrc
tokens are processed, stopping when the
.SM EOF
is reached or another
.B machine
token is encountered.
.TP
.BI login\fP  name
Identify a user on the remote machine.
If this token is present, the auto-login
process will initiate a login using the specified name.
.TP
.BI password\fP  string
Supply a password.  If this token is present,
the auto-login process will supply the
specified string if the remote server requires
a password as part of the login process.
Note: if this token is present in the
.B .netrc
file,
.B ftp
will abort the auto-login process if the
.B .netrc
is readable by anyone besides the user.
.TP
.BI account\fP string
Supply an additional account password.
If this token is present, the auto-login process
will supply the specified string if the remote
server requires an additional account password,
or the auto-login process will initiate an
.SB ACCT
command if it does not.
.TP
.BI macdef\fP  name
Define a macro.
This token functions as the
.B ftp
.B macdef
command functions.  A macro is defined with the
specified name; its contents begin with the next
.B .netrc
line and continue until a
.SM NULL
line (consecutive
.SM NEWLINE
characters) is encountered.
If a macro named
.B init
is defined, it is automatically executed
as the last step in the
auto-login process.
.SH EXAMPLE
.LP
The command:
.IP
.ft B
machine ray login demo password mypassword
.ft R
.LP
allows an autologin to the machine 
.B ray
using the login name
.B demo
with password
.BR mypassword .
.SH FILES
.PD 0
.TP 20
.B ~/.netrc
.PD
.SH SEE ALSO
.BR chmod (1V),
.BR ftp (1C),
.BR ftpd (8C)
be created from
.\" .B /etc/netgroup
.\" using
.\" .BR makedbm (8).
.SH FILES
.PD 0
.TP 20
.B /etc/netgroup
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.pag
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byuser.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byuser.pag
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byhost.dir
.\" .TP
.\" .BI /var/yp/ domainname /netgroup.byhost.pag
.PD
.IX  "trusted hos./share/man/man5/netmasks.5                                                                            755       0      12         2300  4424741511  10615                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)netmasks.5 1.7 89/03/27 SMI;
.TH NETMASKS 5  "19 October 1987"
.SH NAME
netmasks \- network mask data base
.SH DESCRIPTION
.IX  "netmasks file"  ""  "\fLnetmasks\fP \(em netmask data base"
.LP
The
.B netmasks
file contains network masks used to implement
.SM IP
standard subnetting.
For each network that is subnetted,
a single line should exist
in this file with the network number, any number of
.SM SPACE
or
.SM TAB
characters,
and the network mask to use on that network.
Network numbers and masks may be specified
in the conventional IP
.RB ` . '
notation (like IP host addresses, but with zeroes for the host
part).  For example,
.IP
\fB128.32.0.0 255.255.255.0
.LP
can be used to specify the the Class B
network 128.32.0.0 should have
eight bits of subnet field and eight
bits of host field, in addition to
the standard sixteen bits in the network field.
When running Yellow Pages, this file on
the master is used for the
.B netmasks.byaddr
map.
.SH FILES
.PD 0
.TP 20
.B /etc/netmasks
.PD
.SH "SEE ALSO"
.BR ifconfig (8C)
.LP
Postel, Jon, and Mogul, Jeff,
.IR "Internet Standard Subnetting Procedure" ,
.SM RFC
950,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1985.
esent, the auto-login process
will supply the specified string if the remote
server requires an additional account password,
or the auto-login process will initiate an
.SB ACCT
command if it does not.
.TP
.BI macdef\fP  name
Define a macro.
This token functions as the
.B ftp
.B macdef
command functions.  A macro is def./share/man/man5/networks.5                                                                            755       0      12         2645  4424741511  10660                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)networks.5 1.11 89/03/27 SMI; from UCB 4.2
.TH NETWORKS 5  "22 March 1989"
.SH NAME
networks \- network name data base
.SH DESCRIPTION
.IX  "networks file"  ""  "\fLnetworks\fP \(em network name data base"
.LP
The
.B networks
file contains information regarding
the known networks which comprise the
.SM DARPA
Internet.  For each network a single line
should be present with the following information:
.IP
.I official-network-name	network-number	aliases
.LP
Items are separated by any number of blanks and/or
.SM TAB
characters.  A
.RB ` # '
indicates the beginning of a comment;
characters up to the end of the line are not
interpreted by routines which search the file.
This file is normally created from the
official network data base maintained at the
Network Information Control Center (\s-1NIC\s0),
though local changes may be required to bring
it up to date regarding unofficial aliases
and/or unknown networks.
.LP
Network number may be specified in the conventional
.RB ` . '
notation using the
.B inet_network (\|)
routine from the Internet address manipulation library,
.BR inet (3N).
Network names may contain any printable
character other than a field delimiter,
.SM NEWLINE\s0,
or comment character.
.SH FILES
.PD 0
.TP 20
.B /etc/networks
.PD
.SH "SEE ALSO"
.BR getnetent (3N),
.BR inet (3N)
.SH BUGS
A name server should be used instead of a static file.
A binary indexed file format should be
available for fast access.
ne a macro.
This token functions as the
.B ftp
.B macdef
command functions.  A macro is def./share/man/man5/passwd.5                                                                              755       0      12        11443  4424741511  10321                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)passwd.5 1.22 89/03/27 SMI; from UCB 4.3 BSD
.TH PASSWD 5 "22 March 1989"
.SH NAME
passwd \- password file
.SH SYNOPSIS
.B /etc/passwd
.SH DESCRIPTION
.IX  "passwd file"  ""  "\fLpasswd\fP \(em password file"
.LP
The
.B passwd
file contains basic information about each
user's account.  This file contains a one-line
entry for each authorized user, of the form:
.IP
.nh
.IB username : password : uid :\c
.IB gid : gcos-field : home-dir :\c
.I login-shell
.hy
.LP
where
.TP 15
.I username
is the user's login name.  This field contains
no uppercase characters, and must not be more
than eight characters in length.
.TP
.I password
is the user's encrypted password,
or a string of the form:
.BI ## name
if the encrypted password is in the
.B /etc/security/passwd.adjunct
file (see
.BR passwd.adjunct (5)).
If this field is empty,
.BR login (1)
does not request a password before logging the user in.
.TP
.I "uid"
is the user's numerical
.SM ID
for the system, which must be unique.
.I uid
is generally a value between 0 and 32767.
.TP
.I gid
is the numerical
.SM ID
of the group that the user belongs to.
.I gid
is generally a value between 0 an 32767.
.TP
.I "gcos-field"
is the user's real name, along with
information to pass along in
a mail-message heading.  It is called the
gcos-field for historical reasons.  A
.B &
in this field stands for the login
name (in cases where the
login name appears in a user's real name).
.TP
.I "home-dir"
is the pathname to the directory in
which the user is initially
positioned upon logging in.
.TP
.I login-shell
is the user's initial shell program.
If this field is empty, the
default shell is
.BR /usr/bin/sh .
.LP
The
.B passwd
file can also have lines beginning with a
.RB ` + '
(plus sign)
which means to incorporate entries from the Yellow Pages.
There are three styles of
.B +
entries in this file: by itself,
.B +
means to insert the entire contents
of the Yellow Pages password file at that point;
.BI + name
means to insert the entry (if any) for
.I name
from the Yellow Pages at that point;
.BI +@ netgroup
means to insert the entries for all members of the network group
.B netgroup
at that point.
If a
.BI + name
entry has a non-\s-1NULL\s0
.IR password ,
.SM
.IR gcos ,
.IR home-dir ,
or
.I login-shell
field,
the value of that field overrides what is
contained in the Yellow Pages.  The
.I uid
and
.I gid
fields cannot be overridden.
.LP
The
.B passwd
file can also have lines beginning with a
.RB ` \- '
(minus sign)
which means to disallow entries from the Yellow Pages.
There are two styles of
.RB ` \- '
entries in this file:
.BI \- name
means to disallow any subsequent entries (if any) for
.IR name
(in this file or in the Yellow Pages);
.BI \-@ netgroup
means to disallow any subsequent entries
for all members of the network group
.IR netgroup .
.LP
The password file is an
.SM ASCII
file that resides in the
.B /etc
directory.  Because the encrypted
passwords on a secure system are kept in the
.B passwd.adjunct
file,
.B /etc/passwd
has general read permission on all systems,
and can be used by
routines that map numerical user
.SM ID\s0s
to names.
.LP
Appropriate precautions must be taken to lock the
.B /etc/passwd
file against simultaneous changes if it
is to be edited with a text editor;
.BR vipw (8)
does the necessary locking.
.br
.ne 8
.SH EXAMPLE
.LP
Here is a sample
.B passwd
file when
.B passwd.adjunct
does not exist:
.RS
.LP
.ft B
.nf
root:q.mJzTnu8icF.:0:10:God:/:/bin/csh
fred:6k/7KCFRPNVXg:508:10:% Fredericks:/usr2/fred:/bin/csh
+john:
+@documentation:no-login:
+::::Guest
.fi
.ft R
.LP
.RE
Here is a sample
.B passwd
file when
.B passwd.adjunct
does exist:
.RS
.LP
.ft B
.nf
root:##root:0:10:God:/:/bin/csh
fred:##fred:508:10:& Fredericks:/usr2/fred:/bin/csh
+john:
+@documentation:no-login:
+::::Guest
.fi
.ft R
.LP
.RE
In this example, there are specific entries for users
.B root
and
.BR fred ,
to assure that they can log in even when
the system is running standalone.  The user
.B john
will have his password entry in the Yellow Pages
incorporated without change; anyone in the netgroup
.B documentation
will have their password field disabled,
and anyone else will be able to log in with
their usual password,
shell, and home directory, but with a
gcos-field of
.BR Guest .
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.B /etc/security/passwd.adjunct
.PD
.SH "SEE ALSO"
.BR login (1),
.BR mail (1),
.BR passwd (1),
.BR crypt (3),
.BR getpwent (3),
.BR group (5),
.BR passwd.adjunct (5),
.BR adduser (8),
.BR sendmail (8),
.BR vipw (8)
.SH BUGS
.BR mail (1)
and
.BR sendmail (8)
use the
gcos-field to compose the
.B From:
line for addressing mail messages, but these programs get
confused by nested parentheses when composing replies.
This problem can be avoided by using different
types of brackets within the
gcos-field; for example:
.RS
.B
(& Fredricks [Podunk U <\s-1EE/CIS\s0>] {818}-555-5555)
.RE
.B +
entries in this file: by itself,
.B +
means to insert the entire contents
of the Yellow Pages password file at that point;
.BI + name
means to insert the entry (if any) for
.I name
from the Yellow Pages at that point./share/man/man5/passwd.adjunct.5                                                                      755       0      12         6504  4424741512  11733                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)passwd.adjunct.5 1.8 89/03/27 SMI
.TH PASSWD.ADJUNCT 5 "22 March 1989"
.SH NAME
passwd.adjunct \- user security data file
.SH SYNOPSIS
.B /etc/security/passwd.adjunct
.SH DESCRIPTION
.IX  "passwd.adjunct file"  ""  "\fLpasswd.adjunct\fP \(em password file"
.LP
The
.B passwd.adjunct
file contains the following information for each user:
.IP
.IB name : password : min-label :\c
.IB max-label : default-label : always-audit-flags :\c
.I never-audit-flags
.TP 20
.I name
The user's login name in the system and it must be unique.
.TP
.I password
The encrypted password.
.TP
.I min-label
The lowest security level at which this
user is allowed to login
(not used at C2 level).
.TP
.I max-label
The highest security level at which this
user is allowed to login
(not used at C2 level).
.TP
.I default-label
The security level at which this user will
run unless a label is specified at login.
.TP
.I always-audit-flags
Flags specifying events always to be audited
for this user's processes; see
.BR audit_control (5).
.TP
.I never-audit-flags
Flags specifying events never to be audited
for this user's processes; see
.BR audit_control (5).
.LP
Field are separated by a colon, and
each user from the next by a
.SM NEWLINE\s0.
.LP
The
.B passwd.adjunct
file can also have line beginning with a
.RB ` + '
(plus sign), which means to incorporate
entries from the Yellow Pages.
There are three styles of
.RB ` + '
entries: all by itself,
.RB ` + '
means to insert the entire contents
of the Yellow Pages
.B passwd.adjunct
file at that point;
.BI + name
means to insert the entry (if any) for
.I name
from the Yellow Pages at that point;
.BI +@ name
means to insert the entries for all
members of the network group
.I name
at that point.  If a
.RB ` + '
entry has a non-\s-1NULL\s0
password, it will override what is contained
in the Yellow Pages.
.SH EXAMPLE
.LP
Here is a sample
.B /etc/security/passwd.adjunct
file:
.RS
.LP
.ft B
.nf
root:q.mJzTnu8icF.::::::::
ignatz:7KsI8C\s-1FRPNVX\s0g::b,ap,bp,gp,dp,ic,r,d,l::+dc,+da:-dr:
rex:7\s-1HU\s08\s-1UUGRPNVX\s0g:b,ap:b,ap,bp:b,bp::+ad:
+fred:9x.\s-1FFU\s0w6xcJBa::::::::
+:
.fi
.ft R
.LP
.RE
The user
.B root
is the super-user, who has no special label
constraints nor audit interest.  The user
.B ignatz
may have any label from the lowest to the level
.B b
and any of a large number of categories.
.B ignatz
will run at system low unless he specifies otherwise.
He is being audited on the system default event
classes as well as data creations and access
changes, but never for failed data reads.
The user
.B rex
can function only at the level
.B b
and only in the categories
.B ap
or
.B ap
and
.BR bp .
By default, he will run at
.RB ` b , bp '.
He is audited with the system defaults,
except that successful administrative
operations are not audited.  The user
.B fred
will have the labels and audit flags that are specified
in the Yellow Pages
.B passwd.adjunct
file.  Any other users specified in the
Yellow Pages will be able
to log in on this system.
.LP
The user security data file resides in the
.B /etc/security
directory.
Because it contains encrypted passwords,
it does not have general read permission.
.SH FILES
.PD 0
.TP 20
.B /etc/security/passwd.adjunct
.TP
.B /etc/security
.PD
.SH "SEE ALSO"
.BR login (1),
.BR passwd (1),
.BR crypt (3),
.BR getpwaent (3),
.BR getpwent (3),
.BR audit_control (5),
.BR passwd (5),
.BR adduser (8)
a remote login is 
.BR root ,
only the
.B /.rhosts
file is checked, not 
.BR /etc/hosts.equiv .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.TP
.B /etc/passwd
.TP
.B ~/.rhosts
.TP
.B /etc
../share/man/man5/phones.5                                                                              755       0      12         2622  4424741512  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)phones.5 1.11 89/03/27 SMI; from UCB 4.2
.TH PHONES 5 "19 October 1987"
.SH NAME
phones \- remote host phone number data base
.SH SYNOPSIS
.B /etc/phones
.SH DESCRIPTION
.IX  "phones file"  ""  "\fLphones\fP \(em remote host phone numbers"
.IX  "remote host" "phone numbers \(em \fLphones\fP"
.IX  host "phone numbers file \(em \fLphones\fP"
.LP
The file
.B /etc/phones
contains the system-wide private phone numbers for the
.BR tip (1C)
program.
.B /etc/phones
is normally unreadable, and so may contain
privileged information.  The format of
.B /etc/phones
is a series of lines of the form:
.IP
.BI < system-name >[\ \et]*< phone-number >\fR.
.LP
The system name is one of those defined in the
.BR remote (5)
file and the phone number is constructed from
.BR [0123456789\-=*%] .
The
.RB ` = '
and
.RB ` * '
characters are indicators to the auto
call units to pause and wait for a second dial
tone (when going through an exchange).  The
.RB ` = '
is required by the
.SM DF02-AC
and the
.RB ` * '
is required by the
.SM BIZCOMP
1030.
.LP
Comment lines are lines containing a
.RB ` # '
sign in the first column of the line.
.LP
Only one phone number per line is permitted.
However, if more than
one line in the file contains the same system name
.BR tip (1C)
will attempt to dial each one in turn,
until it establishes a connection.
.SH FILES
.PD 0
.TP 20
.B /etc/phones
.PD
.SH "SEE ALSO"
.BR tip (1C),
.BR remote (5)
y itself,
.RB ` + '
means to insert the entire contents
of the Yellow Pages
.B passwd.adjunct
file at that poi./share/man/man5/plot.5                                                                                755       0      12         5562  4424741512   7764                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)plot.5 1.9 89/03/27 SMI; from UCB 4.2
.TH PLOT 5  "22 March 1989"
.SH NAME
plot \- graphics interface
.SH DESCRIPTION
.IX  "plot file"  ""  "\fLplot\fP \(em graphics interface files"
.IX  "graphics interface files"  ""  "graphics interface files \(em \fLplot\fP"
.LP
Files of this format are produced by routines
described in
.BR plot (3X),
and are interpreted for various devices
by commands described in
.BR plot (1G).
A graphics file is a stream of plotting instructions.
Each instruction consists of an
.SM ASCII
letter
usually followed by bytes of binary information.
The instructions are executed in order.
A point is designated by
four bytes representing the
.I x
and
.I y
values; each value is a signed integer.
The last designated point in an
.IR l ", " m ", " n ,
or
.I p
instruction becomes the ``current point''
for the next instruction.
.LP
Each of the following descriptions begins with the name
of the corresponding routine in
.BR plot (3X).
.TP
.B  m
Move: the next four bytes give a new current point.
.TP 3
.B  n
Cont: draw a line from the current point to
the point given by the next four bytes.
See
.BR plot (1G).
.TP 3
.B p
Point: plot the point given by the next four bytes.
.TP 3
.B l
Line: draw a line from the point given by the next
four bytes to the point given by the
following four bytes.
.TP 3
.B t
Label: place the following
.SM ASCII
string so that its
first character falls on the current point.
The string is terminated by a
.SM NEWLINE\s0.
.TP 3
.B a
Arc: the first four bytes give the center,
the next four give the starting point,
and the last four give the end point of a circular arc.
The least significant coordinate of the end point is
used only to determine the quadrant.
The arc is drawn counter-clockwise.
.TP 3
.B c
Circle: the first four bytes give the
center of the circle, the next two the radius.
.TP 3
.B e
Erase: start another frame of output.
.TP 3
.B f
Linemod: take the following string, up to a
.SM NEWLINE\s0,
as the style for drawing further lines.
The styles are ``dotted,''
``solid,'' ``longdashed,'' ``shortdashed,'' and ``dotdashed.''
Effective only in
.B plot 4014
and
.BR "plot ver" .
.TP 3
.B s
Space: the next four bytes give
the lower left corner of the plotting area;
the following four give the upper right corner.
The plot will be magnified or reduced to fit
the device as closely as possible.
.IP
Space settings that exactly fill the plotting area
with unity scaling appear below for
devices supported by the filters of
.BR plot (1G).
The upper limit is just outside the plotting area.
In every case the plotting area is taken to be square;
points outside may be displayable on
devices whose face is not square.
.RS
.TP 10n
.B 4014
.B space(0, 0, 3120, 3120);
.TP
.B ver
.B space(0, 0, 2048, 2048);
.TP
.BR 300 , " 300s"
.B space(0, 0, 4096, 4096);
.TP
.B 450
.B space(0, 0, 4096, 4096);
.RE
.SH "SEE ALSO"
.BR graph (1G),
.BR plot (1G),
.BR plot (3X)
irst character falls on the current point.
The string is terminated by a
.SM NEWLINE\s0.
.TP 3
.B a
Arc: the first four bytes give the center,./share/man/man5/policies.5                                                                            755       0      12         1223  4424741512  10603                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)policies.5	1.7 Copyright 1988 Sun Microsystems Inc.
.TH POLICIES 5 "19 February 1988"
.SH NAME
policies \- network administration policies
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "policies file" "" "\fLpolicies\fP file"
.LP
The
.B policies
file contains information relevant to domain-wide
administration policies.
Each line contains two tokens, separated by white space; the first
token is the name of an administrative policy, and the second is the
value of that policy.
.SH FILES
.PD 0
.TP 20
.B /etc/policies
.TP
.B /var/yp/\fIdomainname\fB/policies.{dir,pag}
.PD
.SH "SEE ALSO"
.BR pnpd (8C),
.BR rarpd (8C),
.BR logintool (8)
  toc.5       z  translate.5     z  ttys.5      z  ttytab.5      z  	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5 t  @  {   
uuencode.5 @  P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5      {  xtab.5 f     {  	ypfiles.5  R plot (1G).
The upper limit is just outside the plotting ar./share/man/man5/printcap.5                                                                            755       0      12        21657  4424741512  10651                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)printcap.5 1.24 89/03/27 SMI; from UCB 4.3
.TH PRINTCAP 5 "22 March 1989"
.SH NAME
printcap \- printer capability data base
.SH SYNOPSIS
.B /etc/printcap
.SH DESCRIPTION
.IX  "printcap file"  ""  "\fLprintcap\fP \(em printer capability data base"
.LP
.B printcap
is a simplified version of the
.BR termcap (5)
data base for describing printers.
The spooling system accesses the
.B printcap
file every time it is used, allowing dynamic
addition and deletion of
printers.  Each entry in the data base describes
one printer.  This
data base may not be substituted for, as is possible for
.BR termcap ,
because it may allow accounting to be bypassed.
.LP
The default printer is normally
.BR lp ,
though the environment variable
.SM PRINTER
may be used to override this.
Each spooling utility supports a
.BI \-P printer
option to explicitly name a destination printer.
.LP
Refer to
.TX ADMIN
for a discussion of how to set up the
database for a given printer.
.\" Sun386i
On Sun386i systems, refer to 
.BR snap (1)
for information on setting up printers with the system
and network administration program. 
.LP
Each entry in the
.B printcap
file describes a printer, and is a line
consisting of a number of
fields separated by
.RB ` : '
characters.  The first entry for each printer
gives the names which are known for the
printer, separated by `|' characters.
The first name is conventionally a number.  The second
name given is the most common abbreviation
for the printer, and the last name given should
be a long name fully identifying the printer.
The second name should contain no blanks;
the last name may well contain blanks for readability.
Entries may continue onto multiple
lines by giving a
.RB ` \e '
as the last character of a line, and empty fields
may be included for readability.
.LP
Capabilities in
.B printcap
are all introduced by two-character codes,
and are of three types:
.LP
.TP 10
.I Boolean
Capabilities that indicate that the printer
has some particular feature.
Boolean capabilities are simply written between the
.RB ` : '
characters, and
are indicated by the word `bool' in the
.B type
column of the capabilities
table below.
.TP
.I Numeric
Capabilities that supply information such
as baud-rates, number of lines per
page, and so on.  Numeric capabilities
are indicated by the
word
.B num
in the
.B type
column of the capabilities table below.
Numeric capabilities are given by the
two-character capability code followed by the
.RB ` # '
character, followed by
the numeric value.  For example:
.IP
.B 	\ :br#1200:\ 
.IP
is a numeric
entry stating that this printer should
run at 1200 baud.
.TP
.I String
Capabilities that give a sequence which can
be used to perform particular
printer operations such as cursor motion.
String valued capabilities
are indicated by the word
.B str
in the
.B type
column of the
capabilities table below.  String valued capabilities
are given by the two-character
capability code followed by an
.RB ` = '
sign and then a string ending at the next following
.RB ` : '.
For example,
.IP
.B 	\ \ :rp=spinwriter:\ 
.IP
is a sample entry stating that the remote printer
is named
.BR spinwriter .
.\"Sun386i
.SH Sun386i DESCRIPTION
On Sun386i systems,
.BR lpr(1)
and related printing commands use the Yellow Pages name service to obtain
the 
.B printcap
entry for a named printer if the entry does not exist in the local
.B /etc/printcap
file.  For example, when a user issues 
the command 
.IP
.B 	\ \ lpr -Pnewprinter foo\ 
.LP
.B lpr 
searches 
.B /etc/printcap
on the local system for an entry for
.BR newprinter .
If no local entry for 
.B newprinter
exists, then 
.B lpr 
searches the YP map called
.BR printcap .
The search is invisible to the user. 
.LP
.B lpr
creates the spooling directory for the printer automatically if 
no spooling directory exists.
.LP
System administrators can make a printer available to the 
entire YP domain by placing an entry
for that printer in the YP
.B printcap 
map, typically using
.BR snap .
Otherwise, the system administrator must edit the 
.B /etc/printcap
file on the YP master and then rebuild the YP map. 
.SH CAPABILITIES
.LP
.TS
c c l l
cfB l l l.
\fIName	Type	Default	Description\fP
.sp .5
af	str	\s-1NULL\s0	name of accounting file
br	num	none	if lp is a tty, set the baud rate (ioctl call)
cf	str	\s-1NULL\s0	cifplot data filter
df	str	\s-1NULL\s0	TeX data filter (\s-1DVI\s0 format)
du	str	0	User \s-1ID\s0 of user `daemon'.
fc	num	0	if lp is a tty, clear flag bits
ff	str	``\ef''	string to send for a form feed
fo	bool	false	print a form feed when device is opened
fs	num	0	like `fc' but set bits
gf	str	\s-1NULL\s0	graph data filter (plot(3X) format)
hl	bool	false	print the burst header page last
ic	bool	false	driver supports (non standard) ioctl to indent printout
if	str	\s-1NULL\s0	name of input/communication filter (created per job)
lf	str	``/dev/console''	error logging file name
lo	str	``lock''	name of lock file
lp	str	``/dev/lp''	device name to open for output
mc	num	0	maximum number of copies
ms	str	\s-1NULL\s0	list of terminal modes to set or clear
mx	num	1000	maximum file size (in \s-1BUFSIZ\s0 blocks), zero = unlimited
nd	str	\s-1NULL\s0	next directory for list of queues (unimplemented)
nf	str	\s-1NULL\s0	ditroff data filter (device independent troff)
of	str	\s-1NULL\s0	name of output/banner filter (created once)
pc	num	200	price per foot or page in hundredths of cents
pl	num	66	page length (in lines)
pw	num	132	page width (in characters)
px	num	0	page width in pixels (horizontal)
py	num	0	page length in pixels (vertical)
rf	str	\s-1NULL\s0	filter for printing \s-1FORTRAN\s0 style text files
rg	str	\s-1NULL\s0	restricted group. Only members of group allowed access
rm	str	\s-1NULL\s0	machine name for remote printer
rp	str	``lp''	remote printer name argument
rs	bool	false	restrict remote users to those with local accounts
rw	bool	false	open printer device read/write instead of read-only
sb	bool	false	short banner (one line only)
sc	bool	false	suppress multiple copies
sd	str	``/var/spool/lpd''	spool directory
sf	bool	false	suppress form feeds
sh	bool	false	suppress printing of burst page header
st	str	``status''	status file name
tc	str	\s-1NULL\s0	name of similar printer; must be last	 
tf	str	\s-1NULL\s0	troff data filter (C/A/T phototypesetter)
tr	str	\s-1NULL\s0	trailer string to print when queue empties
vf	str	\s-1NULL\s0	raster image filter
xc	num	0	if lp is a tty, clear local mode bits
xs	num	0	like `xc' but set bits
.TE
.LP
If the local line printer driver supports
indentation, the daemon must understand how to invoke it.
.LP
Note: the
.BR fs ,
.BR fc ,
.BR xs ,
and
.B xc
fields are flag
.I masks
rather than flag
.IR values .
Certain default device flags are set when the device is
opened by the line printer daemon if the device is connected to a
terminal port.
The flags indicated in the
.B fc
field are then cleared;
the flags in the
.B fs
field are then set (or vice-versa,
depending on the order of
.BI fc #nnnn
and
.BI fs #nnnn
in the
.B /etc/printcap
file).  The bits cleared by the
.B fc
field and set by the
.B fs
field are those in the
.B sg_flags
field of the
.B sgtty
structure, as set by the
.SB TIOCSETP
.B ioctl
call, and the bits cleared by the
.B xc
field and set by the
.B xs
field are those in the \(lqlocal flags\(rq word, as set by the
.SB TIOCLSET
.B ioctl
call.  See
.BR ttcompat (4M)
for a description of these flags.
For example, to set exactly the flags
06300 in the
.B fs
field, which specifies that the
.SM
.BR EVENP \*S,
.SM
.BR ODDP \*S,
and
.SB XTABS
modes are to be set, and all other flags are to be cleared, do:
.RS
.nf
.B :fc#0177777:fs#06300:
.fi
.RE
.LP
The same process applies to the
.B xc
and
.B xs
fields.  Alternatively, the
.B ms
field can be used to specify modes to be set and cleared.
These modes are specified as
.BR stty (1V)
modes; any mode supported by
.B stty
may be specified, except for the baud rate which must be specified
with the
.B br
field.  This permits modes not supported by the older
terminal interface described in
.BR ttcompat (4M)
to be set or cleared.  Thus, to set the terminal port to which the
printer is attached to even parity, tab expansion, no newline to
carriage-return/line-feed translation, and RTS/CTS flow control
enabled, do:
.RS
.nf
.B :ms=evenp,-tabs,nl,crtscts:
.fi
.RE
.\"Sun386i
.LP
On Sun386i systems, the 
.B tc
field, as in the
.BR termcap (5)
file, must appear last in the list of capabilities. It is recommended that
each type of printer have a general entry describing common capabilities;
then an individual printer can be defined with 
its particular capabilities plus a
.B tc
field that points to the general entry for that type of printer.
.SH FILES
.PD 0
.TP 20
.B /etc/printcap
.PD
.SH "SEE ALSO"
.BR lpq (1),
.BR lpr (1),
.BR lprm (1),
.BR snap (1),
.BR stty (1V),
.BR plot (3X),
.BR ttcompat (4M),
.BR termcap (5),
.BR lpc (8),
.BR lpd (8),
.BR pac (8)
.LP
.TX ADMIN
pabilities
are indicated by the
word
.B num
in the
.B type
column of the capabili./share/man/man5/proto.5                                                                               755       0      12         4332  4424741512  10143                                                                                                                                                                                                                                                                                                                                                                      .TH PROTO 5 "23 March 1989"
.SH NAME
proto \- prototype job file for at
.SH SYNOPSIS
.LP
.B /var/spool/cron/.proto
.LP
.BI /var/spool/cron/.proto. queue
.SH DESCRIPTION
.IX "proto file" "" "\fL.proto\fP file"
.LP
When a job is submitted to
.BR at (1)
or
.BR batch (1),
the job is constructed as a shell script.  First, a prologue is
constructed, consisting of:
.IP \(bu 3
A header specifying the owner, job name, and shell
that should be used to run the job, and a flag indicating whether mail
should be sent when the job completes;
.IP \(bu
A set of Bourne shell commands to make the environment (see
.BR environ (5V))
for the
.B at
job the same as the current environment;
.IP \(bu
A command to run the user's shell (as specified by the
.SB SHELL
environment variable) with the rest of the job file as input.
.LP
.B at
then reads a \*(lqprototype file,\*(rq and constructs the rest of the
job file from it.
.LP
Text from the prototype file is copied to the job file, except for
special \*(lqvariables\*(rq that are replaced by other text:
.RS
.TP
.B $d
is replaced by the current working directory
.PD 0
.TP
.B $l
is replaced by the current file size limit (see
.BR ulimit (3C))
.TP
.B $m
is replaced by the current umask (see
.BR umask (2))
.TP
.B $t
is replaced by the time at which the job should be run, expressed as seconds
since January 1, 1970, 00:00 Greenwich Mean Time, preceded by a colon
.TP
.B $<
is replaced by text read by
.B at
from the standard input (that is, the commands provided to
.B at
to be run in the job)
.PD
.RE
.LP
If the job is submitted in queue
.IR queue ,
.B at
uses the file
.BI /var/spool/cron/.proto. queue
as the prototype file if it exists, otherwise it will use the file
.BR /var/spool/cron/.proto .
.SH EXAMPLES
The standard
.B .proto
file supplied with SunOS is:
.LP
.RS
.nf
.ft B
#
# @(#)proto.5 1.4 89/03/27 SMI; from S5R3 1.1
#
cd $d
umask $m
$<
.ft R
.fi
.RE
.LP
which causes commands to change the current directory in the job to the
current directory at the time
.B at
was run, and to change the umask in the job to the umask at the time
.B at
was run, to be inserted before the commands in the job.
.SH FILES
.PD 0
.TP 20
.B /var/spool/cron/.proto
.LP
.BI /var/spool/cron/.proto. queue
.PD 
.SH "SEE ALSO"
.BR at (1)

P 20
.B /etc/printcap
.PD
.SH "SEE ALSO"
.BR lpq (1),
.BR lpr (1),
.BR lprm (1),
.BR snap (1),
.BR stty (1V),
.BR plot (3X),
.BR ttcompat (4M),
.BR termcap (5),
.BR lpc (8),
.BR lpd (8),
.BR pac (8)
.LP
.TX ADMIN
pabilities
are indicated by the
word
.B num
in the
.B type
column of the capabili./share/man/man5/protocols.5                                                                           755       0      12         2743  4424741513  11031                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)protocols.5 1.13 89/03/27 SMI; from UCB 4.2
.TH PROTOCOLS 5  "22 March 1989"
.SH NAME
protocols \- protocol name data base
.SH SYNOPSIS
.B /etc/protocols
.SH DESCRIPTION
.IX  "protocols file"  ""  "\fLprotocols\fP \(em protocol name data base"
.LP
The
.B protocols
file contains information regarding
the known protocols used in the
.SM DARPA
Internet.  For each protocol a single line
should be present with the following information:
.IP
.I official-protocol-name	protocol-number	aliases
.LP
Items are separated by any number of blanks and/or
.SM TAB
characters.  A
.RB ` # '
indicates the beginning of a comment;
characters up to the end of the line are
not interpreted by routines which search the file.
.LP
Protocol names may contain any printable
character other than a field delimiter,
.SM NEWLINE\s0,
or comment character.
.SH EXAMPLE
.LP
The following example is taken from Sun\s-1OS\s0.
.LP
.nf
.ft B
.ta +1.0i +1.0i +1.0i
#
# Internet (\s-1IP\s0) protocols
#
ip	0	\s-1IP\s0	# internet protocol, pseudo protocol number
icmp	1	\s-1ICMP\s0	# internet control message protocol
ggp	3	\s-1GGP\s0	# gateway-gateway protocol
tcp	6	\s-1TCP\s0	# transmission control protocol
pup	12	\s-1PUP\s0	# \s-1PARC\s0 universal packet protocol
udp	17	\s-1UDP\s0	# user datagram protocol
.fi
.ft R
.SH FILES
.PD 0
.TP 20
.B /etc/protocols
.PD
.SH "SEE ALSO"
.BR getprotoent (3N)
.SH BUGS
A name server should be used instead of a static file.
A binary indexed file format should be available for fast access.
at
to be run in the job)
.PD
./share/man/man5/publickey.5                                                                           755       0      12         1643  4424741513  10772                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)publickey.5 1.7 89/03/27 SMI;
.TH PUBLICKEY 5 "19 October 1987"
.SH NAME
publickey \- public key database
.SH SYNOPSIS
.B /etc/publickey
.SH DESCRIPTION
.IX "publickey file" "" "\fLpublickey\fP file"
.LP
.B /etc/publickey
is the public key database used for secure
networking. Each entry in
the database consists of a network user
name (which may either refer to
a user or a hostname), followed by the user's
public key (in hex
notation), a colon, and then the user's
secret key encrypted with
its login password (also in hex notation).
.LP
This file is altered either by the user through the
.BR chkey (1)
command or by the system administrator through the
.BR newkey (8)
command.
The file
.B /etc/publickey
should only contain data on the Yellow
Pages master machine, where it
is converted into the
.SM YP
database
.BR publickey.byname .
.SH SEE ALSO
.BR chkey (1),
.BR publickey (3R),
.BR newkey (8),
.BR ypupdated (8C)
.0i +1.0i
#
# Internet (\s-1IP\s0) protocols
#
ip	0	\s-1IP\s0	# internet protocol, pseudo pro./share/man/man5/queuedefs.5                                                                           755       0      12         4740  4424741513  10772                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)queuedefs.5 1.8 89/03/27 SMI
.TH QUEUEDEFS 5 "22 March 1989"
.SH NAME
queuedefs \- queue description file for at, batch, and cron
.SH SYNOPSIS
.LP
.B /var/spool/cron/queuedefs
.SH DESCRIPTION
.IX "queuedefs file" "" "\fLqueuedefs\fP file"
.LP
The
.B queuedefs
file describes the characteristics of the queues managed by
.BR cron (8).
Each non-comment line in this file describes one queue.
The format of the lines are as follows:
.RS
.LP
\fIq\fB.\fR[\fInjob\fBj\fR][\fInice\fBn\fR][\fInwait\fBw\fR]
.RE
.LP
The fields in this line are:
.TP
.I q
The name of the queue.
.B a
is the default queue for jobs started by
.BR at (1);
.B b
is the default queue for jobs started by
.B batch
(see
.BR at (1));
.B c
is the default queue for jobs run from a
.BR crontab (5)
file.
.TP
.I njob
The maximum number of jobs that can be run simultaneously in that queue; if
more than
.I njob
jobs are ready to run, only the first
.I njob
jobs will be run, and the others will be run as jobs that are currently running
terminate.  The default value is 100.
.TP
.I nice
The
.BR nice (1)
value to give to all jobs in that queue that are not run with a user
.SM ID
of super-user.  The default value is 2.
.TP
.I nwait
The number of seconds to wait before rescheduling a job that was deferred
because more than
.I njob
jobs were running in that job's queue, or because more than 25 jobs were
running in all the queues.  The default value is 60.
.LP
Lines beginning with
.B #
are comments, and are ignored.
.SH EXAMPLE
.RS
.nf
.ft B
#
# @(#)queuedefs 1.1 87/02/18 SMI; from S5R3
#
a.4j1n
b.2j2n90w
.RE
.fi
.ft R
.LP
This file specifies that the
.B a
queue, for
.B at
jobs, can have up to 4 jobs running simultaneously; those jobs will be run with
a
.B nice
value of 1.  As no
.I nwait
value was given, if a job cannot be run because too many other jobs are running
.B cron
will wait 60 seconds before trying again to run it.
The
.B b
queue, for
.B batch
jobs, can have up to 2 jobs running simultaneously; those jobs will be run with
a
.B nice
value of 2.  If a job cannot be run because too many other jobs are running,
.B cron
will wait 90 seconds before trying again to run it.
All other queues can have up to 100 jobs running simultaneously; they will be
run with a
.B nice
value of 2, and if a job cannot be run because too many other jobs are running
.B cron
will wait 60 seconds before trying again to run it.
.SH FILES
.PD 0
.TP 20
.B /var/spool/cron/queuedefs
.PD 
.SH "SEE ALSO"
.BR at (1),
.BR nice (1),
.BR crontab (5),
.BR cron (8)
was run, and to change the umask./share/man/man5/rasterfile.5                                                                          755       0      12         4721  4424741513  11143                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rasterfile.5 1.10 89/03/27 SMI; Sun-specific
.TH RASTERFILE 5 "19 October 1987"
.SH NAME
rasterfile \- Sun's file format for raster images
.SH SYNOPSIS
.B #include <rasterfile.h>
.SH DESCRIPTION
.LP
A rasterfile is composed of three parts:
first, a header containing 8 integers;
second, a (possibly empty) set of colormap values;
and third, the pixel image, stored a line at
a time, in increasing
.I y
order.  The image is layed out in the file
as in a memory pixrect.  Each line of the
image is rounded up to the nearest 16 bits.
.IX "rasterfile"
.LP
The header is defined by the following structure:
.LP
.RS
.nf
.ft B
struct rasterfile {
	int	ras_magic;
	int	ras_width;
	int	ras_height;
	int	ras_depth;
	int	ras_length;
	int	ras_type;
	int	ras_maptype;
	int	ras_maplength;
};
.fi
.ft R
.RE
.LP
The
.I ras_magic
field always contains the following constant:
.IP
.B #define	\s-1RAS_MAGIC\s0	0x59a66a95
.LP
The
.IR ras_width ,
.IR ras_height ,
and
.I ras_depth
fields contain the image's width and height in pixels,
and its depth in bits per pixel, respectively.
The depth is either 1 or 8, corresponding
to standard frame buffer depths.  The
.I ras_length
field contains the length in bytes of the image data.
For an unencoded image, this number is
computable from the
.IR ras_width ,
.IR ras_height ,
and
.I ras_depth
fields, but for an encoded image it must be explicitly stored in
order to be available without decoding the image itself.
Note: the length of the header and of
the (possibly empty)
colormap values are not included in the value of the
.I ras_length
field; it is only the image data length.
For historical reasons, files of type
.SM RT_OLD
will usually have a 0 in the
.I ras_length
field, and software expecting to encounter such files
should be prepared to compute the actual
image data length if needed.  The
.I ras_maptype
and
.I ras_maplength
fields contain the type and length in
bytes of the colormap values, respectively.  If
.I ras_maptype
is not
.SM RMT_NONE
and the
.I ras_maplength
is not 0, then the colormap values are the
.I ras_maplength
bytes immediately after the header.
These values are either uninterpreted
bytes (usually with the
.I ras_maptype
set to
.SM RMT_RAW\s0)
or the equal length red, green and blue
vectors, in that order (when the
.I ras_maptype
is
.SM RMT_EQUAL_RGB\s0).
In the latter case, the
.I ras_maplength
must be three times the size in bytes
of any one of the vectors.
.SH FILES
.PD 0
.TP 20
.B /usr/include/rasterfile.h
.PD
.SH SEE ALSO
.TX SVPG
rd
.B num
in the
.B type
column of the capabili./share/man/man5/remote.5                                                                              755       0      12        11054  4424741513  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)remote.5 1.15 89/03/27 SMI; from UCB 4.2
.TH REMOTE 5 "22 March 1989"
.SH NAME
remote \- remote host description file
.SH SYNOPSIS
.B /etc/remote
.SH DESCRIPTION
.IX  "remote file"  ""  "\fLremote\fP \(em remote host descriptions"
.LP
The systems known by
.BR tip (1C)
and their attributes are stored in an
.SM ASCII
file which is structured somewhat like the
.BR termcap (5)
file.  Each line in the file provides
a description for a single
.IR system .
Fields are separated by a colon
.RB ` : '.
Lines ending in a
.RB ` \e '
character with an immediately following
.SM NEWLINE
are continued on the next line.
.LP
The first entry is the name(s) of the host system.
If there is more than one name for a system,
the names are separated by vertical bars.
After the name of the system comes the fields
of the description.  A field name followed by an
.RB ` = '
sign indicates a string value follows.  A field
name followed by a
.RB ` # '
sign indicates a following numeric value.
.LP
Entries named
.B tip*
and
.B cu*
are used as default entries by
.BR tip ,
and the
.B cu
interface to
.BR tip ,
as follows.  When
.B tip
is invoked with only a phone number,
it looks for an entry of the form
.BR tip300 ,
where 300 is the baud rate with
which the connection is to be made.  When the
.B cu
interface is used, entries of the form
.B cu300
are used.
.SH CAPABILITIES
.LP
Capabilities are either strings
.BR (str) ,
numbers
.BR (num) ,
or boolean flags
.BR (bool) .
A string capability is specified by
.IR capability = value ;
for example,
.RB ` dv=/dev/harris '.
A numeric capability is specified by
.IR capability # value ;
for example,
.RB ` xa#99 '.
A boolean capability is specified by simply listing
the capability.
.TP
.B at
.B (str)
Auto call unit type.
The following lists valid
.RB ' at '
types and their corresponding hardware:
.RS
.RS
.PD 0
.TP 10
.B biz31f
Bizcomp
.TP
.B biz31w
Bizcomp
.TP
.B biz22f
Bizcomp
.TP
.B biz22w
Bizcomp
.TP
.B df02
DEC modem
.TP
.B df03
DEC modem
.TP
.B ventel
212+
.TP
.B v3451
Vadic
.TP
.B v831
Vadic
.TP
.B hayes
Any Hayes compatable hardware
.TP 
.B at
Any Hayes compatable hardware
.PD
.RE
.RE
.TP
.B br
.B (num)
The baud rate used in establishing a
connection to the remote host.
This is a decimal number.
The default baud rate is 300 baud.
.TP
.B cm
.B (str)
An initial connection message to be sent to the remote host.
For example, if a host is reached through port selector,
this might be set to the
appropriate sequence required to switch to the host.
.TP
.B cu
.B (str)
Call unit if making a phone call.
Default
is the same as the
.I dv
field.
.TP
.B di
.B (str)
Disconnect message sent to the host
when a disconnect is requested by the user.
.TP
.B du
.B (bool)
This host is on a dial-up line.
.TP
.B dv
.B (str)
.BR device (s)
to open to establish a connection.
If this file refers to a terminal line,
.BR tip (1C)
attempts to perform an exclusive open
on the device to insure only
one user at a time has access to the port.
.TP
.B el
.B (str)
Characters marking an
.SM EOF\s0.
The default is
.SM NULL\s0.
.B tip
only recognizes
.RB ` \s+2~\s0 '
escapes after one of the characters in
.BR el ,
or after a
.SM RETURN\s0.
.TP
.B fs
.B (str)
Frame size for transfers.
The default frame size is equal to
.SM BUFSIZ\s0.
.TP
.B hd
.B (bool)
The host uses half-duplex communication,
local echo should be performed.
.TP
.B ie
.B (str)
Input
.SM EOF
marks.  The default is
.SM NULL\s0.
.TP
.B oe
.B (str)
Output
.SM EOF
string.  The default is
.SM NULL\s0.
When
.B tip
is transferring a file, this string is sent
at
.SM EOF\s0.
.TP
.B pa
.B (str)
The type of parity to use when sending
data to the host.  This may be one
of \(lqeven\(rq, \(lqodd\(rq, \(lqnone\(rq, \(lqzero\(rq (always
set bit 8 to zero), \(lqone\(rq (always set bit
8 to 1).  The default is \(lqnone\(rq.
.TP
.B pn
.B (str)
Telephone number(s) for this host.
If the telephone number field contains an
.RB ` @ '
sign,
.B tip
searches the
.B /etc/phones
file for a list of telephone numbers \(em see
.BR phones (5).
A
.RB ` % '
sign in the telephone number indicates a
5-second delay for the Ventel Modem.
.TP
.B tc
.B (str)
Indicates that the list of capabilities is continued
in the named description.  This is used
primarily to share common capability information.
.LP
Here is a short example showing the use
of the capability continuation feature:
.LP
.nf
.ft B
.ta 0.5i
\s-1UNIX\s0-1200:\e
	:dv=/dev/cua0:el=^D^U^C^S^Q^O@:du:at=ventel:ie=#$%:oe=^D:br#1200:
arpavax|ax:\e
	:pn=7654321%:tc=\s-1UNIX\s0-1200
.ft R
.fi
.SH FILES
.PD 0
.TP 20
.B /etc/remote
.TP
.B /etc/phones
.PD
.SH "SEE ALSO"
.BR tip (1C),
.BR phones (5),
.BR termcap (5)
 4.2
.TH REMOTE 5 "22 March 1989"
.SH NAME
remote \- remote host description file
.SH SYNOPSIS
.B /etc/remote
.SH DESCRIPTION
.IX  "remote file"  ""  "\fLremote\fP \(em remote host descriptions"
.LP
The systems known by
.BR tip (1C)
and their attributes are stored in an
.SM ASCII
file which is structured somewhat like the
.BR termcap (5)
file.  Each line in the file provides
a description for a single
.IR system .
Fields are separated by a colon
.RB ` : '.
Lines e./share/man/man5/resolv.conf.5                                                                         755       0      12         3711  4424741513  11237                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)resolv.conf.5 1.19 89/03/27 SMI; from UCB 4.3 BSD
.\"
.TH RESOLV.CONF 5 "25 March 1989"
.SH NAME
resolv.conf \- configuration file for name server routines
.SH DESCRIPTION
.IX "resolv.conf file" "" "\fLresolv.conf\fR file \(em name server initialization info"
.LP
The resolver configuration file contains
information that is read
by the resolver routines the first time
they are invoked in a process.
The file is designed to be human readable
and contains a list of
keyword-value pairs that provide various types
of resolver information.
.IP
.I keyword	value
.LP
The different configuration options are:
.TP 20
.BI nameserver " address"
The Internet address (in dot
notation) of a name server
that the resolver should query.  At least one
name server should be listed.  Up to
.SM MAXNS
(currently 3) name servers may be listed, in that
case the resolver library queries tries them
in the order listed.  (The algorithm used is to
try a name server, and if the query times out,
try the next, until out of name servers, then
repeat trying all the name servers
until a maximum number of retries are made).
.TP
.BI domain " name"
The default domain to append to names that do
not have a dot in them.  This defaults to
the domain set by the
.BR domainname (1)
command.
.TP
.BI address " address"
An Internet address (in dot
notation) of any preferred
networks.  The list of addresses returned
by the resolver will be
sorted to put any addresses on this network
before any others.
.LP
The keyword-value pair must appear on a single line,
and the keyword (for instance,
.BR nameserver )
must start the line.  The value follows
the keyword, separated by white space.
.SH FILES
.PD 0
.TP 20
.B /etc/resolv.conf
.PD
.SH SEE ALSO
.BR domainname (1),
.BR gethostent (3N),
.BR resolver (3),
.BR named (8C)
 ventel
212+
.TP
.B v3451
Vadic
.TP
.B v831
Vadic
.TP
../share/man/man5/rgb.5                                                                                 755       0      12         2025  4424741514   7551                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rgb.5 1.7 89/03/27 SMI;
.TH RGB 5 "19 February 1988"
.SH NAME
rgb \- available colors (by name) for coloredit
.SH SYNOPSIS
.IX "rgb file" "" "\fL.rgb\fP file"
.LP
.B .rgb
.LP
.B $HOME/.rgb
.LP
.B /usr/lib/.rgb
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.B \&.rgb
is an 
.SM ASCII
file containing consecutive lines terminated by newlines.
Each line starts with three integers, each in the range 0-255. 
These integers are the 
.SM RGB 
equivilent for the color named on the 
same line.  At least one tab character delimits the 
last integer from the name field. 
The coloreditor searches for this file, first in the current
directory; next, in the users home directory; and finally, in \fB/usr/lib\fR.
The user can add to or delete from the 
.B \&.rgb 
file that he or she has access to, thus
changing the available color table for subsequent invocations of coloredit.
.SH EXAMPLE
.nf
.IP
0 0 0		Black
0 0 255		Blue
95 159 159	Cadet Blue
66 66 111	Cornflower Blue
107 35 142	Dark Slate Blue
.fi
.SH SEE ALSO
.BR coloredit (1)
 resolver library queries tries them
in the order listed.  (The algorithm used is to
try a name server, and if the query times out,
try the next, until out of name servers, then
repeat trying all the name servers
until a maximum number of retries are made).
.TP
.BI domain " name"
The default domain to append to names that do
not have a dot in them.  This defaults to
the domain set by the
.BR domainname (1)
command.
.TP
.BI address " address"
An Internet address (in dot
notation) of any ./share/man/man5/rhosts.5                                                                              755       0      12           72  4424741514  10261                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rhosts.5 1.3 89/03/27 SMI;
.so man5/hosts.equiv.5
 rpc.5  5    z  
sccsfile.5     z  
services.5     z  sm.5 5 e    z  sm.bak.5      z  
sm.state.5     z  state.5      z  	statmon.5      z  	sunview.5   ,  z  
syslog.conf.5 z  <  z  tar.5 at  L  z  term.5 c  \  z  term.5v   p  z  	termcap.5 p    z  terminfo.5v     z  
textswrc.5     z  toc.5  o    z  translate.5     z  ttys.5      z  ttytab.5      z  	./share/man/man5/rootmenu.5                                                                            755       0      12          325  4424741514  10630                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rootmenu.5 1.4 89/03/27 SMI;
.TH ROOTMENU 5 "2 September 1987"
.SH NAME
rootmenu \- root menu specification for SunView
.SH SYNOPSIS
.B ~/.rootmenu
.br
.B /usr/lib/rootmenu
.SH DESCRIPTION
To be supplied.
 	sunview.5    ,  z  
syslog.conf.5 ,  <  z  tar.5 f.  L  z  term.5 .  \  z  term.5v   p  z  	termcap.5 v     z  terminfo.5v     z  
textswrc.5      z  toc.5 rc    z  translate.5     z  ttys.5 t    z  ttytab.5 5      z  	ttytype.5     z  ./share/man/man5/rpc.5                                                                                 755       0      12         2640  4424741514   7566                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rpc.5 1.10 89/03/27 SMI;
.TH RPC 5  "22 March 1989"
.SH NAME
rpc \- rpc program number data base
.SH SYNOPSIS
.B /etc/rpc
.SH DESCRIPTION
.IX  "rpc program number file"  ""  "\fLrpc\fP \(em rpc name data base"
The
.B rpc
file contains user readable names that
can be used in place of rpc program numbers.
Each line has the following information:
.IP
.I rpc-progam-server	rpc-program-number	aliases
.LP
Items are separated by any number of blanks and/or
tab characters.
A ``#'' indicates the beginning of a comment; characters up to the end of
the line are not interpreted by routines which search the file.
.SH EXAMPLE
.LP
Here is an example of the 
.B /etc/rpc
file from the 
Sun\s-1OS\s0 System.
.LP
.RS
.ft B
.nf
.ta 1.0i +1.0i +1.0i +1.0i
#
#	rpc   1.10   87/04/10
#
portmapper	100000	portmap sunrpc
rstatd	100001	rstat rup perfmeter
rusersd	100002	rusers
nfs	100003	nfsprog
ypserv	100004	ypprog
mountd	100005	mount showmount
ypbind	100007
walld	100008	rwall shutdown
yppasswdd	100009	yppasswd
etherstatd	100010	etherstat
rquotad	100011	rquotaprog quota rquota
sprayd	100012	spray
3270_mapper	100013
rje_mapper	100014
selection_svc	100015	selnsvc
database_svc	100016
rexd	100017	rex
alis	100018
sched	100019
llockmgr	100020
nlockmgr	100021
x25.inr	100022
statmon	100023
status	100024
bootparam	100026
ypupdated	100028	ypupdate
keyserv	100029	keyserver
.fi
.ft
.DT
.RE
.LP
.SH FILES
.B /etc/rpc
.SH "SEE ALSO"
.BR getrpcent (3N)
domainname (1)
command.
.TP
.BI address " address"
An Internet address (in dot
notation) of any ./share/man/man5/sccsfile.5                                                                            755       0      12        15171  4424741514  10620                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sccsfile.5 1.12 89/03/27 SMI; from UCB 4.2
.bd S B 3
.ds F)  \s-1FILES\s+1
.ds W)  \s-1WARNINGS\s+1
.ds X)  \s-1EXAMPLES\s+1
.ds T)  \fB\s-1TABLE\s+1\fR
.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 R)  \fB\s-1RELEASE NUMBER\s+1\fR
.ds S)  \s-1SCCS\s+1
.ds I)  \s-1SID\s+1
.if t .ds )S \\|
.TH SCCSFILE 5 "6 January 1988"
.SH NAME
sccsfile \- format of SCCS file
.SH DESCRIPTION
.IX  "sccsfile file"  ""  "\fLsccsfile\fP \(em SCCS file format"
An \*(S) file is an
.SM ASCII
file.
It consists of six logical parts: the
.IR checksum ,
the
.I "delta table"
(contains information about each delta),
.I "user names"
(contains login names and/or numerical group
.SM ID\s0s
of users who may add deltas),
.I flags
(contains definitions of internal keywords),
.I comments
(contains arbitrary descriptive information about the file), and the
.I body
(contains the actual text lines intermixed with control lines).
.LP
Throughout an \*(S) file there are lines which begin with the
.SM ASCII SOH
(start of heading) character (octal 001).
This character is hereafter referred to as
.I "the control character"
and will be represented graphically as
.RB ` @ '.
Any line described below which is not depicted as beginning with
the control character is prevented from beginning with the control character.
.LP
Entries of the form \*(D) represent a five digit string
(a number between 00000 and 99999).
.LP
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
.RB @ h
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 <type> <\fB\s-1SCCS ID\s+1\fR>  yr/mo/da hr:mi:se  <pgmr>  \*(D)  \*(D)
.if n @d <type> <\fB\s-1SCCS ID\s+1\fR> yr/mo/da hr:mi:se <pgmr> \*(D) \*(D)
.RB @ i " \*(D) " .\|.\|.
.RB @ x " \*(D) " .\|.\|.
.RB @ g " \*(D) " .\|.\|.
.RB @ m " <\*(M) \fInumber\fP>"
.B  \&.
.B  \&.
.B  \&.
.RB @ c " <\fIcomments\fP> " .\|.\|.
.B  \&.
.B  \&.
.B  \&.
.RB @ e
.fi
.if !\ns .in -5
.if \ns .ps +1
.LP
The first line
.RB (@ s )
contains the number of lines
inserted/deleted/unchanged respectively.
The second line
.RB (@ d )
contains the type of the delta
(currently, normal:
.BR D <
and removed:
.BR R ),
the \*(S)
.SM ID
of the delta, the date and time of creation of the delta,
the login name corresponding to the real user
.SM ID
at the time the delta was created,
and the serial numbers of the delta and its predecessor, respectively.
.sp
The
.RB @ i ,
.RB @ x ,
and
.RB @ g
lines contain the serial numbers of deltas
included, excluded, and ignored, respectively. 
These lines are optional.
.LP
The
.RB @ m
lines (optional) each contain one \*(M) number associated with the delta;
the
.RB @ c
lines contain comments associated with the delta.
.LP
The
.RB @ e
line ends the delta table entry.
.TP
.I "User names"
The list of login names and/or numerical group
.SM ID\s0s
of users who may add deltas to the file, separated by
.SM NEWLINE
characters.
The lines containing these login names and/or numerical group
.SM ID\s0s
are surrounded by the bracketing lines
.RB @ u
and
.RB @ U .
An empty list allows anyone to make a delta.
.TP
.I Flags\ \ \ \ \ \ 
Keywords used internally (see
.BR admin (1)
for more information on their use).  Each flag line takes the form:
.RS
.RS
.TP 12
.RB @ f " <\fIflag\fP>"
.RI < "optional text" >
.RE
.RE
.IP
The following flags are defined:
.RS
.RS
.TP 12
.PD 0
.RB @ f " t"
.RI < "type of program" >
.TP
.RB @ f " v"
.RI < "program name" >
.TP
.RB @ f " i"
.TP
.RB @ f " b"
.TP
.RB @ f " m"
.RI < "module name" >
.TP
.RB @ f " f"
.RI < "floor" >
.TP
.RB @ f " c"
.RI < "ceiling" >
.TP
.RB @ f " d"
.RI < "default-sid" >
.TP
.RB @ f " n"
.TP
.RB @ f " j"
.TP
.RB @ f " l"
.RI < "lock-releases" >
.TP
.RB @ f " q"
.RI < "user defined" >
.TP
.RB @ f " e"
.RB < 0 | 1 >
.PD
.RE
.RE
.IP
The
.B t
flag defines the replacement for the
.B 
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 aspect of the
.RB ` "No id keywords" '
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 \(lqfatal\(rq error
(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 on the
.B get
command to cause a branch in the delta tree.  The
.B m
flag defines the first choice
for the replacement text of the
.B sccsfile.5
identification keyword.  The
.B f
flag defines the \(lqfloor\(rq release;
the release below which no deltas may be added.  The
.B c
flag defines the \(lqceiling\(rq release;
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
.B get
command.  The
.B n
flag causes
.B delta
to insert a \(lqnull\(rq delta (a delta that applies
.I no
changes) in those releases that are skipped when a delta is made in a
.I new
release (for example, when delta 5.1 is made after delta 2.7, releases 3 and
4 are skipped).  The absence of the
.B n
flag causes skipped releases to be completely empty.  The
.B j
flag causes
.B 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
.RB ( get (1)
with the
.B \-e
keyletter).  The
.B q
flag defines the replacement for the
.B 
identification keyword.
The 
.B e
flag indicates whether a file is encoded or not.  A
.B 1
indicates that the file is encoded.  Files need to be encoded when
they contain control characters, or when they do not end with a 
.SM NEWLINE\s0.
The
.B e
flag allows for any type of file to be checked in.
.TP
.I Comments
Arbitrary text surrounded by the bracketing lines
.RB @ t
and
.RB @ T .
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 do not begin with the control character, control lines do.
There are three kinds of control lines:
.IR insert , \ delete ,
and
.IR end ,
represented by:
.IP
.RS
.nf
.RB @ I " \*(D)"
.RB @ D " \*(D)"
.RB @ E " \*(D)"
.fi
.RE
.IP
respectively.
The digit string is the serial number corresponding to the delta for the
control line.
.SH "SEE ALSO"
.BR admin (1),
.BR delta (1),
.BR get (1),
.BR prs(1)
l	false	suppress form feeds
sh	bool	false	suppress printing of burst page header
st	str	``status''	status file name
tc	str	\s-1NULL\s0	name of similar printer; must be last	 
tf	str	\s-1NULL\s0	troff data filter (C/A/T phototypesetter)
tr	str	\s-1NULL\s0	trailer string to print when queue empties
vf	str	\s-1NULL\s0	raster image filter
xc	num	0	if lp is a tty, clear local mode bits
xs	num	./share/man/man5/services.5                                                                            755       0      12         2755  4424741514  10634                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)services.5 1.13 89/03/27 SMI; from UCB 4.3 BSD 6.2
.\"
.TH SERVICES 5  "22 March 1989"
.UC 5
.SH NAME
services \- Internet services and aliases
.SH DESCRIPTION
.IX  "inetd.conf file"  ""  "\fLinetd.conf\fP \(em Internet service aliases"
.IX  "internet servers"  ""  "Internet service aliases"
.LP
The
.B services
file contains an entry for each service
available through the
.SM DARPA
Internet.  Each entry consists of a line of the form:
.IP
.I service-name\ \ \ port\|\fB/\|\fPprotocol\ \ \ aliases
.TP 15
.I service-name
This is the official Internet service name.
.TP
.IB port\| / protocol
This field is composed of the port
number and protocol through which
the service is provided (for instance,
.BR 512/tcp ).
.TP
.I aliases
This is a list of alternate names by which
the service might be requested.
.LP
Fields can be separated by any number of spaces or
.SM TAB\s0's.
A
.RB ` # '
(pound-sign) indicates the beginning of a
comment; characters up to the end of the
line are not interpreted by routines which
search the file.
.LP
Service names may contain any printable
character other than a field delimiter,
.SM NEWLINE\s0,
or comment character.
.SH FILES
.PD 0
.TP 20
.B /etc/services
.PD
.SH "SEE ALSO"
.BR getservent (3N),
.BR inetd.conf (5)
.SH BUGS
A name server should be used instead of a static file.
\*(D)  \*(D)
.if n ./share/man/man5/sm.5                                                                                  755       0      12         1505  4424741514   7420                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sm.5 1.10 89/03/27 SMI;
.TH SM 5 "19 October 1987"
.SH NAME
sm, sm.bak, sm.state \- in.statd directory and file structures
.SH SYNOPSIS
.B /etc/sm,
.B /etc/sm.bak,
.B /etc/sm.state
.SH DESCRIPTION
.IX "sm file" "" "\fLsm\fP, file"
.LP
.B /etc/sm
and
.B /etc/sm.bak
are directories generated by
.BR in.statd .
Each entry in
.B /etc/sm
represents the name of the machine to be monitored by the
.B in.statd
daemon.
Each entry in
.B /etc/sm.bak
represents the name of the machine to be notified by the
.B in.statd
daemon upon its recovery.
.LP
.B /etc/sm.state
is a file generated by
.B rpc.statd
to record the its version number.
This version number is incremented each time a crash or
recovery takes place.
.SH FILES
.PD 0
.TP 20
.B /etc/sm
.TP
.B /etc/sm.bak
.TP
.B /etc/sm.state
.PD
.SH "SEE ALSO"
.BR lockd (8C),
.BR statd (8C)
and protocol through which
the service is provided (for instance,
.BR 512/tcp ).
.TP
.I aliases
This is a list of alternate names by which
the service might be requested.
.LP
Fields can b./share/man/man5/sm.bak.5                                                                              755       0      12           62  4424741515  10112                                                                                                                                                                                                                                                                                                                                                                      .so man5/sm.5
.\" @(#)sm.bak.5 1.6 89/03/27 SMI; 
  z  state.5      z  	statmon.5      z  	sunview.5   ,  z  
syslog.conf.5 z  <  z  tar.5 ,  L  z  term.5 .  \  z  term.5v   p  z  	termcap.5 p    z  terminfo.5v     z  
textswrc.5     z  toc.5       z  translate.5     z  ttys.5      z  ttytab.5      z  	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5   @  {   
uuencode.5 @  P  {  vfont.5   d  {  ./share/man/man5/sm.state.5                                                                            755       0      12           64  4424741515  10477                                                                                                                                                                                                                                                                                                                                                                      .so man5/sm.5
.\" @(#)sm.state.5 1.6 89/03/27 SMI; 
  	statmon.5 5     z  	sunview.5    ,  z  
syslog.conf.5 ,  <  z  tar.5 f.  L  z  term.5 .  \  z  term.5v   p  z  	termcap.5 v     z  terminfo.5v     z  
textswrc.5      z  toc.5 rc    z  translate.5     z  ttys.5 t    z  ttytab.5 5      z  	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5 s  @  {   
uuencode.5   P  {  vfont.5   d  {  vgrindefs.5   t  {  ./share/man/man5/state.5                                                                               755       0      12           65  4424741515  10062                                                                                                                                                                                                                                                                                                                                                                      .so man5/statmon.5
.\" @(#)state.5 1.4 89/03/27 SMI;
 	sunview.5 5   ,  z  
syslog.conf.5 ,  <  z  tar.5 f.  L  z  term.5 .  \  z  term.5v   p  z  	termcap.5 v     z  terminfo.5v     z  
textswrc.5      z  toc.5 rc    z  translate.5     z  ttys.5 t    z  ttytab.5 5 t    z  	ttytype.5       z  tzfile.5      z  
updaters.5   ,  z  utmp.5 s  @  {   
uuencode.5 s  P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab./share/man/man5/statmon.5                                                                             755       0      12         1555  4424741515  10474                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)statmon.5 1.12 89/03/27 SMI;
.TH STATMON 5 "19 October 1987"
.SH NAME
sm, sm.bak, state \- statd directories and file structures
.SH SYNOPSIS
.B /etc/sm
.B /etc/sm.bak
.B /etc/state
.SH DESCRIPTION
.IX "status monitor files for network services"
.IX "network services status monitor files"
.LP
.B /etc/sm
and
.B /etc/sm.bak
are directories generated by
.BR statd .
Each entry in
.B /etc/sm
represents the name of the machine to be monitored by the
.B statd
daemon.
Each entry in
.B /etc/sm.bak
represents the name of the machine to be notified by the
.B statd
daemon upon its recovery.
.LP
.B /etc/state
is a file generated by
.B statd
to record its version number.
This version number is incremented each time a crash or
recovery takes place.
.SH FILES
.PD 0
.TP 20
.B /etc/sm
.TP
.B /etc/sm.bak
.TP
.B /etc/state
.PD
.SH "SEE ALSO"
.LP
.BR lockd (8C),
.BR statd (8C)
s provided (for instance,
.BR 512/tcp ).
.TP
.I aliases
This is a list of alternate names by which
the service might be requested.
.LP
Fields can b./share/man/man5/sunview.5                                                                             755       0      12          337  4424741515  10464                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sunview.5 1.4 89/03/27 SMI;
.TH SUNVIEW 5 "2 September 1987"
.SH NAME
sunview \- initialization file for SunView
.SH SYNOPSIS
.B ~/.sunview
.br
.B ~/.suntools
.br
.B /usr/lib/sunview
.SH DESCRIPTION
To be supplied.
te.5     z  ttys.5 t    z  ttytab.5 5      z  	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5 s  @  {   
uuencode.5   P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5  fm.bak
represents./share/man/man5/syslog.conf.5                                                                         755       0      12        15323  4424741516  11272                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)syslog.conf.5 1.15 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983,1986 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SYSLOG.CONF 5 "22 March 1989"
.SH NAME
syslog.conf \- configuration file for syslogd system log daemon
.SH SYNOPSIS
.B /etc/syslog.conf
.SH DESCRIPTION
.IX  "syslog.conf"  ""  "\fLsyslogd.conf\fP \(em system log daemon configuration file"
.IX  "system log configuration file \(em \fLsyslogd.conf\fR
.IX  "configuration file, system log daemon \(em \fLsyslogd\fR"
.LP
The file
.B /etc/syslog.conf
contains information used by the system log daemon,
.BR syslogd (8),
to forward a system message to appropriate
log files and/or users. 
.B syslog
preprocesses this file through
.BR m4 (1V)
to obtain the correct information for certain log files.
.LP
A configuration entry is composed of two
\s-1TAB\s0-separated fields:
.IP
.I "selector		action"
.LP
The
.I selector
field contains a semicolon-separated list
of priority specifications of the form:
.IP
.IB facility . level\c
.RB [ ;\c
.IB facility . level\c
]
.LP
where
.I facility
is a system facility, or comma-separated
list of facilities, and
.I level
is an indication of the severity of the
condition being logged.
Recognized values for
.I facility
include:
.TP 10
.B user
Messages generated by user processes.
This is the default priority for messages from
programs or facilities not listed in
this file.
.TP
.B kern
Messages generated by the kernel.
.TP
.B mail
The mail system.
.TP
.B daemon
System daemons, such as
.BR ftpd (8C),
.BR routed (8C),
etc.
.TP
.B auth
The authorization system:
.BR login (1),
.BR su (1),
.BR getty (8),
etc.
.TP
.B lpr
The line printer spooling system:
.BR lpr (1),
.BR lpc (8),
.BR lpd (8),
etc.
.TP
.B news
Reserved for the
.SM USENET
network news system.
.TP
.B uucp
Reserved for the
.SM UUCP
system; it does not currently use the
.B syslog
mechanism.
.TP
.B cron
The
.BR cron / at
facility;
.BR crontab (1),
.BR at (1),
.BR cron (8),
etc.
.TP
.B local0-7
Reserved for local use.
.TP
.B mark
For timestamp messages produced internally by
.BR syslogd .
.TP
.B *
An asterisk indicates all facilities except for the
.B mark
facility.
.LP
Recognized values for
.I level
are (in descending order of severity):
.TP 10
.B emerg
For panic conditions that would normally
be broadcast to all users.
.TP
.B alert
For conditions that should be corrected immediately,
such as a corrupted system database.
.TP
.B crit
For warnings about critical conditions,
such as hard device errors.
.TP
.B err
For other errors.
.TP
.B warning
For warning messages.
.TP
.B notice
For conditions that are not error conditions,
but may require special handling.
.TP
.B info
Informational messages.
.TP
.B debug
For messages that are normally used only
when debugging a program.
.TP
.B none
Do not send messages from the indicated
.I facility
to the selected file.  For example, a
.I selector
of
.RS
.RS
.ft B
*.debug;mail.none
.ft R
.RE
.RE
.IP
will send all messages
.I except
mail messages to the selected file.
.br
.ne 8
.LP
The
.I action
field indicates where to forward the message.
Values for this field can have one of four forms:
.TP 3n
\(bu
A filename, beginning with a leading slash,
which indicates that messages specified by the
.I selector
are to be written to the specified file.
The file will be opened in append mode.
.TP
\(bu
The name of a remote host, prefixed with an
.BR @ ,
as with:
.BI @ server\fR,
which indicates that messages specified by the
.I selector
are to be forwarded to the
.B syslogd
on the named host.
.TP
\(bu
A comma-separated list of usernames,
which indicates that messages specified by the
.I selector
are to be written to the named users if they
are logged in.
.TP
\(bu
An asterisk, which indicates that messages
specified by the
.I selector
are to be written to all logged-in users.
.LP
Blank lines are ignored.
Lines for which the first nonwhite character is a
.RB ` # '
are treated as comments.
.SH Sun386i DESCRIPTION
.LP
The file is as described above, except that there is an additional
valid entry type, for translation.
A line containing the keyword "translate," if present, specifies
how system error messages are 
translated, suppressed, or forwarded
to appropriate log files and/or users.
.LP
A translation entry in the file is composed of five
\s-1TAB\s0-separated fields:
.LP
.ta 1i 2i 3i 4i 5i
.ft I
.nf
	translate	source	facility	input	output
.fi
.ft
.LP
The
.I translate
field consists of the word
.B translate
and is used to indicate that this is a translation entry.
.LP
The
.I source
field contains a comma separated list of
source names.  Recognized sources are:
.TP 10
.B klog
Messages placed in
.B /dev/klog
by the kernel.
.TP
.B log
Messages placed in
.B /dev/log
file by local programs.
.TP
.B syslog
Messages placed in the internet socket by programs on other systems.
.TP
.B *
An asterisk indicates all three sources
.RB ( klog ,
.B log
and
.BR syslog ).
.LP
The
.I facility
field contains a comma-separated list of facilities.
.LP
The
.I input
field is the name of the file used to map error messages
(in printf format strings) to numbers.
This number is used to locate a new string in the
file specified in the output field.
The format of both files is described in
.BR translate (5).
.LP
The output file specified by the output field translates the numbers
from the input file into the desired error messages, and also 
specifies the format to be used to 
output each message.
.br
.ne 12
.SH EXAMPLE
With the following configuration file:
.nf
.ft B
.ta 4m +\w'*.alert,auth.warning'u+3
	*.notice;mail.info	/var/log/notice
	*.crit	/var/log/critical
	kern,mark.debug	/dev/console
	kern.err	@server
	*.emerg	*
	*.alert	root,operator
	*.alert;auth.warning	/var/log/auth
.fi
.ft R
.LP
.B syslogd
will log all mail system messages except
.B debug
messages and all
.B notice
(or higher) messages into a file named
.BR /var/log/notice .
It logs all critical messages into
.BR /var/log/critical ,
and all kernel messages and 20-minute
marks onto the system console.
.br
.ne 5
.LP
Kernel messages of
.B err
(error) severity or higher are forwarded
to the machine named
.IR server .
Emergency messages are forwarded to all users.
The users \(lqroot\(rq and \(lqoperator\(rq are informed of any
.B alert
messages.  All messages from the authorization system of
.B warning
level or higher are logged in the file
.BR /var/log/auth .
.SH FILES
.PD 0
.TP 20
.B /etc/syslog.conf
.TP
.B /var/log/notice
.TP
.B /var/log/critical
.TP
.B /var/log/auth
.PD
.SH SEE ALSO
.BR at (1),
.BR crontab (1),
.BR logger (1),
.BR login (1),
.BR lpr (1),
.BR m4 (1V),
.BR su (1),
.BR syslog (3),
.BR translate (5),
.BR cron (8),
.BR ftpd (8C),
.BR getty (8),
.BR lpc (8),
.BR lpd (8),
.BR routed (8C),
.BR syslogd (8)
ing.
.TP
.B info
Informational messages.
.TP
.B debug
For messages that are normally used only
when debugging a program.
.TP
.B none
Do not send messages from the indicated
.I facility
to the selected file.  For example, a
.I selector
of
.RS
.RS
.ft B
*.debug;mail.none
.ft R
.RE
.RE
.IP
will send all./share/man/man5/tar.5                                                                                 755       0      12         7331  4424741516   7574                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tar.5 1.8 89/03/27 SMI; from UCB 4.2
.TH TAR 5  "19 October 1987"
.SH NAME
tar \- tape archive file format
.SH DESCRIPTION
.IX  "tar file"  ""  "\fLtar\fP \(em tape archive file format"
.LP
.BR tar ,
(the tape archive command)
dumps several files into one, in a medium suitable for transportation.
.LP
A ``tar tape'' or file is a series of
blocks.  Each block is of size
.SM TBLOCK\s0.
A file on the tape is represented by a
header block which describes
the file, followed by zero or more blocks
which give the contents of the
file.  At the end of the tape are two blocks
filled with binary zeros, as an
.SM EOF
indicator.
.LP
The blocks are grouped for physical I/O
operations.  Each group of
.I n
blocks (where
.I n
is set by the
.B b
keyletter on the
.BR tar (1)
command line \(em default is 20 blocks) is
written with a single system call; on nine-track
tapes, the result of this write is a single tape
record.  The last group is always written
at the full size, so blocks after
the two zero blocks contain random data. 
On reading, the specified or
default group size is used for the
first read, but if that read returns less than
a full tape block, the reduced
block size is used for further reads, unless the
.B B
keyletter is used.
.LP
The header block looks like:
.RS
.LP
.ft B
.nf
#define \s-1TBLOCK\s0	512
#define \s-1NAMSIZ\s0	100
union hblock {
	char dummy[\s-1TBLOCK\s0];
	struct header {
		char name[\s-1NAMSIZ\s0];
		char mode[8];
		char uid[8];
		char gid[8];
		char size[12];
		char mtime[12];
		char chksum[8];
		char linkflag;
		char linkname[\s-1NAMSIZ\s0];
	} dbuf;
};
.ft R
.fi
.RE
.LP
.IR name
is a
.SM NULL\s0-terminated
string.  The other fields are zero-filled
octal numbers in
.SM ASCII\s0.
Each field (of width
.IR w )
contains w-2 digits, a
.SM SPACE\s0,
and a
.SM NULL\s0,
except
.IR size
and
.IR mtime ,
which do not contain the trailing
.SM NULL\s0.
.IR name
is the name of the file, as specified on the
.B tar
command line.  Files dumped because they were
in a directory which was named in the command
line have the directory name as prefix and
.I /filename
as suffix.
.  \"Whatever format was used in the command line
.  \"will appear here, such as
.  \".I \&./yellow
.  \"or
.  \".IR \&../../brick/./road/.. .
.  \"To retrieve a file from a tar tape, an exact prefix match must be specified,
.  \"including all of the directory prefix information used on the command line
.  \"that dumped the file (if any).
.IR mode
is the file mode, with the top bit masked off.
.IR uid
and
.IR gid
are the user and group numbers which own the file.
.IR size
is the size of the file in bytes.
Links and symbolic links are dumped
with this field specified as zero.
.I mtime
is the modification time of the file at
the time it was dumped.
.I chksum
is a decimal
.SM ASCII
value which represents the sum of all the bytes in the
header block.  When calculating the checksum, the
.IR chksum
field is treated as if it were all blanks.
.IR linkflag
is
.SM ASCII
`0' if the file is ``normal'' or a special file,
.SM ASCII
`1' if it is an hard link, and
.SM ASCII
`2' if it is a symbolic link.
The name linked-to, if any, is in
.IR linkname ,
with a trailing
.SM NULL\s0.
Unused fields of the header are binary
zeros (and are included in the checksum).
.LP
The first time a given inode number is dumped,
it is dumped as a regular file.  The second and
subsequent times, it is dumped as a link instead.
Upon retrieval, if a link entry is retrieved,
but not the file it was linked to, an error message
is printed and the tape must be manually
re-scanned to retrieve the linked-to file.
.LP
The encoding of the header is designed to be
portable across machines.
.SH "SEE ALSO"
.BR tar (1)
.SH BUGS
Names or linknames longer than
.SM NAMSIZ
produce error reports and cannot be dumped.
are logged in.
.TP
\(bu
An asterisk, which indicates that messages
specified by the
.I selector
are to be written to all logged-in users.
.LP
Blank lines are ignored.
Lines for which the first nonwhite character is a
.RB ` # '
are treated as comments.
.SH Sun386i DESCRIPTION
.LP
The file is as ./share/man/man5/term.5                                                                                755       0      12        24145  4424741516   7777                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)term.5 1.21 89/03/27 SMI; from Usenet
.TH TERM 5 "16 February 1988"
.SH NAME
term \- terminal driving tables for nroff
.SH SYNOPSIS
.BI /usr/lib/term/tab name
.SH DESCRIPTION
.IX  "term file"  ""  "\fLterm\fP \(em terminal driving tables"
.LP
.BR nroff (1)
uses driving tables to customize its output for various types of
output devices, such as terminals, line printers, daisy-wheel printers,
or special output filter programs.  These driving tables are written
as C programs, compiled, and installed in the directory
.BR /usr/lib/term .
The
.I name
of the output device is specified with the
.B \-T
option of
.BR nroff .
The structure of the terminal table is as follows:
.LP
.RS
.nf
.ft B
.ta 5m 10m 15m 20m 25m 30m 35m 40m 45m 50m 55m 60m
#define	\s-1INCH\s0	240
.sp .5
struct {
	int bset;
	int breset;
	int Hor;
	int Vert;
	int Newline;
	int Char;
	int Em;
	int Halfline;
	int Adj;
	char *twinit;
	char *twrest;
	char *twnl;
	char *hlr;
	char *hlf;
	char *flr;
	char *bdon;
	char *bdoff;
	char *ploton;
	char *plotoff;
	char *up;
	char *down;
	char *right;
	char *left;
	char *codetab[256\-32];
	char *zzz;
} t;
.ft R
.fi
.RE
.LP
The meanings of the various fields are as follows:
.TP 10
.B bset
Bits to set in the
.B sg_flags
field of the
.B sgtty
structure before output; see
.BR ttcompat (4M).
.TP
.B breset
Bits to reset in the
.B sg_flags
field of the
.B sgtty
structure after output; see
.BR ttcompat (4M).
.TP
.B Hor
Horizontal resolution in fractions of an inch.
.TP
.B Vert
Vertical resolution in fractions of an inch.
.TP
.B Newline
Space moved by a
.SM NEWLINE
(\s-1LINEFEED\s0) character in fractions
of an inch.
.TP
.B Char
Quantum of character sizes, in fractions of an inch.
(that is, a character is a multiple of
.B Char
units wide)
.TP
.B Em
Size of an em in fractions of an inch.
.TP
.B Halfline
Space moved by a half-\s-1LINEFEED\s0
(or half-reverse-\s-1LINEFEED\s0)
character in fractions of an inch.
.TP
.B Adj
Quantum of white space, in fractions of an inch.
(that is, white spaces are a multiple of
.B Adj
units wide)
.IP
Note: if this is less than the size of the
.SM SPACE
character (in units of
.BR Char ;
see below for how the sizes of characters are defined),
.B nroff
will output
fractional
.SM SPACE
characters using plot mode.  Also, if the
.B \-e
switch to
.B nroff
is used,
.B Adj
is set equal to
.B Hor
by
.BR nroff .
.TP
.B twinit
Set of characters used to initialize the terminal
in a mode suitable for
.BR nroff .
.TP
.B twrest
Set of characters used to restore the terminal to
normal mode.
.TP
.B twnl
Set of characters used to move down one line.
.TP
.B hlr
Set of characters used to move up one-half line.
.TP
.B hlf
Set of characters used to move down one-half line.
.TP
.B flr
Set of characters used to move up one line.
.TP
.B bdon
Set of characters used to turn on hardware boldface mode,
if any.
.TP
.B bdoff
Set of characters used to turn off hardware boldface mode,
if any.
.TP
.B ploton
Set of characters used to turn on hardware plot mode
(for Diablo type mechanisms), if any.
.TP
.B plotoff
Set of characters used to turn off hardware plot mode
(for Diablo type mechanisms), if any.
.TP
.B up
Set of characters used to move up one resolution unit
.RB ( Vert )
in plot mode, if any.
.TP
.B down
Set of characters used to move down one resolution unit
.RB ( Vert )
in plot mode, if any.
.TP
.B right
Set of characters used to move right one resolution unit
.RB ( Hor )
in plot mode, if any.
.TP
.B left
Set of characters used to move left one resolution unit
.RB ( Hor )
in plot mode, if any.
.TP
.B codetab
Definition of characters needed to print an
.B nroff
character
on the terminal.
The first byte is the number of character units
.RB ( Char )
needed to hold the
character; that is,
.B \e001
is one unit wide,
.B \e002
is two units wide, etc.  The high-order bit (0200) is on if
the character is to be underlined in underline mode
.RB ( \&.ul ).
The rest of the bytes are the characters used to produce the character in
question.  If the character has the sign (0200) bit on,
it is a code to move the terminal in plot mode.  It is
encoded as:
.RS
.RS
.TP 12
0100 bit on
vertical motion.
.TP
0100 bit off
horizontal motion.
.TP
040 bit on
negative (up or left) motion.
.TP
040 bit off
positive (down or right) motion.
.TP
037 bits
number of such motions to make.
.RE
.RE
.TP
.B zzz
A zero terminator at the end.
.LP
All quantities which are in units of fractions of an inch should
be expressed as
.BI `\s-1INCH\s0* num / denom ',
where
.I num
and
.I denom
are respectively the numerator and denominator of the fraction; that is,
1/48 of an inch would be written as
.RB ` \s-1INCH\s0/48 '.
.LP
If any sequence of characters does not pertain to the output device,
that sequence should be given as a null string.
.LP
The following is a sample
.B codetab
encoding.
.IP
.TS
lfB lfB .
.\" by Bill Tuthill, 15dec82
"\e001 ",	/*space*/
"\e001!",	/*!*/
"\e001\e"",	/*"*/
"\e001#",	/*#*/
"\e001$",	/*$*/
"\e001%",	/*%*/
"\e001&",	/*&*/
"\e001'",	/*'*/
"\e001(",	/*(*/
"\e001)",	/*)*/
"\e001*",	/***/
"\e001+",	/*+*/
"\e001,",	/*,*/
"\e001-",	/*-*/
"\e001.",	/*.*/
"\e001/",	/*/*/
"\e2010",	/*0*/
"\e2011",	/*1*/
"\e2012",	/*2*/
"\e2013",	/*3*/
"\e2014",	/*4*/
"\e2015",	/*5*/
"\e2016",	/*6*/
"\e2017",	/*7*/
"\e2018",	/*8*/
"\e2019",	/*9*/
"\e001:",	/*:*/
"\e001;",	/*;*/
"\e001<",	/*<*/
"\e001=",	/*=*/
"\e001>",	/*>*/
"\e001?",	/*?*/
"\e001@",	/*@*/
"\e201A",	/*A*/
"\e201B",	/*B*/
"\e201C",	/*C*/
"\e201D",	/*D*/
"\e201E",	/*E*/
"\e201F",	/*F*/
"\e201G",	/*G*/
"\e201H",	/*H*/
"\e201I",	/*I*/
"\e201J",	/*J*/
"\e201K",	/*K*/
"\e201L",	/*L*/
"\e201M",	/*M*/
"\e201N",	/*N*/
"\e201O",	/*O*/
"\e201P",	/*P*/
"\e201Q",	/*Q*/
"\e201R",	/*R*/
"\e201S",	/*S*/
"\e201T",	/*T*/
"\e201U",	/*U*/
"\e201V",	/*V*/
"\e201W",	/*W*/
"\e201X",	/*X*/
"\e201Y",	/*Y*/
"\e201Z",	/*Z*/
"\e001[",	/*[*/
"\e001\e\e",	/*\e*/
"\e001]",	/*]*/
"\e001^",	/*^*/
"\e001_",	/*_*/
"\e001`",	/*`*/
"\e201a",	/*a*/
"\e201b",	/*b*/
"\e201c",	/*c*/
"\e201d",	/*d*/
"\e201e",	/*e*/
"\e201f",	/*f*/
"\e201g",	/*g*/
"\e201h",	/*h*/
"\e201i",	/*i*/
"\e201j",	/*j*/
"\e201k",	/*k*/
"\e201l",	/*l*/
"\e201m",	/*m*/
"\e201n",	/*n*/
"\e201o",	/*o*/
"\e201p",	/*p*/
"\e201q",	/*q*/
"\e201r",	/*r*/
"\e201s",	/*s*/
"\e201t",	/*t*/
"\e201u",	/*u*/
"\e201v",	/*v*/
"\e201w",	/*w*/
"\e201x",	/*x*/
"\e201y",	/*y*/
"\e201z",	/*z*/
"\e001{",	/*{*/
"\e001|",	/*|*/
"\e001}",	/*}*/
"\e001~",	/*~*/
"\e000\e0",	/*narrow sp*/
"\e001-",	/*hyphen*/
"\e001\e016Z\e017",	/*bullet*/
"\e002[]",	/*square*/
"\e002--",	/*3/4 em dash*/
"\e001_",	/*rule*/
"\e0031/4",	/*1/4*/
"\e0031/2",	/*1/2*/
"\e0033/4",	/*3/4*/
"\e001-",	/*minus*/
"\e202fi",	/*fi*/
"\e202fl",	/*fl*/
"\e202ff",	/*ff*/
"\e203ffi",	/*ffi*/
"\e203ffl",	/*ffl*/
"\e001\e016p\e017",	/*degree*/
"\e001|\eb\e342-\e302",	/*dagger*/
"\e001\e301s\e343s\e302",	/*section*/
"\e001'",	/*foot mark*/
"\e001\e033Z",	/*acute accent*/
"\e001`",	/*grave accent*/
"\e001_",	/*underrule*/
"\e001/",	/*long slash*/
"\e000\e0",	/*half narrow space*/
"\e001 ",	/*unpaddable space*/
"\e001\e016A\e017",	/*alpha*/
"\e001\e016B\e017",	/*beta*/
"\e001\e016C\e017",	/*gamma*/
"\e001\e016D\e017",	/*delta*/
"\e001\e016E\e017",	/*epsilon*/
"\e001\e016F\e017",	/*zeta*/
"\e001\e016G\e017",	/*eta*/
"\e001\e016H\e017",	/*theta*/
"\e001\e016I\e017",	/*iota*/
"\e001\e016J\e017",	/*kappa*/
"\e001\e016K\e017",	/*lambda*/
"\e001\e016L\e017",	/*mu*/
"\e001\e016M\e017",	/*nu*/
"\e001\e016N\e017",	/*xi*/
"\e001\e016O\e017",	/*omicron*/
"\e001\e016P\e017",	/*pi*/
"\e001\e016Q\e017",	/*rho*/
"\e001\e016R\e017",	/*sigma*/
"\e001\e016S\e017",	/*tau*/
"\e001\e016T\e017",	/*upsilon*/
"\e001\e016U\e017",	/*phi*/
"\e001\e016V\e017",	/*chi*/
"\e001\e016W\e017",	/*psi*/
"\e001\e016X\e017",	/*omega*/
"\e001\e016#\e017",	/*Gamma*/
"\e001\e016$\e017",	/*Delta*/
"\e001\e016(\e017",	/*Theta*/
"\e001\e016+\e017",	/*Lambda*/
"\e001\e016.\e017",	/*Xi*/
"\e001\e0160\e017",	/*Pi*/
"\e001\e0169\e017",	/*Sigma*/
"\e000",	/**/
"\e001\e0164\e017",	/*Upsilon*/
"\e001\e0165\e017",	/*Phi*/
"\e001\e0167\e017",	/*Psi*/
"\e001\e0168\e017",	/*Omega*/
"\e001\e016[\e017",	/*square root*/
"\e001\e016Y\e017",	/*\e(ts yields script-l*/
"\e001\e016k\e017",	/*root en*/
"\e001>\eb_",	/*>=*/
"\e001<\eb_",	/*<=*/
"\e001=\eb_",	/*identically equal*/
"\e001-",	/*equation minus*/
"\e001\e016o\e017",	/*approx =*/
"\e001\e016n\e017",	/*approximates*/
"\e001=\eb/",	/*not equal*/
"\e002-\e242-\e202>",	/*right arrow*/
"\e002<\eb\e202-\e242\e200-",	/*left arrow*/
"\e001|\eb^",	/*up arrow*/
"\e001|\eb\e302v\e342",	/*down arrow*/
"\e001=",	/*equation equal*/
"\e001\e016|\e017",	/*multiply*/
"\e001\e016}\e017",	/*divide*/
"\e001\e016j\e017",	/*plus-minus*/
"\e001\e243|\e203_\e203|\e243",	/*cup (union)*/
"\e001\e243|\e203\e351_\e311\e203|\e243",	/*cap (intersection)*/
"\e001\e243(\e203\e302-\e345-\e303",	/*subset of*/
"\e001\e302-\e345-\e303\e203)\e243",	/*superset of*/
"\e001_\eb\e243(\e203\e302-\e345-\e303",	/*improper subset*/
"\e001_\eb\e302-\e345-\e303\e203)\e243",	/*improper superset*/
"\e001\e016~\e017",	/*infinity*/
"\e001\e200o\e201\e301`\e241\e341`\e241\e341`\e201\e301",	/*partial derivative*/
"\e001\e016:\e017",	/*gradient*/
"\e001\e200-\e202\e341,\e301\e242",	/*not*/
"\e001\e016?\e017",	/*integral sign*/
"\e002o\e242c\e202",	/*proportional to*/
"\e001O\eb/",	/*empty set*/
"\e001<\eb\e341-\e302",	/*member of*/
"\e001+",	/*equation plus*/
"\e003(R)",	/*registered*/
"\e003(C)",	/*copyright*/
"\e001|",	/*box rule */
"\e001\e033Y",	/*cent sign*/
"\e001|\eb\e342=\e302",	/*double dagger*/
"\e002=>",	/*right hand*/
"\e002<=",	/*left hand*/
"\e001*",	/*math * */
"\e001\e0162\e017",	/*\e(bs yields small sigma*/
"\e001|",	/*or (was star)*/
"\e001O",	/*circle*/
"\e001|",	/*left top of big brace*/
"\e001|",	/*left bot of big brace*/
"\e001|",	/*right top of big brace*/
"\e001|",	/*right bot of big brace*/
"\e001\e016]\e017",	/*left center of big brace*/
"\e001\e016\e\e\e017",	/*right center of big brace*/
"\e001|",	/*bold vertical*/
"\e001|",	/*left floor (lb of big bracket)*/
"\e001|",	/*right floor (rb of big bracket)*/
"\e001|",	/*left ceiling (lt of big bracket)*/
"\e001|"	/*right ceiling (rt of big bracket)*/
.TE
.SH FILES
.PD 0
.TP 25
.BI /usr/lib/term/tab name
driving tables
.TP
.B /usr/lib/term/README
list of terminals supported by
.BR nroff (1) 
.PD
.SH SEE ALSO
.BR nroff (1),
.BR ttcompat (4M)
defined, the value of the symbol is added to this offset, and the
sum is inserted into the bytes in the text or data segment.
.LP
If relocation information is present, it amounts to twelve bytes per
relocatable datum as in the following structure:
.LP
.RS
.nf
.ft B
.ta 4n; +22n; +22n; +22n; +8n; +8n
enum reloc_type
{
	RELOC_8,	RELOC_16,	RELOC_32,	/* simplest relocs */
	RELOC_DISP8,	RELOC_DISP16,	RELOC_DISP32./share/man/man5/term.5v                                                                               755       0      12        13212  4424741516  10156                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)term.5v 1.9 89/03/27 SMI; from S5
.TH TERM 5V "19 October 1987"
.SH NAME
term \- format of compiled term file
.SH SYNOPSIS
.B term
.SH DESCRIPTION
.IX "term file" "" "\fLterm\fR \(em compiled term file format"
.LP
Compiled
.B terminfo
descriptions are placed under the directory
.BR /usr/share/lib/terminfo .
In order to avoid a linear search of a huge
system directory, a
two-level scheme is used:
.B /usr/share/lib/terminfo/c/name
where
.I name
is the name of the terminal, and
.I c
is the first character of
.IR name .
Thus,
.I act4
can be found in the file
.BR /usr/share/lib/terminfo/a/act4 .
Synonyms for the same terminal are
implemented by multiple
links to the same compiled file.
.LP
The format has been chosen so that it
will be the same on all hardware.
An 8 or more bit byte is assumed, but no
assumptions about byte ordering
or sign extension are made.
.LP
The compiled file is created with the
.BR tic (8V)
program, and read by the routine
.B setupterm
(see
.BR curses (3V)).
Both of these pieces of software are part of
.BR curses (3V).
The file is divided into six parts:
.RS
.nf
the header,
terminal names,
boolean flags,
numbers,
strings,
and
string table.
.fi
.RE
.LP
The header section begins the file.
This section contains six short integers in the format
described below.
These integers are:
.nf
.RS
(1) the magic number (octal 0432);
(2) the size, in bytes, of the names section;
(3) the number of bytes in the boolean section;
(4) the number of short integers in the numbers section;
(5) the number of offsets (short integers) in the strings section;
(6) the size, in bytes, of the string table.
.fi
.RE
.LP
Short integers are stored in two 8-bit bytes.
The first byte contains the least
significant 8 bits of the value,
and the second byte contains the most
significant 8 bits.
(Thus, the value represented is 256*second+first.)
The value \-1 is represented by 0377, 0377,
other negative value are illegal.  The
\-1 generally means that a capability
is missing from this terminal.
Note: this format corresponds to the hardware of the
.SM VAX\s0
and
.SM PDP\s0-11.
Machines where this does not correspond
to the hardware read the
integers as two bytes and compute the result.
.LP
The terminal names section comes next.
It contains the first line of the terminfo description,
listing the various names for the terminal,
separated by the
.RB ` | '
character.  The section is terminated with an
.SM ASCII NUL\s0
character.
.LP
The boolean flags have one byte for each flag.
This byte is either 0 or 1 as the flag
is present or absent.
The capabilities are in the same order as the file
.BR <term.h> .
.LP
Between the boolean section and the number section, a
.SM NULL
byte will be inserted, if necessary,
to ensure that the number section begins on an even byte.
All short integers are aligned on a short word boundary.
.LP
The numbers section is similar to the flags section.
Each capability takes up two bytes,
and is stored as a short integer.
If the value represented is \-1, the capability is taken to be missing.
.LP
The strings section is also similar.
Each capability is stored as a short integer, in the format above.
A value of \-1 means the capability is missing.
Otherwise, the value is taken as an offset from the beginning
of the string table.  Special characters in
.B ^X
or
.B \ec
notation are stored in their
interpreted form, not the printing representation.
Padding information
.BI $< nn >
and parameter information
.BI % x
are stored intact in uninterpreted form.
.LP
The final section is the string table.
It contains all the values of string
capabilities referenced in
the string section.  Each string is
.SM NULL
terminated.
.LP
Note: it is possible for
.B setupterm
to expect a different set of capabilities
than are actually present in the file.
Either the database may have been updated since
.B setupterm
has been recompiled
(resulting in extra unrecognized entries in the file)
or the program may have been recompiled more recently
than the database was updated
(resulting in missing entries).
The routine
.B setupterm
must be prepared for both possibilities \(em
this is why the numbers and sizes are included.
Also, new capabilities must always be added
at the end of the lists
of boolean, number, and string capabilities.
.LP
As an example, an octal dump of the
description for the Microterm
.SM ACT
4 is included:
.nf
.sp
.cs R 20
microterm|act4|microterm act iv,
cr=^M, cud1=^J, ind=^J, bel=^G, am, cub1=^H,
ed=^_, el=^^, clear=^L, cup=^T%p1%c%p2%c,
cols#80, lines#24, cuf1=^X, cuu1=^Z, home=^],
.sp
\s-2000 032 001      \e0 025  \e0  \eb  \e0 212  \e0   "  \e0   m   i   c   r
020   o   t   e   r   m   |   a   c   t   4   |   m   i   c   r   o
040   t   e   r   m       a   c   t       i   v  \e0  \e0 001  \e0  \e0
060  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0  \e0
100  \e0  \e0   P  \e0 377 377 030  \e0 377 377 377 377 377 377 377 377
120 377 377 377 377  \e0  \e0 002  \e0 377 377 377 377 004  \e0 006  \e0
140  \eb  \e0 377 377 377 377  \en  \e0 026  \e0 030  \e0 377 377 032  \e0
160 377 377 377 377 034  \e0 377 377 036  \e0 377 377 377 377 377 377
200 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377 377
*
520 377 377 377 377      \e0 377 377 377 377 377 377 377 377 377 377
540 377 377 377 377 377 377 007  \e0  \er  \e0  \ef  \e0 036  \e0 037  \e0
560 024   %   p   1   %   c   %   p   2   %   c  \e0  \en  \e0 035  \e0
600  \eb  \e0 030  \e0 032  \e0  \en  \e0\s+2
.cs R
.fi
.LP
Some limitations: total compiled entries
cannot exceed 4096 bytes.
The name field cannot exceed 128 bytes.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/*/*
compiled terminal capability data base
.PD
.SH "SEE ALSO"
.BR curses (3V),
.BR terminfo (5V),
.BR tic (8V)

"\e001\e301s\e343s\e302",	/*section*/
"\e001'",	/*foot mark*/
"\e001\e033Z",	/*acute accent*/
"\e001`",	/*grave accent*/
"\e001_",	/*underrule*/
"\e001/",	/*long slash*/
"\e000\e0",	/*half narrow space*/
"\e001 ",	/*unpaddable space*/
"\e001\e016A\e017",	/*alpha*/
"\e001\e016B\e017",	/*beta*/
"\e001\e016C\e017",	/*gamma*/
"\e001\e016D\e017",	/*delta*/
"\e001\e016E\e017",./share/man/man5/termcap.5                                                                             755       0      12        55323  4424741517  10466                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)termcap.5 1.26 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.hw trans-parently
.TH TERMCAP 5 "16 February 1988"
.SH NAME
termcap \- terminal capability data base
.SH DESCRIPTION
.IX  "termcap file"  ""  "\fLtermcap\fP \(em terminal capability data base"
.LP
.B termcap
is a data base describing the capabilities of terminals.
Terminals are described in
.B termcap
source descriptions
by giving a set of capabilities which they have, by describing
how operations are performed, by describing
padding requirements, and by specifying initialization sequences.
This database is used by applications programs such as
.BR vi (1),
and libraries such as
.BR curses (3X),
so they can work with a variety of terminals
without changes to the programs.
.LP
Each
.B termcap
entry consist of a number of colon-separated
.RB ( : ) 
fields.  The first field for each terminal lists the various names by
which it is known, separated by bar ( | ) characters.  The first name is
always two characters long, and is used by older (version 6) systems
(which store the terminal type in a 16-bit word in a system-wide
database).  The second name given is the most common abbreviation for
the terminal (this is the one to which the environment variable
.SB TERM
would normally be set).
The last name should fully identify the terminal's make
and model.  All other names are taken as synonyms for the initial
terminal name.  All names but the first and last should be in lower
case and contain no blanks; the last name may well contain upper case
and blanks for added readability.
.LP
Terminal names (except for the last, verbose entry) should be chosen using
the following conventions:
.TP 3
\(bu
The particular piece of hardware making up the terminal
should have a root name chosen; for example, for the Hewlett-Packard 2621,
.BR hp2621 .
This name should not contain hyphens.
.TP
\(bu
Modes that the hardware can be
in or user preferences should be indicated by appending a hyphen and
an indicator of the mode.  Thus, a
.B vt100
in 132-column mode would be given as:
.BR vt100\-w .
The following suffixes should be used where possible:
.LP
.RS
.RS
.TS
cfI cfI cfI
lfB lfR lfB .
Suffix	Meaning	Example
.sp .5v
\-w	 wide mode (more than 80 columns)	vt100\-w
\-am	with automatic margins (usually default)	vt100\-am
\-nam	without automatic margins	vt100\-nam
\-\fIn\fP	number of lines on the screen	aaa\-60
\-na	no arrow keys (leave them in local)	concept100\-na
\-\fIn\fPp	number of pages of memory	concept100\-4p
\-rv	reverse video	concept100\-rv
.TE
.RE
.RE
.LP
Terminal entries may continue onto multiple lines by giving a 
.B \e
as the last character of a line, and empty fields
may be included for readability (here between the last field on a line
and the first field on the next).
Comments may be included on lines beginning with 
.BR # .
.SS Types of Capabilities
.LP
Terminal capabilities each have a two-letter code, and are of three
types:
.TP 12
.I boolean
These indicate particular features of the terminal.  For instance, an entry
for a terminal that has automatic margins (an automatic
.SM RETURN
and
.SM LINEFEED
when the end of a line is reached) would contain a field with the boolean
capability
.BR am .
.TP
.I numeric
These give the size of the display of some other attribute.
Numeric capabilities are followed by the character 
.RB ` # ',
and a number.  An entry for a teminal with an 80-column display would
have a field containing
.BR co#80 .
.TP
.I string
These indicate the character sequences used to perform particular
terminal operations.  String-valued capabilities, such as
.B ce
(clear-to-end-of-line
sequence) are given by the two-letter code, followed by the character
.RB ` = ',
and a string (which ends at the following
.B :
field delimiter).
.LP
A delay factor, in milliseconds may appear after
the
.RB ` = '.
Padding characters are supplied by
.B tputs
after the remainder of the string is sent.
The delay can be either a number, or a number followed by
the character
.RB ` * ',
which indicates that the proportional padding is required, in which case
the number given is the amount of padding for each line affected by an
operation using that capability.
(In the case of an insert-character operation,
the factor is still the number of
.I lines
affected; this is always 1 unless the terminal has
.B in
and the software uses it.)
.LP
When a 
.B *
is specified, it is sometimes useful to give a delay of the form
.B 3.5
to specify a delay per line to tenths of milliseconds.
(Only one decimal place is allowed.)
.SS Comments
.LP
To comment-out a capability field, insert a
.RB ` . '
(period) as the first character in that field (following the 
.BR : ).
.SS Escape Sequence Codes
A number of escape sequences are provided in the string-valued capabilities
for easy encoding of characters there:
.RS
.TP
.B \eE
.PD 0
maps to
.SM ESC
.TP
.B ^X
maps to 
.SM CTRL-\fIX\fR
for any appropriate character
.I X
.TP
.B \en
maps to
.SM LINEFEED
.TP
.B \er
maps to
.SM RETURN
.TP
.B \et
maps to
.SM TAB
.TP
.B \eb
maps to
.SM BACKSPACE
.TP
.B \ef
maps to
.SM FORMFEED
.PD
.RE
.LP
Finally, characters may be given as three octal digits after a
backslash (for example,
.BR \e123 ),
and the characters
.B ^
(caret)
and
.B \e
(backslash)
may be given as
.B \e^
and
.B \e\e
respectively.
.LP
If it is necessary to place a
.B :
in a capability it must be escaped in octal as
.BR \e072 .
.LP
If it is necessary to place a
.SM NUL
character in a string capability it
must be encoded as
.BR \e200 .
(The routines that deal with
.B termcap
use C strings and strip the high bits of the output very late, so that a
.B \e200
comes out as a
.BR \e000
would.)
.SS Parameterized Strings
.LP
Cursor addressing and other strings requiring parameters are described
by a parameterized string capability, with 
.BR printf (3S)-like
escapes
.RB ( %\fIx\fP\| )
in it; other characters are passed through unchanged.
For example, to address the cursor, the
.B cm
capability is given, using two parameters: the row and column to move
to.  (Rows and columns are numbered from zero and refer to the
physical screen visible to the user, not to any unseen memory.
If the terminal has memory-relative cursor addressing,
that can be indicated by an analogous
.SB CM
capability.)
.LP
The
.B %
escapes have the following meanings:
.RS
.TS
lfB   l   .
.sp .5v
%%	produce the character \fB%\fR
%d	output \fIvalue\fR as in \fBprintf \fB%d\fR
%2	output \fIvalue\fR as in \fBprintf \fB%2d\fR
%3	output \fIvalue\fR as in \fBprintf \fB%3d\fR
%.	output \fIvalue\fR as in \fBprintf \fB%c\fR
%+\fIx\fP	add \fIx\fP to \fIvalue\fR, then do `\fB%\fR.'
%>\fIxy\fP	if \fIvalue\fR > \fIx\fP then add \fIy\fP, no output
%r	reverse order of two parameters, no output
%i	increment by one, no output
%n	exclusive-or all parameters with 0140 (Datamedia 2500)
%B	\s-1BCD\s0 (16*(\fIvalue\fR/10)) + (\fIvalue\fR%10), no output
%D	Reverse coding (\fIvalue\fR \- 2*(\fIvalue\fR%16)), no output (Delta Data)
.TE
.RE
.LP
Consider the Hewlett-Packard 2645, which, to get to row 3 and column
12, needs to be sent 
.B \eE&a12c03Y
padded for 6 milliseconds.  Note: the order of the row and column
coordinates is reversed here and that the row and column are sent as
two-digit integers.  Thus its
.B cm
capability is
.RB ` :cm=6\eE&%r%2c%2Y: '.
Terminals that use 
.RB ` %. '
need to be able to backspace the cursor
.RB ( le )
and to move the cursor up one line on the screen
.RB ( up ).
This is necessary because it is not always safe to transmit
.BR \en ,
.BR ^D ,
and
.BR \er ,
as the system may change or discard them.
(Programs using
.B termcap
must set terminal modes so that
.SM TAB
characters are not expanded, making
.B \et
safe to send.
This turns out to be essential for the Ann Arbor 4080.)
.LP
A final example is the Lear Siegler
.SM ADM\s0\-3a,
which offsets row and column by a blank character, thus it requires
.RB ` ":cm=\eE=%+ %+:" '.
.LP
Row or column absolute cursor addressing can be given as
single-parameter capabilities
.B ch
(horizontal position absolute) and
.B cv
(vertical position absolute).
Sometimes these are shorter than the more general two-parameter sequence
(as with the Hewlett-Packard 2645) and can be used in preference to
.BR cm .
If there are parameterized local motions
(for example, move
.I n
positions to the right)
these can be given as
.BR \s-1DO\s0 ,
.BR \s-1LE\s0 ,
.BR \s-1RI\s0 ,
and
.SB UP
with a single parameter indicating how many positions to move.
These are primarily useful if the terminal does not have
.BR cm ,
such as the Tektronix 4025.
.SS Delays
.LP
Certain capabilities control padding in the terminal driver.
These are primarily needed by hardcopy terminals and are used by the
.B tset (1)
program to set terminal driver modes appropriately.
Delays embedded in the capabilities
.BR cr ,
.BR sf ,
.BR le ,
.BR ff ,
and
.B ta
will set the appropriate delay bits in the terminal driver.
If
.B pb
(padding baud rate) is given, these values can be ignored at baud rates
below the value of
.BR pb .
For 4.2\s-1BSD\s0
.BR tset ,
the delays are given as numeric capabilities
.BR dC ,
.BR dN ,
.BR dB ,
.BR dF ,
and
.BR dT
instead.
.SS Similar Terminals
.LP
If there are two very similar terminals, one can be defined as being
just like the other with certain exceptions.  The string capability
.B tc
can be given with the name of the similar terminal.
This capability must be
.IR last ,
and the combined length of the entries must not exceed 1024.
The capabilities given before
.B tc
override those in the terminal type invoked by
.BR tc .
A capability can be canceled by placing
.B xx@
to the left of the
.B tc
invocation, where
.I xx
is the capability.
For example, the entry
.IP
.B hn\||\|2621\-nl:ks@:ke@:tc=2621:
.LP
defines a 
.B 2621\-nl
that does not have the
.B ks
or
.B ke
capabilities,
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
.LP
The characters in the
.I Notes
field in the next table have the following meanings
(more than one may apply to a capability):
.LP
.RS
.TS
lfB lfR .
N	indicates numeric parameter(s)
P	indicates that padding may be specified
*	indicates that padding may be based on the number of lines affected
o	indicates capability is obsolete
.TE
.RE
.LP
Obsolete capabilities have no
.B terminfo
equivalents,
since they were considered useless, or are subsumed by other
capabilities.  New software should not rely on them.
.LP
.RS
.TS
cfI cfI cfI lfI
lfB cfI cfI lfR .
Name	Type	Notes	Description
.sp .5v
.ps -1
.vs -1
!1	str		sent by shifted save key
!2	str		sent by shifted suspend key
!3	str		sent by shifted undo key
#1	str		sent by shifted help key
#2	str		sent by shifted home key
#3	str		sent by shifted input key
#4	str		sent by shifted left-arrow key
%0	str		sent by redo key
%1	str		sent by help key
%2	str		sent by mark key
%3	str		sent by message key
%4	str		sent by move key
%5	str		sent by next-object key
%6	str		sent by open key
%7	str		sent by options key
%8	str		sent by previous-object key
%9	str		sent by print or copy key
%a	str		sent by shifted message key
%b	str		sent by shifted move key
%c	str		sent by shifted next-object key
%d	str		sent by shifted options key
%e	str		sent by shifted previous-object key
%f	str		sent by shifted print or copy key
%g	str		sent by shifted redo key
%h	str		sent by shifted replace key
%i	str		sent by shifted right-arrow key
%j	str		sent by shifted resume key
&0	str		sent by shifted cancel key
&1	str		sent by ref(erence) key
&2	str		sent by refresh key
&3	str		sent by replace key
&4	str		sent by restart key
&5	str		sent by resume key
&6	str		sent by save key
&7	str		sent by suspend key
&8	str		sent by undo key
&9	str		sent by shifted beg(inning) key
*0	str		sent by shifted find key
*1	str		sent by shifted cmd (command) key
*2	str		sent by shifted copy key
*3	str		sent by shifted create key
*4	str		sent by shifted delete-char key
*5	str		sent by shifted delete-line key
*6	str		sent by select key
*7	str		sent by shifted end key
*8	str		sent by shifted clear-line key
*9	str		sent by shifted exit key
5i	bool		printer will not echo on screen
@0	str		sent by find key
@1	str		sent by beg(inning) key
@2	str		sent by cancel key
@3	str		sent by close key
@4	str		sent by cmd (command) key
@5	str		sent by copy key
@6	str		sent by create key
@7	str		sent by end key
@8	str		sent by enter/send key (unreliable)
@9	str		sent by exit key
AL	str	(NP*)	add \fIn\fP new blank lines
CC	str		terminal settable command character in prototype
CM	str	(NP)	memory-relative cursor motion to row \fIm\fP, column \fIn\fP
DC	str	(NP*)	delete \fIn\fP characters
DL	str	(NP*)	delete \fIn\fP lines
DO	str	(NP*)	move cursor down \fIn\fP lines
EP	bool	(o)	even parity
F1-F9	str		sent by function keys 11-19
FA-FZ	str		sent by function keys 20-45
Fa-Fr	str		sent by function keys 46-63
HC	bool		cursor is hard to see
HD	bool	(o)	half-duplex
IC	str	(NP*)	insert \fIn\fP blank characters
K1	str		sent by keypad upper left
K2	str		sent by keypad center
K3	str		sent by keypad upper right
K4	str		sent by keypad lower left
K5	str		sent by keypad lower right
LC	bool	(o)	lower-case only
LE	str	(NP)	move cursor left \fIn\fP positions
LF	str	(P)	turn off soft labels
LO	str	(P)	turn on soft labels
MC	str	(P)	clear left and right soft margins
ML	str	(P)	set soft left margin
MR	str	(P)	set soft right margin
NL	bool	(o)	\fB\en\fP is NEWLINE, not LINEFEED
NP	bool		pad character does not exist
NR	bool		\fBti\fP does not reverse \fBte\fP
Nl	num		number of labels on screen (start at 1)
OP	bool	(o)	odd parity
RA	str	(P)	turn off automatic margins
RF	str		send next input character (for ptys)
RI	str	(NP)	move cursor right \fIn\fP positions
RX	str	(P)	turn off xoff/xon handshaking
SA	str	(P)	turn on automatic margins
SF	str	(NP*)	scroll forward \fIn\fP lines
SR	str	(NP*)	scroll backward \fIn\fP lines
SX	str	(P)	turn on xoff/xon handshaking
UC	bool	(o)	upper-case only
UP	str	(NP*)	move cursor up \fIn\fP lines
XF	str		x-off character (default \s-2DC3\s0)
XN	str		x-on character (default \s-2DC1\s0)
ac	str		graphic character set pairs aAbBcC \- def=VT100
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	(o)	backspace if not \fB^H\fP
bl	str	(P)	audible signal (bell)
bs	bool	(o)	terminal can backspace with \fB^H\fP
bt	str	(P)	back-tab
bw	bool		\fBle\fP (backspace) wraps from column 0 to last column
cb	str	(P)	clear to beginning of line, inclusive
cd	str	(P*)	clear to end of display
ce	str	(P)	clear to end of line
ch	str	(NP)	set cursor column (horizontal position)
cl	str	(P*)	clear screen and home cursor
cm	str	(NP)	screen-relative cursor motion to row \fIm\fP, column \fIn\fP
co	num		number of columns in a line
cr	str	(P*)	RETURN
cs	str	(NP)	change scrolling region to lines \fIm\fP through \fIn\fP (VT100)
ct	str	(P)	clear all tab stops
cv	str	(NP)	set cursor row (vertical position)
dB	num	(o)	milliseconds of \fBbs\fP delay needed (default 0)
dC	num	(o)	milliseconds of \fBcr\fP delay needed (default 0)
dF	num	(o)	milliseconds of \fBff\fP delay needed (default 0)
dN	num	(o)	milliseconds of \fBnl\fP delay needed (default 0)
dT	num	(o)	milliseconds of horizontal tab delay needed (default 0)
dV	num	(o)	milliseconds of vertical tab delay needed (default 0)
da	bool		display may be retained above the screen
db	bool		display may be retained below the screen
dc	str	(P*)	delete character
dl	str	(P*)	delete line
dm	str		enter delete mode
do	str		down one line
ds	str		disable status line
eA	str	(P)	enable graphic character set
ec	str	(NP)	erase \fIn\fP characters
ed	str		end delete mode
ei	str		end insert mode
eo	bool		can erase overstrikes with a blank
es	bool		escape can be used on the status line
ff	str	(P*)	hardcopy terminal page eject
fs	str		return from status line
gn	bool		generic line type (for example dialup, switch)
hc	bool		hardcopy terminal
hd	str		half-line down (forward 1/2 linefeed)
ho	str	(P)	home cursor
hs	bool		has extra \(lqstatus line\(rq
hu	str		half-line up (reverse 1/2 linefeed)
hz	bool		cannot print ~s (Hazeltine)
i1	str		terminal initialization string (\fBterminfo\fP only)
i3	str		terminal initialization string (\fBterminfo\fP only)
iP	str		pathname of program for initialization (\fBterminfo\fP only)
ic	str	(P*)	insert character
if	str		name of file containing initialization string
im	str		enter insert mode
in	bool		insert mode distinguishes nulls
ip	str	(P*)	insert pad after character inserted
is	str		terminal initialization string
it	num		tab stops initially every \fIn\fP positions
k0-k9	str		sent by function keys 0-9
k;	str		sent by function key 10
kA	str		sent by insert-line key
kB	str		sent by back-tab key
kC	str		sent by clear-screen or erase key
kD	str		sent by delete-character key
kE	str		sent by clear-to-end-of-line key
kF	str		sent by scroll-forward/down key
kH	str		sent by home-down key
kI	str		sent by insert-character or enter-insert-mode key
kL	str		sent by delete-line key
kM	str		sent by insert key while in insert mode
kN	str		sent by next-page key
kP	str		sent by previous-page key
kR	str		sent by scroll-backward/up key
kS	str		sent by clear-to-end-of-screen key
kT	str		sent by set-tab key
ka	str		sent by clear-all-tabs key
kb	str		sent by backspace key
kd	str		sent by down-arrow key
ke	str		out of \(lqkeypad transmit\(rq mode
kh	str		sent by home key
kl	str		sent by left-arrow key
km	bool		has a \(lqmeta\(rq key (shift, sets parity bit)
kn	num	(o)	number of function (\fBk0\fP\-\fBk9\fP) keys (default 0)
ko	str	(o)	termcap entries for other non-function keys
kr	str		sent by right-arrow key
ks	str		put terminal in \(lqkeypad transmit\(rq mode
kt	str		sent by clear-tab key
ku	str		sent by up-arrow key
l0-l9	str		labels on function keys 0-9 if not f0-f9
la	str		label on function key 10 if not f10
le	str	(P)	move cursor left one position
lh	num		number of rows in each label
li	num		number of lines on screen or page
ll	str		last line, first column
lm	num		lines of memory if > \fBli\fP (0 means varies)
lw	num		number of columns in each label
ma	str	(o)	arrow key map (used by \fIvi\fP version 2 only)
mb	str		turn on blinking attribute
md	str		turn on bold (extra bright) attribute
me	str		turn off all attributes
mh	str		turn on half-bright attribute
mi	bool		safe to move while in insert mode
mk	str		turn on blank attribute (characters invisible)
ml	str	(o)	memory lock on above cursor
mm	str		turn on \(lqmeta mode\(rq (8th bit)
mo	str		turn off \(lqmeta mode\(rq
mp	str		turn on protected attribute
mr	str		turn on reverse-video attribute
ms	bool		safe to move in standout modes
mu	str	(o)	memory unlock (turn off memory lock)
nc	bool	(o)	no correctly-working \fBcr\fP (Datamedia 2500, Hazeltine 2000)
nd	str		non-destructive space (cursor right)
nl	str	(o)	NEWLINE character if not \fB\\n\fP
ns	bool	(o)	terminal is a \s-1CRT\s0 but does not scroll
nw	str	(P)	NEWLINE (behaves like \fBcr\fP followed by \fBdo\fP)
nx	bool		padding will not work, xoff/xon required
os	bool		terminal overstrikes
pO	str	(N)	turn on the printer for \fIn\fP bytes
pb	num		lowest baud where delays are required
pc	str		pad character (default \s-2NUL\s0)
pf	str		turn off the printer
pk	str		program function key \fIn\fP to type string \fIs\fP (\fBterminfo\fP only)
pl	str		program function key \fIn\fP to execute string \fIs\fP (\fBterminfo\fP only)
pn	str	(NP)	program label \fIn\fP to show string \fIs\fP (\fBterminfo\fP only)
po	str		turn on the printer
ps	str		print contents of the screen
pt	bool	(o)	has hardware tab stops (may need to be set with \fBis\fP)
px	str		program function key \fIn\fP to transmit string \fIs\fP (\fBterminfo\fP only)
r1	str		reset terminal completely to sane modes (\fBterminfo\fP only)
r2	str		reset terminal completely to sane modes (\fBterminfo\fP only)
r3	str		reset terminal completely to sane modes (\fBterminfo\fP only)
rP	str	(P)	like \fBip\fP but when in replace mode
rc	str	(P)	restore cursor to position of last \fBsc\fP
rf	str		name of file containing reset string
ri	?		unkown at present
rp	str	(NP*)	repeat character \fIc n\fP times
rs	str		reset terminal completely to sane modes
sa	str	(NP)	define the video attributes (9 parameters)
sc	str	(P)	save cursor position
se	str		end standout mode
sf	str	(P)	scroll text up
sg	num		number of garbage chars left by \fBso\fP or \fBse\fP (default 0)
so	str		begin standout mode
sr	str	(P)	scroll text down
st	str		set a tab stop in all rows, current column
ta	str	(P)	move cursor to next 8-position hardware tab stop
tc	str		entry of similar terminal \- must be last
te	str		string to end programs that use \fBtermcap\fP
ti	str		string to begin programs that use \fBtermcap\fP
ts	str	(N)	go to status line, column \fIn\fP
uc	str		underscore one character and move past it
ue	str		end underscore mode
ug	num		number of garbage chars left by \fBus\fP or \fBue\fP (default 0)
ul	bool		underline character overstrikes
up	str		upline (cursor up)
us	str		start underscore mode
vb	str		visible bell (must not move cursor)
ve	str		make cursor appear normal (undo \fBvs\fP/\fBvi\fP)
vi	str		make cursor invisible
vs	str		make cursor very visible
vt	num		virtual terminal number (not supported on all systems)
wi	str	(N)	set current window to lines \fIi\fP through \fIj\fP, columns \fIm\fP through \fIn\fP
ws	num		number of columns in status line
xb	bool		Beehive (f1=\s-2ESC\s0, f2=^C)
xn	bool		NEWLINE ignored after 80 cols (Concept)
xo	bool		terminal uses xoff/xon handshaking
xr	bool	(o)	RETURN acts like \fBce cr nl\fP (Delta Data)
xs	bool		standout not erased by overwriting (Hewlett-Packard)
xt	bool		TAB characters destructive, magic \fBso\fP char (Teleray 1061)
xx	bool	(o)	Tektronix 4025 insert-line
.ps +1
.vs +1
.TE
.RE
.\"===================
.SH ENVIRONMENT
.LP
If the environment variable
.SB TERMCAP
contains an absolute pathname,
programs look to that file for terminal descriptions, rather than
.BR /usr/share/lib/termcap .
If the value of this varible is in the form of a
.B termcap
entry, programs use that value for the
terminal description.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/termcap
file containing terminal descriptions
.PD
.SH SEE ALSO
.BR ex (1),
.BR more (1),
.BR tset (1),
.BR ul (1),
.BR vi (1),
.BR curses (3X),
.BR printf (3S),
.BR termcap (3X),
.BR term (5V),
.BR terminfo (5V)
.LP
.TX ADMIN
.SH CAVEATS AND BUGS
.LP
.SM UNIX
System V uses
.BR terminfo (5V)
rather than
.BR termcap .
Sun\s-1OS\s0 supports either
.B termcap 
or
.BR terminfo (5V)
terminal databases, depending on whether you link with the
.BR termcap (3X)
or
.BR curses (3V)
libraries.
Transitions between the two should be relatively painless if capabilities
flagged as \(lqobsolete\(rq are avoided.
.LP
.B vi
allows only 256 characters for string capabilities, and the routines in 
.BR termcap (3X)
do not check for overflow of this buffer.
The total length of a single entry (excluding only escaped
.SM NEWLINE
characters) may not exceed 1024.
.LP
Not all programs support all entries.
	str		sent by function keys 20-45
Fa-Fr	str		sent by function keys 46-63
HC	bool		cursor is hard to see
HD	bool	(o)	half-duplex
IC	str	(NP*)	insert \fIn\fP blank characters
K1	str		sent by keypad upper left
K2	str		sent by keypad center
K3	str		sent by keypad upper right
K4	str		sent by keypad lower ./share/man/man5/terminfo.5v                                                                           755       0      12       205271  4424741517  11063                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\"	process through tbl
.\" @(#)terminfo.5v 1.23 89/03/27 SMI; from S5R3
.TH TERMINFO 5V "26 February 1988"
.\".tr ||
.UC 4
.SH NAME
terminfo \- terminal capability data base
.SH SYNOPSIS
.B /usr/share/lib/terminfo/?/\(**
.SH AVAILABILITY
.LP
This database is available with the
.I System V
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "terminfo file"  ""  "\fLterminfo\fP \(em System V terminal capability data base"
.LP
.B terminfo
is a compiled database (see
.BR tic (8V))
describing the capabilities of terminals.
Terminals are described in
.B terminfo
source descriptions
by giving a set of capabilities which they have, by describing
how operations are performed, by describing
padding requirements, and by specifying initialization sequences.
This database is used by applications programs,
and by libraries such as
.BR curses (3V),
so they can work with a variety of terminals
without changes to the programs.
To obtain the source description for a terminal, use the
.B \-I
option of
.BR infocmp (8V).
.LP
Entries in
.B terminfo
source files consist of a number of comma-separated fields.
White space after each comma is ignored.
The first line of each terminal description in the
.B terminfo
database gives the name by which 
.B terminfo
knows the terminal, separated by pipe
.RB ( \||\| )
characters.
The first name given is the most common abbreviation for the terminal
(this is the one to which the environment variable
.SB TERM
would normally be set),
the last name given should be a long name fully identifying the terminal,
and all others are understood as synonyms for the terminal name.
All names but the last should contain no blanks;
the last name may contain blanks for readability.
.LP
Terminal names
(except for the last, verbose entry) should be chosen using
the following conventions:
.TP 3
\(bu
The particular piece of hardware making up the terminal
should have a root name chosen; for example, for the Hewlett-Packard 2621,
.BR hp2621 .
This name should not contain hyphens.
.TP
\(bu
Modes that the hardware can be
in or user preferences should be indicated by appending a hyphen and
an indicator of the mode.  Thus, a
.B vt100
in 132-column mode would be given as:
.BR vt100\-w .
The following suffixes should be used where possible:
.LP
.RS
.RS
.TS
cfI cfI cfI
lfB lfR lfB .
Suffix	Meaning	Example
.sp .5v
\-w	 wide mode (more than 80 columns)	vt100\-w
\-am	with automatic margins (usually default)	vt100\-am
\-nam	without automatic margins	vt100\-nam
\-\fIn\fP	number of lines on the screen	aaa\-60
\-na	no arrow keys (leave them in local)	concept100\-na
\-\fIn\^\fPp	number of pages of memory	concept100\-4p
\-rv	reverse video	concept100\-rv
.TE
.RE
.RE
.SH CAPABILITIES
.LP
In the table below, the
.B Variable
is the name by which the C programmer (at the
.B terminfo
level) accesses the capability.
The 
.B capname
is the short name for this variable used in the text of the database.
It is used by a person updating the database and by the
.BR tput (1V)
command when asking what the value of the capability is
for a particular terminal.
The
.B Termcap Code
is a two-letter code that corresponds to the old
.B termcap
capability name.
.LP
Capability names have no hard length limit, but an informal limit of 5
characters has been adopted to keep them short.
Whenever possible, names are chosen to be the same as or similar to
the
.SM ANSI
X3.64-1979 standard.
Semantics are also intended to match those of the specification.
.br
.ne 10
.LP
All string capabilities listed below may have
padding specified, with the exception of those used for input.
Input capabilities, listed under the
.B Strings
section in the table below,
have names beginning with
.RB ` key_ '.
The following indicators may appear
at the end of the
.B Description
for a variable.
.br
.ne 4
.RS
.TP
(G)
.PD 0
indicates that the string is passed through
.BR tparm (\|)
with parameters (parms) as given (#\d\fIi\fR\u).
.TP
(\(**)
indicates that padding may be based on the number of
lines affected.
.TP
(#\d\fIi\fR\u)
indicates the
.IR i \uth\d
parameter.
.PD
.RE
.br
.ne 5
.LP
.TS
lfB cfB cfB l.
.ps -1
.vs -1
\fIVariable	\fICapname	\fITermcap	\fIDescription\fP
.sp
\fI\ \ Boolean\fP
.sp .5
auto_left_margin	bw	bw	\fBcub\fR1 wraps from column 0 to last column
auto_right_margin	am	am	Terminal has automatic margins
no_esc_ctlc	xsb	xb	Beehive (f1=ESC, f2=^C)
ceol_standout_glitch	xhp	xs	Standout not erased by overwriting (Hewlett-Packard)
eat_newline_glitch	xenl	xn	NEWLINE ignored after 80 cols (Concept)
erase_overstrike	eo	eo	Can erase overstrikes with a blank
generic_type	gn	gn	Generic line type (for example, dialup, switch).
hard_copy	hc	hc	Hardcopy terminal
hard_cursor	chts	HC	Cursor is hard to see.
has_meta_key	km	km	Has a meta key (shift, sets parity bit)
has_status_line	hs	hs	Has extra \(lqstatus line\(rq
insert_null_glitch	in	in	Insert mode distinguishes nulls
memory_above	da	da	Display may be retained above the screen
memory_below	db	db	Display may be retained below the screen
move_insert_mode	mir	mi	Safe to move while in insert mode
move_standout_mode	msgr	ms	Safe to move in standout modes
needs_xon_xoff	nxon	nx	Padding will not work, xon/xoff required
non_rev_rmcup	nrrmc	NR	\fBsmcup\fR does not reverse \fBrmcup\fR
no_pad_char	npc	NP	Pad character does not exist
over_strike	os	os	Terminal overstrikes on hard-copy terminal
prtr_silent	mc5i	5i	Printer will not echo on screen.
status_line_esc_ok	eslok	es	Escape can be used on the status line
dest_tabs_magic_smso	xt	xt	Destructive TAB characters, magic \fBsmso\fR char (Teleray 1061)
tilde_glitch	hz	hz	Hazeltine; cannot print tildes(\s+2~\s-2)
transparent_underline	ul	ul	Underline character overstrikes
xon_xoff	xon	xo	Terminal uses xon/xoff handshaking
.sp
\fI\ \ Number\fP
.sp .5
columns	cols	co	Number of columns in a line
init_tabs	it	it	tab stops initially every # spaces.
label_height	lh	lh	Number of rows in each label
label_width	lw	lw	Number of cols in each label
lines	lines	li	Number of lines on screen or page
lines_of_memory	lm	lm	Lines of memory if > \fBlines\fR; \fB0\fR means varies
magic_cookie_glitch	xmc	sg	Number blank chars left by \fBsmso\fR or \fBrmso\fR
num_labels	nlab	Nl	Number of labels on screen (start at 1)
padding_baud_rate	pb	pb	Lowest baud rate where padding needed
virtual_terminal	vt	vt	Virtual terminal number (not supported on all systems)
width_status_line	wsl	ws	Number of columns in status line
.sp
\fI\ \ String\fP
.sp .5
acs_chars	acsc	ac	Graphic charset pairs aAbBcC - def=VT100
back_tab	cbt	bt	Back tab
bell	bel	bl	Audible signal (bell)
carriage_return	cr	cr	\s-1RETURN\s0 (\(**)
change_scroll_region	csr	cs	Change to lines #1 through #2 (VT100) (G)
char_padding	rmp	rP	Like \fBip\fR but when in replace mode
clear_all_tabs	tbc	ct	Clear all tab stops
clear_margins	mgc	MC	Clear left and right soft margins
clear_screen	clear	cl	Clear screen and home cursor (\(**)
clr_bol	el1	cb	Clear to beginning of line, inclusive
clr_eol	el	ce	Clear to end of line
clr_eos	ed	cd	Clear to end of display (\(**)
column_address	hpa	ch	Horizontal position absolute (G)
command_character	cmdch	CC	Terminal settable command char in prototype
cursor_address	cup	cm	Cursor motion to row #1 col #2 (G)
cursor_down	cud1	do	Down one line
cursor_home	home	ho	Home cursor (if no \fBcup\fR)
cursor_invisible	civis	vi	Make cursor invisible
cursor_left	cub1	le	Move cursor left one \s-1SPACE\s0.
cursor_mem_address	mrcup	CM	Memory relative cursor addressing (G)
cursor_normal	cnorm	ve	Make cursor appear normal (undo \fBcvvis/civis\fR)
cursor_right	cuf1	nd	Non-destructive space (cursor right)
cursor_to_ll	ll	ll	Last line, first column (if no \fBcup\fR)
cursor_up	cuu1	up	Upline (cursor up)
cursor_visible	cvvis	vs	Make cursor very visible
delete_character	dch1	dc	Delete character (\(**)
delete_line	dl1	dl	Delete line (\(**)
dis_status_line	dsl	ds	Disable status line
down_half_line	hd	hd	Half-line down (forward 1/2 \s-1LINEFEED\s0)
ena_acs	enacs	eA	Enable alternate char set
enter_alt_charset_mode	smacs	as	Start alternate character set
enter_am_mode	smam	SA	Turn on automatic margins
enter_blink_mode	blink	mb	Turn on blinking
enter_bold_mode	bold	md	Turn on bold (extra bright) mode
enter_ca_mode	smcup	ti	String to begin programs that use \fBcup\fR
enter_delete_mode	smdc	dm	Delete mode (enter)
enter_dim_mode	dim	mh	Turn on half-bright mode
enter_insert_mode	smir	im	Insert mode (enter);
enter_protected_mode	prot	mp	Turn on protected mode
enter_reverse_mode	rev	mr	Turn on reverse video mode
enter_secure_mode	invis	mk	Turn on blank mode (chars invisible)
enter_standout_mode	smso	so	Begin standout mode
enter_underline_mode	smul	us	Start underscore mode
enter_xon_mode	smxon	SX	Turn on xon/xoff handshaking
erase_chars	ech	ec	Erase #1 characters (G)
exit_alt_charset_mode	rmacs	ae	End alternate character set
exit_am_mode	rmam	RA	Turn off automatic margins
exit_attribute_mode	sgr0	me	Turn off all attributes
exit_ca_mode	rmcup	te	String to end programs that use \fBcup\fR
exit_delete_mode	rmdc	ed	End delete mode
exit_insert_mode	rmir	ei	End insert mode;
exit_standout_mode	rmso	se	End standout mode
exit_underline_mode	rmul	ue	End underscore mode
exit_xon_mode	rmxon	RX	Turn off xon/xoff handshaking
flash_screen	flash	vb	Visible bell (must not move cursor)
form_feed	ff	ff	Hardcopy terminal page eject (\(**)
from_status_line	fsl	fs	Return from status line
init_1string	is1	i1	Terminal initialization string
init_2string	is2	is	Terminal initialization string
init_3string	is3	i3	Terminal initialization string
init_file	if	if	Name of initialization file containing \fBis\fR
init_prog	iprog	iP	Path name of program for init.
insert_character	ich1	ic	Insert character
insert_line	il1	al	Add new blank line (\(**)
insert_padding	ip	ip	Insert pad after character inserted (\(**)
key_a1	ka1	K1	\s-1KEY_A\s01, 0534, Upper left of keypad
key_a3	ka3	K3	\s-1KEY_A\s03, 0535, Upper right of keypad
key_b2	kb2	K2	\s-1KEY_B\s02, 0536, Center of keypad
key_backspace	kbs	kb	\s-1KEY_BACKSPACE\s0, 0407, Sent by BACKSPACE key
key_beg	kbeg	@1	\s-1KEY_BEG\s0, 0542, Sent by beg(inning) key
key_btab	kcbt	kB	\s-1KEY_BTAB\s0, 0541, Sent by back-tab key
key_c1	kc1	K4	\s-1KEY_C\s01, 0537, Lower left of keypad
key_c3	kc3	K5	\s-1KEY_C\s03, 0540, Lower right of keypad
key_cancel	kcan	@2	\s-1KEY_CANCEL\s0, 0543, Sent by cancel key
key_catab	ktbc	ka	\s-1KEY_CATAB\s0, 0526, Sent by clear-all-tabs key
key_clear	kclr	kC	\s-1KEY_CLEAR\s0, 0515, Sent by clear-screen or erase key
key_close	kclo	@3	\s-1KEY_CLOSE\s0, 0544, Sent by close key
key_command	kcmd	@4	\s-1KEY_COMMAND\s0, 0545, Sent by cmd (command) key
key_copy	kcpy	@5	\s-1KEY_COPY\s0, 0546, Sent by copy key
key_create	kcrt	@6	\s-1KEY_CREATE\s0, 0547, Sent by create key
key_ctab	kctab	kt	\s-1KEY_CTAB\s0, 0525, Sent by clear-tab key
key_dc	kdch1	kD	\s-1KEY_DC\s0, 0512, Sent by delete-character key
key_dl	kdl1	kL	\s-1KEY_DL\s0, 0510, Sent by delete-line key
key_down	kcud1	kd	\s-1KEY_DOWN\s0, 0402, Sent by terminal down-arrow key
key_eic	krmir	kM	\s-1KEY_EIC\s0, 0514, Sent by \fBrmir\fR or \fBsmir\fR in insert mode
key_end	kend	@7	\s-1KEY_END\s0, 0550, Sent by end key
key_enter	kent	@8	\s-1KEY_ENTER\s0, 0527, Sent by enter/send key
key_eol	kel	kE	\s-1KEY_EOL\s0, 0517, Sent by clear-to-end-of-line key
key_eos	ked	kS	\s-1KEY_EOS\s0, 0516, Sent by clear-to-end-of-screen key
key_exit	kext	@9	\s-1KEY_EXIT\s0, 0551, Sent by exit key
key_f0	kf0	k0	\s-1KEY_F\s0(0), 0410, Sent by function key f0
key_f1	kf1	k1	\s-1KEY_F\s0(1), 0411, Sent by function key f1
key_f2	kf2	k2	\s-1KEY_F\s0(2), 0412, Sent by function key f2
key_f3	kf3	k3	\s-1KEY_F\s0(3), 0413, Sent by function key f3
key_f4	kf4	k4	\s-1KEY_F\s0(4), 0414, Sent by function key f4
key_f5	kf5	k5	\s-1KEY_F\s0(5), 0415, Sent by function key f5
key_f6	kf6	k6	\s-1KEY_F\s0(6), 0416, Sent by function key f6
key_f7	kf7	k7	\s-1KEY_F\s0(7), 0417, Sent by function key f7
key_f8	kf8	k8	\s-1KEY_F\s0(8), 0420, Sent by function key f8
key_f9	kf9	k9	\s-1KEY_F\s0(9), 0421, Sent by function key f9
key_f10	kf10	k;	\s-1KEY_F\s0(10), 0422, Sent by function key f10
key_f11	kf11	F1	\s-1KEY_F\s0(11), 0423, Sent by function key f11
key_f12	kf12	F2	\s-1KEY_F\s0(12), 0424, Sent by function key f12
key_f13	kf13	F3	\s-1KEY_F\s0(13), 0425, Sent by function key f13
key_f14	kf14	F4	\s-1KEY_F\s0(14), 0426, Sent by function key f14
key_f15	kf15	F5	\s-1KEY_F\s0(15), 0427, Sent by function key f15
key_f16	kf16	F6	\s-1KEY_F\s0(16), 0430, Sent by function key f16
key_f17	kf17	F7	\s-1KEY_F\s0(17), 0431, Sent by function key f17
key_f18	kf18	F8	\s-1KEY_F\s0(18), 0432, Sent by function key f18
key_f19	kf19	F9	\s-1KEY_F\s0(19), 0433, Sent by function key f19
key_f20	kf20	FA	\s-1KEY_F\s0(20), 0434, Sent by function key f20
key_f21	kf21	FB	\s-1KEY_F\s0(21), 0435, Sent by function key f21
key_f22	kf22	FC	\s-1KEY_F\s0(22), 0436, Sent by function key f22
key_f23	kf23	FD	\s-1KEY_F\s0(23), 0437, Sent by function key f23
key_f24	kf24	FE	\s-1KEY_F\s0(24), 0440, Sent by function key f24
key_f25	kf25	FF	\s-1KEY_F\s0(25), 0441, Sent by function key f25
key_f26	kf26	FG	\s-1KEY_F\s0(26), 0442, Sent by function key f26
key_f27	kf27	FH	\s-1KEY_F\s0(27), 0443, Sent by function key f27
key_f28	kf28	FI	\s-1KEY_F\s0(28), 0444, Sent by function key f28
key_f29	kf29	FJ	\s-1KEY_F\s0(29), 0445, Sent by function key f29
key_f30	kf30	FK	\s-1KEY_F\s0(30), 0446, Sent by function key f30
key_f31	kf31	FL	\s-1KEY_F\s0(31), 0447, Sent by function key f31
key_f32	kf32	FM	\s-1KEY_F\s0(32), 0450, Sent by function key f32
key_f33	kf33	FN	\s-1KEY_F\s0(13), 0451, Sent by function key f13
key_f34	kf34	FO	\s-1KEY_F\s0(34), 0452, Sent by function key f34
key_f35	kf35	FP	\s-1KEY_F\s0(35), 0453, Sent by function key f35
key_f36	kf36	FQ	\s-1KEY_F\s0(36), 0454, Sent by function key f36
key_f37	kf37	FR	\s-1KEY_F\s0(37), 0455, Sent by function key f37
key_f38	kf38	FS	\s-1KEY_F\s0(38), 0456, Sent by function key f38
key_f39	kf39	FT	\s-1KEY_F\s0(39), 0457, Sent by function key f39
key_f40	kf40	FU	\s-1KEY_F\s0(40), 0460, Sent by function key f40
key_f41	kf41	FV	\s-1KEY_F\s0(41), 0461, Sent by function key f41
key_f42	kf42	FW	\s-1KEY_F\s0(42), 0462, Sent by function key f42
key_f43	kf43	FX	\s-1KEY_F\s0(43), 0463, Sent by function key f43
key_f44	kf44	FY	\s-1KEY_F\s0(44), 0464, Sent by function key f44
key_f45	kf45	FZ	\s-1KEY_F\s0(45), 0465, Sent by function key f45
key_f46	kf46	Fa	\s-1KEY_F\s0(46), 0466, Sent by function key f46
key_f47	kf47	Fb	\s-1KEY_F\s0(47), 0467, Sent by function key f47
key_f48	kf48	Fc	\s-1KEY_F\s0(48), 0470, Sent by function key f48
key_f49	kf49	Fd	\s-1KEY_F\s0(49), 0471, Sent by function key f49
key_f50	kf50	Fe	\s-1KEY_F\s0(50), 0472, Sent by function key f50
key_f51	kf51	Ff	\s-1KEY_F\s0(51), 0473, Sent by function key f51
key_f52	kf52	Fg	\s-1KEY_F\s0(52), 0474, Sent by function key f52
key_f53	kf53	Fh	\s-1KEY_F\s0(53), 0475, Sent by function key f53
key_f54	kf54	Fi	\s-1KEY_F\s0(54), 0476, Sent by function key f54
key_f55	kf55	Fj	\s-1KEY_F\s0(55), 0477, Sent by function key f55
key_f56	kf56	Fk	\s-1KEY_F\s0(56), 0500, Sent by function key f56
key_f57	kf57	Fl	\s-1KEY_F\s0(57), 0501, Sent by function key f57
key_f58	kf58	Fm	\s-1KEY_F\s0(58), 0502, Sent by function key f58
key_f59	kf59	Fn	\s-1KEY_F\s0(59), 0503, Sent by function key f59
key_f60	kf60	Fo	\s-1KEY_F\s0(60), 0504, Sent by function key f60
key_f61	kf61	Fp	\s-1KEY_F\s0(61), 0505, Sent by function key f61
key_f62	kf62	Fq	\s-1KEY_F\s0(62), 0506, Sent by function key f62
key_f63	kf63	Fr	\s-1KEY_F\s0(63), 0507, Sent by function key f63
key_find	kfnd	@0	\s-1KEY_FIND\s0, 0552, Sent by find key
key_help	khlp	%1	\s-1KEY_HELP\s0, 0553, Sent by help key
key_home	khome	kh	\s-1KEY_HOME\s0, 0406, Sent by home key
key_ic	kich1	kI	\s-1KEY_IC\s0, 0513, Sent by ins-char/enter ins-mode key
key_il	kil1	kA	\s-1KEY_IL\s0, 0511, Sent by insert-line key
key_left	kcub1	kl	\s-1KEY_LEFT\s0, 0404, Sent by terminal left-arrow key
key_ll	kll	kH	\s-1KEY_LL\s0, 0533, Sent by home-down key
key_mark	kmrk	%2	\s-1KEY_MARK\s0, 0554, Sent by mark key
key_message	kmsg	%3	\s-1KEY_MESSAGE\s0, 0555, Sent by message key
key_move	kmov	%4	\s-1KEY_MOVE\s0, 0556, Sent by move key
key_next	knxt	%5	\s-1KEY_NEXT\s0, 0557, Sent by next-object key
key_npage	knp	kN	\s-1KEY_NPAGE\s0, 0522, Sent by next-page key
key_open	kopn	%6	\s-1KEY_OPEN\s0, 0560, Sent by open key
key_options	kopt	%7	\s-1KEY_OPTIONS\s0, 0561, Sent by options key
key_ppage	kpp	kP	\s-1KEY_PPAGE\s0, 0523, Sent by previous-page key
key_previous	kprv	%8	\s-1KEY_PREVIOUS\s0, 0562, Sent by previous-object key
key_print	kprt	%9	\s-1KEY_PRINT\s0, 0532, Sent by print or copy key
key_redo	krdo	%0	\s-1KEY_REDO\s0, 0563, Sent by redo key
key_reference	kref	&1	\s-1KEY_REFERENCE\s0, 0564, Sent by ref(erence) key
key_refresh	krfr	&2	\s-1KEY_REFRESH\s0, 0565, Sent by refresh key
key_replace	krpl	&3	\s-1KEY_REPLACE\s0, 0566, Sent by replace key
key_restart	krst	&4	\s-1KEY_RESTART\s0, 0567, Sent by restart key
key_resume	kres	&5	\s-1KEY_RESUME\s0, 0570, Sent by resume key
key_right	kcuf1	kr	\s-1KEY_RIGHT\s0, 0405, Sent by terminal right-arrow key
key_save	ksav	&6	\s-1KEY_SAVE\s0, 0571, Sent by save key
key_sbeg	k\s-1BEG\s0	&9	\s-1KEY_SBEG\s0, 0572, Sent by shifted beginning key
key_scancel	k\s-1CAN\s0	&0	\s-1KEY_SCANCEL\s0, 0573, Sent by shifted cancel key
key_scommand	k\s-1CMD\s0	\(**1	\s-1KEY_SCOMMAND\s0, 0574, Sent by shifted command key
key_scopy	k\s-1CPY\s0	\(**2	\s-1KEY_SCOPY\s0, 0575, Sent by shifted copy key
key_screate	k\s-1CRT\s0	\(**3	\s-1KEY_SCREATE\s0, 0576, Sent by shifted create key
key_sdc	kDC	\(**4	\s-1KEY_SDC\s0, 0577, Sent by shifted delete-char key
key_sdl	kDL	\(**5	\s-1KEY_SDL\s0, 0600, Sent by shifted delete-line key
key_select	kslt	\(**6	\s-1KEY_SELECT\s0, 0601, Sent by select key
key_send	k\s-1END\s0	\(**7	\s-1KEY_SEND\s0, 0602, Sent by shifted end key
key_seol	k\s-1EOL\s0	\(**8	\s-1KEY_SEOL\s0, 0603, Sent by shifted clear-line key
key_sexit	k\s-1EXT\s0	\(**9	\s-1KEY_SEXIT\s0, 0604, Sent by shifted exit key
key_sf	kind	kF	\s-1KEY_SF\s0, 0520, Sent by scroll-forward/down key
key_sfind	k\s-1FND\s0	\(**0	\s-1KEY_SFIND\s0, 0605, Sent by shifted find key
key_shelp	k\s-1HLP\s0	#1	\s-1KEY_SHELP\s0, 0606, Sent by shifted help key
key_shome	k\s-1HOM\s0	#2	\s-1KEY_SHOME\s0, 0607, Sent by shifted home key
key_sic	kIC	#3	\s-1KEY_SIC\s0, 0610, Sent by shifted input key
key_sleft	k\s-1LFT\s0	#4	\s-1KEY_SLEFT\s0, 0611, Sent by shifted left-arrow key
key_smessage	k\s-1MSG\s0	%a	\s-1KEY_SMESSAGE\s0, 0612, Sent by shifted message key
key_smove	k\s-1MOV\s0	%b	\s-1KEY_SMOVE\s0, 0613, Sent by shifted move key
key_snext	k\s-1NXT\s0	%c	\s-1KEY_SNEXT\s0, 0614, Sent by shifted next key
key_soptions	k\s-1OPT\s0	%d	\s-1KEY_SOPTIONS\s0, 0615, Sent by shifted options key
key_sprevious	k\s-1PRV\s0	%e	\s-1KEY_SPREVIOUS\s0, 0616, Sent by shifted prev key
key_sprint	k\s-1PRT\s0	%f	\s-1KEY_SPRINT\s0, 0617, Sent by shifted print key
key_sr	kri	kR	\s-1KEY_SR\s0, 0521, Sent by scroll-backward/up key
key_sredo	k\s-1RDO\s0	%g	\s-1KEY_SREDO\s0, 0620, Sent by shifted redo key
key_sreplace	k\s-1RPL\s0	%h	\s-1KEY_SREPLACE\s0, 0621, Sent by shifted replace key
key_sright	k\s-1RIT\s0	%i	\s-1KEY_SRIGHT\s0, 0622, Sent by shifted right-arrow key
key_srsume	k\s-1RES\s0	%j	\s-1KEY_SRSUME\s0, 0623, Sent by shifted resume key
key_ssave	k\s-1SAV\s0	!1	\s-1KEY_SSAVE\s0, 0624, Sent by shifted save key
key_ssuspend	k\s-1SPD\s0	!2	\s-1KEY_SSUSPEND\s0, 0625, Sent by shifted suspend key
key_stab	khts	kT	\s-1KEY_STAB\s0, 0524, Sent by set-tab key
key_sundo	k\s-1UND\s0	!3	\s-1KEY_SUNDO\s0, 0626, Sent by shifted undo key
key_suspend	kspd	&7	\s-1KEY_SUSPEND\s0, 0627, Sent by suspend key
key_undo	kund	&8	\s-1KEY_UNDO\s0, 0630, Sent by undo key
key_up	kcuu1	ku	\s-1KEY_UP\s0, 0403, Sent by terminal up-arrow key
keypad_local	rmkx	ke	Out of \(lqkeypad-transmit\(rq mode
keypad_xmit	smkx	ks	Put terminal in \(lqkeypad-transmit\(rq mode
lab_f0	lf0	l0	Labels on function key f0 if not f0
lab_f1	lf1	l1	Labels on function key f1 if not f1
lab_f2	lf2	l2	Labels on function key f2 if not f2
lab_f3	lf3	l3	Labels on function key f3 if not f3
lab_f4	lf4	l4	Labels on function key f4 if not f4
lab_f5	lf5	l5	Labels on function key f5 if not f5
lab_f6	lf6	l6	Labels on function key f6 if not f6
lab_f7	lf7	l7	Labels on function key f7 if not f7
lab_f8	lf8	l8	Labels on function key f8 if not f8
lab_f9	lf9	l9	Labels on function key f9 if not f9
lab_f10	lf10	la	Labels on function key f10 if not f10
label_off	rmln	LF	Turn off soft labels
label_on	smln	LO	Turn on soft labels
meta_off	rmm	mo	Turn off \(lqmeta mode\(rq
meta_on	smm	mm	Turn on \(lqmeta mode\(rq (8th bit)
newline	nel	nw	\s-1NEWLINE\s0 (behaves like \fBcr\fR followed by \fBlf\fR)
pad_char	pad	pc	Pad character (rather than null)
parm_dch	dch	DC	Delete #1 chars (G\(**)
parm_delete_line	dl	DL	Delete #1 lines (G\(**)
parm_down_cursor	cud	DO	Move cursor down #1 lines. (G\(**)
parm_ich	ich	IC	Insert #1 blank chars (G\(**)
parm_index	indn	SF	Scroll forward #1 lines. (G)
parm_insert_line	il	AL	Add #1 new blank lines (G\(**)
parm_left_cursor	cub	LE	Move cursor left #1 spaces (G)
parm_right_cursor	cuf	RI	Move cursor right #1 spaces. (G\(**)
parm_rindex	rin	SR	Scroll backward #1 lines. (G)
parm_up_cursor	cuu	UP	Move cursor up #1 lines. (G\(**)
pkey_key	pfkey	pk	Prog funct key #1 to type string #2
pkey_local	pfloc	pl	Prog funct key #1 to execute string #2
pkey_xmit	pfx	px	Prog funct key #1 to xmit string #2
plab_norm	pln	pn	Prog label #1 to show string #2
print_screen	mc0	ps	Print contents of the screen
prtr_non	mc5p	pO	Turn on the printer for #1 bytes
prtr_off	mc4	pf	Turn off the printer
prtr_on	mc5	po	Turn on the printer
repeat_char	rep	rp	Repeat char #1 #2 times (G\(**)
req_for_input	rfi	RF	Send next input char (for ptys)
reset_1string	rs1	r1	Reset terminal completely to sane modes
reset_2string	rs2	r2	Reset terminal completely to sane modes
reset_3string	rs3	r3	Reset terminal completely to sane modes
reset_file	rf	rf	Name of file containing reset string
restore_cursor	rc	rc	Restore cursor to position of last \fBsc\fR
row_address	vpa	cv	Vertical position absolute (G)
save_cursor	sc	sc	Save cursor position.
scroll_forward	ind	sf	Scroll text up
scroll_reverse	ri	sr	Scroll text down
set_attributes	sgr	sa	Define the video attributes #1-#9 (G)
set_left_margin	smgl	ML	Set soft left margin
set_right_margin	smgr	MR	Set soft right margin
set_tab	hts	st	Set a tab stop in all rows, current column.
set_window	wind	wi	Current window is lines #1-#2 cols #3-#4 (G)
tab	ht	ta	Move the cursor to the next 8 space hardware tab stop.
to_status_line	tsl	ts	Go to status line, col #1 (G)
underline_char	uc	uc	Underscore one char and move past it
up_half_line	hu	hu	Half-line up (reverse 1/2 line-feed)
xoff_character	xoffc	XF	X-off character
xon_character	xonc	XN	X-on character
.ps +1
.vs +1
.TE
.br
.ne 19
.SH SAMPLE ENTRY
.LP
The following entry, which describes the Concept 100 terminal,
is among the more
complex entries in the
.B terminfo
file as of this writing.
.LP
.de Ti
.nf
.in +.5i
.ta .3i
.ft B
.ps -1
..
.Ti
concept100\||\|c100|\|\|concept\||\|c104\||\|c100-4p\||\|concept 100,
	am, db, eo, in, mir, ul, xenl, cols#80, lines#24, pb#9600, vt#8,
	bel=^G, blank=\eEH, blink=\eEC, clear=^L$<2\(**>, cnorm=\eEw, cr=^M$<9>,
	cub1=^H, cud1=^J, cuf1=\eE=, cup=\eEa%p1%' '%+%c%p2%' '%+%c, cuu1=\eE;,
	cvvis=\eEW, dch1=\eE^A$<16\(**>, dim=\eEE, dl1=\eE^B$<3\(**>,
	ed=\eE^C$<16\(**>, el=\eE^U$<16>, flash=\eEk$<20>\eEK, ht=\et$<8>,
	il1=\eE^R$<3\(**>, ind=^J, .ind=^J$<9>, ip=$<16\(**>,
	is2=\eEU\eEf\eE7\eE5\eE8\eEl\eENH\eEK\eE\e0\eEo&\e0\eEo\e47\eE,
	kbs=^h, kcub1=\eE>, kcud1=\eE<, kcuf1=\eE=, kcuu1=\eE;, kf1=\eE5,
	kf2=\eE6, kf3=\eE7, khome=\eE?, prot=\eEI,
	rep=\eEr%p1%c%p2%' '%+%c$<.2\(**>, rev=\eED,
	rmcup=\eEv\es\es\es\es$<6>\eEp\er\en, rmir=\eE\e0, rmkx=\eEx,
	rmso=\eEd\eEe, rmul=\eEg, rmul=\eEg, sgr0=\eEN\e0,
	smcup=\eEU\eEv\es\es8p\eEp\er, smir=\eE^P, smkx=\eEX, smso=\eEE\eED,
	smul=\eEG,

.de iT
.ps +1
.ft1
.ta
.in -.5i
.fi
..
.iT
.LP
Entries may continue onto multiple lines by placing white space at
the beginning of each line except the first.
Lines beginning with
.B #
are taken as comment lines.
Capabilities in
.B terminfo
are of three types:
boolean capabilities which indicate that the terminal has some particular
feature,
numeric capabilities giving the size of the terminal or particular features,
and string capabilities, which give a sequence which can be used to perform
particular terminal operations.
.SS "Types of Capabilities"
All capabilities have names.
For instance, the fact that the Concept has
.I "automatic margins"
(that is, an automatic
.SM RETURN
and
.SM LINEFEED
when the end of a line is reached) is indicated by the capability
.BR am .
Hence the description of the Concept includes
.BR am .
Numeric capabilities are followed by the character
.B #
and then the value.
Thus
.BR cols ,
which indicates the number of columns the terminal has,
gives the value
.B 80
for the Concept.
The value may be specified in decimal, octal or hexadecimal using normal C
conventions.
.LP
Finally, string-valued capabilities, such as
.B el
(clear to end of line sequence) are given by the
two- to five-character capname, an
.RB ` = ',
and then a string ending at the next following comma.
A delay in milliseconds may appear
anywhere in such a capability, enclosed in
.B $<.\|.>
brackets, as in
.RB ` el=\eEK$<3> ',
and padding characters are supplied by
.BR tputs (\|)
(see
.BR curses (3V))
to provide this delay.
The delay can be either a number, for example,
.BR 20 ,
or a number followed by an
.B \(**
(for example,
.BR 3\(** ),
a
.B /
(for example,
.BR 5/ ),
or both
(for example,
.B 10\(**/ ).
A
.B \(**
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.
(In the case of insert character, the factor is still the number of
lines affected.
This is always one unless the terminal has
.BR in
and the software uses it.)
When a
.B \(**
is specified, it is sometimes useful to give a delay of the form
.B 3.5
to specify a delay per unit to tenths of milliseconds.
(Only one decimal place is allowed.)
A
.B /
indicates that the padding is mandatory.
Otherwise, if the terminal has
.BR xon
defined,
the padding information is advisory and will only be used for cost
estimates or when the terminal is in raw mode.
Mandatory padding will be transmitted regardless of the setting of
.BR xon .
.LP
A number of escape sequences are provided in the string-valued capabilities
for easy encoding of characters there:
.RS
.TP
.BR \eE , " \ee"
.PD 0
map to
.SM ESC
.TP
.B ^X
maps to 
.SM CTRL-\fIX\fR
for any appropriate character
.I X
.TP
.B \en
maps to
.SM NEWLINE
.TP
.B \el
maps to
.SM LINEFEED
.TP
.B \er
maps to
.SM RETURN
.TP
.B \et
maps to
.SM TAB
.TP
.B \eb
maps to
.SM BACKSPACE
.TP
.B \ef
maps to
.SM FORMFEED
.TP
.B \es
maps to
.SM SPACE
.TP
.B \e0
maps to
.SM NUL
.PD
.RE
.LP
.RB ( \e0
will actually produce
.BR \e200 ,
which does not terminate a string but behaves
as a null character on most terminals.)
Finally, characters may be given as three octal digits after a
backslash (for example,
.BR \e123 ),
and the characters
.B ^
(caret),
.B \e
(backslash),
.B :
(colon), and
.B ,
(comma) may be given as
.BR \e^ ,
.BR \e\e ,
.BR \e: ,
and
.B \e,
respectively.
.LP
Sometimes individual capabilities must be commented out.
To do this, put a period before the capability name.
For example, see the second
.B ind
in the example above.
Note: capabilities are defined in a
left-to-right order and, therefore,
a prior definition will override a later definition.
.br
.ne 5
.SS "Preparing Descriptions"
The most effective way to prepare a terminal description is by imitating
the description of a similar terminal in
.B terminfo
and to build up a description gradually, using partial descriptions
with some
.IR curses -based
application to check that they are correct.
Be aware that a very unusual terminal may expose deficiencies in
the ability of the
.BR terminfo
file to describe it or bugs in the application.
To test a new terminal description, set the environment variable
.SB TERMINFO
to a pathname of a directory containing the
compiled description you are working
on and programs will look there rather than in
.BR /usr/share/lib/terminfo .
To get the padding for insert-line correct (if the terminal manufacturer
did not document it) a severe test is to insert 16 lines into the middle
of a full screen at 9600 baud.
If the display is corrupted, more padding is usually needed.
A similar test can be used for insert-character.
.SS "Basic Capabilities"
.LP
The number of columns on each line for the terminal is given by the
.B cols
numeric capability.
If the terminal has a screen, then the
number of lines on the screen is given by the
.B lines
capability.
If the terminal wraps around to the beginning of the next line when
it reaches the right margin, then it should have the
.B am
capability.
If the terminal can clear its screen, leaving the cursor in the home
position, then this is given by the
.B clear
string capability.
If the terminal overstrikes
(rather than clearing a position when a character is struck over)
then it should have the
.B os
capability.
If the terminal is a printing terminal, with no soft copy unit,
give it both
.B hc
and
.BR os .
.RB ( os
applies to storage scope terminals, such as Tektronix 4010
series, as well as hard-copy and
.SM APL
terminals.)
If there is a code to move the cursor to the left edge of the current
row, give this as
.BR cr .
(Normally this will be
.SM RETURN\s0,
.SM CTRL-M\s0.)
If there is a code to produce an audible signal (bell, beep, etc)
give this as
.BR bel .
If the terminal uses the xon-xoff flow-control protocol, like most
terminals, specify
.BR xon .
.LP
If there is a code to move the cursor one position to the left
(such as backspace) that capability should be given as
.BR cub1 .
Similarly, codes to move to the right, up, and down should be
given as
.BR cuf1 ,
.BR cuu1 ,
and
.BR cud1 .
These local cursor motions should not alter the text they pass over;
for example, you would not normally use
.BR cuf1 =\es
because the
.SM SPACE
would erase the character moved over.
.LP
A very important point here is that the local cursor motions encoded
in
.B terminfo
are undefined at the left and top edges of a screen terminal.
Programs should never attempt to backspace around the left edge,
unless
.B bw
is given,
and should never attempt to go up locally off the top.
In order to scroll text up, a program will go to the bottom left corner
of the screen and send the
.B ind
(index) string.
.LP
To scroll text down, a program goes to the top left corner
of the screen and sends the
.B ri
(reverse index) string.
The strings
.B ind
and
.B ri
are undefined when not on their respective corners of the screen.
.LP
Parameterized versions of the scrolling sequences are
.B indn
and
.B rin
which have the same semantics as
.B ind
and
.B ri
except that they take one parameter, and scroll that many lines.
They are also undefined except at the appropriate edge of the screen.
.LP
The
.B am
capability tells whether the cursor sticks at the right
edge of the screen when text is output, but this does not necessarily
apply to a
.B cuf1
from the last column.
The only local motion which is defined from the left edge is if
.B bw
is given, then a
.B cub1
from the left edge will move to the right edge of the previous row.
If
.B bw
is not given, the effect is undefined.
This is useful for drawing a box around the edge of the screen, for example.
If the terminal has switch selectable automatic margins, the
.B terminfo
file usually assumes that this is on; that is,
.BR am .
If the terminal has a command which moves to the first column of the next
line, that command can be given as
.B nel
(\s-1NEWLINE\s0).
It does not matter if the command clears the remainder of the current line,
so if the terminal has no
.B cr
and
.B lf
it may still be possible to craft a working
.B nel
out of one or both of them.
.LP
These capabilities suffice to describe hardcopy and screen terminals.
Thus the model 33 teletype is described as
.LP
.RS
.nf
.ft B
.DT
33\||\|tty33\||\|tty\||\|model 33 teletype,
	bel=^G, cols#72, cr=^M, cud1=^J, hc, ind=^J, os,
.fi
.ft R
.RE
.LP
while the Lear Siegler
.SM ADM\s0\-3
is described as
.LP
.RS
.nf
.ft B
.DT
adm3\||\|lsi adm3,
	am, bel=^G, clear=^Z, cols#80, cr=^M, cub1=^H, cud1=^J,
	ind=^J, lines#24,
.fi
.ft R
.RE
.SS "Parameterized Strings"
.LP
Cursor addressing and other strings requiring parameters
in the terminal are described by a
parameterized string capability, with
.BR printf (3S)-like
escapes
.RB ( %x )
in it.
For example, to address the cursor, the
.B cup
capability is given, using two parameters:
the row and column to address to.
(Rows and columns are numbered from zero and refer to the
physical screen visible to the user, not to any unseen memory.)
If the terminal has memory relative cursor addressing,
that can be indicated by
.BR mrcup .
.LP
The parameter mechanism uses a stack and special
.B %
codes to manipulate it in the manner of a Reverse Polish Notation
(postfix) calculator.
Typically a sequence will push one of the
parameters onto the stack and then print it in some format.
Often more complex operations are necessary.
Binary operations are in postfix form with the operands in the usual order.
That is, to get x\-5 one would use
.RB ` %gx%{5}%\- '.
.LP
The
.B %
encodings have the following meanings:
.LP
.RS
.PD 0
.TP 12
.B %%
outputs
.B %
.TP
.BI %[\|[:] flags ]\|[ width [ .precision\fB]\|]\|[doxXs]
as in
.BR printf (3S),
flags are
.B [\-+#]
and
.SM SPACE
.TP
.B %c
print
.B pop(\|)
gives
.B %c
.TP
.B %p[1-9]
push
.IR i \uth\d
parm
.TP
.B %P[a-z]
set variable [a-z] to
.B pop(\|)
.TP
.B %g[a-z]
get variable [a-z] and push it
.TP
.BI %' c '
push char constant
.I c
.TP
.BI %{ nn }
push decimal constant
.I nn
.TP
.B %l
push
.B strlen(pop(\|))
.TP
.B %+ %\- %\(** %/ %m
arithmetic
.RB ( %m
is mod): 
.B push(pop(\|) op pop(\|))
.TP
.B %& %| %^
bit operations: 
.B push(pop(\|) op pop(\|))
.TP
.B %= %> %<
logical operations:
.B push(pop(\|) op pop(\|))
.TP
.B %A %O
logical operations:  and, or
.TP
.B %! %~
unary operations: 
.B push(op pop(\|))
.TP
.B %i
(for
.SM ANSI
terminals)
.RS
.RS
.nf
add 1 to first parm, if one parm present,
or first two parms, if more than one parm present
.fi
.RE
.RE
.TP
.BI %? expr %t thenpart %e elsepart\fB%;
if-then-else,
.RB ` %e\fIelsepart\fP '
is optional; else-if's are possible in Algol 68:
.RS
.RS
.B
%? c\d\s-21\s+2\u %t b\d\s-21\s+2\u %e c\d\s-22\s+2\u %t b\d\s-22\s+2\u %e c\d\s-23\s+2\u %t b\d\s-23\s+2\u %e c\d\s-24\s+2\u %t b\d\s-24\s+2\u %e b\d\s-25\s+2\u%;
.RE
.RE
.IP
c\d\s-1i\s+1\u are conditions, b\d\s-1i\s+1\u are bodies.
.PD
.RE
.LP
If the
.RB ` \- '
flag is used with
.RB ` %[doxXs] ',
then a colon (:) must be placed between the
.RB ` % '
and the
.RB ` \- '
to differentiate the flag from the binary
.RB ` %\- '
operator, for example,
.RB ` %:\-16.16s '.
.LP
Consider the Hewlett-Packard 2645, which, to get to row 3
and column 12, needs to be sent
.B \eE&a12c03Y
padded for 6 milliseconds.
Note: the order
of the rows and columns is inverted here, and that the row and column
are zero-padded as two digits.
Thus its
.B cup
capability is:
.IP
.RB cup=\eE&a%p2%2.2dc%p1%2.2dY$<6>
.LP
The Micro-Term
.SM ACT-IV
needs the current row and column sent preceded by a
.BR ^T ,
with the row and column simply encoded in binary,
.RB ` cup =^T%p1%c%p2%c'.
Terminals which use
.B %c
need to be able to backspace the cursor
.RB ( cub1 ),
and to move the cursor up one line on the screen
.RB ( cuu1 ).
This is necessary because it is not always safe to transmit
.BR \en ,
.BR ^D ,
and
.BR \er ,
as the system may change or discard them.
(The library routines dealing with
.B terminfo
set tty modes so that
.SM TAB
characters are never expanded, so
.B \et
is safe to send.
This turns out to be essential for the Ann Arbor 4080.)
.LP
A final example is the
.SM LSI ADM\s0-3a,
which uses row and column offset by a blank character, thus
.RB ` cup =\eE=%p1%'\es'%+%c%p2%'\es'%+%c'.
After sending `\eE=', this pushes the first parameter, pushes the
.SM ASCII
value for a space (32), adds them (pushing the sum on the stack
in place of the two previous values), and outputs that value as a character.
Then the same is done for the second parameter.
More complex arithmetic is possible using the stack.
.SS "Cursor Motions"
.LP
If the terminal has a fast way to home the cursor
(to very upper left corner of screen) then this can be given as
.BR home ;
similarly a fast way of getting to the lower left-hand corner
can be given as
.BR ll ;
this may involve going up with
.B cuu1
from the home position,
but a program should never do this itself (unless
.B ll
does) because it
can make no assumption about the effect of moving up from the home position.
Note: the home position is the same as addressing to
.RB ( 0 , 0 ):
to the top left corner of the screen, not of memory.
(Thus, the
.SB \eEH
sequence on Hewlett-Packard terminals cannot be used for
.B home
without losing some of the other features on the terminal.)
.LP
If the terminal has row or column absolute-cursor addressing,
these can be given as single parameter capabilities
.B hpa
(horizontal position absolute) and
.B vpa
(vertical position absolute).
Sometimes these are shorter than the more general two-parameter
sequence (as with the Hewlett-Packard 2645) and can be used in preference to
.BR cup .
If there are parameterized local motions (for example, move
.I n
spaces to the right) these can be given as
.BR cud ,
.BR cub ,
.BR cuf ,
and
.BR cuu
with a single parameter indicating how many spaces to move.
These are primarily useful if the terminal does not have
.BR cup ,
such as the Tektronix 4025.
.SS "Area Clears"
.LP
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
.BR el .
If the terminal can clear from the beginning of the line to the current
position inclusive,
leaving the cursor where it is, this should be given as
.BR el1 .
If the terminal can clear from the current position to the end of the
display, then this should be given as
.BR ed . 
.B ed
is only defined from the first column of a line.
(Thus, it can be simulated by a request to delete a large number of lines,
if a true
.B ed
is not available.)
.br
.ne 7
.SS "Insert/Delete Line"
.LP
If the terminal can open a new blank line before the line where the cursor
is, this should be given as
.RB ` il1 ';
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, then this
should be given as
.RB ` dl1 ';
this is done only from the first position on
the line to be deleted.
Versions of
.B il1
and
.B dl1
which take a single parameter and insert or delete that many lines can
be given as
.B il
and
.BR dl .
.LP
If the terminal has a settable destructive scrolling region (like the
.SM VT\s0100)
the command to set this can be described with the
.B csr
capability, which takes two parameters:
the top and bottom lines of the scrolling region.
The cursor position is, alas, undefined after using this command.
It is possible to get the effect of insert or delete line using
this command \(em the
.B sc
and
.B rc
(save and restore cursor) commands are also useful.
Inserting lines at the top or bottom of the screen can also be
done using
.B ri
or
.B ind
on many terminals without a true insert/delete line,
and is often faster even on terminals with those features.
.LP
To determine whether a terminal has destructive scrolling
regions or non-destructive scrolling regions,
create a scrolling region in the middle of the screen,
place data on the bottom line of the scrolling region,
move the cursor to the top line of the
scrolling region, and do a reverse index
.RB ( ri )
followed by a delete line
.RB ( dl1 )
or index
.RB ( ind ).
If the data that was originally on the bottom line
of the scrolling region was restored into the scrolling
region by the
.B dl1
or
.BR ind ,
then the terminal has non-destructive scrolling regions.
Otherwise, it has destructive scrolling regions.
Do not specify
.B csr
if the terminal has non-destructive scrolling regions, unless
.BR ind ,
.BR ri ,
.BR indn ,
.BR rin ,
.BR dl ,
and
.B dl1
all simulate destructive scrolling.
.LP
If the terminal has the ability to define a window as part of
memory, which all commands affect,
it should be given as the parameterized string
.BR wind .
The four parameters are the starting and ending lines in memory
and the starting and ending columns in memory, in that order.
.LP
If the terminal can retain display memory above, then the
.B da
capability should be given; if display memory can be retained
below, then
.B db
should be given.
These indicate that deleting a line or scrolling a full screen
may bring non-blank lines up from below
or that scrolling back with
.B ri
may bring down non-blank lines.
.SS "Insert/Delete Character"
.LP
There are two basic kinds of intelligent terminals with respect to
insert/delete character operations which can be described using
.BR terminfo .
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 which is
either eliminated, or expanded to two untyped blanks.
You can determine the kind of terminal you have by clearing the screen and
then typing text separated by cursor motions.
Type
.RB ` "abc\ \ \ \ def" '
using local cursor motions (not
.SM SPACE
characters) between the
.B abc
and the
.BR def .
Then position the cursor before the
.B abc
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
.B abc
shifts over to the
.B def
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
.BR in ,
which stands for
\(lqinsert null\(rq.
While these are two logically separate attributes (one line versus multiline
insert mode, and special treatment of untyped blanks) we have seen no
terminals whose insert mode cannot be described with the single attribute.
.LP
.B terminfo
can describe both terminals which have an insert mode and terminals
which send a simple sequence to open a blank position on the current line.
Give as
.B smir
the sequence to get into insert mode.
Give as
.B rmir
the sequence to leave insert mode.
Now give as
.B ich1
any sequence needed to be sent just before sending
the character to be inserted.
Most terminals with a true insert mode will not give
.BR ich1 ;
terminals
which send a sequence to open a screen position should give it here.
(If your terminal has both, insert mode is usually preferable to
.BR ich1 .
Do not give both unless the terminal actually requires both to be used in
combination.)
If post-insert padding is needed, give this as a number of milliseconds
padding in
.B ip
(a string option).
Any other sequence which may need to be sent after an insert of a single
character may also be given in
.BR ip .
If your terminal needs both to be placed into an \(lqinsert mode\(rq and
a special code to precede each inserted character, then both
.BR smir / rmir
and
.B ich1
can be given, and both will be used.
The
.B ich
capability, with one parameter,
.IR n ,
will repeat the effects of
.B ich1
.I n
times.
.LP
If padding is necessary between characters typed while not
in insert mode, give this as a number of milliseconds padding in
.BR rmp .
.LP
It is occasionally necessary to move around while in insert mode
to delete characters on the same line (for example, if there is a
.SM TAB
character after the insertion position).
If your terminal allows motion while in insert mode you can give the
capability
.B mir
to speed up inserting in this case.
Omitting
.B mir
will affect only speed.
Some terminals (notably Datamedia's) must not have
.B mir
because of the way their insert mode works.
.LP
Finally, you can specify
.B dch1
to delete a single character,
.B dch
with one parameter,
.IR n ,
to delete
.I n
characters, and delete mode by giving
.B smdc
and
.B rmdc
to enter and exit delete mode (any mode the terminal needs to be placed
in for
.B dch1
to work).
.LP
A command to erase
.I n
characters (equivalent to outputting
.I n
blanks without moving the cursor) can be given as
.B ech
with one parameter.
.SS "Highlighting, Underlining, and Visible Bells"
.LP
If your terminal has one or more kinds of display attributes,
these can be represented in a number of different ways.
You should choose one display form as
.I "standout mode"
(see
.BR curses (3V)),
representing a good, high contrast, easy-on-the-eyes,
format for highlighting error messages and other attention getters.
(If you have a choice, reverse-video plus half-bright is good,
or reverse-video alone; however, different users have different
preferences on different terminals.)
The sequences to enter and exit standout mode are given as
.B smso
and
.BR rmso ,
respectively.
If the code to change into or out of standout
mode leaves one or even two blanks on the screen, as the
.SM TVI
912 and Teleray 1061 do, then
.B xmc
should be given to tell how many blanks are left.
.LP
Codes to begin underlining and end underlining can be given as
.B smul
and
.B rmul
respectively.
If the terminal has a code to underline the current character and move
the cursor one position to the right, such as the Micro-Term
.SM MIME\s0,
this can be given as
.BR uc .
.LP
Other capabilities to enter various highlighting modes include
.B blink
(blinking),
.B bold
(bold or extra-bright),
.B dim
(dim or half-bright),
.B invis
(blanking or invisible text),
.B prot
(protected),
.B rev
(reverse-video),
.B sgr0
(turn off all attribute modes),
.B smacs
(enter alternate-character-set mode),
and
.B rmacs
(exit alternate-character-set mode).
Turning on any of these modes singly may or may not turn off other modes.
If a command is necessary before alternate character set mode is entered,
give the sequence in
.BR enacs
(enable alternate-character-set mode).
.LP
If there is a sequence to set arbitrary combinations of modes,
this should be given as
.B sgr
(set attributes),
taking nine parameters.
Each parameter is either
.B 0
or non-zero,
as the corresponding attribute is on or off.
The nine parameters are, in order:
standout, underline, reverse, blink, dim, bold, blank, protect, alternate
character set.
Not all modes need be supported by
.BR sgr ,
only those for which corresponding separate attribute commands exist.
(See the example at the end of this section.)
.LP
Terminals with the \(lqmagic cookie\(rq glitch
.RB ( xmc )
deposit special \(lqcookies\(rq when they receive mode-setting sequences,
which affect the display algorithm rather than having extra bits for
each character.
Some terminals, such as the Hewlett-Packard 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,
unless the
.B msgr
capability, asserting that it is safe to move in standout mode, is present.
.LP
If the terminal has
a way of flashing the screen to indicate an error quietly
(a bell replacement), then this can be given as
.BR flash ;
it must not move the cursor.
A good flash can be done by changing the screen
into reverse video, pad for 200 ms, then return the screen
to normal video.
.LP
If the cursor needs to be made more visible than normal when it is
not on the bottom line (to make, for example, a non-blinking underline into an
easier to find block or blinking underline)
give this sequence as
.BR cvvis .
The boolean
.BR chts
should also be given.
If there is a way to make the cursor completely invisible, give that as
.BR civis .
The capability
.B cnorm
should be given which undoes the effects of either of these modes.
.LP
If the terminal needs to be in a special mode when running
a program that uses these capabilities,
the codes to enter and exit this mode can be given as
.B smcup
and
.BR rmcup .
This arises, for example, from terminals like the Concept with more than
one page of memory.
If the terminal has only memory relative cursor addressing and not screen
relative cursor addressing, a one screen-sized window must be fixed into
the terminal for cursor addressing to work properly.
This is also used for the Tektronix 4025, where
.B smcup
sets the command character to be the one used by
.BR terminfo .
If the
.B smcup
sequence will not restore the screen after an
.B rmcup
sequence is output (to the state prior to outputting
.BR rmcup ),
specify
.BR nrrmc .
.LP
If your terminal generates underlined characters
by using the underline character
(with no special codes needed)
even though it does not otherwise overstrike characters,
then you should give the capability
.BR ul .
For terminals where a character overstriking another leaves both
characters on the screen, give the capability
.BR os .
If overstrikes are erasable with a blank,
then this should be indicated by giving
.BR eo .
.LP
Example of highlighting: assume that the terminal under
question needs the following escape sequences to turn on various modes.
.LP
.RS
.TS
cfB cfB cfB
cfB c c
c5 l5 l.
tparm	attribute	escape sequence
parameter
.sp .5v
	none	\eE[0m
p1	standout	\eE[0;4;7m
p2	underline	\eE[0;3m
p3	reverse	\eE[0;4m
p4	blink	\eE[0;5m
p5	dim	\eE[0;7m
p6	bold	\eE[0;3;4m
p7	invis	\eE[0;8m
p8	protect	not available
p9	altcharset	^O (off) ^N(on)
.TE
.RE
.LP
Note: each escape sequence requires a
.B 0
to turn off other modes before turning on its own mode.
Also note that, as suggested above,
.I standout
is set up to be the combination of
.I reverse
and
.IR dim .
Also, since this terminal has no
.I bold
mode,
.I bold
is set up as the combination of
.I reverse
and
.IR underline .
In addition, to allow combinations, such as
.IR underline+blink ,
the sequence to use would be
.RB ` \eE[0;3;5m '.
The terminal does not have
.I protect
mode, either, but that cannot be simulated in any way, so
.B p8
is ignored.
The
.I altcharset
mode is different in that it is either
.B ^O
or
.B ^N
depending on whether it is off or on.
If all modes were to be turned on, the sequence would be
.RB ` \eE[0;3;4;5;7;8m^N '.
.LP
Now look at when different sequences are output.
For example,
.RB ` ;3 '
is output when either
.RB ` p2 '
or
.RB ` p6 '
is true, that is, if either
.I underline
or
.I bold
modes are turned on.
Writing out the above sequences, along with their
dependencies, gives the following:
.LP
.RS
.TS
cfB cfB cfB
l5 l5 l.
sequence	when to output	terminfo translation
.sp
\eE[0	always	\eE[0
;3	if p2 or p6	%?%p2%p6%|%t;3%;
;4	if p1 or p3 or p6	%?%p1%p3%|%p6%|%t;4%;
;5	if p4	%?%p4%t;5%;
;7	if p1 or p5	%?%p1%p5%|%t;7%;
;8	if p7	%?%p7%t;8%;
m	always	m
^N or ^O	if p9 ^N, else ^O	%?%p9%t^N%e^O%;
.TE
.RE
.LP
Putting this all together into the
.B sgr
sequence gives:
.LP
.BR sgr =\eE[0%?%p2%p6%|%t;3%;%?%p1%p3%|%p6%|%t;4%;%?%p5%t;5%;%?%p1%p5%
.ti 1i
|%t;7%;%?%p7%t;8%;m%?%p9%t^N%e^O%;,
.SS Keypad
.LP
If the terminal has a keypad that transmits codes when the keys are pressed,
this information can be given.
Note: it is not possible to handle
terminals where the keypad only works in local (this applies, for example,
to the unshifted Hewlett-Packard 2621 keys).
If the keypad can be set to transmit or not transmit,
give these codes as
.B smkx
and
.BR rmkx .
Otherwise the keypad is assumed to always transmit.
.LP
The codes sent by the left arrow, right arrow, up arrow, down arrow,
and home keys can be given as
.BR kcub1 ,
.BR kcuf1 ,
.BR kcuu1 ,
.BR kcud1 ,
and
.B khome
respectively.
If there are function keys such as f0, f1, .\|.\|., f63, the codes they send
can be given as
.BR kf0 ,
.BR kf1 ", .\|.\|.\|,"
.BR kf63 .
If the first 11 keys have labels other than the default f0 through f10, the
labels can be given as
.BR lf0 ,
.BR lf1 ", .\|.\|.\|,"
.BR lf10 .
The codes transmitted by certain other special keys can be given:
.B kll
(home down),
.B kbs
(\s-1BACKSPACE\s0),
.B ktbc
(clear all tab stops),
.B kctab
(clear the tab stop in this column),
.B kclr
(clear screen or erase key),
.B kdch1
(delete character),
.B kdl1
(delete line),
.B krmir
(exit insert mode),
.B kel
(clear to end of line),
.B ked
(clear to end of screen),
.B kich1
(insert character or enter insert mode),
.B kil1
(insert line),
.B knp
(next page),
.B kpp
(previous page),
.B kind
(scroll forward/down),
.B kri
(scroll backward/up),
.B khts
(set a tab stop in this column).
In addition, if the keypad has a 3 by 3 array of keys including the four
arrow keys, the other five keys can be given as
.BR ka1 ,
.BR ka3 ,
.BR kb2 ,
.BR kc1 ,
and
.BR kc3 .
These keys are useful when the effects of a 3 by 3 directional pad are needed.
Further keys are defined above in the capabilities list.
.LP
Strings to program function keys can be given as
.BR pfkey ,
.BR pfloc ,
and
.BR pfx .
A string to program their soft-screen labels can be given as
.BR pln .
Each of these strings takes two parameters: the function key number to
program (from 0 to 10) and the string to program it with.
Function key numbers out of this range may program undefined keys in
a terminal-dependent manner.
The difference between the capabilities is that
.B pfkey
causes pressing the given key to be the same as the user typing the
given string;
.B pfloc
executes the string by the terminal in local mode; and
.B pfx
transmits the string to the computer.
The capabilities
.BR nlab ,
.B lw
and
.B lh
define how many soft labels there are and their width and height.
If there are commands to turn the labels on and off, give them in
.BR smln
and
.BR rmln .
.B smln
is normally output after one or more
.B pln
sequences to make sure that the change becomes visible.
.SS "Tabs and Initialization"
.LP
If the terminal has hardware tab stops, the command to advance to the next
tab stop can be given as
.B ht
(usually
.SM CTRL-I\s0).
A \(lqbacktab\(rq command which moves leftward to the next tab stop
can be given as
.BR cbt .
By convention, if the teletype modes indicate that
.SM TAB
characters are being
expanded by the computer rather than being sent to the terminal,
programs should not use
.B ht
or
.B cbt
even if they are present, since the user may not have the
tab stops properly set.
If the terminal has hardware
tab stops which are initially set every
.I n
spaces when the terminal is powered up,
the numeric parameter
.B it
is given, showing the number of spaces the tab stops are set to.
This is normally used by
.RB ` "tput init" '
(see
.BR tput (1V))
to determine whether to set the mode for hardware
.SM TAB
expansion and whether to set the tab stops.
If the terminal has tab
stops that can be saved in nonvolatile memory, the
.B terminfo
description can assume that they are properly set.
If there are commands to set and clear
tab stops, they can be given as
.B tbc
(clear all tab stops) and
.B hts
(set a tab stop in the current column of every row).
.LP
Other capabilities include:
.BR is1 ,
.BR is2 ,
and
.BR is3 ,
initialization strings for the terminal;
.BR iprog ,
the path name of a program to be run to initialize the terminal; and
.BR if ,
the name of a file containing long initialization strings.
These strings are expected to set the terminal into modes consistent
with the rest of the
.B terminfo
description.
They must be sent to the terminal
each time the user logs in and be output in the
following order: run the program
.BR iprog ;
output
.BR is1 ;
output
.BR is2 ;
set the margins using
.BR mgc ,
.BR smgl
and
.BR smgr ;
set the tab stops using
.B tbc
and
.BR hts ;
print the file
.BR if ;
and finally output
.BR is3 .
This is usually done using the
.B init
option of
.BR tput (1V).
.LP
Most initialization is done with
.BR is2 .
Special terminal modes can be set up without duplicating strings
by putting the common sequences in
.B is2
and special cases in
.B is1
and
.BR is3 .
Sequences that do a harder reset from a totally unknown state
can be given as
.BR rs1 ,
.BR rs2 ,
.BR rf ,
and
.BR rs3 ,
analogous to
.BR is1 ,
.BR is2 ,
.BR is3 ,
and
.BR if .
(The method using files,
.B if
and
.BR rf ,
is used for a few terminals, from
.BR /usr/share/lib/tabset/\(** ;
however, the recommended method is to use the initialization and reset
strings.)
These strings are output by
.RB ` "tput reset" ',
which is used when the terminal gets into a wedged state.
Commands are normally placed in
.BR rs1 ,
.BR rs2 ,
.BR rs3 ,
and
.B rf
only if they produce annoying effects on the screen and are not
necessary when logging in.
For example, the command to set a terminal into 80-column mode would
normally be part of
.BR is2 ,
but on some terminals
it causes an annoying glitch on the screen and is not normally
needed since the terminal is usually already in 80-column mode.
.LP
If a more complex sequence is needed to set the tab stops
than can be described by using
.B tbc
and
.BR hts ,
the sequence can be placed in
.B is2
or
.BR if .
.LP
If there are commands to set and clear margins, they can be given as
.B mgc
(clear all margins),
.B smgl
(set left margin), and
.B smgr
(set right margin).
.SS Delays
.LP
Certain capabilities control padding in the terminal driver.
These are primarily needed by hard-copy terminals, and are used
by
.RB ` "tput init" '
to set tty modes appropriately.
Delays embedded in the capabilities
.BR cr ,
.BR ind ,
.BR cub1 ,
.BR ff ,
and
.B tab
can be used to set the appropriate delay bits to be set in the tty driver.
If
.B pb
(padding baud rate)
is given,
these values can be ignored at baud rates below the value of
.BR pb .
.SS Status Lines
.LP
If the terminal has an extra \(lqstatus line\(rq that is not normally
used by software, this fact can be indicated.
If the status line is viewed as an extra line below the bottom line,
into which one can cursor address normally
(such as the Heathkit H19's 25th line, or the 24th line of a
.SM VT\s0100
which is set to a 23-line scrolling region),
the capability
.B hs
should be given.
Special strings
that go to a given column of the status
line and return from the status line can be given as
.B tsl
and
.BR fsl .
.RB ( fsl
must leave the cursor position in the same place it was before
.BR tsl .
If necessary, the
.B sc
and
.B rc
strings can be included in
.B tsl
and
.B fsl
to get this effect.)
The capability
.B tsl
takes one parameter, which is the column number of the status line
the cursor is to be moved to.
.LP
If escape sequences and other special commands, such as
.SM TAB\s0,
work while in the status line, the flag
.B eslok
can be given.
A string which turns off the status line (or otherwise erases its
contents) should be given as
.BR dsl .
If the terminal has commands to save and restore the position of the cursor,
give them as
.B sc
and
.BR rc .
The status line is normally assumed to be the same width as the rest
of the screen, for example,
.BR cols .
If the status line is a different width (possibly because the terminal
does not allow an entire line to be loaded) the width, in columns,
can be indicated with the numeric parameter
.BR wsl .
.br
.ne 10
.SS Line Graphics
.LP
If the terminal has a line drawing alternate character set, the mapping of
glyph to character would be given in
.BR acsc .
The definition of this string is based on the alternate character set used
in the
.SM DEC VT\s0100
terminal, extended slightly with some characters from the
.SM AT&T
4410v1 terminal.
.LP
.RS
.TS
l c.
glyph name	VT100+
	character
.sp
arrow pointing right	+
arrow pointing left	,
arrow pointing down	.
solid square block	0
lantern symbol	I
arrow pointing up	\-
diamond	`
checker board (stipple)	a
degree symbol	f
plus/minus	g
board of squares	h
lower right corner	j
upper right corner	k
upper left corner	l
lower left corner	m
plus	n
scan line 1	o
horizontal line	q
scan line 9	s
left tee (\|\z\(br\-\|)	t
right tee (\|\-\(br\|)	u
bottom tee (\|\o'\(ul\(br'\|)	v
top tee (\|\o'\(rn\(br'\|)	w
vertical line	x
bullet	~
.TE
.RE
.LP
The best way to describe a new terminal's line graphics set is to add a
third column to the above table with the characters for the new terminal
that produce the appropriate glyph when the terminal is in the alternate
character set mode.
For example,
.LP
.ne 12
.RS
.TS
l c c.
glyph name	VT100+	new tty
	char	char
.sp
upper left corner	l	R
lower left corner	m	F
upper right corner	k	T
lower right corner	j	G
horizontal line	q	,
vertical line	x	.
.TE
.RE
.LP
Now write down the characters left to right, as in
.RB ` acsc =lRmFkTjGq\e,x.'.
.SS Miscellaneous
.LP
If the terminal requires other than a null (zero) character as a pad,
then this can be given as
.BR pad .
Only the first character of the
.B pad
string is used.
If the terminal does not have a pad character, specify
.BR npc .
.LP
If the terminal can move up or down half a line,
this can be indicated with
.B hu
(half-line up)
and
.B hd
(half-line down).
This is primarily useful for superscripts and subscripts on hardcopy
terminals.
If a hardcopy terminal can eject to the next page (form feed), give this as
.B ff
(usually
.SM CTRL-L\s0).
.LP
If there is a command to repeat a given character a given number of
times (to save time transmitting a large number of identical characters)
this can be indicated with the parameterized string
.BR rep .
The first parameter is the character to be repeated and the second
is the number of times to repeat it.
Thus,
.RB ` "tparm(repeat_char, 'x', 10)" '
is the same as
.RB ` xxxxxxxxxx '.
.LP
If the terminal has a settable command character,
such as the Tektronix 4025,
this can be indicated with
.BR cmdch .
A prototype command character is chosen which is used in all capabilities.
This character is given in the
.B cmdch
capability to identify it.
On some
.SM UNIX
systems, when the environment variable
.SB CC
is set to a single-character value, all
occurrences of the prototype character are replaced with that character.
.LP
Terminal descriptions that do not represent a specific kind of known
terminal, such as
.BR switch ,
.BR dialup ,
.BR patch ,
and
.BR network ,
should include the
.B gn
(generic) capability so that programs can complain that they do not know
how to talk to the terminal.
(This capability does not apply to
.B virtual
terminal descriptions for which the escape sequences are known.)
If the terminal is one of those supported by the \s-1UNIX\s+1 system virtual
terminal protocol, the terminal number can be given as
.BR vt .
A line-turn-around sequence to be transmitted before doing reads should be
specified in
.BR rfi .
.LP
If the terminal uses xon/xoff handshaking for flow control, give
.BR xon .
Padding information should still be included so that routines can
make better decisions about costs, but actual pad characters will
not be transmitted.
Sequences to turn on and off xon/xoff handshaking may be given in
.BR smxon
and
.BR rmxon .
If the characters used for handshaking are not
.B ^S
and
.B ^Q
(\s-1CTRL-S and
.SM CTRL-Q\s0,
respectively),
they may be specified with
.BR xonc
and
.BR xoffc .
.LP
If the terminal has a \(lqmeta key\(rq which acts as a shift key,
setting the 8th bit of any character transmitted, this fact can
be indicated with
.BR km .
Otherwise, software will assume that the 8th bit is parity and it
will usually be cleared.
If strings exist to turn this \(lqmeta mode\(rq on and off, they
can be given as
.B smm
and
.BR rmm .
.LP
If the terminal has more lines of memory than will fit on the screen
at once, the number of lines of memory can be indicated with
.BR lm .
A value of
.BR lm #0
indicates that the number of lines is not fixed,
but that there is still more memory than fits on the screen.
.LP
Media copy
strings which control an auxiliary printer connected to the terminal
can be given as
.BR mc0 :
print the contents of the screen,
.BR mc4 :
turn off the printer, and
.BR mc5 :
turn on the printer.
When the printer is on, all text sent to the terminal will be sent
to the printer.
A variation,
.BR mc5p ,
takes one parameter, and leaves the printer on for as many characters
as the value of the parameter, then turns the printer off.
The parameter should not exceed 255.
If the text is not displayed on the terminal screen when the printer is on,
specify
.BR mc5i
(silent printer).
All text, including
.BR mc4 ,
is transparently passed to the printer while an
.B mc5p
is in effect.
.SS Special Cases
.LP
The working model used by
.B terminfo
fits most terminals reasonably well.  
However, some terminals do not completely match that model, 
requiring special support by
.BR terminfo .
These are not meant to be construed as
deficiencies in the terminals;
they are just differences between the
working model and the actual hardware.
They may be unusual devices or,
for some reason, do not have all the
features of the
.B terminfo
model implemented.
.LP
Terminals which can not display tilde
.RB ( \|\s+2~\s0\| )
characters, such as certain Hazeltine terminals,
should indicate
.BR hz .
.LP
Terminals which ignore a
.SM LINEFEED
immediately
after an
.B am
wrap, such as the Concept 100, should indicate
.BR xenl .
Those terminals whose cursor remains on the right-most
column until another character has been received,
rather than wrapping immediately upon receiving
the right-most character, such as the VT100,
should also indicate
.BR xenl .
.LP
If
.B el
is required to get rid of standout
(instead of writing normal text on top of it),
.B xhp
should be given.
.LP
Those Teleray terminals whose tabs turn all characters
moved over to blanks, should indicate
.B xt
(destructive
.SM TAB
characters).
This capability is also taken to mean that it is not possible
to position the cursor on top of a \(lqmagic cookie\(rq
therefore, to erase standout mode, it is instead
necessary to use delete and insert line.
.LP
Those Beehive Superbee terminals which do not transmit
the escape or
.SM CTRL-C
characters, should specify
.BR xsb ,
indicating that the f1 key is to be used for escape and the f2 key
for
.SM CTRL-C\s0.
.SS Similar Terminals
.LP
If there are two very similar terminals,
one can be defined as being just like the other with certain exceptions.
The string capability
.B use
can be given
with the name of the similar terminal.
The capabilities given before
.B use
override those in the terminal type invoked by
.BR use .
A capability can be canceled by placing
.IB xx @
to the left of the
capability definition, where
.I xx
is the capability.
For example, the entry
.LP
.RS
.ft B
att4424-2|Teletype\04424 in display function group ii,
.ti +1i
rev@, sgr@, smul@, use=att4424,
.ft R
.RE
.LP
defines an
.SM AT&T
4424 terminal that does not have the
.BR rev ,
.BR sgr ,
and
.B smul
capabilities,
and hence cannot do highlighting.
This is useful for different modes for a terminal,
or for different user preferences.
More than one
.B use
capability may be given.
.ne 5
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/?/\(**
compiled terminal description database
.TP
.B /usr/share/lib/tabset/\(**
tab stop settings for some terminals, in a format appropriate to be
output to the terminal (escape sequences that set margins and tab stops)
.PD
.SH SEE ALSO
.BR tput (1V),
.BR curses (3V),
.BR printf (3S),
.BR term (5V),
.BR captoinfo (8V),
.BR infocmp (8V),
.BR tic (8V)
.SH WARNING
.LP
As described in the
.B Tabs and Initialization
section above, a terminal's initialization strings,
.BR is1 ,
.BR is2 ,
and
.BR is3 ,
if defined,
must be output before a
.BR curses (3V)
program is run.
An available mechanism for outputting such
strings is
.BR tput
.B init
(see
.BR tput (1V)).
.LP
Tampering with entries in
.B /usr/share/lib/terminfo/?/\(**
(for example, changing or removing an entry) can affect
programs that expect the entry to be present and correct.
In particular, removing the description
for the \(lqdumb\(rq terminal will cause
unexpected problems.
low the value of
.BR pb .
.SS Status Lines
.LP
If the terminal has an extra \(lqstatus line\(rq that is not normally
used by software, this fact can be indicated.
If the status line is viewed as an extra line below the bottom line,
into which one can cursor address normally
(such as the Heathkit H19's 25th line, or the 24th l./share/man/man5/textswrc.5                                                                            755       0      12          336  4424741517  10650                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)textswrc.5 1.4 89/03/27 SMI;
.TH TEXTSWRC 5 "2 September 1987"
.SH NAME
textswrc \- initialization file for SunView text windows
.SH SYNOPSIS
.B ~/.textswrc
.br
.B /usr/lib/textswrc
.SH DESCRIPTION
To be supplied.
de.5 s  P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5  pe \s-1UNIX\s+1 system virtual
terminal protocol, the terminal number can be given as
.BR vt .
A line-turn-around sequence to be transmitted before doing reads should be
specifi./share/man/man5/toc.5                                                                                 755       0      12         5064  4424741517   7575                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)toc.5 1.7 89/03/27 SMI; 
.TH TOC 5  "19 February 1988"
.SH NAME
toc \- table of contents of optional clusters in Application SunOS and Developer's Toolkit 
.SH SYNOPSIS
.B /usr/lib/load/toc
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "toc file" "" "\fLtoc\fP file"
.LP
The
.B toc
file contains information specifying the organization of the optional clusters
in Application SunOS 
and Developer's Toolkit on the Sun386i distribution media.
For each cluster, a single line should be present
with the following information:
.IP
cluster name
.br
.ns
.IP
set containing the cluster (Application SunOS or Developer's Toolkit)
.br
.ns
.IP
size of the cluster (in kilobytes)
.br
.ns
.IP
diskette volume of the cluster in the set (for loading from 3.5" diskette)
.br
.ns
.IP
tape and file number of the cluster (for loading from 1/4" tape)
.LP
Items are separated by a ':'.
.LP
Cluster names can contain any printable character other than a ':', space,
tab, or newline character.
The set containing the cluster is specified by an 'A' for Application
SunOS or 'D' for Developer's Toolkit.
The diskette volume is the number of the diskette within the diskette set
on which the cluster begins.
The tape and file number specifies the tape and file position of the cluster
on the tape.
.SH EXAMPLE
.LP
The following is an example to the \fBtoc\fR file.
.IP
.ft B
.nf
.ta +1.0i +1.0i +1.0i
accounting:A:55:14:1@12
advanced_admin:A:628:14:1@4
audit:A:144:14:1@8
comm:A:312:13:1@9
disk_quotas:A:56:14:1@11
doc_prep:A:790:13:1@10
extended_commands:A:276:13:1@5
games:A:2351:19:1@17
mail_plus:A:135:14:1@7
man_pages:A:5586:16:1@14
name_server:A:339:14:1@13
networking_plus:A:610:13:1@6
old:A:131:14:1@16
plot:A:227:14:1@14
spellcheck:A:455:13:1@2
sysV_commands:A:2505:14:1@3
base_devel:D:5389:1:2@2
plot_devel:D:247:5:2@3
sccs:D:328:5:2@4
sunview_devel:D:1768:5:2@5
sysV_devel:D:4287:3:2@6
proflibs:D:4755:4:2@7
config:D:3065:6:2@8
.fi
.ft
.br
.ne 7
.LP
The fist line specifies that the \fBaccounting\fR cluster is part of
Application SunOS and requires 55 kilobytes of disk storage.
In the diskette distribution, it begins on diskette 14 of Application
SunOS optional clusters. 
In the tape distribution, it can be found on file 12 of tape 1.
The last line specifies that the \fIconfig\fR cluster is part of
Developer's Toolkit and requires 3065 kilobytes of disk storage.
In the diskette distribution, it begin on diskette 6 of Developer's Toolkit.
In the tape distribution, it can be found on file 8 of tape 2.
.SH FILES
\fB/usr/lib/load/toc\fR
.SH "SEE ALSO"
.BR cluster (1)
.BR load (1)
.BR unload (1)
uary 1988"
.SH NAME
toc \- table of contents of optional clusters in Application SunOS and Developer's Toolkit 
.SH SYNOPSIS
.B /usr/lib/load/toc
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "toc file" "" "\fLtoc\fP file"
.LP
The
.B toc
file contains information specifying the organization of the optional clusters
in Application SunOS 
and Developer's Toolkit on the Sun386i distribution media.
For each cluster, a single line should be present./share/man/man5/translate.5                                                                           755       0      12         6262  4424741520  11000                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)translate.5	1.7 89/03/27 SMI;
.TH TRANSLATE 5 "19 February 1988"
.SH NAME
translate \- input and output files for system message translation
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX  "translate"  ""  "\fLtranslate\fP \(em input and output files for system message translation"
.LP
These files are used by 
.BR syslogd (8) 
to translate systems messages.
The input file is used to map system messages
(in
.BR printf (3S)
format strings) to numbers.
This number is then used 
to locate a new string in the output file.
.LP
An initial part of each line in the input file may specify
that the message should be suppressed.  Recognized suppression
specifications are:
.LP
.nf
.ft B
	(\s-1NONE\s0)	Suppress the message always.
	(n)	Allow only one message every n seconds. ((10) for
		example).
	()	Do not suppress the message.  This can be used in a
		message that begins with a '('.
.ft R
.fi
.LP
Note that the message suppression specification is optional.
If not present, the message is not suppressed.
.LP
Each line in the output file translates the numbers
from the input file into the desired error messages, and also 
specifies the format to be used to 
output each message.
The order of parameters passed from the input message can be changed, 
by replacing
the
.B %
of a format phrase with a
.BI % num $
where
.I num
is a digit string.  For example, if
.I num
is 2, the second parameter on the
input file line will be used. The value of
.I num
can be from 1 to the number of parameters in the input message.
.LP
If a string is translated to a number that is not found in the output
file, the message is suppressed.
.SH EXAMPLES
An example input file:
.IP
.ft B
.nf
$quote "
1	"(NONE)(1) logopen test code: %s\\n"
2	"(10)(2) logopen test code: %s\\n"
3	"()(3) logopen test code: %s\\n"
4	"()(4) logopen test code: %s\\n"
5	"(10)(5) logopen testcode: %s * 100\\n"
6	"(10)(6) logopen testcode: %s * 100\\n"
7	"(10)(7) logopen testcode: %s * 100\\n"
8	"(10)%s: %s\\n"
9	"(10)\\n%s: write failed, file system is full\\n"
10	"(10)NFS server %s not responding still trying\\n"
11	"(10)NFS %s failed for server %s: %s\\n"
12	"(10)NFS server %s ok\\n"
13	"(NONE)\\n%s: write failed, file system is full\\n"
14	"(10)NFS server %s not responding still trying\\n"
15	"(100)NFS %s failed for server %s: %s\\n"
.fi
.ft
.br
.ne 10
.LP
An example output file:
.IP
.ft B
.nf
$quote "
1	"\s-1TRANSLATION\s0:(1) logopen test code: %s\\n"
2	"\s-1TRANSLATION\s0: (2) logopen test code: %s IS REALLY\\n"
3	"\s-1TRANSLATION\s0: (3) logopen test code: %s\\n"
4	"\s-1TRANSLATION\s0: (4) logopen test code: %s\\n"
5	"\s-1TRANSLATION\s0: (5) logopen testcode: %s * 100\\n"
6	"\s-1TRANSLATION\s0: (6) logopen testcode: %s * 100\\n"
7	"\s-1TRANSLATION\s0: (7) logopen testcode: %s * 100\\n"
8	"\s-1TRANSLATION\s0: %s: %s\\n"
9	"\s-1TRANSLATION\s0: \\n%s: write failed, file system is full\\n"
10	"\s-1TRANSLATION\s0: NFS server %s not responding still trying\\n"
11	"\s-1TRANSLATION\s0: NFS %s failed for server %s: %s\\n"
12	"\s-1TRANSLATION\s0: NFS server %s ok\\n"
13	"Out of disk on file system %s\\n"
14	"Network file server %s not ok. Check your cable\\n"
15	"Network file server %2$s down (%1$s, %3$s)\\n"
.fi
.ft
.SH SEE ALSO
.BR syslogd (8)
as the VT100,
should also indicate
.BR xenl .
.LP
If
.B el
is required to get rid of standout
(instead of writing normal text on top of it),
.B xhp
should be given.
.LP
Those Teleray terminals whose tabs turn all characters
moved over to blanks, should indicate
.B xt
(destructive
.SM TAB
characters).
This capability is also taken to./share/man/man5/ttys.5                                                                                755       0      12           64  4424741520   7740                                                                                                                                                                                                                                                                                                                                                                      .so man5/ttytab.5
.\" @(#)ttys.5 1.11 89/03/27 SMI;
  	ttytype.5     z  tzfile.5      z  
updaters.5   ,  z  utmp.5 s  @  {   
uuencode.5   P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5  fes for system message translation"
.LP
These files are used by 
.BR syslogd (8) 
to translate systems messages.
The input file is used to map system messages
(in
.BR printf (3S)
format strings) to numbers.
This number is then used 
to locate a ./share/man/man5/ttytab.5                                                                              755       0      12         6555  4424741520  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ttytab.5 1.11 89/03/27 SMI; from UCB 4.3
.TH TTYTAB 5 "22 December 1987"
.SH NAME
ttytab, ttys \- terminal initialization data
.SH DESCRIPTION
.IX "ttytab file" "" "\fLttytab\fP file"
.LP
The
.B /etc/ttytab
file contains information that is used by various routines to initialize
and control the use of terminal special files. This information is read
with the
.BR getttyent (3)
library routines.
There is one line in
.B /etc/ttytab
file per special file.
.LP
The
.B /etc/ttys
file should not be edited; it is derived from
.B /etc/ttytab
by
.BR init(8)
at boot time, and is only included for backward compatibility with
programs that may still require it.
.LP
Fields are separated by
.SM TAB
and/or
.SM SPACE
characters.  Some fields may contain more than
one word and should be enclosed in double quotes.
Blank lines and comments can appear anywhere in
the file; comments
are delimited by
.RB ` # '
and
.SM NEWLINE\s0.
Unspecified fields default to
.SM NULL\s0.
The first field is the terminal's entry in the device directory,
.BR /dev .
The second field of the file is the command
to execute for the line, typically
.BR getty (8),
which performs such tasks as baud-rate recognition, reading the login name,
and calling
.BR login (1).
It can be, however, any desired command, for example
the start up for a window system terminal emulator or some other
daemon process, and can contain multiple words if quoted.
The third field is the type of terminal normally connected to that
tty line, as found in the
.BR termcap (5)
data base file.
The remaining fields set flags in the
.B ty_status
entry (see
.BR getttyent (3))
or specify a window system process that
.BR init (8)
will maintain for the terminal line.
.LP
As flag values,
the strings
.B on
and
.B off
specify whether
.B init
should execute the command
given in the second field,
while
.B secure
in addition to
.B on
allows ``root'' to login on this line.
If the console is not marked ``secure,''
the system prompts for
the root password before coming up in single-user mode.
These flag fields should not be quoted.
The string
.B window=
is followed by a quoted command
string which
.B init
will execute before starting
.BR getty .
If the line ends in a comment, the comment
is included in the
.B ty_comment
field of the
.B ttyent
structure.
.SH EXAMPLE
.LP
.nf
.ft B
.ta \w'console\ 'u +\w'"/usr/etc/getty std.9600"\ \ \ 'u +\w'hp2621-nl\ \ \ \ 'u +.7i
console	"/usr/etc/getty std.1200"	vt100	on secure
ttyd0	"/usr/etc/getty d1200"	dialup	on	# 555-1234
ttyh0	"/usr/etc/getty std.9600"	hp2621-nl	on	# 254\s-1MC\s0
ttyh1	"/usr/etc/getty std.9600"	plugboard	on	# John's office
ttyp0	none	network
ttyp1	none	network	off
ttyv0	"/usr/new/xterm -L :0"	vs100	on window="/usr/new/Xvs100 0"
.ft R
.fi
.LP
The first line permits ``root'' login on the console
at 1200 baud, and indicates that the console is
secure for single-user operation.  The second example
allows dialup at 1200 baud without ``root'' login,
and the third and fourth examples allow login
at 9600 baud with terminal types of
.B hp2621-nl
and
.BR plugboard ,
respectively.  The fifth and sixth lines are
examples of network pseudo-ttys, for which
.B getty
should not be enabled.
The last line shows a terminal emulator
and window-system
startup entry.
.SH FILES
.PD 0
.TP 20
.B /dev
.TP
.B /etc/ttytab
.PD
.SH SEE ALSO
.BR login (1),
.BR getttyent (3),
.BR gettytab (5),
.BR termcap (5),
.BR getty (8),
.BR init (8)
inals whose tabs turn all characters
moved over to blanks, should indicate
.B xt
(destructive
.SM TAB
characters).
This capability is also taken to./share/man/man5/ttytype.5                                                                             755       0      12          103  4424741520  10471                                                                                                                                                                                                                                                                                                                                                                      .so man5/ttytab.5
.\" @(#)ttytype.5 1.3 89/03/27 SMI; from UCB 4.2
s.5   ,  z  utmp.5 s  @  {   
uuencode.5   P  {  vfont.5   d  {  vgrindefs.5   t  {  wtmp.5 f    {  xtab.5 p     {  	ypfiles.5  fains information that is used by various routines to initialize
and control the use of terminal special files. This information is read
with the
.BR getttyent (3)
library routines.
There is one line in
.B /etc/ttytab
file per special file.
.LP
The
.B /etc/ttys
file should not be edited; ./share/man/man5/tzfile.5                                                                              755       0      12         4656  4424741520  10305                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tzfile.5 1.7 89/03/27 SMI; from Arthur Olson
.TH TZFILE 5
.SH NAME
tzfile \- time zone information
.SH SYNOPSIS
.B
#include <tzfile.h>
.SH DESCRIPTION
.IX "tzfile file" "" "\fLtzfile\fP file"
.LP
The time zone information files used by
.BR tzset (3V)
begin with bytes reserved for future use,
followed by three four-byte values of type
.BR long ,
written in a \(lqstandard\(rq byte order
(the high-order byte of the value is written first).
These values are,
in order:
.RS
.TP 20
.I tzh_timecnt
The number of \(lqtransition times\(rq for
which data is stored in the file.
.TP
.I tzh_typecnt
The number of \(lqlocal time types\(rq for
which data is stored
in the file (must not be zero).
.TP
.I tzh_charcnt
The number of characters of \(lqtime zone
abbreviation strings\(rq stored in the file.
.RE
.LP
The above header is followed by
.I tzh_timecnt
four-byte values of type
.BR long ,
sorted in ascending order.
These values are written in \(lqstandard\(rq byte order.
Each is used as a transition time (as returned by
.BR gettimeofday (2))
at which the rules for computing local time change.
Next come
.I tzh_timecnt
one-byte values of type
.BR "unsigned char" ;
each one tells which of the different
types of \(lqlocal time\(rq types
described in the file is associated
with the same-indexed transition time.
These values serve as indices into an array of
.I ttinfo
structures that appears next in the file;
these structures are defined as follows:
.LP
.RS
.nf
.ta .5i +\w'unsigned int\0\0'u
.ft B
struct ttinfo {	
	long	tt_gmtoff;
	int	tt_isdst;
	unsigned int	tt_abbrind;
};
.ft R
.fi
.RE
.LP
Each structure is written as a four-byte value for
.I tt_gmtoff
of type
.BR long ,
in a standard byte order, followed by a
one-byte value for
.I tt_isdst
and a one-byte value for
.IR tt_abbrind .
In each structure,
.I tt_gmtoff
gives the number of seconds to be added to
.SM GMT\s0,
.I tt_isdst
tells whether
.I tm_isdst
should be set by
.B localtime
(see
.BR ctime (3))
and
.I tt_abbrind
serves as an index into the array of
time zone abbreviation characters that follow the
.I ttinfo
structure(s) in the file.
.LP
.B localtime
uses the first standard-time
.I ttinfo
structure in the file
(or simply the first
.I ttinfo
structure in the absence of a standard-time structure)
if either
.I tzh_timecnt
is zero or the time argument is less than the first transition time recorded
in the file.
.SH SEE ALSO
.BR gettimeofday (2),
.BR ctime (3),
.BR localtime (3),
.BR tzset (3V)
/etc/getty d1200"	dialup	on	# 555-1234
ttyh0	"/usr/etc/getty std.9600"	hp2621-nl	o./share/man/man5/updaters.5                                                                            755       0      12         3453  4424741521  10632                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)updaters.5 1.9 89/03/27 SMI
.TH UPDATERS 5 "14 December 1987"
.SH NAME
updaters \- configuration file for YP updating
.SH SYNOPSIS
.B /var/yp/updaters
.SH DESCRIPTION
.IX "updaters file" "" "\fLupdaters\fP file"
.LP
The file
.B /var/yp/updaters
is a makefile (see
.BR make (1))
which is used for updating YP databases. Databases can only be updated
in a secure network, that is, one that has a
.BR publickey (5)
database. Each entry in the file is
a make target for a particular
.SM YP
database. For example, if there is a
.SM YP
database named
.B passwd.byname
that can be updated, there should be a
.B make
target named
.B passwd.byname
in the
.B updaters
file with the command to update the file.
.LP
The information necessary to make
the update is passed to the update
command through standard input. The
information passed is described
below (all items are followed by a
.SM NEWLINE\s0,
except for 4 and 6)
.IP \(bu 3
Network name of client wishing to
make the update (a string)
.IP \(bu
Kind of update (an integer)
.IP \(bu
Number of bytes in key (an integer)
.IP \(bu
Actual bytes of key
.IP \(bu
Number of bytes in data (an integer)
.IP \(bu
Actual bytes of data
.LP
After getting this information through
standard input, the command to update
the particular database should decide
whether the user is allowed to make
the change. If not, it should exit with the status
.SM
.BR YPERR_ACCESS .
If the user is allowed to make the change,
the command should make the change and
exit with a status of zero. If there are
any errors that may prevent the updater from
making the change, it should exit with the status
that matches a valid
.SM YP
error code described in
.BR <rpcsvc/ypclnt.h> .
.SH FILES
.PD 0
.TP 20
.B /var/yp/updaters
.PD
.SH "SEE ALSO"
.BR make (1),
.BR ypupdate (3N),
.BR publickey (5),
.BR ypupdated (8C)
s the number of seconds to be added to
.SM GMT\s0,
.I tt_isdst
tells whether
.I tm_isdst
should be set by
.B localtime
(see
.BR ctime (3))
and
.I tt_abbrind
serves as an index into the array of
time zone abbreviat./share/man/man5/utmp.5                                                                                755       0      12        12501  4424741521  10002                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)utmp.5 1.21 89/03/27 SMI; from UCB 4.2
.TH UTMP 5  "22 March 1989"
.SH NAME
utmp, wtmp, lastlog \- login records
.SH SYNOPSIS
.B #include <utmp.h>
.br
.B #include <lastlog.h>
.SH DESCRIPTION
.IX  "utmp file"  ""  "\fLutmp\fP \(em login records"
.IX  "wtmp file"  ""  "\fLwtmp\fP \(em login records"
.IX  "lastlog file"  ""  "\fLlastlog\fP \(em login records"
.IX  "login records"  "utmp file"  ""  "\fLutmp\fP file"
.IX  "login records"  "wtmp file"  ""  "\fLwtmp\fP file"
.IX  "login records"  "lastlog file"  ""  "\fLlastlog\fP file"
.SS "utmp file"
The
.B utmp
file records information about who is currently using the system.
The file is a sequence of
.B utmp
structure entries.  That structure is defined in
.BR <utmp.h> ,
and contains the following members:
.RS
.TP 12
.B ut_line
Character array containing the name of the terminal on which the user logged
in.
.TP
.B ut_name
Character array containing the name of the user who logged in.
.TP
.B ut_host
Character array containing
the name of the host from which the user remotely logged in, if they logged
in from another host; otherwise, a null string.
.TP
.B ut_time
.B long
containing the time at which the user logged in, in seconds since 00:00
.SM GMT\s0,
January 1, 1970.
.RE
.LP
Whenever a user logs in,
.BR login (1)
fills in the entry in
.B /etc/utmp
for the terminal on which the user logged in.  When they log out,
.BR init (8)
clears that entry by setting
.B ut_name
and
.B ut_host
to null strings and
.B ut_time
to the time at which the user logged out.
.LP
Some window systems will make entries in
.B utmp
for terminal emulation windows running shells, so that library routines such
as
.B getlogin
will work correctly in that window.  These entries do not directly represent
logged-in users; they are associated with a user who has already logged into
the system on another terminal.  These entries generally have a
.B ut_line
field that refers to a pseudo-terminal, and a
.B ut_host
field that is a null string.
The macro
.BR nonuser ,
defined in
.BR <utmp.h> ,
takes a pointer to a
.B utmp
structure as an argument and, if the entry has a
.B ut_line
field that refers to a pseudo-terminal, and a
.B ut_host
field that is a null string, will return 1; otherwise, it will return 0.
This can be used by programs that print information about logged-in users if
they should not list entries made for logged-in users' additional windows.
.SS "wtmp file"
The
.B wtmp
file records all logins and logouts.  It also consists of a sequence of
.B utmp
entries.
.LP
Whenever a user logs in,
.B login
appends a record identical to the record it placed in
.B utmp
to the end of
.B /var/adm/wtmp.
Whenever a user logs out,
.B init
appends a record with
.B ut_line
equal to the terminal that the user was logged in on,
.B ut_name
and
.B ut_host
null, and
.B ut_time
equal to the time at which the user logged out.
.LP
When the system is shut down,
.B init
appends a record with a
.B ut_line
of
.BR ~ ,
a
.B ut_name
of
.BR shutdown ,
a null
.BR ut_host ,
and a
.B ut_time
equal to the time at which the shutdown occurred.
When the system is rebooted,
.B init
appends a record with a
.B ut_line
of
.BR ~ ,
a
.B ut_name
of
.BR reboot ,
a null
.BR ut_host ,
and a
.B ut_time
equal to the time at which
.B init
wrote the record.
.LP
When the
.B date
command is used to change the system-maintained time,
.B date
appends a record with a
.B ut_line
of
.BR | ,
.B ut_name
and
.B ut_host
null,
and
.B ut_time
equal to the system time before the change, and then appends a record with a
.B ut_line
of
.BR { ,
.B ut_name
and
.B ut_host
null,
and
.B ut_time
equal to the system time after the change.
.LP
None of the programs that maintain
.B wtmp
create the file,
so that if record-keeping is to be enabled, it must be created by hand as a
zero-length file,
and if it is removed, record-keeping is turned off.  It is summarized by
.BR ac (8).
.LP
As
.B wtmp
is appended to whenever a user logs in or out, it should be
truncated periodically so that it does not consume all the disk space on its
file system.
.SS "lastlog file"
The
.B lastlog
file records the most recent login-date for every user logged
in.  The file is a sequence of
.B lastlog
structure entries.  That structure is defined in
.BR <lastlog.h> ,
and contains the following members:
.RS
.TP 12
.B ll_time
.B long
containing the time at which the user logged in, in seconds since 00:00
.SM GMT\s0,
January 1, 1970.
.TP
.B ll_line
Character array containing the name of the terminal on which the user logged
in.
.TP
.B ll_host
Character array containing
the name of the host from which the user remotely logged in, if they logged
in from another host; otherwise, a null string.
.RE
.LP
When reporting (and updating) the most recent login date,
.B login
performs an
.BR lseek (2)
to a byte-offset in 
.BR /var/adm/lastlog 
corresponding to the userid.  Because
the count of userids may be high, whereas the number actual users
may be small within a network environment, the bulk of this file
may never be allocated by the file system even though an offset
may appear to be quite large.  
Although
.BR ls (1V)
may show it to be large,
chances are that this file need not be truncated.
.BR du (1V)
will report the correct (smaller) amount of space actually
allocated to it.
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
.TP
.B /var/adm/wtmp
.TP
.B /var/adm/lastlog
.PD
.SH "SEE ALSO"
.BR login (1),
.BR who (1),
.BR ac (8),
.BR init (8)
inal.  These entries generally have a
.B ut_line
field that refers to a pseudo-terminal, and a
.B ut_host
field that is a null string.
The macro
.BR nonuser ,
defined in
.BR <utmp.h> ,
takes ./share/man/man5/uuencode.5                                                                            755       0      12         3477  4424741521  10620                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uuencode.5 1.10 89/03/27 SMI; from UCB 4.2
.TH UUENCODE 5 "19 October 1987"
.SH NAME
uuencode \- format of an encoded uuencode file
.SH DESCRIPTION
.IX  "uuencode file"  ""  "\fLuuencode\fP \(em UUCP encoded file format"
.LP
Files output by
.BR uuencode (1C)
consist of a header line,
followed by a number of body lines,
and a trailer line.
.B uudecode
(see
.BR uuencode (1C))
will ignore any lines preceding the header or
following the trailer.
Lines preceding a header must not, of course,
look like a header.
.LP
The header line is distinguished by having the first
6 characters
.RB ` "begin " '.
The word
.B begin
is followed by a mode (in octal),
and a string which names the remote file.
Spaces separate the three items in the header line.
.LP
The body consists of a number of lines,
each at most 62 characters
long (including the trailing
.SM NEWLINE\s0).
These consist of a character count,
followed by encoded characters, followed by a
.SM NEWLINE\s0.
The character count is a single printing character,
and represents an integer, the number of bytes
the rest of the line represents.
Such integers are always in the range
from 0 to 63 and can be determined by
subtracting the character space (octal 40)
from the character.
.LP
Groups of 3 bytes are stored in 4
characters, 6 bits per character.
All are offset by a
.SM SPACE
to make
the characters printing.
The last line may be shorter than the normal 45 bytes.
If the size is not a multiple of 3,
this fact can be determined
by the value of the count on the last line.
Extra garbage will be included to make
the character count a multiple
of 4.
The body is terminated by a line with a count of zero.
This line consists of one
.SM ASCII SPACE\s0.
.LP
The trailer line consists of
.B end
on a line by itself.
.SH "SEE ALSO"
.BR mail (1),
.BR uuencode (1C),
.BR uucp (1C),
.BR uusend (1C)
)
inal.  These entries generally have a
.B ut_line
field that refers to a pseudo-terminal, and a
.B ut_host
field that is a null string.
The macro
.BR nonuser ,
defined in
.BR <utmp.h> ,
takes ./share/man/man5/vfont.5                                                                               755       0      12         5700  4424741521  10134                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vfont.5 1.17 89/03/27 SMI; from UCB 4.2
.TH VFONT 5 "19 October 1987"
.SH NAME
vfont \- font formats
.SH SYNOPSIS
.B #include <vfont.h>
.SH DESCRIPTION
.IX  "vfont file"  ""  "\fLvfont\fP \(em font formats"
.LP
The fonts used by the window system
and printer/plotters have
the following format.  Each font is in a file,
which contains a header, an array of
character description structures, and an
array of bytes containing the bit maps
for the characters.  The header has the
following format:
.LP
.RS
.ta 8n +\w'unsigned short  'u +20n
.nf
.ft B
struct header {
	short	magic;	/* Magic number \s-1VFONT_MAGIC\s0 */
	unsigned short	size;	/* Total # bytes of bitmaps */
	short	maxx;	/* Maximum horizontal glyph size */
	short	maxy;	/* Maximum vertical glyph size */
	short	xtend;	/* (unused) */
};
#define	\s-1VFONT_MAGIC\s0	0436
.ft R
.fi
.RE
.LP
.I maxx
and
.I maxy
are intended to be the maximum horizontal
and vertical size of any glyph in the font,
in raster lines.  (A glyph is just a printed
representation of a character, in a particular
size and font.) The
.B size
is the total size of the
bit maps for the characters in bytes.  The
.I xtend
field is not currently used.
.LP
After the header is an array of
.SB NUM_DISPATCH
structures, one for
each of the possible characters in the font.
Each element of the array has the form:
.LP
.RS
.ta 8n +\w'unsigned short  'u +20n
.ft B
.nf
struct dispatch {
	unsigned short	addr;	/* &(glyph) - &(start of bitmaps) */
	short	nbytes;	/* # bytes of glyphs (0 if no glyph) */
	char	up, down, left, right;  	/* Widths from baseline point */
	short	width;	/* Logical width, used by troff */
};
#define	\s-1NUM_DISPATCH\s0	256
.fi
.ft R
.RE
.LP
The
.I nbytes
field is nonzero for characters which actually exist.
For such characters, the
.I addr
field is an offset into the bit maps
to where the character's bit map begins.  The
.I up ,
.IR down ,
.IR left ,
and
.I right
fields are offsets from the base point
of the glyph to the edges of the
rectangle which the bit map represents.
(The imaginary ``base point'' is a point which is
vertically on the ``base line''
of the glyph (the bottom line of a
glyph which does not have a descender)
and horizontally
near the left edge of the glyph; often 3 or so pixels
past the left edge.)
The bit map contains
.I up+down
rows of data for the character,
each of which has
.I left+right
columns (bits).  Each row is rounded
up to a number of bytes.  The
.I width
field represents the logical width of the glyph in bits,
and shows the horizontal displacement
to the base point of the next glyph.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/vfont/\(**
.TP
.B /usr/lib/fonts/fixedwidthfonts/\(**
.PD
.SH SEE ALSO
.BR troff (1),
.BR vfontinfo (1),
.BR vswap (1)
.SH BUGS
.LP
A machine-independent font format should be defined.
The
.BR short s
in the above structures contain different bit patterns
depending whether the font file is for use on a
.SM VAX
or a Sun.  The
.B vswap
program must be used to convert one to the other.
ut_host ,
and a
.B ut_time
equal to the time at which the shutdo./share/man/man5/vgrindefs.5                                                                           755       0      12        11631  4424741521  11007                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vgrindefs.5 1.15 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.tr ||
.TH VGRINDEFS 5 "25 March 1989"
.SH NAME
vgrindefs \- vgrind's language definition data base
.SH SYNOPSIS
.B /usr/lib/vgrindefs
.SH DESCRIPTION
.IX  "vgrindefs file"  ""  "\fLvgrindefs\fP \(em vgrind language definitions"
.B vgrindefs
contains all language definitions for
.BR vgrind (1).
The data base is very similar to
.BR termcap (5).
Capabilities in
.B vgrindefs
are of two types:
Boolean capabilities which indicate that the language has
some particular feature
and string
capabilities which give a regular expression or
keyword list.
Entries may continue onto multiple lines by giving a \e as the last
character of a line.
Lines starting with # are comments.
.SS Capabilities
The following table names and describes each capability.
.PP
.PD 0
.ta \w'\fBName\fP  'u
.nr Xx \w'\fBName\fP  \fBType\fP  'u
.TP \n(Xxu
.B
Name	Type
.B Description
.TP
.B ab	\fRstr
Regular expression for the start of an alternate form comment
.TP
.B ae	\fRstr
Regular expression for the end of an alternate form comment
.TP
.B bb	\fRstr
Regular expression for the start of a block
.TP
.B be	\fRstr
Regular expression for the end of a lexical block
.TP
.B cb	\fRstr
Regular expression for the start of a comment
.TP
.B ce	\fRstr
Regular expression for the end of a comment
.TP
.B id	\fRstr
String giving characters other than letters and digits
that may legally occur in identifiers (default `_')
.TP
.B kw	\fRstr
A list of keywords separated by spaces
.TP
.B lb	\fRstr
Regular expression for the start of a character constant
.TP
.B le	\fRstr
Regular expression for the end of a character constant
.TP
.B oc	\fRbool
Present means upper and lower case are equivalent
.TP
.B pb	\fRstr
Regular expression for start of a procedure
.TP
.B pl	\fRbool
Procedure definitions are constrained to the lexical level
matched by the `px' capability
.TP
.B px	\fRstr
A match for this regular expression indicates
that procedure definitions may occur at the next lexical level.
Useful for lisp-like languages in which procedure definitions
occur as subexpressions of defuns.
.TP
.B sb	\fRstr
Regular expression for the start of a string
.TP
.B se	\fRstr
Regular expression for the end of a string
.TP
.B tc	\fRstr
Use the named entry as a continuation of this one
.TP
.B tl	\fRbool
Present means procedures are only defined at the top lexical level
.PD
.DT
.SS "Regular Expressions"
.B vgrindefs
uses regular expressions similar to those of
.BR ex (1)
and
.BR lex (1).
The characters `^',
`$',
`:',
and `\e'
are reserved characters and must be
`quoted' with a preceding \e if they
are to be included as normal characters.
The metasymbols and their meanings are:
.IP $
The end of a line
.PD 0.2v
.IP ^
The beginning of a line
.IP \ed
A delimiter (space, tab, newline, start of line)
.IP \ea
Matches any string of symbols
(like `.*' in lex)
.IP \ep
Matches any identifier.
In a procedure definition
(the `pb' capability)
the string that matches this symbol is used as the procedure name.
.IP (\^)
Grouping
.IP |
Alternation
.IP ?
Last item is optional
.IP \ee
Preceding any string means that the string will not match an
input string if the input string is preceded by an escape character (\e).
This is typically used for languages (like C) that can include the
string delimiter in a string by escaping it.
.PD
.PP
Unlike other regular expressions in the system,
these match words and not characters.
Hence something like `(tramp\^|\^steamer)flies?'
would match `tramp',
`steamer',
`trampflies',
or `steamerflies'.
Contrary to some forms of regular expressions,
.B vgrindef
alternation binds very tightly.
Grouping parentheses are likely to be necessary in expressions
involving alternation.
.SS "Keyword List"
The keyword list is just a list of keywords in the language separated
by spaces.
If the `oc' boolean is specified,
indicating that upper and lower case are equivalent,
then all the keywords should be specified in lower case.
.SH EXAMPLE
The following entry,
which describes the C language,
is typical of a language entry.
.IP
.ft B
.nf
C\^|\^c\^|\^the C programming language:\e
	:pb=^\ed?*?\ed?\ep\ed?\(\ea?\):bb={:be=}:cb=/*:ce=*/:sb=":se=\ee":\e
	:lb=':le=\ee':tl:\e
	:kw=asm auto break case char continue default do double else enum\e
	extern float for fortran goto if int long register return short\e
	sizeof static struct switch typedef union unsigned while #define\e
	#else #endif #if #ifdef #ifndef #include #undef # define else endif\e
	if ifdef ifndef include undef:
.fi
.ft
.PP
Note that the first field is just the language name
(and any variants of it).
Thus the C language could be specified to
.BR vgrind (1)
as `c' or `C'.
.SH FILES
.ta \w'/usr/lib/vgrindefs   'u
\fB/usr/lib/vgrindefs\fR	file containing terminal descriptions
.SH "SEE ALSO"
.BR vgrind (1),
.BR troff (1)

em time before the change, and then appends a record with a
.B ut_line
of
.BR { ,
.B ut_name
and
.B ut_./share/man/man5/wtmp.5                                                                                755       0      12           62  4424741522   7724                                                                                                                                                                                                                                                                                                                                                                      .so man5/utmp.5
.\" @(#)wtmp.5 1.6 89/03/27 SMI; 
 	ypfiles.5  fur in identifiers (default `_')
.TP
.B kw	\fRstr
A list of keywords separated by spaces
.TP
.B lb	\fRstr
Regular expression for the start of a character constant
.TP
.B le	\fRstr
Regular expression for the end of a character constant
.TP
.B oc	\fRbool
Present means upper and lower case are equivalent
.TP
.B pb	\fRstr
Regular expression for start of a procedure
.TP
.B pl	\fRbool
Procedure definitions are constrained to the lexical level
matched ./share/man/man5/xtab.5                                                                                755       0      12           64  4424741522   7675                                                                                                                                                                                                                                                                                                                                                                      .so man5/exports.5
.\" @(#)xtab.5 1.4 89/03/27 SMI;
ypfiles.5  fur in identifiers (default `_')
.TP
.B kw	\fRstr
A list of keywords separated by spaces
.TP
.B lb	\fRstr
Regular expression for the start of a character constant
.TP
.B le	\fRstr
Regular expression for the end of a character constant
.TP
.B oc	\fRbool
Present means upper and lower case are equivalent
.TP
.B pb	\fRstr
Regular expression for start of a procedure
.TP
.B pl	\fRbool
Procedure definitions are constrained to the lexical level
matched ./share/man/man5/ypfiles.5                                                                             755       0      12         7551  4424741522  10462                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypfiles.5 1.15 89/03/27 SMI
.TH YPFILES 5 "14 December 1987"
.SH NAME
ypfiles \- the Yellow Pages database and directory structure
.SH DESCRIPTION
.IX  "ypfiles file"  ""  "\fLypfiles\fP \(em Yellow Pages database and directory"
.LP
The Yellow Pages (\s-1YP\s0) network
lookup service uses a distributed,
replicated database of
.B dbm
files contained in the
.B /var/yp
directory hierarchy on each
.SM YP
server.  A
.B dbm
database consists of two files, created by calls to the
.BR ndbm (3)
library package.  One has the filename extension
.B .pag
and the other has the filename extension
.BR .dir .
For instance, the database named
.BR hosts.byname ,
is implemented by the pair of files
.B hosts.byname.pag
and
.BR hosts.byname.dir .
.LP
A
.B dbm
database served by the
.SM YP
is called a
.SM YP
.IR map .
A
.SM YP
.I domain
is a subdirectory of
.B /var/yp
containing a set of
.SM YP
maps.  Any number of
.SM YP
domains can exist.  Each may contain any number of
maps.
.LP
No maps are required by the
.SM YP
lookup service itself, although they may
be required for the normal operation of
other parts of the system.  There is
no list of maps which
.SM YP
serves \(em if the map exists in a given domain, and a
client asks about it, the
.SM YP
will serve it.  For a map to be
accessible consistently, it must exist on all
.SM YP
servers that serve the domain.  To provide data
consistency between the replicated maps,
an  entry to run
.B ypxfr
periodically should be made in the super-user's
.B crontab
file on each server.  More information on this topic is in
.BR ypxfr (8).
.LP
.SM YP
maps should contain two distinguished
key-value pairs.  The first is the key
.BR \s-1YP_LAST_MODIFIED\s0 ,
having as a value a ten-character
.SM ASCII
order number.  The order number should be the
system time in seconds when the map was built.
The second key is
.BR \s-1YP_MASTER_NAME\s0 ,
with the name of the
.SM YP
master server as a value.
.BR makedbm (8)
generates both key-value pairs automatically.
A map that does not contain both
key-value pairs can be served by the
.SM YP\s0,
but the
.B ypserv
process will not be able to return values for
``Get order number'' or ``Get master name'' requests.
See
.BR ypserv (8).
In addition, values of these two keys are used by
.B ypxfr
when it transfers a map from a master
.SM YP
server to a slave.  If
.B ypxfr
cannot figure out where to get the map,
or if it is unable to
determine whether the local copy is more
recent than the copy at the master,
you must set extra command line
switches when you run it.
.LP
.SM YP
maps must be generated and modified
only at the master server.  They
are copied to the slaves using
.BR ypxfr (8)
to avoid potential byte-ordering problems among
.SM YP
servers running on machines with different
architectures, and to minimize the amount of disk
space required for the dbm files.  The
.SM YP
database can be initially
set up for both masters and slaves by using
.BR ypinit (8).
.LP
After the server databases are set up, it
is probable that the contents of
some maps will change.  In general, some
.SM ASCII
source version of the
database exists on the master, and it
is changed with a standard text
editor.  The update is incorporated into the
.SM YP
map and is propagated from
the master to the slaves by running
.BR /var/yp/Makefile .
All Sun-supplied maps have entries in
.BR /var/yp/Makefile ;
if you add a
.SM YP
map, edit this file to support the new map.
The makefile uses
.BR makedbm (8)
to generate the
.SM YP
map on the master, and
.BR yppush (8)
to propagate the changed map to the slaves.
.B yppush
is a client of the map
.BR ypservers ,
which lists all the
.SM YP
servers.
For more information on this topic, see
.BR yppush (8).
.SH FILES
.PD 0
.TP 20
.B /var/yp
.TP
.B /var/yp/Makefile
.PD
.SH "SEE ALSO"
.BR dbm (3X),
.BR makedbm (8),
.BR rpcinfo (8C),
.BR ypinit (8),
.BR ypmake (8),
.BR yppoll (8),
.BR yppush (8),
.BR ypserv (8),
.BR ypxfr (8),
ey
for
.SM CTRL-C\s0.
.SS Similar Terminals
.LP
If there are two very similar terminals,
one can be defined as being just like the other with certain e./share/man/man6/                                                                                      775       0      12            0  4425704353   6626                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man6/Intro.6                                                                               755       0      12          676  4424741536  10072                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.6 1.16 89/04/11 SMI; 
.TH INTRO 6 "25 September 1987"
.SH NAME
intro \- introduction to games and demos
.SH DESCRIPTION
.IX  introduction "games and demos"
.IX  "games" introduction
.IX  "demos" introduction
This section describes available games and demos.
.
.SH "LIST OF GAMES AND DEMOS"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf 
\fBName	Appears on Page	Description\fR 
.sp 
.nr zZ 1 
.so /usr/man/man6/List.6
.nr zZ 0
.fi
\  canfieldtool.6 .    ]  
canvas_demo.6  f    ^  cdra./share/man/man6/List.6                                                                                755       0      12         6407  4424741536   7730                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.6 1.11 89/03/28 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 6 "2 September 1987"
.SH LIST OF GAMES AND DEMOS
.nf
.sp
.ta 20n; +20n
\fBName 	Appears on Page 	Description\fR
.sp
.zZ
\fBadventure\fR	\fBadventure\fR(6)	 an exploration game
\fBarithmetic\fR	\fBarithmetic\fR(6)	 provide drill in number facts
\fBbackgammon\fR	\fBbackgammon\fR(6)	 the game of backgammon
\fBbanner\fR	\fBbanner\fR(6)	 print large banner on printer
\fBbattlestar\fR	\fBbattlestar\fR(6)	 a tropical adventure game
\fBbcd\fR	\fBbcd\fR(6)	 convert to antique media
\fBbj\fR	\fBbj\fR(6)	 the game of black jack
\fBboggle\fR	\fBboggle\fR(6)	 play the game of boggle
\fBboggletool\fR	\fBboggletool\fR(6)	 play a game of boggle
\fBbouncedemo\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBcanfield\fR	\fBcanfield\fR(6)	 Canfield solitaire card game
\fBcanfieldtool\fR	\fBcanfield\fR(6)	 Canfield solitaire card game
\fBcanvas_demo\fR	\fBsunview_demos\fR(6)	 Window-System demonstration programs
\fBcfscores\fR	\fBcanfield\fR(6)	 Canfield solitaire card game
\fBchase\fR	\fBchase\fR(6)	 try to escape to killer robots
\fBchess\fR	\fBchess\fR(6)	 the game of chess
\fBchesstool\fR	\fBchesstool\fR(6)	 window-based front-end to chess program
\fBching\fR	\fBching\fR(6)	 the book of changes and other cookies
\fBcraps\fR	\fBcraps\fR(6)	 the game of craps
\fBcribbage\fR	\fBcribbage\fR(6)	 the card game cribbage
\fBcursor_demo\fR	\fBsunview_demos\fR(6)	 Window-System demonstration programs
\fBdialtest\fR	\fBdialtest\fR(6)	a demonstration and testing program for SunDials 
\fBfactor\fR	\fBfactor\fR(6)	 factor a number, generate large primes
\fBfish\fR	\fBfish\fR(6)	 play ``Go Fish''
\fBfortune\fR	\fBfortune\fR(6)	 print a random, hopefully interesting, adage
\fBframedemo\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBgammontool\fR	\fBgammontool\fR(6)	 play a game of backgammon
\fBgraphics_demos\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBhack\fR	\fBhack\fR(6)	 replacement for rogue
\fBhangman\fR	\fBhangman\fR(6)	 computer version of the game hangman
\fBhunt\fR	\fBhunt\fR(6)	 a multiplayer multiterminal game
\fBjumpdemo\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBlife\fR	\fBlife\fR(6)	 John Conway's game of life
\fBmille\fR	\fBmille\fR(6)	 play Mille Bornes
\fBmonop\fR	\fBmonop\fR(6)	 Monopoly game
\fBmoo\fR	\fBmoo\fR(6)	 guessing game
\fBnumber\fR	\fBnumber\fR(6)	 convert Arabic numerals to English
\fBppt\fR	\fBbcd\fR(6)	 convert to antique media
\fBprimes\fR	\fBfactor\fR(6)	 factor a number, generate large primes
\fBprimes\fR	\fBprimes\fR(6)	 print all primes larger than some given number
\fBquiz\fR	\fBquiz\fR(6)	 test your knowledge
\fBrain\fR	\fBrain\fR(6)	 animated raindrops display
\fBrandom\fR	\fBrandom\fR(6)	 select lines randomly from a file
\fBrobots\fR	\fBrobots\fR(6)	 fight off villainous robots
\fBsnake\fR	\fBsnake\fR(6)	 display chase game
\fBsnscore\fR	\fBsnake\fR(6)	 display chase game
\fBspheresdemo\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBsunview_demos\fR	\fBsunview_demos\fR(6)	 Window-System demonstration programs
\fBtrek\fR	\fBtrek\fR(6)	 trekkie game
\fBworm\fR	\fBworm\fR(6)	 play the growing worm game
\fBworms\fR	\fBworms\fR(6)	 animate worms on a display terminal
\fBwump\fR	\fBwump\fR(6)	 the game of hunt-the-wumpus
.fi
 maps have entries in
.BR /var/yp/Makefile ;
if you add a
.SM YP
map, edit this file to support the new map.
The makefile uses
.BR makedbm (8)
to generate the
.SM YP
map on the master, and
.BR yppush (8)
to propagate the changed map to the slaves.
../share/man/man6/adventure.6                                                                           755       0      12         1273  4424741536  11006                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adventure.6 1.8 89/03/27 SMI; from UCB 4.2
.TH ADVENTURE 6 "1 February 1983"
.SH NAME
adventure \- an exploration game
.SH SYNOPSIS
.B /usr/games/adventure
.SH DESCRIPTION
.IX  "adventure command"  ""  "\fLadventure\fP \(em exploration game"
The object of the game is to
locate and explore Colossal Cave, find the treasures hidden there,
and bring them back to the building with you.
The program is self-describing to a point, but part of the game is to discover
its rules.
.LP
To terminate a game, type 
.BR quit ;
to save a game for later resumption, type 
.BR suspend .
.SH BUGS
.LP
Saving a game creates a large executable file instead of just
the information needed to resume the game.
     j  factor.6      k  fish.6 d    l  flight.6      m  	fortune.6     n  framedemo.6      o  gammontool.6  o    p  goban.6   $  q  
gp_demos.6 $  @  r   graphics_demos.6     P  s  hack.6 $  d  t  	hangman.6 d  t  u  intro.6     v  
jumpdemo.6     w  life./share/man/man6/arithmetic.6                                                                          755       0      12         3515  4424741536  11143                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)arithmetic.6 1.8 89/03/27 SMI; from UCB 4.2
.TH ARITHMETIC 6  "16 February 1988"
.SH NAME
arithmetic \- provide drill in number facts
.SH SYNOPSIS
.B /usr/games/arithmetic
[
.B +\-x/
] [ 
.IR range " ]"
.SH DESCRIPTION
.IX  "arithmetic command"  ""  "\fLarithmetic\fP \(em drill in number facts"
.B arithmetic
types out simple arithmetic problems, and waits for an answer to be typed in.
If the answer is correct, it types back 
\*(lqRight!\*(rq, and a new problem.
If the answer is wrong, it replies \*(lqWhat?\*(rq,
and waits for another answer.
Every twenty problems, it publishes
statistics on correctness and the time required to answer.
.LP
To quit the program, type an interrupt 
(\s-1DELETE\s0 character).
.LP
The first optional argument determines the kind of problem 
to be generated;
.RB ` + ',
.RB ` \- ',
.RB ` x ',
.RB ` / '
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 +\- .
.LP
.I range
is a decimal number;
all addends, subtrahends, differences, multiplicands, divisors,
and quotients will be less than or equal to the value of
.IR range .
Default
.I range
is 10.
.LP
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.
.LP
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.
of backgammon
\fBgraphics_demos\fR	\fBgraphics_demos\fR(6)	 graphics demonstration programs
\fBhack\fR	\fBhack\fR(6)	 replacement for rogue
\fBhangman\fR	\fBhangman\fR(6)	 compute./share/man/man6/backgammon.6                                                                          755       0      12         6072  4424741536  11112                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)backgammon.6 1.10 89/03/27 SMI; from UCB 4.2
.TH BACKGAMMON 6 "16 February 1988"
.SH NAME
backgammon \- the game of backgammon
.SH SYNOPSIS
.B backgammon
[ \- ] [ n r w b pr pw pb t\c
.B term
s\c
.I filename
]
.SH DESCRIPTION
.IX  "backgammon command"  ""  "\fLbackgammon\fP \(em backgammon game"
.LP
.B backgammon
lets you play backgammon against the computer or against a `friend'.
All commands only are one letter, so you don't need to type a carriage return,
except at the end of a move.
.B backgammon
is mostly self documenting, so that a q
.B ? 
(question mark) will usually get
some help.  If you answer 
.B y
when
.B backgammon
asks if you want the rules, you will get text explaining the rules of the game,
some hints on strategy, instruction on how to use
.B backgammon,
and a tutorial consisting of a practice game against the computer.
A description of how to use
.B backgammon
can be obtained by answering 
.B y 
when it asks if you want instructions.
The possible arguments for 
.B backgammon
(most are unnecesary but some are very convenient) consist of:
.RS
.TP
.B n
don't ask for rules or instructions
.TP
.B r
player is red (implies n)
.TP
.B w
player is white (implies n)
.TP
.B b
two players, red and white (implies n)
.TP
.B pr
print the board before red's turn
.TP
.B pw
print the board before white's turn
.TP
.B pb
print the board before both player's turn
.TP
.BI t term
terminal is type
.IR term ,
uses
.IR /etc/termcap ,
otherwise uses the
.SM TERM
environment variable.
.TP
.BI s file
recover previously saved game from
.IR file .
This can also be done by executing the saved file,
that is, typing its name in as a command.
.RE
.LP
Arguments may be optionally preceded by a
.B \-
sign.  Several arguments may
be concatenated together, but not after 
.B s 
or 
.B t 
arguments, since
they can be followed by an arbitrary string.  Any unrecognized
arguments are ignored.  An argument of a lone
.B \-
gets a description of possible arguments.
.LP
If
.B term
has capabilities for direct cursor movement.
.B backgammon
`fixes' the board after each move, so the board does not need to be
reprinted, unless the screen suffers some horrendous malady.  Also, any
`p' option will be ignored.
.SH QUICK\ REFERENCE
.LP
When
.B backgammon
prompts by typing only your color, type a space or carriage return to
roll, or
.RS
.TP
.B d
to double
.TP
.B p
to print the board
.TP
.B q
to quit
.TP
.B s
to save the game for later
.RE
.LP
When
.B backgammon
prompts with 'Move:', type
.RS	
.RS
.TP
.B p
to print the board
.TP
.B q
to quit
.TP
.B s
to save the game
.RE
.RE
.LP
or a
.I move,
which is a sequence of
.RS
.TP
.B s-f
move from
.B s
to
.B f
.TP
.B s/r
move one man on
.B s
the roll
.B r
separated by commas or spaces and ending with a newline.
Available abbreviations are
.RS
.TP
.B s-f1-f2
means
.B s-f1,f1-f2
.TP
.B s/r1r2
means
.B s/r1,s/r2
.RE
.RE
.LP
Use 
.B b 
for bar and 
.B h
for home, or 
.B 0 
or 
.B 25 
as appropriate.
.SH FILES
.PD 0
.TP 30
.B /usr/games/teachgammon	
rules and tutorial
.TP
.B /etc/termcap	
terminal capabilities
.PD
.SH BUGS
.LP
.BR backgammon 's
strategy needs much work.
R	\fBtrek\fR(6)	 trekkie game
\fBworm\fR	\fBworm\fR(6)	 play the growing worm game
\fBworms\fR	\fBworms\fR(6)	 animate worms on a display terminal
\fBwump\fR	\fBwump\fR(6)	 the game of hunt-the-wumpus
.fi
 maps have entries in
.BR /var/yp/Makefile ;
if you add a
.SM YP
map, edit this file to support the new map.
The makefile uses
.BR makedbm (8)
to generate the
.SM YP
map on the master, and
.BR yppush (8)
to propagate the changed map to the slaves.
../share/man/man6/banner.6                                                                              755       0      12         2250  4424741536  10252                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)banner.6 1.10 89/03/27 SMI; from UCB 4.2
.TH BANNER 6 "16 February 1988"
.SH NAME
banner \- print large banner on printer
.SH SYNOPSIS
.B /usr/games/banner
[
.BI \-w n
]
message .\|.\|.
.SH DESCRIPTION
.IX  "banner command"  ""  "\fLbanner\fP \(em large banner"
.B banner
prints a large, high quality banner on the standard output.
If the message is omitted, it prompts for and
reads one line of its standard input.  If
.B \-w
is given, the output is reduced from a width of 132 to
.IR n ,
suitable for a narrow terminal.  If
.I n
is omitted, it defaults to 80.
.LP
The output should be printed on a hard-copy device, 
up to 132 columns wide,
with no breaks between the pages. The volume is enough that you want
a printer or a fast hardcopy terminal, but if you are patient, a
decwriter or other 300 baud terminal will do.
.SH BUGS
Several 
.SM ASCII 
characters are not defined, notably `<', `>', `[', `]', `\\',
`^', `_', `{', `}', `|', and `~'. 
 Also, the characters `"', `'', and `&' are funny
looking (but in a useful way.)
.LP
The
.B \-w
option is implemented by skipping some rows and columns.
The smaller it gets, the grainier the output.
Sometimes it runs letters together.
  	rotcvph.6 .6      rotobj.6 ph.      shaded.6 j.6      show.6 d      	showmap.6 ow      snake.6       	snscore.6 ak      
spheresdemo.6 ak      stringart.6   $    suncoredemos.6    8    	suncube.6 os  P    sunview_demos.6   `    trek.6 _  t    vwcvph.6 rek      worm./share/man/man6/battlestar.6                                                                          755       0      12         5511  4424741537  11156                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)battlestar.6 1.10 89/03/27 SMI; from UCB 4.3 BSD
.TH BATTLESTAR 6
.SH NAME
battlestar \- a tropical adventure game
.SH SYNOPSIS
.B battlestar
[
.B \-r
]
.SH DESCRIPTION
.IX "battlestar game" "" "\fLbattlestar\fP game"
.LP
.B battlestar
is an adventure game in the classic style.  However, it is slightly less
of a
puzzle and more a game of exploration.  There are a few magical words
in the game, but on the whole, simple English
should suffice to make one's desires understandable to the parser.
.SH OPTIONS
.TP
.B \-r
Recover a saved game.
.SH "THE SETTING"
In the days before the darkness came, when battlestars ruled the
heavens...
.br
.nf
		Three He made and gave them to His daughters,
		Beautiful nymphs, the goddesses of the waters.
		One to bring good luck and simple feats of wonder,
		Two to wash the lands and churn the waves asunder,
		Three to rule the world and purge the skies with thunder.
.fi
.LP
In those times great wizards were known and their powers were beyond
belief.  They could take any object from thin air, and, uttering the
word
.RB ` su ',
could disappear.
.LP
In those times men were known for their lust of gold and desire to
wear fine weapons.  Swords and coats of mail were fashioned that could
withstand a laser blast.
.LP
But when the darkness fell, the rightful reigns were toppled.  Swords
and helms and heads of state went rolling across the grass.  The entire
fleet of battlestars was reduced to a single ship.
.SH USAGE
.SS Sample Commands
.nf
	take   	---	take an object
	drop	---	drop an object
	wear	---	wear an object you are holding
	draw	---	carry an object you are wearing
	puton	---	take an object and wear it
	take off  ---	draw an object and drop it
	throw  <object> <direction>
	!	<shell esc>
	
.fi
.SS Implied Objects
.nf
	>-: take watermelon
	watermelon:
	Taken.
	>-: eat
	watermelon:
	Eaten.
	>-: take knife and sword and apple, drop all
	knife:
	Taken.
	broadsword:
	Taken.
	apple:
	Taken.
	knife:
	Dropped.
	broadsword:
	Dropped.
	apple:
	Dropped.
	>-: get
	knife:
	Taken.
	
.fi
.LP
Notice that the \(lqshadow\(rq of the next word stays around if you
want to take advantage of it.  That is, saying
.RB ` "take knife" '
and then
.RB ` drop '
will drop the knife you just took.
.SS Score and Inven
.LP
The two commands 
.B score 
and 
.B inven 
will print out your current status in the game.
.SS  Saving a Game
.LP
The command 
.B save 
will save your game in a file called 
.BR Bstar . 
You can recover a saved game by using the 
.B \-r 
option when you start up the game.
.SS Directions
.LP
The compass directions N, S, E, and W can be used if you have a compass.
If you do not have a compass, you will have to say 
.BR R , 
.BR L , 
.BR A , 
or 
.BR B , 
which stand for Right, Left, Ahead, and Back.  Directions printed in room descriptions
are always printed in R, L, A, & B relative directions.
.SH BUGS
.LP
Countless.
b 
for bar and 
.B h
for home, or 
.B 0 
or 
.B 25 
as appropriate.
.SH FILES
.PD 0
.TP 30
.B /usr/games/teachgammon	
rules and tutorial
.TP
.B /etc/termcap	
terminal capabilities
.PD./share/man/man6/bcd.6                                                                                 755       0      12          752  4424741537   7523                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bcd.6 1.9 89/03/27 SMI; from UCB 4.2
.TH BCD 6  "16 February 1988"
.SH NAME
bcd, ppt \- convert to antique media
.SH SYNOPSIS
.B /usr/games/bcd
.I text
.LP
.B /usr/games/ppt
.SH DESCRIPTION
.IX  "bcd command"  ""  "\fLbcd\fP \(em convert to antique media"
.IX  "ppt command"  ""  "\fLbcd\fP \(em convert to antique media"
.B bcd
converts the literal
.I text
into a form familiar to old-timers.
.LP
.B ppt
converts the standard input into yet another form.
.SH "SEE ALSO"
.BR dd (1)
aps.6   `  g  
crib./share/man/man6/bdemos.6                                                                              755       0      12         3615  4424741537  10265                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bdemos.6 1.12 89/03/27 SMI
.TH BDEMOS 6 "23 March 1989"
.SH NAME
bdemos \- demonstrate Sun Monochrome Bitmap Display
.SH SYNOPSIS
.B /usr/demo/bballs
.br
.B /usr/demo/bbounce
.br
.B /usr/demo/bdemos
.br
.B /usr/demo/bjump
.br
.BI /usr/demo/bphoto "  file"
.br
.B /usr/demo/brotcube
.SH DESCRIPTION
.IX  "bballs command"  ""  "\fLbballs\fP \(em black and white demo"
.IX  "bbounce command"  ""  "\fLbbounce\fP \(em black and white demo"
.IX  "bdemos command"  ""  "\fLbdemos\fP \(em black and white demo"
.IX  "bjump command"  ""  "\fLbjump\fP \(em black and white demo"
.IX  "bphoto command"  ""  "\fLbphoto\fP \(em black and white demo"
.IX  "brotcube command"  ""  "\fLbrotcube\fP \(em black and white demo"
.IX  "black and white demos"  bbounce  ""  \fLbbounce\fP
.IX  "black and white demos"  bdemos  ""  \fLbdemos\fP
.IX  "black and white demos"  bjump  ""  \fLbjump\fP
.IX  "black and white demos"  bphoto  ""  \fLbphoto\fP
.IX  "black and white demos"  brotcube  ""  \fLbrotcube\fP
.I Bdemos
is a collection of simple demonstration programs for the Sun Monochrome
Bitmap Display.  Each program is briefly described below.
Unless otherwise noted,
each program should be terminated by typing the appropriate key
(usually \s-2DELETE\s0 or ^C) to generate an interrupt signal.
.IP "\fBbballs\fP" 10
colliding balls demo
.IP "\fBbbounce\fP" 10
bouncing square demo
.IP "\fBbdemos\fP" 10
a collection of demos
.IP
This program has a menu for selection of several different demos. After typing
a key to select a particular demo, the user may type ^C to get back
the menu. Type `q' to quit.
.IP "\fBbjump\fP" 10
simulated jump to hyperspace
.IP "\fBbphoto\fP \fIfile\fR" 10
dither monochrome image \fIfile\fP to bitmap display
.IP
Image files suitable for display by this program are in
.IR /usr/demo/bwpix .
.IP "\fBbrotcube\fP" 10
black and white spinning cube
.SH FILES
/usr/demo/bwpix
.SH SEE ALSO
.\"bsuncube(6),
draw(6)
ken.
	apple:
	Taken.
	knife:
	Dropped.
	broadsword:
	Dropped.
	apple:
	Dropped.
	>-: get
	knife:
	Taken.
	
.fi
.LP
./share/man/man6/bdraw.6                                                                               755       0      12           62  4424741537  10044                                                                                                                                                                                                                                                                                                                                                                      .so man6/draw.6
.\" @(#)bdraw.6 1.3 89/03/27 SMI;
 boggle.6 .6     W  boggletool.6    0  X  bouncedemo.6  0  D  Y  
brotcube.6 X  X  Z  
bsuncube.6 D  l  [  
canfield.6 X    \  canfieldtool.6     ]  
canvas_demo.6     ^  cdraw.6     _  cframedemo.6      `  
cfscores.6 _    a  chase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6  <  L  f  craps.6   `  g  
cribbage.6    x  h  
cursor_demo.6 x    i./share/man/man6/bj.6                                                                                  755       0      12         4112  4424741537   7400                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bj.6 1.7 89/03/27 SMI; from S5R2
.TH BJ 6 "16 February 1988"
.SH NAME
bj \- the game of black jack
.SH SYNOPSIS
.B /usr/games/bj
.SH DESCRIPTION
.IX "bj game" "" "\fLbj\fP game"
.LP
.B bj
is a serious attempt at
simulating the dealer
in the game of black jack (or twenty-one)
as might be found in Reno.
The following rules apply:
.IP
The bet is $2 every hand.
.IP
A player ``natural'' (black jack) 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)
and 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.
.LP
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''.
.LP
.RS
.nf
.BR ? " (this means, ``do you want a hit?'')"
.B Insurance?
.B Double down?
.RE
.fi
.LP
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-1CTRL\s0\-C)
and the action and standing will be printed.
o take advantage of it.  That is, saying
.RB ` "take knife" '
and then
.RB ` drop '
will drop the knife you just took.
.SS Score and Inven
.LP
The two commands 
.B score 
and 
.B inven 
will print out your current status in the game.
.SS  Saving a Game
.LP
The command 
.B save 
will save your game in a file called 
.BR Bstar . 
You can recover a saved game by using the 
.B \-r 
option when you start up the game.
.SS Directions
.LP
The./share/man/man6/boggle.6                                                                              755       0      12         4025  4424741537  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)boggle.6 1.9 89/03/27 SMI; from UCB 4.2
.TH BOGGLE 6 "21 December 1987"
.SH NAME
boggle \- play the game of boggle
.SH SYNOPSIS
.B /usr/games/boggle
[
.B +
] [
.B ++
]
.SH AVAILABILITY
This game is available with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "boggle command"  ""  "\fLboggle\fP \(em boggle game"
.LP
This program is intended for people wishing to sharpen their
skills at Boggle (TM Parker Bros.).
If you invoke the program with 4 arguments of 4 letters each,
.RI ( e.g.
.RB \*(lq "boggle appl epie moth erhd" \*(rq)
the program forms the obvious Boggle grid and lists all the words from
.B /usr/dict/words
found therein. If you invoke the program without arguments, it will generate
a board for you, let you enter words for 3 minutes, and then tell you
how well you did relative to
.BR /usr/dict/words .
.PP
The object of Boggle is to find, within 3
minutes, as many words as possible in a 4 by 4 grid of letters. Words
may be formed from any sequence of 3 or more adjacent letters in the
grid. The letters may join horizontally, vertically, or diagonally.
However, no position in the grid may be used more than once within any
one word. In competitive play amongst humans, each player is given
credit for those of his words which no other player has found.
.PP
In interactive play, enter your words separated by spaces, tabs,
or newlines. A bell will ring when there is 2:00, 1:00, 0:10, 0:02,
0:01, and 0:00 time left. You may complete any word started before the
expiration of time. You can surrender before time is up by hitting
\&'break'. While entering words, your erase character is only effective
within the current word and your line kill character is ignored.
.PP
Advanced players may wish to invoke the program with 1 or 2 +'s as
the first argument. The first + removes the restriction that positions
can only be used once in each word. The second + causes a position to
be considered adjacent to itself as well as its (up to) 8 neighbors.
\s0\-C)
and the action and standing will be printed.
o take advantage of it.  That is, saying
.RB ` "take knife" '
and then
.RB ` drop '
will drop the knife you just took.
.SS Score and Inven
.LP
The two commands 
.B score 
and 
.B inven 
will print out your current status in the game.
.SS  Saving a Game
.LP
The command 
.B save 
will save your game in a file called 
.BR Bstar . 
You can recover a saved game by using the 
.B \-r 
option when you start up the game.
.SS Directions
.LP
The./share/man/man6/boggletool.6                                                                          755       0      12        10104  4424741540  11152                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)boggletool.6 1.15 89/03/27 SMI;
.TH BOGGLETOOL 6 "22 March 1989"
.SH NAME
boggletool \- play a game of boggle
.SH SYNOPSIS
.B /usr/games/boggletool
[
.I number
] [
.BR + [ + ]]
[
16-character
.I string
]
.SH AVAILABILITY
This game is available with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX games boggletool "" "\fLboggletool\fR \(em SunView game of boggle"
.IX boggletool "" "\fLboggletool\fR \(em SunView game of boggle"
.LP
.B boggletool
allows you to play the game of Boggle (\s-1TM\s0
Parker Bros.) against the
computer.  The
.I number
argument specifies the time limit in minutes (the default is 3
minutes).  If a 16 character long string is placed on the command
line, it is interpreted as a Boggle board: the first four letters form
the top row, the next four letters the second row, etc.  If no letters
are specified, a board is randomly rolled by the computer from a set
of Boggle cubes.  The
.BR + [ + ]
argument is explained below under
.B "Advanced Play" .
.SH "PLAYING THE GAME"
.SS "Rules of the Game"
.LP
The object of Boggle is to find as many words as possible in a 4 by 4
grid of letters within a certain time limit.  Words may be formed from
any sequence of 3 or more adjacent letters in the grid.  The letters
may join horizontally, vertically, or diagonally.  Normally, no letter
in the grid may be used more than once in a word (see
.B "Advanced Play"
for exceptions).
.SS "Playing the Game"
When invoked, boggletool displays a grid of letters and an hourglass.
To enter words, simply type in lower case letters to spell the word you
want.  Use any whitespace (\s-1SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE\s0)
to finish a word.
To correct mistakes you make, use
.SM BACKSPACE
or
.SM DEL
to delete the last
character, or use
.SM CTRL-U
to delete an entire word.
.B boggletool
verifies that words you enter are both in the grid and are
valid English words.  If you type in a character which would form a
word which is not in the grid, the display will flash and the character
you typed will not be echoed.  When you type any whitespace to end the
current word,
.B boggletool
will verify that the word is three or more
letters long and that it appears in the dictionary.  If the word you
typed is illegal for either reason, the display will flash and you will
have to either erase the word or change it.
If you try to enter a valid
word which you have already entered, the display will flash and the
previous occurrence of the word will be highlighted.  Again, you will
have to erase the word before continuing.
As you enter words, the \(lqsand\(rq in the hourglass will fall.  At the end
of the time limit, the display will flash and you will no longer be
allowed to enter words.  After a moment, the computer will display
two lists of words: the words you found, and other words which also
appear in the grid.  To play another game, just type any capital
letter (or use the pop-up menu).
.SS "Using the Menu"
.LP
The pop-up menu is invoked by pressing the
.SM RIGHT
mouse button.  There are four
items in it, and they work as follows.
.TP
.B "Restart Game"
Create a new boggletool a new board, reset the timer, and allow you
to start from scratch.
.TP
.B "Restart Timer"
Allows you to cheat by reseting the hourglass timer to zero.
.TP
.B "Give Up"
End the game and print the results
immediately.
.TP
.B "Quit"
Allows you to quit running the boggletool program.  A prompt appears
asking you to confirm the quit; when it does, click the
.SM LEFT
mouse button
to quit or the
.SM RIGHT
mouse button to abort the quit.
.SS "Advanced Play"
There are two options for advanced players.  If a single
.B +
appears
on the command line, letters in the grid may be reused.  If two
.BR + 's
are on the command line, letters may also be considered adjacent to
themselves as well as to their neighbors.  Although it is far easier
to find words with these two options, there are also many more possible
words in the grid and it is therefore difficult to find them all.
.SH FILES
.PD 0
.TP 20
.B /usr/games/boggledict
dictionary file for computer's words
.PD
f the similar terminal.
The capabilities given before
.B use
override those in the terminal type invoked by
.BR use .
A capability can be canceled by placing
.IB xx @
to the left of the
capability definition, where
.I xx
is the capability.
For example, the entry
.LP
.RS
.ft B
att4424-2|Teletype\04424 in display function group ii,
.ti +1i
rev@, sgr@, smul@, use=att4424,
.ft R
.RE
.LP
defines an
.SM AT&T
4424 terminal that does not have the
../share/man/man6/bouncedemo.6                                                                          755       0      12          101  4424741540  11071                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)bouncedemo.6 1.7 89/03/27 SMI;
suncube.6 e  l  [  
canfield.6 e    \  canfieldtool.6 X    ]  
canvas_demo.6      ^  cdraw.6     _  cframedemo.6 .6     `  
cfscores.6 6    a  chase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6 .6   L  f  craps.6   `  g  
cribbage.6 p  x  h  
cursor_demo.6       i  draw.6 d    j  factor.6 raw    k  fish.6 t    l  flight.6 ish    m  	./share/man/man6/brotcube.6                                                                            755       0      12          765  4424741540  10576                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)brotcube.6 1.11 89/03/27 SMI;
.TH BROTCUBE 6  "23 March 1989"
.SH NAME
brotcube \- rotate a simple cube
.SH SYNOPSIS
.B /usr/demo/brotcube
.SH DESCRIPTION
.B brotcube
rotates a skeletal outline of a cube consisting of 14 vectors.
Using the SunCore Graphics Package, a 3-D projection
is drawn on the Sun Monochrome Bitmap Display.
Each rotation consists of 100 views.
.LP
This program gives an indication of the performance of the SunCore
Graphics Package.
.LP
Type 
.B q 
to exit the program.
 n  fram./share/man/man6/bsuncube.6                                                                            755       0      12         3005  4424741540  10605                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bsuncube.6 1.11 89/03/27 SMI;
.TH BSUNCUBE 6  "23 March 1989"
.SH NAME
bsuncube \- view 3-D Sun logo
.SH SYNOPSIS
.B /usr/demo/bsuncube
.SH DESCRIPTION
.IX  "bsuncube command"  ""  "\fLbsuncube\fP \(em display 3-D Sun logo"
.LP
.B bsuncube
allows the user to view a cube
from various positions with hidden faces removed.
The faces of the cube consist of the Sun logo.
The viewing position is selected using the mouse.
Using the SunCore Graphics Package, a 3-D projection
is drawn on the Sun Monochrome Bitmap Display.
.LP
The program operates in two modes: 
.B DisplayObject 
mode and 
.B SelectView 
mode.
The program starts in 
.B DisplayObject 
mode:
.IP
.BR DisplayObject :
The cube is displayed in 3-D perspective with hidden faces removed.
Type 
.B q 
while in this mode to exit the program.  Press 
.SM RIGHT 
mouse button to switch to 
.B SelectView 
mode.
.IP
.BR SelectView :
Schematic projections of the outline of the cube are shown and the mouse
is used to select a viewing position.  Use 
.SM LEFT 
mouse button to set 
.I x 
and 
.SM MIDDLE 
mouse button to set 
.I y 
in the
.IR "Front View" .
Use 
.SM MIDDLE
mouse button to set 
.I z 
in the
.IR "Top View" .
Press  
.SM RIGHT 
mouse button to switch to 
.B DisplayObject 
mode.
.LP
The view shown in 
.B DisplayObject 
mode is drawn using the conventions that the
viewer is always looking from the viewing position toward the center of
the cube and that the positive 
.I y 
axis on the screen is the projection of
the positive 
.I y 
axis in 3-D cube coordinates.
ol displays a grid of letters and an hourglass.
To enter words, simply type in lower case letters to spell the word you
want.  Use any whitespace (\s-1SPACE\s0,
.SM TAB\s0,
or
.SM NEWLINE\s0)
to finish a word.
To correct mistakes you make, use
.SM BACKSPACE
or
.SM DEL
to delete the last
character, or use
.SM CTRL-U
to delete an entire word.
.B boggletool
verifies that words you enter are both in the grid and are
valid English words.  If you type in a character which would form a
word which is not in th./share/man/man6/canfield.6                                                                            755       0      12         6666  4424741540  10564                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)canfield.6 1.20 89/03/27 SMI; from UCB 4.2
.TH CANFIELD 6 "21 December 1987"
.SH NAME
canfield, canfieldtool, cfscores \- Canfield solitaire card game
.SH SYNOPSIS
.B /usr/games/canfield
[
.B \-ac
]
.LP
.B /usr/games/canfieldtool
[
.B \-ac
]
.LP
.B /usr/games/cfscores
[
.B \-ac
] [
.I username
]
.SH AVAILABILITY
These games are available with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "canfield"  ""  "\fLcanfield\fP \(em solitaire card game"
.IX games canfield "" "\fLcanfield\fP \(em solitaire card game"
.LP
.B canfield
can be played on any terminal.
.B canfieldtool
is the SunView version with attractive graphics.
.LP
If you have never played solitaire before, it is recommended
that you consult a solitaire instruction book. In
.BR canfield ,
tableau cards may be built on each other downward
in alternate colors. An entire pile must be moved as a unit
in building. Top cards of the piles are available to be able
to be played on foundations, but never into empty spaces.
.LP
Spaces must be filled from the stock. The top card of
the stock also is available to be played on foundations or
built on tableau piles. After the stock is exhausted,
tableau spaces may be filled from the talon and the player may
keep them open until he wishes to use them.
.LP
Cards are dealt from the hand to the talon by threes
and this repeats until there are no more cards in the hand
or the player quits. To have cards dealt onto the talon the
player types
.B ht
for his move. Foundation base cards are
also automatically moved to the foundation when they become
available.
.SS Canfieldtool
Once you understand the rules,
.B canfieldtool
is self-explanatory.
.SS Canfield
.LP
The rules for betting are somewhat less strict than
those used in the official version of the game.
The initial deal costs $13.
You may quit at this point or inspect the game.
Inspection costs $13 and allows you to make as many
moves as is possible without moving any cards from your hand
to the talon.
(The initial deal places three cards on the talon;
if all these cards are used,
three more are made available.)
Finally, if the game seems interesting,
you must pay the final installment of $26.
At this point you are
credited at the rate of $5 for each card on the foundation;
as the game progresses you are credited with $5 for each
card that is moved to the foundation.
Each run through the hand after the first costs $5.
The card counting feature
costs $1 for each unknown card that is identified.
If the information is toggled on,
you are only charged for cards
that became visible since it was last turned on.
Thus the maximum cost of information is $34.
Playing time is charged at a rate of $1 per minute.
If the 
.B \-a
flag is specified,
it prints out the canfield accounts for all users that have
played the game since the database was set up.
.SH OPTIONS
.TP
.B a
Print out
.B canfield
accounts for all users that have played the
game since the database was set up.
.TP
.B c
Maintain card counting statistics on the bottom of
the screen. When properly used this can greatly
increase the chances of winning.
.LP
With no arguments,
.B cfscores
prints out the current status of your canfield
account. If
.I username
is specified, it prints out the status of
their account.
.SH FILES
.PD 0
.TP 20
.B /usr/games/canfield
the game itself
.TP
.B /usr/games/lib/cfscores
the database of scores
.PD
.SH BUGS
It is impossible to cheat.
p-up menu).
.SS "Using the Menu"
.LP
The pop-up menu is invoked by pressin./share/man/man6/canfieldtool.6                                                                        755       0      12           76  4424741540  11407                                                                                                                                                                                                                                                                                                                                                                      .so man6/canfield.6
.\" @(#)canfieldtool.6 1.7 89/03/27 SMI; 
^  cdraw.6     _  cframedemo.6      `  
cfscores.6     a  chase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6  <  L  f  craps.6   `  g  
cribbage.6    x  h  
cursor_demo.6 x    i  draw.6 .    j  factor.6 6 .    k  fish.6 6    l  flight.6 6 6    m  	fortune.6  6    n  framedemo.6      o  gammontool.6       p  goban.6   $  q  
gp_d./share/man/man6/canvas_demo.6                                                                         755       0      12          101  4424741540  11230                                                                                                                                                                                                                                                                                                                                                                      .so man6/sunview_demos.6
.\" @(#)canvas_demo.6 1.7 89/03/27 SMI;
edemo.6 .6     `  
cfscores.6 6    a  chase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6 .6   L  f  craps.6   `  g  
cribbage.6 p  x  h  
cursor_demo.6       i  draw.6 d    j  factor.6 raw    k  fish.6 t    l  flight.6 ish    m  	fortune.6 .6    n  framedemo.6      o  gammontool.6 .6     p  goban.6   $  q  
gp_demos.6 a  @  r   graphics./share/man/man6/cdraw.6                                                                               755       0      12           62  4424741541  10040                                                                                                                                                                                                                                                                                                                                                                      .so man6/draw.6
.\" @(#)cdraw.6 1.3 89/03/27 SMI;
  `  
cfscores.6 6    a  chase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6 .6   L  f  craps.6   `  g  
cribbage.6 p  x  h  
cursor_demo.6  p    i  draw.6 d    j  factor.6 raw    k  fish.6 t    l  flight.6 ish    m  	fortune.6 .6    n  framedemo.6      o  gammontool.6 .6     p  goban.6   $  q  
gp_demos.6 a  @  r   graphics_demos.6  @  P  s  hack./share/man/man6/cframedemo.6                                                                          755       0      12          101  4424741541  11054                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)cframedemo.6 1.3 89/03/27 SMI;
hase.6      b  chess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6  e  L  f  craps.6   `  g  
cribbage.6 `  x  h  
cursor_demo.6 h    i  draw.6 p    j  factor.6      k  fish.6 w    l  flight.6      m  	fortune.6     n  framedemo.6      o  gammontool.6  o    p  goban.6   $  q  
gp_demos.6 $  @  r   graphics_demos.6     P  s  hack.6 @  d  t  	hang./share/man/man6/cfscores.6                                                                            755       0      12           72  4424741541  10550                                                                                                                                                                                                                                                                                                                                                                      .so man6/canfield.6
.\" @(#)cfscores.6 1.8 89/03/27 SMI; 
ess.6     c  chesstool.6   $  d  ching.6   <  e  colordemos.6 .6   L  f  craps.6   `  g  
cribbage.6 p  x  h  
cursor_demo.6  `    i  draw.6 d    j  factor.6 raw    k  fish.6 t    l  flight.6 ish    m  	fortune.6 .6    n  framedemo.6      o  gammontool.6 .6     p  goban.6   $  q  
gp_demos.6 a  @  r   graphics_demos.6  @  P  s  hack.6 m  d  t  	hangman.6 ck  t  u  intro.6 ./share/man/man6/chase.6                                                                               755       0      12         1347  4424741541  10072                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chase.6 1.8 89/03/27 SMI; from UCB 4.2
.TH CHASE 6 "16 February 1988"
.SH NAME
chase \- try to escape to killer robots
.SH SYNOPSIS
.B /usr/games/chase
[
.I nrobots
] [
.I nfences
]
.SH DESCRIPTION
.IX  "chase command"  ""  "\fLchase\fP \(em escape killer robots"
.LP
The object of the game 
.B chase 
is to move around inside of the box on the
screen without getting eaten by the robots chasing and without running
into anything.
.LP
If a robot runs into another robot while chasing you,
they crash and leave
a junk heap.  If a robot runs into a fence, it is destroyed.
.LP
If you can survive until all the robots are destroyed, you have won!
.LP
If you do not specify either
.I nrobots
or
.I nfences,
chase will prompt you for them.
  \    robots.6 ain  p    	rotcvph.6 .6      rotobj.6  .6      shaded.6 ph.      show.6 6      	showmap.6  d      snake.6       	snscore.6 6       
spheresdemo.6       stringart.6   $    suncoredemos.6 $  8    	sunc./share/man/man6/chess.6                                                                               755       0      12         2102  4424741541  10102                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chess.6 1.15 89/03/27 SMI;
.TH CHESS 6  "18 February 1988"
.SH NAME
chess \- the game of chess
.SH SYNOPSIS
.B /usr/games/chess
.SH AVAILABILITY
This game is available for Sun-2, Sun-3 and Sun-4
systems with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "chess"  ""  "\fLchess\fP \(em chess game"
.IX games chess "" "\fLchess\fP \(em chess game"
.LP
.B 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
.RB ` + '
is used to specify check;
.RB ` o-o '
and
.RB ` o-o-o '
specify castling.
To play black, type
.RB ` first ';
to print the board, type an empty line.
.LP
Each move is echoed in the appropriate
notation followed by the program's reply.
.SH DIAGNOSTICS
The most cryptic diagnostic is
.RB ` eh? '
which means that the input was syntactically incorrect.
.SH FILES
.PD 0
.TP 20
.B /usr/games/lib/chess.book
book of opening moves
.PD
.SH BUGS
Pawns may be promoted only to queens.
  worm.6 _      worms.6        wump.6         wump.6 ms.6        wump.6 worms.6        wump.6         wump.6 worms.6        wump.6 worms.6        wump.6 mt less strict than
those used in the official version of the game.
The initial deal costs $13.
You may quit at this point or inspect the game.
Inspection costs $13 and allows you to make as many
moves as is possible without moving any cards fro./share/man/man6/chesstool.6                                                                           755       0      12         5447  4424741541  11017                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chesstool.6 1.16 89/03/27 SMI;
.TH CHESSTOOL 6 "18 February 1988"
.SH NAME
chesstool \- window-based front-end to chess program
.SH SYNOPSIS
.B /usr/games/chesstool
[
.I chess_program
]
.SH AVAILABILITY
This game is available for Sun-2, Sun-3 and Sun-4 systems,
with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "chesstool"  ""  "\fLchesstool\fP \(em SunView chess game"
.IX  games chesstool  ""  "\fLchesstool\fP \(em SunView chess game"
.LP
.B chesstool
is a window-based front-end to the
.BR chess (6)
program.  Used without options,
.B chesstool
uses
\fB/usr/games/chess\fP;
you can designate any alternate program
which uses the same command syntax as
.BR chess (6)
with the
.I chess_program
argument.
.LP
When
.B chesstool
starts up, it displays a large window with three
subwindows.  The first subwindow displays messages
.RB ` "Illegal move" ',
for example.  The second subwindow is an options subwindow; options are
described below.  The final subwindow is a
chessboard display with white and
black pieces and two (advisory only) timekeeping clocks.
.LP
Make your moves with the mouse:  select a piece by positioning
the arrow cursor over the piece and
pressing the left mouse button down,
then drag the piece to the destination square, and release the button.
The cursor will then turn to an hourglass icon while the system plays.
.LP
Items in the subwindow may be selected
with either the left or middle mouse buttons.
These options are:
.TP 15
.B Last Play
Show the last play made.
.TP
.B Undo
Undo your last move and the machine's response.
.IP
Once the game is over, it is not possible to restart it,
so undo will update the board, but the game cannot be
continued from that position.
.TP
.B Flash
Flash when the machine has completed its move.
.IP
When this command is selected, a check mark will appear
next to the word
.BR Flash .
In flash mode, if
.B chesstool
is open, the piece moved by the system on its
play will flash until you make your move.
If
.B chesstool
is iconic, the entire icon will flash when the
machine has made its move.  Thus you can ``Close''
.B chesstool
and be alerted when it's your turn to
move.
To turn flash mode off, select flash again.
.TP
.B Machine White
Start a new game with the machine playing white.
.TP
.B Human White
Start a new game with the machine playing black.
.TP
.B Quit
Exit from
.BR chesstool .
.sp
.LP
There are two moves which are special:  castling and capturing
a pawn
.IR en passant .
To castle, move the king only.
The position of the rook will automatically
be updated.  Since the king moves two squares when castling,
the move is unambiguous.
To capture
.IR en passant ,
move the pawn to the square occupied by the opposing pawn which
will be captured.
.SH "SEE ALSO"
.BR chess (6)
 0
.TP 20
.B /usr/games/canfield
the game itself
.TP
.B /usr/games/lib/cfscores
the database of scores
.PD
.SH BUGS
It is impossible to cheat.
p-up menu).
.SS "Using the Menu"
.LP
The pop-up menu is invoked by pressin./share/man/man6/ching.6                                                                               755       0      12         5414  4424741541  10076                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ching.6 1.9 89/03/27 SMI; from UCB 4.2
.TH CHING 6  "16 February 1988"
.SH NAME
ching \- the book of changes and other cookies
.SH SYNOPSIS
.B /usr/games/ching
.RI [ hexagram ]
.SH DESCRIPTION
.IX  "ching command"  ""  "\fLching\fP \(em book of changes"
The
.I "I Ching"
or
.I "Book of Changes"
is an ancient Chinese oracle that has been in use for centuries
as a source of wisdom and advice.
.LP
The text of the
.I oracle
(as it is sometimes known) consists of sixty-four
.I hexagrams,
each symbolized by a particular arrangement of six straight (\-\-\-)
and broken (\-\ \-) lines.  These lines have values ranging
from six through nine, with the even values indicating the broken lines.
.LP
Each 
.I hexagram 
consists of two major sections.  The
.B  Judgement
relates specifically to the matter at hand (For instance, 
\*(lqIt furthers one to have somewhere to go.\*(rq) while the
.B  Image
describes the general attributes of the 
.I hexagram 
and how they apply
to one's own life (\*(lqThus the superior man makes himself strong
and untiring.\*(rq).
.LP
When any of the lines has the value six or nine, it is a moving line;
for any such line there is an appended judgement 
which becomes significant.
Furthermore, the moving lines are inherently unstable and
change into their opposites; a second 
.I hexagram
(and thus an additional judgement) is formed.
.LP
Normally, one consults the oracle by fixing the desired question
firmly in mind and then casting a set of changes (lines)
using yarrow\-stalks or tossed coins.  The resulting 
.I hexagram
will be the answer to the question.
.LP
Using an algorithm suggested by S. C. Johnson, this 
oracle  simply reads
a question from the standard input (up to an 
.SM EOF\s0)
and hashes the individual characters in combination with the
time of day, process ID and any other magic numbers 
which happen to be lying
around the system.  The resulting value is used as the seed
of a random number generator which drives a simulated 
coin\-toss divination.
The answer is then piped through
.BR nroff " for formatting"
and will appear on the standard output.
.LP
For those who wish to remain steadfast in the old traditions,
the oracle will also accept the results of a personal divination using,
for example, coins.  To do this, cast the change and then type the
resulting line values as an argument.
.LP
The impatient modern may prefer to settle for Chinese cookies; try
.BR fortune (6).
.SH "SEE ALSO"
.LP
It furthers one to see the great man.
.SH DIAGNOSTICS
.LP
.nf
The great prince issues commands,
Founds states, vests families with fiefs.
Inferior people should not be employed.
.fi
.SH BUGS
.LP
.nf
Waiting in the mud
Brings about the arrival of the enemy.
.fi
.LP
.nf
If one is not extremely careful,
Somebody may come up from behind and strike him.
Misfortune.
.fi
H "SEE ALSO"
.BR chess (6)
 0
.TP 20
.B /usr/games/canfield
the game itself
.TP
.B /usr/games/lib/cfscores
the database of scores
.PD
.SH BUGS
It is impossible to cheat.
p-up menu).
.SS "Using the Menu"
.LP
The pop-up menu is invoked by pressin./share/man/man6/colordemos.6                                                                          755       0      12         4506  4424741542  11156                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)colordemos.6 1.9 89/03/27 SMI
.TH COLORDEMOS 6 "23 March 1989"
.SH NAME
colordemos \- demonstrate Sun Color Graphics Display
.SH SYNOPSIS
.B /usr/demo/cballs
.br
.B /usr/demo/cdraw
.br
.BI /usr/demo/cphoto "  file"
.br
.B /usr/demo/cpipes
.br
.BI /usr/demo/cshowmap "  file"
.br
.B /usr/demo/csnow
.br
.B /usr/demo/csuncube
.br
.B /usr/demo/csunlogo
.br
.B /usr/demo/cvlsi
.SH DESCRIPTION
.IX  "cballs command"  ""  "\fLcballs\fP \(em color demo"
.IX  "cdraw command"  ""  "\fLcdraw\fP \(em color demo"
.IX  "cphoto command"  ""  "\fLcphoto\fP \(em color demo"
.IX  "cpipes command"  ""  "\fLcpipes\fP \(em color demo"
.IX  "cshowmap command"  ""  "\fLcshowmap\fP \(em color demo"
.IX  "csnow command"  ""  "\fLcsnow\fP \(em color demo"
.IX  "csuncube command"  ""  "\fLcsuncube\fP \(em color demo"
.IX  "csunlogo command"  ""  "\fLcsunlogo\fP \(em color demo"
.IX  "cvlsi command"  ""  "\fLcvlsi\fP \(em color demo"
.IX  "color demo"  "cballs command"  ""  "\fLcballs\fP"
.IX  "color demo"  "cdraw command"  ""  "\fLcdraw\fP"
.IX  "color demo"  "cphoto command"  ""  "\fLcphoto\fP"
.IX  "color demo"  "cpipes command"  ""  "\fLcpipes\fP"
.IX  "color demo"  "cshowmap command"  ""  "\fLcshowmap\fP"
.IX  "color demo"  "csnow command"  ""  "\fLcsnow\fP"
.IX  "color demo"  "csuncube command"  ""  "\fLcsuncube\fP"
.IX  "color demo"  "csunlogo command"  ""  "\fLcsunlogo\fP"
.IX  "color demo"  "cvlsi command"  ""  "\fLcvlsi\fP"
.I Colordemos
is a collection of simple demonstration programs for the Sun Color
Graphics Display.  Each program is briefly described below.
To exit each program,
send an interrupt signal by typing the appropriate key
(usually \s-2CONTROL C\s0).
.IP "\fBcballs\fP" 10
colliding balls on color display
.IP "\fBcdraw\fP" 10
draw on the color display; see \fIdraw\fP\|(6) for an explanation of how
to use \fIcdraw\fP.
.IP "\fBcphoto \fIfile\fR" 10
display dithered color file on color display.
Files suitable for display are in \fI/usr/demo/colorpix\fP.
.IP "\fBcpipes\fP" 10
colliding pipes on color display
.IP "\fBcshowmap\fP \fIfile\fP" 10
display maps.  Files suitable for display are in \fI/usr/demo/segments\fP.
.IP "\fBcsnow\fP" 10
color kaleidoscope
.IP "\fBcsuncube\fP" 10
multicolored Sun logo
.IP "\fBcsunlogo\fP" 10
shaded Sun logo
.IP "\fBcvlsi\fP" 10
color vlsi layout demo
.SH FILES 
/usr/demo/colorpix
.br
/usr/demo/segments
gement) is formed.
.LP
Normally, one consults the oracle by fixing the desired question
firmly in mind and then casting a set of changes (lines)
using yarrow\-stalks or tossed coins.  Th./share/man/man6/craps.6                                                                               755       0      12         6363  4424741542  10123                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)craps.6 1.10 89/03/27 SMI; from UCB 4.3 BSD
.TH CRAPS 6 "22 March 1989"
.SH NAME
craps \- the game of craps
.SH SYNOPSIS
.B /usr/games/craps
.SH DESCRIPTION
.IX "craps game" "" "\fLcraps\fP game"
.LP
.B 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.
.LP
The player starts off with a ``bankroll'' of $2,000.
.LP
The program prompts with:
.IP
.B bet?
.LP
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.
.LP
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:
.LP
.RS 20 
.PD 0
.TP 25
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 20
.PD 0
.TP 25
point
roller wins;
.TP
7
House wins;
.TP
any\ other\ number
roll again.
.RE
.PD
.LP
If a player loses the entire bankroll,
the House
will offer to lend the player an additional $2,000.
The program will prompt:
.IP
.B marker?
.LP
A
.B yes
(or
.BR y )
consummates the loan.
Any other reply terminates the game.
.LP
If a player owes the House money,
the House reminds the player, before a bet is placed,
how many markers are
outstanding.
.LP
If, at any time, the bankroll of a player who has outstanding markers
exceeds $2,000, the House asks:
.IP
.B Repay marker?
.LP
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:
.IP
.B How many?
.LP
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.
.LP
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.
.LP
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.
.br
.ne 5
.LP
Any player who accumulates $100,000 or more
breaks the bank.
The program then prompts:
.IP
.B New game?
.LP
to give the House a chance to win back its money.
.LP
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),
.SM DELETE
character or
.SM CTRL\-\s0D
The program will indicate whether the player won, lost, or broke even.
.SH MISCELLANEOUS
The random number generator for 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.
 reseting the hourglass timer to zero.
.TP
.B "Give Up"
End the game and print the results
immediately.
.TP
.B "Quit"
Allows you to quit running the boggletool program.  A prompt appears
asking you to confirm the quit; when it does, click the
.SM LEFT
mouse button
to q./share/man/man6/cribbage.6                                                                            755       0      12         7763  4424741542  10556                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cribbage.6 1.10 89/03/27 SMI; from UCB 4.2
.TH CRIBBAGE 6 "16 February 1988"
.SH NAME
cribbage \- the card game cribbage
.SH SYNOPSIS
.B /usr/games/cribbage
[
.B \-eqr
]
.I name .\|.\|.
.SH DESCRIPTION
.IX  "cribbage command"  ""  "\fLcribbage\fP \(em cribbage card game"
.B cribbage
plays the card game cribbage, with
.B cribbage
playing one hand and the user the other.
.B cribbage
initially asks the user if the rules of the game are needed \- if
so,
.B cribbage
displays the appropriate section from
.I According to Hoyle
with
.BR more (1).
.SH OPTIONS
.TP
.B \-e
Provide an explanation of the correct score when the player makes mistakes
scoring his hand or crib.  This is especially useful for beginning players.
.TP
.B \-q
Print a shorter form of all messages \- this is only recommended for
users who have played the game without specifying this option.
.TP
.B \-r
Instead of asking the player to cut the deck,
.B cribbage
will randomly
cut the deck.
.SH "PLAYING CRIBBAGE"
.LP
.B cribbage
first asks the player whether he wishes to play a short game
(\*(lqonce around\*(rq, to 61) or 
a long game (\*(lqtwice around\*(rq, to
121).  A response of 
.RB ` s ' 
results in a short game, any other response
plays a long game.
.LP
At the start of the first game,
.B cribbage
asks the player to cut the deck to determine who gets the
first crib.  The user should respond with a number between 0 and
51, indicating how many cards down the deck is to be cut.  The player
who cuts the lower ranked card gets the first crib.
If more than one game is played, the
loser of the previous game gets the first crib in the current game.
.LP
For each hand,
.B cribbage
first prints the player's hand,
whose crib it is, and then asks the player
to discard two cards into the crib.  The cards are prompted for
one per line, and are typed as explained below.
.LP
After discarding,
.B cribbage
cuts the deck (if it is the player's
crib) or asks the player to cut the deck (if it's 
its crib); in the latter
case, the appropriate response is a number from 0 to 39 indicating
how far down the remaining 40 cards are to be cut.
.LP
After cutting the deck, play starts with the non-dealer (the person
who doesn't have the crib) leading the first card.
Play continues, as per cribbage, until all cards are exhausted.
.B cribbage
keeps track of the scoring of all points and the total of
the cards on the table.
.LP
After play, the hands are scored.
.B cribbage
requests the player to
score his hand (and the crib, if it is his) by printing out the
appropriate cards (and the cut card enclosed in brackets).
Play continues until one player reaches the game limit (61 or 121).
.LP
A carriage return when a numeric input is expected is equivalent
to typing the lowest legal value; when cutting the deck this
is equivalent to choosing the top card.
.SH "SPECIFYING CARDS"
.LP
Cards are specified as
.I rank
followed by
.IR suit .
The
.IR rank s
may be specified as one of
.BR a ,
.BR 2 ,
.BR 3 ,
.BR 4 ,
.BR 5 ,
.BR 6 ,
.BR 7 ,
.BR 8 ,
.BR 9 ,
.BR t ,
.BR j ,
.BR q ,
and
.BR k ,
or alternatively, one of
.BR ace ,
.BR two ,
.BR three ,
.BR four ,
.BR five ,
.BR six ,
.BR seven ,
.BR eight ,
.BR nine ,
.BR ten ,
.BR jack ,
.BR queen ,
and
.BR king .
.IR Suit s
may be specified as
.BR s ,
.BR h ,
.BR d ,
and
.BR c ,
or alternatively as
.BR spades ,
.BR hearts ,
.BR diamonds ,
and
.BR clubs .
A card may be specified
as
.IR "rank suit" ,
or
.IR rank " of " suit .
If the single letter
.I rank
and
.I suit
designations
are used, the space separating the
.I suit
and
.I rank
may be left out.
Also, if only one card of the desired
.I rank
is playable, typing the
.I rank
is sufficient.  For example, if your hand was
.BR 2h ,
.BR 4d ,
.BR 5c ,
.BR 6h ,
.BR jc ,
.BR kd
and you wanted to
discard
the king of diamonds, you could type any of
.BR k ,
.BR king ,
.BR kd ,
.BR "k d" ,
.BR "k of d" ,
.BR "king d" ,
.BR "king of d" ,
.BR "k diamonds" ,
.BR "k of diamonds" ,
.BR "king diamonds" ,
or
.BR "king of diamonds" ,
.SH FILES
.PD 0
.TP 20
.B /usr/games/cribbage
.PD
.SH SEE ALSO
.LP
.BR more (1)
S
.PD 0
.TP 2./share/man/man6/cursor_demo.6                                                                         755       0      12          101  4424741542  11274                                                                                                                                                                                                                                                                                                                                                                      .so man6/sunview_demos.6
.\" @(#)cursor_demo.6 1.7 89/03/27 SMI;
r.6 6 `    k  fish.6 6    l  flight.6 6 w    m  	fortune.6     n  framedemo.6      o  gammontool.6       p  goban.6   $  q  
gp_demos.6    @  r   graphics_demos.6  r  P  s  hack.6 6  d  t  	hangman.6  @  t  u  intro.6     v  
jumpdemo.6      w  life.6 o    x  list.6 e    y  maze.6 t    z  mille.6     {  monop.6     |  moo.6 no     }  number.6  6     ~  ./share/man/man6/draw.6                                                                                755       0      12        10250  4424741542   7756                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)draw.6 1.6 89/03/27 SMI;
.TH DRAW 6 "23 March 1989"
.UC 4
.SH NAME
draw, bdraw, cdraw \- interactive graphics drawing
.SH SYNOPSIS
.B /usr/demo/bdraw
.br
.B /usr/demo/cdraw
.SH DESCRIPTION
.IX  "bdraw command"  ""  "\fLbdraw\fP \(em interactive graphics drawing"draw.6:
.IX  "cdraw command"  ""  "\fLcdraw\fP \(em interactive graphics drawing"draw.6:
.IX  "interactive graphics drawing"  ""  "interactive graphics drawing \(em \fLbdraw\fP
The
.I draw
programs are menu-driven programs which use the mouse, keyboard, bitmap display
and optionally the color display to draw objects, drag them around, save them
on disk, and so on.
.B bdraw
is the draw program for the black and white display and
.B cdraw
is the program for driving the color display.
.LP
The main menu items are selected by moving the mouse cursor and pressing the
left mouse button.  To redraw the display, point at the left edge of the main
menu box and press the left button.  The main menu items are:
.IP "\fBNew Seg xlate\fP" 10
Open a new translatable segment. A segment is a collection of attributes and
primitives (lines, text, polygons, etc.).  A translatable segment may 
subsequently be positioned.
.IP "\fBNew Seg xform\fP" 10
Open a new transformable segment.  A transformable segment may subsequently
be rotated, scaled, or positioned.
.IP "\fBDelete Seg\fP" 10
To delete a segment, point at any primitive in the segment and press the left
button.
.IP "\fBLines\fP" 10
To add line primitives to the currently open segment, position cursor, press
the left button, ... press right button to quit.
.IP "\fBPolygon\fP" 10
To add a polygon primitive to the currently open segment, position the cursor,
press the left button, \fB.\|.\|.\fP press the right button to terminate
the boundary definition.  Polygons are filled with the current fill attribute.
.IP "\fBRaster\fP" 10
To add a raster primitive to the currently open segment, position the cursor,
press the left button to reposition the box, adjust the box by moving the
mouse, press the right button to create the raster primitive comprising the
boxed bitmap.  A `rasterfile' is also created on disk for hardcopy
purposes (see \fI/usr/include/rasterfile.h\fP).  This `rasterfile' file
may be spooled to a Versatec printer/plotter for  hardcopy after exiting
from the draw program.  The command to do this is \fBlpr\ \ \-v\ \ rasterfile\fP.
.IP "\fBText\fP" 10
To add a text primitive to the currently open segment, position cursor, press
left button, type the text string at the keyboard (back space works), hit
return.  Text is drawn with the current text attributes.
.IP "\fBMarker\fP" 10
To add marker primitives to the currently open segment, position cursor, press
the left button to place marker, ... press the right button to quit.
.IP "\fBPosition\fP" 10
To position a segment, point at any primitive in the segment, press left
button, position the segment, press right button to quit.
.IP "\fBRotate\fP" 10
To rotate a transformable segment, point at any primitive in the segment,
press left button, move mouse to rotate, press right button to quit.
.IP "\fBScale\fP" 10
To scale a transformable segment, point at any primitive in the segment, press
the left button, move mouse to scale in x or y, press right button to quit.
.IP "\fBAttributes\fP" 10
This item brings up the attribute menu.  To select an attribute such as text
font, region fill texture (color), linestyle, or line width, point at the
item and press the left button.  Point at the left edge of the menu box to
quit.
.IP "\fBSave Seg\fP" 10
To save a segment on a disk file, point at the segment, press the left button,
type the disk file name, hit return.
.IP "\fBRestore Seg\fP" 10
To restore a previously saved segment from disk, type file name, hit return.
.IP "\fBExit\fP" 10
Exit the draw program.
.SH BUGS
.LP
Rasters and raster text do not scale or rotate.
If segments completely overlap, only the last one drawn may be picked by
pointing with the mouse.  This also applies to the menu segments!  Therefore,
don't cover them up with polygons.
If aborted with your interrupt character, you must give the 
`reset' command to turn
keyboard echo back on and to reset -cbreak.  Therefore, use the Exit item
in the main menu to exit the program.
oked by
.BR use .
A capability can be canceled by placing
.IB xx @
to the left of the
capability definition, where
.I xx
is the capability.
For example, the entry
.LP
.RS
.ft B
att4424-2|Teletype\04424 in display function group ii,
.ti +1i
rev@, sgr@, smul@, use=att4424,
.ft R
.RE
.LP
defines an
.SM AT&T
4424 terminal that does not have the
../share/man/man6/factor.6                                                                              755       0      12         1752  4424741542  10266                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)factor.6 1.9 89/03/27 SMI; from V7
.TH FACTOR 6 "16 February 1988"
.SH NAME
factor, primes \- factor a number, generate large primes
.SH SYNOPSIS
.B /usr/games/factor
[
.I number
]
.LP
.B /usr/games/primes
[
.I number
]
.SH DESCRIPTION
.IX "factor game" "" "\fLfactor\fP game"
.LP
.B factor
reads lines from its standard input.
If it reads a positive number,
.B factor
will factor the number and print its prime
factors, printing each one the proper number of times.
.B factor
exits when it reads zero, a negative number, or something other than a
number.
If a
.I number
is given,
.B factor
will factor the number, print its prime factors, and exit.
.LP
.B primes
reads a number from the standard input and
prints all primes larger than the given number and smaller than
2\u\s-232\s0\d (about 4.3\(mu10\u\s-29\s0\d).  If a
.I number
is given,
.B primes
will use that number rather than reading one from the standard input.
.SH DIAGNOSTICS
.TP 
.B Ouch.
Input out of range or for garbage input.
" 10
Open a new transl./share/man/man6/fish.6                                                                                755       0      12         2653  4424741543   7743                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fish.6 1.10 89/03/27 SMI; from UCB 4.2
.TH FISH 6 "16 February 1988"
.SH NAME
fish \- play ``Go Fish''
.SH SYNOPSIS
.B /usr/games/fish
.SH DESCRIPTION
.IX  "fish command"  ""  "\fLfish\fP \(em Go Fish game"
.B fish
plays the game of \*(lqGo Fish\*(rq,
a children's card game.  The object is to
accumulate "books" of 4 cards with the same face value.  The
players alternate turns; each turn begins with one player
selecting a card from his hand, and asking the other player for
all cards of that face value.  If the other player has one or
more cards of that face value in his hand, he gives them to the
first player, and the first player makes another request.
Eventually, the first player asks for a card which is not in
the second player's hand: he replies 
`\s-1GO FISH\s0!' 
The first
player then draws a card from the "pool" of undealt cards.  If
this is the card he had last requested, he draws again.  When a
book is made, either through drawing or requesting, the cards
are laid down and no further action takes place with that face
value.
.LP
To play the computer, simply make guesses by typing 
.BR a ,
.BR 2 ,
.BR 3 ,
.BR 4 ,
.BR 5 ,
.BR 6 ,
.BR 7 ,
.BR 8 ,
.BR 9 ,
.BR 10 ,
.BR j ,
.BR q ,
or
.B k 
k when asked.  Hitting a
.SM RETURN 
character gives you information about the 
size of my hand and the
pool, and tells you about my books.  Saying 
.RB ` p ' 
as a first
guess puts you into "pro" level; the default is pretty dumb.
" 10
To add line primitives to the currently open segment, position cursor, press
the./share/man/man6/flight.6                                                                              755       0      12           67  4424741543  10224                                                                                                                                                                                                                                                                                                                                                                      .so man6/gp_demos.6
.\" @(#)flight.6 1.8 89/03/27 SMI;
n  framedemo.6      o  gammontool.6  o    p  goban.6   $  q  
gp_demos.6 $  @  r   graphics_demos.6     P  s  hack.6 r  d  t  	hangman.6 d  t  u  intro.6     v  
jumpdemo.6     w  life.6      x  list.6 o    y  maze.6 e    z  mille.6     {  monop.6     |  moo.6 6      }  number.6       ~  primes.6    $    quiz.6    4    rain.6 6  H    random.6  H  \    robo./share/man/man6/fortune.6                                                                             755       0      12         1637  4424741543  10475                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fortune.6 1.12 89/03/27 SMI; from UCB 4.2
.TH FORTUNE 6 "16 February 1988"
.SH NAME
fortune \- print a random, hopefully interesting, adage
.SH SYNOPSIS
.B /usr/games/fortune
[
.B \-
] [
.B \-alsw
]
[
.I filename
]
.SH DESCRIPTION
.IX  "fortune command"  ""  "\fLfortune\fP \(em get fortune"
.LP
.B fortune
with no arguments prints out a random adage. The flags mean:
.RS
.TP 5
.B \-a
Choose from either list of adages.
.TP 5
.B \-l
Long messages only.
.TP 5
.B \-s
Short messages only.
.TP 5
.B \-w
Waits before termination
for an amount of time calculated from the number 
of characters in the message.
This is useful if it is executed as part of the logout procedure
to guarantee that the message can be read before the screen is cleared.
.RE
.\"
.\".TP
.\".B \-o
.\"Choose from an alternate list of adages,
.\"often used for potentially offensive ones.
.\"
.SH FILES
.PD 0
.TP 20
.B /usr/games/lib/fortunes.dat
.PD
k is made, either through drawing or requesting, the cards
are laid down and no further action ta./share/man/man6/framedemo.6                                                                           755       0      12          100  4424741543  10712                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)framedemo.6 1.7 89/03/27 SMI;
goban.6   $  q  
gp_demos.6    @  r   graphics_demos.6  r  P  s  hack.6 6  d  t  	hangman.6  6  t  u  intro.6     v  
jumpdemo.6      w  life.6 o    x  list.6 e    y  maze.6 t    z  mille.6     {  monop.6     |  moo.6 no     }  number.6  no    ~  primes.6  6   $    quiz.6 6  4    rain.6 z  H    random.6 6 z  \    robots.6 6 6  p    	rotcvph.6 H      roto./share/man/man6/gammontool.6                                                                          755       0      12        11317  4424741543  11203                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gammontool.6 1.16 89/03/27 SMI;
.TH GAMMONTOOL 6 "21 December 1987"
.SH NAME
gammontool \- play a game of backgammon
.SH SYNOPSIS
.B /usr/games/gammontool
[
.I path
]
.SH AVAILABILITY
This game is available with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX games gammontool "" "\fLgammontool\fR \(em SunView backgammon game"
.IX gammontool "" "\fLgammontool\fR \(em SunView backgammon game"
.LP
.B gammontool
paints a backgammon board on the screen,
and then lets you play against the computer.
It must be run in SunWindows.  The optional
.I path
argument specifies an alternate move-generating program,
which must be specially designed to run with
.BR gammontool .
.LP
The game has three subwindows: an option window on top,
a message window in the middle, and a large board on the bottom.
The buttons in the option window are used to restart, double, etc.
The message window has two lines: the first tells whose turn it is,
and the second displays any errors that occur.
.SS The Initial Roll
.LP
To start the game, roll the dice to determine who goes first.
Move the mouse arrow onto the board and click the left button.
One die appears on each side of the board:
the die on the left is yours,
and the die on the right is the computer's.
If your roll is greater, then you move;
if not, the computer makes a move.
.SS Making Your Move
.LP
When it is your turn,
.RB ` Your move '
appears in the message window.
Place the mouse over any piece of your color,
and click the left button.
While holding down the button, move the mouse to drag the piece;
the piece follows the mouse until you release the button.
The tool checks each move and does not allow illegal moves.
When you have made as many moves as you can,
the computer takes its turn; after it finishes,
you may either roll again, or double.
.TP
.I Doubling
To double, click the
.I Double
button in the option window and wait for the computer's response.
If the computer doubles you, a message is
displayed and you must answer with the
.B Accept\ Double
or
.B Refuse\ Double
buttons.  The
.B Forfeit
button can also be used to refuse a double.
If the game is doubled, a doubling cube with the proper value
is displayed on the bar strip.  If the number is facing up,
then you may double next.  If the number is upside down,
it is the computer's turn to double.
.TP
.I Other Buttons
If you want to change your move before you have finished it, use the
.B Redo\ Move
or
.B Redo\ Entire\ Move
buttons in the option window.
.B Redo\ Entire\ Move
replaces all of the pieces you have moved so that you can redo them all.
.B Redo\ Move
only replaces the last piece you moved, so it is useful when you roll
doubles and want to redo only the last piece you moved.  Note that
once you have made all of the moves your roll permits, play passes
immediately to the computer, so you cannot
redo the very last move.
The
.B Show\ Last\ Move
button allows you to see the last move again.
.LP
.SS Leaving the Game
If you want to quit playing backgammon, use the
.B Quit
button.  If you want to forfeit the game, use the
.B Forfeit
button.  The computer penalizes you by taking a certain number
of points, but the program does not terminate.
.LP
To play another game after winning, losing, or forfeiting, click
the
.B New\ Game
button.  To change the color of your pieces, click the mouse button
while pointing at either the
.B White
or
.B Black
checkboxes.  You may change colors at any time, even in the middle of
a game.  Changing colors in the middle of a game does not mean that you
trade places with the computer; your pieces stay where they are, but
they are repainted with the new color.  Your pieces always
move from the top right to the bottom right of the board, regardless
of your color.  As an additional cue as to your color, your dice are
always displayed on the left half of the board.
.LP
.SS Log File
If a there is a
.B gammonlog
file your home directory,
.B gammontool
keeps a log of the games played.
Each move and double gets recorded,
along with the winners and accumulated scores.
.SH FILES
.PD 0
.TP 20
.B ~/gammonlog
log of games played
.ne 3
.TP
.B /usr/games/lib/gammonscores
log of wins and losses
.PD
.SH BUGS
The default strategy used by the computer is very poor.
.LP
If a single move uses more than one die (for
instance if you roll 5, 6 and
move 11 spaces without touching down
in the middle) it is unpredictable
where the program will make the piece touch down.
This may be important
if there is a blot on one of these middle points.  The program will
always make the move if possible, but if two midpoints would work and
there is a blot on one of them, it is much better to explicitly hit
the blot and then move the piece the rest of the way.
en.
.ne 5
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/?/\(**
compiled terminal description database
.TP
.B /usr/share/lib/tabset/\(**
tab stop settings for some terminals, in a format appropriate to be
output to the terminal (escape sequences that set margins and tab stops)
.PD
.SH SEE ALSO
.BR tpu./share/man/man6/goban.6                                                                               755       0      12           74  4424741543  10033                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)goban.6 1.3 89/03/27 SMI;
hics_demos.6  @  P  s  hack.6 m  d  t  	hangman.6 ck  t  u  intro.6     v  
jumpdemo.6 r    w  life.6 p    x  list.6     y  maze.6     z  mille.6     {  monop.6     |  moo.6       }  number.6 oo.    ~  primes.6 r.6  $    quiz.6 m  4    rain.6   H    random.6 ain  \    robots.6 m.6  p    	rotcvph.6 .6      rotobj.6 ph.      shaded.6 j.6      show.6 d./share/man/man6/gp_demos.6                                                                            755       0      12         2566  4424741544  10613                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gp_demos.6 1.16 89/03/27 SMI;
.TH GP_DEMOS 6 "23 March 1989"
.SH NAME
gp_demos, flight, rotobj \- demonstration programs for the Graphics Processor
.SH SYNOPSIS
.B /usr/demo/flight
.LP
.B /usr/demo/rotobj
.RI [ " object " ]
.SH AVAILABILITY
These demos are available with the
.I Demos
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX demos "graphics processor"
.IX demos flight "" "\fLflight\fR \(em graphics processor demo"
.IX flight "" "\fLflight\fR \(em graphics processor demo"
.IX demos rotobj "" "\fLrotobj\fR \(em graphics processor demo"
.IX rotobj "" "\fLrotobj\fR \(em graphics processor demo"
.LP
These demos only run in windows running on a Graphics Processor
surface.
.SS Flight
.I flight
is a mouse-driven flight simulator.
.LP
.I Interactive Commands
.TP 15n
.B Middle-Button
Restart the program.
.TP
.B Right-Button
Increase speed.
.TP
.B Left-Button
Decrease speed.
.TP
.B Move-Mouse-Forward
The airplane dives.
.TP
.B Move-Mouse-Backward
The airplane climbs.
.TP
.B Move-Mouse-Left/Right
The airplane banks.
.TP
.B Left/Right-With-Right-Button
The airplane rolls without banking.
.SS Rotobj
.B rotobj
rotates an
.I object.
Object files
are located in
.B /usr/demo/\s-1DATA\s0
and have the suffix
.BR .vecs .
.SH FILES
.PD 0
.TP 20
.B /usr/demo\s-1DATA\s0
.PD
.SH SEE ALSO
.BR graphics_demos (6)
ter makes a move.
.SS Making Your Move
.LP
When it is your turn,
.RB ` Your move '
appears in the message window.
Place the mouse over any./share/man/man6/graphics_demos.6                                                                      755       0      12        20567  4424741544  12026                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)graphics_demos.6 1.20 89/03/27 SMI;
.TH GRAPHICS_DEMOS 6 "21 December 1987"
.SH NAME
graphics_demos, bouncedemo, framedemo, jumpdemo, spheresdemo, \- graphics demonstration programs
.SH SYNOPSIS
.B /usr/demo/bouncedemo
.RB [ " \-d \fIdev " ]
.RB [ " \-n\fIx " ]
.RB [ " \-r " ]
.RB [ " \-q " ]
.\".LP
.\".B /usr/demo/cframedemo
.\".RB [ " \-d \fIdev " ]
.\".RB [ " \-n\fIx " ]
.\".RB [ " \-r " ]
.\".RB [ " \-q " ]
.\".LP
.B /usr/demo/framedemo
.RB [ " \-d \fIdev " ]
.RB [ " \-n\fIx " ]
.RB [ " \-r " ]
.RB [ " \-q " ]
.\".LP
.\".B /usr/demo/goban
.\".I game
.LP
.B /usr/demo/jumpdemo
.RB [ " \-c " ]
.RB [ " \-d \fIdev " ]
.RB [ " \-n\fIx " ]
.RB [ " \-r " ]
.RB [ " \-q " ]
.\".LP
.\".B /usr/demo/maze
.\".LP
.\".B shaded
.\".I object
.\".RB [ " \-d \fIdev " ]
.\".LP
.\".B /usr/demo/show
.\".IR rasterfile " [ " rasterfile " .\|.\|. ]"
.\".LP
.\".B /usr/demo/showmap
.\".RB [ " \-d \fIdev " ]
.\".RB [ " \-q " ]
.LP
.BR /usr/demo/spheresdemo
.RB [ " \-d \fIdev " ]
.RB [ " \-n\fIx " ]
.RB [ " \-r " ]
.RB [ " \-q " ]
.\".LP
.\".B /usr/demo/stringart
.\".RB [ " \-d \fIdev " ]
.\".RB [ " \-q " ]
.\".LP
.\".B /usr/demo/suncube
.\".RB [ " \-d \fIdev " ]
.\".RB [ " \-q " ]
.SH AVAILABILITY
These demos are available with the
.I Demos
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX demos graphics_demos
.IX demos bouncedemo "" "\fLbouncedemo\fR \(em bouncing square graphics demo"
.IX bouncedemo "" "\fLbouncedemo\fR \(em bouncing square graphics demo"
.\".IX demos cframedemo "" "\fLcframedemo\fR \(em graphics demo"
.\".IX cframedemo "" "\fLcframedemo\fR \(em graphics demo"
.IX demos framedemo "" "\fLframedemo\fR \(em graphics demo"
.IX framedemo "" "\fLframedemo\fR \(em graphics demo"
.\".IX demos goban "" "\fLgoban\fR \(em go board graphics demo"
.\".IX goban "" "\fLgoban\fR \(em go board graphics demo"
.IX demos jumpdemo "" "\fLjumpdemo\fR \(em graphics demo"
.IX jumpdemo "" "\fLjumpdemo\fR \(em graphics demo"
.\".IX demos maze "" "\fLmaze\fR \(em graphics demo"
.\".IX maze "" "\fLmaze\fR \(em graphics demo"
.\".IX demos shaded "" "\fLshaded\fR \(em graphics demo"
.\".IX shaded "" "\fLshaded\fR \(em graphics demo"
.\".IX demos show "" "\fLshow\fR \(em graphics demo"
.\".IX show "" "\fLshow\fR \(em graphics demo"
.\".IX demos showmap "" "\fLshowmap\fR \(em graphics demo"
.\".IX showmap "" "\fLshowmap\fR \(em graphics demo"
.IX demos spheresdemo "" "\fLspheresdemo\fR \(em graphics demo"
.IX spheresdemo "" "\fLspheresdemo\fR \(em graphics demo"
.\".IX demos stringart "" "\fLstringart\fR \(em graphics demo"
.\".IX stringart "" "\fLstringart\fR \(em graphics demo"
.\".IX demos suncube "" "\fLsuncube\fR \(em graphics demo"
.\".IX suncube "" "\fLsuncube\fR \(em graphics demo"
.SS bouncedemo
.LP
.B bouncedemo
displays a bouncing square.
.\".ig
.\".SS cframedemo
.\".LP
.\".B cframedemo
.\"displays a series of color frames, each of which contains a 256
.\"by 256 image of eight-bit-deep pixels.
.\".B cframedemo
.\"looks for the frames in the files
.\".B frame.1
.\"through
.\".B frame.n
.\"in the current working directory, and displays
.\"them in numerical order.  When run in the directory
.\".BR /usr/demo/globeframes ,
.\".B cframedemo
.\"displays a rotating view of the world.
.\"..
.SS framedemo
.B framedemo
.LP
displays a series of frames, each of which contains a 256 by 256 image
one-bit-deep pixels (that is, the image is a square monochrome bitmap,
with 256 bits on a side).
.B framedemo
looks for the frames in the files
.B frame.1
through
.B frame.n
in the current working directory, and displays
them in numerical order.  A set of sample frames is available
in the directory
.BR /usr/demo/globeframes/* .
.SS \fIInteractive Commands\fR
.LP
If you move the cursor onto the image surface,  you can type certain
commands to affect the rate at which the frames are displayed. The
initial rate is one frame per second:
.TP
.B f
Remove 1/20th of a second from the interval.
.TP
.B F
Remove one second from the interval.
.B Ff
makes the interval as small as possible.
.TP
.B s
Add 1/20th of a second.
.TP
.B S
Add one second.
.\".ig
.\".SS goban
.\".LP
.\".B goban
.\"is Japanese for \(lqgo board\(rq.  It is an automatic board, but
.\"does not play go.  If you invoke it with no
.\".I game
.\"argument,
.\".B goban
.\"displays an important historical game written
.\"about by the Nobel Prize winning author, Yasunari Kawabata in
.\".I "The Master of Go,"
.\"a book which conveys the spirit of this ancient and fascinating game.
.\".LP
.\"Stones are placed on the board by selecting a grid point with
.\"the cursor and clicking the
.\".SM LEFT
.\"mouse button.  As stones are played,
.\"the color to play next alternates between black and white.
.\"The i
.\".SM MIDLE
.\"mouse button, when clicked in the board area, backs up a move
.\"(undoes it).  The 
.\".SM RIGHT
.\"mouse button moves
.\"forward through the game's sequence of moves.
.\".LP
.\"Stepping backward and forward does not alter the game until the
.\".SM LEFT
.\"mouse button is clicked to place a stone,
.\"at which time a new branch in the
.\"line of play is begun.  You can select branches by clicking the
.\".SM LEFT
.\"mouse button on moves with lettered labels on the board.
.\".LP
.\"A text subwindow displays any commentary
.\"attached to a move.  You can edit
.\"these comments, which are saved along with the game.
.\"..
.SS jumpdemo
.LP
.B jumpdemo
simulates the famous
.B Star Wars
jump to light-speed-sequence using
vector drawing.  Colored stars are drawn on color surfaces.
.\".ig
.\".SS maze
.\".B maze
.\"creates a random maze-pattern and tries a depth-first solution.
.\"If used in lockscreen, remember to run in \(lqnice\(rq mode since this
.\"demo consumes lots of cpu cycles.
.\".SS Shaded
.\".LP
.\".B shaded
.\"displays shaded objects.  Objects are located in
.\".B usr/demo/\s-1DATA\s0
.\"and include an icosahedron, glass, soccer ball, space shuttle,
.\"egg and pyramid.  This demo can take up to 40 seconds to start
.\"up with som objects.  Mouse input is required:
.\".LP
.\".SS \fIInteractive Commands\fR
.\".LP
.\"Click the
.\".SM LEFT
.\"and
.\".SM MIDDLE
.\"mouse buttons on the left grid to set the
.\"x-y orientation.  Click the
.\".SM MIDDLE
.\"mouse button on the right grid to
.\"set the z orientation.  Click the
.\".SM LEFT
.\"mouse button away from either
.\"grid to open the features menu, from which you can make selections
.\"using the
.\".SM LEFT
.\"mouse button.
.\".LP
.\"After selecting the desired features, click the
.\".SM LEFT
.\"mouse button away
.\"from all objects to exit the features menu.
.\".LP
.\"Click the
.\".SM RIGHT
.\"mouse button to begin drawing the object.  When the
.\"figure is finished, click the 
.\".SM RIGHT
.\"mouse button to return to the
.\"grids and menu, or type
.\".B q
.\"to exit.
.\".SS show
.\".LP
.\".B show
.\"display rasterfiles in a window or on a raw screen.
.\"Sample files are contained in the directory
.\".BR /usr/demo/\s-1COLORPIX\s0 .
.\"Running
.\".RS
.\".B "show \s-1COLORPIX\s0/*"
.\".RE
.\"from
.\".B /usr/demo
.\"will continuously cycle through the sample images.
.\"..
.SS spheresdemo
.LP
.B spheresdemo
computes a random collection of shaded spheres.
Colored spheres are drawn on color surfaces.
.\".ig
.\".SS showmap
.\".LP
.\".B showmap
.\"display 10 map projections continuously until interrupted.
.\"Each map is displayed for about 5 seconds.
.\"The maps are in the directory
.\".BR /usr/demo/\s-1MAPS\s0 .
.\".SS stringart
.\".B stringart
.\"continuously display a different "work of art" every 5 seconds.
.\"A total of 24336 different designs are possible.  On color surfaces
.\"the designs will loop through the colors: red, olive, green, turquoise,
.\"blue, and violet.
.\".SS suncube
.\".LP
.\"Display a cube with the
.\".SM SUN
.\"logo mapped to each face.  Will run continuously until interrupted.
.\"On color surfaces the colors of logo segments change gradually.  On
.\"monochrome surfaces the logo segments remain hollow.
.\"..
.SH OPTIONS
.TP
.B \-c
Rotate the color map to produce a sparkling effect.
.ne 3
.TP
.BI \-d " surface"
Run the demo on a surface other than the window or system console,
for instance:
.RS
.IP
.B bouncedemo \-d /dev/cgone0
.RE
.TP
.BI \-n x
Draw
.I x
items, or repeat a sequence
.I x
times.
.TP
.B \-r
Retain the window.  This allows the image to reappear
when uncovered instead of restarting the demo.
.TP
.B \-q
Quick exit.  Useful for running several demos from within a
shell script.
.\".SH SEE ALSO
.\".BR gfxtool (1),
.\".BR gp_demos (6)
n\fIx " ]
.\".RB [ " \-r " ]
.\".RB [ " \-q " ]
.\".LP
.B /usr/demo/framedemo
.RB [ " \-d \fIdev " ]
.RB [ " \-n\fIx " ]
.RB [ " \-r " ]
./share/man/man6/hack.6                                                                                755       0      12         2246  4424741544   7717                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hack.6 1.11 89/03/27 SMI;
.TH HACK 6 "16 February 1988"
.SH NAME
hack \- replacement for rogue
.SH SYNOPSIS
.B hack
[
.B \-d
.I hackdir 
]  [
.B \-s
.B all
| 
.I player 
\&.\|.\|.  ]
.SH DESCRIPTION
.IX "hack game" "" "\fLhack\fP game"
.LP
.B hack
is a display-oriented dungeons & dragons type game.
Both display and command structure resemble
.IR rogue ,
although
.B hack
has twice as many monster types and requires three times as much memory.
.LP
Normally
.B hack
looks in
.B /usr/games/lib/hackdir
for the files listed below;
this directory can be changed with the
.B \-d
option.  The
.B \-s
option permits you to search the player record.
Given the keyword
.BR all ,
.B hack
lists all players;
given the login name of a player,
it lists all scores of that player.
.SH FILES
.PD 0
.TP 20
.B record	
top 100 list (start with an empty file)
.TP
.B news
changes or bugs (start with no news file)
.TP
.B data	
information about objects and monsters
.TP
.B help	
introductory information (no doubt outdated)
.TP
.B hh     	
compacted version of help
.TP
.B perm	
empty file used for locking
.TP
.B rumors	
texts for fortune cookies
.PD
.\".SH AUTHOR
.\"Andreas Bormann, Jay Fenlason
ILABILITY
These demos are available with the
.I Demos
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX demos graphics_demos
.IX demos bouncedemo "" "\fLbouncedemo\fR \(em bouncing square graphics demo"
.IX bouncedemo "" "\fLbouncedemo\fR \(em bouncing square graphics de./share/man/man6/hangman.6                                                                             755       0      12         1054  4424741544  10416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hangman.6 1.9 89/03/27 SMI; from UCB 4.2
.TH HANGMAN 6 "16 February 1988"
.SH NAME
hangman \- computer version of the game hangman
.SH SYNOPSIS
.B /usr/games/hangman
.SH DESCRIPTION
.IX  "hangman command"  ""  "\fLhangman\fP \(em hangman game"
.LP
In
.B hangman,
the computer picks a word from the on-line word list
and you must try to guess it.
The computer keeps track of which letters have been guessed
and how many wrong guesses you have made on the screen in a graphic fashion.
.SH FILES
.PD 0
.TP 20
.B /usr/dict/words 
on-line word list
.PD
emos.6   8    	suncube.6 8  P    sunview_demos.6   `    trek.6    t    vwcvph.6  t      worm.6       worms.6        wump.6  in name of a player,
it lists all scores of that player.
.SH FILES
.PD 0
.TP 20
.B record	
top 100 list (start with an empty file)
.TP
.B news
changes or bugs (start with no news file)
.TP
.B data	
information about objects and monsters
.TP
.B help	
introductory information (no doubt outdated)
.TP
.B hh./share/man/man6/intro.6                                                                               755       0      12           64  4424741544  10100                                                                                                                                                                                                                                                                                                                                                                      .so man6/Intro.6
.\" @(#)intro.6 1.6 89/03/27 SMI; 
  life.6 o    x  list.6 e    y  maze.6 t    z  mille.6     {  monop.6     |  moo.6 no     }  number.6  6     ~  primes.6     $    quiz.6 6  4    rain.6 z  H    random.6 6   \    robots.6  H  p    	rotcvph.6 \      rotobj.6  p      shaded.6        show.6 6      	showmap.6  o      snake.6       	snscore.6 6       
spheresdemo.6       stringart.6 ./share/man/man6/jumpdemo.6                                                                            755       0      12           77  4424741545  10572                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)jumpdemo.6 1.7 89/03/27 SMI;
o    y  maze.6 e    z  mille.6     {  monop.6     |  moo.6 6      }  number.6       ~  primes.6    $    quiz.6    4    rain.6 6  H    random.6  H  \    robots.6  \  p    	rotcvph.6 p      rotobj.6        shaded.6        show.6       	showmap.6       snake.6       	snscore.6       
spheresdemo.6       stringart.6   $    suncored./share/man/man6/life.6                                                                                755       0      12         4232  4424741545   7726                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)life.6 1.14 89/03/27 SMI;
.TH LIFE 6  "21 December 1987"
.SH NAME
life \- John Conway's game of life
.SH SYNOPSIS
.B /usr/games/life
.SH AVAILABILITY
This game is available with the
.I Games
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX games life "" "\fLlife\fR \(em SunView game of life"
.IX life "" "\fLlife\fR \(em SunView game of life"
.LP
.B life
is a program that plays John Conway's game of life.  It only
runs under
.BR sunview (1).
.LP
When invoked,
.BR life
will display a window with a small control panel at the top,
and a large drawing area at the bottom.
You can create pieces in the drawing
area with the left button, and erase them with the middle button.
When you select
.B Run
in the control panel, the pieces will begin to evolve,
and the drawing region will update itself
at a speed controlled by the slider
labeled with
.B Fast
and
.BR Slow .
.B life
keeps track of all the pieces even if they are
not visible.  The scroll bars surrounding the drawing region
can be used to see pieces that have moved out of view.
There are some standard patterns that can be drawn
by popping up a menu in the drawing subwindow.
.LP
The meaning of the items in the first
row of the control panel (from left to right) are as follows.
If you click on the picture which looks like a tic-tac-toe
board, a grid will appear in the drawing region.  If you
click on
.BR Step ,
the mode will change from run mode (where
the pieces update continuously) to step mode (where an update
is only done when you click on
\fBStep\fP).
Following
.B Gen
is a number indicating the number of generations
that have occured.  The button marked
.B Find
will scroll so that at least one piece
is in view.  This is useful when all the pieces disappear from view.
The button marked
.B Clear
will clear the drawing
region, but leave the other controls unchanged.
.B Reset
will reset all the panel controls, but
will not erase any of the pieces, and
.B Quit
Exits the tool.
The second row contains two sliders.  The first controls
the update speed when in run mode, the second controls
the size of the pieces.
.SH SEE ALSO
.BR sunview (1)
 graphics demo"
.\".IX demos show "" "\fLshow\fR \(em graphics demo"
.\".IX show "" "\fLshow\fR \(em graphics demo"
.\".IX demos showmap "" "\fLshowmap\fR \(em graphics demo"
.\".IX showmap "" "\fLshowmap\fR \(em graphics demo"
.IX demos spheresdemo "" "\fLspheresdemo\fR \(em graphics demo"
.IX spheresdemo "" "\fLspheresdemo\fR \(em graphics demo"
.\".IX d./share/man/man6/list.6                                                                                755       0      12           62  4424741545   7717                                                                                                                                                                                                                                                                                                                                                                      .so man6/List.6
.\" @(#)list.6 1.6 89/03/27 SMI; 
 mille.6     {  monop.6     |  moo.6 6      }  number.6       ~  primes.6    $    quiz.6    4    rain.6 6  H    random.6  H  \    robots.6  \  p    	rotcvph.6 p      rotobj.6        shaded.6        show.6       	showmap.6       snake.6       	snscore.6       
spheresdemo.6       stringart.6   $    suncoredemos.6   8    	suncube.6 8  P    ./share/man/man6/maze.6                                                                                755       0      12           73  4424741545   7702                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)maze.6 1.3 89/03/27 SMI;
     |  moo.6 6      }  number.6       ~  primes.6    $    quiz.6   4    rain.6    H    random.6  H  \    robots.6  \  p    	rotcvph.6 p      rotobj.6        shaded.6        show.6       	showmap.6       snake.6       	snscore.6       
spheresdemo.6       stringart.6   $    suncoredemos.6   8    	suncube.6 8  P    sunview_demos.6   `./share/man/man6/mille.6                                                                               755       0      12        24323  4424741545  10134                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mille.6 1.10 89/03/27 SMI; from UCB 4.2
.TH MILLE 6 "16 February 1988"
.SH NAME
mille \- play Mille Bornes
.SH SYNOPSIS
.B /usr/games/mille
[ file ]
.SH DESCRIPTION
.LP
.IX  "mille command"  ""  "\fLmille\fP \(em Mille Bornes game"
.B mille
plays a two-handed game reminiscent of the Parker Brother's game of
Mille Bornes with you.  The rules are described below.  If a file name
is given on the command line, the game saved in that file is started.
.LP
When a game is started up, the bottom of the score window will contain
a list of commands.  They are:
.RS
.TP
P
Pick a card from the deck.  This card is placed in the `P' slot in your
hand.
.TP
D
Discard a card from your hand.  To indicate which card, type the number
of the card in the hand (or \*(lqP\*(rq for the just-picked card)
followed by a carriage-return or space.  The carriage-return or space
is required to allow recovery from typos which can be very expensive,
like discarding safeties.
.TP
U
Use a card.  The card is again indicated by its number, followed by a
carriage-return or space.
.TP
O
Toggle ordering the hand.  By default off, if turned on it will sort
the cards in your hand appropriately.  This is not recommended for the
impatient on slow terminals.
.TP
Q
Quit the game.  This will ask for confirmation, just to be sure.
Hitting 
.SM DELETE
(or 
.SM RUBOUT\s0) 
is equivalent.
.TP
S
Save the game in a file.  If the game was started from a file, you will
be given an opportunity to save it on the same file.  If you don't wish
to, or you did not start from a file, you will be asked for the file
name.  If you type a RETURN character without a name, the save will be
terminated and the game resumed.
.TP
R
Redraw the screen from scratch.  The command ^L 
(\s-1CTRL\-\s0L) will also
work.
.TP
W
Toggle window type.  This switches the score window between the startup
window (with all the command names) and the end-of-game window.  Using
the end-of-game window saves time by eliminating the switch at the end
of the game to show the final score.  Recommended for hackers and other
miscreants.
.RE
.LP
If you make a mistake, an error message will be printed on the last
line of the score window, and a bell will beep.
.LP
At the end of each hand or game, you will be asked if you wish to play
another.  If not, it will ask you if you want to save the game.  If you
do, and the save is unsuccessful, play will be resumed as if you had
said you wanted to play another hand/game.  This allows you to use the
.RB \*(lq S \*(rq
command to reattempt the save.  (The game itself is a product of Parker
Brothers, Inc.)
.SH "SEE ALSO"
.BR curses (3X)
.SH CARDS
.LP
Here is some useful information.
The number in brackets after the card name
is the number of that card in the deck:
.sp
.nf
.ne 10
.ta \w'Speed Limit [3]'u+3n \w'Speed Limit [3]'u+\w'End of Limit [6]'u+6n
Hazard	Repair	Safety
.sp
Out of Gas [2]	Gasoline [6]	Extra Tank [1]
Flat Tire [2]	Spare Tire [6]	Puncture Proof [1]
Accident [2]	Repairs [6]	Driving Ace [1]
Stop [4]	Go [14]	Right of Way [1]
Speed Limit [3]	End of Limit [6]
.sp
.ce
25 \- [10], 50 \- [10], 75 \- [10], 100 \- [12], 200 \- [4]
.sp
.fi
.DT
.SH RULES
.LP
.BR Object :
The point of game is to get a total of 5000 points in several hands.
Each hand is a race to put down exactly 700 miles before your opponent
does.  Beyond the points gained by putting down milestones, there are
several other ways of making points.
.LP
.BR Overview :
The game is played with a deck of 101 cards.
.I Distance
cards represent a number of miles traveled.  They come in denominations
of 25, 50, 75, 100, and 200.  When one is played, it adds that many
miles to the player's trip so far this hand.
.I Hazard
cards are used to prevent your opponent from putting down Distance
cards.  With the exception of the
.I "speed limit"
card, they can only be played if your opponent has a
.I Go
card on top of the Battle pile.  The cards are
.IR "Out of Gas" ,
.IR "Accident" ,
.IR "Flat Tire" ,
.IR "Speed Limit" ,
and
.IR "Stop" .
.I Remedy
cards fix problems caused by Hazard cards played on you by your
opponent.  The cards are
.IR "Gasoline" ,
.IR "Repairs" ,
.IR "Spare Tire" ,
.IR "End of Limit" ,
and
.IR "Go" .
.I Safety
cards prevent your opponent from putting specific Hazard cards on you
in the first place.  They are
.IR "Extra Tank" ,
.IR "Driving Ace" ,
.IR "Puncture Proof" ,
and
.IR "Right of Way" ,
and there are only one of each in the deck.
.LP
.BR "Board Layout" :
The board is split into several areas.  From top to bottom, they are:
.B "\s-1SAFETY AREA\s0"
.BR  (unlabeled): This is where the safeties will be placed as they are
played.
.BR \s-1HAND\s0 :
These are the cards in your hand.
.BR \s-1BATTLE\s0 :
This is the Battle pile.  All the Hazard and Remedy Cards are played
here, except the
.I "Speed Limit"
and
.I "End of Limit"
cards.  Only the top card is displayed, as it is the only effective
one.
.BR \s-1SPEED\s0 :
The Speed pile.  The
.I "Speed Limit"
and
.I "End of Limit"
cards are played here to control the speed at which the player is
allowed to put down miles.
.BR \s-1MILEAGE\s0 :
Miles are placed here.  The total of the numbers shown here is the
distance traveled so far.
.LP
.BR Play :
The first pick alternates between the two players.  Each turn usually
starts with a pick from the deck.  The player then plays a card, or if
this is not possible or desirable, discards one.  Normally, a play or
discard of a single card constitutes a turn.  If the card played is a
safety, however, the same player takes another turn immediately.
.LP
This repeats until one of the players reaches 700 points or the deck
runs out.  If someone reaches 700, they have the option of going for an
.IR Extension ,
which means that the play continues until someone reaches 1000 miles.
.LP
.BR "Hazard and Remedy Cards" :
Hazard Cards are played on your opponent's Battle and Speed piles.
Remedy Cards are used for undoing the effects of your opponent's
nastiness.
.LP
.RB "\ \ \ \ " Go
(Green Light) must be the top card on your Battle pile for you to play
any mileage, unless you have played the
.I "Right of Way"
card (see below).
.br
.RB "\ \ \ \ " Stop
is played on your opponent's
.I Go
card to prevent them from playing mileage until they play a
.I Go
card.
.br
.RB "\ \ \ \ " "Speed Limit"
is played on your opponent's Speed pile.  Until they play an
.I "End of Limit"
they can only play 25 or 50 mile cards, presuming their
.I Go
card allows them to do even that.
.br
.RB "\ \ \ \ " "End of Limit"
is played on your Speed pile to nullify a
.I "Speed Limit"
played by your opponent.
.br
.RB "\ \ \ \ " "Out of Gas"
is played on your opponent's
.I Go
card.  They must then play a
.I Gasoline
card, and then a
.I Go
card before they can play any more mileage.
.br
.RB "\ \ \ \ " "Flat Tire"
is played on your opponent's
.I Go
card.  They must then play a
.I "Spare Tire"
card, and then a
.I Go
card before they can play any more mileage.
.br
.RB "\ \ \ \ " "Accident"
is played on your opponent's
.I Go
card.  They must then play a
.I Repairs
card, and then a
.I Go
card before they can play any more mileage.
.br
.LP
.BR "Safety Cards" :
Safety cards prevent your opponent from playing the corresponding
Hazard cards on you for the rest of the hand.  It cancels an attack in
progress, and
.IR "always entitles the player to an extra turn" .
.br
.RB "\ \ \ \ "  "Right of Way"
prevents your opponent from playing both
.I Stop
and
.I "Speed Limit"
cards on you.  It also acts as a permanent
.I Go
card for the rest of the hand, so you can play mileage as long as there
is not a Hazard card on top of your Battle pile.  In this case only,
your opponent can play Hazard cards directly on a Remedy card besides a
Go card.
.br
.RB "\ \ \ \ " "Extra Tank"
When played, your opponent cannot play an
.I "Out of Gas"
on your Battle Pile.
.br
.RB "\ \ \ \ " "Puncture Proof"
When played, your opponent cannot play a
.I "Flat Tire"
on your Battle Pile.
.br
.RB "\ \ \ \ " "Driving Ace"
When played, your opponent cannot play an
.I Accident
on your Battle Pile.
.LP
.BR "Distance Cards" :
Distance cards are played when you have a
.I Go
card on your Battle pile, or a Right of Way in your Safety area and are
not stopped by a Hazard Card.  They can be played in any combination
that totals exactly 700 miles, except that
.IR "you cannot play more than two 200 mile cards in one hand" .
A hand ends whenever one player gets exactly 700 miles or the deck runs
out.  In that case, play continues until neither someone reaches 700,
or neither player can use any cards in their hand.  If the trip is
completed after the deck runs out, this is called
.IR "Delayed Action" .
.LP
.BR "Coup Four\o'\(aae'" :
This is a French fencing term for a counter-thrust move as part of a
parry to an opponents attack.  In Mille Bornes, it is used as follows:
If an opponent plays a Hazard card, and you have the corresponding
Safety in your hand, you play it immediately, even
.I before
you draw.  This immediately removes the Hazard card from your Battle
pile, and protects you from that card for the rest of the game.  This
gives you more points (see \*(lqScoring\*(rq below).
.LP
.BR Scoring :
Scores are totaled at the end of each hand,
whether or not anyone completed the trip.
The terms used in the Score window have the following meanings:
.br
.RB "\ \ \ \ " "Milestones Played" :
Each player scores as many miles as they played before the trip ended.
.br
.RB "\ \ \ \ " "Each Safety" :
100 points for each safety in the Safety area.
.br
.RB "\ \ \ \ " "All 4 Safeties" :
300 points if all four safeties are played.
.br
.RB "\ \ \ \ " "Each Coup Four\o'\(aae'" :
300 points for each Coup Four\o'\(aae' accomplished.
.LP
The following bonus scores can apply only to the winning player.
.br
.RB "\ \ \ \ " "Trip Completed" :
400 points bonus for completing the trip to 700 or 1000.
.br
.RB "\ \ \ \ " "Safe Trip" :
300 points bonus for completing the trip without using any 200 mile cards.
.br
.RB "\ \ \ \ " "Delayed Action" :
300 points bonus for finishing after the deck was exhausted.
.br
.RB "\ \ \ \ " "Extension" :
200 points bonus for completing a 1000 mile trip.
.br
.RB "\ \ \ \ " "Shut-Out" :
500 points bonus for completing the trip
before your opponent played any mileage cards.
.LP
Running totals are also kept for the current score for each player
for the hand
.RB ( "Hand Total" ),
the game
.RB ( "Overall Total" ),
and number of games won
.RB ( Games ).
-1CTRL\-\s0L) will also
work.
.TP
W
Toggle window type.  This switches the score window between the startup
window (with all the command names) and the end-of-game window.  Using
the end-of-game window saves time by eliminating the switch at the end
of the game to show the final score.  Recommended f./share/man/man6/monop.6                                                                               755       0      12        11510  4424741545  10154                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)monop.6 1.10 89/03/27 SMI; from UCB 4.2
.de Sc		\" start command list macro
.ie n .PD 0
.el .PD 0.5
.sp
..
.de Cm		\" define command macro
.TP 10
.ie t .BR "\\$1" :
.el .IR "\\$1" :
..
.de Ec		\" end command macro
.PD 1
..
.TH MONOP 6 "16 February 1988"
.SH NAME
monop \- Monopoly game
.SH SYNOPSIS
.B /usr/games/monop
.RI [ filename ]
.SH DESCRIPTION
.LP
.IX  "monop command"  ""  "\fLmonop\fP \(em Monopoly game"
.B monop
is reminiscent of the Parker Brother's game Monopoly, and
monitors a game between 1 to 9 users.
It is assumed that the rules of Monopoly are known.
The game follows the standard rules, with the exception that,
if a property would go up for auction and there are only two solvent players,
no auction is held and the property remains unowned.
.LP
The game, in effect, lends the player money,
so it is possible to buy something which you cannot afford.
However, as soon as a person goes into debt,
he must \*(lqfix the problem\*(rq,
that is, 
make himself solvent, before play can continue.
If this is not possible, the player's property reverts to his debtee,
either a player or the bank.
A player can resign at any time to any person or the bank,
which puts the property back on the board, unowned.
.LP
Any time that the response to a question is a
.IR string ,
for instance a name, place or person, you can type 
.B ? 
to get a list of valid answers.
It is not possible to input a negative number, nor is it ever necessary.
.SH USAGE
.SS Commands
.TP
.B quit:
Quit game.
This allows you to quit the game.  It asks you if you are sure.
.TP
.B print
Print board. This prints out the current board.
The columns have the following meanings (column headings are the same for the
.BR where ,
.BR "own holdings" ,
and
.B holdings
commands):
.LP
.RS 10
.TP 12
Name
The first ten characters of the name of the square
.TP
Own
The
.I number
of the owner of the property.
.TP
Price
The cost of the property (if any)
.TP
Mg
This field has a
.RB ` * '
in it if the property is mortgaged
.TP
#
If the property is a Utility or Railroad, this is the number
of such owned by the owner.
If the property is land, this is the number of houses on it.
.TP
Rent
Current rent on the property.  If it is not owned, there is no rent.
.RE
.TP
.B where:
where players are: Tells you where all the players are.
A
.RB ` * '
indicates the current player.
.TP
.B "own holdings":
List your own holdings,
that is, money, get-out-of-jail-free cards, and property.
.TP
.B holdings:
Holdings list. Look at anyone's holdings.
It will ask you whose holdings you wish to look at.
When you are finished, type 
.BR done .
.TP
.B shell:
Shell escape. Escape to a shell.  When the shell dies,
the program continues where you left off.
.TP
.B mortgage:
Mortgage property.
Sets up a list of mortgageable property, and asks which you wish to mortgage.
.TP
.B unmortgage:
Unmortgage property.
Unmortgage mortgaged property.
.TP
.B buy:
Buy houses.
Sets up a list of monopolies on which you can buy houses.
If there is more than one, it asks you which you want to buy for.
It then asks you how many for each piece of property,
giving the current amount in parentheses after the property name.
If you build in an unbalanced manner
(a disparity of more than one house within the same monopoly),
it asks you to re-input things.
.TP
.B sell:
Sell houses.
Sets up a list of monopolies from which you can sell houses.
it operates in an analogous manner to
.B buy
.TP
.B card:
Card for jail.
Use a get-out-of-jail-free card to get out of jail.
If you are not in jail, or you do not have one, it tells you so.
.TP
.B pay:
Pay for jail.
Pay $50 to get out of jail, from whence you are put on Just Visiting.
Difficult to do if you are not there.
.TP
.B trade:
This allows you to trade with another player.
It asks you whom you wish to trade with,
and then asks you what each wishes to give up.
You can get a summary at the end, and, in all cases,
it asks for confirmation of the trade before doing it.
.TP
.B resign:
Resign to another player or the bank.
If you resign to the bank, all property reverts to its virgin state,
and get-out-of-jail free cards revert to the deck.
.TP
.B save:
Save game.
Save the current game in a file for later play.
You can continue play after saving,
either by adding the file in which you saved the game after the
.B monop
command, or by using the
.B restore
command (see below).
It will ask you which file you wish to save it in,
and, if the file exists, confirm that you wish to overwrite it.
.TP
.B restore:
Restore game.
Read in a previously saved game from a file.
It leaves the file intact.
.TP
.B roll:
Roll the dice and move forward to your new location.
If you simply hit the 
.SM RETURN
key instead of a command,
it is the same as typing
.IR roll .
.SH FILES
.PD 0
.TP 25
.B /usr/games/lib/cards.pck	
chance and community chest cards
.PD
.SH BUGS
.LP
No command can be given an argument instead of a response to a query.
d pile.  The
.I "Speed Limit"
and
.I "End of Limit"
cards are played here to control the speed at which the player is
allowed to put down miles.
.BR \s-1MILEAGE\s0 :
Miles are placed h./share/man/man6/moo.6                                                                                 755       0      12         1041  4424741545   7574                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)moo.6 1.7 89/03/27 SMI; from S5R2
.TH MOO 6
.SH NAME
moo \- guessing game
.SH SYNOPSIS
.B /usr/games/moo
.SH DESCRIPTION
.IX "moo game" "" "\fLmoo\fP game"
.LP
.B 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).
ump.6  ules of Monopoly are known.
The game follows the standard rules, with the exception that,
if a property would go up for auction and there are only two solvent players,
no auction is held and the property remains unowned.
.LP
The game, in effect, lends the player money,
so it is possible to buy something which you cannot afford.
However, as soon as a person goes into debt,
he must \*(lqfix the problem\*(rq,
that is, 
make himself solvent, before play can continue.
If t./share/man/man6/number.6                                                                              755       0      12          603  4424741546  10256                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)number.6 1.8 89/03/27 SMI; from UCB 4.2
.TH NUMBER 6 "16 February 1988"
.SH NAME
number \- convert Arabic numerals to English
.SH SYNOPSIS
.B /usr/games/number
.SH DESCRIPTION
.IX  "number command"  ""  "\fLnumber\fP \(em convert Arabic numerals to English"
.B number
copies the standard input to the standard output,
changing each decimal number to a fully spelled out version.
	suncube.6 8  P    sunview_demos.6   `    trek.6    t    vwcvph.6  t      worm.6 t      worms.6 ./share/man/man6/primes.6                                                                              755       0      12         1130  4424741546  10301                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)primes.6 1.7 89/03/27 SMI;
.TH PRIMES 6 "16 February 1988"
.SH NAME
primes \- print all primes larger than some given number
.SH SYNOPSIS
.B /usr/games/primes
[
.I number
]
.SH DESCRIPTION
.IX "primes game" "" "\fLprimes\fP game"
.LP
.B primes
reads a number from the standard input and
prints all primes larger than the given number.  If
.I number
is given as an argument, it uses that number rather than reading one
from the standard input.
.SH BUGS
.LP
It obviously cannot print
.I all
primes larger than some given number.  It will not behave very
sensibly when it overflows an
.BR int .
 standard rules, with the exception that,
if a property would go up for auction and there are only two solvent players,
no auction is held and the property remains unowned.
.LP
The game, in effect, lends the player money,
so it is possible to buy something which you cannot afford.
However, as soon as a person goes into debt,
he must \*(lqfix the problem\*(rq,
that is, 
make himself solvent, before play can continue.
If t./share/man/man6/quiz.6                                                                                755       0      12         3420  4424741546   7776                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quiz.6 1.8 89/03/27 SMI; from UCB 4.2
.TH QUIZ 6  "16 February 1988"
.SH NAME
quiz \- test your knowledge
.SH SYNOPSIS
.B /usr/games/quiz
[
.BI \-i filename
] [
.B \-t
.RI "] [ " "category1 category2 " ]
.SH DESCRIPTION
.LP
.IX  "quiz command"  ""  "\fLquiz\fP \(em test knowledge"
.B quiz
gives associative knowledge tests on various subjects.
It asks items chosen from
.I category1
and expects answers from
.IR category2 .
If no categories are specified,
.B quiz
gives instructions and lists the available categories.
.LP
.B quiz
tells a correct answer whenever you type a bare newline.
At the end of input, upon interrupt, or when questions run out,
.B quiz
reports a score and terminates.
.LP
The
.B \-t
flag specifies `tutorial' mode, where missed questions are repeated
later, and material is gradually introduced as you learn.
.LP
The
.B \-i
flag causes the named file to be substituted for the default index file.
The lines of these files have the  syntax:
.RS
.nf
.ta \w'alternate 'u
line	= category newline \(bv category `:' line
category	= alternate \(bv category `|' alternate
alternate	= empty \(bv alternate primary
primary	= character \(bv `[' category `]' \(bv option
option	= `{' category `}'
.fi
.RE
.LP
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 `\\' is used as with
.BR sh (1)
to quote syntactically significant characters or to insert transparent
newlines into a line.
When either a question or its answer is empty,
.B quiz
will refrain from asking it.
.SH FILES
.PD 0
.TP 25
.B /usr/games/quiz.k/*
.PD
.SH BUGS
.LP
The construct `a\||\|ab' doesn't work in an information file.
Use `a{b}'.
cters of the name of the square
.TP
Own
The
.I number
of the owner of the property.
.TP
Price
The cost of the property (if any)
.TP
Mg
This field has a
.RB ` * '
in it if the property is mortgaged
.TP
#
If the property is a Utility or Railr./share/man/man6/rain.6                                                                                755       0      12         1103  4424741546   7733                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rain.6 1.9 89/03/27 SMI; from UCB 4.2
.TH RAIN 6 "16 February 1988"
.SH NAME
rain \- animated raindrops display
.SH SYNOPSIS
.B /usr/games/rain
.SH DESCRIPTION
.IX  "rain command"  ""  "\fLrain\fP \(em display raindrops"
.LP
.BR rain 's
display is modeled after the 
.SM VAX/VMS 
program of the same name.
The terminal has to be set for 9600 baud to obtain the proper effect.
.LP
As with all programs that use
.BR termcap ,
the 
.SM TERM 
environment
variable must be set (and exported) to the type of the terminal being used.
.SH FILES
.PD 0 
.TP 20
.B /etc/termcap
.PD
e a bare newline.
At the end of input, upon interrupt, or when questions run out,
.B quiz
reports a score and terminates.
.LP
The
.B \-t
flag specifies `tutorial' mode, where missed questions are repeated
later, and material is gradually introduced as you learn.
.LP
The
.B \-i
flag causes the named file to be substituted for the default index file.
The lines of these files have the  syntax:
.RS
.nf
.ta \w'alternate 'u
line	= category newline./share/man/man6/random.6                                                                              755       0      12         1572  4424741546  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)random.6 1.9 89/03/27 SMI;
.TH RANDOM 6 "16 February 1988"
.SH NAME
random \- select lines randomly from a file
.SH SYNOPSIS
.B /usr/games/random
[
.B \-er
] [
.I divisor
]
.SH DESCRIPTION
.IX "random game" "" "\fLrandom\fP game"
.LP
.B random
acts as a text filter, randomly selecting lines 
from its standard input
to write to the standard output.  The probability 
that a given line is
selected is normally 1/2; if a
.I divisor
is specified, it is treated as a floating-point number, and the
probability is
.RI 1/ divisor
instead.
.SH OPTIONS
.TP
.B \-e
Don't read the standard input or write to the standard output.
Instead, exit with a random exit status between 0 and 1, or between 0
and
.IR divisor -1
if
.I divisor
is specified.
.TP
.B \-r
Don't buffer the output.  If
.B \-r
is not used, output is buffered in blocks, or
line-buffered if the standard output is a terminal.
substituted for the default index file.
The lines of these files have the  syntax:
.RS
.nf
.ta \w'alternate 'u
line	= category newline./share/man/man6/robots.6                                                                              755       0      12         6003  4424741546  10316                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)robots.6 1.7 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH ROBOTS 6 "16 February 1988"
.SH NAME
robots \- fight off villainous robots
.SH SYNOPSIS
.B /usr/games/robots
[
.B \-sjta
] [
.I scorefile
]
.SH DESCRIPTION
.IX "robots game" "" "\fLrobots\fP game"
.LP
.B robots
pits you against evil robots,
who are trying to kill you
(which is why they are evil).
Fortunately for you,
even though they are evil,
they are not very bright
and have a habit of bumping into each other,
thus destroying themselves.
In order to survive,
you must get them to kill each other off,
since you have no offensive weaponry.
.LP
Since you are stuck without offensive weaponry,
you are endowed with one piece of defensive weaponry:
a teleportation device.
When two robots run into each other or a junk pile,
they die.
If a robot runs into you,
you die.
When a robot dies, you get 10 points,
and when all the robots die,
you start on the next field.
This keeps up until they finally get you.
.LP
Robots are represented on the screen by a
.RB ` + ',
the junk heaps from their collisions by a
.RB ` \(** ',
and you
(the good guy)
by a
.RB ` @ '.
.LP
The commands are:
.RS
.TP
.B h
move one square left
.TP
.B l
move one square right
.TP
.B k
move one square up
.TP
.B j
move one square down
.TP
.B y
move one square up and left
.TP
.B u
move one square up and right
.TP
.B b
move one square down and left
.TP
.B n
move one square down and right
.TP
.B \&.
(also space) do nothing for one turn
.TP
.SB HJKLBNYU
run as far as possible in the given direction
.TP
.B >
do nothing for as long as possible
.TP
.B t
teleport to a random location
.TP
.B w
wait until you die or they all do
.TP
.B q
quit
.TP
.B ^L
redraw the screen
.RE
.LP
All commands can be preceded by a count.
.LP
If you use the
.RB ` w '
command and survive to the next level,
you will get a bonus of 10%
for each robot which died after you decided to wait.
If you die, however, you get nothing.
For all other commands,
the program will save you from typos
by stopping short of being eaten.
However,
with
.RB ` w '
you take the risk of dying by miscalculation.
.LP
Only five scores are allowed per user on the score file.
If you make it into the score file,
you will be shown the list at the end of the game.
If an alternate score file is specified,
that will be used instead of the standard file
for scores.
.SH OPTIONS
.TP
.B \-s
Do not play,
just show the score file.
.TP
.B \-j
Jump,
when you run,
don't show any intermediate positions;
only show things at the end.
This is useful on slow terminals.
.TP
.B \-t
Teleport automatically when you have no other option.
This is a little disconcerting until you get used to it,
and then it is very nice.
.TP
.B \-a
Advance into the higher levels directly,
skipping the lower, easier levels.
.SH FILES
.PD 0
.TP 30
.B /usr/games/lib/robots_roll	
the score file
.PD
.SH BUGS
Bugs?
You
.IR crazy ,
man?!?
hich is why they are evil).
Fortunately for you,
even though they are evil,
they are not very bright
and have a habit of bumping into each other,
thus destroying themselves.
In order to survive,
you must get them to kill each other off,
since you have no offensive weaponry.
.LP
Since you are stuck without offensive weaponry,
you are endowed with one piece of defensive weaponry:
a teleportation device.
When two robots run into each other or a junk pile,
they die.
If a robot runs into you,
you die.
When a ./share/man/man6/rotcvph.6                                                                             755       0      12         5120  4424741547  10473                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rotcvph.6 1.10 89/03/27 SMI;
.TH ROTCVPH 6  "23 March 1989"
.SH NAME
rotcvph \- rotate convex polyhedron
.SH SYNOPSIS
.BI /usr/demo/rotcvph filename
.SH DESCRIPTION
.LP
.B rotcvph
rotates a convex polyhedron with hidden surfaces removed.
Using the SunCore Graphics Package, a 3-D projection
is drawn on the Sun Monochrome Bitmap Display.
The mandatory file argument contains a polygonal object definition as
described below.
.LP
Initially the program displays a fixed view of the object.  The following
commands may be typed at any time:
.RS
.TP
.B n
Display successive views with no waiting.
.TP
.B w
Wait for
.SM SPACE 
to be typed before displaying each view.
.TP
.B q
Exit the program.
.RE
.LP
The format of the polygonal object definition is illustrated by this example
of the definition of a pyramid:
.IP
	5	5
.br
-1.0 1.0 -1.0 1.0 -1.0 1.0
.br
1.0  1.0 -1.0
.br
1.0 -1.0 -1.0
.br
-1.0 -1.0 -1.0
.br
-1.0  1.0 -1.0
.br
0.0  0.0  1.0
.br
4	4 3 2 1
.br
3	1 5 4
.br
3	2 5 1
.br
3	3 5 2
.br
3	4 5 3
.LP
The first line gives the number of vertices followed by the number of
polygons.  The second line gives the coordinates of a bounding box for the
object.  Minimum and maximum coordinate values are given for each of three
dimensions in the order 
.IR minx , 
.IR maxx , 
.IR miny , 
.IR maxy , 
.IR minz , 
.IR maxz .  
Lines 3 through
v+2 (where v is the number of vertices) give vertex coordinates in the order
.IR x , 
.IR y , 
,IR z .  
Lines v+3 through v+p+2 (where p is the number of polygons) give
polygon descriptions.  The first number is the number of vertices for the
polygon.  Succeeding numbers on the line are indices into the vertex list.
Polygons should be planar.  Coordinates are given in floating point format
and everything else is integer.  Entries on a given line are separated by
arbitrary whitespace. A maximum of 400 vertices and 400 polygons may be
defined. The polygon definitions may contain a maximum of 1600 instances of
the vertices.
.B /usr/demo/data
contains several object definition files, including
.BR icosa.dat ,
.BR socbal.dat ,
and
.BR pyramid.dat .
.LP
The above format may be used to define non-convex 
objects.  The program will
display these objects but hidden surface 
computations will not be done correctly.
.SH FILES
.PD 0
.TP 30
.B /usr/demo/data/*.dat	
sample object definition files
.TP
.B icosa.dat
.TP
.B socbal.dat
.TP
.B pyramid.dat
.PD
.br
.ne 9
.SH BUGS
.LP
All floating point transformations are done twice
for each view, once to draw the object and once to undraw it.
.LP
Lines which are common to two visible polygons
in a view are drawn twice, once for each polygon.
scape to a shell.  When the shell dies,
the program continues where you left off.
.TP
.B mortgage:
Mortgage property.
Sets up a list of mortgageable property, and asks which you wish to mortgage.
.TP
.B unmortgage:
Unmortgage property.
Unmortgage mortgaged property.
.TP
.B buy:
Buy houses.
Sets up a list of monopolies on which you can buy houses.
If there is more than one, it asks you which you want to buy for.
It then asks you ./share/man/man6/rotobj.6                                                                              755       0      12           67  4424741547  10252                                                                                                                                                                                                                                                                                                                                                                      .so man6/gp_demos.6
.\" @(#)rotobj.6 1.3 89/03/27 SMI;
  show.6 6      	showmap.6  6      snake.6       	snscore.6 6       
spheresdemo.6       stringart.6   $    suncoredemos.6 $  8    	suncube.6  $  P    sunview_demos.6   `    trek.6 o  t    vwcvph.6 6 o      worm.6 6      worms.6        wump.6 mt contains a polygonal object definition as
described below.
.LP
Initially the program displays a fixed view of the object.  The following
c./share/man/man6/shaded.6                                                                              755       0      12           75  4424741547  10202                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)shaded.6 1.3 89/03/27 SMI;
ap.6  6      snake.6       	snscore.6 6       
spheresdemo.6       stringart.6   $    suncoredemos.6 $  8    	suncube.6  $  P    sunview_demos.6   `    trek.6 o  t    vwcvph.6 6 o      worm.6 6      worms.6        wump.6 ms.6        wump.6 mt contains a polygonal object definition as
described below.
.LP
Initially the program displays a fixed view of the object.  The following
c./share/man/man6/show.6                                                                                755       0      12           73  4424741547   7730                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)show.6 1.3 89/03/27 SMI;
ke.6       	snscore.6 6       
spheresdemo.6       stringart.6   $    suncoredemos.6 $  8    	suncube.6  $  P    sunview_demos.6   `    trek.6 o  t    vwcvph.6 6 o      worm.6 6      worms.6        wump.6 ms.6        wump.6 ms.6        wump.6 mt contains a polygonal object definition as
described below.
.LP
Initially the program displays a fixed view of the object.  The following
c./share/man/man6/showmap.6                                                                             755       0      12           76  4424741547  10431                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)showmap.6 1.8 89/03/27 SMI;
e.6       
spheresdemo.6       stringart.6   $    suncoredemos.6   8    	suncube.6 8  P    sunview_demos.6   `    trek.6    t    vwcvph.6  t      worm.6 o      worms.6        wump.6         wump.6 ms.6        wump.6 ms.6        wump.6 mt contains a polygonal object definition as
described below.
.LP
Initially the program displays a fixed view of the object.  The following
c./share/man/man6/snake.6                                                                               755       0      12         5447  4424741547  10123                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)snake.6 1.9 89/03/27 SMI; from UCB 4.2
.TH SNAKE 6 "16 February 1988"
.SH NAME
snake, snscore \- display chase game
.SH SYNOPSIS
.B /usr/games/snake
[
.BI \-w n
] [
.BI \-l n
]
.br
.B /usr/games/snscore
.SH DESCRIPTION
.LP
.IX  "snake command"  ""  "\fLsnake\fP \(em display chase game"
.B snake 
is a display-based game which must be played on a 
.SM CRT 
terminal
from among those supported by 
.BR vi (1).
The object of the game is to make as much money as possible without
getting eaten by the snake.  The
.B \-l
and
.B \-w
options allow you to specify the length and width of the field.
By default the entire screen (except for the last column) is used.
.LP
You are represented on the screen by an I.
The snake is 6 squares long and is represented by S's.
The money is $, and an exit is #.
Your score is posted in the upper left hand corner.
.LP
You can move around using the same conventions as 
.BR vi (1),
the h, j, k, and l keys work, as do the arrow keys.
Other possibilities include:
.RS
.TP
.B sefc
These keys are like hjkl but form a directed pad around the d key.
.TP
.SB HJKL
These keys move you all the way in the indicated direction to the
same row or column as the money.  This does
.I not
let you jump away from the snake, but rather saves you from having
to type a key repeatedly.  The snake still gets all his turns.
.TP
.SB SEFC
Likewise for the upper case versions on the left.
.TP
.SB ATPB
These keys move you to the four edges of the screen.
Their position on the keyboard is the mnemonic, for example, 
P is at the far right of the keyboard.
.TP
.B x
This lets you quit the game at any time.
.TP
.B p
Points in a direction you might want to go.
.TP
.B w
Space warp to get out of tight squeezes, at a price.
.TP
.B !
Shell escape
.TP
.B ^Z
Suspend the snake game, on systems which support it.
Otherwise an interactive shell is started up.
.RE
.LP
To earn money, move to the same square the money is on.
A new $ will appear when you earn the current one.
As you get richer, the snake gets hungrier.
To leave the game, move to the exit (#).
.LP
A record is kept of the personal best score of each player.
Scores are only counted if you leave at the exit,
getting eaten by the snake is worth nothing.
.LP
As in pinball, matching the last digit of your score to the number
which appears after the game is worth a bonus.
.LP
To see who wastes time playing snake, run
.B /usr/games/snscore .
.SH FILES
.PD 0
.TP 30
.B /usr/games/lib/snakerawscores	
database of personal bests
.TP
.B /usr/games/lib/snake.log	
log of games played
.PD
.  \"/usr/games/busy	program to determine if system too busy
.DT
.SH BUGS
.LP
When playing on a small screen,
it's hard to tell when you hit the edge of the screen.
.LP
The scoring function takes into account the size of the screen.
A perfect function to do this equitably has not been devised.
pace. A maximum of 400 vertices and 400 polygons may be
defined. The polygon definitions may contain a maximum of 1600 instances of
the vertices.
.B /usr/demo/data
contains several object definition files, including
../share/man/man6/snscore.6                                                                             755       0      12           66  4424741547  10426                                                                                                                                                                                                                                                                                                                                                                      .so man6/snake.6
.\" @(#)snscore.6 1.6 89/03/27 SMI; 
    stringart.6   $    suncoredemos.6   8    	suncube.6 8  P    sunview_demos.6   `    trek.6    t    vwcvph.6  t      worm.6        worms.6        wump.6  o type a key repeatedly.  The snake still gets all his turns.
.TP
.SB SEFC
Likewise for the upper case versions on the left.
.TP
.SB ATPB
These keys move you to the four edges of the screen.
Their position on the keyboard is the mnemonic, for example, ./share/man/man6/spheresdemo.6                                                                         755       0      12          102  4424741550  11271                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)spheresdemo.6 1.7 89/03/27 SMI;
ncoredemos.6 $  8    	suncube.6    P    sunview_demos.6   `    trek.6 o  t    vwcvph.6 6        worm.6 6      worms.6        wump.6 ms.6        wump.6  o type a key repeatedly.  The snake still gets all his turns.
.TP
.SB SEFC
Likewise for the upper case versions on the left.
.TP
.SB ATPB
These keys move you to the four edges of the screen.
Their position on the keyboard is the mnemonic, for example, ./share/man/man6/stringart.6                                                                           755       0      12          100  4424741550  10766                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)stringart.6 1.3 89/03/27 SMI;
suncube.6 os  P    sunview_demos.6   `    trek.6 _  t    vwcvph.6 rek      worm.6 v      worms.6        wump.6 worms.6        wump.6 ms.6        wump.6  o type a key repeatedly.  The snake still gets all his turns.
.TP
.SB SEFC
Likewise for the upper case versions on the left.
.TP
.SB ATPB
These keys move you to the four edges of the screen.
Their position on the keyboard is the mnemonic, for example, ./share/man/man6/suncoredemos.6                                                                        755       0      12         1444  4424741550  11513                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)suncoredemos.6 1.10 89/03/27 SMI
.TH SUNCOREDEMOS 6 "23 March 1989"
.SH NAME
suncoredemos \- demonstrate SunCore Graphics Package
.SH SYNOPSIS
.B /usr/demo/cproduct
.br
.B /usr/demo/cshademo
.br
.B /usr/demo/cvlsi
.SH DESCRIPTION
.I Suncoredemos
is a collection of simple programs demonstrating the SunCore
Graphics Package.  Each program is briefly described below.
These programs generate all graphics output using subroutine calls
to SunCore.  To exit each program,
generate an interrupt signal by typing the appropriate key (usually <DELETE>).
.IP cproduct 12
color Sun architecture demo
.IP
Requires Sun Color Graphics Display.
.IP cshademo 12
shaded surface polygons demo
.IP
Requires Sun Color Graphics Display.
.IP cvlsi 12
color vlsi layout demo
.IP
Requires Sun Color Graphics Display.
herwise an interactive shell is started up.
.RE
.LP
To earn money, move to the same square the money is on.
A new $ will appear when you earn the current one.
As you get richer, the snake gets hungrier.
To leave the game./share/man/man6/suncube.6                                                                             755       0      12           76  4424741550  10411                                                                                                                                                                                                                                                                                                                                                                      .so man6/graphics_demos.6
.\" @(#)suncube.6 1.3 89/03/27 SMI;
 trek.6 _  t    vwcvph.6 rek      worm.6 v      worms.6        wump.6 sr/demo/cproduct
.br
.B /usr/demo/cshademo
.br
.B /usr/demo/cvlsi
.SH DESCRIPTION
.I Suncoredemos
is a collection of simple programs demonstrating the SunCore
Graphics Package.  Each program is briefly described below.
These programs generate all graphics output using subroutine calls
to SunCore.  To exit each program,
generate an interrupt signal by typ./share/man/man6/sunview_demos.6                                                                       755       0      12         2361  4424741550  11673                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sunview_demos.6 1.14 89/03/27 SMI; 
.TH SUNVIEW_DEMOS 6 "16 February 1988"
.SH NAME
sunview_demos, canvas_demo, cursor_demo \- Window-System demonstration programs
.SH SYNOPSIS
.B /usr/demo/canvas_demo
.LP
.B /usr/demo/cursor_demo
.SH AVAILABILITY
.LP
These demos are available with the
.I SunView 1 Demos
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX demos "SunView demos"
.IX demos canvas_demo "" "\fLcanvas_demo\fR \(em canvas subwindow demo"
.IX canvas_demo "" "\fLcanvas_demo\fR \(em canvas subwindow demo"
.IX demos cursor_demo "" "\fLcursor_demo\fR \(em cursor attributes demo"
.IX cursor_demo "" "\fLcursor_demo\fR \(em cursor attributes demo"
.LP
.SS canvas_Demo
.B canvas_demo 
demonstrates the capabilities of the canvas subwindow
package.  It consists of two subwindows:  a control panel and a
canvas.  By adjusting the items on the control panel, you can 
manipulate the attributes of the canvas, and see the results.
.SS cursor_Demo
.B cursor_demo 
demonstrates what you can do with cursors.  A single control 
panel is provide for adjusting the various cursor attributes.
As you adjust the items on the control panel, the panel's cursor 
changes in appearance.  
o the number
which appears after the game is worth a bonus.
.LP
To see who wastes time playing snake, run
.B /usr/games/snscore .
.SH FILES
.PD 0
.TP 30
.B /usr/games/lib/snakerawscores	
database of personal bests
.TP
.B /usr/games/lib/snake.log	
log of games played
.PD
./share/man/man6/trek.6                                                                                755       0      12         3332  4424741550   7750                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)trek.6 1.10 89/03/27 SMI; from UCB 4.2
.TH TREK 6 "24 October 1983"
.SH NAME
trek \- trekkie game
.SH SYNOPSIS
.B /usr/games/trek
[ [
.B \-a
]
.I filename
]
.SH DESCRIPTION
.IX  "trek command"  ""  "\fLtrek\fP \(em Star Trek game"
.B trek
is a game of space glory and war.  Below is a summary of commands.
For complete documentation, see
.IR Trek
by Eric Allman.
.LP
If a filename is given, a log of the game is written onto that file.
If the
.B \-a
flag is given before the filename, that file is appended to, not truncated.
.LP
The game will ask you what length game you would like.
Valid responses are \(lqshort\(rq, \(lqmedium\(rq, and \(lqlong\(rq.
You may also type \(lqrestart\(rq, which restarts a previously saved game.
You will then be prompted for the skill, to which you must respond
\(lqnovice\(rq, \(lqfair\(rq, \(lqgood\(rq, \(lqexpert\(rq,
\(lqcommodore\(rq, or \(lqimpossible\(rq.
You should normally start out with a novice and work up.
.LP
In general, throughout the game, if you forget what is appropriate
the game will tell you what it expects if you just type in a question mark.
.SH "COMMAND SUMMARY"
.ie t .ds f \fB
.el .ds f \fI
.ta 3i
.nf
\*fabandon\fR	\*fca\fRpture
\*fcl\fRoak \*fu\fRp/\*fd\fRown
\*fc\fRomputer request; ...	\*fda\fRmages
\*fdestruct\fR	\*fdo\fRck
\*fhelp\fR	\*fi\fRmpulse course distance
\*fl\fRrscan	\*fm\fRove course distance
\*fp\fRhasers \*fa\fRutomatic amount
\*fp\fRhasers \*fm\fRannual amt1 course1 spread1 ...
\*ft\fRorpedo course [\*fy\fRes] angle/\*fn\fRo
\*fram\fR course distance	\*fr\fRest time
\*fshell\fR	\*fsh\fRields \*fu\fRp/\*fd\fRown
\*fs\fRrscan [\*fy\fRes/\*fn\fRo]
\*fst\fRatus	\*fterminate\fR \*fy\fRes/\*fn\fRo
\*fu\fRndock	\*fv\fRisual course
\*fw\fRarp warp_factor
.fi
.DT
of the screen.
A perfect function to do this equitably has not been devised.
pace. A maximum of 400 vertices and 400 polygons may be
defined. The polygon definitions may contain a maximum of 1600 instances of
the vertices.
.B /usr/demo/data
contains several object definition files, including
../share/man/man6/vwcvph.6                                                                              755       0      12         3571  4424741551  10326                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vwcvph.6 1.10 89/03/27 SMI;
.TH VWCVPH 6  "23 March 1989"
.SH NAME
vwcvph \- view convex polyhedron
.SH SYNOPSIS
.B /usr/demo/vwcvph
.I filename
.SH DESCRIPTION
.LP
.B vwcvph
allows the user to view a convex polyhedron from
various positions with hidden surfaces removed.
The viewing position is selected using the mouse.
Using the SunCore Graphics Package, a 3-D projection
is drawn on the Sun Monochrome Bitmap Display.
The mandatory file argument contains a
polygonal object definition as
described in the manual page for
.B /usr/demo/rotcvph.
.LP
The program operates in two modes:
.B DisplayObject
mode and
.B SelectView
mode.
The program starts in
.B DisplayObject mode:
.RS
.TP
.BR DisplayObject :
The object is displayed in 3-D perspective with hidden surfaces removed.
Type
.B q
while in this mode to exit the program. Press
.SM RIGHT 
mouse button to
switch to
.B SelectView
mode.
.TP
.BR SelectView :
Schematic projections of the outline of
the object are shown and the mouse
is used to select a viewing position. 
Press 
.SM LEFT mouse button to set 
.I x 
and 
.SM MIDDLE
mouse button 
to set 
.I y 
in the
.IR "Front View" .
Use 
.SM MIDDLE 
mouse button to set 
.I z 
in the
.IR "Top View" .
Press 
.SM RIGHT 
mouse button to switch to
.B DisplayObject
mode.
.RE
.LP
The view shown in
.B DisplayObject
mode is drawn using the conventions that the
viewer is always looking from the viewing
position toward the center of
the object and that the positive 
.I y 
axis
on the screen is the projection of
the positive 
.I y 
axis in object coordinates.
.LP
The input file may define non-convex objects.  The program will
display these objects but hidden surface computations
will not be done
correctly.
.SH FILES
.PD 0
.TP 30
.B /usr/demo/data/*.dat	
sample object definition files
.PD
.SH BUGS
.LP
Lines which are common to two visible polygons in a
view are drawn twice, once
for each polygon.
itions may contain a maximum of 1600 instances of
the vertices.
.B /usr/demo/data
contains several object definition files, including
../share/man/man6/worm.6                                                                                755       0      12         2367  4424741551   7777                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)worm.6 1.8 89/03/27 SMI; from UCB 4.2
.TH WORM 6 "16 February 1988"
.SH NAME
worm \- play the growing worm game
.SH SYNOPSIS
.B /usr/games/worm
[
.I size
]
.SH DESCRIPTION
.IX  "worm command"  ""  "\fLworm\fP \(em growing worm game"
.LP
In
.B worm,
you are a little worm, your body is the
.RB " o "'s 
on the screen
and your head is the
.RB " @ ". 
You move with the hjkl keys (as in the game
.BR snake ). 
If you don't press any keys, you continue in the direction you
last moved.  The upper case 
.SM HJKL 
keys move
you as if you had pressed
several (9 for HL and 5 for JK) of the
corresponding lower case key
(unless you run into a digit, then it stops).
.LP
On the screen you will see a digit; if
your worm eats the digit it will
grow longer, the actual amount longer depends
on which digit it was
that you ate.  The object of the game is to
see how long you can make
the worm grow.
.LP
The game ends when the worm runs into either
the sides of the screen,
or itself.  The current score (how much the
worm has grown) is kept in
the upper left corner of the screen.
.LP
The optional argument, if present, is the initial length of the worm.
.SH BUGS
.LP
If the initial length of the worm is set
to less than one or more
than 75, various strange things happen.
ject
mode.
.RE
.LP
The view shown in
.B DisplayObject
mode is drawn using the conventions that the
viewer is always looking from the viewing
position toward the center of
the object and that the positive 
.I y 
axis
on the screen is the projection of
the positive 
./share/man/man6/worms.6                                                                               755       0      12         1705  4424741551  10155                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)worms.6 1.9 89/03/27 SMI; from UCB 4.2
.TH WORMS 6 "16 February 1988"
.SH NAME
worms  \-  animate worms on a display terminal
.SH SYNOPSIS
.B /usr/games/worms
[
.B \-field
] [
.B \-length
.I # 
] [
.B \-number
.I # 
] [
.B \-trail
]
.SH DESCRIPTION
.LP
.IX  "worms command"  ""  "\fLworms\fP \(em animate worms on display"
.\" Brian Horn (cithep!bdh) showed me a
.\" .I TOPS-20
.\" program on the DEC-2136 machine called
.\" .IR WORM ,
.\" and suggested that I write a similar program that would run under
.\" .IR Unix .
.\" I did, and no apologies.
.B \-field
makes a "field" for the worm(s) to eat;
.B \-trail
causes each worm to leave a trail behind it.  You can figure
out the rest by yourself.
.SH FILES
.PD 0
.TP 20
.B /etc/termcap
.PD
.SH SEE ALSO
.LP
.I Snails
by Karl Heuer
.SH BUGS
.LP
The lower-right-hand character position will not
be updated properly
on a terminal that wraps at the right margin.
.LP
Terminal initialization is not performed.
een,
or itself.  The current score (how much the
worm has g./share/man/man6/wump.6                                                                                755       0      12         1504  4424741551   7773                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)wump.6 1.9 89/03/27 SMI; from UCB 4.2
.TH WUMP 6  "16 February 1988"
.SH NAME
wump \- the game of hunt the wumpus
.SH SYNOPSIS
.B /usr/games/wump
.SH DESCRIPTION
.IX  "wump command"  ""  "\fLwump\fP \(em hunt the Wumpus game"
.LP
.B 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.
.LP
The program asks various questions which you answer one per line;
it will give a more detailed description if you want.
.LP
This program is based on one described in
.I "People's Computer Company,"
.I 2,
2 (November 1973).
osition will not
be updated properly
on a terminal that wraps at the right margin.
.LP
Terminal initialization is not performed.
een,
or itself.  The current score (how much the
worm has g./share/man/man7/                                                                                      775       0      12            0  4425704364   6631                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man7/Intro.7                                                                               755       0      12         1445  4424741560  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)Intro.7 1.14 89/03/26 SMI; from UCB 4.2
.TH INTRO 7  "4 September 1987"
.SH NAME
miscellaneous \- miscellaneous useful information pages
.SH DESCRIPTION
.IX  "miscellaneous information"
.IX  "miscellaneous noninformation"
.IX  introduction "miscellaneous information"
.IX  introduction "miscellaneous noninformation"
.IX  information miscellaneous
.IX  information mj "" "non-, miscellaneous"
.IX  "noninformation miscellaneous"
.IX  "noninformatioo miscellaneous" "" "information miscellaneous"
This section contains miscellaneous documentation, mostly
in the area of text processing macro packages for
.IR troff (1).
.
.ne 10
.SH "LIST OF MISC. TABLES"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf 
\fBName	Appears on Page	Description\fR 
.sp 
.nr zZ 1 
.so /usr/man/man7/List.7
.nr zZ 0
.fi
any,"
.I 2,
2 (November 1973).
osition will not
be updated properly
on a terminal that wraps at the right margin.
.LP
Terminal initialization is not performed.
een,
or itself.  The current score (how much the
worm has g./share/man/man7/List.7                                                                                755       0      12         1100  4424741560   7710                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.7 1.6 89/03/26 SMI;
.if \n(zZ=1 .ig zZ
.TH LIST 7 "2 September 1987"
.SH LIST OF MISC. TABLES
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page 	Description\fR
.sp
.zZ
\fBascii\fR	\fBascii\fR(7)	 map of ASCII character set
\fBeqnchar\fR	\fBeqnchar\fR(7)	 special character definitions for eqn
\fBfilesystem\fR	\fBfilesystem\fR(7)	 filesystem organization
\fBhier\fR	\fBhier\fR(7)	 file system hierarchy
\fBman\fR	\fBman\fR(7)	 macros to format Reference Manual pages
\fBme\fR	\fBme\fR(7)	 macros for formatting papers
\fBms\fR	\fBms\fR(7)	 text formatting macros
.fi
 text processing macro packages for
.IR troff (1).
.
.ne 10
.SH "LIST OF MISC. TABLES"
.sp
.if t .ta 25n; +20n
.if n .ta 20n; +20n
.nf 
\fBName	Appears on Page	Description\fR 
.sp 
.nr zZ 1 
.so /usr/man/man7/List.7
.nr zZ 0
.fi
any,"
.I 2,
2 (November 1973).
osition will not
be updated properly
on a terminal that wraps at the right margin.
.LP
Terminal initialization is not performed.
een,
or itself.  The current score (how much the
worm has g./share/man/man7/ascii.7                                                                               755       0      12         7543  4424741560  10106                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ascii.7 1.15 89/03/26 SMI; from UCB 4.2
.TH ASCII 7 "16 February 1988"
.SH NAME
ascii \- map of ASCII character set
.SH SYNOPSIS
.B cat /usr/pub/ascii
.IX  "ascii file"  ""  "\fLascii\fP \(em ASCII character set"
.SH DESCRIPTION
.LP
.B /usr/pub/ascii
is a map of the
.SM ASCII
character set, to be printed as needed.
It contains octal and hexadecimal values for each character.
While not included in that file, a chart of decimal values is also
shown here.
.nf
.I Octal \(em Character
.LP
.cs R 22
|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 EM |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 |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  \\ |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|
.cs R
.LP
.br
.ne 20
.I Hexadecimal \(em Character
.LP
.cs R 22
| 00 NUL| 01 SOH| 02 STX| 03 ETX| 04 EOT| 05 ENQ| 06 ACK| 07 BEL|
| 08 BS | 09 HT | 0A NL | 0B VT | 0C NP | 0D CR | 0E SO | 0F SI |
| 10 DLE| 11 DC1| 12 DC2| 13 DC3| 14 DC4| 15 NAK| 16 SYN| 17 ETB|
| 18 CAN| 19 EM | 1A SUB| 1B ESC| 1C FS | 1D GS | 1E RS | 1F US |
| 20 SP | 21  ! | 22  " | 23  # | 24  $ | 25  % | 26  & | 27  \' |
| 28  ( | 29  ) | 2A  * | 2B  + | 2C  , | 2D  \- | 2E  . | 2F  / |
| 30  0 | 31  1 | 32  2 | 33  3 | 34  4 | 35  5 | 36  6 | 37  7 |
| 38  8 | 39  9 | 3A  : | 3B  ; | 3C  < | 3D  = | 3E  > | 3F  ? |
| 40  @ | 41  A | 42  B | 43  C | 44  D | 45  E | 46  F | 47  G |
| 48  H | 49  I | 4A  J | 4B  K | 4C  L | 4D  M | 4E  N | 4F  O |
| 50  P | 51  Q | 52  R | 53  S | 54  T | 55  U | 56  V | 57  W |
| 58  X | 59  Y | 5A  Z | 5B  [ | 5C  \\ | 5D  ] | 5E  ^ | 5F  _ |
| 60  \` | 61  a | 62  b | 63  c | 64  d | 65  e | 66  f | 67  g |
| 68  h | 69  i | 6A  j | 6B  k | 6C  l | 6D  m | 6E  n | 6F  o |
| 70  p | 71  q | 72  r | 73  s | 74  t | 75  u | 76  v | 77  w |
| 78  x | 79  y | 7A  z | 7B  { | 7C  | | 7D  } | 7E  ~ | 7F DEL|
.cs R
.LP
.br
.ne 20
.I Decimal \(em Character
.LP
.cs R 22
|  0 NUL|  1 SOH|  2 STX|  3 ETX|  4 EOT|  5 ENQ|  6 ACK|  7 BEL|
|  8 BS |  9 HT | 10 NL | 11 VT | 12 NP | 13 CR | 14 SO | 15 SI |
| 16 DLE| 17 DC1| 18 DC2| 19 DC3| 20 DC4| 21 NAK| 22 SYN| 23 ETB|
| 24 CAN| 25 EM | 26 SUB| 27 ESC| 28 FS | 29 GS | 30 RS | 31 US |
| 32 SP | 33  ! | 34  " | 35  # | 36  $ | 37  % | 38  & | 39  \' |
| 40  ( | 41  ) | 42  * | 43  + | 44  , | 45  \- | 46  . | 47  / |
| 48  0 | 49  1 | 50  2 | 51  3 | 52  4 | 53  5 | 54  6 | 55  7 |
| 56  8 | 57  9 | 58  : | 59  ; | 60  < | 61  = | 62  > | 63  ? |
| 64  @ | 65  A | 66  B | 67  C | 68  D | 69  E | 70  F | 71  G |
| 72  H | 73  I | 74  J | 75  K | 76  L | 77  M | 78  N | 79  O |
| 80  P | 81  Q | 82  R | 83  S | 84  T | 85  U | 86  V | 87  W |
| 88  X | 89  Y | 90  Z | 91  [ | 92  \\ | 93  ] | 94  ^ | 95  _ |
| 96  \` | 97  a | 98  b | 99  c |100  d |101  e |102  f |103  g |
|104  h |105  i |106  j |107  k |108  l |109  m |110  n |111  o |
|112  p |113  q |114  r |115  s |116  t |117  u |118  v |119  w |
|120  x |121  y |122  z |123  { |124  | |125  } |126  ~ |127 DEL|
.cs R
.fi
.SH FILES
.PD 0
.TP 20
.B /usr/pub/ascii
Online chart of octal and hexadecimal values for the
.SM ASCII
character set.
tion of the trade before doing it.
.TP
.B resign:
Resign to another player or the bank.
If you resign to the bank, all property reverts to its virgin state,
./share/man/man7/eqnchar.7                                                                             755       0      12        11511  4424741560  10445                                                                                                                                                                                                                                                                                                                                                                      '\" e
.\" @(#)eqnchar.7 1.13 89/03/26 SMI; from UCB 4.2
.EQ
tdefine ciplus % "\o'\(pl\(ci'" %
ndefine ciplus % O+ %
tdefine citimes % "\o'\(mu\(ci'" %
ndefine citimes % Ox %
tdefine =wig % "\(eq\h'-\w'\(eq'u-\w'\s-2\(ap'u/2u'\v'-.4m'\s-2\z\(ap\(ap\s+2\v'.4m'\h'\w'\(eq'u-\w'\s-2\(ap'u/2u'" %
ndefine =wig % ="~" %
tdefine bigstar % "\o'\(pl\(mu'" %
ndefine bigstar % X|- %
tdefine =dot % "\z\(eq\v'-.6m'\h'.2m'\s+2.\s-2\v'.6m'\h'.1m'" %
ndefine =dot % = dot %
tdefine orsign % "\s-2\v'-.15m'\z\e\e\h'-.05m'\z\(sl\(sl\v'.15m'\s+2" %
ndefine orsign % \e/ %
tdefine andsign % "\s-2\v'-.15m'\z\(sl\(sl\h'-.05m'\z\e\e\v'.15m'\s+2" %
ndefine andsign % /\e %
tdefine =del % "\v'.3m'\z=\v'-.6m'\h'.3m'\s-1\(*D\s+1\v'.3m'" %
ndefine =del % = to DELTA %
tdefine oppA % "\s-2\v'-.15m'\z\e\e\h'-.05m'\z\(sl\(sl\v'-.15m'\h'-.75m'\z-\z-\h'.2m'\z-\z-\v'.3m'\h'.4m'\s+2" %
ndefine oppA % V- %
tdefine oppE %"\s-3\v'.2m'\z\(em\v'-.5m'\z\(em\v'-.5m'\z\(em\v'.55m'\h'.9m'\z\(br\z\(br\v'.25m'\s+3" %
ndefine oppE % E/ %
tdefine incl % "\s-1\z\(or\h'-.1m'\v'-.45m'\z\(em\v'.7m'\z\(em\v'.2m'\(em\v'-.45m'\s+1" %
ndefine incl % C_ %
tdefine nomem % "\o'\(mo\(sl'" %
ndefine nomem % C-/ %
tdefine angstrom % "\fR\zA\v'-.3m'\h'.2m'\(de\v'.3m'\fP\h'.2m'" %
ndefine angstrom % A to o %
tdefine star %{ roman "\v'.5m'\s+3*\s-3\v'-.5m'"}%
ndefine star % * %
tdefine || % \(or\(or %
tdefine <wig % "\z<\v'.4m'\(ap\v'-.4m'" %
ndefine <wig %{ < from "~" }%
tdefine >wig % "\z>\v'.4m'\(ap\v'-.4m'" %
ndefine >wig %{ > from "~" }%
tdefine langle % "\s-3\b'\(sl\e'\s0" %
ndefine langle %<%
tdefine rangle % "\s-3\b'\e\(sl'\s0" %
ndefine rangle %>%
tdefine hbar % "\zh\v'-.6m'\h'.05m'\(ru\v'.6m'" %
ndefine hbar % h\u-\d %
ndefine ppd % _| %
tdefine ppd % "\o'\(ru\s-2\(or\s+2'" %
tdefine <-> % "\o'\(<-\(->'" %
ndefine <-> % "<-->" %
tdefine <=> % "\s-2\z<\v'.05m'\h'.2m'\z=\h'.55m'=\h'-.6m'\v'-.05m'>\s+2" %
ndefine <=> % "<=>" %
tdefine |< % "\o'<\(or'" %
ndefine |< % <| %
tdefine |> % "\o'>\(or'" %
ndefine |> % |> %
tdefine ang % "\v'-.15m'\z\s-2\(sl\s+2\v'.15m'\(ru" %
ndefine ang % /_ %
tdefine rang % "\z\(or\h'.15m'\(ru" %
ndefine rang % L %
tdefine 3dot % "\v'-.8m'\z.\v'.5m'\z.\v'.5m'.\v'-.2m'" %
ndefine 3dot % .\u.\u.\d\d %
tdefine thf % ".\v'-.5m'.\v'.5m'." %
ndefine thf % ..\u.\d %
tdefine quarter % roman \(14 %
ndefine quarter % 1/4 %
tdefine 3quarter % roman \(34 %
ndefine 3quarter % 3/4 %
tdefine degree % \(de %
ndefine degree % nothing sup o %
tdefine square % \(sq %
ndefine square % [] %
tdefine circle % \(ci %
ndefine circle % O %
tdefine blot % "\fB\(sq\fP" %
ndefine blot % HIX %
tdefine bullet % \(bu %
ndefine bullet % oxe %
tdefine -wig % "\(~=" %
ndefine -wig % - to "~" %
tdefine wig % \(ap %
ndefine wig % "~" %
tdefine prop % \(pt %
ndefine prop % oc %
tdefine empty % \(es %
ndefine empty % O/ %
tdefine member % \(mo %
ndefine member % C- %
tdefine cup % \(cu %
ndefine cup % U %
define cap % \(ca %
define subset % \(sb %
define supset % \(sp %
define !subset % \(ib %
define !supset % \(ip %
.EN
.TH EQNCHAR 7 "9 September 1987"
.UC
.SH NAME
eqnchar \- special character definitions for eqn
.SH SYNOPSIS
.B eqn /usr/pub/eqnchar
.RI [ " filename " ]
.B  \(bv troff
.RI [ " options " ]
.LP
.B neqn /usr/pub/eqnchar
.RI [ " filename " ]
.B \(bv nroff
.RI [ " options " ]
.IX  "eqnchar file"  ""  "\fLeqnchar\fP \(em special characters for equations"
.IX  "special characters for equations"  ""  "special characters for equations \(em \fLeqnchar\fP"
.IX  "characters for equations"  ""  "characters for equations \(em \fLeqnchar\fP"
.IX  "document production"  eqnchar  ""  "\fLeqnchar\fP \(em special characters for equations"
.SH DESCRIPTION
.B eqnchar
contains
.BR troff (1)
and
.BR nroff (1)
character definitions for constructing characters that are not
available on the Graphic Systems typesetter.
These definitions are primarily intended for use with
.BR eqn (1)
and
.BR neqn (1).
It contains definitions for the following characters
.LP
.nf
.ta \w'angstrom  'u \n(.lu/3u +\w'angstrom  'u \n(.lu*2u/3u +\w'angstrom  'u
.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
"<wig"	<wig	"<->"	<->	"empty"	empty
.EN
.EQ
"=wig"	=wig	"<=>"	<=>	"member"	member
.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
.EN
.SH FILES
.PD 0
.TP 20
.B /usr/pub/eqnchar
.PD
.SH SEE ALSO
.BR eqn (1),
.BR neqn (1),
.BR nroff (1),
.BR troff (1)
E| 17 DC1| 18 DC2| 19 DC3| 20 DC4| 21 NAK| 22 SYN| 23 ETB|
| 24 CAN| 25 EM | 26 SUB| 27 ESC| 28 FS | 29 GS | 30 RS | 31 US |
| 32 SP | 33  ! | 34  " | 35  # | 36  $ | 37  % | 38  & | ./share/man/man7/filesystem.7                                                                          755       0      12        22677  4424741560  11227                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)filesystem.7 1.13 89/03/26 SMI
.TH FILESYSTEM 7 "10 January 1988"
.SH NAME
filesystem \- file system organization
.SH SYNOPSIS
.ft B
.nf
/
/usr
.ft R
.fi
.SH DESCRIPTION
.IX "filesystem" "" "file system organization"
.IX "filesystem" "" "file system layout"
.LP
The Sun\s-1OS\s0 file system tree is organized for easy administration.
Distinct areas within the file system tree are provided for files that
are private to one machine, files that can be shared by multiple
machines of a common architecture, files that can be shared
by all machines, and home directories.
This organization allows the sharable files to be stored
on one machine, while being accessed by many machines using a
remote file access mechanism such as Sun's Network File System
(\s-1NFS\s0).
Grouping together similar files makes the
file system tree easier to upgrade and manage.
.LP
The file system tree consists of a root file system and a collection
of mountable file systems.
The
.BR mount (8)
program attaches mountable file systems to the
file system tree at mount points (directory entries)
in the root file system, or other previously mounted file systems.
Two file systems,
.B /
(the root) and
.BR /usr ,
must be mounted in order to have a fully functional system.
The root file system is mounted automatically by the kernel at boot time; the
.B /usr
file system is mounted by the
.B /etc/rc.boot
script, which is run as part of the booting process.
.LP
The root file system contains files that are unique
to each machine;
it can not be shared among machines.
The root file system contains the following directories:
.TP 10
.B /dev
Character and block special files.  Device files provide hooks into
hardware devices or operating system facilities.  The
.BR \s-1MAKEDEV\s0 (8)
command builds device files in the
.B /dev
directory.
Typically, device files are built to match the kernel and hardware
configuration of the machine.
.TP
.B /etc
Various configuration files and system administration databases
that are machine specific.
You can think of
.B /etc
as the \(lqhome directory\(rq of a machine, defining its \(lqidentity.\(rq
Executable programs are no longer kept in
.BR /etc .
.TP
.B /home
Mount points for home directories.
This directory may be arranged so that shared user files are placed under
the directory
.BI /home/ machine-name
on machines serving as file servers.
Machines may then be locally configured with mount points under
.B /home
for all of the file servers of interest,
with the name of the mount point being the name of the file server.
.TP
.B /mnt
A generic mount point.
This is an empty directory available for temporarily mounting
file systems on.
.TP
.B /sbin
Executable programs that are needed in the
boot process before
.B /usr
is mounted.
.B /sbin
contains
.I only
those programs that are needed in order to
mount the
.B /usr
file system:
.BR hostname (1),
.BR ifconfig (8C),
.BR init (8),
.BR mount (8),
and
.BR sh (1).
After
.B /usr
is mounted, the full complement of utilities are available.
.TP
.B /tmp
Temporary files that are deleted at reboot time.
.TP
.B /var
Files, such as log files, that are unique to a machine but that can grow to
an arbitrary (\(lqvariable\(rq) size.
.TP
.B /var/adm
System logging and accounting files.
.TP
.B /var/preserve
Backup files for
.BR vi (1)
and
.BR ex (1).
.TP
.B /var/spool
Subdirectories for files used in printer spooling, mail delivery,
.BR cron (8),
.BR at (1),
etc.
.TP
.B /var/tmp
Transitory files that are not deleted at reboot time.
.LP
Because it is desirable to keep the root file system small,
larger file systems are often mounted on
.BR /var
and
.BR /tmp .
.LP
The file system mounted on
.B /usr
contains architecture-dependent and architecture-independent shareable files.
The subtree rooted at
.B /usr/share
contains architecture-independent shareable files;
the rest of the
.B /usr
tree contains architecture-dependent files.
By mounting a common remote file system,
a group of machines with a common architecture
may share a single
.B /usr
file system.
A single
.B /usr/share
file system can be shared by machines of any architecture.
A machine acting as a file server may export many different
.B /usr
file systems to support several different architectures
and operating system releases.
Clients usually mount
.B /usr
read-only to prevent their accidentally modifying any shared files.
The
.B /usr
file system contains the following subdirectories:
.TP 25
.B /usr/5bin
System V executables.
.TP
.B /usr/5include
System V include files.
.TP
.B /usr/5lib
System V library files.
.TP
.B /usr/bin
Executable programs.  The bulk of the system utilities are located here.
.TP
.B /usr/dict
Dictionary databases.
.TP
.B /usr/etc
Executable system administration programs.
.TP
.B /usr/games
Executable game programs and data.
.TP
.B /usr/include
Include files.
.TP
.B /usr/lib
Program libraries and various architecture-dependent databases.
.TP
.B /usr/pub
Various data files.
.TP
.B /usr/ucb
Executable programs descended from the Berkeley Software Distribution.
.TP
.B /usr/share
Subtree for architecture-independent shareable files.
.TP
.B /usr/share/man
Subdirectories for the on-line reference manual pages.
.TP
.B /usr/share/lib
Architecture-independent databases.
.LP
A machine with disks may export root file systems, swap files
and 
.B /usr
file systems to diskless or partially-disked machines,
which mount these into the standard file system hierarchy.
The standard directory tree for exporting these
file systems is:
.TP 25
.B /export
The root of the exported file system tree.
.TP
.BI /export/exec/ architecture-name
The exported 
.B /usr
file system supporting
.I architecture-name
for the current release.
.TP
.BI /export/exec/ architecture-name . release-name
The exported
.B /usr
file system supporting 
.I architecture-name
for Sun\s-1OS\s0
.IR release-name .
.TP
.B /export/share
The exported common
.B /usr/share
directory tree.
.TP
.BI /export/root/ hostname
The exported root file system for
.IR hostname .
.TP
.BI /export/swap/ hostname
The exported swap file for
.IR hostname .
.TP
.BI /export/var/ hostname
The exported
.B /var
directory tree for
.IR hostname .
.TP
.BI /export/dump/ hostname
The exported dump file for
.IR hostname .
.TP
.BI /export/crash/ hostname
The exported crash dump directory for
.IR hostname .
.SS "Changes from Previous Releases"
.LP
The file system layout described here is quite a bit different
from the layout employed previous to release 4.0 of Sun\s-1OS\s0.
For compatibility with earlier releases of Sun\s-1OS\s0,
and other versions of the
.SM UNIX
system, symbolic links are provided for various files and directories
linking their previous names to their current locations.
The symbolic links provided include:
.TP 25
.BR /bin " \(em> " /usr/bin
All programs previously located in
.B /bin
are now in
.BR /usr/bin .
.TP
.BR /lib " \(em> " /usr/lib
All files previously located in
.B /lib
are now in
.BR /usr/lib .
.TP
.BR /usr/adm " \(em> " /var/adm
The entire
.B /usr/adm
directory has been moved to
.BR /var/adm .
.TP
.BR /usr/spool " \(em> " /var/spool
The entire
.B /usr/spool
directory has been moved to
.BR /var/spool .
.TP
.BR /usr/tmp " \(em> " /var/tmp
The
.B /usr/tmp
directory has been moved to
.BR /var/tmp .
.LP
.BR /etc/termcap " \(em> " /usr/share/lib/termcap
.LP
.BR /usr/5lib/terminfo " \(em> " /usr/share/lib/terminfo
.LP
.BR /usr/lib/me " \(em> " /usr/share/lib/me
.LP
.BR /usr/lib/ms " \(em> " /usr/share/lib/ms
.LP
.BR /usr/lib/tmac " \(em> " /usr/share/lib/tmac
.LP
.BR /usr/man " \(em> " /usr/share/man
.LP
The following program binaries have been moved from
.B /etc
to
.B /usr/etc
with symbolic links to them left in
.BR /etc :
.BR arp ,
.BR clri ,
.BR cron ,
.BR chown ,
.BR chroot ,
.BR config ,
.BR dkinfo ,
.BR dmesg ,
.BR dump ,
.BR fastboot ,
.BR fasthalt ,
.BR fsck ,
.BR halt ,
.BR ifconfig ,
.BR link ,
.BR mkfs ,
.BR mknod ,
.BR mount ,
.BR ncheck ,
.BR newfs ,
.BR pstat ,
.BR rdump ,
.BR reboot ,
.BR renice ,
.BR restore ,
.BR rmt ,
.BR rrestore ,
.BR shutdown ,
.BR umount ,
.BR update ,
.BR unlink ,
and
.BR vipw .
.LP
In addition, some files and directories
have been moved with no symbolic link left
behind in the old location:
.LP
.RS
.TP 20
.I Old Name
.I New Name
.TP
.B /etc/biod
.B /usr/etc/biod
.TP 
.B /etc/fsirand
.B /usr/etc/fsirand
.TP 
.B /etc/getty
.B /usr/etc/getty
.TP 
.B /etc/in.rlogind
.B /usr/etc/in.rlogind
.TP
.B /etc/in.routed
.B /usr/etc/in.routed
.TP
.B /etc/in.rshd
.B /usr/etc/in.rshd
.TP
.B /etc/inetd
.B /usr/etc/inetd
.TP
.B /etc/init
.B /usr/etc/init
.TP
.B /etc/nfsd
.B /usr/etc/nfsd
.TP
.B /etc/portmap
.B /usr/etc/portmap
.TP
.B /etc/rpc.lockd
.B /usr/etc/rpc.lockd
.TP
.B /etc/rpc.statd
.B /usr/etc/rpc.statd
.TP
.B /etc/ypbind
.B /usr/etc/ypbind
.TP
.B /usr/lib/sendmail.cf
.B /etc/sendmail.cf
.TP
.B /usr/preserve
.B /var/preserve
.TP
.B /usr/lib/aliases
.B /etc/aliases
.TP
.B /stand
.B /usr/stand
.TP
.B /etc/yp
.B /var/yp
.RE
.LP
Note: with this new file system organization, the approach to
repairing a broken file system changes.
One must mount
.B /usr
before doing an
.BR fsck (8),
for example.
If the mount point for
.B /usr
has been destroyed,
.B /usr
can be mounted temporarily on
.B /mnt
or
.BR /tmp .
If the root file system on a standalone system
is so badly damaged that none of these
mount points exist,
or if
.B /sbin/mount
has been corrupted, the only way to repair it may be
to re-install the root file system.
.SH "SEE ALSO"
.BR at (1),
.BR ex (1),
.BR hostname (1),
.BR sh (1),
.BR vi (1),
.BR intro (4),
.BR nfs (4P),
.BR hier (7),
.BR ifconfig (8C),
.BR init (8),
.BR \s-1MAKEDEV\s0 (8),
.BR mount (8),
.BR fsck (8),
.BR rc (8)
e available.
.TP
.B /tmp
Temporary files that are deleted at rebo./share/man/man7/hier.7                                                                                755       0      12        23357  4424741561   7767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)hier.7 1.31 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH HIER 7 "10 January 1988"
.SH NAME
hier \- file system hierarchy
.SH DESCRIPTION
.IX "hier table" "" "\fLhier\fP, file system hierarchy"
.LP
The following outline gives a quick tour through a typical
SunOS file system hierarchy:
.LP
.na
.nh
.PD 0
.TP
.B /
root directory of the file system
.TP
.B /dev/
devices (Section 4)
.
.RS
.TP
.SB MAKEDEV
shell script to create special files
.TP
.B \s-1MAKEDEV\s0.local
site specific part of
.SB MAKEDEV
.TP
.B console
main system console,
.BR console (4S)
.TP
.B drum
paging device,
.BR drum (4)
.TP
.B *mem
memory special files,
.BR mem (4S)
.TP
.B null
null file or data sink,
.BR null (4)
.TP
.B pty[p-z]*
pseudo terminal controllers,
.BR pty (4)
.TP
.B tty[ab]
CPU serial ports,
.BR zs (4S)
.TP
.B tty[0123][0-f]
MTI serial ports
.BR mti (4S)
.TP
.B tty[hijk][0-f]
ALM-2 serial ports
.BR mcp (4S)
.TP
.B tty[p-z]*
pseudo terminals,
.BR pty (4)
.TP
.B vme*
VME bus special files,
.BR mem (4S)
.TP
.B win
window system special files,
.BR win (4S)
.TP
.B xy*
disks,
.BR xy (4S)
.TP
.B rxy*
raw disk interfaces,
.BR xy (4S)
.TP
\&.\|.\|.
.RE
.
.TP
.B /etc/
system-specific maintenance and data files
.
.RS
.TP
.B dumpdates
dump history,
.BR dump (8)
.TP
.B exports
table of file systems exportable with NFS,
.BR exports (5)
.TP
.B fstab
file system configuration table,
.BR fstab (5)
.TP
.B group
group file,
.BR group (5)
.TP
.B hosts
host name to network address mapping file,
.BR hosts (5)
.TP
.B hosts.equiv
list of trusted systems,
.BR hosts.equiv (5)
.TP
.B motd
message of the day,
.BR login (1)
.TP
.B mtab
mounted file table,
.BR mtab (5)
.TP
.B networks
network name to network number mapping file,
.BR networks (5)
.TP
.B passwd
password file,
.BR passwd (5)
.TP
.B phones
private phone numbers for remote hosts, as described in
.BR phones (5)
.TP
.B printcap
table of printers and capabilities,
.BR printcap (5)
.TP
.B protocols
protocol name to protocol number mapping file,
.BR protocols (5)
.TP
.B rc
shell program to bring the system up multiuser
.TP
.B rc.boot
startup file run at boot time
.TP
.B rc.local
site dependent portion of 
.B rc
.TP
.B remote
names and description of remote hosts for 
.BR tip (1C),
.BR remote (5)
.TP
.B services
network services definition file,
.BR services (5)
.TP
.B ttytab
database of terminal information used by
.BR getty (8)
.TP
\&.\|.\|.
.RE
.br
.ne 5
.TP
.B /export/
directory of exported files and file systems for clients, including
swap files, root, and
.B /usr
file systems
.TP
.B /home/
directory of mount points for remote-mounted home directories and
shared file systems
.
.RS
.TP
.I user
home (initial working) directory for
.I user
.
.RS
.TP
.B .profile
set environment for
.BR sh (1),
.BR environ (5V)
.TP
.B .project
what you are doing (used by
.RB ( finger (1))
.TP
.B .cshrc
startup file for
.BR csh (1)
.TP
.B .exrc
startup file for
.BR ex (1)
.TP
.B .plan
what your short-term plans are (used by
.BR finger (1))
.TP
.B .rhosts
host equivalence file for 
.BR rlogin (1C)
.TP
.B .mailrc
startup file for
.BR mail (1)
.TP
.B calendar
user's datebook for
.BR calendar (1)
.TP
\&.\|.\|.
.RE
.
.RE
.
.TP
.B /lost+found
directory for connecting detached files for
.BR fsck (8)
.TP
.B /mnt/
mount point for file systems mounted temporarily
.TP
.B /sbin/
executable programs needed to mount 
.B /usr/
.RS
.TP
.B hostname
.TP
.B ifconfig
.TP
.B init
.TP
.B mount
.TP
.B sh
.RE
.TP
.B /tmp/
temporary files, usually on a fast device, see also
.B /var/tmp/
.
.RS
.TP
.B ctm*
used by 
.BR cc (1V)
.TP
.B e*
used by
.BR ed (1)
.TP
\&.\|.\|.
.RE
.
.TP
.B /var/
directory of files that tend to grow or vary in size
.
.RS
.TP
.B adm/
administrative log files
.
.RS
.TP
.B lastlog
record of recent logins,
.BR utmp (5)
.TP
.B lpacct
line printer accounting
.BR lpr (1)
.TP
.B messages
system messages
.TP
.B tracct
phototypesetter accounting,
.BR troff (1)
.TP
.B utmp
table of currently logged in users,
.BR utmp (5)
.TP
.B "vaacct, vpacct"
varian and versatec accounting
.BR vtroff (1),
.BR pac (8)
.TP
.B wtmp
login history,
.BR utmp (5)
.TP
\&.\|.\|.
.RE
.
.TP
.B preserve/
editor temporaries preserved here after crashes/hangups
.TP
.B spool/
delayed execution files
.
.RS
.TP
.B cron/
used by 
.BR cron (8)
.TP
.B lpd/
used by
.BR lpr (1)
.
.RS
.TP
.B lock
present when line printer is active
.TP
.B cf*
copy of file to be printed, if necessary
.TP
.B df*
control file for print job
.TP
.B tf*
transient control file, while 
.I lpr
is working
.RE
.
.TP
.B mail/
mailboxes for
.BR mail (1)
.
.RS
.TP
.I name
mail file for user
.I name
.TP
.IB name .lock
lock file while
.I name
is receiving mail
.RE
.
.TP
.B mqueue/
mail queue for 
.BR sendmail (8)
.br
.ne 5
.TP
.B secretmail/
like
.BR mail/ ,
but used by
.BR xsend (1)
.TP
.B uucp/
work files and staging area for 
.BR uucp (1C)
.
.RS
.TP
.SB LOGFILE
summary log
.TP
.SB LOG\s0.*
log file for one transaction
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B tmp/
temporary files, to keep 
.B /tmp/ 
small
.
.RS
.TP
.B raster
used by
.BR plot (1G)
.TP
.B stm*
used by
.BR sort (1V)
.TP
\&.\|.\|.
.RE
.
.TP
.B yp/
Yellow Pages database files,
.BR ypfiles (5)
.RE
.
.TP
.B /usr/
general-purpose directory, usually a mounted file system
.
.RS
.TP
.B bin/
utility programs
.
.RS
.TP
.B as
assembler,
.BR as (1)
.TP
.B cc
C compiler executive, c.f. 
.BR /usr/lib/ccom , 
.BR /usr/lib/cpp , 
.B /usr/lib/c2
.TP
.B csh
the C-shell,
.BR csh (1)
.TP
.B sh
the Bourne shell,
.BR sh (1)
.TP
\&.\|.\|.
.RE
.
.TP
.B demo/
demonstration programs
.TP
.B diag/
system tests and diagnostics
.TP
.B dict/
word lists, etc.
.
.RS
.TP
.B spellhist
history file for
.BR spell (1)
.TP
.B words
principal word list, used by
.BR look (1)
.TP
\&.\|.\|.
.RE
.
.TP
.B etc/
system administration programs; c.f. section 8
.
.RS
.TP
.B catman
update preformatted man pages,
.BR catman (8)
.TP
.B cron
the clock daemon,
.BR cron (8)
.TP
.B dump
file system backup program
.BR dump (8)
.TP
.B getty
part of
.BR login (1),
.BR getty (8)
.TP
.B in.comsat
biff server (incoming mail daemon),
.BR comsat (8C)
.TP
.B init
the parent of all processes,
.BR init (8)
.TP
.B mount
.BR mount (8)
.TP
.B yp/
Yellow Pages programs
.
.RS
.TP
.B ypinit
build and install Yellow Pages database,
.BR ypinit (8)
.TP
.B yppush
force propagation of a changed Yellow Pages map,
.BR yppush (8)
.TP
.B ypset
point ypbind at a particular server,
.BR ypset (8)
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B games/
.
.RS
.TP
.B backgammon
.TP
.B lib/
library directory for game scores, etc.
.
.RS
.TP
.B quiz.k/
what
.BR quiz (6)
knows
.
.RS
.TP
.B africa
countries and capitals
.TP
.B index
category index
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B hosts/
symbolic links to 
.BR rsh (1C)
for commonly accessed remote hosts
.TP
.B include/
standard 
.B #include
files
.
.RS
.TP
.B a.out.h
object file layout,
.BR a.out (5)
.TP
.B images/
icon images
.TP
.B machine/
header files from 
.BR /usr/share/sys/sys/machine ;
may be a symbolic link
.TP
.B math.h
.BR intro (3M)
.TP
.B net/
header files from 
.BR /usr/share/sys/sys/net ; 
may be a symbolic link
.TP
.B nfs/
header files used in the Network File System (NFS)
.TP
.B stdio.h
standard I/O,
.BR intro (3S)
.TP
.B sys/
kernel header files, c.f. 
.B /usr/share/sys/sys
.TP
\&.\|.\|.
.RE
.
.TP
.B lib/
object libraries, compiler program binaries, and other data
.
.RS
.TP
.B ccom
C compiler proper
.TP
.B cpp
C preprocessor
.TP
.B c2
C code improver
.TP
.B eign
list of English words to be ignored by
.BR ptx (1)
.TP
.B font/
fonts for
.BR troff (1)
.
.RS
.TP
.B ftR
Times Roman
.TP
.B ftB
Times Bold
.TP
\&.\|.\|.
.RE
.
.TP
.B libc.a
system calls, standard I/O, etc. (2,3,3S)
.TP
.B libm.a
math library,
.BR intro (3M)
.TP
.B lint/
utility files for lint
.
.RS
.TP
.B lint[12]
subprocesses for
.BR lint (1V)
.TP
.B llib-lc
dummy declarations for 
.BR /usr/lib/libc.a ,
used by
.BR lint (1V)
.TP
.B llib-lm
dummy declarations for
.B /usr/lib/libm.a
.TP
\&.\|.\|.
.RE
.
.TP
.B units
conversion tables for
.BR units (1)
.TP
.B uucp/
programs and data for
.BR uucp (1C)
.
.RS
.TP
.B L.sys
remote system names and numbers
.TP
.B uucico
the real copy program
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B local/
locally maintained software
.TP
.B old/
obsolete and unsupported programs
.TP
.B pub/
publicly readable data files
.TP
.B sccs/
binaries of programs that compose the source code control system (SCCS)
.TP
.B src/
system source code tree
.TP
.B stand/
standalone programs (not run under the Sun Operating System)
.TP
.B share/
architecture independent files
.
.RS
.TP
.B lib/
architecture independent data files
.RS
.TP
.B termcap
description of terminal capabilities,
.BR termcap (5)
.TP
.B tmac/
macros for
.BR troff (1)
.
.RS
.TP
.B tmac.an
macros for
.BR man (7)
.TP
.B tmac.s
macros for
.BR ms (7)
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.TP
.B man/
on-line reference manual pages,
.BR man (1)
.
.RS
.TP
.B man?/
source files
.RB ( nroff (1))
for sections 1 through 8 of the manual
.
.RS
.TP
.B as.1
.TP
\&.\|.\|.
.RE
.
.TP
.B cat?/
preformatted pages for sections 1 through 8 of the manual
.TP
\&.\|.\|.
.RE
.TP
.B sys/
SunOS kernel source and object modules
.RE
.
.TP
.B ucb/
binaries of programs developed at the University of California,
Berkeley
.
.RS
.TP
.B ex
line-oriented editor for experienced users,
.BR ex (1)
.TP
.B vi
screen-oriented editor,
.BR vi (1)
.TP
\&.\|.\|.
.RE
.
.RE
.
.TP
.B /vmunix
the SunOS kernel binary
.ad
.PD
.SH SEE ALSO
.BR filesystem (7),
.BR find (1),
.BR finger (1),
.BR grep (1V),
.BR ls (1V),
.BR rlogin (1C),
.BR whatis (1),
.BR whereis (1),
.BR which (1),
.BR ncheck (8)
.SH BUGS
.LP
The locations of files are subject to change without notice;
the organization of your file system may vary.
.LP
This list is incomplete.
alendar (1)
.TP
\&.\|.\|.
.RE
.
.RE
.
.TP
.B /lost+found
directory for connecting detached files for
.BR fsck (8)
.TP
.B /mnt/
mount point for file systems mounted temporarily
.TP
.B /sbin/
executable programs needed to mount 
.B /usr/
.RS
.TP
.B hostname
.TP
.B ifconfig
../share/man/man7/intro.7                                                                               755       0      12           64  4424741561  10101                                                                                                                                                                                                                                                                                                                                                                      .so man7/Intro.7
.\" @(#)intro.7 1.5 89/03/26 SMI; 
man.7       >  me.7        ?  misc.7      @  ms.7 7 
countries and capitals
.TP
.B index
category index
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B hosts/
symbolic links to 
.BR rsh (1C)
for commonly accessed remote hosts
.TP
.B include/
standard 
.B #include
files
.
.RS
.TP
.B a.out.h
object file layout,
.BR a.out (5)
.TP
.B images/
icon images
.TP
.B machine/
header files from 
.BR /usr/share/sys/sys/machine ;
may b./share/man/man7/list.7                                                                                755       0      12           62  4424741560   7716                                                                                                                                                                                                                                                                                                                                                                      .so man7/List.7
.\" @(#)list.7 1.4 89/03/26 SMI; 
 me.7        ?  misc.7      @  ms.7 7      @  ms.7 7 
countries and capitals
.TP
.B index
category index
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
\&.\|.\|.
.RE
.
.TP
.B hosts/
symbolic links to 
.BR rsh (1C)
for commonly accessed remote hosts
.TP
.B include/
standard 
.B #include
files
.
.RS
.TP
.B a.out.h
object file layout,
.BR a.out (5)
.TP
.B images/
icon images
.TP
.B machine/
header files from 
.BR /usr/share/sys/sys/machine ;
may b./share/man/man7/man.7                                                                                 755       0      12        16056  4424741561   7611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)man.7 1.27 89/03/26 SMI; from UCB 4.2
.TH MAN 7 "22 March 1989"
.SH NAME
man \- macros to format Reference Manual pages
.SH SYNOPSIS
.B nroff  \-man
.IR filename .\|.\|.
.LP
.B troff  \-man
.IR filename .\|.\|.
.IX  "man file"  ""  "\fL\-man\fP \(em macros to format manual pages"
.IX  "document production"  "man file"  ""  "\fL\-man\fP \(em macros to format manual pages"
.SH DESCRIPTION
.LP
These macros are used to lay out the reference pages in this manual.
Note: if
.I filename
contains format input for a preprocessor, the
commands shown above must be piped through the
appropriate preprocessor.
This is handled automatically by
.BR man (1).
See
.BR Conventions .
.LP
Any text argument
.I t
may be zero to six words.
Quotes may be used to include
.SM SPACE
characters in a \(lqword\(rq.  If
.I text
is empty, the special treatment is applied to the next input line with
text to be printed.
In this way
.B \&.I
may be used to italicize a whole line, or
.B \&.SB
may be used to make small bold letters.
.LP
A prevailing indent distance is remembered between successive indented
paragraphs, and is reset to default value upon reaching a non-indented
paragraph.  Default units for indents
.I i
are ens.
.LP
Type font and size are reset to default values before each paragraph,
and after processing font and size setting macros.
.LP
These strings are predefined by
.BR \-man :
.RS
.TP
\e*R
.if t `\*R', `(Reg)' in
.if t .B nroff.
.if n `(Reg)', trademark symbol in
.if n .I troff.
.TP
\e*S
Change to default type size.
.RE
.SS Requests
.LP
.sp .5
.DT
.ta +12n; +8n; +10n; +10n
\fIRequest	Cause	If no	Explanation
     	Break	Argument\fR
.sp .5
.ta +8n; +10n; +10n
.TP 12n
.B \&.B \fIt\fR
no	\fIt\fR=n.t.l.*	Text is in bold font.
.PD 0
.TP
.B \&.BI \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating bold and italic.
.TP
.B \&.BR \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating bold and roman.
.TP
.B \&.DT
no	.5i 1i...	Restore default tabs.
.TP
.B \&.HP \fIi\fR
yes	\fIi\fR=p.i.*	Begin paragraph with hanging indent.  Set prevailing indent to \fIi\fR.
.TP
.B \&.I \fIt\fR
no	\fIt\fR=n.t.l.	Text is italic.
.TP
.B \&.IB \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating italic and bold.
.TP
.B \&.IP \fIx i\fR
yes	\fIx\fR=""	Same as \fB.TP\fR with tag \fIx\fR.
.TP
.B \&.IR \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating italic and roman.
.TP
.B \&.IX \fIt\fR
no	-	Index macro, for Sun internal use.
.TP
.B \&.LP
yes	-	Begin left-aligned paragraph.  Set prevailing indent to .5i.
.TP
.B \&.PD \fId\fR
no	\fId\fR=.4v	Set vertical distance between paragraphs.
.TP
.B \&.PP
yes	-	Same as \fB.LP\fR.
.TP
.B \&.RE
yes	-	End of relative indent.  Restores prevailing indent.
.TP
.B \&.RB \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating roman and bold.
.TP
.B \&.RI \fIt\fR
no	\fIt\fR=n.t.l.	Join words, alternating roman and italic.
.TP
.B \&.RS \fIi\fR
yes	\fIi\fR=p.i.	Start relative indent, increase indent by \fIi\fR.  Sets prevailing indent to .5i
		for nested indents.
.TP
.B \&.SB \fIt\fR
no	-	Reduce size of text by 1 point, make text boldface.
.TP
.B \&.SH \fIt\fR
yes	-	Section Heading.
.TP
.B \&.SM \fIt\fR
no	\fIt\fR=n.t.l.	Reduce size of text by 1 point.
.TP
.B \&.SS \fIt\fR
yes	\fIt\fR=n.t.l.	Section Subheading.
.TP
.B \&.TH \fIn s d f m\fR
yes	-	Begin reference page \fIn\fR, of of section \fIs\fR; \fId\fR is the date of the most
		recent change.  If present, \fIf\fR is the left page footer; \fIm\fR is the
		main page (center) header.  Sets prevailing indent and tabs to .5i.
.TP
.B \&.TP \fIi\fR
yes	\fIi\fR=p.i.	Begin indented paragraph, with the tag given on the next text
		line.  Set prevailing indent to \fIi\fR.
.sp .5
.TP
.B \&.TX \fIt \fIp\fR
no	-	Resolve the title abbreviation \fIt\fR; join to punctuation mark (or text) \fIp.\fR
* n.t.l. = next text line; p.i. = prevailing indent
.\" End Requests
.PD
.br
.ne 10
.SS Conventions
.LP
.LP
When formatting a manual page,
.B man
examines the first line to determine whether
it requires special processing.
For example a first line consisting of:
.RS
.sp .5v
.ft B
\&'\e" t
.ft R
.RE
.LP
indicates that the manual page must be run through the
.BR tbl (1)
preprocessor.
.LP
A typical manual page for a SunOS command or function is laid out as
follows:
.TP
.BI \s-1\&.TH " TITLE\s0 \fR[1-8]"
The name of the command or function in upper-case, which serves as
the title of the manual page.
This is followed by the number of
the section in which it appears.
.HP
.SB \&.SH NAME
The name, or list of names, by which the command is called,
followed by a dash and then a one-line summary of the action performed.
All in roman font, this section contains no
.BR troff (1)
commands or escapes, and no macro requests.
It is used to generate the
.BR whatis (1)
database.
.TP
.SB \&.SH SYNOPSIS
.RS
.TP
.B Commands:
.IP
The syntax of the command and its arguments, as typed on the command
line.  When in boldface, a word must be typed exactly as printed.  When
in italics, a word can be replaced with an argument that you supply.
References to bold or italicized items are not capitalized
in other sections, even when they begin a sentence.
.IP
Syntactic symbols appear in roman face:
.RS
.TP
.B [ ]
An argument, when surrounded by brackets
is optional.
.TP
.B |
Arguments separated by a vertical bar are exclusive.
You can supply only one item from such a list.
.TP
.B \&.\|.\|.
Arguments followed by an elipsis can be repeated.
When an elipsis follows a bracketed set, the expression within the
brackets can be repeated.
.RE
.TP
.B Functions:
.IP
If required, the data declaration, or
.B #include
directive, is shown first, followed by the  function declaration.
Otherwise, the function declaration is shown.
.RE
.TP
.SB \&.SH DESCRIPTION
A narrative overview of the command or function's external behavior.
This includes how it interacts with files or data, and how it
handles the standard input, standard output and standard error.
Internals and implementation details are normally omitted.
This section attempts to provide a succinct overview in answer to the
question, "what does it do?"
.IP
Literal text from the synopsis appears in boldface, as do literal
filenames and references to items that appear elsewhere in the 
.TX REFMAN .
Arguments are italicized.
.IP
If a command interprets either subcommands or an input grammar, its
command interface or input grammar is normally described in a
.SM USAGE
section, which follows the
.SM OPTIONS
section.  The 
.SM DESCRIPTION
section only describes the behavior of the command itself, not
that of subcommands.
.TP
.SB \&.SH OPTIONS
The list of options along with a description of how each affects
the command's operation.
.TP
.SB \&.SH FILES
A list of files associated with the command or function.
.TP
.SB \&.SH SEE ALSO
A comma-separated list of related manual pages, followed by
references to other published materials.
.TP
.SB \&.SH DIAGNOSTICS
A list of diagnostic messages and an explanation of each.
.br
.ne 8
.TP
.SB \&.SH BUGS
A description of limitations, known defects, and possible
problems associated with the command or function.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/tmac/tmac.an
.PD
.SH SEE ALSO
.BR man (1),
.BR nroff (1),
.BR troff (1),
.BR whatis (1)
.LP
.TX DOCS .
fIt\fR
no	\fIt\fR=n.t.l.	Reduce size of text by 1 point.
.TP
.B \&.SS \fIt\fR
yes	\fIt\fR=n.t.l.	Section Subheading.
.TP
.B \&.TH \fIn s d f m\fR
yes	-	Begin reference page \fIn\fR, of of section \fIs\fR; \fId\fR is the date of the most
		recent change.  If present, \fIf\fR is the left page footer; \fIm\fR is the
		main page (center) header.  Sets prevailing indent and tabs to .5i.
.TP
.B \&.TP \fIi\fR
yes	\fIi\fR=p.i.	Begin indented paragraph, with the tag give./share/man/man7/me.7                                                                                  755       0      12        13431  4424741561   7431                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)me.7 1.15 89/03/26 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.hc %
.TH ME 7 "9 September 1987"
.SH NAME
me \- macros for formatting papers
.SH SYNOPSIS
.B "nroff \-me"
[ options ]
file ...
.br
.B "troff \-me"
[ options ]
file ...
.IX  "me file"  ""  "\fL\-me\fP \(em macro package"
.IX  "document production"  "me file"  ""  "\fL\-me\fP \(em macro package"
.SH DESCRIPTION
This package of
.B nroff
and
.B troff
macro definitions provides a canned formatting
facility for tech%nical papers in various formats.
When producing 2-column output on a terminal, filter
the output through
.IR  col (1).
.LP
The macro requests are defined below.
Many
.B nroff
and
.B troff
requests are unsafe in conjunction with
this package, however, these requests may be used with
impunity after the first .pp:
.nf
.IP
.ta \w'.sz +n  'u
\&.bp	begin new page
\&.br	break output line here
\&.sp n	insert n spacing lines
\&.ls n	(line spacing) n=1 single, n=2 double space
\&.na	no alignment of right margin
\&.ce n	center next n lines
\&.ul n	underline next n lines
\&.sz +n	add n to point size
.fi
.LP
Output of the
.B eqn,
.B meqn,
.B mefer,
and
.BR tbl (1)
preprocessors
for equations and tables is acceptable as input.
.SH REQUESTS
.tr &.
In the following list,
\*(lqinitialization\*(rq
refers to the first .pp, .lp, .ip, .np, .sh, or .uh macro.
This list is incomplete.
.LP
.ta \w'.eh \'x\'y\'z\'  'u +\w'Initial 'u +\w'Cause 'u
.br
.di x
			\ka
.br
.di
.in \nau
.ti0
Request	Initial	Cause	Explanation
.ti0
	Value	Break
.br
.in \nau
.ti0
\&.(c	-	yes	Begin centered block
.ti0
\&.(d	-	no	Begin delayed text
.ti0
\&.(f	-	no	Begin footnote
.ti0
\&.(l	-	yes	Begin list
.ti0
\&.(q	-	yes	Begin major quote
.ti0
\&.(x\fIx\fR 	-	no	Begin indexed item in index \fIx\fR
.ti0
\&.(z	-	no	Begin floating keep
.ti0
\&.)c	-	yes	End centered block
.ti0
\&.)d	-	yes	End delayed text
.ti0
\&.)f	-	yes	End footnote
.ti0
\&.)l	-	yes	End list
.ti0
\&.)q	-	yes	End major quote
.ti0
\&.)x	-	yes	End index item
.ti0
\&.)z	-	yes	End floating keep
.ti 0
\&.++ \fIm H\fR 	-	no	Define paper section.  \fIm
defines the part of the paper, and can be
.B C
(chapter),
.B A
(appendix),
.B P
(preliminary, for instance, abstract, table of contents, etc.),
.B B
(bibliography),
.B RC
(chapters renumbered from page one each chapter),
or
.B RA
(appendix renumbered from page one).
.ti 0
\&.+c \fIT\fR 	-	yes	Begin chapter (or appendix, etc., as
set by \fB.++\fR).
.I T
is the chapter title.
.ti0
\&.1c	1	yes	One column format on a new page.
.ti0
\&.2c	1	yes	Two column format.
.ti0
\&.EN	-	yes	Space after equation produced by
.B eqn
or
.BR meqn .
.ti0
\&.EQ \fIx y\fR 	-	yes	Precede equation; break out and add space.
Equation number is
.IR y .
The optional argument
.I x
may be
.I I
to indent equation (default),
.I L
to left-adjust the equation, or
.I C
to center the equation.
.ti0
\&.GE	-	yes	End
.I gremlin
picture.
.ti0
\&.GS	-	yes	Begin
.I gremlin
picture.
.ti0
\&.PE	-	yes	End
.I pic
picture.
.ti0
\&.PS	-	yes	Begin
.I pic
picture.
.ti0
\&.TE	-	yes	End table.
.ti0
\&.TH	-	yes	End heading section of table.
.ti0
\&.TS \fIx\fR	-	yes	Begin table; if
.I x
is
.I H
table has repeated heading.
.ti 0
\&.ac \fIA N\fR 	-	no	Set up for
.SM ACM
style output.
.I A
is the Author's name(s),
.I N
is the total number of pages.
Must be given before the first initialization.
.ti0
\&.b \fIx\fR 	no	no	Print
.I x
in boldface; if no argument switch to boldface.
.ti 0
\&.ba \fI+n\fR 	0	yes	Augments the base indent by
.I n.
This indent is used to set the indent on regular text
(like paragraphs).
.ti0
\&.bc	no	yes	Begin new column
.ti0
\&.bi \fIx\fR 	no	no	Print
.I x
in bold italics (nofill only)
.ti0
\&.bu	-	yes	Begin bulleted paragraph
.ti0
\&.bx \fIx\fR	no	no	Print
.I x
in a box (nofill only).
.ti 0
\&.ef  \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set even footer to x  y  z
.ti 0
\&.eh \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set even header to x  y  z
.ti 0
\&.fo \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set footer to x  y  z
.ti 0
\&.hx	-	no	Suppress headers and footers on next page.
.ti0
\&.he \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set header to x  y  z
.ti0
\&.hl	-	yes	Draw a horizontal line
.ti0
\&.i \fIx\fR 	no	no	Italicize
.I x;
if
.I x
missing, italic text follows.
.ti0
\&.ip \fIx y\fR 	no	yes	Start indented paragraph,
with hanging tag
.IR x .
Indentation is
.I y
ens (default 5).
.ti0
\&.lp	yes	yes	Start left-blocked paragraph.
.ti 0
\&.lo	-	no	Read in a file of local macros of the
form
.BI \&.* x.
Must be given before initialization.
.ti0
\&.np	1	yes	Start numbered paragraph.
.ti 0
\&.of \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set odd footer to x  y  z
.ti 0
\&.oh \fI\'x\'y\'z\fR	\'\'\'\'\'	no	Set odd header to x  y  z
.ti 0
\&.pd	-	yes	Print delayed text.
.ti0
\&.pp	no	yes	Begin paragraph.
First line indented.
.ti0
\&.r	yes	no	Roman text follows.
.ti 0
\&.re	-	no	Reset tabs to default values.
.ti 0
\&.sc	no	no	Read in a file of special characters
and diacritical marks.
Must be given before initialization.
.ti0
\&.sh \fIn x\fR 	-	yes	Section head follows,
font automatically bold.
.I n
is level of section,
.I x
is title of section.
.ti 0
\&.sk	no	no	Leave the next page blank.
Only one page is remembered ahead.
.ti0
\&.sm \fIx -	no	Set
.I x
in a smaller pointsize.
.ti 0
\&.sz \fI+n\fR 	10p	no	Augment the point size by
.I n
points.
.ti 0
\&.th	no	no	Produce the paper in thesis format.
Must be given before initialization.
.ti 0
\&.tp	no	yes	Begin title page.
.ti0
\&.u \fIx\fR	-	no	Underline argument (even in
.BR troff ).
(Nofill only).
.ti0
\&.uh	-	yes	Like .sh but unnumbered.
.ti0
\&.xp \fIx\fR 	-	no	Print index
.IR x .
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/tmac/tmac.e
.TP
.B /usr/share/lib/me/*
.PD
.SH "SEE ALSO"
.BR eqn (1),
.BR nroff (1),
.BR troff (1),
.BR refer (1),
.BR tbl (1)
.LP
.TX DOCS
P
.B etc/
system administration programs; c.f. section 8
.
.RS
.TP
.B catman
update preformatted man pages,
.BR catman (8)
.TP
.B cron
the clock daemon,
.BR cron (8)
.TP
.B dump
file system backup program
.BR dump (8)
.TP
.B getty
./share/man/man7/misc.7                                                                                755       0      12           62  4424741561   7677                                                                                                                                                                                                                                                                                                                                                                      .so man7/intro.7
.\" @(#)misc.7 1.4 89/03/26 SMI;
opyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.hc %
.TH ME 7 "9 September 1987"
.SH NAME
me \- macros for formatting papers
.SH SYNOPSIS
.B "nroff \-me"
[ options ]
file ...
.br
.B "troff \-me"
[ options ]
file ...
.IX  "me file"  ""  "\fL\-me\fP \(em macro package"
.IX  "document production"  "me file"  ""  "\fL\-me\f./share/man/man7/ms.7                                                                                  755       0      12        22420  4424741561   7445                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ms.7 1.23 89/03/26 SMI; from UCB 4.2
.TH MS 7 "16 February 1988"
.SH NAME
ms \- text formatting macros
.SH SYNOPSIS
.B nroff\ \-ms
[
.I options
]
.I filename
\&.\|.\|.
.LP
.B troff\ \-ms
[
.I options
] 
.I filename 
\&.\|.\|.
.IX  "ms file"  ""  "\fL\-ms\fP \(em macro package"
.IX  "document production"  "ms file"  ""  "\fL\-ms\fP \(em macro package"
.SH DESCRIPTION
.LP
This package of
.BR nroff (1)
and
.BR troff (1)
macro definitions provides a formatting facility
for various styles of articles, theses, and books.
When producing 2-column output on a terminal or lineprinter,
or when reverse line motions are needed, filter the output through
.BR col (1V).
All external
.B \-ms
macros are defined below.
.LP
Note: this 
.B \-ms
macro package is an extended version written at Berkeley and is a
superset of the standard 
.B \-ms
macro packages as supplied by Bell Labs.  Some of the Bell Labs macros
have been removed; for instance, it is assumed that the user has little
interest in producing headers stating that the memo was generated at
Whippany Labs.
.LP
Many
.B nroff
and
.B troff
requests are unsafe in conjunction with this package.
However, the first four requests below
may be used with impunity after initialization,
and the last two may be used even before initialization:
.LP
.RS
.PD 0
.TP 8
.B \&.bp
begin new page
.TP
.B \&.br
break output line
.TP
.BI \&.sp " n"
insert n spacing lines
.TP
.BI \&.ce " n"
center next n lines
.TP
.BI \&.ls " n"
line spacing:
.IB n =1
single,
.IB n =2
double space
.TP
.B \&.na
no alignment of right margin
.PD
.RE
.LP
Font and point size changes with
.B \ef
and
.B \es
are also allowed; for example,
.B \efIword\efR
will italicize
.IR word .
Output of the
.BR tbl (1),
.BR eqn (1)
and
.BR refer (1)
preprocessors for equations, tables, and references is acceptable as input.
.SH REQUESTS
.if n .in 0
.ds x \fIx\fP
.ds y \fIy\fP
.ds z \fI y\fP
.ds Y \fIx y\fP
.ta \w'MacroNam'u +\w'InitialVal\ \ 'u +\w'Break?\ \ \ \ 'u
.sp .3
.nf
Macro	Initial	Break?	\0 Explanation
Name	Value	Reset?
.sp .3
\fB\s-1\&.AB\fR\s0 \*x	\-	y	begin abstract; if \*x=no do not label abstract
\fB\s-1\&.AE\fR\s0	\-	y	end abstract
\fB\s-1\&.AI\fR\s0	\-	y	author's institution
\fB\s-1\&.AM\fR\s0	\-	n	better accent mark definitions
\fB\s-1\&.AU\fR\s0	\-	y	author's name
\fB\&.B\fR \*x	\-	n	embolden \*x; if no \*x, switch to boldface
\fB\&.B1\fR	\-	y	begin text to be enclosed in a box
\fB\&.B2\fR	\-	y	end boxed text and print it
\fB\s-1\&.BT\fR\s0	date	n	bottom title, printed at foot of page
\fB\s-1\&.BX\fR\s0 \*x	\-	n	print word \*x in a box
\fB\s-1\&.CM\fR\s0	if t	n	cut mark between pages
\fB\s-1\&.CT\fR\s0	\-	y,y	chapter title: page number moved to \s-1CF\s0 (\s-1TM\s0 only)
\fB\s-1\&.DA\fR\s0 \*x	if n	n	force date \*x at bottom of page; today if no \*x
\fB\s-1\&.DE\fR\s0	\-	y	end display (unfilled text) of any kind
\fB\s-1\&.DS\fR\s0 \*Y	I	y	begin display with keep; \*x=I,\|L,\|C,\|B; \*y=indent 
\fB\s-1\&.ID\fR\s0\*z	8n,.5i	y	indented display with no keep; \*y=indent
\fB\s-1\&.LD\fR\s0	\-	y	left display with no keep
\fB\s-1\&.CD\fR\s0	\-	y	centered display with no keep
\fB\s-1\&.BD\fR\s0	\-	y	block display; center entire block
\fB\s-1\&.EF\fR\s0 \*x	\-	n	even page footer \*x (3 part as for \fB.tl\fR)
\fB\s-1\&.EH\fR\s0 \*x	\-	n	even page header \*x (3 part as for \fB.tl\fR)
\fB\s-1\&.EN\fR\s0	\-	y	end displayed equation produced by \fBeqn\fP
\fB\s-1\&.EQ\fR\s0 \*Y	\-	y	break out equation; \*x=L,I,C; \*y=equation number
\fB\s-1\&.FE\fR\s0	\-	n	end footnote to be placed at bottom of page
\fB\s-1\&.FP\fR\s0	\-	n	numbered footnote paragraph; may be redefined
\fB\s-1\&.FS\fR\s0 \*x	\-	n	start footnote; \*x is optional footnote label
\fB\s-1\&.HD\fR\s0	undef	n	optional page header below header margin
\fB\&.I\fR \*x	\-	n	italicize \*x; if no \*x, switch to italics
\fB\s-1\&.IP\fR\s0 \*Y	\-	y,y	indented paragraph, with hanging tag \*x; \*y=indent
\fB\s-1\&.IX\fR\s0 \*Y	\-	y	index words \*x \*y and so on (up to 5 levels)
\fB\s-1\&.KE\fR\s0	\-	n	end keep of any kind
\fB\s-1\&.KF\fR\s0	\-	n	begin floating keep; text fills remainder of page
\fB\s-1\&.KS\fR\s0	\-	y	begin keep; unit kept together on a single page
\fB\s-1\&.LG\fR\s0	\-	n	larger; increase point size by 2
\fB\s-1\&.LP\fR\s0	\-	y,y	left (block) paragraph.
\fB\s-1\&.MC\fR\s0 \*x	\-	y,y	multiple columns; \*x=column width
\fB\s-1\&.ND\fR\s0 \*x	if t	n	no date in page footer; \*x is date on cover
\fB\s-1\&.NH\fR\s0 \*Y	\-	y,y	numbered header; \*x=level, \*x=0 resets, \*x=S sets to \*y
\fB\s-1\&.NL\fR\s0	10p	n	set point size back to normal
\fB\s-1\&.OF\fR\s0 \*x	\-	n	odd page footer \*x (3 part as for \fB.tl\fR)
\fB\s-1\&.OH\fR\s0 \*x	\-	n	odd page header \*x (3 part as for \fB.tl\fR)
\fB\&.P1\fR	if \s-1TM\s0	n	print header on first page
\fB\s-1\&.PP\fR\s0	\-	y,y	paragraph with first line indented
\fB\s-1\&.PT\fR\s0	- % -	n	page title, printed at head of page
\fB\s-1\&.PX\fR\s0 \*x	\-	y	print index (table of contents); \*x=no suppresses title
\fB\s-1\&.QP\fR\s0	\-	y,y	quote paragraph (indented and shorter)
\fB\&.R\fR	on	n	return to Roman font
\fB\s-1\&.RE\fR\s0	5n	y,y	retreat: end level of relative indentation
\fB\s-1\&.RP\fR\s0 \*x	\-	n	released paper format; \*x=no stops title on first page
\fB\s-1\&.RS\fR\s0	5n	y,y	right shift: start level of relative indentation
\fB\s-1\&.SH\fR\s0	\-	y,y	section header, in boldface
\fB\s-1\&.SM\fR\s0	\-	n	smaller; decrease point size by 2
\fB\s-1\&.TA\fR\s0	8n,5n	n	set \s-1TAB\s0 characters to 8n 16n .\|.\|. (\fBnroff\fR) 5n 10n .\|.\|. (\fBtroff\fR)
\fB\s-1\&.TC\fR\s0 \*x	\-	y	print table of contents at end; \*x=no suppresses title
\fB\s-1\&.TE\fR\s0	\-	y	end of table processed by \fBtbl\fP
\fB\s-1\&.TH\fR\s0	\-	y	end multi-page header of table
\fB\s-1\&.TL\fR\s0	\-	y	title in boldface and two points larger
\fB\s-1\&.TM\fR\s0	off	n	\s-1UC\s0 Berkeley thesis mode
\fB\s-1\&.TS\fR\s0 \*x	\-	y,y	begin table; if \*x=H table has multi-page header
\fB\s-1\&.UL\fR\s0 \*x	\-	n	underline \*x, even in \fBtroff\fP
\fB\s-1\&.UX\fR\s0 \*x	\-	n	\s-1UNIX\s0; trademark message first time; \*x appended
\fB\s-1\&.XA\fR\s0 \*Y	\-	y	another index entry; \*x=page or no for none; \*y=indent
\fB\s-1\&.XE\fR\s0	\-	y	end index entry (or series of \fB\s-1.IX\fP\s0 entries)
\fB\s-1\&.XP\fR\s0	\-	y,y	paragraph with first line exdented, others indented
\fB\s-1\&.XS\fR\s0 \*Y	\-	y	begin index entry; \*x=page or no for none; \*y=indent
\fB\&.1C\fR	on	y,y	one column format, on a new page
\fB\&.2C\fR	\-	y,y	begin two column format
\fB\&.]\|\-\fR	\-	n	beginning of \fBrefer\fP reference
\fB\&.[\|0\fR	\-	n	end of unclassifiable type of reference
\fB\&.[\|N\fR	\-	n	N= 1:journal-article, 2:book, 3:book-article, 4:report
.fi
.DT
.SH REGISTERS
.LP
Formatting distances can be controlled in
.B \-ms
by means of built-in number registers.
For example, this sets the line length to 6.5 inches:
.IP
.B \&.nr  LL  6.5i
.LP
Here is a table of number registers and their default values:
.LP
.RS
.nf
.ta .5i +\w'Name\0'u +\w'paragraph distance 'u +\w'Takes Effect\ \ \  'u
Name	Register Controls	Takes Effect	Default
.sp .3
\fB\s-1PS\fR\s0	point size      	paragraph	10
\fB\s-1VS\fR\s0	vertical spacing	paragraph	12
\fB\s-1LL\fR\s0	line length     	paragraph	6i
\fB\s-1LT\fR\s0	title length    	next page	same as \fB\s-1LL\fR\s0
\fB\s-1FL\fR\s0	footnote length 	next \fB\s-1.FS\fR\s0	5.5i
\fB\s-1PD\fR\s0	paragraph distance	paragraph	1v (if n), .3v (if t)
\fB\s-1DD\fR\s0	display distance	displays	1v (if n), .5v (if t)
\fB\s-1PI\fR\s0	paragraph indent	paragraph	5n
\fB\s-1QI\fR\s0	quote indent    	next \fB\s-1.QP\fR\s0	5n
\fB\s-1FI\fR\s0	footnote indent 	next \fB\s-1.FS\fR\s0	2n
\fB\s-1PO\fR\s0	page offset     	next page	0 (if n), \(ap1i (if t)
\fB\s-1HM\fR\s0	header margin   	next page	1i
\fB\s-1FM\fR\s0	footer margin   	next page	1i
\fB\s-1FF\fR\s0	footnote format 	next \fB\s-1.FS\fR\s0	0 (1, 2, 3 available)
.fi
.RE
.LP
When resetting these values,
make sure to specify the appropriate units.
Setting the line length to 7, for example,
will result in output with one character per line.
Setting
.SB FF
to 1 suppresses footnote superscripting;
setting it to 2 also suppresses indentation of the first line;
and setting it to 3 produces an
.BR \s-1\&.IP\s0 -like
footnote paragraph.
.LP
Here is a list of string registers available in
.BR \-ms ;
they may be used anywhere in the text:
.LP
.RS
.nf
.ta .5i 1.1i
Name	String's Function
.sp .3
\fB\e*Q\fR	quote (\fB"\fR in \fBnroff,\fP\| \fB``\fR in \fBtroff\fP )
\fB\e*U\fR 	unquote (\fB"\fR in \fBnroff,\fP\| \fB''\fR in \fBtroff\fP )
\fB\e*\-\fR	dash (\fB--\fR in \fBnroff,\fP \fB\(em\fR in \fBtroff\fP )
\fB\e*(\s-1MO\fR\s0	month (month of the year)
\fB\e*(\s-1DY\fR\s0	day (current date)
\fB\e**\fR	automatically numbered footnote
\fB\e*\'\fR	acute accent (before letter)
\fB\e*\`\fR	grave accent (before letter)
\fB\e*\d^\fR	\ucircumflex (before letter)
\fB\e*,\fR	cedilla (before letter)
\fB\e*:\fR	umlaut (before letter)
\fB\e*\d~\fR	\utilde (before letter)
.fi
.RE
.LP
When using the extended accent mark definitions available with
.BR \s-1\&.AM\s0 ,
these strings should come after, rather than before,
the letter to be accented.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/tmac/tmac.s
.TP
.B /usr/share/lib/ms/ms.???
.PD
.SH SEE ALSO
.BR col (1V),
.BR eqn (1),
.BR nroff (1),
.BR refer (1),
.BR tbl (1),
.BR troff (1)
.LP
.TX DOCS
.SH BUGS
.LP
Floating keeps and regular keeps are diverted to the same space,
so they cannot be mixed together with predictable results.
en at Berkeley and is a
superset of the standard 
.B \-ms
macro packages as supplied by Bell Labs.  Some of the Bell Labs macros
have been removed; for instance, it is assumed that the user has little
interest in producing headers stating t./share/man/man8/                                                                                      775       0      12            0  4425704554   6633                                                                                                                                                                                                                                                                                                                                                                      ./share/man/man8/List.8                                                                                755       0      12        26122  4424741600   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)List.8 1.12 88/03/04 SMI
.if \n(zZ=1 .ig zZ
.TH LIST 8 "14 December 1987"
.SH LIST OF MAINTENANCE COMMANDS
.nf
.sp
.ta 20n; +20n
\fBName	Appears on Page	Description\fR
.sp
.zZ
\fBac\fR	\fBac\fR(8)	 login accounting
\fBaccton\fR	\fBsa\fR(8)	 system accounting
\fBadbgen\fR	\fBadbgen\fR(8)	 generate adb script
\fBadduser\fR	\fBadduser\fR(8)	 procedure for adding new users
\fBarp\fR	\fBarp\fR(8C)	 address resolution display and control
\fBaudit\fR	\fBaudit\fR(8)	 audit trail maintenance
\fBaudit_warn\fR	\fBaudit_warn\fR(8)	 audit space low warning script
\fBauditd\fR	\fBauditd\fR(8)	 audit daemon
\fBautomount\fR	\fBautomount\fR(8)	 automatically mount NFS file systems
\fBbiod\fR	\fBnfsd\fR(8)	 NFS daemons
\fBboot\fR	\fBboot\fR(8S)	 start the system kernel or a standalone program
\fBbootparamd\fR	\fBbootparamd\fR(8)	 boot parameter server
\fBcaptoinfo\fR	\fBcaptoinfo\fR(8V)	 convert a termcap description into a terminfo description
\fBcatman\fR	\fBcatman\fR(8)	 create the cat files for the manual
\fBchown\fR	\fBchown\fR(8)	 change owner
\fBchroot\fR	\fBchroot\fR(8)	 change root directory for a command
\fBclient\fR	\fBclient\fR(8)	 add/remove diskless systems
\fBclri\fR	\fBclri\fR(8)	 clear i-node
\fBcomsat\fR	\fBcomsat\fR(8C)	 biff server
\fBconfig\fR	\fBconfig\fR(8)	 build system configuration files
\fBcrash\fR	\fBcrash\fR(8S)	 what happens when the system crashes
\fBcron\fR	\fBcron\fR(8)	 clock daemon
\fBdbconfig\fR	\fBdbconfig\fR(8)	initialized the dial box
\fBdcheck\fR	\fBdcheck\fR(8)	 file system directory consistency check
\fBdkinfo\fR	\fBdkinfo\fR(8)	 report information about a disk's geometry and partitioning
\fBdmesg\fR	\fBdmesg\fR(8)	 collect system diagnostic messages to form error log
\fBdump\fR	\fBdump\fR(8)	 incremental file system dump
\fBdumpfs\fR	\fBdumpfs\fR(8)	 dump file system information
\fBedquota\fR	\fBedquota\fR(8)	 edit user quotas
\fBeeprom\fR	\fBeeprom\fR(8S)	 Sun-3 EEPROM display and load utility
\fBetherd\fR	\fBetherd\fR(8C)	 Ethernet statistics server
\fBetherfind\fR	\fBetherfind\fR(8C)	 find packets on Ethernet
\fBexportfs\fR	\fBexportfs\fR(8)	 export and unexport directories to NFS clients
\fBfastboot\fR	\fBfastboot\fR(8)	 reboot/halt the system without checking the disks
\fBfasthalt\fR	\fBfastboot\fR(8)	 reboot/halt the system without checking the disks
\fBfingerd\fR	\fBfingerd\fR(8C)	 remote user information server
\fBformat\fR	\fBformat\fR(8S)	 disk partitioning and maintenance utility
\fBfpa_download\fR	\fBfpa_download\fR(8)	 download to the Floating Point Accelerator (\s-1FPA\s+1)
\fBfparel\fR	\fBfparel\fR(8)	 Sun FPA online reliability tests
\fBfpaversion\fR	\fBfpaversion\fR(8)	 print FPA version
\fBfpurel\fR	\fBfpurel\fR(8)	 perform tests the Sun Floating Point Co-processor
\fBfpuversion4\fR	\fBfpuversion4\fR(8)	 print the Sun-4 FPU version
\fBfsck\fR	\fBfsck\fR(8)	 file system consistency check and interactive repair
\fBfsirand\fR	\fBfsirand\fR(8)	 install random inode generation numbers
\fBftpd\fR	\fBftpd\fR(8C)	 DARPA Internet File Transfer Protocol server
\fBgettable\fR	\fBgettable\fR(8C)	 get DoD Internet format host table from a host
\fBgetty\fR	\fBgetty\fR(8)	 set terminal mode
\fBgpconfig\fR	\fBgpconfig\fR(8)	 initialize the Graphics Processor
\fBgrpck\fR	\fBgrpck\fR(8)	 check group database entries
\fBhalt\fR	\fBhalt\fR(8)	 stop the processor
\fBhtable\fR	\fBhtable\fR(8)	 convert DoD Internet format host table
\fBicheck\fR	\fBicheck\fR(8)	 file system storage consistency check
\fBifconfig\fR	\fBifconfig\fR(8C)	 configure network interface parameters
\fBinetd\fR	\fBinetd\fR(8C)	 Internet services daemon
\fBinfocmp\fR	\fBinfocmp\fR(8V)	 compare or print out terminfo descriptions
\fBinit\fR	\fBinit\fR(8)	 process control initialization
\fBinstallboot\fR	\fBboot\fR(8S)	 start the system kernel or a standalone program
\fBiostat\fR	\fBiostat\fR(8)	 report I/O statistics
\fBipallocd\fR	\fBipallocd\fR(8C)	 Ethernet-to-IP address allocator
\fBkadb\fR	\fBkadb\fR(8S)	 adb-like kernel and standalone-program debugger
\fBkeyenvoy\fR	\fBkeyenvoy\fR(8C)	 talk to keyserver
\fBkeyserv\fR	\fBkeyserv\fR(8C)	 server for storing public and private keys
\fBkgmon\fR	\fBkgmon\fR(8)	 generate a dump of the operating system's profile buffers
\fBldconfig\fR	\fBldconfig\fR(8)	 configure cache for \fBld.so\fR
\fBlink\fR	\fBlink\fR(8)	 exercise link and unlink system calls
\fBlockd\fR	\fBlockd\fR(8C)	 network lock daemon
\fBlogintool\fR	\fBlogintool\fR(8)	 graphic login interface
\fBlpc\fR	\fBlpc\fR(8)	 line printer control program
\fBlpd\fR	\fBlpd\fR(8)	 printer daemon
\fBmailstats\fR	\fBmailstats\fR(8)	 print statistics collected by sendmail
\fBMAKEDBM\fR	\fBmakedbm\fR(8)	 make a Yellow Pages dbm file
\fBMAKEDEV\fR	\fBmakedev\fR(8)	 make system special files
\fBmakekey\fR	\fBmakekey\fR(8)	 generate encryption key
\fBmc68881version\fR	\fBmc68881version\fR(8)	 print the MC68881 mask number and approximate clock rate
\fBmconnect\fR	\fBmconnect\fR(8)	 connect to SMTP mail server socket
\fBmkfs\fR	\fBmkfs\fR(8)	 construct a file system
\fBmknod\fR	\fBmknod\fR(8)	 build special file
\fBmkproto\fR	\fBmkproto\fR(8)	 construct a prototype file system
\fBmodload\fR	\fBmodload\fR(8)	 load a loadable module
\fBmodstat\fR	\fBmodstat\fR(8)	 display status of loadable modules
\fBmodunload\fR	\fBmodunload\fR(8)	 unload a loadable module
\fBmonitor\fR	\fBmonitor\fR(8S)	 system ROM monitor
\fBmount\fR	\fBmount\fR(8)	 mount and dismount filesystems
\fBmountd\fR	\fBmountd\fR(8C)	 NFS mount request server
\fBnamed\fR	\fBnamed\fR(8C)	 Internet domain name server
\fBncheck\fR	\fBncheck\fR(8)	 generate names from i-numbers
\fBndbootd\fR	\fBndbootd\fR(8C)	 ND boot block server
\fBnetconfig\fR	\fBnetconfig\fR(8C)	 PNP boot service
\fBnetstat\fR	\fBnetstat\fR(8C)	 show network status
\fBnewaliases\fR	\fBnewaliases\fR(8)	 rebuild the data base for the mail aliases file
\fBnewfs\fR	\fBnewfs\fR(8)	 construct a new file system
\fBnewkey\fR	\fBnewkey\fR(8)	 create a new key in the publickey database
\fBnfsd\fR	\fBnfsd\fR(8)	 NFS daemons
\fBnfsstat\fR	\fBnfsstat\fR(8C)	 Network File System statistics
\fBpac\fR	\fBpac\fR(8)	 printer/plotter accounting information
\fBping\fR	\fBping\fR(8C)	 send ICMP ECHO_REQUEST packets to network hosts
\fBpnp.s386\fR	\fBpnpboot\fR(8C)	 PNP diskless boot service
\fBpnpboot\fR	\fBpnpboot\fR(8C)	 PNP diskless boot service
\fBpnpd\fR	\fBpnpd\fR(8C)	 PNP daemon
\fBportmap\fR	\fBportmap\fR(8C)	 DARPA port to RPC program number mapper
\fBpraudit\fR	\fBpraudit\fR(8)	 print contents of an audit trail file
\fBpstat\fR	\fBpstat\fR(8)	 print system facts
\fBpwck\fR	\fBpwck\fR(8)	 check password database entries
\fBpwdauthd\fR	\fBpwdauthd\fR(8C)	 server for authenticating passwords
\fBquot\fR	\fBquot\fR(8)	 summarize file system ownership
\fBquotacheck\fR	\fBquotacheck\fR(8)	 file system quota consistency checker
\fBquotaoff\fR	\fBquotaon\fR(8)	 turn file system quotas on and off
\fBquotaon\fR	\fBquotaon\fR(8)	 turn file system quotas on and off
\fBrarpd\fR	\fBrarpd\fR(8C)	 DARPA Reverse Address Resolution Protocol service
\fBrc.boot\fR	\fBrc\fR(8)	 command scripts for auto-reboot and daemons
\fBrc.local\fR	\fBrc\fR(8)	 command scripts for auto-reboot and daemons
\fBrc\fR	\fBrc\fR(8)	 command scripts for auto-reboot and daemons
\fBrdate\fR	\fBrdate\fR(8C)	 set system date from a remote host
\fBrdump\fR	\fBdump\fR(8)	 incremental file system dump
\fBreboot\fR	\fBreboot\fR(8)	 restart the operating system
\fBrenice\fR	\fBrenice\fR(8)	 alter priority of running processes
\fBrepquota\fR	\fBrepquota\fR(8)	 summarize quotas for a file system
\fBrestore\fR	\fBrestore\fR(8)	 incremental file system restore
\fBrexd\fR	\fBrexd\fR(8C)	 RPC-based remote execution server
\fBrexecd\fR	\fBrexecd\fR(8C)	 remote execution server
\fBrlogind\fR	\fBrlogind\fR(8C)	 remote login server
\fBrmail\fR	\fBrmail\fR(8C)	 handle remote mail received via uucp
\fBrmt\fR	\fBrmt\fR(8C)	 remote magtape protocol module
\fBroute\fR	\fBroute\fR(8C)	 manually manipulate the routing tables
\fBrouted\fR	\fBrouted\fR(8C)	 network routing daemon
\fBrpcinfo\fR	\fBrpcinfo\fR(8C)	 report RPC information
\fBrquotad\fR	\fBrquotad\fR(8C)	 remote quota server
\fBrrestore\fR	\fBrestore\fR(8)	 incremental file system restore
\fBrshd\fR	\fBrshd\fR(8C)	 remote shell server
\fBrstatd\fR	\fBrstatd\fR(8C)	 kernel statistics server
\fBrusersd\fR	\fBrusersd\fR(8C)	 network username server
\fBrwalld\fR	\fBrwalld\fR(8C)	 network rwall server
\fBrwhod\fR	\fBrwhod\fR(8C)	 system status server
\fBsa\fR	\fBsa\fR(8)	 system accounting
\fBsavecore\fR	\fBsavecore\fR(8)	 save a core dump of the operating system
\fBsendmail\fR	\fBsendmail\fR(8)	 send mail over the internet
\fBsetup_client\fR	\fBsetup_client\fR(8)	 create or remove a nfs client on a 4.0 server.
\fBsetup_exec\fR	\fBsetup_exec\fR(8)	 install architecture-dependent executable files
\fBshowmount\fR	\fBshowmount\fR(8)	 show all remote mounts
\fBshutdown\fR	\fBshutdown\fR(8)	 close down the system at a given time
\fBspray\fR	\fBspray\fR(8C)	 spray packets
\fBsprayd\fR	\fBsprayd\fR(8C)	 spray server
\fBstatd\fR	\fBstatd\fR(8C)	 network status monitor
\fBsticky\fR	\fBsticky\fR(8)	 persistent text and append-only directories
\fBsundiag\fR	\fBsundiag\fR(8)	 system diagnostics
\fBsuninstall\fR	\fBsuninstall\fR(8)	 SunOS software installation program
\fBsunupgrade\fR	\fBsunupgrade\fR(8)	 upgrade the Sun Operating System
\fBswapon\fR	\fBswapon\fR(8)	 specify additional device for paging and swapping
\fBsysdiag\fR	\fBsysdiag\fR(8)	 system diagnostics
\fBsyslogd\fR	\fBsyslogd\fR(8)	 log system messages
\fBtalkd\fR	\fBtalkd\fR(8C)	 server for talk program
\fBtelnetd\fR	\fBtelnetd\fR(8C)	 DARPA TELNET protocol server
\fBtftpd\fR	\fBtftpd\fR(8C)	 DARPA Trivial File Transfer Protocol server
\fBtic\fR	\fBtic\fR(8V)	 terminfo compiler
\fBtimed\fR	\fBtimed\fR(8C)	 DARPA Time server
\fBtnamed\fR	\fBtnamed\fR(8C)	 DARPA Trivial name server
\fBtrpt\fR	\fBtrpt\fR(8C)	 transliterate protocol trace
\fBtunefs\fR	\fBtunefs\fR(8)	 tune up an existing file system
\fBumount\fR	\fBmount\fR(8)	 mount and dismount filesystems
\fBunconfigure\fR	\fBunconfigure\fR(8)	 reset the network configuration for a system
\fBunlink\fR	\fBlink\fR(8)	 exercise link and unlink system calls
\fBupdate\fR	\fBupdate\fR(8)	 periodically update the super block
\fBuuclean\fR	\fBuuclean\fR(8C)	 uucp spool directory clean-up
\fBvipw\fR	\fBvipw\fR(8)	 edit the password file
\fBvmstat\fR	\fBvmstat\fR(8)	 report virtual memory statistics
\fBypbind\fR	\fBypserv\fR(8)	 Yellow Pages server and binder processes
\fBypinit\fR	\fBypinit\fR(8)	 build and install Yellow Pages database
\fBypmake\fR	\fBypmake\fR(8)	 rebuild Yellow Pages database
\fByppasswdd\fR	\fByppasswdd\fR(8C)	 server for modifying Yellow Pages password file
\fByppoll\fR	\fByppoll\fR(8)	 what version of a YP map is at a YP server host
\fByppush\fR	\fByppush\fR(8)	 force propagation of a changed YP map
\fBypserv\fR	\fBypserv\fR(8)	 Yellow Pages server and binder processes
\fBypset\fR	\fBypset\fR(8)	 point ypbind at a particular server
\fBypupdated\fR	\fBypupdated\fR(8C)	 server for changing yp information
\fBypwhich\fR	\fBypwhich\fR(8)	 what machine is the YP server?
\fBypxfr\fR	\fBypxfr\fR(8)	 transfer YP map from a YP server to here
\fBzdump\fR	\fBzdump\fR(8)	 time zone dumper
\fBzic\fR	\fBzic\fR(8)	 time zone compiler
.fi
etty\fR(8)	 set terminal mode
\fBgpconfig\fR	\fBgpconfig\fR(8)	 initialize the Graphics Processor
\fBgrpck\fR	\fBgrpck\fR(8)	 check group database entries
\fBhalt\fR	\fBhalt\fR(8)	 stop the processor
\fBhtable\fR	\fBhtable\fR(8)	 convert DoD Internet format host table
\fBicheck\fR	\fBicheck\fR(8)	 file system storage consistency check
\fBifconfig\fR	\fBifconfig\fR(8C)	 configure network interface parameters
\fBinetd\fR	\fBinet./share/man/man8/MAKEDEV.8                                                                             755       0      12           67  4424741600  10021                                                                                                                                                                                                                                                                                                                                                                      .so man8/makedev.8
.\" @(#)MAKEDEV.8 1.4 89/03/27 SMI;
accton.8 AKE   t    adbgen.8 c.8       	adduser.8 .8       	analyze.8 .8       arp.8c u       audit.8        audit_warn.8 rp.       auditd.8 .8        automount.8       biod.8 i      boot.8s   4    bootparamd.8 iod  H    c2conv.8 8s   `    captoinfo.8v .6   t    catman.8 .6     t  chown.8     u  chroot.8 atm    v  client.8 how    w  clri.8 o    x  	comsat.8c ie./share/man/man8/ac.8                                                                                  755       0      12         2634  4424741600   7372                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ac.8 1.15 89/03/27 SMI; from UCB 4.1
.TH AC 8 "22 March 1989"
.SH NAME
ac \- login accounting
.SH SYNOPSIS
.B /usr/etc/ac
[
.B \-w
.I wtmp
] [
.B \-p
] [
.B \-d
] [
.I username
] .\|.\|.
.SH DESCRIPTION
.IX  "ac command"  ""  "\fLac\fP \(em login accounting"
.IX  "login accounting"  ""  "login accounting, display login record \(em \fLac\fP"
.IX  "accounting"  ""  "accounting, display login record \(em \fLac\fP"
.B ac
produces a printout giving connect time for each user who has logged
in
during the life of the current
.I wtmp
file.  A total is also produced.
.LP
The accounting file
.B /var/adm/wtmp
is maintained by
.BR init (8)
and
.BR login (1).
Neither of these programs creates the file,
so if it does not exist no connect-time accounting is done.
To start accounting, it should be created with length 0.
On the other hand if the file is left undisturbed it will
grow without bound, so periodically any information
desired should be collected and the file truncated.
.SH OPTIONS
.TP
.B \-w
.I wtmp
Specify an alternate
.I wtmp 
file.
.TP
.B \-p
Print individual totals; without this option, only totals are printed.
.TP
.B \-d
Printout for each midnight to midnight period.  Any
.I people
will limit the printout to only the specified login names.  If no
.I wtmp
file is given,
.B /var/adm/wtmp
is used.
.SH FILES
.PD 0
.TP 20
.B /var/adm/wtmp
.PD
.SH "SEE ALSO"
.BR login (1),
.BR utmp (5),
.BR init (8),
.BR sa (8)
d.8c        
in.rlogind.8c   $    in.routed.8c  $  8    
in.rshd.8c   L    ./share/man/man8/accton.8                                                                              755       0      12           62  4424741600  10207                                                                                                                                                                                                                                                                                                                                                                      .so man8/sa.8
.\" @(#)accton.8 1.6 89/03/27 SMI; 
     	adduser.8         	analyze.8         arp.8c 8       audit.8        audit_warn.8         auditd.8          automount.8       biod.8        boot.8s   4    bootparamd.8    H    c2conv.8  H  `    captoinfo.8v    t    catman.8  t    t  chown.8     u  chroot.8      v  client.8      w  clri.8 m    x  	comsat.8c     y  config.8       z  crash.8s./share/man/man8/adbgen.8                                                                              755       0      12        11142  4424741601  10242                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adbgen.8 1.17 89/03/27 SMI;
.TH ADBGEN 8 "22 March 1989"
.SH NAME
adbgen \- generate adb script
.SH SYNOPSIS
.B /usr/lib/adb/adbgen
.IB filename .adb
\&.\|.\|.
.SH DESCRIPTION
.IX  "adbgen command"  ""  "\fLadbgen\fP \(em generate adb script"
.IX  generate "adb script"  ""  "\fLadb\fR script \(em \fLadbgen\fP"
.IX  "adb scripts"  ""  "\fLadb\fR scripts \(em \fLadbgen\fP"
.IX  "debug tools"  "adbgen generate adb script"  ""  "\fLadbgen\fP \(em generate \fLadb\fR script"
.B adbgen
makes it possible to write
.BR adb (1)
scripts that do not contain hard-coded
dependencies on structure member offsets.
The input to
.B adbgen
is a file named
.IB filename .adb
which contains
.B adbgen
header information, then a null line, then the name of a
structure, and finally an
.B adb
script.
.B adbgen
only deals with one structure per file;
all member names are assumed to be
in this structure.  The output of
.B adbgen
is an
.B adb
script in
.IR  filename .
.B adbgen
operates by generating a C program which determines structure member
offsets and sizes, which in turn generates the
.B adb
script.
.LP
The header lines, up to the null line, are copied verbatim
into the generated C program.
Typically these include C
.B #include
statements to include the header files containing the relevant
structure declarations.
.LP
The
.B adb
script part may contain any valid
.B adb
commands (see
.BR adb (1)),
and may also contain
.B adbgen
requests, each enclosed in
.BR {} s.
Request types are:
.TP
\(bu
Print a structure member.  The request form is
.BI { member , format }\fR.
.I member
is a member name of the
.I structure
given earlier, and
.I format
is any valid
.B adb
format request.  For example, to print the
.B p_pid
field of the
.I proc
structure as a decimal number, you would write
.BR {p_pid,d} .
.TP
\(bu
Reference a structure member.  The request form is
.BI {* member , \|base }\fR.
.I member
is the member name whose value is desired, and
.I base
is an
.B adb
register name which contains the base address of the structure.
For example, to get the
.B p_pid
field of the
.I proc
structure, you would get the proc structure address in an
.B adb
register, say <f, and write
.BR {*p_pid,<f} .
.TP
\(bu
Tell
.B adbgen
that the offset is ok.  The request form is
.BR {\s-1OFFSETOK\s0} .
This is useful after invoking another
.B adb
script which moves the
.BI adb " dot."
.TP
\(bu
Get the size of the
.IR structure .
The request form is
.BR {\s-1SIZEOF\s0} .
.B adbgen
replaces this request with the size of the structure.
This is useful in incrementing a pointer to
step through an array of structures.
.TP
\(bu
Get the offset to the end of the structure.  The request form is
.BR {\s-1END\s0} .
This is useful at the end of the structure to get
.B adb
to align the
.B dot
for printing the next structure member.
.LP
.B adbgen
keeps track of the movement of the
.BI adb " dot"
and emits
.B adb
code to move forward or backward as necessary before printing
any structure member in a script.
.BR adbgen 's
model of the behavior of
.BR adb 's
.B dot
is simple: it is assumed that the first line of the script is of the form
.IR struct_address / "adb text"
and that subsequent lines are of the form
.RI +/ "adb text".
This causes the
.IB adb " dot"
to move in a sane fashion.
.B adbgen
does not check the script to ensure that these limitations are met.
.B adbgen
also checks the size of the structure member against the size of the
.B adb
format code and warns you if they are not equal.
.SH EXAMPLE
If there were an include file
.B x.h
which contained:
.RS
.ft B
.nf
struct x {
.ft R
.RS
.ft B
char	*x_cp;
char	x_c;
int	x_i;
.ft R
.RE
.ft B
};
.fi
.ft R
.RE
.LP
Then an
.B adbgen
file (call it
.BR script.adb )
to print it would be:
.RS
.ft B
.nf
#include "x.h"
x
\&.\|/"x_cp"16t"x_c"8t"x_i"n{x_cp,X}{x_c,C}{x_i,D}
.ft R
.fi
.RE
.ne 3
.LP
After running
.B adbgen
the output file
.B script
would contain:
.IP
.B ./"x_cp"16t"x_c"8t"x_i"n\s-1XC\s0+D
.LP
To invoke the script you would type:
.IP
.B x$<script
.SH FILES
.PD 0
.TP 20
.B /usr/lib/adb/*
.B adb
scripts for debugging the kernel
.PD
.SH SEE ALSO
.BR adb (1),
.BR kadb (8S)
.LP
.TX DEBUG
.SH BUGS
.B adb
syntax is ugly; there should be a higher level interface
for generating scripts.
.LP
Structure members which are bit fields cannot be handled
because C will not give the address of a bit field.
The address is needed to determine the offset.
.SH DIAGNOSTICS
.LP
Warnings about structure member sizes not equal to
.B adb
format items and complaints about badly formatted requests.
The C compiler complains if you reference a structure member
that does not exist.  It also complains about & before array names;
these complaints may be ignored.
  
old-sysdiag.8 	0  	@    pac.8 g.  	P    ping.8c   	d    pnp.s386.8c   	x    
pnpboot.8c    	    pnpd.8c   	    
portmap.8c    	    	praudit.8    	     pstat.8   	    pwck.8 a  	    pwdauthd.8c   
     quot.8 d  
    quotacheck.8  
  
,    
quotaoff.8   
@    	quotaon.8  ,  
T    rarpd.8c  
@  
d    rc.8 .8c  
x    	rc.boot.8 .8  
  ./share/man/man8/adduser.8                                                                             755       0      12        17716  4424741601  10466                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)adduser.8 1.32 89/03/27 SMI; from UCB 4.3
.TH ADDUSER 8 "22 March 1989"
.SH NAME
adduser \- procedure for adding new users
.SH DESCRIPTION
.IX  "adduser command"  ""  "\fLadduser\fP \(em add new user account"
.IX  "system administration"  adduser  ""  "\fLadduser\fP \(em add new user account"
.LP
To add an account for a new user, the system
administrator (or super-user):
.RS
.TP 3
\(bu
Create an entry for the new user in the system password files.
.TP 
\(bu
Create a home directory for the user,
and change ownership so the new user owns that directory.
.TP 
\(bu
Optionally set up skeletal dot files for the new user
.RB ( .cshrc ,
.BR .login ,
.BR .profile .\|.\|.).
.TP 
\(bu
If the account is on a system running the 
.SM YP
name service,
take additional measures.
.RE
.SH USAGE
.SS "Making an Entry in the Password File"
.\" The new user chooses a login name, which must not already appear in
.\" the password file,
.\" .B /etc/passwd,
.\" the password adjunct file,
.\" .B /etc/security/passwd.adjunct,
.\" or the 
.\" .SM YP
.\" password maps.
.LP
To add an entry for the new login name on a local host, first edit the
.B /etc/passwd
file
\(em inserting a line for the new user.  This must be done with the
password file locked, for instance, by using
.BR vipw (8),
and the insertion must be made above the line containing the
string:
.IP
.ft B
+::0:0:::
.ft R
.LP
This line is used to indicate that additional accounts can be found
in the 
.SM YP\s0.
.LP
To add an entry for the new login name into the 
.SM YP\s0,
add an identical line to the file
.B /etc/passwd
on the
.SM YP
master server, and run
.BR make (1)
in the directory
.B /var/yp
(see
.BR ypmake (8)
for details) to propagate the change.
.LP
The new user is assigned a group and user
.SM ID
number
(\s-1GID\s0
and
.SM UID
respectively).
\s-1UID\s0s
should be unique for each user and
consistent across the
.SM NFS
domain, since they control access to files.
\s-1GID\s0s
need not be unique.
Typically, users working on similar projects will assigned to the same
group.  The system staff is group 10 for historical reasons,
and the super-user is in this group.
.LP
An entry for a new user 
.B francine
would look like this:
.IP
.B "francine::235:20:& Featherstonehaugh:/usr/francine:/bin/csh"
.LP
Fields in each password-file entry are delimited by colons, and have
the following meanings:
.RS
.TP 3
\(bu
Login name
(\fBfrancine\fP).
The login name is limited to eight characters in length.
.TP
\(bu
Encrypted password or the string
.BI ## name
if encrypted passwords are stored
in the password adjunct file.
Typically, if passwords are to be stored in
the main password file, this field is left empty, so
no password is needed when the user first logs in.  If security
demands a password, it should be assigned by running
.BR passwd (1)
immediately after exiting the editor. The number of significant
characters in a password is eight. (See
.BR passwd (1).)
.TP 
\(bu
User
.SM ID\s0.
The 
.SM UID
is a number which identifies that user uniquely in the system.
Files owned by the user have this number stored in
their data blocks, and commands such as
.BR ls (1V)
use it to look up the owner's login name.
For this reason, you cannot 
randomly change this number. See
.BR passwd (5)
for more information.
.TP 
\(bu
Group
.SM ID\s0.
The 
.SM UID
number identifies the group to which
the user belongs by default (although the user may belong to
additional groups as well).  All files that the user creates have this
number stored in their data blocks, and commands such as
.BR ls (1V)
use it to look up the group name.  Group names and assignments
are listed in the file
.B /etc/group
(which is described in
.BR group (5))
or in the 
.SM YP
group map.
.TP 
\(bu
This field is called the
.SM GCOS
field (from earlier implementation of the
operating system) and is traditionally used to hold the user's full name.  Some
installations have other information encoded in this field.
From this information we can tell that Francine's real name is
`Francine Featherstonehaugh'.  The
.B &
in the entry is shorthand for the user's
login name.
.br
.ne 5
.TP 
\(bu
User's home directory.  This is the directory in which that user is
\(lqpositioned\(rq when they log in.
.TP 
\(bu
Initial shell which this user will see on login.
If this field is empty,
.BR sh (1)
is used as the initial shell.
.RE	
.LP
.\" .SS "Making an Entry in the Password Adjunct File"
.\" If passwords are being stored in the file
.\" .BR /etc/security/passwd.adjunct ,
.\" a new line needs to be inserted for the new user in this file also.
.\" This insertion must be made above the line containing the
.\" string:
.\" .IP
.\" .B +:
.\" .LP
.\" This line is used to indicate that additional accounts can be found
.\" in the 
.\" .SM YP\s0.
.\" .LP
.\" To add an entry for the new login name on to the 
.\" .SM YP\s0,
.\" add an identical line to the file
.\" .B /etc/security/passwd.adjunct
.\" on the
.\" .SM YP
.\" master server, and run
.\" .BR make (1)
.\" in the directory
.\" .B /var/yp
.\" (see
.\" .BR ypmake (8)
.\" for details) to propagate the change.
.LP
An entry for a new user
.B francine
would look like this:
.IP
.B francine:::::lo:ad,+dw
.LP
Fields in each password adjunct file entry
are delimited by colons, and have
the following meanings:
.RS
.TP 3
\(bu
Login name
(\fBfrancine\fP).
This name must match the login name in the password file.
.TP 
\(bu
Encrypted password.  Typically, this field is left empty when
adding the line using the editor.
.BR passwd (1)
should be run immediately after exiting the editor.
.TP 
\(bu
The next three fields are
the minimum label, the maximum label, and the default label.
These fields should be left empty,
since they are reserved for future use.
.TP 
\(bu
The next two fields are for
the always-audit flags and the never-audit flags.
Always-audit flags specify which events
guaranteed to be audited for that user.
Never-audit flags specify which events
are guaranteed not to be audited for that user.
.\" Additional events may be audited based on flags in
.\" .BR /etc/security/audit/audit_control .
For a description of audit flags, see
.BR audit_data (5).
.RE
.SS "Making a Home Directory"
As shown in the password file entry above, the name of Francine's home
directory is to be
.BR /usr/francine .
This directory must be created using
.BR mkdir (1),
and Francine must be given ownership of it using
.BR chown (8),
in order for her profile files to be read and executed, and to
have control over access to it by other users:
.RS
.ft B
.nf
.sp .5
example# mkdir /usr/francine
example# /usr/etc/chown francine /usr/francine
.fi
.ft R
.RE
.LP
If running under
.SM NFS\s0,
the
.BR mkdir (1)
and
.BR chown (8)
commands must be performed on the
.SM NFS
server.
.SS "Setting Up Skeletal Profile Files"
New users often need assistance in setting up their profile
files to initialize the terminal properly, configure their
search path, and perform other desired functions at startup.
Providing them with skeletal profile files saves time
and interruptions for both the new user and the system administrator.
.LP
Such files as
.B .profile
(if they use
.B /usr/bin/sh
as the shell), or
.B .cshrc
and
.B .login
(if they use
.B /usr/bin/csh
as the shell),
can include commands that are performed automatically at each
login, or whenever a shell is invoked, such as
.BR tset (1).
The ownership of these files must be changed to belong to the
new user, either by running
.BR su (1)
before making copies, or by using
.BR chown (8).
.br
.ne 12
.SH FILES
.PD 0
.TP 30
.B /etc/passwd
password file
.TP
.B /etc/group
group file
.\" .TP
.\" .B /etc/security/passwd.adjunct
.\" the password adjunct file
.\" .TP
.\" .B /etc/security/audit/audit_control
.TP
.B /etc/yp/src/passwd
.TP
.B \~/.cshrc
.TP
.B \~/.login
.TP
.B \~/.profile
.PD
.SH SEE ALSO
.BR csh (1),
.BR ls (1v),
.BR make (1),
.BR mkdir (1),
.BR passwd (1),
.BR sh (1),
.BR su (1),
.BR tset (1),
.BR audit (2),
.BR audit_control (5),
.BR audit_data (5),
.BR group (5),
.BR passwd (5),
.BR passwd.adjunct (5),
.BR audit (8),
.BR auditd (8),
.BR chown (8),
.BR vipw (8),
.BR ypmake (8)
.LP
.TX NETP
ntry for the new login name into the 
.SM YP\s0,
a./share/man/man8/analyze.8                                                                             755       0      12           73  4424741601  10406                                                                                                                                                                                                                                                                                                                                                                      .so man8/old-analyze.8
.\" @(#)analyze.8 1.3 89/03/27 SMI;
it.8        audit_warn.8          auditd.8          automount.8       biod.8 n      boot.8s   4    bootparamd.8  4  H    c2conv.8  4  `    captoinfo.8v  `  t    catman.8  `    t  chown.8     u  chroot.8 .8     v  client.8 .8     w  clri.8 8    x  	comsat.8c  8    y  config.8   8     z  crash.8s   m    {  cron.8 s  $  |  dcheck.8 8 s  4  }  devnm.8   D./share/man/man8/arp.8c                                                                                755       0      12         4157  4424741601   7737                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)arp.8c 1.13 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH ARP 8C "17 November 1987"
.SH NAME
arp \- address resolution display and control
.SH SYNOPSIS
.B arp
.I hostname
.LP
.B arp \-a
[
.I vmunix
[
.I kmem
] ]
.LP
.B arp \-d
.I hostname
.LP
.B arp \-s
.I hostname ether_address
[
.B temp
] [
.B pub
] [
.B trail
]
.LP
.B arp \-f
.I filename
.SH DESCRIPTION
.IX  "arp command"  ""  "\fLarp\fP \(em address resolution display and control"
.IX  "address resolution display and control"  ""  "address resolution display and control \(em \fLarp\fP"
The
.B arp
program displays and modifies the
Internet-to-Ethernet address translation
tables used by the address resolution protocol
.RB ( arp (4P)).
.LP
With no flags, the program displays the current
.SM ARP
entry for
.IR hostname .
The host may be specified by name or by number,
using Internet dot notation.
.SH OPTIONS
.TP
.B \-a
Display all of the current
.SM ARP
entries by reading the table
from the file
.I kmem
(default
.BR /dev/kmem )
based on the kernel file
.I vmunix
(default
.BR /vmunix ).
.TP
.B \-d
Delete an entry for the host called
.IR hostname .
This option may only be used by the super-user.
.TP
.B \-s
Create an
.SM ARP
entry for the host called
.I hostname
with the Ethernet address
.IR ether_address .
The Ethernet address is given as six hex bytes separated by colons.
The entry will be permanent unless the word
.B temp
is given in the command.
If the word
.B pub
is given, the entry will be published, for instance,
this system will respond to
.SM ARP
requests for
.I hostname
even though the hostname is not its own.
The word
.B trail
indicates that trailer encapsulations may be sent to this host.
.TP
.B \-f
Read the file named
.I filename
and set multiple entries in the
.SM ARP
tables.  Entries
in the file should be of the form
.RS
.IP
.I hostname ether_address
[
.B temp
] [
.B pub
] [
.B trail
]
.RE
.IP
with argument meanings as given above.
.SH "SEE ALSO"
.BR arp (4P),
.BR ifconfig (8C)
	modload.8 8       	modstat.8 8       modunload.8        
monitor.8s        mount.8   $    	mountd.8c 8   8    named.8c  8   L    ncheck.8  8   `    
ndbootd.8c    x    netconfig.8c  x      
netstat.8c x      newaliases.8        newfs.8       newkey.8 .8       nfsd.8 8      
nfsstat.8c 8  	     nslookup.8c   	  ./share/man/man8/audit.8                                                                               755       0      12         4537  4424741601  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit.8 1.14 89/03/27 SMI;
.TH AUDIT 8 "22 March 1989"
.SH NAME
audit \- audit trail maintenance
.SH SYNOPSIS
.LP
.B audit
[
.BR \-n \||\| \-s \||\| \-t
]
.br
.B audit
.B \-d
.I username
.br
.B audit
.B \-u
.I username
.I audit_event_state
.SH AVAILABILITY
.LP
This program is available with the
.I Security
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  audit  ""  "\fLaudit\fP \(em maintain audit trail"
.IX  change  "audit characteristics"
.LP
The
.B audit
command is the general administrator's interface to kernel auditing.
The process audit state for a user can be temporarily or permanently altered.
The audit daemon may be notified to read the contents of the
.B audit_control
file and re-initialize the current audit directory to the
first directory listed in the
.B audit_control
file, or to open a new audit file
in the current audit directory specified in the
.B audit_control
file as last read by the audit daemon.
Auditing may also be terminated/disabled.
.SH OPTIONS
.TP
.B \-n
Signal audit daemon to close the current audit file and open a new
audit file in the current audit directory.
.TP
.B \-s
Signal audit daemon to read audit control file.  The audit daemon stores
the information internally.
.TP
.B \-t
Signal audit daemon to disable auditing and die.
.TP
.BI \-d " username"
Change the process audit state of all processes owned by
.IR username .
This new process audit state is constructed from the
system and user audit values as specified in the
.B audit_control
and
.BR passwd.adjunct
files respectively.
.TP
.BI \-u " username audit_event_state"
Set the process audit state from
.I audit_event_state
for all current processes owned by
.IR username .
See
.BR audit_control (5)
for the format of the system audit value.
The process audit state is one argument.
Enclose the audit event state in quotes,
or do not use 
.SM SPACE
characters in the process audit state specification.
A new login session reconstructs the process audit state 
from the audit flags in the
.B audit_control 
and
.BR passwd.adjunct
files.
.\" .SH FILES
.\" .PD 0
.\" .TP 20
.\" .B /etc/security/passwd.adjunct
.\" .TP
.\" .B /etc/security/audit/audit_control
.\" .PD
.SH SEE ALSO
.BR audit (2),
.BR setuseraudit (2),
.BR getauditflags (3),
.BR getfauditflags (3),
.BR audit_control (5),
.BR passwd.adjunct (5)
  newaliases.8        newfs.8       newkey.8        nfsd.8        
nfsstat.8c   	     nslookup.8c   	    
old-analyze.8 ./share/man/man8/audit_warn.8                                                                          755       0      12         5430  4424741601  11142                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)audit_warn.8 1.9 89/03/27 SMI;
.TH AUDIT_WARN 8 "22 March 1989"
.SH NAME
audit_warn \- audit daemon warning script
.SH SYNOPSIS
.B /usr/etc/audit_warn
[ \fIoption\fP [ \fIarguments\fP ]\|]
.br
.SH DESCRIPTION
.IX "audit_warn command" "" "\fLaudit_warn\fP command"
The
.B audit_warn
script processes warning or error messages from the audit daemon.
When a problem is encountered, the audit daemon,
.BR auditd (8)
calls
.B audit_warn
with the appropriate arguments.
The
.I option
argument specifies the error type.
.LP
The system administrator can specify a list of mail recpients
using the script's
.SB RECIPIENTS
variable.
The default recipient is root.
.SH OPTIONS
.TP
.BI soft " filename"
indicates that the soft limit for
.I filename
has been exceeded.
The default action for this option is to send mail to the system
administrator.
.TP
.B allsoft
indicates that the soft limit for all filesystems has been exceeded.
The default action for this option is to send mail to the system
administrator.
.TP
.BI hard " filename"
indicates that the hard limit for the file has been exceeded.
The default action for this option is to send mail to the system
administrator.
.TP
.BI allhard " count"
indicates that the hard limit for all filesystems has been exceeded
.I count
times.
The default action for this option is to send mail to the system
administrator only if the
.I count
is
.BR 1 ,
and to send a message to console every time.
It is recommended that mail
.I not
be send every time.
.TP
.B ebusy
indicates that the audit daemon is already running.
The default action for this option is to send mail to the system
administrator.
.TP
.B tmpfile
indicates that the temporary audit file already exists indicating a
fatal error.
The default action for this option is to send mail to the system
administrator.
.TP
.B nostart
indicates that auditing cannot be started because the system audit
state is
.SM
.BR AUC_FCHDONE .
The default action for this option is to send mail to the system
administrator.  Some system administrators may prefer to have the
script reboot the system at this point.
.TP
.B auditoff
indicates that someone other than the audit daemon changed the system
audit state to something other than
.SM
.BR AUC_AUDITING .
The audit
daemon will have exited in this case.
The default action for this option is to send mail to the system
administrator.
.TP
.B postsigterm
indicates that an error occurred during the orderly shutdown of the
audit daemon.
The default action for this option is to send mail to the system
administrator.
.TP
.B getacdir
indicates that there is a problem getting the directory list from:
.IP
.BR /etc/security/audit/audit_control .
.LP
The audit daemon will hang in a sleep loop until the file is fixed.
.SH "SEE ALSO"
.BR auditd (8),
.BR audit (8),
.BR audit.log (5),
.BR audit_control (5)
    lockd.8c        logintool.8       lpc.8 8       lpd.8 8       mailstats.8   $    	makedbm.8 $  8    	makedev.8 8  L    	makekey.8 L  `    
mconnect.8 `  t    mkfile.8  t  ./share/man/man8/auditd.8                                                                              755       0      12         6271  4424741602  10264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)auditd.8 1.11 89/03/27 SMI; from UCB 4.3 BSD
.TH AUDITD 8 "22 March 1989"
.SH NAME
auditd \- audit daemon
.SH SYNOPSIS
.B /usr/etc/auditd
.SH DESCRIPTION
.IX "auditd daemon" "" "\fLauditd\fP daemon"
The audit daemon controls the generation and location of audit trail files.
If the function
.BR issecure (3)
returns false, the only action that
.B auditd
takes is to disable the auditing system;
otherwise, auditing is set up and started.
If auditing is desired,
.B auditd
reads the
.BR audit_control (5)
file to get a list of directories into which audit files can be written
and the percentage limit for how much space to reserve on each filesystem
before changing to the next directory.
.LP
If
.B auditd
receives the signal
.SM
.BR SIGUSR1 ,
the current audit file is closed and another is opened.
If
.SB SIGHUP
is received, the current audit trail is closed, the
.B audit_control
file reread, and a new trail is opened.
If
.SB SIGTERM
is received, the audit trail is closed and auditing is
terminated.
The program
.BR audit (8)
sends these signals and is recommended for this purpose.
.LP
Each time the audit daemon opens a new audit trail file, it updates
the file
.BR audit_data (5)
to include the correct name.
.SS Auditing Conditions
.LP
The audit daemon invokes the program
.BR audit_warn  (8) 
under the following conditions with the inidicated options:
.LP
.BI "audit_warn soft " pathname
.IP
The file system upon which
.I pathname
resides has exceeded the minimum free space limit defined in
.BR audit_control (5).
A new audit trail has been opened on another file system.
.TP
.B "audit_warn allsoft"
All available file systems have been filled beyond the 
minimum free space limit.
A new audit trail has been opened anyway.
.TP
.BI "audit_warn hard " pathname
The file system upon which
.I pathname
resides has filled or for some reason become unavailable.
A new audit trail has been opened on another file system.
.TP
.BI "audit_warn allhard " count
All available file systems have been filled or
for some reason become unavailable.
The audit daemon will repeat this call to
.B audit_warn
every twenty seconds until space becomes available.
.I count
is the number of times that
.B audit_warn
has been called since the problem arose.
.TP
.B "audit_warn ebusy"
There is already an audit daemon running.
.TP
.B "audit_warn tmpfile"
The file
.B /etc/security/audit/audit_tmp
exists, indicating a fatal error.
.TP
.B "audit_warn nostart"
The internal system audit condition is
.SM
.BR AUC_FCHDONE .
Auditing cannot be started without rebooting the system.
.TP
.B "audit_warn auditoff"
The internal system audit condition has been changed to not be
.SB AUC_AUDITING
by someone other than the audit daemon.  This causes the audit daemon to
exit.
.TP
.B "audit_warn postsigterm"
An error occurred during the orderly shutdown of the auditing system.
.TP
.B "audit_warn getacdir"
There is a problem getting the directory list from
.IP
.BR /etc/security/audit/audit_control .
.LP
The audit daemon will hang in a sleep loop until this file
is fixed.
.SH FILES
.nf
.B /etc/security/audit/audit_control
.B /etc/security/audit/audit_data
.fi
.SH "SEE ALSO"
.BR auditsvc (2),
.BR audit_control (5),
.BR audit.log (5),
.BR audit (8),
.BR audit_warn (8)
 
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c    0    rpc.rusersd.8c   H    
rpc.rwalld.8c    `    
rpc.sprayd.8c   x    rpc.statd.8c          rpc.yppasswdd.8c      !   rpc.ypupdated.8c./share/man/man8/automount.8                                                                           755       0      12        14731  4424741602  11065                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)automount.8 1.12 89/03/27 SMI;
.TH AUTOMOUNT 8 "20 January 1988"
.SH NAME
automount \- automatically mount NFS file systems
.SH SYNOPSIS
.B automount
[
.B \-mnT
] [
.BI \-tl " duration"
] [
.BI \-tm " interval"
] [
.BI \-tw " interval"
]
.if t .ti +.5i
[
.I directory
.I mapname
.RI [ " \-mount-options " ]
] .\|.\|.
.SH DESCRIPTION
.IX "automount command" "" "\fLautomount\fP command"
.B automount
is a daemon that will automatically and transparently mount an
.SM NFS
file system whenever a file or directory
within in that system is opened.
.B automount
forks a daemon, which appears to be an
.SM NFS
server to the kernel; lookups on the specified
.I directory
are intercepted by this daemon, which uses the map contained in
.I mapname
to determine a server, exported file system, and appropriate
mount options for a given file system.
The named map can either be a file on the local system, or a
Yellow Pages map.
.I directory
is a full pathname starting with a 
.RB ` / '.
.LP
When supplied,
.I \-mount-options
consists of the leading
.B \-
and a comma-separate list of 
.BR mount (8)
options; if mount options are specified in the map, however,
those in the map take precedence.
.LP
Once mounted, members of the
.I directory
are made available using a symbolic link
to the real mount point within a temporary directory.
.LP
If
.I directory
does not exist, the daemon creates it, and then removes it
automatically when the daemon exits.
.LP
Since the name-to-location binding is dynamic, updates to a Yellow Pages
map are transparent to the user.
This obviates the need to ``pre-mount'' shared file
systems for applications that have ``hard coded'' references to files.
It also obviates the need to maintain records of which hosts
must be mounted for what applications.
.SS Maps
.B automount
looks first for the indicated
.I mapname
in a file by that name. If there is no such file, it looks
for a YP map by that name.
.LP
An automount map is composed of a list of mappings, with one
mapping per line.  Each mapping is composed of the following fields:
.IP
.I
basename\ \ \ \fR[\fB\-\fImount-options\|\fR]\fI\ \ \ location\ \ \ \fR[\.\|.\|.]\fP
.LP
where
.I basename
is the name of a subdirectory within the
.I directory
specified in the
.B automount
command line (not a relative pathname).  The
.I location
field consists of an entry of the form:
.IP
\fIhost\|\fB:\fIdirectory\|\fR[\fB:\fIsubdir\|\fR]
.LP
where
.I host
is the name of the host from which to mount the file system,
.I directory
is the pathname of the directory to mount, and
.IR subdir ,
when supplied, is the name of a subdirectory to which the
symbolic link is made.  This can be used to prevent duplicate
mounts in cases where multiple directories in the same remote
file system are accessed.
.LP
The contents of a YP map can be included within a map
by adding an entry of the form:
.IP
.BI + mapname
.LP
A mapping can be continued across line breaks using a 
.B \e
as the last character before the
.SM NEWLINE.
Comments begin with a
.B  #
and end at the subsequent
.SM NEWLINE.
.LP
If more than one
.I location
is supplied, there is no guarantee as to which location will be
used; the first location to respond to the mount request gets
mounted.
The
.I mount-options
field can be used to supply options to the
.BR mount (8)
command for the mounted file system.
.br
.ne 8
.SS Special Maps
.LP
There are two special maps currently available.  The
.B \-hosts
map uses the Yellow Pages
.B hosts.byname
map to locate a remote host when the hostname is specified as a
subdirectory of
.IR directory .
This map specifies mounts of all exported file systems from any host.
For instance, if the following
.B automount
command is already in effect:
.IP
.B automount /net \-hosts
.LP
then a reference to
.B /net/hermes/usr
would initiate an automatic mount of all file systems from
.B hermes
that
.B automount
can mount; references to a directory under
.B /net/hermes
will refer to the corresponding directory on
.BR hermes .
The
.B \-passwd
map uses the
.BR passwd (5)
database to attempt to locate the home directory
of a user.  For instance, if the following
.B automount
command is already in effect:
.IP
.B automount /homes \-passwd
.LP
then if the home directory shown
in the passwd entry for the user
.I username
has the form
.BI / dir / server / username\fR,
and
.B server
matches the host system on which that directory resides,
references to files in
.BI /homes/ username
result in the file system containing that directory being mounted if necessary,
and all such references will refer to that user's home directory.
.SS Configuration
.B automount
normally consults the
.B auto.master
Yellow Pages configuration database for a list of initial
.IR directory
to
.I mapname
pairs, and sets up automatic mounts for them in addition to
those given on the command line; if there are duplications, the
command-line arguments take precedence.
(Note that this database contains arguments to the
.B automount
command, rather than mappings, and that
.B automount
does 
.I not
look for an
.B auto.master
file on the local host.)
.SH OPTIONS
.TP
.B \-m
Suppress initialization of
.IR directory - mapname
pairs listed in the
.B auto.master
Yellow Pages database.
.TP
.B \-n
Disable dynamic mounts.  With this option, references through the
.B automount
daemon only succeed when the target filesystem has been previously
mounted.  This can be used to prevent
.SM NFS
servers from cross-mounting each other.
.TP
.B -T
Trace.  Expand each
.SM NFS
call and display it on the standard output.
.TP
.BI \-tl " duration"
Specify a
.IR duration ,
in seconds, that a looked up name remains
cached when not in use.  The default is 5 minutes.
.TP
.BI \-tm " interval"
Specify an
.IR interval ,
in seconds, between attempts
to mount a filesystem. The default is 30 seconds.
.TP
.BI \-tw " interval"
Specify an
.IR interval ,
in seconds, between attempts to dismount
filesystems that have exceeded their cached times.
The default is 1 minute.
.SH EXAMPLE
.IP
.B
tutorial# automount \-m /net \-hosts
.LP
Provide
.B automount
access to the exported file systems of
any host in the Yellow Pages
.B hosts.byname
database, by prefixing the pathname with
.BI /net/ hostname "/ :"
.IP
.B
tutorial% ls /net/hermes/usr/src
\&.\|.\|.
.SH FILES
.PD 0
.TP 20
.B /tmp_mnt
directory under which filesystems are dynamically mounted
.PD
.SH "SEE ALSO"
.BR mount (8)
.SH BUGS
Shell filename expansion does not apply to objects not currently
mounted or cached.  For instance, in the above example, the
command
.B ls /net/*
might not list
.B hermes
as a subdirectory of
.BR /net .
 the subsequent
.SM NEWLINE.
.LP
If mor./share/man/man8/biod.8                                                                                755       0      12           62  4424741602   7657                                                                                                                                                                                                                                                                                                                                                                      .so man8/nfsd.8
.\" @(#)biod.8 1.6 89/03/27 SMI; 
 bootparamd.8  4  H    c2conv.8  4  `    captoinfo.8v  `  t    catman.8  `    t  chown.8     u  chroot.8 .8     v  client.8 .8     w  clri.8 8    x  	comsat.8c  8    y  config.8   e     z  crash.8s  ri    {  cron.8 s  $  |  dcheck.8 8 s  4  }  devnm.8   D  ~  dkctl.8   T    dmesg.8   d    dump.8 s  x    dumpfs.8 8 s      	edquota.8        	eeprom.8s mp      	./share/man/man8/boot.8s                                                                               755       0      12        16530  4424741602  10157                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)boot.8s 1.31 89/03/27 SMI;
.TH BOOT 8S "22 March 1989"
.SH NAME
boot \- start the system kernel, or a standalone program
.SH SYNOPSIS
.sp .5v
.B >b
[
.I device
[
.BI ( c , \|u\c
.BI ,\| p )
] ] [
.I filename
] [
.B \-a
]
.I boot-flags
.br
.B >b?
.br
.B >b!
.SH DESCRIPTION
.IX  "boot command"  ""  "\fLboot\fP \(em system startup procedures"
.IX  "bootstrap procedures"  ""  "bootstrap procedures \(em \fLboot\fP"
.IX  "autoboot procedures"  ""  "autoboot procedures \(em \fLboot\fP"
.IX  "startup procedures"  ""  "startup procedures \(em \fLboot\fP"
The boot program is started by the
.SM PROM
monitor and loads the
kernel, or another executable program, into memory.
.LP
The form
.B b?
displays all boot devices and their device arguments.
.LP
The form
.B b!
boots, but does not perform a
.SM RESET\s0.
.SH USAGE
.SS "Booting Standalone"
.LP
When booting standalone, the boot program
.RB ( /boot )
is brought in by the
.SM PROM
from the file system.  This program contains drivers for all devices.
.SS "Booting a Sun-3 System Over the Network"
.LP
When booting over the network, the Sun-3 system
.SM PROM
obtains a version of the boot program from
a server using the Trivial File
Transfer Protocol (\s-1TFTP\s0).
The client broadcasts a
.SM RARP
request containing its Ethernet address.
A server responds with the client's
Internet address.  The client then sends a
.SM TFTP
request for its boot program to that
server (or if that fails, it broadcasts
the request).  The filename requested
(unqualified \(em not a pathname)
is the hexadecimal, uppercase representation
of the client's Internet address, for example:
.IP
.ta +20n
.ft B
Using \s-1IP\s0 Address		192.9.1.17 = C0090111
.ft R
.LP
When the Sun server receives the request, it looks in the directory
.B /tftpboot
for
.IR filename .
That file is typically a symbolic link to the client's boot program,
normally
.B boot.sun3
in the same directory.  The server invokes the
.SM TFTP
server,
.BR tftpd (8C),
to transfer the file to the client.
.LP
When the file is successfully read in by the client, the boot program
jumps to the load-point and loads
.B vmunix
(or a standalone program).  In order to do this,
the boot program makes a broadcast
.SM RARP
request to find the client's
.SM IP
address,
and then makes a second broadcast request to a
.BR bootparamd (8)
bootparams daemon, for information necessary to boot the client.
The bootparams daemon obtains this information either from a local
.B /etc/bootparams
database file, or from a
Yellow Pages (\s-1\YP\s0) map.  The boot program sends two requests
to the bootparams daemon, the first,
.BR whoami ,
to obtain its hostname, and the second,
.BR getfile ,
to obtain the name of the client's server and the pathname of
the client's root partition.
.LP
The boot program then performs a
.BR mount (8)
operation to mount the client's root partition,
after which it can read in and execute
any program within that partition by pathname
(including a symbolic link to another file within that same
partition).  Typically, it reads in the file
.BR /vmunix .
If the program is not read in successfully,
.B boot
responds with a short diagnostic message.
.SS "Booting a Sun-2, Sun-4, or Sun386i System Over the Network"
.LP
Sun-2, Sun-4 and Sun386i systems boot over the network in a similar
fashion.  However, the filename requested from a server must
have a suffix that reflects the system architecture of the
machine being booted.  For these systems, the requested filename
has the form:
.IP
.IB ip-address . arch
.LP
where
.I ip-address
is the machine's Internet Protocol
(\s-1IP\s0) address in hex, and
.I arch
is a suffix representing its architecture.
(Only Sun-3 systems may omit the
.I arch
suffix.)  These filenames are restricted to 14 characters
for compatibility with 
.UX
System V and other operating systems.
Therefore, the architecture suffix is limited to 5 characters;
it must be in upper case.  At present, the following suffixes are
recognized:
.SB SUN2
for Sun-2 system,
.SB SUN3
for Sun-3 system,
.SB SUN4
for Sun-4 system,
.SB S386 
for Sun386i system,
and
.SM
.BR PCNFS
for
.SM PC-NFS.
.LP
Note: a Sun-2 system boots from its server using one extra step.
It broadcasts an
.SM ND
request which is intercepted by the user-level
.BR ndbootd (8c)
server.  This server sends back a standalone program that carries out
the same
.SM TFTP
request sequence as is done for all the other systems.
.SS "System Startup"
Once the system is loaded and running, the
kernel performs some internal housekeeping, configures its
device drivers, and allocates its internal tables and buffers.
The kernel then starts process number 1 to run
.BR init (8),
which performs file system housekeeping, starts system daemons,
initializes the system console, and begins multiuser operation.
Some of these activities are omitted when
.B init
is invoked with certain
.IR boot-flags .
These are typically entered as arguments to the boot command,
and passed along by the kernel to
.BR init .
.SH OPTIONS
.TP 12
.I device
One of:
.RS
.LP
.nf
.ta +10n
\fBie\fR 	Intel Ethernet
\fBec\fR 	3Com Ethernet
\fBle\fR 	Lance Ethernet (Sun 3-50 system)
\fBsd\fR 	\s-1SCSI\s0 disk
\fBst\fR 	\s-1SCSI\s0 1/4" tape
\fBmt\fR 	Tape Master 9-track 1/2" tape
\fBxt\fR 	Xylogics 1/2" tape
\fBxy\fR 	Xylogics 440/450 disk
.fi
.RE
.TP
.I c
Controller number,
.B 0
if there is only one controller for the indicated
type of device.
.TP
.I u
Unit number,
.B 0
if only there is only one driver.
.TP
.I filename
Name of a standalone program in the selected partition, such as
.BR stand/diag
or
.BR vmunix .
Note:
.I filename
is relative to the root of the selected
device and partition.  It never begins with
.RB ` / '
(slash).
If
.I filename
is not given, the boot program uses a default value (normally
.BR vmunix ).
This is stored in the
.B vmunix
variable in the
.B boot
executable file supplied by Sun, but can
be patched to indicate another
standalone program loaded using
.BR adb (1).
.TP
.B \-a
Prompt interactively for the device and name of the file to boot.
For more information on how to boot from a specific device, refer to
.TX INSTALL .
.TP
.I boot-flags
The boot program passes all
.I boot-flags
to the kernel or standalone program.  They are typically  arguments to
that program or, as with those listed below, arguments to programs
that it invokes.
.RS
.TP
.B \-b
Pass the
.B \-b
flag through the kernel to
.BR init (8)
so as to skip execution of the
.B /etc/rc.boot
script.
.TP 15
.B \-h
Halt after loading
the system.
.TP
.B \-s
Pass the
.B \-s
flag through the kernel to
.BR init (8)
for single-user operation.
.TP
.BI \-i " initname"
Pass the
.BI \-i " initname"
to the kernel to tell it to run
.I initname
as the first program rather than the default
.BR /single/init .
.RE
.SH FILES
.PD 0
.TP 20
.B /boot
standalone boot program
.TP
.B /tftpboot/????????
symbolic link to the boot program for a client
.TP
.B /tftpboot/boot.sun3
programs to boot from the client's root partition
.TP
.B /usr/etc/in.tftpd
\s-1TFTP\s0
server
.TP
.B /usr/mdec/installboot
program to install boot blocks from a remote host
.TP
.B /vmunix
.TP
.B /usr/boot
.TP
.B /etc/bootparams
.PD
.SH SEE ALSO
.BR bootparamd (8),
.BR init (8),
.BR kadb (8S),
.BR monitor (8S),
.BR mount (8),
.BR ndbootd (8C),
.BR rc (8),
.BR reboot (8),
.BR tftpd (8C),
.BR adb (1),
.BR tftp (1)
.LP
.TX INSTALL
.br
.TX ADMIN
.SH BUGS
On the Sun-2 system, the
.SM PROM
passes in the default name
.BR vmunix ,
overriding the the boot program's patchable default.

.B boot.sun3
in the same directory.  The server invokes the
.SM TFTP
server,
.BR tftpd (8C),
to transfer the file to the client.
.LP
When the file is successfully read./share/man/man8/bootparamd.8                                                                          755       0      12         1253  4424741602  11135                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)bootparamd.8 1.10 89/03/27 SMI
.TH BOOTPARAMD 8 "22 March 1989"
.SH NAME
bootparamd \- boot parameter server
.SH SYNOPSIS
.B /usr/etc/rpc.bootparamd
[
.B \-d
]
.SH DESCRIPTION
.IX "bootparamd daemon" "" "\fLbootparamd\fP daemon"
.LP
.B bootparamd
is a server process that provides information to diskless clients
necessary for booting. It consults either the
.B bootparams
database or the
.B /etc/bootparams
file if the Yellow Pages
(\s-1YP\s0)
service is not running.
.LP
.B bootparamd
can be invoked either by
.BR inetd (8C)
or by the user.
.SH OPTIONS
.TP
.B \-d
Display the debugging information.
.SH FILES
.PD 0
.TP 20
.B /etc/bootparams
.PD
.SH SEE ALSO
.BR inetd (8C)
nload.8   x    fparel.8  x      fpaversion.8        fpurel.8        
fpuversion4.8       fsck.8       	fsirand.8       ftpd.8c        getty.8       gettable.8c   (    
gpconfig.8 (  8    grpck.8   H    halt.8    \    htable.8  \  p    icheck.8  p    ./share/man/man8/c2conv.8                                                                              755       0      12         3030  4424741602  10172                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)c2conv.8 1.9 89/03/27 SMI;
.TH C2CONV 8 "22 March 1989"
.SH NAME
C2conv, C2unconv \- convert system to or from C2 security
.SH SYNOPSIS
.B C2conv
.LP
.B C2unconv
.SH AVAILABILITY
This program is available with the
.I Security
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  C2conv  ""  "\fLC2conv\fP \(em convert to C2 security"
.LP
.B C2conv
converts a standard SunOS system to operate with C2-level security.
.LP
The program prompts for information regarding
installation base, client systems (if the system is a SunDisk server),
audit devices (if it is an audit file server), and names of
file systems (if it is a remote audit server). The program also
requests certain information for the
.BR audit_control (5)
file; default values may be used for audit flags and for the 
"minfree" value.
Finally, it requests the user ID of person (or list of persons)
to notify (by
.BR mail (1))
when C2 administrative tasks are required.  The default ID is
.B root 
for the host being converted.
.LP
Once it has this information,
.B C2conv
uses it to set up the necessary files for a C2 secure system,
reporting on its progress as it proceeds.
.LP
.B C2unconv
backs out the changes made to
.B /etc/passwd
and
.BR /etc/group .
It does not back out changes to other files.
.SH "FILES"
.PD 0
.TP 25
.B /etc/passwd
.TP
.B /etc/group
.\" .TP
.\" .B /etc/security/audit/audit_warn
.\" .TP
.\" .B /etc/security/audit/audit_control
.TP
.B /etc/fstab
.PD
.SH "SEE ALSO"
.BR audit_control (5)
  p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o      list.8       lockd.8c ist      logintool.8       lpc.8 gi      lpd.8        mailstats.8   $    	makedbm.8 at  8    	makedev.8 m.  L    	makekey.8 v.  `    
mconnect.8 .  t    mkfile.8 ect      mkfs.8 i      mknod.8       	mkproto.8 no      	modload.8 o.      	modstat.8 d.      modunload.8        
./share/man/man8/captoinfo.8v                                                                          755       0      12        12003  4424741603  11171                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)captoinfo.8v 1.9 89/03/27 SMI; from S5
.TH CAPTOINFO 8V "17 November 1987"
.SH NAME
captoinfo \- convert a termcap description into a terminfo description
.SH SYNOPSIS
.BR captoinfo
.RB [ " \-v " .\|.\|.\|]
.RB [ \-V ]
.RB [ \-1 ]
.RB [ \-w
.IR width " ]"
.IR filename .\|.\|.
.SH DESCRIPTION
.IX "captoinfo command" "" "\fLcaptoinfo\fP command"
.B captoinfo
converts the
.BR termcap (5)
the terminal description entries given in
.I filename
into
.BR terminfo (5V)
source entries, and writes them to the standard output along with any
comments found in that file.
A description that is expressed as relative to another description (as
specified in the
.B termcap
.IR tc=
capability) is reduced to the minimum superset before being written.
.LP
If no
.I filename
is given, then the environment variable
.SB TERMCAP
is used for the filename or entry.
If
.SB TERMCAP
is a full pathname to a file, only the terminal-name is specified in
the environment variable
.SB TERM
is extracted from that file.
If that environment variable is not set, then the file
.B /etc/termcap
is read.
.SH OPTIONS
.TP
.B \-v
Verbose.  Print tracing information on the standard error as the
program runs.  Additional
.B \-v
options increase the level of detail.
.TP
.B \-V
Version.  Display the version of the program on the standard error and
exit.
.TP
.B \-1
Print fields one-per-line.
Otherwise, fields are printed several to a line, to a maximum width
of 60 characters.
.TP
.BI \-w " width"
Change the output to
.I width
characters.
.SH CAVEATS
Certain
.B termcap
defaults are assumed to be true.  The bell character
.RB ( terminfo
.BR bel )
is assumed to be
.BR ^G .
The linefeed capability
.RB ( termcap
.BR nl )
is assumed to be the same for both
.B cursor_down
and
.B scroll_forward
.RB ( terminfo
.BR cud1
and
.BR ind ,
respectively.)
Padding information is assumed to belong at the end of the string.
.LP
The algorithm used to expand parameterized information for
.B termcap
fields such as
.B cursor_position
.RB ( termcap
.BR cm ,
.B terminfo
.BR cup )
can sometimes produce a string that may not be optimal.
In particular, the rarely used
.B termcap
operation
.BI % n
produces strings that are especially long.
Most occurrences of these non-optimal strings
will be flagged with a warning
message and may need to be recoded by hand.
.LP
The short two-letter name at the beginning of the list of names in a
.B termcap
entry, a hold-over from an earlier version of the
system, has been removed.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/?/*
compiled terminal description database
.TP
.B /etc/termcap
.PD
.SH "SEE ALSO"
.BR curses (3V),
.BR termcap (5),
.BR terminfo (5V),
.BR infocmp (8V),
.BR tic (8V)
.SH DIAGNOSTICS
.TP
.B tgetent failed with return code n (reason).
The termcap entry is not valid.
In particular, check for an invalid
.RB ` tc= '
entry.
.TP
.B
unknown type given for the termcap code \fIcc\f1.
The termcap description had an entry for
\fIcc\f1
whose type was not boolean, numeric or string.
.TP
.B
wrong type given for the boolean (numeric, string) termcap code \fIcc\f1.
The boolean
.B termcap
entry
\fIcc\f1
was entered as a numeric or string capability.
.TP
.B
the boolean (numeric, string) termcap code \fIcc\fB is not a valid name.
An unknown
.B termcap
code was specified.
.TP
.B tgetent failed on \s-1TERM\s0=term.
The terminal type specified could not be found in the
\fBtermcap\f1
file.
.TP
.SB TERM\s0=term: cap \fIcc\fP (info \fIii\fP) is \s-1NULL: REMOVED\s0
The
\fBtermcap\fR
code was specified as a null string.
The correct way to cancel an entry is with an
.RB ` @ ',
as in
.RB ` :bs@: '.
Giving a null string could cause incorrect
assumptions to be made by the software which uses
.BR "termcap " or " terminfo" .
.TP
.B
a function key for \fIcc\fB was specified, but it already has the value
\fIvv\f1.
When parsing the
\fBko\f1
capability, the key
\fIcc\f1
was specified as having the
same value as the capability
\fIcc\f1,
but the key
\fIcc\f1
already had a value
assigned to it.
.TP
.B
the unknown termcap name \fIcc\fB was specified in the \fBko\fB termcap capability.
A key was specified in the
\fBko\f1
capability which could not be handled.
.TP
.B
the \fIvi\fP character v (info \fIii\fP) has the value \fIxx\fB, but ma gives n.
The
\fBma\f1 capability specified a function key
with a value different from
that specified in another setting of the same key.
.TP
.B
the unknown \fIvi\fB key v was specified in the ma termcap capability.
A
.BR vi (1)
key unknown to
\fBcaptoinfo\f1
was specified in the
\fBma\f1
capability.
.TP
.B
Warning: termcap sg (\fInn\fP) and termcap ug (\fInn\fP) had different values.
\fBterminfo\f1 assumes that
the
\fBsg\f1
(now
\fBxmc\f1)
and
\fBug\f1
values were the same.
.TP
.B
Warning: the string produced for \fIii\fB may be inefficient.
The parameterized string being created should be rewritten by hand.
.TP
.B
Null termname given.
The terminal type was null.
This is given if
the environment variable
.SB TERM
is not set or is null.
.TP
.B
cannot open \fIfilename\fB for reading.
The specified file could not be opened.
.\".SH AUTHOR
.\"Tony Hansen.
B termcap
defaults are assumed to be true.  The bell character
.RB ( terminfo
.BR bel )
is assumed to be
.BR ^G .
The linefeed capability
.RB ( termcap
.BR nl )
is assumed to be the same for both
.B cursor_down
and
.B scroll_forward
.RB ( terminfo
.BR cud1
and
.BR ind ,
respectively.)
Padding information is assumed to belong at the end of the string.
.LP
The algorithm used to expand parameterized information for
.B termcap
fields such as
.B cursor_position
.RB ( termcap
.BR cm ,
.B terminfo
.BR cup )
can./share/man/man8/catman.8                                                                              755       0      12         6362  4424741603  10257                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)catman.8 1.23 89/03/27 SMI; from UCB 4.3 BSD
.TH CATMAN 8 "9 September 1987"
.SH NAME
catman \- create the cat files for the manual
.SH SYNOPSIS
.B /usr/etc/catman
.RB "[\|" \-nptw "\|]"
.RB "[\|" \-M "
.B directory
]
.RB "[\|" \-T "
.I tmac.an
] [
.I sections
]
.SH DESCRIPTION
.IX  "catman command"  ""  "\fLcatman\fP \(em create cat files for manual pages"
.IX  "create" "cat files for manual pages \(em \fLcatman\fP"
.IX  "manual pages"  "create \fLcat\fR files for \(em \fLcatman\fP"
.IX  "system administration"  catman  ""  "\fLcatman\fP \(em create cat files for manual pages"
.B catman
creates the preformatted versions of
the on-line manual from the
.BR nroff (1)
input files.
Each manual page is examined and those whose preformatted versions are
missing or out of date are recreated.
If any changes are made,
.B catman
recreates the
.B whatis
database.
.LP
If there is one parameter not starting with a
.RB ` \- ',
it is taken to be a list of manual sections to look in.
For example
.IP
.B catman 123
.LP
only updates manual sections
.BR 1 ,
.BR 2 ,
and
.BR 3 .
.LP
If an unformatted source file contains only a line
of the form
.RB ` ".so manx/yyy.x" ',
a symbolic link is made in the catx or fmtx directory
to the appropriate preformatted manual page.
This feature allows easy distribution of the preformatted manual pages
among a group of associated machines with
.BR rdist (1),
since it makes the directories of preformatted manual pages
self-contained and independent of the unformatted entries.
.SH OPTIONS
.TP
.B \-n
Do not (re)create the
.B whatis
database.
.TP
.B \-p
Print what would be done instead of doing it.
.TP
.B \-t
Create
.BR troff ed
entries in the appropriate
.B fmt
subdirectories instead of
.BR nroff ing
into the
.B cat
subdirectories.
.TP
.B \-w
Only create the
.B whatis
database.  No manual reformatting is done.
.TP
.B \-M
Update manual pages located in the specified
.B directory
.RB ( /usr/share/man
by default).
.TP
.B \-T
Use
.B tmac.an
in place of the standard manual page macros.
.SH ENVIRONMENT
.PD 0
.TP \w'\s-1TROFF\s0'u+(3n)u
.SB TROFF
The name of the formatter to use when the
.B \-t
flag is given.
If not set,
.RB ` troff '
is used.
.PD
.SH FILES
.PD 0
.TP 20
.B /usr/share/man
default manual directory location
.TP
.B /usr/share/man/man?/*.*
raw (nroff input) manual sections
.TP
.B /usr/share/man/cat?/*.*
preformatted
.BR nroff ed
manual pages
.TP
.B /usr/share/man/fmt?/*.*
preformatted
.BR troff ed
manual pages
.TP
.B /usr/share/man/whatis	
.B whatis
database location
.TP
.B /usr/lib/makewhatis
command script to make whatis database
.PD
.SH "SEE ALSO"
.BR man (1),
.BR nroff (1),
.BR rdist (1),
.BR troff (1),
.BR whatis (1)
.SH DIAGNOSTICS
.TP
.B
man?/xxx.? (.so'ed from man?/yyy.?): No such file or directory
The file outside the parentheses is missing, and is referred to
by the file inside them.
.TP
.B
target of .so in man?/xxx.? must be relative to /usr/man
.B catman
only allows references to filenames that are relative to the directory
.B /usr/share/man.
.br
.ne 5
.TP
.B opendir:man?: No such file or directory
A harmless warning message indicating that one of the directories
.B catman
normally looks for is missing.
.TP
.B *.*: No such file or directory
A harmless warning message indicating
.B catman
came across an empty directory.
c.sprayd.8c H  x    rpc.statd.8c  `        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d../share/man/man8/chown.8                                                                               755       0      12         2720  4424741603  10124                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)chown.8 1.17 89/03/27 SMI; from UCB 6.2 5/22/86
.TH CHOWN 8 "22 March 1989"
.SH NAME
chown \- change owner
.SH SYNOPSIS
.B /usr/etc/chown
[
.B \-fHR
] 
.IR owner [. group ] " filename " .\|.\|.
.SH DESCRIPTION
.IX  "chown command"  ""  "\fLchown\fP \(em change owner of file"
.IX  file  "change ownership"  file  "change ownership \(em \fLchown\fP"
.IX  "owner of file, change \(em \fLchown\fP"
.IX change "owner of file \(em \fLchown\fR"
.IX  "user ID"  "\fLchown\fR \(em change user ID of file"
.LP
.B chown
changes the owner of the
.IR filename s
to
.IR owner .
The owner may be either a decimal user
.SM ID
(\s-1UID\s0)
or
a login name found in the password file.
An optional
.I group
may also be specified.
The group may be either a decimal group
.SM ID
(\s-1GID\s0)
or a group name found in the \s-1GID\s0 file.
.LP
Only the super-user can change owner,
in order to simplify accounting procedures.
.SH OPTIONS
.TP
.B \-f
Do not report errors.
.TP
.B \-R
Recursively descend into directories
setting the ownership of all files in
each directory encountered.
When symbolic links are encountered, their ownership is changed,
but they are not traversed.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
password file
.PD
.SH "SEE ALSO"
.BR chgrp (1),
.BR chown (2),
.BR group (5),
.BR passwd (5)
    
keyserv.8c        kgmon.8     ./share/man/man8/chroot.8                                                                              755       0      12         2230  4424741603  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)chroot.8 1.10 89/03/27 SMI; from S5R2 6.2
.TH CHROOT 8 "9 September 1987"
.SH NAME
chroot \- change root directory for a command
.SH SYNOPSIS
.B /usr/etc/chroot
.I newroot command
.SH DESCRIPTION
.IX chroot "" "\fLchroot\fR \(em change root directory for a command"
.IX "root directory, change for a command \(em \fLchroot\fR"
.LP
The given command is executed
.IR relative
to the new root.  The meaning of any initial
.RB ` /\^ '
(slashes) in path names is changed for a
command and any of its children to
.IR newroot .
Furthermore, the initial working directory is
.IR newroot .
.LP
Input and output redirections on the
command line are made with respect to  the
.I original
root:
.IP
.B chroot \|newroot \|command \|>x
.LP
creates the file
.I x
relative to the original root, not the new one.
.LP
This command is restricted to the super-user.
.LP
The new root path name is always relative
to the current root: even if a
.B chroot
is already in effect; the
.I newroot
argument is relative to the current root of the running process.
.SH SEE ALSO
.BR chdir (2)
.SH BUGS
One should exercise extreme caution when referring to special files
in the new root file system.
  x    
in.telnetd.8c       in.tftpd.8c       in.tnamed.8c        inetd.8c        
infocmp.8v       init.8 c       installboot.8s       intro.8   $    iostat.8  $  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c p      kgmon.8       
ldconfig.8   ./share/man/man8/client.8                                                                              755       0      12         6247  4424741603  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)client.8	1.9 Copyright 1988 Sun Microsystems Inc.
.TH CLIENT 8 "22 March 1989"
.SH NAME
client \- add or remove diskless Sun386i systems
.SH SYNOPSIS 
.B client 
[
.B \-a
.I arch
] [
.B \-h
.I hostid
] [ 
.B \-o
.I os
] [
.B \-q
] [
.B \-t
.I minutes
]
.B add 
.I bootserver
.I client 
.I etheraddress
.I ipaddress
.LP
.B client remove
.I client
.LP
.B client modify
.I client
[
.B diskful
|
.B diskless
|
.B slave
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "client command" "" "\fLclient\fP command"
.B client
can be used to manually add and remove diskless clients of a PNP
boot server.
After successful completion of the command, the diskless client
can boot.
Only users in the
.I networks
group (group 12) on the boot server
are allowed to change configurations using this utility. 
.B client
can be invoked from any system on the network.
.LP
The boot server
of a system is the only machine truly required for that system to boot to
the point of allowing user logins; it must accordingly provide
name, booting, and time services.
Diskless clients can provide none of these services themselves.
Diskful clients, however can provide most of their own boot services.
Network clients only need name and time services from the network,
and can use any boot server.
.LP
To add a diskless client, use the 
.B add
operation.  To remove a
diskless, diskful, or network client, use the
.B remove 
operation.  To change a system's network role, use the
.B modify
operation.
.LP
A server can reject a configuration request if it is disallowed by the
contents of the 
.B bootservers
map (e.g., too many clients would
be configured, or too little free space would be left on the server),
or if no system software for the client is available.
.SH OPTIONS
.TP 12
.BI \-a " arch
Specifies the architecture code of the client; it defaults to
.BR s386 .
(Note: architecture codes are different from architecture
names.  Architecture codes are used in diskless booting, and are
at most five characters in length, while architecture names can be
longer.)
.TP
.BI \-h " hostid
Specifies the host ID of the client; if supplied, it is used
as the root password for the system.  It defaults to the null
string.
.TP
.BI \-o " os
Specifies the operating system; defaults to 'unix'.  This
is currently used only to construct the system's 
.I publickey
data,
where applicable; this is never done if the system has no 
.I hostid
specified.
.TP
.B \-q
Quiet.  Displays only error messages.
.TP
.BI \-t " minutes
Sets the 
.SM RPC 
timeout to the number of minutes indicated; this
defaults to 15 minutes.  If the bootserver takes more time than this 
to complete, 
.B client
will exit.  Unless the server has
already completed setup, but not yet sent status to 
.BR client ,
this will cause the bootserver to back out of the setup, deallocating
all assigned resources.
.SH "SEE ALSO"
.BR pnpd (8C), 
.BR netconfig (8C),
.BR publickey (5)
.SH BUGS
.\".LP
.\"The concept of a default architecture should go away.
.LP
Unless the 
.I hostid
is assigned, the root filesystem for the diskless
client is not set up beyond copying the 
.B proto 
and 
.B boot
files
into it.
This means that 
.B netconfig
will often handle other parts of the setup.
  
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c   
8  (  	rwalld.8c  $  
L  )  rwhod.8c  
8  
\  *  sa.8 .8c  
p  +  
savecore.8 ../share/man/man8/clri.8                                                                                755       0      12         2532  4424741603   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)clri.8 1.11 89/03/27 SMI; from UCB 4.2
.TH CLRI 8  "9 September 1987"
.SH NAME
clri \- clear inode
.SH SYNOPSIS
.B /usr/etc/clri
.I filesystem
.IR i-number .\|.\|.
.SH DESCRIPTION
.IX  "clri command"  ""  "\fLclri\fP \(em clear inode"
.IX  "clear inode"  ""  "clear inode \(em \fLclri\fP"
.IX  "inode, clear \(em \fLclri\fP"
.LP
Note:
.B clri
has been superceded for normal file system repair work by
.BR fsck (8).
.LP
.B clri
writes zeros on the inodes
with the decimal
.I i-numbers
on the
.IR filesystem .
After
.B clri,
any blocks
in the affected file
will show up as ``missing'' in an
.BR icheck (8)
of the
.I filesystem.
.LP
Read and write permission is required on the specified
file system device.
The inode becomes allocatable.
.LP
The primary purpose of this routine
is to remove a file which
for some reason appears in no
directory.
If it is used to zap an inode
which does appear in a directory, care should be taken to track down
the entry and remove it.
Otherwise, when the inode is reallocated to some new file,
the old entry will still point to that file.
At that point removing the old entry will destroy the new file.
The new entry will again point to an unallocated inode,
so the whole cycle is likely to be repeated again and again.
.SH "SEE ALSO"
.BR icheck (8)
.BR fsck (8)
.SH BUGS
If the file is open,
.B clri
is likely to be ineffective.
c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      ./share/man/man8/comsat.8c                                                                             755       0      12         3032  4424741603  10434                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)comsat.8c 1.15 89/03/27 SMI; from UCB 4.2
.TH COMSAT 8C "22 March 1989"
.SH NAME
comsat, in.comsat \- biff server
.SH SYNOPSIS
.B /usr/etc/in.comsat
.SH DESCRIPTION
.IX  "comsat command"  ""  "\fLcomsat\fP \(em biff server"
.IX  "mail utilities"  comsat  "\fLmail\fR utilities"  "\fLcomsat\fP \(em biff server"
.IX  servers  comsat  ""  "\fLcomsat\fP \(em biff server"
.B comsat
is the server process which listens for reports of incoming
mail and notifies users who have requested to be told when
mail arrives.
It is invoked as needed by
.BR inetd (8C),
and times out if inactive for a few minutes.
.LP
.B comsat
listens on a datagram port associated with the
.BR biff (1)
service specification (see
.BR services (5))
for one line messages of the form
.IP
.B user@mailbox-offset
.LP
If the
.I user
specified is logged in to the system and the associated terminal has
the owner execute bit turned on (by a
.RB ` "biff y" '),
the
.I offset
is used as a seek offset into the appropriate mailbox file and
the first 7 lines or 560 characters of the message are printed
on the user's terminal.  Lines which appear to be part of
the message header other than the
.BR From ,
.BR To , 
.BR Date ,
or
.B Subject
lines are not printed when displaying the
message.
.SH FILES
.PD 0
.TP 20
.B /etc/utmp
to find out who's logged on and on what terminals
.PD
.SH "SEE ALSO"
.BR biff (1),
.BR services (5),
.BR inetd (8C)
.SH BUGS
The message header filtering is prone to error.
.LP
The notification should appear in a separate window so it
does not mess up the screen.
 lpc.8 8       lpd.8 oo      mailstats.8   $    	makedbm.8 $  8    	makedev.8 8  L    	makekey.8 L  `    
mconnect.8 `  t    mkfile.8  t      mkfs.8 L      mknod.8       	mkproto.8       	modload.8       	modstat.8       modunload.8        
monitor.8s        mount.8   $    	mountd.8c $  8    named.8c  8  L    ncheck.8  L  `    
ndbootd.8c `  x    netconfig.8c      ./share/man/man8/config.8                                                                              755       0      12        34340  4424741604  10277                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)config.8 1.36 89/03/27 SMI; from UCB 4.2
.TH CONFIG 8 "22 March 1989"
.SH NAME
config \- build system configuration files
.SH SYNOPSIS
.B /usr/etc/config
[
.B \-fgnp
]
[
.B \-o \fIobj_dir\fP
]
.I config_file
.SH DESCRIPTION
.IX  "config command"  ""  "\fLconfig\fP \(em build system configuration files"
.IX  "build" "system configuration files \(em \fLconfig\fP"
.IX  "create" "system configuration files \(em \fLconfig\fP"
.IX  "system configuration files, build \(em \fLconfig\fP"
.IX  "configuration files, build \(em \fLconfig\fP"
.LP
.B config
does the preparation necessary for building a new system kernel with
.BR make (1).
The
.I config_file
named on the command line describes the kernel to
be made in terms of options you want in your system, size of
tables, and device drivers to be included. When you run
.BR config ,
it uses several input files
located in the current directory (typically the
.B conf
subdirectory of the system source including your
.IR config_file ).
The format of this file is described below.
.LP
If the directory named
.BI \&.\|./ config_file
does not exist,
.B config
will create one.
One of
.BR config 's
output files is a makefile
which you use with
.BR make (1)
to build your system.
.LP
You use
.B config
as follows.
Run
.B config
from the
.B conf
subdirectory of the system source
(in a typical Sun environment, from
.BR /usr/share/sys/sun[\|2\|3\|4\|]/conf ):
.sp .5v
.RS
.nf
.ft B
example# /usr/etc/config config_file
Doing a "make depend"
example# cd .\|.\|/config_file
example# make
\& \fI.\|.\|.\|lots of output.\|.\|.\fR
.ft R
.fi
.RE
.LP
While
.B config
is running watch for any errors.
Never use a kernel which
.B config
has complained about; the results are unpredictable.
If
.B config
completes successfully, you can change directory
to the
.BI .\|. /config_file
directory, where it has placed the new makefile, and use
.BR make  
to build a kernel.
The output files placed in this directory include
.BR ioconf.c ,
which contains a description of I/O devices attached to the system;
.BR mbglue.s ,
which contains short assembly language routines used for
vectored interrupts, a makefile,
which is used by
.B make
to build the system; a set of header files
.RI ( device_name\fB.h\fP )
which contain the number of various devices that may
be compiled into the system;
and a set of swap configuration files which contain definitions for
the disk areas to be used for the root file system, swapping,
and system dumps.
.LP
Now you can install your new kernel and try it out.
.SH OPTIONS
.TP
.B \-f
Set up the makefile for fast builds. This is done by building a
.B vmunix.o
file which includes all the
.B \&.o
files which have no source.
This reduces the number of files which have to be
.BR stat ed
during a system build. 
This is done by prelinking all the files for which no source exists
into another file which is then linked in place of all these
files when the kernel is made.
This makefile is faster because it does not
.B stat
the object files during the build.
.TP
.B \-g
Get the current version of a missing source file from its 
.SM SCCS
history, if possible.
.TP
.B \-n
Do not do the
.RB ` "make depend" '.
Normally
.B config
will do the
.RB ` "make depend" '
automatically.
If this option is used
.B config
will print
`\fBDon't forget to do a "make depend"\fP'
before completing as a reminder.
.TP
.B \-p
Configure the system for profiling
(see
.BR kgmon (8)
and
.BR gprof (1)).
.TP
.BI \-o\  obj_dir
Use
.BI \&.\|./ obj_dir
instead of
.B \&.\|./\s-1OBJ\s0
as the directory to find the object files when the corresponding
source file is not present in order 
to generate the files necessary to compile and link
your kernel.
.SH USAGE
.SS "Input Grammar"
.LP
In the following descriptions, a number can be a decimal integer,
a whole octal number or a whole hexadecimal number.  Hex and octal numbers
are specified to
.B config
in the same way they are specified to the C
compiler, a number starting with
.B 0x 
is a hex number and a number starting with just a
.B  0 
is an octal number.  
.LP
Comments are begin with a
.RB  # 
character, and end at the next
.SM NEWLINE.
Lines beginning with
.SM TAB
characters are considered continuations of the previous line.
Lines of the configuration file can be one of two basic types.
First, there are lines which describe general things about your system:
.TP
\fBmachine "\fItype\fB"\fR
This is system is to run on the machine type specified.
Only one machine type can appear in the config file.
The legal
.IR type s
for a Sun system are
.BR sun2 ,
.BR sun3 ,
.BR sun4 ,
and
.BR sun386 .
Note: the double quotes around
.I type
are part of the syntax, and must be included.
.TP
\fBcpu "\fItype\fB"
This system is to run on the cpu type specified.
More than one cpu type can appear in the config file.
Legal
.IR type s
for a
.B sun2
machine are noted in the annotated config file in
.TX INSTALL .
.TP
.BI ident " name"
Give the system identifier \(em a name for the machine or machines that
run this kernel.  Note that
.I name
must be enclosed in double quotes if it contains both letters
and digits.
Also, note that if
.I name
is
.BR \s-1GENERIC\s0 ,
you need not include the
.RB ` "options \s-1GENERIC\s0" '
clause in order to specify
.RB ` "swap generic" '.
.TP
.BI maxusers " number"
The maximum expected number of simultaneously active user on this system is
.IR number .
This number is used to size several system data structures.
.TP
.BI options " optlist"
Compile the listed options into the system.
Options in this list are separated by commas.
.\"There is a list of options that you may specify in the generic makefile.
A line of the form:
.RS
.IP
.B options \s-1FUNNY\|,\|HAHA\s0
.RE
.IP
yields
.RS
.IP
.SB \-DFUNNY \-DHAHA
.RE
.IP
to the C compiler.
An option may be given a value, by following its name with
.B =
(equal sign) then the value enclosed in (double) quotes.
None of the standard options use such a value.
.IP
In addition, options can be used to bring in additional files if
the option is listed in the
.B files
files. 
All options should be listed in upper case. 
In this case, no corresponding
.IB option .h
will be created as it would be using the corresponding
.I pseudo-device
method.
.TP
.BI config " sysname config_clauses\|.\|.\|."
Generate a system with name
.I sysname 
and configuration as specified in
.IR config-clauses .
The
.I sysname
is used to name the resultant binary image
and per-system swap configuration files.
The
.I config_clauses
indicate the location for the
root file system, one or more disk partitions for swapping and paging,
and a disk partition to which system dumps should be made.
All but the root device specification may be omitted;
.B config
will assign default values as described below.
.RS
.TP
.B root
A root device specification is of the form
.RB ` "root on \fIxy0d\fP" '.
If a specific partition is omitted \(em for example, if only
.B root on xy0
is specified \(em the
.RB ` a '
partition is assumed. 
When a generic system is being built, no root
specification should be given; the root device will be defined
at boot time by prompting the console.
.TP
.B swap
To specify a swap partition, use a clause of the form:
.RB ` "swap on \fIpartition\fP" '.
Swapping areas may be almost any size.
Partitions used for swapping are sized at boot time by the system;
to override dynamic sizing of a swap area the number of sectors
in the swap area can be specified in the config file.
For example,
.RB ` "swap on \fIxy0b\fP size 99999" '
would configure a swap partition with 99999 sectors.  If
.B swap generic
or no
.I partition
is specified with
.BR on ,
partition b on the root device is used.  For dataless clients, use
.RB ` "swap on type nfs" '.
.br
.ne 7
.IP
To configure multiple swap partitions, specify multiple
.RB ` "swap on" '
clauses.  For example:
.RS
.IP
.B
config\ \ vmunix\ \ swap\ \ on\ \ xy0\ \ swap\ \ on xy1
.RE
.TP
.B dumps
The location to which system dumps are sent may be specified with
a clause of the form
.RB ` "dumps on \fIxy1\fP" '.
If no dump device is specified,
the first swap partition specified is used.  If a device is specified
without a particular partition, the
.RB ` b '
partition is assumed.
If a generic configuration is to be built, no dump device should
be specified; the dump device will be assigned to the swap device
dynamically configured at boot time.
Dumps are placed at the end of the partition specified.  Their size
and location is recorded in global kernel variables
.I dumpsize
and
.IR dumplo ,
respectively, for use by 
.BR savecore (8).
.RE
.LP
Device names specified in configuration clauses are mapped to block
device major numbers with the file
.BI devices. machine\fR,
where
.I machine
is the machine type previously specified in the configuration file.
If a device name to block device major number mapping must be overridden, a
device specification may be given in the form
.RB ` "major\fI x\fP minor\fI y\fP" '.
.LP
The second group of lines in the configuration file describe which
devices your system has and what they are connected to
(for example, a Xylogics 450 Disk Controller at address 0xee40
in the Multibus I/O space).
These lines have the following format:
.RS
.I "	dev_type\ \ \ \	dev_name\ \ \ "
.B at
.I "\ \ \ con_dev\ \ \ \ more_info"
.RE
.LP
.I dev_type
is either
.B controller,
.B disk,
.B tape,
.B device,
or
.B pseudo-device.
These types have the following meanings:
.RS
.TP 15
.B controller
A disk or tape controller.
.TP 
.BR disk " or " tape
Devices connected to a controller.
.TP
.B device
Something \(lqattached\(rq to the main system bus,
like a cartridge tape interface.
.TP
.B pseudo-device
A software subsystem or driver treated like a device driver, but without
any associated hardware.  Current examples are the pseudo-tty driver
and various network subsystems.
For pseudo-devices,
.B more_info
may be specified as an integer, that gives the value of the
symbol defined in the header file created for that device, and
is generally used to indicate the number of instances of the
pseudo-device to create. 
.RE
.LP
.I dev_name
is the standard device name and unit number (if the device is not a
.BR pseudo-device )
of the device you are specifying.
For example,
.B xyc0
is the
.I dev_name
for the first Xylogics controller in a system;
.B ar0
names the first quarter-inch tape controller.
.br
.ne 10
.LP
.I con_dev
is what the device you are specifying is connected to.
It is either nexus?, a bus type, or a controller.  
There are several bus types which  are used by
.B config
and the kernel.  
.LP
The different possible bus types are:
.RS
.sp .5
.PD 0
.TP 18
.B obmem
On board memory
.TP
.B obio
On board io
.TP
.B mbmem
Multibus memory
.RB ( sun2
system only)
.TP
.B mbio
Multibus io   
.RB ( sun2
system only)
.TP
.B vme16d16 (vme16)
16 bit
.SM VME\s0bus/
16 bit data
.TP
.B vme24d16 (vme24)
24 bit
.SM VME\s0bus/
16 bit data
.TP
.B vme32d16
32 bit
.SM VME\s0bus/
16 bit data
.RB ( sun3
system only)
.TP
.B vme16d32
16 bit
.SM VME\s0bus/
32 bit data
.RB ( sun3
system only)
.TP
.B vme24d32
24 bit
.SM VME\s0bus/
32 bit data
.RB ( sun3
system only)
.TP 
.B vme32d32 (vme32)
32 bit
.SM VME\s0bus/
32 bit data
.RB ( sun3
system only)
.PD
.RE
.LP
All of these bus types are declared to be connected to nexus.
The devices are hung off these buses.  If the bus is
wildcarded, then the autoconfiguation code will determine
if it is appropriate to probe for the device on the
machine that it is running on.  If the bus is numbered,
then the autoconfiguation code will only look for that
device on machine type
.BR  N .
In general, the Multibus and
.SM VME\s0bus
bus types are always wildcarded.
.br
.ne 10
.LP
.I more_info
is a sequence of the following:
.RS
.TP 18
.BI csr " address"
Specify the address of the 
.B csr 
(command and status registers) for a
device. The 
.B csr 
addresses specified for the device are  the
addresses within the bus type specified.  
.IP
The
.B csr
address must be specified for all controllers, and for all devices
connected to a main system bus.
.TP
.BI drive " number"
For a disk or tape, specify which drive this is.
.TP
.BI flags " number"
These flags are made available to the device driver, and are usually
read at system initialization time.
.TP
.BI priority " level"
For devices which interrupt, specify the interrupt
level at which the device operates.
.HP
.BI vector " intr number"
.RI [ " intr number . . . " ]
.br
For devices which use vectored interrupts on
.SM VME\s0bus
systems,
.I intr
specify the vectored interrupt routine and
.I number
the corresponding vector to be used (0x40-0x\s-1FF\s0).
.RE
.LP
A
.B ?
may be substituted for a number in two places and the system
will figure out what to fill in for the
.B ?
when it boots.
You can put question marks on a
.I con_dev
(for example, at virtual `?'), or on a drive number (for example, drive `?').
This allows redundancy, as a single system can
be built which will boot on different hardware configurations.
.LP
The easiest way to understand 
.B config 
files it to look at a working
one and modify it to suit your system.
Good examples are provided in
.TX INSTALL .
.br
.ne 6
.SH FILES
.LP
Files in
.B /usr/share/sys/sun[\|2\|3\|4\|]/conf
which may be useful for developing the
.I config_file
used by
.B config
are:
.LP
.RS
.TP 20
.SB GENERIC
These are generic configuration files for
either a Sun-2 or Sun-3 system.
They contain all possible device descriptions lines for the particular
architecture.	  
.TP
.SB README
File describing how to make a new kernel.
.RE
.LP
As shipped from Sun, the files used by
.B /usr/etc/config
as input are in the
.B /usr/include/sys/conf
directory:
.LP
.RS
.PD 0
.TP 20
.I config_file
System-specific configuration file
.TP
.B Makefile.src
Generic prototype makefile for Sun\-[23] systems
.TP
.B files
List of common files required to build a basic kernel
.TP
.B devices
Name to major device mapping file for Sun\-[23] systems
.PD
.RE
.LP
.B /usr/etc/config
places its output files in the
.BI .\|.\|/ config_file
directory:
.LP
.RS
.PD 0
.TP 20
.B mbglue.s
Short assembly language routines used for vectored interrupts
.TP
.B ioconf.c
Describes I/O devices attached to the system
.TP
.I makefile
Used with
.BR make (1)
to build the system
.TP
.IB device_name .h
a set of header files (various
.IR device_name 's)
containing devices which can be compiled into the system
.PD
.RE
.SH SEE ALSO
.BR gprof (1),
.BR make (1),
.BR kgmon (8),
.BR savecore (8)
.LP
The
.SM SYNOPSIS
portion of each device entry in Section 4 of this manual.
.LP
.TX INSTALL
.br
.TX ADMIN
ch describe general things about your system:
.TP
\fBmachine "\fItype\fB"\fR
This is system is to run on the machine type specified.
Only one machine type can appear in the config file.
The legal
.IR type s
for a Sun system are
.BR sun2 ,
.BR sun3 ,
.BR sun4 ,
and
.BR sun386 .
Note: the ./share/man/man8/crash.8s                                                                              755       0      12        10424  4424741604  10312                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)crash.8s 1.22 89/03/27 SMI; from UCB 4.2
.TH CRASH 8S "22 March 1989"
.SH NAME
crash \- what happens when the system crashes
.SH DESCRIPTION
.IX  "crash information"  ""  "\fLcrash\fP \(em crash information"
.LP
This section explains what happens when the system crashes and how
you can analyze crash dumps.
.LP
When the system crashes voluntarily, it displays a message of the form
.IP
.BI panic: " why i gave up the ghost"
.LP
on the console, takes a dump on a mass storage peripheral,
and then invokes an automatic reboot procedure as described in
.BR reboot (8).
Unless some unexpected inconsistency is encountered in the state
of the file systems due to hardware or software failure, the system
will then resume multiuser operations.
.LP
The system has a large number of internal consistency checks; if one
of these fails, it will panic with a very short message indicating
which one failed.
.LP
When the system crashes it writes (or at least attempts to write)
an image of memory into the back end of the primary swap
area.  After the system is rebooted, you can run the program
.BR savecore (8)
to preserve a copy of this core image and kernel namelist
for later perusal.  See
.BR savecore (8)
for details.
.LP
To analyze a dump you should begin by running
.BR adb (1)
with the
.B \-k
flag on the core dump, as described in
.TX DEBUG .
.LP
The most common cause of system failures is hardware failure, which
can reflect itself in different ways.
.LP
See
.SM DIAGNOSTICS
for some messages that
you may encounter, with some hints as to causes.
In each case there is a possibility that a hardware or software
error produced the message in some unexpected way.
.SH FILES
.PD 0
.TP 20
.B /vmunix
the
system kernel
.TP
.B /etc/rc.local
script run when the local system starts up
.PD
.SH "SEE ALSO"
.BR adb (1),
.BR analyze (8),
.BR reboot (8)
.BR sa (8),
.BR savecore (8)
.LP
.TX DEBUG
.  \"  This stuff is specific to the VAX and is here for reference only.
.  \".sp
.  \".nf
.  \"0	reserved addressing fault
.  \"1	privileged instruction fault
.  \"2	reserved operand fault
.  \"3	bpt instruction fault
.  \"4	xfc instruction fault
.  \"5	system call trap
.  \"6	arithmetic trap
.  \"7	ast delivery trap
.  \"8	segmentation fault
.  \"9	protection fault
.  \"10	trace trap
.  \"11	compatibility mode fault
.  \"12	page fault
.  \"13	page table fault
.  \".fi
.  \".sp
.SH DIAGNOSTICS
.PD 0
.TP 1.25i
.B \s-1IO\s0 err in push
.TP
.B hard \s-1IO\s0 err in swap
The system encountered an error trying to write to the paging device
or an error in reading critical information from a disk drive.
You should fix your disk if it is broken or unreliable.
.TP
.B timeout table overflow
This really should not be a panic, but until
the data structure is fixed,
involved, running out of entries causes a crash.  If this happens,
you should make the timeout table bigger by changing the value of
.B ncallout
in the
.B param.c
file, and then rebuild your system.
.\".TP
.\"SUN-specific message
.\"<<< Need to explain these here. >>>
.TP
.B "trap type \fItype\fP, pid \fIprocess-id\fP, pc = \fIprogram-counter\fP, sr = \fIstatus-register\fP, context \fIcontext-number\fP"
A unexpected trap has occurred within the system; typical trap types are:
.RS
.PD 0
.TP 3
\(bu
Bus error
.TP 3
\(bu
Address error
.TP 3
\(bu
Illegal instruction
.TP 3
\(bu
Divide by zero
.TP 3
\(bu
Chk instruction
.TP 3
\(bu
Trapv instruction
.TP 3
\(bu
Privilege violation
.TP 3
\(bu
Trace
.TP 3
\(bu
1010 emulator trap
.TP 3
\(bu
1111 emulator trap
.TP 3
\(bu
Stack format error
.TP 3
\(bu
Uninitialized interrupt
.TP 3
\(bu
Spurious interrupt
.PD
.RE
.IP
The favorite trap types in system crashes
are ``Bus error'' or ``Address error'',
indicating a wild reference.  The
.I process-id
is the
.SM ID
of the process
running at the time of the fault,
.I program-counter
is the hexadecimal value
of the program counter,
.I status-register
is the hexadecimal value of the
status register, and
.I context-number
is the context that the process was
running in.  These problems tend to be easy to track
down if they are kernel bugs since
the processor stops cold, but random
flakiness seems to cause this sometimes.
.TP
.B init died
The system initialization process has exited.
This is bad news, as no new
users will then be able to log in.
Rebooting is the only fix, so the
system just does it right away.
  ypupdated.8c  d  x  Q  	ypwhich.8 d    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 umons that you may specify in the generic make./share/man/man8/cron.8                                                                                755       0      12        13020  4424741604   7763                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)cron.8 1.23 89/03/27 SMI; from S5R3
.TH CRON 8 "22 March 1989"
.SH NAME
cron \- clock daemon
.SH SYNOPSIS
.B /usr/etc/cron
.SH DESCRIPTION
.IX  "cron command"  ""  "\fLcron\fP \(em clock daemon"
.IX  "timed events"  ""  "timed events \(em \fLcron\fP"
.IX  "execute commands at specified times"  ""  "execute commands at specified times \(em \fLcron\fP"
.B cron
executes commands at specified dates and times.
Regularly scheduled commands can be specified according
to instructions found in
.B crontab
files in the directory
.BR /var/spool/cron/crontabs .
Users can submit their own
.B crontab
files using the
.BR crontab (1)
command.
Commands that are to be executed only once may be
submitted using the
.BR at (1)
command.
.LP
.B cron
only examines
.B crontab
files and
.B at
command files during process
initialization and when a file changes using
.B crontab
or
.BR at .
This reduces the overhead of checking for new or
changed files at regularly scheduled intervals.
.LP
Since
.B cron
never exits, it should only be executed once.  This is normally done
by running
.B cron
from the initialization process through the file
.BR /etc/rc ;
see
.BR init (8).
.B /var/spool/cron/\s-1FIFO\s0
is a
.SM FIFO
file that
.B crontab
and
.B at
use to communicate with
.BR cron ;
it is also used as a lock file to prevent
the execution of more than one
.BR cron .
.SH FILES
.PD 0
.TP 25
.B /var/spool/cron
main cron directory
.TP
.B /var/spool/cron/\s-1FIFO\s0
.SM FIFO
for sending messages to
.B cron
.TP
.B /var/spool/cron/crontabs
directory containing
.B crontab
files
.PD
.SH "SEE ALSO"
.BR at (1),
.BR crontab (1),
.BR sh (1),
.BR queuedefs (5),
.BR init (8),
.BR syslogd (8)
.SH DIAGNOSTICS
.B cron
logs various errors to the system log daemon,
.BR syslogd (8),
with a facility code of
.BR cron .
The messages are listed here, grouped by severity level.
.SS Err Severity
.TP
.BI "Can't create /var/spool/cron/\s-1FIFO\s0: " reason
.B cron
was unable to start up because it could not create
.BR /var/spool/cron/\s-1FIFO\s0 .
.TP
.BI "Can't access /var/spool/cron/\s-1FIFO\s0: " reason
.B cron
was unable to start up because it could not access
.BR /var/spool/cron/\s-1FIFO\s0 .
.TP
.BI "Can't open /var/spool/cron/\s-1FIFO\s0: " reason
.B cron
was unable to start up because it could not open
.BR /var/spool/cron/\s-1FIFO\s0 .
.TP
.B
Can't start cron - another cron may be running (/var/spool/cron/\s-1FIFO\s0 exists)
.B cron
found that
.B /var/spool/cron/\s-1FIFO\s0
already existed when it was started; this normally means that
.B cron
had already been started, but it may mean that an earlier
.B cron
terminated abnormally without removing
.BR /var/spool/cron/\s-1FIFO\s0 .
.TP
.BI "Can't stat /var/spool/cron/\s-1FIFO\s0: " reason
.B cron
could not get the status of
.BR /var/spool/cron/\s-1FIFO\s0 .
.TP
.BI "Can't change directory to " directory : reason
.B cron
could not change to
.IR directory .
.TP
.BI "Can't read " directory : reason
.B cron
could not read
.IR directory .
.TP
.BI "error reading message: " reason
An error occurred when
.B cron
tried to read a control message from
.BR /var/spool/cron/\s-1FIFO\s0 .
.br
.ne 8
.TP
.B message received \(em bad format
A message was successfully read by
.B cron
from
.BR /var/spool/cron/\s-1FIFO\s0 ,
but the message was not of a form recognized by
.BR cron .
.TP
.SB SIGTERM\s0
received
.B cron
was told to terminate by having a
.SM SIGTERM
signal sent to it.
.TP
.BI "cron could not unlink /var/spool/cron/\s-1FIFO\s0: " reason
.B cron
was told to terminate, but it was unable to unlink
.B /var/spool/cron/\s-1FIFO\s0
before it terminated.
.TP
.B ******* \s-1CRON ABORTED\s0 ********
.B cron
terminated, either due to an error or because it was told to.
.TP
.BI "Can't open queuedefs file " file : reason
.B cron
could not open a
.I queuedefs
file.
.TP
.BI "\s-1I/O\s0 error reading queuedefs file " file : reason
An
.SM I/O
error occurred while
.B cron
was reading a
.I queuedefs
file.
.TP
.B Using default queue definitions
An error occurred while trying to read a
.I queuedefs
file; the default queue definitions will be used.
.TP
.BI "Can't allocate " number "bytes of space"
An internal error occurred in
.B cron
while trying to allocate memory.
.SS Info Severity
.TP
.IB queue " queue max run limit reached"
There were more jobs running or to be run in the queue
.I queue
than the maximum number specified.
.B cron
will wait until one of the currently-running jobs completes before
starting to run a new one.
.TP
.SB MAXRUN\s0 (25) procs reached
There were more than 25 jobs running or to be run by
.BR cron .
.B cron
will wait until one of the currently-running jobs completes before
starting to run a new one.
.TP
.B *** cron started ***
.B cron
started running.
.TP
.BI ">  \s-1CMD\s0: " command
A
.B cron
job was started.
.I command
is the command to be run.
.TP
.BI ">" " user pid queue time"
A
.B cron
job was started for user
.IR user ,
in queue
.IR queue ,
with process
.SM ID
.IR pid ,
at the date and time
.IR time .
.TP
.BI <  " user pid queue time status"
A
.B cron
job completed for user
.IR user ,
in queue
.IR queue ,
with process
.SM ID
.IR pid ,
at the date and time
.IR time .
If the command terminated with a non-zero exit status or a signal,
.I status
indicates the exit status or signal.
.SS Notice Severity
.TP
.B Can't fork
An attempt to
.B fork (2)
to run a new job failed;
.B cron
will attempt again after a 30-second delay.
.SS Warning Severity
.TP
.BI "Can't stat queuedefs file " file : reason
.B cron
could not get the status of a
.I queuedefs
file in order to determine whether it has changed.
.B cron
will assume it has changed and will reread it.
the form:
.RS
.IP
.B options \s-1FUNNY\|,\|HAHA\s0
.RE
.IP
yields
.RS
.IP
.SB \-DFUNNY \-DHAHA
.RE
.IP
to the C compiler.
An option may be given a value, by following its name with
.B =
(equal sign) then the value enclosed in (double) quotes.
None of the standard options use such a value.
.IP
In addition, options can be used to bring in additional files if
the option is listed in the
.B files
files. 
All options should be listed in upper case. 
In this case, no corresponding
.IB option .h
wi./share/man/man8/dcheck.8                                                                              755       0      12         4036  4424741604  10232                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dcheck.8 1.11 89/03/27 SMI; from UCB 4.1
.TH DCHECK 8 "9 September 1987"
.SH NAME
dcheck \- file system directory consistency check
.SH SYNOPSIS
.B /usr/etc/dcheck
[
.B \-i
.I numbers
] [
.I filesystem
]
.SH DESCRIPTION
.IX  "dcheck command"  ""  "\fLdcheck\fP \(em directory consistency check"
.IX  "check directory"  ""  "check directory \(em \fLdcheck\fP"
.IX  directory  "check consistency"  ""  "check consistency \(em \fLdcheck\fP"
.IX  "file system"  "check directory"  ""  "check directory \(em \fLdcheck\fP"
.LP
Note:
.B dcheck
has been superceded for normal consistency checking by
.BR fsck (8).
.LP
.B dcheck
reads the directories in a file system and compares
the link-count in each inode with the number of directory
entries by which it is referenced.
If the file system is not specified,
.B dcheck
checks a set of default file systems.
.LP
.B dcheck
is fastest if the raw version of the special file is
used, since the i-list is read in large chunks.
.SH OPTIONS
.TP
.BI \-i\fP  " numbers"
.I numbers
is a list of i-numbers; when one of those i-numbers turns
up in a directory, the number, the i-number of the directory,
and the name of the entry are reported.
.SH FILES
Default file systems vary with installation.
.SH "SEE ALSO"
.BR fs (5),
.BR fsck (8),
.BR clri (8),
.BR icheck (8),
.BR ncheck (8)
.SH DIAGNOSTICS
When a file turns up for which the link-count and the number
of directory entries disagree, the relevant facts are reported.
Allocated files which have 0 link-count and no entries are also listed.
The only dangerous situation occurs
when there are more entries than links;
if entries are removed, so the link-count drops to 0,
the remaining entries point to thin air.  They should be removed.
When there are more links than entries, or there is
an allocated file with neither links nor entries,
some disk space may be lost but the situation will not degenerate.
.SH BUGS
Since
.B dcheck
is inherently two-pass in nature, extraneous diagnostics
may be produced if applied to active file systems.
.LP
Inode numbers less than 2 are invalid.
sstat.8c   	     nslookup.8c   	    
old-analyze.8   	0    
old-sysdiag.8   	@    pac.8 	0  	P    ping.8c   	d    pnp.s386.8c   	x    
pnpboot.8c x  	    pnpd.8c   	    
portmap.8c   	    	praudit.8 	  	     pstat.8   	    pwck.8    	    pwdauthd.8c   
     quot.8    
    quotacheck.8    
,    
quotaoff.8 ,  
@    	quotaon.8 
@  
T    rarpd.8c  
T  
d    rc.8     
x    	rc.boot.8 
x  
  ./share/man/man8/devnm.8                                                                               755       0      12         1245  4424741604  10121                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)devnm.8 1.7 89/03/27 SMI; from S5R3
.TH  DEVNM 8 "29 September 1987"
.SH NAME
devnm \- device name
.SH SYNOPSIS
.B /usr/etc/devnm
.RI [ " name " ]\|.\|.\|.
.SH DESCRIPTION
.IX "devnm command" "" "\fLdevnm\fP command"
.B devnm
identifies the special file associated with the mounted file system
where each 
.I name
argument resides.
This command can be used to construct a mount table entry for the
.B root
file system.
.SH EXAMPLE
If
.B /usr
is mounted on
.BR /dev/dsk/c1d0s2 , 
then the command:
.RS
.B /usr/etc/devnm /usr
.RE
produces:
.RS
.B /dev/dsk/c1d0s2 usr
.RE
.SH FILES
.PD 0
.TP
.B /dev/dsk/\(**
.TP
.B /etc/mtab
.PD
.SH SEE ALSO
.BR mount (8),
.BR fstab (5)
e.8 8    p    icheck.8  \      ifconfig.8c       in.comsat.8c        
in.fingerd.8c       
in.ftpd.8c       in.named.8c       in.rexecd.8c        
in.rlogind.8c   $    in.routed.8c  $  8    
in.rshd.8c   L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c x  ./share/man/man8/dkctl.8                                                                               755       0      12         3302  4424741604  10105                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dkctl.8 1.3 89/03/27 SMI
.TH DKCTL 8 "23 March 1989"
.SH NAME
dkctl \- control special disk operations
.SH SYNOPSIS
\fB/usr/etc/dkctl
.I disk
.I command
.SH DESCRIPTION
.IX  "dkctl command"  ""  "\fLdkctl\fP \(em special disk operations"
.IX  disk  "special operations"  ""  "\fLdkctl\fP \(em special disk operations"
.B dkctl
is used to enable or disable special disk operations. In particular the enabling
or disabling of verified writes (write check functionality) is controlled
by this program.
.LP
The
.I disk
specification here is a disk name of the form
.IR /dev/rxxnp ,
where
.I xx
is the controller device abbreviation (xy, sd, etc.),
.I n
is the disk number, and
.I p
is the partition to which the operation applies.  The
.I partition
specification is simply
the letter used to identify that partition in the standard
.SM UNIX
system nomenclature.
.SH "SUPPORTED COMMANDS"
.sp 0.2i
.IP \fBwchk\fR 0.75i
This function enables write checking for disks that support it for the named
disk partition. This means that for partitions of disks with
this feature enabled, all writes are
.I verified
to have been correctly written on the disk. This operation emphasizes data
reliability over performance, although for each implementation, the fastest
reasonable method will be used (i.e., implemented in hardware, if possible).
.IP \fB\-wchk\fR 0.75i
This disables write check functionality for the named disk partition.
.SH BUGS
.LP
At present, only Xylogics 451 controllers and Adaptec 4000 controllers
support the write check function.
.LP
There are many other features this program could control, and may in the
future.
.SH FILES
.PD 0
.TP 20
.BI /dev/r xxnp
.PD
.SH "SEE ALSO"
.BR dkio (4S),
.BR xy (4S),
.BR sd (4S)
oad.8        
monitor.8s        mount.8   $    	mountd.8c $  8    named.8c  8  L    ncheck.8  L  `    
ndbootd.8c `  x    netconfig.8c        
netstat.8c       newaliases.8        newfs.8       newkey.8        nfsd.8        
nfsstat.8c   	 ./share/man/man8/dmesg.8                                                                               755       0      12         2060  4424741605  10104                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dmesg.8 1.14 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH DMESG 8 "9 September 1987"
.SH NAME
dmesg \- collect system diagnostic messages to form error log
.SH SYNOPSIS
.B /usr/etc/dmesg
[
.B  \-
]
.SH DESCRIPTION
.IX  "dmesg command"  ""  "\fLdmesg\fP \(em create error log"
.IX  "create" "error log \(em \fLdmesg\fP"
.LP
Note:
.B dmesg
is obsoleted by
.BR syslogd (8)
for maintenance of the system error log.
.LP
.B dmesg
looks in a system buffer for recently printed diagnostic messages
and prints them on the standard output.
The messages are those printed or logged
by the system when errors occur.
If the
.RB ` \- '
flag is given, then
.B dmesg
computes (incrementally) the new messages since the last time it
was run and places these on the standard output.
.SH FILES
.PD 0
.TP 20
.B /var/adm/msgbuf
scratch file for memory of
.RB ` \- '
option
.PD
.SH SEE ALSO
.BR syslogd (8)
cmp.8v       init.8        installboot.8s       intro.8   $    iostat.8  $  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c p      kgmon.8       
ldconfig.8       link.8       list.8        lockd.8c        logintool.8       lpc.8 8       lpd.8 8       mailstats.8   $    	makedbm.8 $  8    	makedev.8 8  L    	makekey.8 L  `./share/man/man8/dump.8                                                                                755       0      12        22024  4424741605   7774                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dump.8 1.31 89/03/27 SMI; from UCB 4.1
.TH DUMP 8 "9 September 1987"
.SH NAME
dump, rdump \- incremental file system dump
.SH SYNOPSIS
.B /usr/etc/dump
[
.I options
[
.I arguments
] ]
.I filesystem
.SH DESCRIPTION
.IX  "dump command"  ""  "\fLdump\fP \(em dump file system"
.IX  "file system dump"  ""  "file system dump \(em \fLdump\fP"
.IX  "incremental file system dump"  ""  "incremental file system dump \(em \fLdump\fP"
.IX  "backup dumps"  ""  "backup dumps \(em \fLdump\fP"
.B dump
backs up all files in
.IR filesystem ,
or files changed after a certain date, to magnetic tape; on Sun386i systems,
.B dump
works on both magnetic tape and diskettes.
.I options
is a string that specifies
.B dump
options, as shown below.
Any
.I arguments
supplied for specific options are given as subsequent words on
the command line, in the same order as that of the
.I options
listed.
.LP
If no
.I options
are given, the default is
.BR 9u .
.SH OPTIONS
.TP
.B  0\-9
The \(lqdump level.\(rq  All files in the
.I filesystem
that have been modified since the last
.B dump
at a lower dump level are copied to the volume.
For instance, if you did a 
\(lqlevel 
.BR 2 \(rq
dump on Monday, followed by a 
\(lqlevel 
.BR 4 \(rq
dump on Tuesday, a subsequent
\(lqlevel 
.BR 3 \(rq
dump on Wednesday would contain
all files modified or added
since the \(lqlevel 
.BR 2  \(rq
(Monday) backup.
A \(lqlevel 
.BR 0  \(rq
dump copies the entire filesystem to the dump volume.
.TP
.BI b " factor"
Blocking factor.  Specify the blocking factor for tape writes.
.IX "tape block size \(em 512 bytes"
.IX "block size for tape \(em 512 bytes"
The default is 20 blocks per write.  Note: the blocking factor is
specified in terms of 512 bytes blocks, for compatibility with
.BR tar (1).
The default blocking factor for tapes of
density 6250\s-1BPI\s0 and greater
is 64.  The default blocking factor for cartridge tapes
.RB ( c
option specified) is 126.
The highest blocking
factor available with most tape drives is 126.
.TP
.B c
Cartridge.  Use a cartridge instead of the standard half-inch reel.
This sets the density to 1000\s-1BPI\s0
and the blocking factor to 126.
The length is set to 425 feet.
(This option is incompatible with the
.BR d
option, unless you specify a density of
1000\s-1BPI\s0 with that option).
.TP
.BI d " bpi"
Tape density.  The density of the tape, expressed in
.SM BPI\s0,
is taken from
.I bpi.
This is used to keep a running tab on
the amount of tape used per reel.  The
default density is 1600 except for cartridge tape.
Unless a higher density is specified explicitly,
.B dump
uses its default density \(em even if the tape drive is capable of
higher-density operation (for instance, 6250\s-1BPI\s0).
Note: the density specified should correspond to the density of the
tape device being used, or
.B dump
will not be able to handle end-of-tape properly.  The 
.B d
option is not compatible with the 
.B D
option.
.TP
.B D
Diskette. Specify diskette as the dump media.
.TP
.BI f " dump-file"
Dump file.  Use
.I dump-file
as the file to dump to, instead of
.B /dev/rmt8.
If
.I dump-file
is specified as
.RB ` \- ',
dump to the standard output.
If the filename argument is of the form
.IR machine:device ,
dump to a
remote machine.  Since
.B dump
is normally run by
.I root,
the name of the local machine must appear in the
.B .rhosts
file of the remote machine.
If the filename argument is of the form
.IB user @ machine : device\fR,
.B dump
will attempt to execute as the specified user on the remote machine.
The specified user must have a
.B .rhosts
file on the remote machine that allows root from the local machine.
If
.B dump
is called as
.B rdump,
the dump device defaults to
.BR dumphost:/dev/rmt8\fR .
To direct the output to a desired remote machine,
set up an alias for
\fBdumphost\fR in the file
.BR /etc/hosts .
.TP
.B n
Notify.  When this option is specified, if
.B dump
requires attention, it sends a terminal message
(similar to
.BR wall (1))
to all operators in the \(lqoperator\(rq group.
.TP
.BI s " size"
Specify the
.I size
of the volume being dumped to. When the specified size is reached,
.B dump
waits for you to change the volume.
.B dump
interprets the specified size as the length in
feet for tapes, and cartridges and 
as the number of 1024 byte blocks for diskettes.  The following are
defaults:
.RS
.RS
.TP 12
tape
.PD 0
2300 feet
.TP
cartridge 
425 feet
.TP
diskette
1422 blocks (Corresponds
to a 1.44 Mb diskette, with one cylinder reserved for bad block information.)
.PD
.RE
.RE
.TP
.BI t " tracks"
Specify the number of tracks for a cartridge tape.  On all Sun-2
systems the
default is 4 tracks, although some Sun-2
systems have 9 track drives.
On all other machines the default is 9 tracks.  
The 
.B t
option is not compatible with the 
.B D
option.
.TP
.B u
Update the dump record.  Add an entry to the file
.B /etc/dumpdates,
for each filesystem successfully dumped that includes the filesystem
name, date, and dump level.  This file can be edited by the super-user.
.TP
.B w
List the filesystems that need backing up.  This
information is gleaned from the files
.B /etc/dumpdates
and
.BR /etc/fstab .
When the
.B w
option is used, all other options
are ignored.  After reporting,
.B dump
exits immediately.
.TP
.B W
Like
.BR w ,
but includes all filesystems that appear in
.B /etc/dumpdates,
along with information about their most recent dump dates and levels.
Filesystems that need backing up are highlighted.
.SH FILES
.PD 0
.TP 20
.B /dev/rmt8
default unit to dump to
.TP
.B dumphost:/dev/rmt8
default remote unit to dump to if called as
.B rdump
.TP
.B /etc/dumpdates
dump date record
.TP
.B /etc/fstab
dump table: file systems and frequency
.TP
.B /etc/group
to find group
.I operator
.TP
.B /etc/hosts
.PD
.SH "SEE ALSO"
.BR tar (1),
.BR wall (1),
.BR dump (5),
.BR fstab (5),
.BR restore (8),
.BR shutdown (8)
.SH DIAGNOSTICS
While running,
.B dump
emits many verbose messages.
.SS Exit Codes
.PD 0
.TP
.B 0
Normal exit.
.TP
.B 1
Startup errors encountered.
.TP
.B 3
Abort \- no checkpoint attempted.
.PD
.SH BUGS
.LP
Fewer than 32 read errors on the filesystem are ignored.
.LP
Each reel requires a new process, so parent processes for
reels already written just hang around
until the entire tape is written.
.LP
It is recommended that incremental dumps also be performed with
the system running in single-user mode.
.LP
.B dump
does not support multi-file multi-volume tapes.
.SH NOTES
.SS Operator Intervention
.LP
.B dump
requires operator intervention on these conditions:
end of volume, end of dump, volume write error, volume open error or
disk read error (if there are more than a threshold of 32).
In addition to alerting all operators implied by the
.B n
option,
.B dump
interacts with the operator on
.BR dump 's
control terminal at times when
.B dump
can no longer proceed, or if something is grossly wrong.  All
questions
.B dump
poses
.I must
be answered by typing
.B yes
or
.BR no ,
as appropriate.
.LP
Since backing up a disk can involve a lot of time and effort,
.B dump
checkpoints at the start of each volume.
If writing that volume fails for some reason,
.B dump
will, with operator permission, restart itself from the
checkpoint after a defective volume has been replaced.
.LP
.B dump
reports periodically, and in  verbose fashion.  Each report
includes estimates of the percentage of the dump completed
and how long it will take to complete the dump.
.SS "Suggested Dump Schedule"
.LP
It is vital to perform full, \(lqlevel 
.BR 0 \(rq,
dumps at regular intervals.
When performing a full dump, bring the machine down to
single-user mode using
.BR shutdown (8).
While preparing for a full dump, it is a good idea to clean the
tape drive and heads.
.LP
Incremental dumps allow for convenient backup and recovery on a more
frequent basis of active files, with a minimum of media and time.
However there are some tradeoffs.  First, the interval between backups
should be kept to a minimum (once a day at least).  To guard against
data loss as a result of a media failure (a rare, but possible
occurrence), it is a good idea to capture active files on (at least)
two sets of dump volumes.  Another consideration
is the desire to keep unnecessary
duplication of files to a minimum to save both operator time and media
storage.  A third consideration is the ease with which a particular
backed-up version of a file can be located and restored.
The following four-week schedule offers a reasonable tradeoff between
these goals.
.RS
.nf
.ta 12n 18n 24n 30n 36n 42n 48n
.I
	Sun 	Mon	Tue	Wed	Thu	Fri
\fIWeek 1:\fB	Full	5	5	5	5	3
\fIWeek 2:\fB		5	5	5	5	3
\fIWeek 3:\fB		5	5	5	5	3
\fIWeek 4:\fB		5	5	5	5	3\fR
.fi
.RE
.DT
.LP
Although the Tuesday \(em Friday incrementals contain \(lqextra
copies\(rq
of files from Monday, this scheme assures that any file
modified during the week can be recovered from the previous
day's incremental dump.
.SS "Process Priority of dump"
.LP
.B dump
uses multiple processes to allow it to
read from the disk and write to the
media concurrently.  Due to the way it
synchronizes between these processes,
any attempt to run dump with a
.B nice
(process priority) of `\-5' or better will likely make
.B dump
run
.I slower
instead of faster.


rom the local machine.
If
.B dump
is called as
.B rdump,
the dump device defaults to
.BR dumphost:/dev/rmt8\fR .
To direct the output to a desired remote machine,
set up an alias for
\fBdumphost\fR in the file
.BR /etc/hosts .
.TP
.B n
Notify.  When this option is specified, if
.B dump
requires attention, it sends a terminal message
(similar to
.BR wall (1))
to all operators in the \(lqoperator\(rq group.
.TP
.BI s " size"
Specify the
.I size
of the volume being dumped to. When the speci./share/man/man8/dumpfs.8                                                                              755       0      12         1317  4424741605  10307                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)dumpfs.8 1.9 89/03/27 SMI; from UCB 4.2
.TH DUMPFS 8 "9 September 1987"
.SH NAME
dumpfs \- dump file system information
.SH SYNOPSIS
.B /usr/etc/dumpfs
.I device
.SH DESCRIPTION
.IX  "dumpfs command"  ""  "\fLdumpfs\fP \(em dump file system information"
.IX  "file system"  "dump information"  ""  "dump information \(em \fLdumpfs\fP"
.B dumpfs
prints out the super block and cylinder group information
for the file system or special device specified.
The listing is very long and detailed.  This
command is useful mostly for finding out certain file system
information such as the file system block size and minimum
free space percentage.
.SH "SEE ALSO"
.BR fs (5),
.BR fsck (8),
.BR newfs (8),
.BR tunefs (8)

in.ftpd.8c       in.named.8c       in.rexecd.8c        
in.rlogind.8c   $    in.routed.8c    8    
in.rshd.8c 8  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c       in.tftpd.8c       in.tnamed.8c        inetd.8c      ./share/man/man8/edquota.8                                                                             755       0      12         4306  4424741605  10454                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)edquota.8 1.12 89/03/27 SMI; from UCB 4.2
.TH EDQUOTA 8 "9 September 1987"
.UC 4
.SH NAME
edquota \- edit user quotas
.SH SYNOPSIS
.B /usr/etc/edquota
[
.B \-p
.I proto-user
]
.IR usernames .\|.\|.
.LP
.B /usr/etc/edquota
.B \-t
.SH DESCRIPTION
.IX  "edquota command"  ""  "\fLedquota\fP \(em edit user quotas"
.IX  edit "user quotas \(em \fLedquota\fP"
.IX  "user quotas"  "edquota command"  ""  "\fLedquota\fP \(em edit user quotas"
.IX  "disk quotas"  "edquota command"  ""  "\fLedquota\fP \(em edit user quotas"
.IX  "quotas"  "edquota command"  ""  "\fLedquota\fP \(em edit user quotas"
.IX  "file system"  "edquota command"  ""  "\fLedquota\fP \(em edit user quotas"
.B edquota
is a quota editor.  One or more users may be specified on the command
line.  For each user a temporary file is created with an
.SM ASCII
representation of the current disk quotas for that user and an editor
is then invoked on the file.  The quotas may then be modified, new
quotas added, etc.  Upon leaving the editor,
.B edquota
reads the temporary file and modifies the binary quota files to reflect
the changes made.
.LP
The editor invoked is
.BR vi (1)
unless the
.SB EDITOR
environment variable specifies otherwise.
.LP
Only the super-user may edit quotas.  (In order for quotas to be
established on a file system, the root
directory of the file system must
contain a file, owned by root, called
.BR quotas .
See
.BR quotaon (8)
for details.)
.SH OPTIONS
.TP
.B \-p
Duplicate the quotas of the prototypical user
specified for each user specified.  This is the normal
mechanism used to initialize quotas for groups of users.
.TP
.B \-t
Edit the soft time limits for each file system.
If the time limits are zero, the default time limits in
.B <ufs/quota.h>
are used.
Time units of sec(onds), min(utes), hour(s), day(s), week(s), and month(s)
are understood.
Time limits are printed in the greatest possible time unit such that
the value is greater than or equal to one.
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system root
.TP
.B /etc/mtab
mounted file systems
.PD
.SH SEE ALSO
.BR quota (1),
.BR vi (1),
.BR quotactl (2),
.BR quotacheck (8),
.BR quotaon (8),
.BR repquota (8)
.SH BUGS
The format of the temporary file is inscrutable.
 pwdauthd.8c   
     quot.8 d  
    quotacheck.8  
  
,    
quotaoff.8   
@    	quotaon.8  ,  
T    rarpd.8c  
@  
d    rc.8 .8c  
x    	rc.boot.8 
T  
    
rc.local.8 x  
  	  rdate.8c 8   
  
  rdump.8   
    reboot.8 .8   
    renice.8  
  
  
  
repquota./share/man/man8/eeprom.8s                                                                             755       0      12         5507  4424741605  10470                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)eeprom.8s 1.16 89/03/27 SMI;
.TH EEPROM 8S "22 March 1989"
.SH NAME
eeprom \- EEPROM display and load utility
.SH SYNOPSIS
.B eeprom
.RB [\| \- \|]
.RB [\| \-i \|]
.RB [\| \-f
.I filename
]
.RI [\| field
[
.BI = value
]\|]
\&.\|.\|.
.LP
.B eeprom
.RB [\| \-i \|]
.RB [\| \-c \|]
.RB [\| \-f
.I filename
]
.SH AVAILABILITY
Not available for Sun-2 systems.
.SH DESCRIPTION
.IX  "PROM monitor program, display and load program \(em \fLeeprom\fR"
.IX  "EEPROM display and load program \(em \fLeeprom\fR"
.IX  "system EEPROM display and load program"
.LP
.B eeprom
displays or changes the values of fields in the
.SM EEPROM\s0.
It processes fields in the order given.
When processing a
.I field
accompanied by a
.IR value ,
.B eeprom
makes the indicated alteration to the
.SM EEPROM\s0;
otherwise it displays the
.IR field 's
value.
When given no field specifiers,
.B eeprom
displays the values of all
.SM EEPROM
fields.
The
.RB ` \(em '
option specifies that fields and values are
to be read from stdin (one
.I field
or
.IB field = value
per line).
.LP
.B eeprom
verifies the
.SM EEPROM
checksums and complains if they are incorrect; if the
.B \-i
flag is specified, erroneous checksums are ignored.
If the
.B \-c
flag is specified, all incorrect
checksums are recomputed and corrected in the
.SM EEPROM\s0.
.SH OPTIONS
.TP 15
.B \-i
Ignore bad checksums.
.TP
.BI \-f\fP  " filename"
Use
.I filename
as the
.SM EEPROM
device.
.TP
.B \-c
Correct bad checksums.
.TP
.B \(em
Read field names and values from stdin.
.LP
The field names and their possible values are:
.RS
.PD 0
.TP 20
.B hwupdate
a valid date (including ``today'' and ``now'')
.TP
.B memsize
8 bit decimal integer (megabytes of memory on machine)
.TP
.B memtest
8 bit decimal integer (megabytes of memory to test)
.TP
.B scrsize
``1024x1024'', ``1152x900'', ``1600x1280'', or ``1440x1440''
.TP
.B watchdog_reboot
``true'' or ``false''
.TP
.B default_boot
``true'' or ``false''
.TP
.B bootdev
.IB char\^char ( hex-int ,\c
.IB hex-int , hex-int )
(with
.I char
a character,
and
.I hex-int
a hexadecimal integer.)
.TP
.B kbdtype
8 bit decimal integer (0 for all Sun keyboards)
.TP
.B keyclick
``true'' or ``false''
.TP
.B console
``b&w'' or ``ttya'' or ``ttyb'' or ``color''
.TP
.B custom_logo
``true'' or ``false''
.TP
.B banner
banner string
.TP
.B diagdev
%c%c (%x,%x,%x) - diagnostic boot device
.TP
.B diagpath
diagnostic boot path
.TP
.B ttya_no_rtsdtr
``true'' or ``false''
.TP
.B ttyb_no_rtsdtr
``true'' or ``false''
.TP
.B ttya_use_baud
``true'' or ``false''
.TP
.B ttyb_use_baud
``true'' or ``false''
.TP
.B ttya_baud
baud rate (16-bit decimal integer)
.TP
.B ttyb_baud
baud rate (16-bit decimal integer)
.TP
.B columns
number of columns on screen (8-bit decimal integer)
.TP
.B rows
number of rows on screen (8-bit decimal integer)
.PD
.RE
.SH FILES
.PD 0
.TP 20
.B /dev/eeprom
.PD
.SH "SEE ALSO"
.B mon/eeprom.h
fs.8       newkey.8 .8       nfsd.8 8      
nfsstat.8c 8  	     nslookup.8c   	    
old-analyze.8 	  	0    
old-sysdiag.8 	0  	@    pac.8 g.  	P    ./share/man/man8/etherd.8c                                                                             755       0      12         1706  4424741605  10431                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)etherd.8c 1.15 89/03/27 SMI;
.TH ETHERD 8C "22 March 1989"
.SH NAME
etherd, rpc.etherd \- Ethernet statistics server
.SH SYNOPSIS
.B /usr/etc/rpc.etherd
.I interface
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX etherd "" "\fLetherd\fR \(em Ethernet statistics server daemon"
.IX Ethernet "statistics server daemon \(em \fLetherd\fR"
.LP
.B etherd
is a server which puts
.I interface
into promiscuous mode,
and keeps summary statistics of all the packets received on
that interface.  It responds to
.SM RPC
requests for the summary.
You must be root to run
.BR etherd .
.LP
.I interface
is a networking interface such as
.BR ie0 ,
.BR ie1 ,
.BR ec0 ,
.B ec1
and
.BR le0 .
.LP
.BR traffic (1C)
displays the information obtained from
.BR etherd
in graphical form.
.SH "SEE ALSO"
.BR traffic (1C)
       init.8 .       installboot.8s      ./share/man/man8/etherfind.8c                                                                          755       0      12        13140  4424741605  11141                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)etherfind.8c 1.23 89/03/27 SMI;
.TH ETHERFIND 8C  "22 March 1989"
.SH NAME
etherfind \- find packets on Ethernet
.SH SYNOPSIS
.B etherfind
[
.B \-nprtuvx
] [
.B \-c
.I count
] [
.B \-i
.I interface
] [
.B \-l
.I length
]
.IR expression
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX etherfind "" "\fLetherfind\fR \(em find packets on the Ethernet"
.IX Ethernet "find packets \(em \fLetherfind\fR"
.LP
.B etherfind
prints out the information about packets on the ethernet that
match the boolean
.IR expression .
The short display, without the 
.B \-v
option, displays only the destination and src (with port numbers).
When an internet packet is
fragmented into more than one ethernet packet, all fragments
except the first are marked with an asterisk.
The the 
.B \-v
option, the display is much more verbose, giving a trace that is suitable
for analyszing many network problems.
You must be root to invoke
.BR etherfind .
.SH OPTIONS
.TP
.B \-n
Do not convert host addresses and port numbers to names.
.TP
.B \-p
Normally, the selected interface is put
into promiscuous mode, so that
.B etherfind 
has access to
all packets on the ethernet.  However, when the
.B \-p
flag
is used, the interface will not go promiscuous.
.TP
.B \-r
RPC mode: treat each packet as an RPC message, printing
the program and procedure numbers. Routing packets are also
more fully decoded using this option, and Yellow Pages and NFS requests
have their arguments printed.
.TP
.B \-t
Timestamps: precede each packet listing with a time value in seconds
and hundredths of seconds since the first packet.
.TP
.B \-u
Make the output line buffered.
.TP
.B \-v
Verbose mode: print out some of the fields of TCP and UDP packets.
.TP
.B \-x
Dump the packet in hex, in addition to the line
printed for each packet by default. use the 
.B \-l
option to limit this printout.
.TP
.BI \-c " count"
Exit after receiving
.I count
packets.
This is sometimes useful for dumping a sample of ethernet
traffic to a file for later analysis.
.TP
.BI \-i " interface"
.B etherfind
listens on
.IR interface .
The program
.BR netstat (8C)
when invoked with the
.B \-i
flag lists all the interfaces
that a machine has.
.TP
.BI \-l " length"
Use with the 
.B \-x 
option to limit the number of bytes printed out.
.TP
.I  expression
.RS
The syntax of  of
.I expression
is similar to that used by
.BR find (1).
Here are the allowable primaries.
.TP
.BI dst  " destination"
True if the destination field of the packet is
.IR destination ,
which may be either an address or a name.
.TP
.BI src  " source"
True if the source field of the packet is
.IR source ,
which may be either an address or a name.
.TP
.BI host  " name"
True if either the source or the destination of the packet is
.IR name .
.TP
.BI between  " host1 host2"
True if either the source of the packet is
.I host1
and the destination
.IR host2 ,
or the source is
.I host2
and the destination
.IR host1 .
.TP
.BI dstnet  " destination"
True if the destination field of the packet has a network
part of
.IR destination ,
which may be either an address or a name.
.TP
.BI srcnet " source"
True if the source field of the packet has a network
part of
.IR source ,
which may be either an address or a name.
.br
.ne 5
.TP
.BI srcport " port"
True if the packet has a source port value of
.IR port .
It must be either
upd or tcp (see
.BR tcp (4P)),
.BR udp (4P)).
The
.I port
can be a number or a name used in
.BR /etc/services .
.TP
.BI dstport " port"
True if the packet has a destination port value of
.IR port .
The
.I port
can be a number or a name.
.TP
.BI less " length"
True if the packet has a length less than or equal to
.IR length .
.TP
.BI greater " length"
True if the packet has a length greater than or equal to
.IR length .
.TP
.BI proto " protocol"
True if the packet is an ip packet (see
.BR ip (4P))
of protocol type
.IR protocol .
.I Protocol
can be a number or one of the
names
.BR icmp ,
.BR udp ,
.BR nd ,
or
.BR tcp .
.TP
.BI byte " byte op value"
True if byte number
.I byte
of the packet is in relation
.I op
to
.IR value .
Legal values for
.I op
are
.BR \+ ,
.BR \< ,
.BR \> ,
.BR & ,
and
.BR | .
Thus
.B 4=6
is true if the fourth byte of the
packet has the value 6, and
.B 20&0xf
is true if byte twenty
has one of its four low order bits nonzero.
.TP
.B broadcast
True if the packet is a broadcast packet.
.TP
.B arp
True if the packet is a arp packet (see
.BR arp (4P)).
.TP
.B rarp
True if the packet is a rarp packet.
.TP
.B ip
True if the packet is an ip packet.
.TP
.B decnet
True if the packet is a Sunlink/DNI packet.
.TP
.B apple
True if the packet is an AppleTalk protocol packet.
.RE
.LP
The primaries may be combined using the following operators
(in order of decreasing precedence):
.IP
A parenthesized group of primaries and operators
(parentheses are special to the Shell and must be escaped).
.IP
The negation of a primary
.RB (` not '
is the unary
.I not
operator).
.IP
Concatenation of primaries (the
.I and
operation is implied by the juxtaposition of two primaries, or can
be specified with
.BR `and' ).
.IP
Alternation of primaries
.RB "(`" or "' is the"
.I or
operator).
.SH EXAMPLE
.LP
To find all packets arriving at or departing from sundown,
or with the icmp protocol:
.RS
.sp .5
.ft B
.nf
example% etherfind host sundown or proto icmp
.ft R
.fi
.RE
.LP
.ft R
.SH "SEE ALSO"
.BR find (1),
.BR traffic (1C),
.BR arp (4P),
.BR ip (4P),
.BR nit (4P)
.BR tcp (4P),
.BR udp (4P),
.BR netstat (8C)
.SH BUGS
The syntax is painful.
.\" Yup.
.\" But not so bad now that I removed the dashes in 4.1  - WIN

below.
.RS
.TP
.B root
A root device specification is of the form
.RB ` "root on \fIxy0d\fP" '.
If a specific partition is omitted \(em for example, if only
.B root on xy0
is specified \(em the
.RB ` a '
partition is assumed. 
When a generic system is being built, no root
specification should be given; the root device will be defined
at boot time by prompting the console.
.TP
.B swap
To specify a swap partition, ./share/man/man8/exportfs.8                                                                            755       0      12         6666  4424741606  10700                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)exportfs.8 1.15 89/03/27 SMI;
.TH EXPORTFS 8 "22 March 1989"
.SH NAME
exportfs \- export and unexport directories to NFS clients
.SH SYNOPSIS
.B /usr/etc/exportfs
[
.B \-aiuv
] [
.B \-o
.I options
] [
.I pathname
]
.SH DESCRIPTION
.IX "exportfs command" "" "\fLexportfs\fP command"
.LP
.B exportfs
makes a local directory or filename
available for mounting over the network by
.SM NFS
clients.
It is normally invoked at boot time by the
.B /etc/rc.local
script, and uses information contained in the
.B /etc/exports
file to export
.I pathname
(which must be specified as a full pathname).
The super-user can run
.B exportfs
at any time to alter the list or characteristics of
exported directories and filenames.
Directories and files that are currently exported  are listed in the file
.BR /etc/xtab .
.LP
With no options or arguments,
.B exportfs
prints out the list of directories and filenames currently exported.
.SH OPTIONS
.TP
.B \-a
All.  Export all pathnames listed in
.BR /etc/exports ,
or if
.B \-u
is specified, unexport all of the currently exported pathnames.
.TP
.B \-i
Ignore the options in 
.BR /etc/exports. 
Normally, 
.B exportfs 
will consult
.BR /etc/exports 
for the options associated with the exported pathname.
.TP
.B \-u
Unexport the indicated pathnames.
.TP
.B \-v
Verbose. 
Print each directory or filename as it is exported or unexported.
.TP
.BI \-o " options"
Specify a comma-separated list of optional characteristics for
the pathname being exported.
.I options
can be selected from among:
.RS
.TP
.B ro
Export the pathname read-only. If not specified, the pathname
is exported read-write.
.TP
.BI rw= hostname\fR[ : hostname\fR]\|.\|.\|.
Export the pathname read-mostly.
Read-mostly means exported read-only to most
machines, but read-write to those specified.
If not specified, the pathname is exported read-write to all.
.TP
.BI anon= uid
If a request comes from an unknown user, use
.SM UID
as the effective user
.SM ID\s0.
Note: root users (\s-1UID\s0 0) are always
considered \(lqunknown\(rq by the
.SM NFS
server, unless they are included in the
.B root
option below. The default value for this option is \-2.
Setting the value of \(lqanon\(rq to \-1 disables anonymous access.
Note: by default secure
.SM NFS
accepts insecure requests as anonymous,
and those wishing for extra security can disable this feature by setting
\(lqanon\(rq to \-1.
.TP
.BI root= hostname\fR[ : hostname\fR]\|.\|.\|.
Give root access only to the root users from a specified
.IR hostname  .
The default is for no hosts to be granted root access.
.TP
.BI access= client\fR[ : client\fR]\|.\|.\|.
Give mount access to each
.I client
listed.  A
.I client
can either be a hostname, or a netgroup (see
.BR netgroup (5)).
Each
.I client
in the list is first checked for in the
.B /etc/netgroup
database, and then the
.B /etc/hosts
database.  The default value allows any
machine to mount the given directory.
.TP
.B secure
Require clients to use a more secure protocol when
accessing the directory.
.RE
.SH FILES
.PD 0
.TP 20
.B /etc/exports  
static export information
.TP
.B /etc/xtab
current state of exported pathnames
.TP
.B /etc/netgroup
.PD
.SH "SEE ALSO"
.BR exports (5),
.BR netgroup (5)
.SH WARNINGS
.LP
You cannot export a directory that is either
a parent- or a sub-directory
of one that is currently exported and
.IR "within the same filesystem" .
It would be illegal, for example, to export both
.B /usr
and
.B /usr/local
if both directories resided in the same disk partition.
.8       7  sunupgrade.8  h    8  swapon.8 e.8    9  	sysl./share/man/man8/extract_unbundled.8                                                                   755       0      12         2157  4424741606  12527                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)extract_unbundled.8 1.6 89/03/27 SMI; from UCB 4.3 BSD
.TH EXTRACT_UNBUNDLED 8 "18 September 1987"
.SH NAME
extract_unbundled \- extract and execute unbundled-product installation scripts
.SH SYNOPSIS
.B extract_unbundled
.RB [ " \-d\c"
.I device
.RB [ " \-r\c"
.IR remote-host " ] ]"
[
.SB \-DEFAULT
]
.SH DESCRIPTION
.IX "extract_unbundled command" "" "\fLextract_unbundled\fP command"
.B extract_unbundled
extracts and executes the installation scripts from release
tapes for Sun unbundled software products.  If no options are
specifed, it prompts for input as to the tape device, or remote
hostname from which to the software is to be installed.
For information about installing a specific product, refer to the
installation manual that accompanies that product.
.SH OPTIONS
.TP
.BI \-d device
Install from the indicated tape drive, such as
.BR st0 ,
.BR mt0
or
.BR ar0 .
.TP
.BI \-r remote_host
Install from the device given in the 
.BR \-d
option on the indicated remote host.
.TP
.SB \-DEFAULT
Execute the installation script using all default values.
Otherwise the installation script prompts for any optional values.
k.8 g      list.8 k      lockd.8c 8       logintool.8       lpc.8 oo      lpd.8 c.      mailstats.8   $    	makedbm.8 8   8    	makedev.8 at  L    	makekey.8 m.  `    
mconnect.8 .  t    mkfile.8 8 .      mkfs.8 8      mknod.8       	mkproto.8 8       	modload.8 no      	modstat.8 o.      modunload.8      ./share/man/man8/fastboot.8                                                                            755       0      12         1760  4424741606  10635                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fastboot.8 1.11 89/03/27 SMI; from UCB 4.2
.TH FASTBOOT 8 "9 September 1987"
.SH NAME
fastboot, fasthalt \- reboot/halt the system without checking the disks
.SH SYNOPSIS
.B /usr/etc/fastboot
[
.I boot-options
]
.LP
.B /usr/etc/fasthalt
[
.I halt-options
]
.SH DESCRIPTION
.IX  "fastboot command"  ""  "\fLfastboot\fP \(em reboot system"
.IX  "reboot system"  ""  "reboot system \(em \fLfastboot\fP"
.IX  "fasthalt command"  ""  "\fLfasthalt\fP \(em halt system"
.IX  "halt system"  ""  "halt system \(em \fLfasthalt\fP"
.LP
.B fastboot
and
.B fasthalt
are shell scripts that reboot and halt the system without
checking the file systems.  This is done by creating a file
.BR /fastboot ,
then invoking the
.BR reboot (8)
program.  The system startup script,
.BR /etc/rc ,
looks for this file and, if present, skips the normal
invocation of
.BR fsck (8).
.SH FILES
.PD 0
.TP 20
.B /usr/etc/fastboot
.TP
.B /etc/rc
.PD
.SH "SEE ALSO"
.BR fsck (8),
.BR halt (8),
.BR init (8),
.BR rc (8),
.BR reboot (8)
keyenvoy.8c   p./share/man/man8/fasthalt.8                                                                            755       0      12           72  4424741606  10555                                                                                                                                                                                                                                                                                                                                                                      .so man8/fastboot.8
.\" @(#)fasthalt.8 1.6 89/03/27 SMI; 
 	format.8s  t  d    fpa_download.8 d  x    fparel.8 8 8      fpaversion.8        fpurel.8 l.8      
fpuversion4.8       fsck.8 .      	fsirand.8  v      ftpd.8c        getty.8       gettable.8c   (    
gpconfig.8    8    grpck.8   H    halt.8 c  \    htable.8 8   p    icheck.8        ifconfig.8c       in.comsat.8c        
in.fingerd.8c     ./share/man/man8/fingerd.8c                                                                            755       0      12         4207  4424741606  10574                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fingerd.8c 1.10 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH FINGERD 8C "22 March 1989"
.SH NAME
fingerd, in.fingerd \- remote user information server
.SH SYNOPSIS
.B /usr/etc/in.fingerd
.SH DESCRIPTION
.IX "fingerd daemon" "" "\fLfingerd\fP daemon"
.B fingerd
implements the server side of the Name/Finger protocol,
specified in
.SM RFC
742.
The Name/Finger protocol provides a remote interface to programs
which display information on system status and individual users.
The protocol imposes little structure on the format of the
exchange between client and server.
The client provides a single \(lqcommand line\(rq to the finger
server which returns a printable reply.
.LP
.B fingerd
waits for connections on
.SM TCP
port 79.
Once connected it reads a single command line
terminated by a \s-1LINEFEED\s0 which is passed to
.BR finger (1).
.B fingerd
closes its connections as soon as the output is finished.
.LP
If the line is null (only a
.SM LINEFEED
is sent) then
.B finger
returns a \(lqdefault\(rq report that lists all people logged into
the system at that moment.
.LP
If a user name is specified (for instance,
eric\s-1LINEFEED\s0) then the
response lists more extended information for only that particular user,
whether logged in or not.
Allowable \(lqnames\(rq in the command line include both \(lqlogin names\(rq
and \(lquser names\(rq.
If a name is ambiguous, all possible derivations are returned.
.SH SEE ALSO
.BR finger (1)
.LP
Harrenstien, Ken,
.IR \s-1NAME/FINGER\s0 ,
\s-1RFC\s0 742,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
December 1977.
.SH BUGS
Connecting directly to the server from a
.SM TIP
or an equally narrow-minded
.SM TELNET\s0-protocol
user program can result
in meaningless attempts at option negotiation being sent to the
server, which will foul up the command line interpretation.
.B fingerd
should be taught to filter out
.SM IAC\s0's
and perhaps even respond
negatively (\s-1IAC\s0
.I will not)
to all option commands received.
lpd.8 c.      mailstats.8   $    	makedbm.8 8   8    	makedev.8 8   L    	makekey.8 il  `    
mconnect.8 e  t    mkfile.8 8 e      mkfs.8 8      mknod.8       	mkproto.8 8       	modload.8 8       	modstat.8        modunload.8        
monitor.8s        mount.8   $    	mountd.8c 8   8    named.8c./share/man/man8/format.8s                                                                             755       0      12         5140  4424741606  10463                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)format.8s 1.9 89/03/27 SMI
.TH FORMAT 8S "25 March 1989"
.SH NAME
format \- disk partitioning and maintenance utility
.SH SYNOPSIS
.B format
[
.BI \-f " command-file"
] [
.BI \-l " log-file"
] [
.BI \-x " data-file"
] [
.BI \-d " disk-name"
] [
.BI \-t " disk_type"
]
.ti +.5
[
.BI \-p " partition-name"
] [
.B \-s
]
.IR diskname .\|.\|.
.SH DESCRIPTION
.IX "format command" "" "\fLformat\fP command"
.LP
.B format
enables you to format, label, repair and
analyze disks on your Sun computer.  Unlike previous disk
maintenance programs,
.B format
runs under Sun\s-1OS\s0. Because there are
limitations to what can be done to the system disk while the
system is running,
.B format
is also supported within the
memory-resident system environment.  For most applications,
however, running
.B format
under Sun\s-1OS\s0 is the more convenient approach.
.LP
If no
.I disk-list
is present,
.B format
uses the disk list defined
in the data file specified with the
.B \-x
option.  If that option is omitted, the
data file defaults to
.B format.dat
in the current directory, or else
.BR /etc/format.dat .
.SH OPTIONS
.TP
.BI \-f " command-file"
Take command input from
.I command-file
rather than the standard input.
The file must contain commands that appear just as they would
if they had been entered from the keyboard.  With this option,
.B format
does not issue
.B continue?
prompts.
.TP
.BI \-l " log-file"
Log a transcript of the
.B format
session to the indicated
.IR log-file ,
including the standard input, the standard
output and the standard error.
.TP
.BI \-x " data-file"
Use the disk list contained in
.IR data-file .
.TP
.BI \-d " disk_name"
Specify which disk should be made current upon entry into the program.
The disk is specified by its logical name (for instance,
- xy0). This can also
be accomplished by specifying a single disk in the disk list.
.TP
.BI \-t " disk-type"
Specify the type of disk which is current upon entry into the program,
A disk's type is specified by name in the data file. This
option can only be used if a disk is being made current as described
above.
.TP
.BI \-p " partition-name"
Specify the partition table for the disk which is current upon entry
into the program. The table is specified by its name as defined in
the data file.  This option can only be used if a disk is being made
current, and its type is either specified or available from the
disk label.
.TP
.B \-s
Silent.  Suppress all of the standard output.  Error messages are still
displayed.  This is generally used in conjunction with the
.B \-f
option.
.SH FILES
.PD 0
.TP 20
.B /etc/format.dat
default data file
.PD
.SH SEE ALSO
.LP
.TX ADMIN
      
rpc.rstatd.8c   0    rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c !    #  
rquotad.8c !    $  
rrestore.8      %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c     
L  )  rwhod.8c     
\  *  sa.8 .8c  
p./share/man/man8/fpa_download.8                                                                        755       0      12         4771  4424741607  11457                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fpa_download.8 1.9 89/04/11 SMI; from _source_
.TH FPA_DOWNLOAD 8 "22 March 1989"
.SH NAME
fpa_download \- download to the Floating Point Accelerator (\s-1FPA\s+1)
.SH SYNOPSIS
.B fpa_download
[
.B \-d
]
[
.B \-r
]
[
.B \-v
]
.if n .ti +5n
[
.B \-u
.I ufile
]
[
.B \-m
.I mfile
]
[
.B \-c
.I cfile
]
.if t .ti +.5i
.SH AVAILABILITY
.LP
.BR fpa_download (8)
applies to Sun3 and Sun3x systems
equipped with either an
.SM FPA
or
.SM FPA\s+1+.
.SH DESCRIPTION
.IX "FPA" "FPA+" "_format_of_1st_" "_format_of_2nd_"
.LP
.B fpa_download
writes microcode, map, and constants files to
.SM FPA
and
.SM FPA\s+1+
boards.
.SM FPA
requires a map file;
.SM FPA\s+1+
does not.
.LP
Root execution level is required to download (d,u,m and c options).
.B fpa_download
is called from
.B /etc/rc.local
when
.B /dev/fpa
exists.
.LP
Given no arguments,
.B fpa_download
prints whether an
.SM FPA\s+1,
or
.SM FPA\s+1+
is installed.
.SH OPTIONS
.TP 10
.B \-d
Download microcode, constants, and map files.
Enable default file names.
.TP
.B \-r
Print microcode and constant revision.
.TP
.B \-v
Verbose mode.
.TP
.BI \-u " ufile"
Download microcode from
.I ufile.
.TP
.BI \-m " mfile"
Download map from
.I mfile
(\s-1FPA\s+1 only).
.TP
.BI \-c " cfile"
Download constants from 
.I cfile.
.SH FILES
.PD 0
.TP 25
.B /dev/fpa
device file for both
.SM FPA
and
.SM FPA\s+1+.
.PD
.PD 0
.TP
.B /usr/etc/fpa/fpa_micro_bin
default microcode file (ufile) for
.SM FPA\s+1.
.PD
.PD 0
.TP
.B /usr/etc/fpa/fpa_constants
default constants file (cfile) for
.SM FPA
.PD
.PD 0
.TP
.B /usr/etc/fpa/fpa_micro_map
default map file (mfile) for
.SM FPA
.PD
.PD 0
.TP
.B /usr/etc/fpa/fpa_micro_bin+
default microcode file (ufile) for
.SM FPA\s+1+
.PD
.PD 0
.TP
.B /usr/etc/fpa/fpa_constants+
default constants file (cfile) for
.SM FPA\s+1+
.PD
.SH "SEE ALSO"
.BR fpa (4)
.SH DIAGNOSTICS
.LP
The following diagnostics are printed when
.B fpa_download
encounters a serious error and asks the kernel to disable the
.SM FPA\s+1.
This might occur if the microcode, map, or constants files
are corrupted, or if there is an
.SM FPA
or system hardware problem.
.TP
.B "\s-1FPA\s+1 Download Failed - \s-1FPA\s+1 ioctl failed"
An ioctl() on
.B /dev/fpa
failed, possibly due to a hung
.SM FPA
pipe.
.TP
.B "\s-1FPA\s+1 Failed Download - \s-1FPA\s+1 Bus Error"
Received a
.SM SIGFPE\s+1.
.TP
.B "\s-1FPA\s+1 Failed Download - Upload mismatch"
After each file is written to the
.SM FPA/FPA\s+1+,
.B fpa_download
uploads the contents of
.SM FPA
memory and compares it
with the source.  They should always match.
   ./share/man/man8/fparel.8                                                                              755       0      12         4503  4424741607  10264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fparel.8 1.18 89/03/27 SMI;
.TH FPAREL 8 "22 March 1989"
.SH NAME
fparel - Sun FPA online reliability tests
.SH SYNOPSIS
.B fparel
.RB [ " \-p"\c
.IR n " ]"
.RB [ " \-v " ]
.SH AVAILABILITY
.LP
Not available on Sun386i systems.
.SH DESCRIPTION
.IX fparel "" "\fLfparel\fR \(em floating-point reliability tests"
.IX floating-point "reliability tests \(em \fLfparel\fR"
.LP
.B fparel
is a command to execute the Sun
.SM FPA
online confidence and
reliability test program.
.B fparel
tests about 90% of the functions of the
.SM FPA
board, and tests all
.SM FPA
contexts not in use by other processes.
.B fparel
runs without disturbing other processes that may be using the
.SM FPA\s0.
.B fparel
can only be run by the super-user.
.LP
After a successful pass,
.B fparel
writes
.IP
.B time, date: Sun
.SB FPA
.B
Passed.  The contexts tested are: 0, 1, ... 31
.LP
to the file
.BR /var/adm/diaglog .
.LP
If a pass fails,
.B fparel
writes
.IP
.B time, date: Sun
.SB FPA
.B failed
.LP
along with the test name and context number that failed,
to the file
.BR /var/adm/diaglog .
.B fparel
then broadcasts the message
.IP
.B time, date: Sun
.SB FPA
.B failed, disabled, service required
.LP
to all users of the system.  Next,
.B fparel
causes the kernel to disable the
.SM FPA\s0.
Once the
kernel disables the
.SM FPA\s0,
the system must be rebooted to make it
accessible.
.LP
The file
.B /etc/rc.local
should contain an entry to cause
.B fparel
to be invoked upon reboot to be sure that the
.SM FPA
remains
unaccessible in cases where rebooting doesn't correct the
problem.  See
.BR rc (8).
.LP
The 
.BR crontab (5)
file for root should contain an entry indicating that
.BR cron (8)
is to run
.B fparel
daily, such as:
.IP
.B 7 2 * * * /usr/etc/fpa/fparel
.LP
which causes
.B fparel
to run at seven minutes past two, every day.
See
.BR cron (8)
and
.BR crontab (5)
for details.
.LP
.SH OPTIONS
.TP
.B \-p\fP\fIn
Perform
.I n
passes.  Default is
\fIn\fP=1.
.B \-p0
means perform 2147483647 passes.
.TP
.B \-v
Run in verbose mode with detailed test
results to the standard output.
.SH FILES
.PD 0
.TP 20
.B /var/adm/diaglog
Log of
.B fparel
diagnostics.
.TP
.B /etc/rc.local
.TP
.B /var/spool/cron/crontabs/root
.TP
.B /usr/etc/fpa/*
directory containing 
.SM FPA
microcode, data files, and loader
.PD
.SH SEE ALSO
.BR fpaversion (8),
.BR crontab (5),
.BR cron (8),
.BR rc (8)
 tested are: 0, 1, ... 31
.LP
to the file
.BR /var/adm/diaglog .
.LP
If a pass fails,
.B fparel
writes
.IP
.B time, date: Sun
.SB FPA
.B failed
.LP
along with the test name and context numb./share/man/man8/fpaversion.8                                                                          755       0      12         5210  4424741607  11163                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fpaversion.8 1.12 89/03/27 SMI;
.TH FPAVERSION 8 "22 March 1989"
.SH NAME
fpaversion \- print the Floating Point Accelerator (\s-1FPA\s+1) version
.SH SYNOPSIS
.B fpaversion
[
.B \-hlqv
]
[
.B \-t
[
.B cdhimprstvxCIMS
\ ]\|]
.SH AVAILABILITY
.BR fpaversion (8)
applies to Sun3 and Sun3x systems
equipped with either an
.SM FPA
or
.SM FPA\s+1+.
.SH DESCRIPTION
.IX fpaversion "" "\fLfpaversion\fR \(em floating-point version and tests"
.IX floating-point "version and tests \(em \fLfpaversion\fR"
.B fpaversion
performs various tests on the
.SM FPA 
or 
.SM FPA\s+1+.
When given no arguments, it
prints the microcode version number and constants
currently installed on
.BR /dev/fpa .
.B fpaversion
also performs a quick test to ensure proper operation and reports
whether an
.SM FPA
or an
.SM FPA\s+1+
is installed.
.SH OPTIONS
.TP
.B \-h
Help.  Print command-line summary.
.TP
.B \-l
Loop through tests infinitely.
.TP
.B \-q
Quiet output.  Print out only error messages.
.TP
.B \-v
Verbose output.
.TP
.B \-t
Specify certain tests:
.RS
.TP
.B c
Command register format instructions.
.TP
.B d
Double precision format instructions.
.TP
.B h
Help.  Print summary of test specifiers.
.TP
.B i
Imask register.
.TP
.B m
Mode register.
.TP
.B p
Simple pipe sequencing.
.TP
.B r
User registers for all contexts.
.TP
.B s
Single precision format instructions.
.TP
.B t
Status generation.
.TP
.B v
Print version number and date of microcode, and constants.  Report whether an
.SM FPA
or
.SM FPA\s+1+
is installed.
.TP
.B x
Extended format instructions.
.TP
.B C
Check checksum for microcode, mapping
.SM RAM\s0,
and constant
.SM RAM\s0 
for the
.SM FPA\s+1.
Check checksum for microcode 
.SM RAM\s0 
and constant 
.SM RAM\s0 
 for the
.SM FPA\s+1+.
.TP
.B I
Allows interactive reads and writes to the
.SM FPA\s+1.
.TP
.B M
Command register format matrix instructions.
.TP
.B S
Shadow registers.
.RE
.SH FILES
.PD 0
.TP 30 
.B /dev/fpa
physical
.SM FPA
device
.TP
.B /usr/etc/fpa/fpa_micro_bin
microcode binaries for the
.SM FPA
.TP
.B /usr/etc/fpa/fpa_micro_map
microcode map binaries for the
.SM FPA
.TP
.B /usr/etc/fpa/fpa_constants
microcode data file for the
.SM FPA
.TP
.B /usr/etc/fpa/fpa_micro_bin+
microcode binaries for the
.SM FPA\s+1+
.TP
.B /usr/etc/fpa/fpa_constants+
microcode data file for the
.SM FPA\s+1+
.TP
.B /usr/etc/fpa/fpa_download
microcode loader
.PD
.SH "SEE ALSO"
.LP
.BR fparel (8),
.BR sysdiag (8)
.SH "DIAGNOSTICS"
.LP
If a test fails, its name, along with the actual and expected results will
be printed.

    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c     #  
rquotad.8c c    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c d  
8  (  	rwalld.8c  8  
L  )  rwhod.8c  d.  
\  *  sa.8 .8c  
p  +  
savecore.8 o  
  ,  
sendmail.8 8  
  -  setup_client.8   
./share/man/man8/fpurel.8                                                                              755       0      12         2154  4424741607  10310                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fpurel.8 1.3 89/03/27 SMI;
.TH FPUREL 8 "22 March 1989"
.SH NAME
fpurel \- perform tests the Sun Floating Point Co-processor
.SH SYNOPSIS
.B fpurel
[
.B \-rv
]
[
.BR \-p [\c
.IR count ]
]
.SH DESCRIPTION
.IX "fpurel command"  ""  "\fLfpurel\fP \(em Test Numeric Co-processor"
.LP
.B fpurel
performs a series of functional and computational tests for the Sun Floating
Point Co-processor to verify that it is operational and accurate.
With no options,
.B fpurel
runs one pass silently in the 
foreground and only reports errors if any are found.
.SH OPTIONS
.TP 10
.B \-r
Disable stop on error.  
Continue to run if errors are detected.
The default is to display the error message and to stop testing
when an error is detected.
.TP
.B \-v
Verbose.  
Display the name and results of each test on the console.
The default is to run silently.
.TP
.BI "\-p [" count ]
Pass count.  
Specify the number of times to run the test suite.
The default is to run one pass.
.SH EXAMPLE
.LP
This example uses
.B fpurel
from the
.B /usr/diag
directory.  If no errors are detected, then no information is
displayed.
.IP
.B
% /usr/diag/fpurel
8 v.  `    
mconnect.8 .  t    mkfile.8 ect      mkfs.8 i      mknod.8       	mkproto.8 no      	modload.8 o.      	modstat.8 d.      modunload.8        
monitor.8s a      mount.8   $    	mountd.8c un  8    named.8c d.8  L    ncheck.8 .8c  `    
ndbootd.8c 8  x    netconfig.8c c c      
netstat.8c c      newaliases.8./share/man/man8/fpuversion4.8                                                                         755       0      12         1115  4424741607  11273                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fpuversion4.8 1.5 89/03/27 SMI;
.TH FPUVERSION4 8 "25 March 1989"
.SH NAME
fpuversion4 \- print the Sun-4 FPU version
.SH SYNOPSIS
.B /usr/etc/fpuversion4
.SH AVAILABILITY
Sun-4 systems only.
.SH DESCRIPTION
.IX  "fpuversion4 command"  ""  "\fLfpuversion4\fP \(em display Sun-4 FPU version"
.B fpuversion4
reads the
.B %fsr
register to determine the
.SM FPU
version installed on a Sun-4.
The printed version field contains a value in the range 0-7; by
.SM SPARC
convention 7 indicates that no
.SM FPU
is installed, so floating-point instructions are always emulated
in the kernel.
   in.tnamed.8c        inetd.8c 8c       
infocmp.8v c      init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      lockd.8c 8       logintool.8       lpc.8 oo      lpd.8 c.    ./share/man/man8/fsck.8                                                                                755       0      12        13207  4424741607   7762                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fsck.8 1.15 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH FSCK 8 "22 March 1989"
.SH NAME
fsck \- file system consistency check and interactive repair
.SH SYNOPSIS
.B /usr/etc/fsck
.B \-p
[
.I filesystem .\|.\|.
]
.LP
.B /usr/etc/fsck
[
.B \-b
.I block#
]
[
.B \-w
]
[
.B \-y
]
[
.B \-n
]
[
.I filesystem 
] .\|.\|.
.SH DESCRIPTION
.IX  "fsck command"  ""  "\fLfsck\fP \(em check and repair file system"
.IX  "check file system"  ""  "check file system \(em \fLfsck\fP"
.IX  "file system"  "check and repair"  ""  "check and repair \(em \fLfsck\fP"
The first form of
.B fsck
preens a standard set of file systems or the specified file systems.
It is normally used in the
.B /etc/rc
script during automatic reboot.  In this case,
.B fsck
reads the table
.B /etc/fstab
to determine the file systems to check.  It inspects disks in parallel,
taking maximum advantage of I/O overlap to check the file systems
as quickly as possible.
.LP
Normally, the root file system is checked in pass 1; other
root-partition file systems are checked in pass 2.  
Small file systems on separate partitions are checked
in pass 3, while larger ones are checked in passes 4 and 5.
.LP
Only partitions marked in
.B /etc/fstab
with a file system type of ``4.2'' and a non-zero pass number
are checked.
.PP
.B fsck
corrects innocuous inconsistencies such as: unreferenced inodes,
too-large link
counts in inodes, missing blocks in the free list, blocks appearing
in the free list and also in files, or incorrect counts in the super
block, automatically.  It displays a message
for each inconsistency corrected that
identifies the nature of, and file system on which, the correction
is to take place.  After successfully correcting a file system,
.B fsck
prints the number of files on that file system,
the number of used and free blocks,
and the percentage of fragmentation.
.LP
If
.B fsck
encounters other inconsistencies that it cannot fix
automatically, it exits with an abnormal return status (and the reboot
fails).
.LP
If sent a
.SM QUIT
signal,
.B fsck
will finish the file system checks, then exit with an abnormal
return status that causes the automatic reboot to fail.
This is useful when you wish to finish the file system checks,
but do not want the machine to come up multiuser.
.LP
Without the
.B \-p
option,
.B fsck
audits and interactively repairs inconsistent conditions on
file systems.  In this case, it asks for confirmation before attempting
any corrections.  Inconsistencies other than those mentioned above
can often result in some loss of data.  The amount and severity of data
lost can be determined from the diagnostic output.
.LP
The default action for each correction is to wait for the operator to
respond either \fByes\fP or \fBno\fP.
If the operator does not have write permission on the file system,
.B fsck
will default to a 
.BR "\-n "
(no corrections) action.
.PP
If no file systems are given to 
.B fsck
then a default list of file systems is read from
the file
.BR /etc/fstab .
.PP
Inconsistencies checked in order are as follows:
.RS
.TP
\(bu
Blocks claimed by more than one inode or the free list.
.PD 0
.TP
\(bu
Blocks claimed by an inode or the free list outside the range of the file system.
.TP
\(bu
Incorrect link counts.
.TP
\(bu
Incorrect directory sizes.
.TP
\(bu
Bad inode format.
.TP
\(bu
Blocks not accounted for anywhere.
.TP
\(bu
Directory checks, file pointing to unallocated inode,
inode number out of range.
.TP
\(bu
Super Block checks:
more blocks for inodes than there are in the file system.
.TP
\(bu
Bad free block list format.
.TP
\(bu
Total free block and/or free inode count incorrect.
.PD
.RE
.PP
Orphaned files and directories (allocated but unreferenced) are,
with the operator's concurrence, reconnected by
placing them in the 
.B lost+found
directory.
The name assigned is the inode number.  If the
.B lost+found
directory does not exist, it is created.
If there is insufficient space its size is increased.
.PP
A file system may be specified by giving the name of the cooked or raw device
on which it resides, or by giving the name of its mount point.  If the latter
is given,
.B fsck
finds the name of the device on which the file system resides by looking in
.BR /etc/fstab .
.PP
Checking the raw device is almost always faster.
.SH OPTIONS
.TP
.B \-b
Use the block specified immediately after the flag as
the super block for the file system.  Block 32 is always
an alternate super block.
.TP
.B \-w
Check writable file systems only.
.TP
.B  \-y
Assume a
.B yes
response to all questions asked by 
.BR fsck ;
this should be used with extreme caution, as it is a free license
to continue, even after severe problems are encountered.
.TP
.B  \-n
Assume a
.B no
response to all questions asked by 
.BR fsck ;
do not open the file system for writing.
.SH FILES
.br
.ns
.TP 12
/etc/fstab
contains default list of file systems to check
.SH DIAGNOSTICS
The diagnostics produced by 
.B fsck
are fully enumerated and explained in
.TX ADMIN .
.SH EXIT STATUS
.TP 
.B 0
Either no errors detected or all errors were corrected.
.TP
.B 4
Root file system errors were corrected.  The system must be
rebooted.
.TP
.B 8
Some uncorrected errors exist on one or more of the file systems
checked, there was a syntax error, or some other operational
error occurred.
.TP
.B 12
A signal was caught during processing.
.SH "SEE ALSO"
.BR newfs (8),
.BR mkfs (8),
.BR crash (8S),
.BR dumpfs (8),
.BR reboot (8),
.BR rexecd (8c),
.BR ypserv (8),
.BR fstab (5),
.BR fs (5)
.LP
.TX ADMIN
.SH BUGS
There should be some way to start a \fBfsck \-p\fR at pass \fIn\fR.
.8 V  zdump.8      W  zic.8 ump.8      W  zic.8  d
.BR | .
Thus
.B 4=6
is true if the fourth byte of the
packet has the value 6, and
.B 20&0xf
is true if byte twenty
has one of its four low order bits nonzero.
.TP
.B broadcast
True if the packet is a broadcast packet.
.TP
.B arp
True if the packet is a arp packet (see
.BR arp (4P)).
.TP
.B rarp
True if the packet./share/man/man8/fsirand.8                                                                             755       0      12         1563  4424741607  10444                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)fsirand.8 1.8 89/03/27 SMI;
.TH FSIRAND 8 "9 September 1987"
.SH NAME
fsirand \- install random inode generation numbers
.SH SYNOPSIS
.B fsirand
[
.B \-p
]
.I special
.SH DESCRIPTION
.IX  "fsirand command"  ""  "\fLfsirand\fP \(em install random inode generation numbers"
.B fsirand
installs random inode generation numbers on all the inodes on device
.I special,
and also installs a filesystem
.SM ID
in the superblock.
This helps increase the security of filesystems exported by
.SM NFS\s0.
.LP
.B fsirand
must be used only on an unmounted filesystem
that has been checked with
.BR fsck (8).
The only exception is that it can be used
on the root filesystem in single-user mode,
if the system is immediately re-booted afterwords.
.SH OPTIONS
.TP
.B \-p
Print out the generation numbers for all the inodes,
but do not change the generation numbers.
.SH SEE ALSO
.BR fsck (8)
    lockd.8c        logintool.8       lpc.8 8       lpd.8 gi      mailstats.8   $    	makedbm.8 $  8  ./share/man/man8/ftpd.8c                                                                               755       0      12        20430  4424741610  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ftpd.8c 1.25 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH FTPD 8C "25 March 1989"
.SH NAME
ftpd, in.ftpd \- DARPA Internet File Transfer Protocol server
.SH SYNOPSIS
.B /usr/etc/in.ftpd
[
.B \-dl
] [
.BI \-t timeout
]
.IB host .\fIsocket
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ftpd command"  ""  "\fLftpd\fP \(em file transfer protocol server"
.IX  "file transfer protocol" "server \(em \fLftpd\fP"
.IX  Internet "file transfer protocol server \(em \fLftpd\fP"
.IX  DARPA "Internet file transfer protocol server \(em \fLftpd\fP"
.IX  servers  ftpd  ""  "\fLftpd\fP \(em Internet File Transfer Protocol"
.B ftpd
is the
.SM DARPA
Internet File Transfer Protocol (\s-1FTP\s0)
server process.  The server is invoked by the Internet daemon
.BR inetd (8C)
each time a connection to the
.SM FTP
service (see
.BR services (5))
is made, with the connection available as descriptor 0 and the
host and socket the connection originated from (in hex
and decimal respectively) as argument.
.LP
Inactive connections are timed out after 60 seconds.
.LP
If the
.B \-d
option is specified,
debugging information is logged to the system log daemon,
.BR syslogd (8).
.LP
If the
.B \-l
option is specified, each
.SM FTP
session is logged to
.BR syslogd .
.LP
The FTP server
will timeout an inactive session after 15 minutes.
If the
.B \-t
option is specified,
the inactivity timeout period will be set to
.IR timeout .
.LP
The
.SM FTP
server currently supports the following
.SM FTP
requests;  case is not distinguished.
.LP
.TP 10
.B Request
.B Description
.TP
.SB ABOR
abort previous command
.TP
.SB ACCT
specify account (ignored)
.TP
.SB ALLO
allocate storage (vacuously)
.TP
.SB APPE
append to a file
.TP
.SB CDUP
change to parent of current working directory
.TP
.SB CWD
change working directory
.TP
.SB DELE
delete a file
.TP
.SB HELP
give help information
.TP
.SB LIST
give list files in a directory
(\fBls \-lg\fP)
.TP
.SB MKD
make a directory
.TP
.SB MODE
specify data transfer
.I mode
.TP
.SB NLST
give name list of files in directory
(\fBls\fP)
.TP
.SB NOOP
do nothing
.TP
.SB PASS
specify password
.TP
.SB PASV
prepare for server-to-server transfer
.TP
.SB PORT
specify data connection port
.TP
.SB PWD
print the current working directory
.TP
.SB QUIT
terminate session
.TP
.SB RETR
retrieve a file
.TP
.SB RMD
remove a directory
.TP
.SB RNFR
specify rename-from file name
.TP
.SB RNTO
specify rename-to file name
.TP
.SB STOR
store a file
.TP
.SB STOU
store a file with a unique name
.TP
.SB STRU
specify data transfer
.I structure
.TP
.SB TYPE
specify data transfer
.I type
.TP
.SB USER
specify user name
.TP
.SB XCUP
change to parent of current working directory
.TP
.SB XCWD
change working directory
.TP
.SB XMKD
make a directory
.TP
.SB XPWD
print the current working directory
.TP
.SB XRMD
remove a directory
.LP
The remaining
.SM FTP
requests specified in
.SM RFC
959 are recognized, but not implemented.
.LP
The
.SM FTP
server will abort an active file transfer only when the
.SB ABOR
command is preceded by a Telnet \(lqInterrupt Process\(rq (IP)
signal and a Telnet \(lqSynch\(rq signal in the command Telnet stream,
as described in
.SM RFC
959.
.LP
.B ftpd
interprets file names according to the \(lqglobbing\(rq
conventions used by
.BR csh (1).
This allows users to utilize the metacharacters
.RB ` "* ? [\s0] {\s0}\s+2~\s0" '.
.LP
.B ftpd
authenticates users according to three rules.
.TP
\(bu
The user name must be in the password data base,
.BR /etc/passwd ,
and not have a null password.  In this case a password
must be provided by the client before any file operations
may be performed.
.TP
\(bu
If the file
.B /etc/ftpusers
exists, the user name must not appear in that file.
.TP
\(bu
The user must have a standard shell returned by
.BR getusershell (3).
.TP
\(bu
If the user name is \(lqanonymous\(rq or \(lqftp\(rq, an
anonymous
.SM FTP
account must be present in the password
file (user \(lqftp\(rq).  In this case the user is allowed
to log in by specifying any password (by convention this
is given as the client host's name).
.LP
In the last case,
.B ftpd
takes special measures to restrict the client's access privileges.
The server performs a
.BR chroot (2)
command to the home directory of the \(lqftp\(rq user.
In order that system security is not breached, it is recommended
that the \(lqftp\(rq subtree be constructed with care;  the following
rules are recommended.
.TP 8
.B ftp
Make the home directory owned by \(lqftp\(rq and unwritable by anyone.
.TP 8
.B ~ftp/bin
Make this directory owned by the super-user and unwritable by
anyone.  The program
.BR ls (1V)
must be present to support the list commands.  This
program should have mode 111.
Since the default /bin/ls command is linked with a shared
library, so you need to set up the files for dynamic linking as well.
.TP 8
.B ~ftp/usr/lib/ld.so
the runtime loader must be present and executable.
.TP 8
.B ~ftp/dev/zero
used by the runtime loader, create this with the command
\(lqmknod zero c 3 12\(rq.
.TP 8
.B ~ftp/usr/lib/libc.so.*
should be a copy of the latest version of the shared C library.
.TP 8
.B ~ftp/etc
Make this directory owned by the super-user and unwritable by
anyone.  The files
.BR passwd (5)
and
.BR group (5)
must be present for the
.B ls
command to work properly.  These files should be mode 444.
.TP 8
.B ~ftp/pub
Make this directory mode 777 and owned by \(lqftp\(rq.  Users
should then place files which are to be accessible via the
anonymous account in this directory.
.SH DIAGNOSTICS
.B ftpd
logs various errors to the system log daemon,
.BR syslogd ,
with a facility code of
.BR daemon .
The messages are listed here, grouped by severity level.
.SS Err Severity
.HP
.B "getpeername failed:"
.I reason
.br
A
.BR getpeername (2)
call failed.
.HP
.B "getsockname failed:"
.I reason
.br
A
.BR getsockname (2)
call failed.
.HP
.B "signal failed:"
.I reason
.br
A
.BR signal (3)
call failed.
.HP
.B "setsockopt failed:"
.I reason
.br
A
.B setsockopt
call
(see
.BR getsockopt (2))
failed.
.HP
.B "ioctl failed:"
.I reason
.br
A
.BR ioctl (2)
call failed.
.TP
.IB directory : " reason"
.B ftpd
did not have write permission on the directory
.I directory
in which a file was to be created by the
.SB STOU
command.
.SS Info Severity
These messages are logged only if the
.B \-l
flag is specified.
.HP
.B "\s-1FTPD\s0: connection from"
.I host
.B at
.I time
.br
A connection was made to
.B ftpd
from the host
.I host
at the date and time
.IR time .
.HP
.B "\s-1FTPD\s0: User"
.I user
.B "timed out after"
.I timeout
.B "seconds at"
.I time
.br
The user
.I user
was logged out because they hadn't entered any commands after
.I timeout
seconds; the logout occurred at the date and time
.IR time .
.SS Debug Severity
These messages are logged only if the
.B \-d
flag is specified.
.HP
.B "\S-1FTPD\s0: command:"
.I command
.br
A command line containing
.I command
was read from the
.SM FTP
client.
.TP
.B "lost connection"
The
.SM FTP
client dropped the connection.
.TP
<\^\-\^\-\^\- \fIreplycode\fP
.PD 0
.TP
<\^\-\^\-\^\- \fIreplycode\-\fP
A reply was sent to the
.SM FTP
client with the reply code
.IR replycode .
The next message logged will include the message associated with the
reply.  If a
.B \-
follows the reply code, the reply is continued on later lines.
.PD
.SH "SEE ALSO"
.BR inetd (8C),
.BR syslogd (8),
.BR csh (1),
.BR ftp (1C),
.BR ls (1V),
.BR chroot (2)
.BR getpeername (2),
.BR getsockname (2),
.BR getsockopt (2),
.BR ioctl (2),
.BR getusershell (3),
.BR ftpusers (5),
.BR group (5),
.BR passwd (5),
.BR services (5)
.LP
Postel, Jon, and Joyce Reynolds,
.I File Transfer Protocol (\s-1FTP\s0),
\s-1RFC\s0
959, Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
October 1985.
.SH BUGS
The anonymous account is inherently dangerous
and should be avoided when possible.
.LP
The server must run as the super-user to create sockets with privileged
port numbers.  It maintains an effective user id of the logged in user,
reverting to the super-user only when binding addresses to sockets.
The possible security holes have been extensively scrutinized, but are
possibly incomplete.
precedence):
.IP
A parenthesized group of primaries and operators
(parentheses are special to the Shell and must be escaped).
.IP
The negation of a primary
.RB (` not '
is the unary
.I not
operator).
.IP
Concatenation of primaries (./share/man/man8/getty.8                                                                               755       0      12         7466  4424741610  10154                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)getty.8 1.16 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH GETTY 8 "18 February 1988"
.SH NAME
getty  \- set terminal mode
.SH SYNOPSIS
.B /usr/etc/getty
[
.I type
[
.I tty
] ]
.SH Sun386i SYSTEM SYNOPSIS
.B /usr/etc/getty
[
.B \-n
]
[
.I type
[
.I tty
] ]
.SH DESCRIPTION
.IX  "getty command"  ""  "\fLgetty\fP \(em set terminal mode"
.LP
.BR getty ,
which is invoked by
.BR init (8),
opens and initializes a tty line, reads a login name, and invokes
.BR login (1).
.LP
The
.I tty
argument is the name of the character-special file in
.B /dev
that corresponds to the terminal.  If there is no
.I tty
argument, or the argument is
.RB ` \- ',
the tty line is assumed to be opened as file descriptor 
.BR 0 .
.LP
The
.I type
argument, if supplied, is used as an index into the
.BR gettytab (5)
database\(em\&to determine the characteristics of the line.
If this argument is absent, or if there is no such entry, the
default entry is used.  If there is no
.BR /etc/gettytab
file, a set of system-supplied defaults is used.
.LP
When the indicated entry is located,
.B getty
clears the terminal screen, prints a banner heading, and prompts for a
login name.  Usually, either the banner or the login prompt includes
the system's hostname.
.LP
Next,
.BR getty
prompts for a login and reads the login name, one character at a time.
When it receives a
.SM NULL
character (which is assumed to be the result pressing the
.SM BREAK\s0 ,
or \(lqinterrupt\(rq key),
.B getty
switches to the entry
.B gettytab
entry named in the
.B nx
field.  It reinitializes the line to the new characteristics, and
then prompts for a login once again.
This mechanism typically is used to cycle through a set of line
speeds (baud rates) for each terminal line.  For instance, a rotary
dialup might have entries for the speeds: 300, 1200, 150, and 110
baud, with each
.B nx
field pointing to the next one in succession.
.LP
The user terminates login input line with a
.SM NEWLINE
or
.SM RETURN
character.  The latter is preferable; it sets up the proper
treatment of 
.SM RETURN 
characters (see
.BR tty (4)).
.B getty
checks to see if the terminal has only upper-case alphabetical
characters.  If all alphabetical characters in the login name are in
upper case, the system maps them along with all subsequent upper-case
input characters to lower-case internally; they are displayed in upper
case for the benefit of the terminal.  To force recognition
of an upper-case character, the shell allows them to be quoted
(typically by preceding each with a backslash,
.RB ` \e ').
.LP
Finally,
.B getty
calls
.BR login (1)
with the login name as an argument.
.LP
.B getty
can be set to time out after a certain interval; this hangs up dial-up
lines if the login name is not entered in time.
.SH Sun386i SYSTEM DESCRIPTION
For Sun386i system, the value of
.I type
is the constant
.BR Sun ,
for the console frame buffer.
.SH Sun386i SYSTEM OPTIONS
.TP 
.B \-n
invoke the full screen login program
.BR logintool (8),
and optionally the \(lqNew User Accounts\(rq feature.
May only be used on a frame buffer.
Unless removed from the console entry in
.IR /etc/ttytab ,
this option is in effect by default.
.SH FILES
.PD 0
.TP 20
.B /etc/gettytab
.PD
.SH "SEE ALSO"
.BR login (1),
.BR ioctl (2),
.BR tty (4),
.BR gettytab (5),
.BR ttytab (5),
.BR init (8),
.BR logintool (8)
.SH DIAGNOSTICS
.TP
.IB ttyxx ": No such device or address."
.TP
.IB ttyxx ": No such file or directory."
A terminal which is turned on in the
.B ttys
file cannot be opened,
likely because the requisite lines are either not configured into the
system, the associated device was not attached during boot-time system
configuration, or the special file in
.B /dev
does not exist.
2perday.8     V  zdump.8      W  zic.8 8 ed with the
reply.  If a
.B \-
follows the reply code, the reply is continued on later lines.
.PD
.SH "SEE ALSO"
.BR inetd (8C),
.BR syslogd (8),
.BR cs./share/man/man8/gettable.8c                                                                           755       0      12         2376  4424741610  10745                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gettable.8c 1.12 89/03/27 SMI; from UCB 4.2
.TH GETTABLE 8C "9 September 1987"
.SH NAME
gettable \- get DoD Internet format host table from a host
.SH SYNOPSIS
.B /usr/etc/gettable
.I host
.SH DESCRIPTION
.IX  "gettable command"  ""  "\fLgettable\fP \(em get DoD Internet host table"
.IX  "DoD Internet host table, get from host \(em \fLgettable\fP"
.B gettable
is a simple program used to obtain the DoD Internet
host table from a ``hostname'' server.  The indicated
.I host
is queried for the table.  The table, if retrieved,
is placed in the file
.BR hosts.txt .
.LP
.B gettable
operates by opening a
.SM TCP
connection to the port indicated
in the service specification for ``hostname''.  A request
is then made for ``\s-1ALL\s0'' names and the resultant information
is placed in the output file.
.LP
.B gettable
is best used in conjunction with the
.BR htable (8)
program which converts the DoD Internet host table format to
that used by the network library lookup routines.
.SH "SEE ALSO"
.BR intro (3N),
.BR htable (8)
.LP
Harrenstien, Ken, Mary Stahl, and Elizabeth Feinler,
.I
.SM HOSTNAME
.I Server,
.SM RFC
953,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
October 1985.
.SH BUGS
Should allow requests for only part of the database.
L    ncheck.8  L  `    
ndbootd.8c `  x    netconfig.8c        
netstat.8c       newaliases.8        newfs.8       newkey.8        nfsd.8       
nfsstat.8c   	     nslookup.8c   	    
old-anal./share/man/man8/gpconfig.8                                                                            755       0      12         5027  4424741610  10603                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)gpconfig.8 1.17 89/03/27 SMI;
.TH GPCONFIG 8 "22 March 1989"
.SH NAME
gpconfig \- initialize the Graphics Processor
.SH SYOPNSIS
.B /usr/etc/gpconfig
.I gpunit
[
[
.B \-b
]
[
.B \-f
]
.IR fbunit .\|.\|.
[
.BI \-u " microcode-file"
]
]
.SH DESCRIPTION
.IX gpconfig "" "\fLgpconfig\fR \(em bind \fLcgtwo\fR frame buffers to GP"
.IX "GP, initialize graphics processor \(em \fLgpconfig\fR"
.B gpconfig
binds
.B cgtwo
frame buffers to the
.SM GP\s0,
(Graphics Processor)
and loads and starts the appropriate microcode in the
.SM GP\s0.
For example, the command line:
.LP
.IP
.B /usr/etc/gpconfig gpone0 cgtwo0 cgtwo1
.LP
will bind the frame buffer boards
.B cgtwo0
and
.B cgtwo1
to the Graphics Processor
.BR gpone0 .
The devices
.B /dev/gpone0a
and
.B /dev/gpone0b
will then refer to the combination of
.B gpone
and
.B cgtwo0
or
.B cgtwo1
respectively.
.LP
The same
.B cgtwo
frame buffer cannot be bound to more than one
.SM GP\s0.
.LP
All
.B cgtwo
frame buffer boards bound to a
.SM GP
must be configured
to the same width and height.
.LP
The standard version of the file
.B /etc/rc.local
contains the following
.B gpconfig
command line:
.IP
.B "/usr/etc/gpconfig gpone0 \-f \-b cgtwo0"
.LP
This binds
.B gpone0
and
.B cgtwo0
as
.BR gpone0a ,
causes
.B gpone0a
to use the Graphics Buffer Board if it is present, and redirects
.B /dev/fb
to be
.BR /dev/gpone0a .
If another configuration is desired, edit the command line in
.B /etc/rc.local
to do the appropriate thing.
.LP
It is inadvisable to run the
.B gpconfig
command while the
.SM GP
is being used.
Unpredictable results may occur.
If it is necessary to change
the frame buffer bindings to the
.SM GP
(or to stop using the
.SM GP
altogether),
bring the system down gently,
boot single user, edit the
.B gpconfig
line in the
.B /etc/rc.local
file, and bring the system back up multiuser.
.SH OPTIONS
.TP
.B \-b
Configure the
.SM GP
to use the Graphics Buffer as well.
Currently only one
.SM GP\s0-to-frame-buffer
binding
is allowed to use the graphics buffer at a time.  Only the last
.B \-b
option in the command line takes effect.
.TP
.B \-f
Redirect
.B /dev/fb
to the device formed by binding
.I gpunit
with
.BR fbunit .
Only the last
.B \-f
option in the command line takes effect.
.SH FILES
.TP
.BI \-u " microcode-file"
Load the specified microcode file instead of the
default file from
.BR /usr/lib .
.PD 0
.TP 20
.B /dev/cgtwo[0-9]
.TP
.B /dev/fb
.TP
.B /dev/gpone[0-3][abcd]
.TP
.B /usr/lib/gp1cg2.1024.ucode
.TP
.B /usr/lib/gp1cg2.1152.ucode
.TP
.B /etc/rc.local
.PD
.SH "SEE ALSO"
.BR cgtwo (4S),
.BR gpone (4S)
pdated.8c  !    "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c   
8  (  	rwalld.8c  $  
L  )  rwhod.8c  
8  
\  *  sa.8 .8c  
p  +  
savecore.8 L  
  ,  
sendmail.8 p  
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8      =  tic.8v c    2  	sprayd.8c    (  3  statd.8c    <  4  sticky.8  (./share/man/man8/grpck.8                                                                               755       0      12         2314  4424741610  10111                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)grpck.8 1.8 89/03/27 SMI; from S5R3
.TH GRPCK 8 "22 March 1989"
.SH NAME
grpck \- check group database entries
.SH SYNOPSIS
.B /usr/etc/grpck
[
.I filename
]
.SH DESCRIPTION
.IX grpck "" "\fLgrpck\fR \(em check group database entries"
.IX "System V commands" "\fLgrpck\fR"
.IP Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
.B grpck
checks that a file in
.BR group (5)
does not contain any errors; it checks the
.B /etc/group
file by default.
.SH FILES
.B /etc/group
.SH DIAGNOSTICS
.TP
.B "Too many/few fields"
An entry in the group file does not have the proper number of
fields.
.TP
.B "No group name"
The group name field of an entry is empty.
.TP
.B "Bad character(s) in group name"
The group name in an entry contains characters other than lower-case letters
and digits.
.TP
.B "Invalid GID"
The group \s-1ID\s+1 field in an entry is not numeric or is greater than
65535.
.TP
.B "Null login name"
A login name in the list of login names in an entry is null.
.TP
.B "Login name not found in password file"
A login name in the list of login names in an entry is not in the
password file.
.SH SEE ALSO
.BR groups (1),
.BR group (5),
.BR passwd (5)
  L    ncheck.8  $  `    
ndbootd.8c 8  x    netconfig.8c  x      
netstat.8c x      newaliases.8        newfs.8       newkey.8 .8       nfsd.8 8      
nfsstat.8c 8  	     nslookup.8c   	    
old-analyze.8 	  	0    
old-sysdiag.8 	0  	@    ./share/man/man8/halt.8                                                                                755       0      12         2043  4424741610   7732                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)halt.8 1.12 89/03/27 SMI; from UCB 4.3
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH HALT 8 "9 September 1987"
.SH NAME
halt \- stop the processor
.SH SYNOPSIS
.B /usr/etc/halt
[
.B \-nqy
]
.SH DESCRIPTION
.IX  "halt command"  ""  "\fLhalt\fP \(em stop processor"
.IX  "stop processor halt"  ""  "stop processor \(em \fLhalt\fP"
.B halt
writes out any information pending to the disks and then
stops the processor.
.LP
.B halt
normally logs the system shutdown to the system log daemon,
.BR syslogd (8),
and places a shutdown record in the login accounting file
.BR /var/adm/wtmp .
These actions are inhibited if the
.B \-n
or
.B \-q
options are present.
.SH OPTIONS
.TP
.B \-n
Prevent the
.I sync
before stopping.
.TP
.B \-q
Do a quick halt. No graceful shutdown is attempted.
.TP
.B \-y
Halt the system, even from a dialup terminal.
.SH FILES
.PD 0
.TP 20
.B /var/adm/wtmp
login accounting file
.PD
.SH SEE ALSO
.BR reboot (8),
.BR shutdown (8),
.BR syslogd (8)
load.8       	modstat.8       modunload.8        
monitor.8s        mount.8   $    	mountd.8c $  8    named.8c  8  L    ncheck.8  L  `    
ndbootd.8c `  x    netconfig.8c        
netstat.8c       newaliases.8        newfs.8       newkey.8        nfsd.8        
nfsstat.8c   	     nslookup.8c   	    
old-analyze.8   	0    
old-sysdiag.8   	@    pac.8 	0  	P    ./share/man/man8/htable.8                                                                              755       0      12         3317  4424741611  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)htable.8 1.11 89/03/27 SMI; from UCB 4.1
.TH HTABLE 8 "9 September 1987"
.SH NAME
htable \- convert DoD Internet format host table
.SH SYNOPSIS
.B /usr/etc/htable
.I filename
.SH DESCRIPTION
.IX  "htable command"  ""  "\fLhtable\fP \(em convert DoD Internet format host table"
.B htable
converts a host table in the format specified by
.SM RFC
952 to the format used by the network
library routines.  Three files are created as a result
of running
.BR htable :
.BR hosts ,
.BR networks ,
and
.BR gateways .
The
.B hosts
file is used by the
.BR gethostent (3N)
routines in mapping host names to addresses.  The
.B networks
file is used by the
.BR getnetent (3N)
routines in mapping network names to numbers.
The
.B gateways
file is used by the routing daemon
in identifying ``passive'' Internet gateways;
see
.BR routed (8C)
for an explanation.
.LP
If any of the files
.BR localhosts ,
.BR localnetworks ,
or
.B localgateways
are present in the current directory,
the file's contents is prepended to the
output file without interpretation.  This
allows sites to maintain local aliases and
entries which are not normally present in the
master database.
.LP
.B htable
is best used in conjunction with the
.BR gettable (8C)
program which retrieves the DoD Internet host table from a host.
.SH FILES
.PD 0
.TP 20
.B localhosts
.TP
.B localnetworks
.TP
.B localgateways
.PD
.SH "SEE ALSO"
.BR intro (3N),
.BR gethostent (3N),
.BR getnetent (3N),
.BR gettable (8C),
.BR routed (8C)
.LP
Harrenstien, Ken, Mary Stahl, and Elizabeth Feinler,
.IR "DoD Internet Host Table Specification" ,
.SM RFC
952,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
October 1985.
.SH BUGS
Does not properly calculate the
.B gateways
file.
.8c `  x    netconfig.8c        
netstat.8c       newaliases.8        newfs.8       newkey.8        nfsd.8       
nfsstat.8c   	     nslookup.8c   	    
old-analyze.8   	0    
old-sysdiag.8   	@    pac.8   	P    ping.8c   	d    ./share/man/man8/icheck.8                                                                              755       0      12         5632  4424741611  10240                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)icheck.8 1.10 89/03/27 SMI; from UCB 4.2
.TH ICHECK 8  "22 March 1989"
.SH NAME
icheck \- file system storage consistency check
.SH SYNOPSIS
.B /usr/etc/icheck
[
.B \-s
]
.B \-b
.I numbers
] [
.I filesystem
]
.SH DESCRIPTION
.IX  "icheck command"  ""  "\fLicheck\fP \(em file system consistency check"
.IX  "file system"  "check consistency"  "file system"  "check consistency \(em \fLicheck\fP"
.LP
Note:
.B icheck
has been superceded for normal consistency checking by
.BR fsck (8).
.LP
.B icheck
examines a file system,
builds a bit map of used blocks,
and compares this bit map against
the free list maintained on the file system.
The normal output of
.B icheck
includes a report of
.IP
The total number of files and the numbers of
regular, directory, block special and character special files.
.IP
The total number of blocks in use and the numbers of
single-, double-, and triple-indirect blocks and directory blocks.
.IP
The number of free blocks.
.IP
The number of blocks missing; that is, not in any file
nor in the free list.
.LP
With the
.B \-s
option
.B icheck
ignores the actual free list and reconstructs a new one
by rewriting the superblock of the file system.
The file system should be dismounted while this is done;
if this is not possible (for example if
the root file system has to be salvaged)
care should be taken that the system is quiescent and that
it is rebooted immediately afterwards so that the old, bad in-core
copy of the superblock will not continue to be used.
Notice also that
the words in the superblock
which indicate the size of the free list and of the
i-list are believed.
If the superblock has been curdled
these words will have to be patched.
The
.B \-s
option
suppresses the normal output reports.
.LP
Following the
.B \-b
option is a list of block numbers;
whenever any of the named blocks turns up in a file,
a diagnostic is produced.
.LP
.B icheck
is faster if the raw version of the special file is used,
since it reads the i-list many blocks at a time.
.SH "SEE ALSO"
.BR fs (5),
.BR clri (8),
.BR dcheck (8),
.BR fsck (8),
.BR ncheck (8)
.SH DIAGNOSTICS
For duplicate blocks
and bad blocks (which lie outside the file system)
.B icheck
announces the difficulty, the i-number, and the kind of block involved.
If a read error is encountered,
the block number of the bad block is printed and
.B icheck
considers it to contain 0.
.TP
.B Bad freeblock
means that a block number outside the
available space was encountered in the free list.
.TP
.IB n " dups in free"
means that
.I n
blocks were found in the free list which
duplicate blocks either in some file or
in the earlier part of the free list.
.SH BUGS
Since
.B icheck
is inherently two-pass in nature, extraneous diagnostics
may be produced if applied to active file systems.
.LP
It believes even preposterous superblocks and
consequently can get core images.
.LP
The system should be fixed so that the reboot after fixing the root
file system is not necessary.
 sticky.8  (  P  5  	sundiag.8 <  h  6  suninstall.8  h    7  sunupgrade.8      8./share/man/man8/ifconfig.8c                                                                           755       0      12        16537  4424741611  10767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ifconfig.8c 1.23 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH IFCONFIG 8C "26 March 1989"
.SH NAME
ifconfig \- configure network interface parameters
.SH SYOPNSIS
.B /etc/ifconfig
.I interface
[
.I address_family
] [
.I address
[
.I dest_address
] ] [
.I parameters
] [
.B netmask
.I mask
]
.if t .in +0.5i
[
.B broadcast
.I address
] ] [
.B metric
.I n
]
.LP
.B /etc/ifconfig
.I interface
[
.I protocol_family
]
.SH DESCRIPTION
.IX  "ifconfig command"  ""  "\fLifconfig\fP \(em configure network interface parameters"
.IX  "configure network interface parameters"  ""  "configure network interface parameters \(em \fLifconfig\fP"
.IX  "network interface parameters, configure \(em \fLifconfig\fP"
.B ifconfig
is used to assign an address
to a network interface and/or to configure
network interface parameters.
.B ifconfig
must be used at boot time to define the network address
of each interface present on a machine; it may also be used at
a later time to redefine an interface's address
or other operating parameters.
Used without options,
.B ifconfig
displays the current configuration for a network interface.
If a protocol family is specified,
.B ifconfig
will report only the details specific to that protocol family.
Only the super-user may modify the configuration
of a network interface.
.LP
The
.I interface
parameter is a string of the form
.IR "name\^unit" ,
for example
.BR ie0 .
The interface name
``\fI\-a\fP''
is reserved, and causes the remainder of the arguments to be applied to
each address of each interface in turn.
.LP
Since an interface may receive transmissions in differing protocols,
each of which may require separate naming schemes, the parameters and
addresses are interpreted according to
the rules of some address family,
specified by the
.I address_family
parameter.  The address families currently supported are
.BR ether " and " inet .
If no address family is specified,
.B inet
is assumed.
.LP
For the
.SM DARPA
Internet family
.RB ( inet ),
the address is either a host name present in the host name data
base (see
.BR hosts (5))
or in the Yellow Pages
(\s-1YP\s0)
map
.BR hosts ,
or a
.SM DARPA
Internet address expressed in the Internet standard
\(lqdot notation\(rq.  Typically, an Internet
address specified in dot notation
will consist of your system's network number and the machine's
unique host number.  A typical Internet address is
.BR 192.9.200.44 ,
where
.B 192.9.200
is the network number and
.B 44
is the machine's
host number.
.LP
For the
.B ether
address family,
the address is an Ethernet address represented as
.IR x : x : x :\c
.IR x : x : x
where
.I x
is a hexadecimal number between 0 and ff.
Only the super-user may use the
.B ether
address family.
.LP
If the
.I dest_address
parameter is supplied in addition to the
.I address
parameter, it specifies the address of
the correspondent on the other end
of a point to point link.
.SH OPTIONS
The following
.I parameters
may be set with
.BR ifconfig :
.TP 15
.B up
Mark an interface \(lqup\(rq.
This may be used to enable an interface after an
.BR "ifconfig down" .
It happens automatically when setting the
first address on an interface.
If the interface was reset when previously marked down,
the hardware will be re-initialized.
.TP
.B down
Mark an interface \(lqdown\(rq.  When an interface is
marked \(lqdown\(rq, the system will not attempt to
transmit messages through that interface.
If possible, the interface will be reset to disable reception as well.
This action does not automatically disable routes using the interface.
.TP
.B trailers
.RB ( inet
only)
Enable the use of a \(lqtrailer\(rq
link level encapsulation when
sending (default \(em
.BR really? ).
If a network interface supports trailer encapsulation,
the system will, when possible, encapsulate outgoing
messages in a manner which minimizes the number of
memory to memory copy operations performed by the receiver.
This feature is machine-dependent, and therefore not recommended.
On networks that support the Address Resolution Protocol (see
.BR arp (4P);
currently, only 10 Mb/s Ethernet),
this flag indicates that the system should request that other
systems use trailer encapsulation when sending to this host.
Similarly, trailer encapsulations will be used when sending to other
hosts that have made such requests.
.TP
.B \-trailers
Disable the use of a \(lqtrailer\(rq link level encapsulation.
.TP
.B  arp
Enable the use of the Address Resolution Protocol in mapping
between network level addresses and link level addresses (default).
This is currently implemented for mapping between
.SM DARPA
Internet addresses and 10Mb/s Ethernet addresses.
.TP
.B \-arp
Disable the use of the Address Resolution Protocol.
.TP
.BI  metric " n"
Set the routing metric of the interface to
.IR n ,
default 0.
The routing metric is used by the routing protocol
.RB ( routed (8C)).
Higher metrics have the effect of making a route
less favorable; metrics are counted as addition hops
to the destination network or host.
.TP
.B netmask " mask"
(\fBinet\fR only)
Specify how much of the address to reserve for subdividing
networks into sub-networks.
The mask includes the network part of the local address
and the subnet part, which is taken from the host field of the address.
The mask can be specified as a single hexadecimal number
with a leading 0x, with a dot-notation Internet address,
or with a pseudo-network name listed in the network table
.BR networks (5).
The mask contains 1's for the bit positions in the 32-bit address
which are to be used for the network and subnet parts,
and 0's for the host part.
The mask should contain at least the standard network portion,
and the subnet field should be contiguous with the network
portion.
If a
.RB ` + '
(plus sign) is given for the netmask value,
then the network number is looked up in the netmasks.byaddr map
of the Yellow Pages (or in the
.BR /etc/netmasks )
file if not running Yellow Pages.
.TP
.BI  broadcast " address"
.RB ( inet
only)
Specify the address to use to represent broadcasts to the
network.
The default broadcast address is the
address with a host part of all 0's.
A
.B +
(plus sign) given for the broadcast value causes the broadcast address to
be reset to a default appropriate for the (possibly new) Internet address
and netmask.
Note that the arguments of
.B ifconfig
are interpreted left to right,
and therefore
.IP
.B ifconfig \-a netmask + broadcast +
.IP
and
.IP
.B ifconfig \-a broadcast + netmask +
.IP
may result in different values being assigned for the interfaces'
broadcast addresses.
.SH EXAMPLES
.LP
If your workstation is not attached to an Ethernet, the
.B ie0
interface should be marked \(lqdown\(rq as follows:
.IP
.B ifconfig ie0 down
.LP
To print out the addressing information for each interface, use
.IP
.B ifconfig \-a
.LP
To reset each interface's broadcast address after the netmasks
have been correctly set, use
.IP
.B ifconfig \-a broadcast +
.LP
.SH FILES
.PD 0
.TP 20
.B /dev/nit
.TP
.B /etc/netmasks
.PD
.SH "SEE ALSO"
.BR netstat (8C),
.BR rc (8),
.BR routed (8C),
.BR intro (3N),
.BR ethers (3N),
.BR arp (4P),
.BR hosts (5),
.BR netmasks (5),
.BR networks (5)
.SH DIAGNOSTICS
Messages indicating the specified interface does not exist, the
requested address is unknown, or the user is not privileged and
tried to alter an interface's configuration.
dest_address
parameter is supplied in addition to the
.I address
parameter, it specifies the address of
the correspondent on the other end
of a point to point li./share/man/man8/in.comsat.8c                                                                          755       0      12           72  4424741611  11001                                                                                                                                                                                                                                                                                                                                                                      .so man8/comsat.8c
.\" @(#)in.comsat.8c 1.3 89/03/27 SMI;
    
in.ftpd.8c       in.named.8c       in.rexecd.8c        
in.rlogind.8c   $    in.routed.8c  $  8    
in.rshd.8c $  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c x      in.tftpd.8c       in.tnamed.8c        inetd.8c        
infocmp.8v       init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H  ./share/man/man8/in.fingerd.8c                                                                         755       0      12           74  4424741611  11133                                                                                                                                                                                                                                                                                                                                                                      .so man8/fingerd.8c
.\" @(#)in.fingerd.8c 1.3 89/03/27 SMI;
  in.named.8c       in.rexecd.8c 8c       
in.rlogind.8c   $    in.routed.8c    8    
in.rshd.8c c  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c c       in.tftpd.8c       in.tnamed.8c 8c       inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s .      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keye./share/man/man8/in.ftpd.8c                                                                            755       0      12           66  4424741611  10453                                                                                                                                                                                                                                                                                                                                                                      .so man8/ftpd.8c
.\" @(#)in.ftpd.8c 1.3 89/03/27 SMI;
  in.rexecd.8c 8c       
in.rlogind.8c c   $    in.routed.8c    8    
in.rshd.8c c  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c c       in.tftpd.8c       in.tnamed.8c 8c       inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s o      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv../share/man/man8/in.named.8c                                                                           755       0      12           70  4424741612  10576                                                                                                                                                                                                                                                                                                                                                                      .so man8/named.8c
.\" @(#)in.named.8c 1.3 89/03/27 SMI;
    
in.rlogind.8c   $    in.routed.8c  $  8    
in.rshd.8c   L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c x      in.tftpd.8c       in.tnamed.8c        inetd.8c 8c       
infocmp.8v c      init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8 ./share/man/man8/in.rexecd.8c                                                                          755       0      12           72  4424741612  10766                                                                                                                                                                                                                                                                                                                                                                      .so man8/rexecd.8c
.\" @(#)in.rexecd.8c 1.3 89/03/27 SMI;
$    in.routed.8c  $  8    
in.rshd.8c $  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c x      in.tftpd.8c       in.tnamed.8c        inetd.8c        
infocmp.8v        init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8  ./share/man/man8/in.rlogind.8c                                                                         755       0      12           74  4424741612  11154                                                                                                                                                                                                                                                                                                                                                                      .so man8/rlogind.8c
.\" @(#)in.rlogind.8c 1.3 89/03/27 SMI;
    
in.rshd.8c c  L    in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c c       in.tftpd.8c       in.tnamed.8c 8c       inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s .      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o    ./share/man/man8/in.routed.8c                                                                          755       0      12           72  4424741612  11016                                                                                                                                                                                                                                                                                                                                                                      .so man8/routed.8c
.\" @(#)in.routed.8c 1.3 89/03/27 SMI;
  in.rwhod.8c   `    in.talkd.8c   x    
in.telnetd.8c c       in.tftpd.8c       in.tnamed.8c 8c       inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s o      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o      list.8       lock./share/man/man8/in.rshd.8c                                                                            755       0      12           66  4424741612  10457                                                                                                                                                                                                                                                                                                                                                                      .so man8/rshd.8c
.\" @(#)in.rshd.8c 1.3 89/03/27 SMI;
  in.talkd.8c   x    
in.telnetd.8c c       in.tftpd.8c       in.tnamed.8c 8c       inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s o      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o      list.8       lockd.8c ist      logintoo./share/man/man8/in.rwhod.8c                                                                           755       0      12           70  4424741612  10635                                                                                                                                                                                                                                                                                                                                                                      .so man8/rwhod.8c
.\" @(#)in.rwhod.8c 1.3 89/03/27 SMI;
  
in.telnetd.8c x      in.tftpd.8c       in.tnamed.8c        inetd.8c 8c       
infocmp.8v c      init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      lockd.8c 8       logintool.8       lpc.8 oo./share/man/man8/in.talkd.8c                                                                           755       0      12           70  4424741613  10612                                                                                                                                                                                                                                                                                                                                                                      .so man8/talkd.8c
.\" @(#)in.talkd.8c 1.3 89/03/27 SMI;
    in.tftpd.8c       in.tnamed.8c        inetd.8c        
infocmp.8v        init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      lockd.8c 8 k      logintool.8       lpc.8 oo      lpd.8 c.  ./share/man/man8/in.telnetd.8c                                                                         755       0      12           74  4424741613  11156                                                                                                                                                                                                                                                                                                                                                                      .so man8/telnetd.8c
.\" @(#)in.telnetd.8c 1.3 89/03/27 SMI;
  in.tnamed.8c        inetd.8c        
infocmp.8v       init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      lockd.8c 8 k      logintool.8       lpc.8 oo      lpd.8 c.      mailstats.8   $./share/man/man8/in.tftpd.8c                                                                           755       0      12           70  4424741613  10634                                                                                                                                                                                                                                                                                                                                                                      .so man8/tftpd.8c
.\" @(#)in.tftpd.8c 1.3 89/03/27 SMI;
    inetd.8c .8c      
infocmp.8v c      init.8 o       installboot.8s .      intro.8   $    iostat.8 ntr  8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o      list.8       lockd.8c ist      logintool.8       lpc.8 gi      lpd.8        mailstats.8   $    	makedbm.8 at  8  ./share/man/man8/in.tnamed.8c                                                                          755       0      12           72  4424741613  10765                                                                                                                                                                                                                                                                                                                                                                      .so man8/tnamed.8c
.\" @(#)in.tnamed.8c 1.3 89/03/27 SMI;
  
infocmp.8v c      init.8 .       installboot.8s        intro.8   $    iostat.8 .8   8    ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c        kgmon.8       
ldconfig.8        link.8 g      list.8 k      lockd.8c 8       logintool.8       lpc.8 oo      lpd.8 c.      mailstats.8   $    	makedbm.8 8   8    	makedev.8 at  L  ./share/man/man8/inetd.8c                                                                              755       0      12         6677  4424741613  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)inetd.8c 1.23 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH INETD 8C "22 March 1989"
.SH NAME
inetd \- Internet services daemon
.SH SYNOPSIS
.B /usr/etc/inetd
[
.B \-d
] [ 
.I configuration-file
]
.SH DESCRIPTION
.IX  "inetd command"  ""  "\fLinetd\fP \(em Internet server daemon"
.IX  servers  inetd  ""  "\fLinetd\fP \(em Internet server daemon"
.LP
.BR inetd ,
the Internet services daemon, is normally run at boot time by the
.BR /etc/rc.local
script.  When started
.B inetd
reads its configuration information from
.IR configuration-file ,
the default being
.BR /etc/inetd.conf .
See
.BR inetd.conf (5)
for more information on the format of this file.
It listens for connections on the Internet addresses of the
services that its configuration file specifies.
When a connection is found, it invokes the server daemon specified by
that configuration file for the service requested. 
Once a server is finished, 
.B inetd
continues to listen on the socket (except in some cases which
will be described below).
.LP
Depending on the value of the \(lqwait-status\(rq field
in the configuration line for the service,
.B inetd
will either wait for the server to complete before continuing
to listen on the socket, or immediately continue to listen on the socket.
If the server is a \(lqsingle-threaded\(rq datagram server (a
\(lqwait-status\(rq field of \(lqwait\(rq),
.B inetd
must wait.
That server will handle all datagrams on the socket.
All other servers (stream and \(multi-threaded\(rq data-gram, a
\(lqwait-status\(rq field of \(lqnowait\(rq) operate on separate
sockets frmo the connection request socket, thus freeing the
listening socket for new connection requests.
.LP
Rather than having several daemon
processes with sparsely distributed requests each running concurrently,
.B inetd
reduces the load on the system by invoking Internet servers only as
they are needed.
.LP
.B inetd
itself provides a number of simple TCP-based services.
These include 
.BR echo ,
.BR discard ,
.BR chargen
(character generator),
.B daytime
(human readable time), and
.B time
(machine readable time, in the form of the number of seconds since
midnight, January 1, 1900).
For
details of these services, consult the appropriate RFC, as listed below,
from the Network Information Center.
.PP
.B inetd
rereads its configuration file whenever it receives a hangup signal,
.SM
.BR SIGHUP \s0.
New services can be activated, and existing services deleted or modified in
between whenever the file is reread.
.SH SEE ALSO
.BR comsat (8C),
.BR ftpd (8C),
.BR rexecd (8C),
.BR rlogind (8C),
.BR rshd (8C),
.BR telnetd (8C),
.BR tftpd (8C),
.BR inetd.conf (5)
.LP
Postel, Jon,
.IR "Echo Protocol" ,
.SM RFC
862,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
May 1983.
.LP
Postel, Jon, 
.IR "Discard Protocol" ,
.SM RFC
863,
Network Information Center, SRI International, Menlo Park, Calif.,
May 1983.
.LP
Postel, Jon, 
.IR "Character Generator Protocol" ,
.SM RFC
864,
Network Information Center, SRI International, Menlo Park, Calif.,
May 1983.
.LP
Postel, Jon,
.IR "Daytime Protocol" ,
.SM RFC
867,
Network Information Center, SRI International, Menlo Park, Calif.,
May 1983.
.LP
Postel, Jon, and Ken Harrenstien,
.IR "Time Protocol" ,
.SM RFC
868,
Network Information Center, SRI International, Menlo Park, Calif.,
May 1983.
zic.8 ump.8      W  zic.8 ump.8      W  zic.8  zdump.8 ./share/man/man8/infocmp.8v                                                                            755       0      12        20632  4424741613  10652                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)infocmp.8v 1.13 89/03/27 SMI; from S5R3
.TH INFOCMP 8V "26 February 1988"
.SH NAME
infocmp \- compare or print out terminfo descriptions
.SH SYNOPSIS
.BR infocmp
.RB [ " \-cdnILCruvV1 " ]
.RB [ " \-sd " ]
.RB [ " \-si " ]
.RB [ " \-sl " ]
.RB [ " \-sc " ]
.RB [ " \-w"
.IR width " ]"
.if n .ti 5n
.RB [ \-A
.IR directory " ]"
.RB [ \-B
.IR directory " ]"
.if t .ti +.5i
.RI [ " termname "
\&.\|.\|.\|]
.SH DESCRIPTION
.IX "infocmp command" "" "\fLinfocmp\fP command"
.B infocmp
compares a binary
.BR terminfo (5V)
entry with other terminfo entries, rewrites a
.B terminfo
description to take advantage of the
.B use=
.IR field ,
or prints out a
.B terminfo
description from the corresponding binary file in a variety of formats.
It displays boolean fields first, then
numeric fields, then string fields.
.LP
It can also convert a
.B terminfo
entry to a
.BR termcap (5)
entry; the
.B \-C
flag causes
.B infocmp
to perform this conversion.
Some
.B termcap
variables are not supported by
.BR terminfo ,
but those that can be derived from
.I terminfo
variables are displayed.  Not all
.B terminfo
capabilities are translated either;
only those that are allowed in a
.B termcap
entry are normally displayed.
Specifying the
.B \-r
option eliminates this restriction, allowing all capabilities to be
displayed in
.B termcap
form.
.LP
Because padding is collected at the beginning of a capability,
not all capabilities are displayed.  Since
mandatory padding is not supported by
.B terminfo
and
.B termcap
strings are not as flexible, it is not always possible to convert a
.B terminfo
string capability into an equivalent working
.B termcap
capability.  Also, a subsequent conversion of the
.B termcap
file back into
.B terminfo
format will not necessarily reproduce the original source;
.B infocmp
attempts to convert parameterized strings, and
comments out those that it can not.
.LP
Some common
.B terminfo
parameter sequences, their
.B termcap
equivalents, and some
terminal types which commonly have such sequences, are:
.LP
.TS
center ;
l l l.
Terminfo	Termcap	Representative Terminals
%p1%c	%.	adm
%p1%d	%d	hp, \s-1ANSI\s0 standard, vt100
%p1%'x'%+%c	%+x	concept
%i	%i	\s-1ANSI\s+1 standard, vt100
%p1%?%'x'%>%t%p1%'y'%+%;	%>xy	concept
%p2 is printed before %p1	%r	hp
.TE
.LP
If no
.I termname
arguments are given, the environment variable
.SB TERM\s0
is used for all expected
.I termname
arguments.
.SH "OPTIONS"
.SS Default Options
If no options are specified and either zero or one
.I termname
is specified, the
.B \-I
option is assumed to be in effect.
If more than one
.I termname
is specified, the
.B \-d
option is assumed.
.SS Comparison Options
.B infocmp
compares the description of the first terminal
.I termname
with each of the descriptions for terminals listed in subsequent
.I termname
arguments.
If a capability is defined for only one of the terminals,
the value returned will depend on the type of the capability:
.B F
for boolean variables,
.B \-1
for integer variables,
and
.B \s-1NULL\s0
for string variables.
.TP
.B \-c
Produce a list of capabilities common to both entries.
Capabilities that are not set are ignored.
This option can be used as a quick check to see if the
.B \-u
option is worth using.
.TP
.B \-d
Produce a list of capabilities that differ between descriptions.
.TP
.B \-n
Produce a list of capabilities in neither entry.
.SS Source Listing Options
The
.BR \-I ,
.BR \-L ,
and
.B \-C
options produce a source listing for each terminal named.
.TP
.B \-I
Use the
.B terminfo
names.
.TP
.B \-L
Use the long C variable name listed in
.BR <term.h> .
.TP
.B \-C
Display only those capabilities that have
.B termcap
equivalents, using the
.B termcap
names and displaying them in
.B termcap
form whenever possible.
.IP
The source produced by the
.B \-C
option may be used directly as a
.B termcap
entry, but not all of the
parameterized strings may be changed to the
.B termcap
format.
All padding information for strings is collected together and placed at
the beginning of the string where
.B termcap
expects it.
Mandatory padding (padding information with a trailing
.RB ` / ')
will become optional.
.TP
.B \-r
When using
.BR \-C ,
display all capabilities, not just those capabilities that have
.B termcap
equivalents.
.TP
.B \-u
Produce a
.B terminfo
source description for the first named terminal
which is relative to the descriptions given by the entries for all
terminals named subsequently on the command line, by
analyzing the differences between them, and
producing a description with
.B use=
fields for the other terminals.
In this manner, it is possible to retrofit generic terminfo entries into a
terminal's description.
Or, if two similar terminals exist, but were coded at different times or by
different people so that each description is a full description, using
.B infocmp
will show what can be done to change one description to be relative to the
other.
.IP
A capability is displayed with an at-sign
.RB ( @ )
if it no longer exists in
the first terminal, but one of the other terminal
entries contains a value for it.
A capability's value gets printed if the value in the first
.IR termname
is not found in any of the other
.I termname
entries, or if the first of the other
.I termname
entries has a different value for that capability.
.IP
The order of the other
.I termname
entries is significant.
Since the terminfo compiler
.BR tic (8V)
does a left-to-right scan of the capabilities, specifying two
.B use=
entries that contain differing entries for the same capabilities will
produce different results, depending on the order in which they are
given.
.B infocmp
flags any such inconsistencies between the other
.I termname
entries as they are found.
.IP
Alternatively, specifying a capability
after
a
.B use=
entry that contains it, will cause the second specification to
be ignored.
Using
.B infocmp
to recreate a description can be a useful check to make sure that
everything was specified correctly in the original.
.IP
Specifying superfluous
.B use=
slows down the comparison, but is not fatal;
.B infocmp
flags superfluous
.B use=
fields.
.SS Sorting Options
.TP
.B \-sd
Sort fields in the order that they are
stored in the
.B terminfo
database.
.TP
.B \-si
Sort fields by
.B terminfo
name.
.TP
.B \-sl
Sort fields by the long C variable name.
.TP
.B \-sc
Sort fields by the
.B termcap
name.
.IP
If no sorting option is given,
fields are sorted alphabetically by the
.B terminfo
name within each type, except in the case of the
.B \-C
or the
.BR \-L
options, which cause the sorting to be done by the
.B termcap
name or the long C variable name, respectively.
.SS Changing Databases
The location of the compiled
.B terminfo
database is taken from the environment variable
\s-1\fBTERMINFO\s0\fR.
If the variable is not defined, or if the terminal is not found in that
location, the system
.B terminfo
database, usually in
.BR /usr/share/lib/terminfo ,
is used.
The options
.B \-A
and
.B \-B
may be used to override this location.  With these options, it is
possible to compare descriptions for a terminal with the same name
located in two different databases.  This is useful for comparing
descriptions for the same terminal created by different people.
.TP
.B \-A
Set
.SB TERMINFO
for the first
.IR termname
argument.
.TP
.B \-B
Set
.SB TERMINFO
for the remaining
.IR termname
arguments.
.SS Other Options
.TP
.B \-v
Print out tracing information on the standard error.
.TP
.B \-V
Print out the version of the program in use on the standard error
and exit.
.TP
.B \-1
Print fields out one to a line.
Otherwise, fields are printed several to a line to a maximum width
of 60 characters.
.TP
.BI \-w " width"
Change the output to
.I width
characters.
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/terminfo/?/*
compiled terminal description database
.TP
.B /usr/5include/term.h
.PD
.SH "SEE ALSO"
.BR curses (3V),
.BR termcap (5),
.BR terminfo (5V),
.BR tic (8V)
.SH DIAGNOSTICS
.TP
.B malloc is out of space!
There was not enough memory available to process
all the terminal descriptions requested.
Run
.B infocmp
in several smaller stages (with fewer
.I termname
arguments).
.TP
.B use= order dependency found:
A value specified in one relative terminal specification was different from
that in another relative terminal specification.
.TP
.BI "`use=" term "' did not add anything to the description."
A relative terminal name did not contribute anything to the final
description.
.TP
.B
must have at least two terminal names for a comparison to be done.
The
.BR \-u ,
.B \-d
and
.B \-c
options require at least two terminal names.
ace.
.TP
.B pseudo-device
A software subsystem or driver treated like a device driver, but without
any./share/man/man8/init.8                                                                                755       0      12        13201  4424741614   7767                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)init.8 1.22 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH INIT 8 "25 March 1989"
.UC 4
.SH NAME
init \- process control initialization
.SH SYNOPSIS
.B /usr/etc/init
[
.B \-bs
]
.SH DESCRIPTION
.LP
.IX  "init command"  ""  "\fLinit\fP \(em process control initialization"
.B init
is invoked inside
the operating system as the last step in the boot procedure.
It normally runs the sequence of commands in the script
.B /etc/rc.boot 
(see
.BR rc (8))
to check the file system.  If passed the 
.B \-b
option from the boot program, 
.B init
skips this step.
If the file system check succeeds or is skipped, 
.B init
runs the commands in
.B /etc/rc
and 
.B /etc/rc.local
to begin multiuser operation; otherwise it commences single-user 
operation by giving the super-user a shell on the console.  It is 
possible to pass the 
.B \-s
parameter from the boot program to
.B init
so that single-user operation is commenced immediately.
.LP
Whenever a single-user shell is created, and the system is running
as a secure system, the
.B init
program demands the super-user password.
This is to prevent an ordinary user from invoking a single-user shell
and thereby circumventing the system's security.
Logging out (for instance, by entering an
.SM EOT\s0)
causes
.B init
to proceed with a multi-user boot.
The super-user password is demanded whenever the system is running secure
as determined by
.BR issecure (3),
or the console terminal is not labeled \(lqsecure\(rq in
.BR /etc/ttytab .
.LP
Whenever single-user operation is terminated (for instance by killing 
the single-user shell)
.B init
runs the scripts mentioned above.
.PP
In multi-user operation, 
.BR init 's
role is to create a process for each
terminal port on which a user may log in.
To begin such operations, it reads the file
.B /etc/ttytab
and executes a command for each terminal specified in the file.
This command will usually be
.BR /usr/etc/getty .
.BR getty (8)
opens and initializes the terminal line,
reads the user's name and invokes
.BR login (1)
to log in the user and execute the shell.
.LP
Ultimately the shell will terminate because it received
.SM EOF\s0,
either explicitly, as a result of hanging up, or from the user
logging out.  The main path of
.BR init ,
which has been waiting for such an event,
wakes up and removes the appropriate entry from the file
.BR /etc/utmp ,
which records current users.
.B init
then makes an entry in
.BR /var/adm/wtmp ,
which maintains a history of logins and logouts.  The
.B /var/adm/wtmp
entry is made only if a user logged in successfully on the line.
Then the appropriate terminal is reopened and the command for that terminal
is reinvoked.
.LP
.B init
catches the
.I hangup
signal (\s-1SIGHUP\s0) and interprets it to mean that the file
.B /etc/ttytab
should be read again.
The shell process on each line which used to be active in
.B /etc/ttytab
but is no longer there is terminated;
a new process is created for each added line;
lines unchanged in the file are undisturbed.
Thus it is possible to drop or add terminal lines without
rebooting the system by changing
.B /etc/ttytab
and sending a
.I hangup
signal to the
.B init
process: use
.RB ` "kill\ \-\s-1HUP\s0\ 1" '.
.LP
.B init
terminates multi-user operations and resumes single-user mode
if sent a terminate (\s-1SIGTERM\s0) signal: use
.RB ` "kill\ \-\s-1TERM\s0\ 1" '.
If there are processes outstanding which are deadlocked (due to
hardware or software failure),
.B init
does not wait for them all to die (which might take forever), but
times out after 30 seconds and prints a warning message.
.LP
.B init
ceases to create new processes, and allows the system to slowly die away,
when sent a terminal stop (\s-1SIGTSTP\s0) signal: use
.RB ` "kill\ \-\s-1TSTP\s0\ 1" '.
A later hangup will resume full
multi-user operations, or a terminate will initiate a single-user shell.
This hook is used by
.BR reboot (8)
and
.BR halt (8).
.LP
Whenever it reads
.BR /etc/ttytab ,
.B init
will normally write out an old-style
.B /etc/ttys
file reflecting the contents of
.BR /etc/ttytab .
This is required in order that programs built on earlier versions of
Sun\s-1OS\s0 that read the
.B /etc/ttys
file (for example, programs using the
.BR ttyslot (3)
routine, such as
.B shelltool (1))
may continue to run.
If it is not required that such programs run,
.B /etc/ttys
may be made a link (hard or symbolic) to
.B /etc/ttytab
and
.B init
will not write to
.BR /etc/ttys .
.LP
.BR init 's
role is so critical that if it dies, the system will reboot itself
automatically.
If, at bootstrap time, the
.B init
program cannot be located, the system will print an error message and panic.
.SH FILES
.PD 0
.TP 20
.B /dev/console
.TP
.B /dev/tty*
.TP
.B /etc/utmp
.TP
.B /var/adm/wtmp
.TP
.B /etc/ttytab
.TP
.B /etc/rc
.TP
.B /etc/rc.local
.TP
.B /etc/rc.boot
.TP
.B /usr/etc/getty
.PD
.SH SEE ALSO
.BR kill (1),
.BR login (1),
.BR sh (1),
.BR shelltool (1),
.BR issecure (3),
.BR ttyslot (3),
.BR ttytab (5),
.BR getty (8),
.BR halt (8),
.BR rc (8),
.BR reboot (8),
.BR shutdown (8)
.SH DIAGNOSTICS
.TP
.IB command " failing, sleeping."
A process being started to service a line is exiting quickly
each time it is started.
This is often caused by a ringing or noisy terminal line.
.B init
will sleep for 30 seconds, then continue trying to start the process.
.TP
.B "\s-1WARNING\s0: Something is hung (won't die); ps axl advised."
A process is hung and could not be killed when the system was shutting down.
This is usually caused by a process
which is stuck in a device driver due to a persistent device error condition.
ame
entries has a different value for that capability.
.IP
The order of the other
.I termname
entries is significant.
Since the terminfo compiler
.BR tic (8V)
does a left-to-right scan of the capabilities, specifying two
.B use=
entries that contain differing entries for the same capabilities will
produce different results, depending on the order in which they are
given.
.B infocm./share/man/man8/installboot.8s                                                                        755       0      12         5140  4424741614  11524                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)installboot.8s 1.8 89/03/27 SMI;
.TH INSTALLBOOT 8S "22 March 1989"
.SH NAME
installboot \- install bootblocks in a disk partition
.SH SYNOPSIS
.B /usr/mdec/installboot
[
.B \-lvt
]
.I bootfile protobootblk bootdevice
.br
.SH DESCRIPTION
.IX  "boot command"  ""  "\fLboot\fP \(em system startup procedures"
.IX  "bootstrap procedures"  ""  "bootstrap procedures \(em \fLboot\fP"
.IX  "autoboot procedures"  ""  "autoboot procedures \(em \fLboot\fP"
.IX  "startup procedures"  ""  "startup procedures \(em \fLboot\fP"
.IX  "installboot procedures" "" "installboot procedures \(em \fLboot\fP"
.LP
The
.BR boot (8S)
program is loaded
from disk by bootblock code which resides in the
bootblock area of a disk partition.
In order for the bootblock code to read the
boot program (usually
.BR /boot )
it is necessary for it to
know the block numbers occupied by the boot program.
Previous versions of the bootblock code could find
.B /boot
by interpreting the file system on the partition from which it
was being booted, but this is no longer so.
.LP
.B installboot
plugs the block numbers of the
boot program into a table in the bootblock code,
and writes the modified bootblock code
onto the disk.
Note:
.B installboot
must be run every time the boot program is reinstalled, since in
general, the block list of the boot program will change each time it
is written.
.LP
.I bootfile
is the name of the boot program, usually
.BR /boot .
.I protobootblk
is the name of the bootblock code into which the block numbers
of the boot program are to be inserted.  The file read in must have an
.BR a.out (5)
header, but it will be written out to the device with the header
removed.
.I bootdevice
is the name of the disk device onto which the
bootblock code is to be installed.
.LP
You can see how
.B installboot
works by making the destination
a regular file instead of a device, and examining the result with
.BR od (1V).
.SH OPTIONS
.TP
.B \-l
Print out the list of block numbers of the boot program.
.TP
.B \-t
Test.  Display various internal test messages.
.TP
.B \-v
Verbose.  Display detailed information about the size of the
boot program, etc.
.SH EXAMPLE
.LP
To install the bootblocks onto the root partition on a Xylogics disk:
.RS
.ft B
.nf
example% cd /usr/mdec
example% installboot \-vlt /boot bootxy /dev/rxy0a
.ft R
.fi
.RE
.LP
For an
.SM SD
disk,
you would use
.B bootsd
and
.BR /dev/rsd0a ,
respectively, in place of
.B bootxy
and
.BR /dev/rxy0a .
.SH SEE ALSO
.BR boot (8S),
.BR bootparamd (8),
.BR init (8),
.BR kadb (8S),
.BR monitor (8S),
.BR ndbootd (8C),
.BR rc (8),
.BR reboot (8),
.BR od (1V),
.BR a.out (5)
.LP
.TX ADMIN
.LP
.TX INSTALL
    :  talkd.8c      ;  
telnetd.8c     <  tftpd.8c      >  	tnamed.8c     ?  trpt.8c     @  tunefs.8    0  A  	tzsetup.8 0  D  B  umount.8  D  \  C  
unconfigure.8 C  p  D  unlink.8  p    E  
uuclean.8c     F  vipw.8 8    G  vmstat.8      H  ypbind.8      I  ypinit.8      J  ypmake.8       K  yppasswdd.8c  K    L./share/man/man8/intro.8                                                                               755       0      12           64  4424741614  10102                                                                                                                                                                                                                                                                                                                                                                      .so man8/Intro.8
.\" @(#)intro.8 1.5 89/03/27 SMI; 
  ipallocd.8c   H    kadb.8s   \    keyenvoy.8c   p    
keyserv.8c y      kgmon.8       
ldconfig.8 o      link.8 o      list.8       lockd.8c ist      logintool.8       lpc.8 gi      lpd.8        mailstats.8   $    	makedbm.8 at  8    	makedev.8 m.  L    	makekey.8 v.  `    
mconnect.8 .  t    mkfile.8 ect      mkfs.8 i      mknod.8       	mkproto../share/man/man8/iostat.8                                                                              755       0      12         2772  4424741614  10322                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)iostat.8 1.12 89/03/27 SMI;
.TH IOSTAT 8 "9 September 1987"
.SH NAME
iostat \- report I/O statistics
.SH SYNOPSIS
.B iostat
[
.I interval
[
.I count
] ]
.SH DESCRIPTION
.IX  "iostat command"  ""  "\fLiostat\fP \(em report I/O statistics"
.IX  statistics  "I/O"  ""  "I/O \(em \fLiostat\fP"
.IX  "I/O statistics report iostat"  ""  "I/O statistics report \(em \fLiostat\fP"
.B iostat
iteratively reports the number of characters
read and written to terminals,
and, for each disk, the number of kilobytes transferred per second,
and the milliseconds per average seek.
It also gives the percentage of time the system has
spent in user mode, in user mode running
low priority (niced) processes,
in system mode, and idling.
.LP
To compute this information, for each disk,
seeks and data transfer completions
and number of words transferred are counted;
for terminals collectively, the number
of input and output characters are counted.
Also, each fiftieth of a second, the state of each disk is examined
and a tally is made if the disk is active.
From these numbers and given the transfer rates
of the devices approximate average seek times
are calculated for each device.
.LP
The optional
.I interval
argument causes
.B iostat
to report once each
.I interval
seconds.
The first report is for  all time since a reboot and each
subsequent report is for the last interval only.
.LP
The optional
.I count
argument restricts the number of reports.
.SH FILES
.PD 0
.TP 20
.B /dev/kmem
.TP
.B /vmunix
.PD
.SH SEE ALSO
.BR vmstat (8)
  	./share/man/man8/ipallocd.8c                                                                           755       0      12         3621  4424741614  10743                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ipallocd.8c 1.11 89/03/27 SMI;
.TH IPALLOCD 8C "4 December 1987"
.SH NAME
ipallocd \- Ethernet-to-IP address allocator
.SH SYNOPSIS 
.B /usr/etc/rpc.ipallocd
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "ipallocd" "" "\fLipallocd\fP \(em Ethernet-to-IP address mapper"
.LP
.I ipallocd
is a daemon that determines or temporarily allocates IP addresses
within a network segment.  
.\" The service is only available on the 
.\" .SM YP 
.\" master of the 
.\" .I hosts.byaddr
.\" map. 
It has complete knowledge of the hosts listed in the yellow pages,
and, if the system is running the name server,
of any hosts listed in internet domain tables 
automatically accessed on that host through the standard library
.I gethostbyaddr(\|)
call.
.LP
This protocol uses 
.SM DES
authentication (the Sun Secure 
.SM RPC
protocol) to restrict access to 
this function.
The only clients privileged to allocate addresses are those whose
net
.SM ID\s0s
are in the
.I networks
group. For machine
.SM ID\s0s,
the machine must be a
.SM YP
server.
.LP
The daemon uses permanent entries in the
.I /etc/ethers 
and
.I /etc/hosts
files when they exist and are usable.  In other cases, such as when a system
is new to the network,
.I ipallocd
will enter a temporary mapping in a local cache.  Entries in the cache are 
removed when there have been no references to a given entry in a 24-hour period.
This cache survives system crashes so that IP addresses will 
remain consistent.
.LP
The daemon also provides corresponding
.SM IP
address to name mapping.
.LP
.I ipallocd
refuses to allocate addresses on networks not listed in the
.I netrange
file, or for which no free address
is available.
.SH FILES
.PD 0
.TP 20
.\" .BI /etc/yp/ domainname /hosts.byaddr.{dir,pag}
.\" .TP
.B /etc/ez/ipalloc.cache
.TP
.B /etc/ez/ipalloc.netrange
.PD
.SH SEE ALSO
.BR pnp (3R),
.BR ipalloc (3R), 
.BR ipallocd (8C), 
.BR pnpboot (8C),
.BR netconfig (8C)
swdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore./share/man/man8/kadb.8s                                                                               755       0      12        13345  4424741615  10122                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kadb.8s 1.26 89/03/27 SMI;
.TH KADB 8S "22 March 1989"
.SH NAME
kadb \- adb-like kernel and standalone-program debugger
.SH SYNOPSIS
.B > b kadb
[
.B \-d
] [
.I boot-flags
]
.SH DESCRIPTION
.IX  kadb  ""  "\fLkadb\fP \(em kernel debugger"
.IX  "debug tools"  "kadb command"  ""  "\fLkadb\fP \(em kernel debugger"
.B kadb
is an interactive debugger
that is similar in operation to
.BR adb (1),
and runs as a standalone program under the
.SM PROM
monitor.  You can use
.B kadb
to debug the
kernel, or to debug any standalone program.
.LP
Unlike
.BR adb ,
.B kadb
runs in the same supervisor virtual address space as the program being
debugged \(em although it maintains a separate context.
The debugger runs as a
.I coprocess
that cannot be killed (no
.RB ` :k ')
or rerun (no
.RB ` :r ').
There is no signal control (no
.RB ` :i ',
.RB ` :t ',
or
.RB ` $i '),
although the keyboard facilities
(\s-1CTRL\-C\s0, 
.SM CTRL\-S, 
and
.SM CTRL\-Q\s0) 
are simulated.
.LP
While the kernel is running under
.BR kadb ,
the abort sequence
.RB ( \s-1L1-A\s0 " or " \s-1BREAK\s0 )
drops the system into
.B kadb
for debugging \(em as will a system panic.
When running other standalone programs under
.BR kadb ,
the abort sequence will pass control to the
.SM PROM
monitor.
.B kadb
is then invoked from the monitor by jumping
to the starting address for
.B kadb
found in
.B /usr/include/debug/debug.h
(currently this can be done for both Sun-2 and Sun-3 system machines
with the monitor command
.\" Sun386i
.RB ` "g fd00000" ', 
and with the monitor command 
.RB ` "g fe005000" '
for
Sun386i systems).
.\" Sun386i
.BR kadb 's
user interface is similar to
.BR adb .
Note:
.B kadb
prompts with
.IP
.B kadb>
.LP
Most
.B adb
commands function in
.B kadb
as expected.  Typing an abort sequence in response to
the prompt returns you to the
.SM PROM
monitor, from which you can examine control spaces that are not
accessible within
.B adb
or
.BR kadb .
The
.SM PROM
monitor command
.B c
will return control to
.BR kadb .
As with
.RB \(lq "adb \-k" \(rq,
.B $p
works when debugging
kernels (by actually mapping in new user pages).
The verbs
.B ?
and
.B /
are equivalent in
.B kadb ,
since there is only one address space in use.
.SH OPTIONS
.LP
.B kadb
is booted from the
.SM PROM
monitor as a standalone program.  If you omit the
.B \-d
flag,
.B kadb
automatically loads and runs
.B vmunix
from the filesystem
.B kadb
was loaded from.  The
.B kadb
.B vmunix
variable can be patched to change the default program
to be loaded.
.TP
.B \-d
Interactive startup.  Prompts with
.RS
.RS
.B kadb:
.RE
.RE
.IP
for a file to be loaded.
From here, you can enter a boot sequence line to load a
standalone program.  Boot flags entered in response to this prompt
are included with those already set
and passed to the program.
If you type a 
.SM RETURN
only,
.B kadb
loads
.B vmunix
from the filesystem that
.B kadb
was loaded from.
.TP
.I boot-flags
You can specify boot flags as arguments when invoking
.B kadb.
Note:
.B kadb
always sets the
.B \-d
(debug)
boot flag, and passes it to the program being debugged.
.SH USAGE
Refer to
.B adb
in
.TX DEBUG .
.SS Kernel Macros
.LP
As with
.BR adb ,
kernel macros are supported.  With
.BR kadb ,
however, the macros are compiled into the debugger itself, rather
than being read in from the filesystem.  The
.B kadb
command
.B $M
lists macros known to
.B kadb.
.SS "Setting Breakpoints"
.LP
.\" Sun386i
Self-relocating programs such as the
.\" the Sun-3 kernel
SunOS kernel
.\" Sun386i
need to be relocated
before breakpoints can be used.  To set the first breakpoint for such a
program, start it with
.RB ` :s ';
.B kadb
is then entered after the program is relocated (when
the system initializes its interrupt vectors).  Thereafter,
.RB ` :s '
single-steps as with
.BR adb .
Otherwise, use
.RB ` :c '
to start up the program.
.\" Sun386i
.SS Sun386i System Commands
.LP
The Sun386i system version of 
.B kadb
has the following additional commands.
Note, for the general syntax of 
.B adb
commands, see 
.BR adb (1).
.RS
.TP 12
.B :i
Read a byte (with the 
.SM INB 
instruction) in from the port at 
.IR address .
.TP
.BI :o
Send a byte (with the 
.SM OUTB
instruction) containing 
.I count
out through the port at
.IR address .
.TP
.BI :p
Like 
.B :b
in 
.BR adb (1),
but sets a breakpoint using the hardware debug register
instead of the breakpoint instruction.  The advantage of
using 
.B :p 
is that when setting breakpoints with the debug
register it is not necessary to have write access to
the breakpoint location.  Four (4) breakpoints can be set with the hardware
debug registers.
.TP
.BI $S
Switch I/O from the console to the serial port or vice versa.
.TP
.BI [
Like 
.B :e 
in
.BR adb (1),
but requires only one keystroke and no 
.SM RETURN
character.
.TP
.BI ]
Like 
.B :s
in 
.BR adb (1),
but requires only one keystroke and no 
.SM RETURN
character.
.RE
.\" Sun386i
.SS Automatic Rebooting with kadb
.LP
You can set up your workstation to automatically reboot
.B kadb
by patching the
.I vmunix
variable in
.B /boot
with the string
.BR kadb .
(Refer to
.B adb
in
.TX DEBUG
for details on how to patch executables.)
.SH FILES
.PD 0
.TP 20
.B /vmunix
.TP
.B /boot
.TP
.B /kadb
.TP
.B /usr/include/debug/debug.h
.PD
.SH SEE\ ALSO
.BR adb (1),
.BR boot (8S)
.LP
.TX DEBUG
.br
.TX DRIVER
.SH BUGS
.LP
There is no floating-point
.\" Sun386i
support, except on Sun386i systems.
.\" Sun386i
.LP
.B kadb
cannot reliably single-step over instructions that change the
status register.
.LP
When sharing the keyboard with the operating system
the monitor's input routines can leave the keyboard in a confused
state.  If this should happen, disconnect the keyboard
momentarily and then reconnect it.  This forces the keyboard to
reset as well as initiating an abort sequence.
.LP
Most of the bugs listed in
.BR adb (1)
also apply to
.BR kadb .
ot be killed (no
.RB ` :k ')
or rerun (no
.RB ` :r ').
There is no signal control (no
.RB ` :i ',
.RB ` :t ',
or
.RB ` $i '),
although the keyboard facilities
(\s-1CTRL\-C\s0, 
.SM CTRL\-S, 
and
.SM CTRL\-Q\s0) 
are simulated.
.LP
While the kernel is running under
.BR kadb ,
the abo./share/man/man8/keyenvoy.8c                                                                           755       0      12         1120  4424741615  11016                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)keyenvoy.8c 1.6 89/03/27 SMI;
.TH KEYENVOY 8C "9 September 1987"
.SH NAME
keyenvoy \- talk to keyserver
.SH SYNOPSIS
.B keyenvoy
.SH DESCRIPTION
.IX "keyenvoy command" "" "\fLkeyenvoy\fP command"
.B keyenvoy
is used by some
.SM RPC
programs to talk to the key server,
.BR keyserv (8C).
The key server will not talk to anything but a root process, and
.B keyenvoy
is a set-uid root process that acts as an intermediary between a user
process that wishes to talk to the
key server and the key server itself.
.LP
This program cannot be run interactively.
.SH "SEE ALSO"
.BR keyserv (8C)
  L    ncheck.8  L  `    
ndbootd.8c `  x    netconfig.8c        
netstat.8c       newaliases.8        newfs.8       newkey.8        nfsd.8        
nfsstat.8c   	     nslookup.8c   	    
old-analyze.8   	0    
old-sysdiag.8   	@    pac.8 	0  	P    ping.8c   	d    pnp.s386.8c   	x    
pnpboot.8c x  	    pnpd.8c   	    
portmap.8c   	./share/man/man8/keyserv.8c                                                                            755       0      12         2464  4424741615  10651                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)keyserv.8c 1.8 89/03/27 SMI;
.TH KEYSERV 8C "22 March 1989"
.SH NAME
keyserv \- server for storing public and private keys
.SH SYNOPSIS
.B keyserv
[
.B \-n
]
.SH DESCRIPTION
.IX "keyenvoy server" "" "\fLkeyenvoy\fP server"
.B keyserv
is a daemon that is used for storing the
private encryption keys of each
user logged into the system. These encryption
keys are using for accessing
secure network services such as secure
.SM NFS\s0.
When a user logs in to the system, the
.BR login (1)
program uses the login password to decrypt
the user's encryption key stored
in the Yellow Pages
(\s-1YP\s0),
and then gives the decrypted key to the
.B keyserv
daemon to store away.
.LP
Normally, root's key is read from the file
.B /etc/.rootkey
when the daemon starts up. This is useful during power-fail reboots
when no one is around to type a password, yet you still want the
secure network services to operate normally.
.SH OPTIONS
.TP
.B \-n
Do not read root's key from
.BR /etc/.rootkey .
Instead, prompt the user for the password to decrypt
.B root 's
key stored in the Yellow Pages and then store the decrypted key in
.B /etc/.rootkey
for future use.
This option is useful if the
.B /etc/.rootkey
file ever gets out of date or corrupted.
.SH FILES
.PD 0
.TP 20
.B /etc/.rootkey
.PD
.SH "SEE ALSO"
.BR login (1),
.BR publickey (5)
ot.8 .8   
    renice.8  
  
  
  
repquota.8        	restore.8        rexd.8c   $    	rexecd.8c c   8    
rlogind.8c $  L    rmail.8c c 8  \    rmt.8c c  p    ./share/man/man8/kgmon.8                                                                               755       0      12         3251  4424741615  10124                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)kgmon.8 1.9 89/03/27 SMI; from UCB 4.2
.TH KGMON 8 "9 September 1987"
.SH NAME
kgmon \- generate a dump of the operating system's profile buffers
.SH SYNOPSIS
.B /usr/etc/kgmon
[
.B \-bhpr
] [
.I filesystem
] [
.I memory
]
.SH DESCRIPTION
.IX  "kgmon command"  ""  "\fLkgmon\fP \(em dump profile buffers"
.B kgmon
is a tool used when profiling the operating system.
When no arguments are supplied,
.B kgmon
indicates the state of operating system profiling as running,
off, or not configured (see
.BR config (8)).
If the
.B \-p
flag is specified,
.B kgmon
extracts profile data from the operating system and produces a
.B gmon.out
file suitable for later analysis by
.BR gprof (1).
.SH OPTIONS
.TP
.B \-b
Resume the collection of profile data.
.TP
.B \-h
Stop the collection of profile data.
.TP
.B \-p
Dump the contents of the profile buffers into a
.B gmon.out
file.
.TP
.B \-r
Reset all the profile buffers.
If the
.B \-p
flag is also specified, the
.B gmon.out
file is generated before the buffers are reset.
.LP
If neither
.B \-b
nor
.B \-h
is specified, the state of profiling collection remains unchanged.
For example, if the
.B \-p
flag is specified and profile data is being collected, profiling is
momentarily suspended, the operating system profile buffers are dumped,
and profiling is immediately resumed.
.SH FILES
.PD 0
.TP 20
.B /vmunix
the default system
.TP
.B /dev/kmem
the default memory
.TP
.B gmon.out
.PD
.SH "SEE ALSO"
.BR gprof (1),
.BR config (8)
.SH DIAGNOSTICS
Users with only read permission on
.B /dev/kmem
cannot change the state
of profiling collection. They can get a
.B gmon.out
file with the warning that the data may be
inconsistent if profiling is in progress.
d.8c   0    rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c !    #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8./share/man/man8/ldconfig.8                                                                            755       0      12         1660  4424741615  10600                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ldconfig.8 1.4 89/03/27 SMI
.TH LDCONFIG 8 "28 November 1987"
.SH NAME
ldconfig \- link-editor configuration
.SH SYNOPSIS
.B /usr/etc/ldconfig
[
.I directory 
\ ... ]
.SH DESCRIPTION
.IX "ldconfig command" "" "\fLldconfig\fP \(em configure link-editor"
.IX "ldconfig command" "" "shared library cache"
.B ldconfig
is used to configure a performance-enhancing cache for the run-time
link-editor,
.BR ld.so .
It is run from
.B /etc/rc.local
and periodically via
.B cron
to avoid linking with stale libraries.  It should be also be run manually
when a new shared object (e.g., a shared library) is installed on the system.
.LP
When invoked with no arguments, a default set of directories are built
into the cache \- these are the directories searched by default by the
link editors.  Additional directories may be specified on the command
line.
.SH FILES
.PD 0
.TP 20
.B /etc/ld.so.cache
holds the cached data.
.PD
.SH SEE ALSO
.BR ld (1)
map.8c   	    	praudit.8 	  	     pstat.8   	    pwck.8    	  ./share/man/man8/link.8                                                                                755       0      12         1552  4424741616   7751                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)link.8 1.9 89/03/27 SMI; from S5R2 6.2
.TH LINK 8 "20 January 1988"
.SH NAME
link, unlink \- exercise link and unlink system calls
.SH SYNOPSIS
.IX link "" "\fLlink\fR \(em make a link"
.IX unlink "" "\fLunlink\fR \(em remove a link"
.B /usr/etc/link
.I filename1
.I filename2
.LP
.B /usr/etc/unlink
.I filename
.SH DESCRIPTION
.B link
and
.B unlink
perform their respective system calls on their
arguments, abandoning all error checking.
.SH SEE ALSO
.BR rm (1),
.BR link (2),
.BR unlink (2)
.SH WARNINGS
Only the super-user can unlink a directory, in which case the
files it contains are lost.  The files can, however, be recovered from
the file system's
.B lost+found
directory after performing an
.BR fsck .
.LP
If you have write permission on the directory in which
.I filename
resides,
.B unlink
removes that file without warning, regardless of its ownership.
pboot.8c    	    pnpd.8c   	    
portmap.8c    	    	praudit.8    	     pstat.8   	    pwck.8 a  	    pwdauthd.8c   
   ./share/man/man8/list.8                                                                                755       0      12           62  4424741600   7713                                                                                                                                                                                                                                                                                                                                                                      .so man8/List.8
.\" @(#)list.8 1.4 89/03/27 SMI; 
  logintool.8       lpc.8 8       lpd.8 oo      mailstats.8   $    	makedbm.8 $  8    	makedev.8 8  L    	makekey.8 L  `    
mconnect.8 `  t    mkfile.8  t      mkfs.8 `      mknod.8       	mkproto.8       	modload.8       	modstat.8       modunload.8        
monitor.8s        mount.8   $    	mountd.8c $  8    named.8c  8  L    ncheck.8  L  `  ./share/man/man8/lockd.8c                                                                              755       0      12         3312  4424741616  10247                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)lockd.8c 1.19 89/03/27 SMI;
.TH LOCKD 8C "22 March 1989"
.SH NAME
lockd, rpc.lockd \- network lock daemon
.SH SYNOPSIS
.B /usr/etc/rpc.lockd
[
.B \-g
.I graceperiod
] [
.B \-t
.I timeout
]
.SH DESCRIPTION
.IX  "lockd command"  ""  "\fLlockd\fP \(em network lock daemon"
.IX  servers lockd  ""  "\fLlockd\fP \(em network lock daemon"
.LP
.B lockd
processes lock requests that are either
sent locally by the kernel or remotely by another lock daemon.
.B lockd
forwards lock requests for remote data to the server site's
lock daemon through the
.BR \s-1RPC/XDR\s0 (3N)
package.
.B lockd
then requests the status monitor daemon,
.BR statd (8C),
for monitor service.  The reply to the lock request will not be sent
to the kernel until
the status daemon and the server site's
lock daemon have replied.
.LP
If either the
status monitor or server site's lock daemon
is unavailable, the reply to a lock request for remote data
is delayed until all daemons become available.
.LP
When a server recovers,
it waits for a grace period for all client site
lock daemons to submit reclaim requests.
Client site
lock daemons,
on the other hand,
are notified by the status daemon
of the server recovery and promptly resubmit previously
granted lock requests.
If
.B lockd
fails to secure a previously granted lock at the server site,
it sends
.SM SIGLOST
to a process.
.SH OPTIONS
.TP 20
.BI \-t " timeout"
Use
.I timeout
(seconds)
as the interval instead of the default value
(15 seconds)
to retransmit lock request to the remote server.
.TP
.BI \-g " graceperiod"
Use
.I graceperiod
.RB ( seconds )
as the grace period
duration instead of the default value (45 seconds).
.SH "SEE ALSO"
.BR fcntl (2V),
.BR lockf (3),
.BR signal (3),
.BR statd (8C)
        rpc.yppasswdd.8c       !   rpc.ypupdated.8c       "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c 
  
$  '  
rusersd.8c $  
8  (  	rwalld.8c 
8  
L  )  rwhod.8c  
L  
\  *  sa.8  
L  
p  +  
savecore.8 p  
  ,  
./share/man/man8/logintool.8                                                                           755       0      12         2067  4424741616  11024                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)logintool.8	1.9 89/03/27 SMI;
.TH LOGINTOOL 8 "22 March 1989"
.SH NAME
logintool \- graphic login interface
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "logintool command"  ""  "\fLlogintool\fP \(em graphic login interface"
.IX " commands"  "logintool command"  ""  "\fLlogintool\fP \(em graphic login interface"
.B logintool
is invoked by
.BR getty (8)
to display
a full screen window for logging in.  It cannot be run from the shell.
It is more attractive than the
traditional
.RB ` "login: " '
prompt, and also provides help for the person without a 
username and information about the workstation.
.LP
.B logintool
is noramlly invoked on the console by
.BR getty (8),
and works only on a frame buffer.
.LP
If the
.B newlogin
policy in the
.B policies
.SM YP
map is set to
.BR unrestricted ,
then 
.B logintool
may create new user accounts in the Yellow Pages.  The account resides on the
local system if it is diskful, or on the system's boot server if the 
local system is diskless.
.SH FILES
.B /usr/share/lib/ez/login
.br
.SH SEE ALSO
.BR getty (8)
  rc.8 .8c  
x    	rc.boot.8 
T  
    
rc.local.8 x  
  	  rdate.8c 8   
  
  rdump.8   
    reboot.8 .8   
    renice.8  
  
  
  
repquota.8        	restore.8        rexd.8c   $    	rexecd.8c c   8    
rlogind.8c $  L    rmail.8c c 8  \    rmt.8c c  p    route.8c c L      	routed.8c p      
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       ./share/man/man8/lpc.8                                                                                 755       0      12        14611  4424741616   7612                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)lpc.8 1.22 89/03/27 SMI; from UCB 4.3 BSD 6.1
.\"
.TH LPC 8 "9 September 1987"
.SH NAME
lpc \- line printer control program
.SH SYNOPSIS
.B /usr/etc/lpc
[
.I command
[
.IR parameter .\|.\|.
] ]
.SH DESCRIPTION
.IX  "lpc command"  ""  "\fLlpc\fP \(em line printer control"
.IX  "control line printer"  ""  "control line printer \(em \fLlpc\fP" ""  PAGE START
.IX  "line printer control"  ""  "line printer control \(em \fLlpc\fP" ""  PAGE START
.IX  printer "control \(em \fLlpc\fP"
.LP
.B lpc
controls the operation of the printer, or of multiple printers,
as described in the
.B /etc/printcap
database.
.B lpc
commands can be used to start or stop a printer, disable or enable
a printer's spooling queue, rearrange the order of jobs in a queue,
or display the status of each printer\(em\&along with its
spooling queue and printer daemon.
.LP
With no arguments,
.B lpc
runs interactively, prompting with
.BR lpc> .
If arguments are supplied,
.BR lpc
interprets the first as a
.IR command
to execute; each subsequent argument is taken as a
.I parameter
for that command.
The standard input can be redirected so that
.B lpc
reads commands from a file.
.SH USAGE
.SS Commands
Commands may be abbreviated to an unambiguous substring.  Note: the
.I printer
parameter is specified just by the name of the printer (as
.BR  lw ),
not as you would specify it to
.BR lpr (1)
or
.BR lpq (1)
(not as
.BR  \-Plw ).
.PD 0
.HP
.B ?
.RI [ command ]\|.\|.\|.
.br
.HP
.B help
.RI [ command ]\|.\|.\|.
.br
Display a short description of each
command specified in the argument list,
or, if no arguments are given, a list of the recognized commands.
.PD
.HP
.B abort
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  abort  ""  "abort \(em \fLlpc\fP"
.IX  "abort printer"  ""  "abort printer \(em \fLlpc\fP"
Terminate an active spooling daemon on the local host immediately and
then disable printing (preventing new daemons from being started by
.BR lpr (1))
for the specified printers.  The
.B abort
command can only be used by the super-user.
.HP
.B clean
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  "clean queue"  ""  "clean queue \(em \fLlpc\fP"
.IX  "clean print queue"  ""  "clean print queue \(em \fLlpc\fP"
Remove all files with names beginning with
.BR cf ,
.BR tf ,
or
.B df
from the specified printer queue(s) on the local machine.  The
.B clean
command can only be used by the super-user.
.HP
.B disable
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  "disable queue"  ""  "disable queue \(em \fLlpc\fP"
.IX  "disable print queue"  ""  "disable print queue \(em \fLlpc\fP"
Turn the specified printer queues off.  This prevents new
printer jobs from being entered into the queue by
.BR lpr (1).
The
.B disable
command can only be used by the super-user.
.HP
.B down
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.RI [ message ]
.br
.IX  printer  "take printer down"  ""  "take printer down\(em \fLlpc\fP"
.IX  "down, take printer"  ""  "down, take printer \(em \fLlpc\fP"
Turn the specified printer queue off, disable printing and put
.I message
in the printer status file. The message doesn't need to be
quoted, the
remaining arguments are treated like
.BR echo (1V).
This is normally used to take a printer down and let others know why
.RB ( lpq (1)
indicates that the printer is down, as does the
.B status
command).
.HP
.B enable
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  "enable queue"  ""  "enable queue \(em \fLlpc\fP"
.IX  "enable print queue"  ""  "enable print queue \(em \fLlpc\fP"
Enable spooling on the local queue for the listed printers, so that
.BR lpr (1)
can put new jobs in the spool queue.  The
.B enable
command can only be used by the super-user.
.TP
.B exit
.PD 0
.TP
.B quit
Exit from
.BR lpc .
.PD
.HP
.B restart
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  restart  ""  "restart \(em \fLlpc\fP"
.IX  "restart printer"  ""  "restart printer \(em \fLlpc\fP"
Attempt to start a new printer daemon. This is useful when some abnormal
condition causes the daemon to
die unexpectedly leaving jobs in the queue.
.BR lpq (1)
reports that there is no daemon present when this condition occurs.
This command can be run by any user.
.HP
.B start
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  start  ""  "start \(em \fLlpc\fP"
.IX  "start printer"  ""  "start printer \(em \fLlpc\fP"
Enable printing and start a spooling
daemon for the listed printers.  The
.B start
command can only be used by the super-user.
.HP
.B status
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
.IX  printer  "status of"  ""  "status of \(em \fLlpc\fP"
.IX  "status of printer"  ""  "status of printer \(em \fLlpc\fP"
Display the status of daemons and queues on the local machine.
This command can be run by any user.
.IX  printer  stop  ""  "stop \(em \fLlpc\fP"
.IX  "stop printer"  ""  "stop printer \(em \fLlpc\fP"
.HP
.B stop
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
.br
Stop a spooling daemon after the current
job completes and disable printing.  The
.B stop
command can only be used by the super-user.
.HP
.B topq
.I printer
.RI [\| job# \|.\|.\|.\|]
.RI [\| user \|.\|.\|.\|]
.br
.IX  "move print jobs"  ""  "move print jobs \(em \fLlpc\fP"
.IX  printer  "move jobs"  ""  "move jobs \(em \fLlpc\fP"
Move the print job(s) specified by
.I job#
or those job(s) belonging to
.I user
to the top (head) of the printer queue.  The
.B topq
command can only be used by the super-user.
.HP
.B up
.RB [\| all \||
.RI [\| printer  \|.\|.\|.\|]\|]
Enable everything and start a new printer daemon.  Undoes the
effects of
.BR down .
.SH FILES
.PD 0
.TP 20
.B /etc/printcap
printer description file
.TP
.B /var/spool/*
spool directories
.TP
.B /var/spool/*/lock
lock file for queue control
.PD
.SH "SEE ALSO"
.BR lpq (1),
.BR lpr (1),
.BR lprm (1),
.BR printcap (5),
.BR lpd (8)
.SH DIAGNOSTICS
.TP
.B ?Ambiguous command
The abbreviation you typed matches more than one command.
.TP
.B ?Invalid command
You typed a command or abbreviation that was not recognized.
.TP
.B ?Privileged command
You used a command can be executed only by the super-user.
.IX  "control line printer"  ""  "control line printer \(em \fLlpc\fP" ""  PAGE END
.IX  "line printer control"  ""  "line printer control \(em \fLlpc\fP" ""  PAGE END
 all files with names beginning with
.BR cf ,
.BR tf ,
or
.B df
from the specified printer queue(s) on the local machin./share/man/man8/lpd.8                                                                                 755       0      12        13502  4424741616   7611                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)lpd.8 1.21 89/03/27 SMI; from UCB 4.3 BSD 6.3
.\"
.TH LPD 8 "22 March 1989"
.SH NAME
lpd \- printer daemon
.SH SYNOPSIS
.B /usr/lib/lpd
[
.B \-l
] [
.B \-L
.I logfile
] [
.I port#
]
.SH DESCRIPTION
.IX  "lpd command"  ""  "\fLlpd\fP \(em line printer daemon"
.IX  printer "daemon \(em \fLlpd\fP"
.IX  "line printer daemon"  ""  "line printer daemon \(em \fLlpd\fP"
.B lpd
is the line printer daemon (spool area handler).
It is normally invoked at boot time from the
.BR rc (8)
script,  making a single pass through the
.BR printcap (5)
file to find out about the existing printers and printing any files
left after a crash.
It then accepts requests to print files in a queue,
transfer files to a spooling area, display a queue's status, or remove
jobs from a queue.  In each case, it forks a child process
for each request, and continues to listen for subsequent requests.
.LP
The Internet port number used to communicate
with other processes is normally obtained with
.BR getservent (3N),
but can be specified with the
.IR port#
argument.
.SH OPTIONS
.TP
.B \-l
Log valid requests received from the network. This can be useful
for debugging purposes.
.TP
.BI \-L " logfile"
Change the file used for writing error conditions to
.I logfile.
The default is to report a message using the
.BR syslog (3)
facility.
.SH OPERATION
.SS Access Control
.LP
Access control is provided by two means.
First, all requests must come from
one of the machines listed in either the file
.B /etc/hosts.equiv
or
.BR /etc/hosts.lpd .
(This latter file is in
.BR hosts.equiv (5)
format.)
Second, if the
.B rs
capability is specified in the
.B printcap
entry,
.BR lpr (1)
requests are only be honored for users with accounts on the
printer host.
.SS Lock File
The
.B lock
file in each spool directory is used to prevent multiple daemons from
becoming active, and to store information about the daemon process for
.BR lpr (1),
.BR lpq (1),
and
.BR lprm (1).
.LP
.B lpd
uses
.BR flock (2)
to provide exclusive access to the lock file and to prevent multiple
daemons from becoming active simultaneously.
If the daemon should be killed
or die unexpectedly, the lock file need not be removed.
The lock file is kept in a readable
.SM ASCII
form and contains two lines.
The first is the process id of the daemon
and the second is the control
file name of the current job being printed.
The second line is updated to
reflect the current status of
.B lpd
for the programs
.BR lpq (1)
and
.BR lprm (1).
.SS Control Files
After the daemon has successfully set
the lock, it scans the directory
for files beginning with
.BR cf .
Lines in each
.I cf
file specify files to be printed or non-printing actions to be
performed.  Each such line begins with a key character
that indicates what to do with the remainder of the line.
.RS
.PD 0
.TP
.B J
Job name to print on the burst page.
.TP
.B C
Classification line on the burst page.
.TP
.B L
Literal.  This line contains identification information from
the password file, and causes a burst page to be printed.
.TP
.B T
Title string for page headings printed by
.BR pr (1V).
.TP
.B H
Hostname of the machine where
.BR lpr (1)
was invoked.
.TP
.B P
Person.  Login name of the person who invoked
.BR lpr (1).
This is used to verify ownership by
.BR lprm (1).
.TP
.B M
Send mail to the specified user when the current print job completes.
.TP
.B f
Formatted File, the name of a file to print that is already formatted.
.TP
.B l
Like
.BR f ,
but passes control characters along, and does not make page breaks.
.TP
.B p
Name of a file to print using
.BR pr (1V)
as a filter.
.TP
.B t
Troff File.  The file contains
.BR troff (1)
output (cat phototypesetter commands).
.TP
.B n
Ditroff File.  The file contains device independent troff output.
.TP
.B d
.SM DVI
File.  The file contains
.SM T\v'.2v'E\v'-.2v'X
output (\s-1DVI\s0 format from Stanford).
.TP
.B g
Graph File.  The file contains data produced by
.BR plot (3X).
.TP
.B c
Cifplot File. The file contains data produced by
.IR cifplot .
.TP
.B v
The file contains a raster image.
.TP
.B r
The file contains text data with
.SM FORTRAN
carriage control characters.
.TP
.B 1
Troff Font R. The name of a font
file to use instead of the default.
.TP
.B 2
Troff Font I. The name of the font file
to use instead of the default.
.TP
.B 3
Troff Font B. The name of the font
file to use instead of the default.
.TP
.B 4
Troff Font S. The name of the font file
to use instead of the default.
.TP
.B W
Width. Changes the page width (in characters) used by
.BR pr (1V)
and the text filters.
.TP
.B I
Indent.  Specify the number of characters
by which to indent the output.
.TP
.B U
Unlink.  The name of file to remove upon completion of printing.
.TP
.B N
Filename.  The name of the file being printed, or a blank
for the standard input (when
.BR lpr (1)
is invoked in a pipeline).
.PD
.RE
.SS Data Files
.LP
If a file can not be opened, an error message is logged using the
.SB LOG_LPR
facility of
.BR syslog (3).
.B lpd
will try up to 20 times
to reopen a file it expects to be there, after which it proceeds
to the next file or job.
.SS Minfree File
The file
.I minfree
in each spool directory contains the
number of kilobytes to leave free
so that the line printer queue won't completely fill the disk.
.SH FILES
.PD 0
.TP 20
.B /etc/printcap
printer description file
.TP
.B /var/spool/*
spool directories
.TP
.B /var/spool/*/minfree
minimum free space to leave
.TP
.B /dev/lp*
line printer devices
.TP
.B /dev/printer
socket for local requests
.TP
.B /etc/hosts.equiv
hosts allowed equivalent host access
.TP
.B /etc/hosts.lpr
hosts allowed printer access only
.PD
.SH "SEE ALSO"
.BR lpr (1),
.BR lpq (1),
.BR lprm (1),
.BR printcap (5),
.BR hosts (5),
.BR hosts.equiv (5),
.BR lpc (8),
.BR pac (8)
specified correctly in the original.
.IP
Specifying superfluous
.B use=
slows down the comparison, but is not fatal;
.B infocmp
flags superfluous
.B use=
fields.
.SS Sorting Options
.TP
.B \./share/man/man8/mailstats.8                                                                           755       0      12         3243  4424741616  11014                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mailstats.8 1.14 89/03/27 SMI;
.TH MAILSTATS 8 "9 September 1987"
.SH NAME
mailstats \- print statistics collected by sendmail
.SH SYNOPSIS
.IX  "mailstats command"  ""  "\fLmailstats\fP \(em mail delivery statistics"
.IX  "mail utilities" "statistics \(em \fLmailstats\fP" "\fLmail\fR utilities"
.B /usr/etc/mailstats
[
.I filename
]
.SH DESCRIPTION
.B mailstats
prints out the statistics collected by the
.B sendmail
program on mailer usage.
These statistics are collected if the file indicated by the
.B S
configuration option of
.B sendmail
exists.  The
.B mailstats
program first prints the time that the statistics file was
created and the last time it was modified.
It will then print a table with one row for each mailer specified in
the configuration file.
The first column is the mailer number, followed by the symbolic
name of the mailer.
The next two columns refer to the number of messages received by
.IR sendmail ,
and the last two columns refer to messages sent by
.IR sendmail .
The number of messages and their total
size (in 1024 byte units) is given.
No numbers are printed if no messages
were sent (or received) for any mailer.
.LP
You might want to add an entry to
.B /var/spool/cron/crontab/root
to reinitialize
the statistics file once a night.
Copy
.B /dev/null
into the statistics file or otherwise truncate it
to reset the counters.
.SH FILES
.PD 0
.TP 20
.B /etc/sendmail.st
default statistics file
.TP
.B /etc/sendmail.cf
sendmail configuration file
.TP
.B /var/spool/cron/crontab/root
.TP
.B /dev/null
.PD
.SH SEE\ ALSO
.BR sendmail (8)
.SH BUGS
Mailstats should read the configuration file instead of having
a hard-wired table mapping mailer numbers to names.
a.8        	restore.8        rexd.8c   $    	rexecd.8c $  8    
rlogind.8c 8  L    rmail.8c  L  \    rmt.8c L  p    route.8c  p      	routed.8c       
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c       
rpc.rstatd.8./share/man/man8/makedbm.8                                                                             755       0      12         5607  4424741617  10422                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)makedbm.8 1.14 89/03/27 SMI;
.TH MAKEDBM 8 "22 March 1989"
.SH NAME
makedbm \- make a Yellow Pages dbm file
.SH SYNOPSIS
.B makedbm
[
.B \-b
]
[
.B \-l
]
[
.B \-s
]
[
.BI \-i " yp_input_file"
] [
.BI \-o " yp_output_name"
] [
.BI \-d " yp_domain_name"
]
.ti +.5
[
.BI \-m " yp_master_name"
]
.I infile
.I outfile
.LP
.B makedbm
[
.BI \-u " dbmfilename"
]
.SH DESCRIPTION
.IX  "makedbm command"  ""  "\fLmakedbm\fP \(em make Yellow Pages dbm file"
.IX  "create" "Yellow Pages dbm file \(em \fLmakedbm\fP"
.IX  "Yellow Pages"  "make dbm file"  ""  "make dbm file \(em \fLmakedbm\fP"
.B makedbm
takes
.I infile
and converts it to a pair of files in
.BR ndbm (3)
format, namely
.IB outfile .pag
and
.IB outfile .dir\fR.
Each line of the input file is converted to a single
.B dbm
record.
All characters up to the first
.SM TAB
or
.SM SPACE
form the key, and the rest of the line is the data.
If a line ends with
.RB ` \e ',
then the data for that record is continued on to the next line.
It is left for the clients of the Yellow Pages to interpret
.BR # ;
.B makedbm
does not itself treat it as a comment character.
.I infile
can be
.RB ` \- ',
in which case the standard input is read.
.LP
.B makedbm
is meant to be used in generating
.B dbm
files for the Yellow Pages,
and it generates a special entry with the key
.IR yp_last_modified ,
which is the date of
.I infile
(or the current time, if
.I infile
is
.RB ` \- ').
.SH OPTIONS
.TP
.B \-b
Interdomain. 
Propagate a map to all servers using the interdomain
name server
.BR named (8C).
.TP
.B \-l
Lowercase.
Convert the keys of the given map to lower case, so
that host name matches, for example, can work independent of upper
or lower case distinctions.
.TP
.B \-s
Secure map.
Accept connections from secure 
.SM YP
networks only.
.TP
.BI \-i " yp_input_file"
Create a special entry with the key
.IR yp_input_file .
.TP
.BI \-o " yp_output_name"
Create a special entry with the key
.IR yp_output_name .
.TP
.BI \-d " yp_domain_name"
Create a special entry with the key
.IR yp_domain_name .
.TP 
.BI \-m " yp_master_name"
Create a special entry with the key
.IR yp_master_name .
If no master host name is specified,
.IR yp_master_name
will be set to the local host name.
.TP 
.BI \-u " dbmfilename"
Undo a
.B dbm
file.
That is, print out a
.B dbm
file one entry per line,
with a single space separating keys from values.
.SH EXAMPLE
.LP
It is easy to write shell scripts
to convert standard files such as
.B /etc/passwd
to the key value form used by
.BR makedbm .
For example:
.LP
.RS
.ft B
.nf
#!/bin/awk -f
\s-1BEGIN\s0 { \s-1FS\s0 = ":"; \s-1OFS\s0 = "\et"; }
{ print $1, $0 }
.fi
.ft R
.RE
.LP
takes the
.B /etc/passwd
file and converts it to a form that can be read by
.B makedbm
to make the Yellow Pages file
.BR passwd.byname .
That is, the key is a username,
and the value is the remaining line in the
.B /etc/passwd
file.
.SH "SEE ALSO"
.BR yppasswd (1),
.BR ndbm (3),
.BR named (8C)
ay.8     V  zdump.8      W  zic.8 ump.8      W  zic.8 8  print on the burst page.
.TP
.B C
Classification li./share/man/man8/makedev.8                                                                             755       0      12         3157  4424741617  10434                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)makedev.8 1.16 89/03/27 SMI; from UCB 4.2
.TH MAKEDEV 8 "22 March 1989"
.SH NAME
makedev, MAKEDEV \- make system special files
.SH SYNOPSIS
.B /dev/\s-1MAKEDEV\s0
.I device-name
\&.\|.\|.
.SH DESCRIPTION
.IX  "makedev command"  ""  "\fLmakedev\fP \(em make system special files"
.IX  make "system special files \(em \fLmakedev\fP"
.IX  "system special files"  ""  "system special files \(em \fLmakedev\fP"
.IX  "special files"  ""  "special files \(em \fLmakedev\fP"
.SB MAKEDEV
is a shell script normally used to install
special files.  It resides in the
.B /dev
directory, as this is the normal location
of special files.  Arguments to
.SB MAKEDEV
are usually of the form
.I device-name?
where
.I device-name
is one of the supported devices listed
in section 4 of the manual and
.RI ` ? '
is a logical unit number (0-9).
A few special arguments create assorted
collections of devices and are listed below.
.TP
.B std
Create the
.I standard
devices for the system; for example,
.BR /dev/console ,
.BR /dev/tty .
.TP
.B local
Create those devices specific to the local site.  This
request runs the shell file
.BR /dev/\s-1MAKEDEV\s0.local .
Site specific commands, such as those
used to setup dialup lines as ``ttyd?''
should be included in this file.
.LP
Since all devices are created using
.BR mknod (8),
this shell script is useful only to the super-user.
.SH FILES
.B /dev/console
.B /dev/\s-1MAKEDEV\s0.local
.B /dev/tty
.SH "SEE ALSO"
.BR intro (4),
.BR config (8),
.BR mknod (8)
.SH DIAGNOSTICS
Either self-explanatory, or generated by one of the programs
called from the script.  Use
.B "sh \-x \s-1MAKEDEV\s0"
in case of trouble.
rpc.ypupdated.8c  !    "  
rpcinfo.8c !    #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c    
L  )  rwhod.8c   $  
\  *  sa.8 .8c  
p  +  
savecore.8 c  
  ,  
sendmail.8 L  
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c./share/man/man8/makekey.8                                                                             755       0      12         3321  4424741617  10437                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)makekey.8 1.9 89/03/27 SMI; from UCB 4.2
.TH MAKEKEY 8 "9 September 1987"
.SH NAME
makekey \- generate encryption key
.SH SYNOPSIS
.B /usr/lib/makekey
.SH DESCRIPTION
.IX  "makekey command"  ""  "\fLmakekey\fP \(em generate encryption key"
.IX  generate "encryption key \(em \fLmakekey\fP"
.IX  "encryption key, generate \(em \fLmakekey\fP"
.B makekey
improves the usefulness of encryption schemes depending on a key by
increasing the amount of time required to search the key space.  It
reads 10 bytes from its standard input, and writes 13 bytes on its
standard output.  The output depends on the input in a way intended to
be difficult to compute (that is, to require a substantial fraction of
a second).
.LP
The first eight input bytes
(the
.IR "input key" )
can be arbitrary
.SM ASCII
characters.  The last two (the
.IR salt )
are best chosen from the set of digits, upper- and lower-case
letters, and
.RB ` . '
and
.RB ` / '.
The salt characters are repeated as the
first two characters of the output.
The remaining 11 output characters are
chosen from the same set as the salt
and constitute the
.I "output key."
.LP
The transformation performed is essentially the following:
the salt is used to select one of 4096 cryptographic
machines all based on the National Bureau of Standards
.SM DES
algorithm, but modified in 4096 different ways.
Using the input key as key,
a constant string is fed into the machine
and recirculated a number of times.
The 64 bits that come out are distributed into the
66 useful key bits in the result.
.LP
.B makekey
is intended for programs that perform encryption (for instance,
.BR ed (1)
and
.BR crypt (1)).
Usually makekey's input and output will be pipes.
.SH SEE ALSO
.BR crypt (1),
.BR ed (1)
 	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c     
L  )  rwhod.8c     
\  *  sa.8 .8c  
p  +  
savecore.8 c  
  ,  
sendmail.8 c  
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8       =  tic.8v c./share/man/man8/mconnect.8                                                                            755       0      12         2357  4424741617  10627                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mconnect.8 1.13 89/03/27 SMI;
.TH MCONNECT 8 "22 March 1989"
.SH NAME
mconnect \- connect to SMTP mail server socket
.SH SYNOPSIS
.B /usr/etc/mconnect
[
.BI \-p " port"
] [
.B \-r
] [
.I hostname
]
.SH DESCRIPTION
.IX mconnect "" "\fLmconnect\fR \(em open connection to remote mail server"
.B mconnect
opens a connection to the mail server on a given host, so that it
can be tested independently of all other mail software.
If no host is given, the connection is made to the local host.
Servers expect to speak the Simple Mail
Transfer Protocol (\s-1SMTP\s0) on this connection.
Exit by typing the
.B quit
command.  Typing
.SM EOF
will send an end of file to the server.
An interrupt closes the connection immediately and exits.
.SH OPTIONS
.TP
.BI \-p " port"
Specify the port number instead of the default
.SM SMTP
port (number 25) as the next argument.
.TP
.B \-r
``Raw'' mode: disable the default line buffering and input handling.
This gives you a similar  effect as
.B telnet
to port number 25, not very useful.
.SH FILES
.PD 0
.TP 20
.B /usr/lib/sendmail.hf
help file for
.SM SMTP
commands
.PD
.SH SEE\ ALSO
.BR sendmail (8)
.LP
Postel, Jonathan B
.IR "Simple Mail Transfer Protocol" ,
.SM RFC\s0821
August 1982,
.SM SRI
Network Information Center
  	routed.8c  c      
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c   0    rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc.sprayd.8c `  x  ./share/man/man8/mkfile.8                                                                              755       0      12         1545  4424741620  10260                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkfile.8 1.10 89/03/27 SMI;
.TH MKFILE 8 "22 March 1989"
.SH NAME
mkfile \- create a file
.SH SYNOPSIS
.B mkfile
.RB [ " \-nv " ]
.I size\c
[\c
.BR k \||\| b \||\| m\c
]
.IR filename " .\|.\|."
.SH DESCRIPTION
.IX "mkfile command" "" "\fLmkfile\fP command"
.B mkfile
creates one or more files that are suitable for use as
.SM NFS-\s0mounted
swap areas, or as local swap areas.
The sticky bit is set, and
the file is padded with zeroes by default.  The
default
.I size 
is in bytes, but it
can be flagged as kilobytes, blocks, or megabytes, with the
.BR k ,
.BR b  ,
or
.BR m
suffixes, respectively.
.SH OPTIONS
.TP
.B \-n
Create an empty
.IR filename .
The size is noted, but disk blocks aren't allocated until data is
written to them.
.TP
.B \-v
Verbose.  Report the names and sizes of created files.
.SH SEE ALSO
.BR swapon (2),
.BR fstab (5),
.BR swapon (8)
   rarpd.8c     
d    rc.8 .8c  
x    	rc.boot.8 8c  
    
rc.local.8 c  
  	  rdate.8c 8 c  
  
  rdump.8   
    reboot.8 .8 ./share/man/man8/mkfs.8                                                                                755       0      12         6700  4424741620   7747                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkfs.8 1.23 89/03/27 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH MKFS 8 "22 March 1989"
.SH NAME
mkfs \- construct a file system
.SH SYNOPSIS
.B /usr/etc/mkfs
[
.B \-N
]
.I special size
.RI [ " nsect " ]
.RI [ " ntrack " ]
.if n .ti +0.5i
.RI [ " blksize " ]
.RI [ " fragsize " ]
.RI [ " ncpg " ]
.RI [ " minfree " ]
.if n .ti +0.5i
.if t .ti +0.5i
.RI [ " rps " ]
.RI [ " nbpi " ]
.RI [ " opt " ]
.RI [ " apc " ]
.RI [ " rot " ]
.SH DESCRIPTION
.IX  "mkfs command"  ""  "\fLmkfs\fP \(em make file system"
.IX  make "file system \(em \fLmkfs\fP"
.IX  "create"  "file system \(em \fLmkfs\fP"
.IX  "file system"  "make mkfs"  "file system"  "make \(em \fLmkfs\fP"
.LP
Note:
file systems are normally created with the
.BR newfs (8)
command.
.LP
.B mkfs
constructs a file system by writing on the special file
.I special
unless the
.B \-N
flag has been specified.
The numeric
.I size
specifies the number of sectors in the file system.
.B mkfs
builds a file system with a root directory and a lost+found
directory (see
.BR fsck (8)).
The number of inodes is calculated as a
function of the file system size.
No boot program is initialized by
.B mkfs
(see
.BR newfs (8)).
.SH OPTIONS
.LP
The optional arguments allow fine tune control over the
parameters of the file system.
.TP
.I nsect
The number of sectors per track on the disk.  The default is
.BR 32 .
.TP
.I ntrack
The number of tracks per cylinder on the disk.  The default is
.BR 16 .
.TP
.I blksize
The primary block size for files on the file system.
It must be a power of two, currently selected from
.B 4096
or
.B 8192
(the default).
.TP
.I fragsize
The fragment size for files on the file system.
The
.I fragsize
represents the smallest amount of disk
space that will be allocated to a file.
It must be a power of two currently selected from the range
.B 512
to
.BR 8192 .
The default is
.BR 1024 .
.TP
.I ncpg
The number of disk cylinders per cylinder group.
This number must be in the range
.B 1
to
.BR 32 .
The default is
.BR 16 .
.TP
.I minfree
The minimum percentage of free disk space allowed.
Once the file system capacity reaches this threshold, only
the super-user is allowed to allocate disk blocks.
The default value is 
.BR 10% .
.TP
.I rps
The rotational speed of the disk, in revolutions per second.
The default is
.BR 60 .
.TP
.I nbpi
The number of bytes for which one inode block is allocated.
This parameter is
currently set at one inode block for every 2048 bytes.
.TP
.I opt
Space or time optimization preference;
.B s
specifies optimization for space,
.B t
specifies optimization for time.  The default is
.BR t .
.TP
.I apc
The number of alternates per cylinder (\s-1SCSI\s0 devices only). 
The default is
.BR 0 .
.TP
.I rot
The expected time (in milliseconds)
to service a transfer completion
interrupt and initiate a new transfer on the same disk.
It is used to decide how much rotational spacing to place between
successive blocks in a file.
.LP
Users with special demands for their file systems are referred to
the paper cited below for a discussion of the tradeoffs in using
different configurations.
.br
.ne 5
.SH "SEE ALSO"
.BR fsck (8),
.BR newfs (8),
.BR tunefs (8),
.BR dir (5),
.BR fs (5)
.LP
.TX ADMIN
.br
McKusick, Joy, Leffler;
.I "A Fast File System for \s-1UNIX\s0"
.SH NOTES
.LP
.BR newfs (8)
is much to be preferred for most routine uses.
rrent print job completes.
.TP
.B f
Formatted File, the name of ./share/man/man8/mknod.8                                                                               755       0      12         2624  4424741620  10120                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mknod.8 1.15 89/03/27 SMI; from UCB 4.2
.TH MKNOD 8  "9 September 1987"
.SH NAME
mknod \- build special file
.SH SYNOPSIS
.B /usr/etc/mknod
.I filename
[
.B c
] [
.B b
]
.I major minor
.LP
.B /usr/etc/mknod
.I filename
.B p
.SH DESCRIPTION
.IX  "mknod command"  ""  "\fLmknod\fP \(em make special file"
.IX  make "special file \(em \fLmknod\fP"
.IX  "create" "special file \(em \fLmknod\fP"
.IX  "special file"  "make mknod"  "special file"  "make \(em \fLmknod\fP"
.IX  make "fifo \(em \fLmknod\fP"
.IX  "create" "fifo \(em \fLmknod\fP"
.IX  "fifo, make \(em \fLmknod\fP"
.IX  make "named pipe \(em \fLmknod\fP"
.IX  "create" "named pipe \(em \fLmknod\fP"
.IX  "named pipe, make \(em \fLmknod\fP"
.B mknod
makes a special file.  The first argument is the
.I filename
of the entry.  In the first form, the second argument is
.B b
if the special file is block-type (disks, tape) or
.B c
if it is character-type (other devices).  The last two arguments are
numbers specifying the
.I major
device type and the
.I minor
device (for example, unit, drive, or line number).
Only the super-user is permitted to invoke this form of the
.B mknod
command.
.LP
In the second form,
.B mknod
makes a named pipe (\s-1FIFO\s0).
.LP
The first form of
.B mknod
is only for use by system configuration
people.  Normally
you should use
.B /dev/\s-1MAKEDEV\s0
instead when making special files.
.SH "SEE ALSO"
.BR mknod (2),
.BR makedev (8)
c   `    
rpc.sprayd.8c   x    rpc.statd.8c          rpc.yppasswdd.8c       !   rpc../share/man/man8/mkproto.8                                                                             755       0      12         5216  4424741620  10503                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mkproto.8 1.12 89/03/27 SMI; from UCB 4.2
.TH MKPROTO 8 "22 March 1989"
.SH NAME
mkproto \- construct a prototype file system
.SH SYNOPSIS
.B /usr/etc/mkproto
.I special proto
.SH DESCRIPTION
.IX  "mkproto command"  ""  "\fLmkproto\fP \(em make prototype file system"
.IX  "create" "prototype file system \(em \fLmkproto\fP"
.IX  "file system"  "make prototype"  "file system"  "make prototype\(em \fLmkproto\fP"
.B mkproto
is used to bootstrap a new file system.
First a new file system is created using
.BR newfs (8).
.B mkproto
is then used to copy files from the old file system into the new
file system according to the directions found in the prototype file
.BR proto .
The prototype file
contains tokens separated by
.SM SPACE
or
.SM NEWLINE
characters.
The first tokens comprise the specification
for the root directory.
File specifications consist of tokens
giving the mode,
the user
.SM ID\s0,
the group
.SM ID\s0,
and the initial contents of the file.
The syntax of the contents field
depends on the mode.
.LP
The mode token for a file is a 6 character string.
The first character
specifies the type of the file.
(The characters
.B \-bcd
specify regular, block special,
character special and directory files
respectively.)
The second character of the type
is either
.B u
or
.RB ` \- '
to specify set-user-id mode or not.
The third is
.B g
or
.RB ` \- '
for the set-group-id mode.
The rest of the mode
is a three digit octal number giving the
owner, group, and other read, write, execute
permissions, see
.BR chmod (1V).
.LP
Two decimal number
tokens come after the mode; they specify the
user and group
.SM ID\s0's
of the owner of the file.
.LP
If the file is a regular file,
the next token is a pathname
whence the contents and size are copied.
.LP
If the file is a block or character special file,
two decimal number tokens
follow which give the major and minor device numbers.
.LP
If the file is a directory,
.B mkproto
makes the entries
.RB ` . '
and
.RB  ` .\|. '
and then
reads a list of names and
(recursively) file specifications for the entries
in the directory.
The scan is terminated with the
token
.BR $ .
.LP
A sample prototype specification follows:
.LP
.RS
.nf
.ft B
d\-\^\-777 3 1
usr	d\-\^\-777 3 1
.RS
.ft B
sh	\-\^\-\^\-755 3 1 /usr/bin/sh
ken	d\-\^\-755 6 1
.RS
.ft B
$
.RE
.ft B
b0	b\-\^\-644 3 1 0 0
c0	c\-\^\-644 3 1 0 0
$
.RE
.ft B
$
.ft R
.fi
.RE
.LP
.SH "SEE ALSO"
.BR chmod (1V),
.BR fs (5),
.BR dir (5),
.BR fsck (8),
.BR newfs (8)
.SH BUGS
There should be some way to specify links.
.LP
There should be some way to specify bad blocks.
.LP
.B mkproto
can only be run on virgin file systems.
It should be possible to copy files into existent file systems.
xfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8       U  ypxfr_2perday.8     V  zdump.8      W  zic.8 8      W  zic.8 8 e default is
.BR 0 .
.TP
.I rot
The expected time (in milliseconds)
to service a transfer completion
interrupt and initiate a new transfer on the same disk.
It is used to decide how much rotational spacing to place b./share/man/man8/modload.8                                                                             755       0      12         4731  4424741620  10430                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)modload.8	1.9 89/03/27 SMI;
.TH MODLOAD 8  "19 February 1988"
.SH NAME
modload \- load a Sun386i module
.SH SYNOPSIS
.B modload
.I filename
[
.BI \-conf " config_file"
]
[
.BI \-entry " entry_point"
]
[
.BI \-exec " exec_file"
]
[
.BI \-o " output_file"
]
.if t .ti +.5i
[
.BI \-nolink
]
[
.BI \-A " vmunix_file"
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "modload command" "" "\fLmodload\fP command"
.B modload
loads a loadable module into a running system.  The input file
.I filename
is an object file (\fB.o\fP file).
.SH OPTIONS
.TP
.BI \-conf " config_file
Use this configuration file to configure the loadable driver being loaded.
The commands in this file are the same as those that the 
.BR config (8)
program recognizes.
There are two additional commands, 
.B blockmajor
and 
.B charmajor,
shown in the configuration file example below.
.TP
.BI \-entry " entry_point"
This is the module entry point.  This is passed by 
.B modload 
to
.BR ld (1)
when the module is linked.  The default module entry point name is 
\&`\fIxxx\|\fBinit\fR'.
.TP
.BI \-exec " exec_file
This is the name of a shell script or executable image file that 
will be executed
if the module is successfully loaded. 
It is always passed the module id and module
type as the first two arguments.  For loadable drivers, the
third and fourth arguments
are the block major and character major numbers respectively. 
For a loadable system call, the third argument is the system call number.
.TP
.BI \-o " output_file
This is the name of the output file that is produced by the linker. 
If this option
is omitted, then the output file name is 
.I filename>
without the
.RB ` .o '.
.TP
.B \-nolink
This option can be used if 
.B modload
has already been issued once and the output file
already exists.  One must take care that neither
the kernel nor the module have changed.
.TP
.BI \-A  " vmunix_file
This is the file that is passed to the linker to resolve module references to
kernel symbols.  The default is 
. B /vmunix. 
The symbol file must be for the currently
running kernel or the module is likely to crash the system.
.SH EXAMPLE
.RS
.nf
.ft B
controller	fdc0 at atmem csr 0x001000 irq 6 priority 3
controller	fdc2 at atmem csr 0x002000 irq 5 priority 2
disk		fd0 at fdc0 drive 0
disk		fd0 at fdc0 drive 1
disk		fd0 at fdc0 drive 2
device		fd0 at fdc2 drive 0 csr 0x003000 irq 4 priority 2
disk		fd0 at fdc2 drive 1
blockmajor 51
charmajor 52
.fi
.RE
.SH SEE ALSO
.BR ld (1),
.BR modunload (8),
.BR modstat (8)
   L  yppoll.8  K  (  M  yppu./share/man/man8/modstat.8                                                                             755       0      12          703  4424741621  10440                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)modstat.8	1.9 89/03/27 SMI
.TH MODSTAT 8  "19 February 1988"
.SH NAME
modstat \- display status of Sun386i modules
.SH SYNOPSIS
.B modstat
[
.BI \-id " module_id
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "modstat command" "" "\fLmodstat\fP command"
.B modstat
displays the status of the loaded modules.
.SH OPTIONS
.TP
.BI \-id " module_id
Display status of only this module.
.SH SEE ALSO
.BR modload (8),
.BR modunload (8)
.8 g.  	P    ping.8c   	d    pnp.s386.8c   	x    
./share/man/man8/modunload.8                                                                           755       0      12         1617  4424741621  10774                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)modunload.8	1.9 89/03/27 SMI;
.TH MODUNLOAD 8  "19 February 1988"
.SH NAME
modunload \- unload a Sun386i module
.SH SYNOPSIS
.B modunload
.BI \-id " module_id"
[
.B \-exec " exec_file"
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "modunload command" "" "\fLmodunload\fP command"
.B modunload
unloads a loadable module from a running system.  The 
.I module_id
is the ID of the module as shown by 
.BR modstat (8).
.SH OPTIONS
.TP
.BI \-exec " exec_file"
This is the name of a shell script or executable image file that will be 
executed before the module is unloaded. 
It is always passed the module id and module
type as the first two arguments.  For loadable drivers, 
the third and fourth arguments are the block major and character major 
numbers respectively.  For a loadable system call, the third argument 
is the system call number.
.SH SEE ALSO
.BR modload (8),
.BR modstat (8)
   
  
  
repquota.8         	restore.8        rexd.8c   $    	rexecd.8c c   8    
rlogind../share/man/man8/monitor.8s                                                                            755       0      12        52134  4424741621  10704                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)monitor.8s 1.36 89/03/27 SMI; 
.TH MONITOR 8S "25 March 1989"
.SH NAME
monitor \- system ROM monitor
.SH SYNOPSIS
.SB L1\-A
.sp .5v
.SB BREAK
.SH DESCRIPTION
.IX  "monitor program"
.IX  "bootstrap PROM monitor program"
.IX  "PROM monitor program"
.IX  "CPU PROM monitor program"
.IX  "system PROM monitor program"
.LP
The
.SM CPU
board of the Sun workstation contains an 
.SM EPROM
(or set of 
.SM EPROM\*Ss),
called the
.IR monitor , 
that controls the system during startup.  The monitor tests 
the system before attempting to boot 
the operating system.
If you interrupt the boot procedure by holding down
.SB L1
while typing
.B a
or
.B A
on the workstation keyboard (or
.SB BREAK
if the console is a dumb terminal) the monitor issues the prompt:
.IP
.B >
.LP
and accepts commands interactively.
.SH USAGE
.SS Commands
.TP 12
.BR + | \-
Increment or decrement the current address and display the
contents of the new location.
.\"
.TP
.BI ^C " source destination n"
(caret-C)
Copy, byte-by-byte a block of length 
.I n
from the
.I source
address to the
.I destination
address.
.\"
.TP
.BI ^I " program
(caret-I)
Display the compilation date and location of 
.IR program .
.TP
.BI ^T " virtual_address
(caret-T)
Display the physical address to which
.I virtual_address
is mapped.
.\"
.HP
.B a
.RI [ n "] [" action "].\|.\|.	(Sun-2 and Sun-3 systems only)"
.br
Open 
.BR A \-register
(cpu address register)
.IR n ,
and perform indicated actions.  The number
.I n
can be any value from
.B 0
to
.BR 7 ,
inclusive.  The default value
is
.BR 0 .
A hexadecimal
.I action
argument assigns the value you supply to the register
.IR n .
A non-hex
.I action
terminates command input.
.HP
.B b
[
.B !
] [
.I device
[
.BI ( c , u , p\|\fB)
] ] [
.I pathname
] [
.I arguments_list
]
.br
.PD 0
.TP
.BR b [ ? ]
.PD
Reset appropriate parts of the system and bootstrap
a program. A
.RB  ` ! '
(preceding the
.I device
argument) prevents the system reset from occurring.
Programs can be loaded from various devices
(such as a disk, tape or Ethernet).
.RB ` b '
with no arguments will cause a default boot, either from a
disk, or from an Ethernet controller.
.RB ` b? '
displays all boot devices and their
.I device
arguments, where
.I device
is one of:
.RS
.RS
.TP 4
.B ie
.PD 0
Intel Ethernet
.TP
.B le
Lance Ethernet (Sun-2, Sun-3, Sun-4 systems only)
.TP
.B sd
.SM SCSI
disk
.TP
.B st
.SM SCSI
1/4" tape
.TP
.B mt
Tape Master 9-track 1/2" tape (Sun-2, Sun-3, Sun-4 systems only)
.TP
.B xd
Xylogics 7053 disk (Sun-2, Sun-3, Sun-4 systems only)
.TP
.B xt
Xylogics 1/2" tape (Sun-2, Sun-3, Sun-4 systems only)
.TP
.B xy
Xylogics 440/450 disk (Sun-2, Sun-3, Sun-4 systems
only)
.TP
.B fd
Diskette (Sun386i system only)
.PD
.RE
.RE
.TP
.I c
A controller number
.RB ( 0
if only one controller),
.TP
.I u
A unit number
.RB ( 0
if only one driver), and
.TP
.I p
A partition.
.TP
.I pathname
A pathname for a program such as 
.BR /stand/diag . 
.B /vmunix
is the default.
.TP
.I arguments_list
A list of up to seven arguments to pass to the program being booted.
.\"
.HP
.B c
.RI [ virtual_address ]
.br
Resume execution of a program.  When given,
.I virtual_address
is the address at which execution will resume.
The default is the current
.SM PC\s0
(\s-1EIP\s0 on Sun386i systems).
Registers are restored to the values shown by the
.BR a , 
.BR d , 
and 
.B r 
commands (for Sun-2 and Sun-3 systems), or by the 
.B d
and
.B r
commands (for Sun-4 systems), or by the
.B d
command (for Sun386i systems).
.\"
.HP
.B d
.RI [ window_number "]	(Sun-4 systems only)"
.br
Display (dump) the state of the processor.
The processor state is observable only after:
.RS
.RS
.TP 3
\(bu
An unexpected trap was encountered.
.PD 0
.TP
\(bu
A user program dropped into the monitor (by calling
.IR abortent ).
.TP
\(bu
The user manually entered the monitor by typing
.SB L1\-A
or
.BR \s-1BREAK\s0 .
.PD
.RE
.RE
.ne 6
.IP
The display consists of the following:
.RS
.RS
.TP 4
\(bu
The special registers:
.SM PSR\s0,
.SM PC\s0,
n\s-1PC\s0,
.SM TBR\s0,
.SM WIM
and Y
.PD 0
.TP
\(bu
Eight global registers, and
.TP
\(bu
24 window registers (8
.IR in ,
8
.IR local ,
and 8
.IR out ),
corresponding to one of the 7 available windows.  If a
Floating-Point Unit is on board, its status register along with
its 32 floating-point registers are also shown.
.PD
.RE
.TP
.I window_number
Display the indicated
.IR window_number ,
which can be any value between 0 and 6, inclusive.  If no window
is specified and the
.SM PSR\s0's
current window pointer contains a
valid window number, registers from the window that was active just
prior to entry into the monitor are displayed.  Otherwise,
registers from window 0 are displayed.
.RE
.\"
.TP
\fBd\fR	(Sun386i systems only)
Display (dump) the state of the processor.
This display consists of the registers, listed below: 
.RS
.RS
.TP 28
Processor Registers:
.SM "EAX, ECX, EDX, ESI, EDI, ESP, EBP, EFLAGS, EIP"
.PD 0
.TP
Segment Registers:
.SM "ES, CS, SS, DS, FS, GS"
.TP
Memory Management Registers:
.SM "GDTR, LDTR, IDTR, TR"
.TP
Control Registers:
.SM CR0, CR2, CR3
.TP
Debug Registers:
.SM "DR0, DR1 , DR2 , DR3, DR6, DR7"
.TP
Test Registers:
.SM TR6, TR7
.PD
.RE
.RE
.IP
The processor's state is observable only after an 
unexpected trap, a user program has 
\(lqdropped\(rq into the monitor (by calling monitor function abortentor) 
or the user has manually \(lqbroken \(rq
into the monitor (by typing
.SB L1\-A
on the Workstation console, or
.SB BREAK
on the dumb terminal's keyboard.
.\"
.HP 
.B d
.RI [ n ]\|[ action "]\|.\|.\|.	(Sun-2 and Sun-3 systems only)"
.br
Open 
.BR D \-register 
(cpu data register)
.IR n , 
and perform indicated actions.
The number
.I n 
can be any value from
.B 0
to
.BR 7 ,
inclusive.
The default is
.BR 0 .
See the
.B a
command for a description of
.IR action .
.\"
.HP
.B e
.RI [ virtual_address ]\|[ action "] .\|.\|."
.br
Open the 16 bit word at 
.I virtual_address
.\" Sun386i
(default zero).  On Sun-2, Sun-3, and Sun-4 systems, the address is 
interpreted in the address space defined by the 
.B s
command.
See the
.B a
command for a description of
.IR action .
.\"
.br
.ne 11
.HP 
.BI f " virtual_address1 virtual_address2 pattern "
.RI [ size\| "]	(Sun-3 and Sun-4 systems only)"
.br
Fill the bytes, words or long words from 
.I virtual_address1 
(lower) to
.I virtual_address2
(higher) with the constant, 
.IR pattern .
The
.I size
argument can take one of the following values
.RS
.RS
.TP 4
.B b
byte format (the default)
.PD 0
.TP
.B w
word format
.TP
.B l
long word format
.PD
.RE
.RE
.IP
For example, the following command fills the address block from 0x1000 
to 0x2000 with the word pattern, 0x\s-1ABCD\s0:
.RS
.IP
.B "f 1000 2000 \s-1ABCD\s0 W"
.RE
.\"
.HP
.B g
.RI [ vector\| "] [" argument\| ]
.br
.PD 0
.HP
.B g
.RI [ virtual_address\| "] [" argument \|]
.br
.PD
Goto (jump to) a predetermined or default routine (first form),
or to a user-specified routine (second form).  The value of
.I argument
is passed to the routine.  If the
.I vector
or
.I virtual_address
argument is omitted, the value in the
.SM PC
is used as the address to jump to.
.IP
To set up a predetermined routine to jump to, a user program must,
prior to executing the monitor's
.B g
command, set the variable 
.B *romp->v_vector_cmd
to be equal to the virtual address of the desired routine.
Predetermined routines need not necessarily return control
to the monitor.
.IP
The default routine, defined by the monitor, prints the user-supplied
.I vector
according to the format supplied in 
.IR argument .
This format can be one of:
.RS
.RS
.TP 4
.PD 0
.B %x
hexadecimal
.TP
.B %d
decimal
.PD
.RE
.RE
.\"
.TP
\fBg0\fR (Sun-2, Sun-3, and Sun-4 only)
When the monitor is running as a result of 
the system being interrupted, force a panic and produce a crash dump.
.IP \fBg4\fR (Sun-2, Sun-3, and Sun-4 only)
When the monitor is running as a result of 
the system
being interrupted, force a kernel stack trace.
.\"
.TP 
\fBh\fR	(Sun-3 and Sun-4 and Sun386i systems)
Display the help menu for monitor commands and their descriptions.
To return to the monitor's basic command level, press
.SM ESCAPE
or
.B q
before pressing
.SM RETURN.
.\"
.br
.ne 6
.TP
\fBi \fR[\fIcache_data_offset\fR\|] [\fIaction\fR\|]\|.\|.\|.		(Sun-3/200 series and Sun-4 systems only)
Modify cache data RAM command.  Display and/or modify one or more of the
.br
Modify cache data
.SM RAM
command.  Display and/or modify one or more of the
cache data addresses.  See the
.B a
command for a description of
.IR action .
.\"
.HP
.B j
.RI [ cache_tag_offset "\|] [" action\| "]\|.\|.\|.	(Sun-3/200 series and Sun-4 systems only)"
.br
Modify cache tag
.SM RAM
command.  Display and/or modify the contents of
one or more of the cache tag addresses.  See the
.B a
command for a description of
.IR action .
.\"
.HP
.B k\|
.RI [ reset_level \|]
.br
Reset the system.  If 
.I reset_level
is:
.RS
.RS
.TP 4
.B 0
.SM CPU
reset only (Sun-2 and Sun-3 systems).  Reset
.SM VME\s0bus,
interrupt registers, video monitor (Sun-4 systems).
This is the default.  Reset video (Sun386i systems).
.PD 0
.TP
.B 1
Software reset.
.TP
.B 2
Power-on reset.
Resets and clears the memory. 
Runs the
.SM EPROM\s0-based
diagnostic self test, which can take several
minutes, depending upon how much memory is being tested.
.PD
.RE
.RE
.\"
.TP
.B kb
Display the system banner.
.\"
.HP
.B l\|
.RI [ virtual_address \|]\|[ action ]\|.\|.\|.
.br
Open the long word (32 bit) at memory address 
.I virtual_address
.\" Sun386i
(default zero).  On Sun-2, Sun-3 and Sun-4 systems, the address is 
interpreted in the address space defined by the 
.B s
command (below).  See the
.B a
command for a description of
.IR action .
.\"
.HP
.B m\|
.RI [ virtual_address \|]\|[ action \|]\|.\|.\|.
.br
Open the segment map entry that maps
.I virtual_address
.\" Sun386i
(default zero).  On Sun-2, Sun-3 and Sun-4 systems, the address is 
interpreted in the address space defined by the 
.B s
command.  Not supported on Sun386i.
See the
.B a
command for a description of
.IR action .
.\"
.TP
\fBnd\fR	(Sun386i systems only)
.PD 0
.TP
.BR ne
.TP
.BR ni
.PD
Disable, enable, or invalidate the cache, respectively
.\"
.HP
.B o\|
.RI [ virtual_address \|]\|[action ]\|.\|.\|.
.br
Open the byte location specified  by 
.br
.IR virtual_address
.\" Sun386i
(default zero).  On Sun-2, Sun-3 and Sun-4 systems, the address is 
interpreted in the address space defined by the 
.B s
command.
See the
.B a
command for a description of
.IR action .
.\"
.HP
.B p\|
.RI [ virtual_address \|]\|[ action ].\|.\|.
.br
Open the page map entry that maps
.I virtual_address 
(default zero) in the address space defined by the
.B s
command.  
See the
.B a
command for a description of
.IR action .
.\"
.TP
\fBp\fP [\fIport_address\fP] [[\fInonhex_char\fP [\fIhex_value\fP] | \fIhex_value\fP] ...]	(Sun386i systems only)
Display or modify the contents of one or more port I/O addresses in
byte mode.  Each port address is treated as a 8-bit unit.  The optional
.IR "port_address" ,
argument, which is a 16-bit quantity, specifies the initial port I/O address.
See the
.B e
command for argument descriptions.
.\"
.HP 
.B q\|
.RI [ eeprom_offset \|]\|[ action "\|].\|.\|.	(Sun-3 and Sun-4 systems only)"
.br
Open the
.SM EEPROM
.I eeprom_offset
(default zero) in the
.SM EEPROM
address space.  
All addresses are referenced from the beginning or base of the 
.SM EEPROM
in physical address space, and a limit check is performed to 
insure that no address beyond the
.SM EEPROM
physical space is accessed.  
On Sun386i systems, open the
.SM NVRAM
.I nvram_offset
(default zero).
This command is used to display or modify configuration parameters,
such as: the amount of memory to test during self test,
whether to display a standard or custom banner, 
if a serial port (A or B) is to be the system console, etc.   
See the
.B a
command for a description of
.IR action .
.\"
.\"
.TP
\fBr\fP [\fIreg_name\fP] [[\fInonhex_char\fP [\fIhex_value\fP] | \fIhex_value\fP] ...]  (Sun386i systems only)
Display or modify one or more of the processor registers.
If
.I "reg_name"
is specified (2 or 3 characters from the above list), that
register is displayed first.  The default is
.SM
.BR EAX . 
See note on register availability under the command
.BR d 
(for Sun386i systems).
See the 
.B e
command for argument descriptions.
.\"
.TP
\fBs\fP [\fIstep_count\fP]  	(Sun386i systems only)
Single step the execution of the interrupted program.  The
.I step_count
argument specifies the number of single steps to execute 
before displaying the monitor prompt.  The default is 1. 
.br
.ne 5
.HP
.B r\|
.RI [ register_number ]\|[ action "\|]\|.\|.\|.	(Sun-2 and Sun-3 systems only)"
.br
Display and/or modify the register indicated.
.I register_number
can be one of:
.RS
.RS
.TP 4
.SB CA
68020 Cache Address Register
.PD 0
.TP
.SB CC
68020 Cache Control Register
.TP
.SB CX
68020 System and User Context
.TP
.SB DF
Destination Function code
.TP
.SB IS
68020 Interrupt Stack Pointer
.TP
.SB MS
68020 Master Stack Pointer
.TP
.SB PC
Program Counter
.TP
.SB SC
68010 System Context
.TP
.SB SF
Source Function code
.TP
.SB SR
Status Register
.TP
.SB SS
68010 Supervisor Stack Pointer
.TP
.SB UC
68010 User Context
.TP
.SB US
User Stack Pointer
.TP
.SB VB
Vector Base
.PD
.RE
.RE
.IP
Alterations to these registers (except
.SB SC
and
.BR \s-1UC\s0 )
do not take effect until the next 
.B c 
command is executed.
See the
.B a
command for a description of
.IR action .
.\"
.br
.ne 15
.HP
.PD 0
.B r\|
.RI [ register_number\| "]	(Sun-4 systems only)"
.br
.HP
.B r\|
.RI [ register_type\| ]
.br
.HP
.B r
.RI [ "w window_number\|" ]
.br
.PD
Display and/or modify one or more of the
.SM IU
or
.SM FPU
registers.
.IP
A hexadecimal
.I register_number
can be one of:
.RS
.RS
.TP 12
.BR 0x00 \(em\& 0x0f
.PD 0
window(0,i0)\(em\&window(0,i7), window(0,i0)\(em\&window(0,i7)
.TP
.BR 0x16 \(em\& 0x1f
window(1,i0)\(em\&window(1,i7), window(1,i0)\(em\&window(1,i7)
.TP
.BR 0x20 \(em\& 0x2f
window(2,i0)\(em\&window(2,i7), window(2,i0)\(em\&window(2,i7)
.TP
.BR 0x30 \(em\& 0x3f
window(3,i0)\(em\&window(3,i7), window(3,i0)\(em\&window(3,i7)
.TP
.BR 0x40 \(em\& 0x4f
window(4,i0)\(em\&window(4,i7), window(4,i0)\(em\&window(4,i7)
.TP
.BR 0x50 \(em\& 0x5f
window(5,i0)\(em\&window(5,i7), window(5,i0)\(em\&window(5,i7)
.TP
.BR 0x60 \(em\& 0x6f
window(6,i0)\(em\&window(6,i7), window(6,i0)\(em\&window(6,i7)
.TP
.BR 0x70 \(em\& 0x77
g0, g1, g2, g3, g4, g5, g6, g7
.TP
.BR 0x78 \(em\& 0x7d
.SM PSR\s0,
.SM PC\s0,
.SM nPC\s0,
.SM WIM\s0,
.SM TBR\s0,
Y
.TP
.BR 0x7e \(em\& 0x9e
.SM FSR\s0,
f0\(em\&f31
.PD
.RE
.IP
Register numbers can only be displayed after an unexpected trap,
a user program has entered the monitor using the
.I abortent
function, or the user has entered the monitor by manually typing
.SB L1\-A
or
.BR \s-1BREAK\s0 .
.RE
.IP
If a 
.I register_type
is given, the first register of the indicated type is displayed.
.I register_type
can be one of:
.RS
.RS
.TP 4
.PD 0
.B f
floating-point
.TP
.B g
global
.TP
.B s
special
.PD
.RE
.RE
.IP
If 
.B w
and a
.I window_number
.RB ( 0 \(em 6 )
are given, the first
.IR in -register
within the indicated window is displayed.  If 
.I window_number
is omitted, the window that was active just prior to entering
the monitor is used.  If the
.SM PSR\s0's
current window pointer is invalid, window 0 is used.
.\"
.br
.ne 11
.HP
.B s\|
.RI [ code "]	(Sun-2 and Sun-3 systems only)"
.br
Set or query the address space to be used by subsequent 
memory access commands.
.I code
is one of:
.RS
.RS
.TP 4
.PD 0
.B 0
undefined
.TP
.B 1
user data space
.TP
.B 2
user program space
.TP
.B 3
user control space
.TP
.B 4
undefined
.TP
.B 5
supervisor data space
.TP
.B 6
supervisor program space
.TP
.B 7
supervisor control space
.PD
.RE
.RE
.IP
If
.I code
is omitted,
.B s
displays the current address space.
.br
.ne 15
.HP
.B s\|
.RI [ asi "\|]	(Sun-4 systems only)"
.br
Set or display the Address Space Identifier.  With no argument,
.B s
displays the current Address Space Identifier.  The
.I asi
value can be one of:
.RS
.RS
.TP 12
.B 0x2
.PD 0
control space
.TP
.B 0x3
segment table
.TP
.B 0x4
Page table
.TP
.B 0x8
user instruction
.TP
.B 0x9
supervisor instruction
.TP
.B 0xa
user data
.TP
.B 0xb
supervisor data
.TP
.B 0xc
flush segment
.TP
.B 0xd
flush page
.TP
.B 0xe
flush context
.TP
.B 0xf
cache data
.PD
.RE
.RE
.\"
.HP 
.B t\|
.RI [ program "]	(Sun-3 systems only)"
.br
Trace the indicated standalone
.IR program .  
Works only with programs that do not affect interrupt vectors.
.\"
.HP
.B u
.RI [ echo ]
.br
.PD 0
.HP
.B u
[
.I port
] [
.I options
] [
.I baud_rate
]
.br
.HP
.BR u "[ " u
] [
.IR virtual_address " ]"
.br
.PD
With no arguments, display the current I/O device characteristics
including:
current input device,
current output device, 
baud rates for serial ports A and B,
an input-to-output echo indicator,
and virtual addresses of mapped
.SM UART
devices.
With arguments, set or configure the current I/O device.  With the 
.B u
argument
.RB ( uu .\|.\|.),
set the I/O device to be the
.I virtual_address
of a
.SM UART
device currently mapped.
.RS
.RS
.TP 12
.I echo
Can be either
.B e
to enable input to be echoed to the output device, or
.BR ne ,
to indicate that input is not echoed.
.TP
.I port
Assign the indicated 
.I port
to be the current I/O device.
.I port
can be one of:
.RS
.RS
.TP 4
.B a
serial port A
.PD 0
.TP
.B b
serial port B (except on Sun386i systems)
.TP
.B k
the workstation keyboard
.TP
.B s
the workstation screen
.PD
.RE
.RE
.TP
.I baud_rate
Any legal baud rate.
.IP
.I options
can be any combination of:
.RS
.RS
.TP 4
.PD 0
.B i
input
.TP
.B o
output
.TP
.B u
.SM UART
.TP
.B e
echo input to output
.TP
.B ne
do not echo input
.TP
.B r
reset indicated serial port 
.RB ( a
and
.B b
ports only)
.RE
.RE
.PD
.IP
If either
.B a
or 
.B b
is supplied, and no
.I options
are given, the serial port is assigned for both input and output.  If
.B k
is supplied with no options, it is assigned for input only.  If
.B s
is supplied with no options, it is assigned for output only.
.RE
.RE
.\"
.br
.ne 10
.HP 
.BI v " virtual_address1 virtual_address2 "
.RI [ size "]	(Sun-3 and Sun-4 systems only)"
.br
Display the contents of 
.I virtual_address1 
(lower)
.I virtual_address2
(higher)
in the format specified by
.IR size : 
.RS
.RS
.PD 0
.TP 4
.B b
byte format (the default)
.TP
.B w
word format
.TP
.B l
long word format
.PD
.RE
.RE
.IP
Enter return to pause for viewing; enter another return character 
to resume the display.  To terminate the display at any time, 
press the space bar.
.IP
For example, the following command displays the contents of virtual 
address space from address 0x1000 to 0x2000 in word format:
.RS
.RS
.IP
.B v 1000 2000 W
.RE
.RE
.\"
.br
.ne 10
.HP
.B w\|
.RI [ virtual_address\| ]\|[ argument\| "]	(Sun-3 and Sun-4 systems only)"
.br
Set the execution vector to a predetermined or default routine.
Pass 
.I virtual_address
and
.I argument
to that routine.
.IP
To set up a predetermined routine to jump to, a user program must,
prior to executing the monitor's
.B w
command, set the variable 
.B *romp->v_vector_cmd
to be equal to the virtual address of the desired routine.
Predetermined routines need not necessarily return control
to the monitor.
.IP
The default routine, defined by the monitor, prints the user-supplied
.I vector
according to the format supplied in 
.IR argument .
This format can be one of:
.RS
.RS
.TP 4
.PD 0
.B %x
hexadecimal
.TP
.B %d
decimal
.PD
.RE
.RE
.\"
.TP 
.BR x "	(Sun-3 and Sun-4 systems only)"
Display a menu of extended tests.
These diagnostics permit additional testing of such things as the I/O
port connectors, video memory, workstation memory and
keyboard, and boot device paths.
.\"
.TP
.BI y\|c " context_number	\fR(Sun-4 systems only)"
.PD 0
.TP
.BI y\|p\fR|s\| " context_number virtual_address"
.\"
Flush the indicated context, context page, or context segment.  
.RS
.RS
.TP 3
.B c
.PD 0
flush context
.IR context_number
.TP
.B p
flushe the page beginning at
.I virtual_address
within context
.IR context_number
.TP
.B s
flush the segment beginning at
.I virtual_address
within context
.IR context_number
.PD
.RE
.RE
.\"
.TP
\fBz\fP [\fInumber\fP] [\fIbreakpoint_virtual_address\fP [\fItype\fP] [\fIlen\fP]]  	(Sun386i systems only)
Set or reset breakpoints for debugging.
With no arguments, this command displays the existing breakpoints. 
The
.I number
argument is a values from 0 to 3, corresponding to the processor debug
registers, 
.SB DR0
to
.SM
.BR DR3 ,
respectively.  Up to 4 distinct breakpoints can be specified. 
If
.I number
is not specified then the monitor chooses a breakpoint number. 
The
.I "breakpoint_virtual_address"
argument specifies the breakpoint address.  
The 
.I "type"
argument can be one of:
.RS
.RS
.TP 4
.B x
.PD 0
Instruction Execution breakpoint (the default)
.TP
.B m
for Data Write only breakpoint
.TP
.B r
Data Reads and Writes only breakpoint.
.PD
.RE
.RE
.IP
The
.I "len"
argument can be one of:
.RB ` b ',
.RB ` w ',
or
.RB ` l ',
corresponding to the breakpoint field length of byte, word,
or 
long-word, respectively.  The default is
.RB ` b '.
Since the breakpoints are set in the on-chip registers, an instruction
breakpoint can be placed in
.SM ROM
code or in code shared by several tasks. 
If the 
.I "number"
argument is specified but not
.IR "breakpoint_virtual_address" ,
the corresponding breakpoint is reset.
.\"
.HP 
.B z\|
.RI [ virtual_address "]	(Sun-3 systems only)"
.br
Set a breakpoint at
.I virtual_address
in the address space selected by the
.B s
command.
.SH FILES
.PD 0
.TP 20
.B /vmunix
inning or base of the 
.SM EEPROM
in physical address space, and a limit check is performed to 
insure that no address beyond the
.SM EEPROM
physical space is accessed.  
On Sun386i systems, open the
.SM NVRAM
.I nvram_offset
(default zero).
This command is used to display or modify configuration parameters,
such as: the amount of memory to test during self test,
whether to display a standard or custom banner, 
if a ./share/man/man8/mount.8                                                                               755       0      12        24632  4424741621  10176                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mount.8 1.47 89/03/27 SMI;
.TH MOUNT 8 "24 March 1989"
.SH NAME
mount, umount \- mount and unmount filesystems
.SH SYNOPSIS
.B /usr/etc/mount
[
.B \-p
]
.br
.B /usr/etc/mount
.BR \-a [ fnv ]
[
.B \-t
.I type
]
.br
.B /usr/etc/mount
[
.B \-fnrv
] [
.BI \-t " type"
] [
.BI \-o " options"
]
.I filesystem
.I directory
.br
.B /usr/etc/mount
[
.B \-vfn
] [
.BI \-o " options"
]
.IR filesystem " | " directory
.LP
.B /usr/etc/umount
[
.BI \-t " type"
] [
.BI \-h " host"
]
.br
.B /usr/etc/umount
.BR \-a [ v ]
.br
.B /usr/etc/umount
[
.B \-v
]
.IR filesystem " | " directory "  .\|.\|.
.SH DESCRIPTION
.IX  "mount command"  ""  "\fLmount\fP \(em mount filesystem"
.IX  "mount file system"  ""  "mount file system \(em \fLmount\fP"
.IX  "file system"  "mount"  ""  "mount \(em \fLmount\fP"
.IX  "umount command"  ""  "\fLumount\fP \(em unmount file system"
.IX  "demount file system"  ""  "demount file system \(em \fLumount\fP"
.IX  "file system"  "unmount"  ""  "unmount \(em \fLumount\fP"
.IX  "file system"  "demount"  ""  "demount \(em \fLumount\fP"
.LP
.B mount
attaches a named
.I filesystem
to the filesystem hierarchy at the pathname location
.IR directory ,
which must already exist.
If
.I directory
has any contents prior to the
.B mount
operation, these remain hidden until the
.I filesystem
is once again unmounted.  If
.I filesystem
is of the form
.IB host : pathname\fR,
it is assumed to be an
.SM NFS
filesystem (type
.BR nfs ).
.LP
.B umount
unmounts a currently mounted filesystem, which can be specified
either as a
.IR directory
or a
.IR filesystem .
.LP
.B mount
and
.B umount
maintain a table of mounted filesystems in
.BR /etc/mtab ,
described in
.BR fstab (5).
If invoked without an argument,
.B mount
displays the contents of this table. 
If invoked with either a
.I filesystem
or
.I directory
only, mount searches the file
.B /etc/fstab
for a matching entry, and mounts the filesystem indicated in
that entry on the indicated directory.
.SH "MOUNT OPTIONS"
.TP
.B \-p
Print the list of mounted filesystems in a format suitable for use in
.BR /etc/fstab .
.TP
.B \-a
All.  Attempt to mount all the filesystems described in
.BR /etc/fstab .
If a
.I type
argument is specified with
.BR \-t ,
mount all filesystems of that type.
Using
.BR \-a ,
.B mount
builds a dependency tree of mount points in
.BR /etc/fstab .
.B mount
will correctly mount these filesystems
regardless of their order in
.BR /etc/fstab
(except loopback
mounts; see
.SM WARNINGS
below).
.TP
.B \-f
Fake an
.B /etc/mtab
entry, but do not actually mount any filesystems.
.TP
.B \-n
Mount the filesystem without making an entry in
.BR /etc/mtab .
.TP
.B \-v
Verbose.
Display a message indicating each filesystem being mounted.
.TP
.BI \-t " type"
Specify a filesystem type.
The accepted types are
.BR  4.2 ,
.BR nfs ,
and
.BR lo .
See
.BR fstab (5)
for a description of
.BR  4.2 ,
and
.BR nfs ;
see
.BR lofs (4S)
for a description of
.BR lo .
.TP
.B \-r
Mount the specified filesystem read-only, even if the entry in
.B /etc/fstab
specifies that it is to be mounted read-write.
.IP
Physically write-protected and magnetic-tape
filesystems must be mounted
read-only. Otherwise errors occur when the system attempts to
update access times, even if no write operation is attempted.
.TP
.BI \-o " options"
Specify filesystem
.IR "options " "\(em\c a"
list of comma-separated words from the list below.
Some options are valid for all filesystem types, while others apply
to a specific type only.
.RS
.LP
.I options
valid on
.I all
filesystems:
.RS
.TP 14
.BR rw \||\| ro
Read/write or read-only.
.PD 0
.TP
.BR suid \||\| nosuid
Setuid execution allowed or disallowed.
.TP
.B grpid
Create files with 
.SM BSD 
semantics for the propagation of
the  group
.SM ID\s0.
Under this option, files inherit the 
.SM GID
of the directory in which they are created, regardless of the
directory's set-\s-1GID\s0 bit.
.br
.ne 8
.TP
.B noauto
Do not mount this filesystem that is currently mounted read-only.
If the filesystem is not currently mounted, an error results.
.TP
.B remount
If the file system is currently mounted, and if the entry in
.B /etc/fstab
specifies that it is to be mounted read-write or
.B rw
was specified along with
.BR remount ,
remount the file system making it read-write.
If the entry in
.B /etc/fstab
specifies that it is to be mounted read-only and
.B rw
was not specified, the file system is not remounted.
If the file system is currently mounted read-write,
specifying
.B ro
along with
.B remount
results in an error.
If the file system is not currently mounted, an error results.
.PD
.LP
The default is
.RB ` rw,\|suid '.
.RE
.LP
.I options
specific to
.B 4.2
filesystems:
.RS
.TP 15
.BR quota \||\| noquota
Usage limits are enforced, or are not enforced.
The default is
.BR noquota .
.RE
.LP
.I options
specific to
.B nfs
(\s-1NFS\s0) filesystems:
.RS
.TP 14
.BR bg \||\| fg
If the first attempt fails, retry in the background, or,
in the foreground.
.PD 0
.TP
.BI retry= n
The number of times to retry the mount operation.
.TP
.BI rsize= n
Set the read buffer size to
.I n
bytes.
.TP
.BI wsize= n
Set the write buffer size to
.I n
bytes.
.TP
.BI timeo= n
Set the
.SM NFS
timeout to
.I n
tenths of a second.
.TP
.BI retrans= n
The number of
.SM NFS
retransmissions.
.TP
.BI port= n
The server
.SM IP
port number.
.TP
.BR soft \||\| hard
Return an error if the server does not respond, or continue the
retry request until the server responds.
.TP
.B intr
Allow keyboard interrupts on hard mounts.
.TP
.B secure
Use a more secure protocol for
.SM NFS
transactions.
.TP
.BI acregmin= n
Hold cached attributes for at least
.I n
seconds after file modification.
.TP
.BI acregmax= n
Hold cached attributes for no more than
.I n
seconds after file modification.
.TP
.BI acdirmin= n
Hold cached attributes for at least
.I n
seconds after directory update.
.TP
.BI acdirmax= n
Hold cached attributes for no more than
.I n
seconds after directory update.
.TP
.BI actimeo= n
Set
.I min
and
.I max
times for regular files and directories to
.I n
seconds.
.TP
.B noac
Suppress attribute caching.
.PD
.LP
Regular defaults are:
.RS
.nf
.B fg,retry=10000,timeo=7,retrans=3,port=\s-1NFS_PORT\s0,hard,\e
.B acregmin=3,acregmax=60,acdirmin=30,acdirmax=60
.fi
.RE
.LP
.B actimeo
has no default; it sets 
.BR acregmin ,
.BR acregmax ,
.B acdirmin 
and
.B acdirmax
.LP
Defaults for
.B rsize
and
.B wsize
are set internally by the system kernel.
.PD
.RE
.RE
.SH "UMOUNT OPTIONS"
.TP
.BI \-h " host"
Unmount all filesystems listed in
.B /etc/mtab
that are remote-mounted from
.IR host .
.TP
.BI \-t " type"
Unmount all filesystems listed in
.B /etc/mtab
that are of a given
.IR type .
.TP
.B \-a
Unmount all filesystems currently mounted (as listed in
.BR /etc/mtab ).
.TP
.B \-v
Verbose.
Display a message indicating each filesystem being unmounted.
.SH NFS FILESYSTEMS
.SS Background vs. Foreground
.LP
Filesystems mounted with the
.B bg
option indicate that
.B mount
is to retry in the background if the server's mount daemon
.RB ( mountd (8C))
does not respond.
.B mount
retries the request up to the count specified in the
.BI retry= n
option.  Once the filesystem is mounted, each
.SM NFS
request made in the kernel waits
.BI timeo= n
tenths of a second for a response.
If no response arrives, the
time-out is multiplied by
.B 2
and the request is retransmitted.
When the number of
retransmissions has reached the number specified in the
.BI retrans= n
option, a filesystem mounted with the
.B soft
option returns an error on the request; one mounted with the
.B hard
option prints a warning message and continues to retry the request.
.SS Read-Write vs. Read-Only
.LP
Filesystems that are mounted
.B rw
(read-write) should use the
.B hard
option.
.SS "Interrupting Processes With Pending \s-1NFS\s0 Requests"
.LP
The
.B intr
option allows keyboard interrupts to kill a process that is hung
while waiting for a response on a hard-mounted filesystem.
.SS Secure Filesystems
.LP
The
.B secure
option must be given if the server requires secure
mounting for the filesystem.
.SS "File Attributes"
.LP
The attribute cache retains file attributes on the client.
Attributes for a file are assigned a time to be flushed. 
If the file is modified before the flush time, then the
flush time is extended by the time since the last modification
(under the assumption that files that changed recently are likely
to change soon).
There is a minimum and maximum flush time extension for
regular files and for directories.
Setting
.BI actimeo= n
extends flush time by
.I n
seconds for both regular files and directories.
.SH SYSTEM V COMPATIBILITY
.SS "System V File-Creation Semantics"
.LP
Ordinarily, when a file is created its 
.SM GID
is set to the effective 
.SM GID
of the calling process.
This behavior may be overridden on a per-directory basis,
by setting the set-\s-1GID\s0 bit of the parent directory;
in this case, the 
.SM GID
is set to the 
.SM GID
of the parent directory (see
.BR open (2V)
and
.BR mkdir (2)).
Files created on filesystems that are mounted with the
.B grpid
option will obey 
.SM BSD 
semantics;
that is, the 
.SM GID
is unconditionally inherited from that of the parent directory.
.SH EXAMPLES
.PD 0
.TP 35
To mount a local disk:
.B mount /dev/xy0g /usr
.TP
To fake an entry for \fBnd\fP root:
.B mount \-ft 4.2 /dev/nd0 /
.TP
To mount all 4.2 filesystems:
.B mount \-at 4.2
.TP
To mount an NFS remote filesystem:
.B mount \-t nfs serv:/usr/src /usr/src
.TP
To mount an NFS remote filesystem:
.B mount serv:/usr/src /usr/src
.TP
To hard mount an NFS remote filesystem:
.B mount \-o hard serv:/usr/src /usr/src
.br
.ne 2
.TP
To save current mount state:
.B mount \-p > /etc/fstab
.PD
.SH FILES
.PD 0
.TP 20
.B /etc/mtab
table of mounted filesystems
.TP
.B /etc/fstab
table of filesystems mounted at boot
.PD
.SH WARNINGS
.LP
.BR mount
does not understand the mount order dependencies
involved in loopback mounting.
Loopback mounts may be dependent on
two mounts having been previously performed,
while
.B nfs
and
.B 4.2
mounts are dependent only on
a single previous mount.  As a rule of
thumb, place loopback mounts at the end of
.BR /etc/fstab file .
See
.BR lofs (4S)
for a complete description.
.SH "SEE ALSO"
.BR lofs (4S),
.BR mountd (8C),
.BR nfsd (8),
.BR mkdir (2),
.BR mount (2),
.BR open (2V),
.BR unmount (2),
.BR fstab (5),
.BR mtab (5),
.SH BUGS
.LP
Mounting filesystems full of garbage crashes the system.
.LP
If the directory on which a filesystem is to be mounted is a
symbolic link, the filesystem is mounted on
.I "the directory to which the symbolic link refers,"
rather than being mounted on top of the symbolic link itself.
e
.BR nfs ).
.LP
.B umount
unmounts a currently mounted filesystem, which can be specified
either as a./share/man/man8/mountd.8c                                                                             755       0      12         2416  4424741621  10461                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)mountd.8c 1.19 89/03/27 SMI;
.TH MOUNTD 8C "22 March 1989"
.SH NAME
mountd, rpc.mountd \- NFS mount request server
.SH SYNOPSIS
.B /usr/etc/rpc.mountd 
[
.B \-n 
]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "mountd command"  ""  "\fLmountd\fP \(em NFS mount server"
.IX  "NFS mount server"  ""  "NFS mount server \(em \fLmountd\fP"
.IX  servers  mountd  ""  "\fLmountd\fP \(em mount request server"
.LP
.B mountd
is an
.SM RPC
server that answers file system mount requests.
It reads the file
.BR /etc/xtab,
described in
.BR exports (5),
to determine which file systems are available for mounting by
which machines.  It also provides information
as to what file systems are mounted by which clients.
This information can be printed using the
.BR showmount (8)
command.
.LP
The
.B mountd
daemon is normally invoked by 
.BR rc (8).
.SH OPTIONS
.TP 
.B \-n
Do not check that the clients are root users. Though this option makes
things slightly less secure, it does allow older versions (pre-3.0) of client
NFS to work.
.SH FILES
.PD 0
.TP 20
.B /etc/xtab
.PD
.SH "SEE ALSO"
.BR exports (5),
.BR rc (8),
.BR showmount (8)
.8c   x    rpc.statd.8c          rpc.yppasswdd.8c       !   rpc.ypupdated.8c       "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c 
  
$  '  
rusersd.8c $  
8./share/man/man8/named.8c                                                                              755       0      12        12635  4424741622  10264                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)named.8c 1.26 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH NAMED 8C "25 March 1989"
.SH NAME
named, in.named \- Internet domain name server
.SH SYNOPSIS
.B /usr/etc/in.named
.RB [ " \-d "
.IR level " ]"
.RB [ " \-p "
.IR port " ]"
.RB [\|[ \|\-b\| \|]
.IR bootfile " ]"
.SH DESCRIPTION
.IX  "named command"  ""  "\fLnamed\fP \(em internet domain name server daemon"
.IX  servers  named  ""  "\fLnamed\fP \(em internet domain name server daemon"
.B named
is the Internet domain name server.
It is used by hosts on the
.SM DARPA
Internet to provide access
to the Internet distributed naming database.
See
.SM RFC
1034 and
.SM RFC
1035 for more details.
With no arguments
.B named
reads
.B /etc/named.boot
for any initial data, and listens for queries on a privileged port.
.SH OPTIONS
.TP
.BI \-d " level"
Print debugging information.
.I level
is a number indicating the level of messages printed.
.TP
.BI \-p " port"
Use 
.I port
as the port number, rather than the standard port number.
.TP
.BI \-b " bootfile"
Use
.I bootfile
rather than
.BR /etc/named.boot .
.SH EXAMPLE
.RS
.nf
.ft B
.\" Unfortunately, this is how you have to set tabs every 8 spaces
.ta +8u*\w'\0'u +8u*\w'\0'u +8u*\w'\0'u +8u*\w'\0'u
;
;	boot file for name server
;
; type		domain		source file or host
;
domain		berkeley.edu
primary		berkeley.edu    named.db
secondary	cc.berkeley.edu 10.2.0.78 128.32.0.10
cache		.               named.ca
.DT
.ft P
.fi
.RE
.LP
The
.B domain
line specifies that
.B berkeley.edu
is the domain of the given server, although
this keyword is ignored by the daemon.
.LP
The
.B primary
line states that the file
.B named.db
contains authoritative data for
.BR berkeley.edu .
The file
.B named.db
contains data in the master file format, described in
.SM RFC
1035, except
that all domain names are relative to the origin; in this
case,
.B berkeley.edu
(see below for a more detailed description).
.LP
The
.B secondary
line specifies that all authoritative data
under
.B cc.berkeley.edu
is to be transferred from the name server
at
.BR 10.2.0.78 .
If the transfer fails it will try
.BR 128.32.0.10 ,
and continue for up to 10 tries at that address.
The secondary copy is also authoritative for the domain.
.LP
The
.B cache
line specifies that data in
.B named.ca
is to be placed in
the cache (typically such data as the locations of root domain
servers).  The file
.B named.ca
is in the same format as
.BR named.db .
.LP
The master file consists of entries of the form:
.RS
.BI "$\s-1INCLUDE\s0 <" filename >
.br
.BI "$\s-1ORIGIN\s0 <" domain >
.br
.BI < domain >
.BI < opt_ttl >
.BI < opt_class >
.BI < type > 
.BI < resource_record_data >
.br
.RE
where
.I domain
is
.RB ` . '
for the root,
.RB ` @ '
for the current origin, or a standard domain name.  If
.I domain
is a standard domain name that does not end with
.RB ` . ',
the current origin
is appended to the domain.  Domain names ending with
.RB ` . '
are unmodified.
.LP
The
.I opt_ttl
field is an optional integer number for the time-to-live field.
It defaults to zero.
.LP
The
.I opt_class
field is currently one token,
.RB ` \s-1IN\s0 '
for the Internet.
.LP
The
.I type
field is one of the following tokens; the data expected in the
.I resource_record_data
field is in parentheses.
.TP
.B A
A host address (dotted quad).
.TP
.SB NS
An authoritative name server (domain).
.TP
.SB MX
A mail exchanger (domain).
.TP
.SB CNAME
The canonical name for an alias (domain).
.TP
.SB SOA
Marks the start of a zone of authority (5 numbers).
(see
.SM RFC
1035)).
.TP
.SB MB
A mailbox domain name (domain).
.TP
.SB MG
A mail group member (domain).
.TP
.SB MR
A mail rename domain name (domain).
.TP
.SB NULL
A null resource record (no format or data).
.TP
.SB WKS
A well know service description (not implemented yet).
.TP
.SB PTR
A domain name pointer (domain).
.TP
.SB HINFO
Host information (cpu_type OS_type).
.TP
.SB MINFO
Mailbox or mail list information (request_domain error_domain).
.SH FILES
.PD 0
.TP 20
.B /etc/named.boot
name server configuration boot file
.TP
.B /etc/named.pid
the process
.SM ID
.TP
.B /var/tmp/named.run
debug output
.TP
.B /var/tmp/named_dump.db
dump of the name servers database
.PD
.SH "SEE ALSO"
.BR kill (1),
.BR signal (3),
.BR resolver (3),
.BR resolve.conf (5)
.LP
Mockapetris, Paul,
.IR "Domain Names - Concepts and Facilities" ,
.SM RFC
1034,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
November 1987.
.LP
Mockapetris, Paul,
.IR "Domain Names - Implementation and Specification" ,
.SM RFC
1035,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
November 1987.
.LP
Mockapetris, Paul,
.IR "Domain System Changes and Observations" ,
.SM RFC
973,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
January 1986.
.LP
Partridge, Craig,
.IR "Mail Routing and the Domain System" ,
.SM RFC
974,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
January 1986.
.SH NOTES
The following signals have the specified effect when sent to the
server process using the
.BR kill (1)
command.
.TP \w'SIGQUIT'u
.SB SIGHUP
Causes server to read named.boot and reload database.
.TP
.SB SIGQUIT
Dumps current data base and cache to
.BR /var/tmp/named_dump.db .
.TP
.SB SIGEMT
Turns on debugging; each subsequent
.SB SIGEMT
increments debug level.
.TP
.SB SIGFPE
Turns off debugging completely.
 protocol for
.SM NFS
transactions.
.TP
.BI acregmin= n
Hold cached attributes for at least
.I n
se./share/man/man8/ncheck.8                                                                              755       0      12         2271  4424741622  10243                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ncheck.8 1.12 89/03/27 SMI; from UCB 4.2
.TH NCHECK 8  "22 March 1989"
.SH NAME
ncheck \- generate names from i-numbers
.SH SYNOPSIS
.B /usr/etc/ncheck
[
.B \-i
.I numbers
]  [
.B \-as
]  [
.I filesystem
]
.SH DESCRIPTION
.IX  "ncheck command"  ""  "\fLncheck\fP \(em convert i-numbers to filenames"
.TP
Note:
For most normal file system maintenance, the function of
.B ncheck
is subsumed by
.BR fsck (8).
.LP
.B ncheck
generates a pathname versus i-number list of files for the indicated
.IR filesystem .
Names of directory files are followed
by
.RB ` . '
.LP
The report is in no useful order, and probably should be sorted.
.SH OPTIONS
.TP
.BI \-i " numbers"
Report only those files whose i-\fInumbers\fP
follow.
.TP
.B \-a
Print the names
.RB ` . '
and
.RB ` .\|. ',
which are ordinarily suppressed.
.TP
.B \-s
Report only special files and files with set-user-\s-1ID\s0 mode.
This is intended to discover concealed violations of security policy.
.SH "SEE ALSO"
.BR sort (1V),
.BR dcheck (8),
.BR fsck (8),
.BR icheck (8)
.SH DIAGNOSTICS
When the filesystem structure is improper,
.RB ` ?? '
denotes the ``parent'' of
a parentless file and a pathname beginning with
.RB ` .\|.\|. '
denotes a loop.
pc.rwalld.8c H  `    
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c !    #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c    
L  )  rwhod.8c   $  
\./share/man/man8/ndbootd.8c                                                                            755       0      12         2735  4424741622  10611                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ndbootd.8c 1.9 89/03/27 SMI;
.TH NDBOOTD 8C  "10 September 1986"
.SH NAME
ndbootd \- ND boot block server
.SH SYNOPSIS
.B ndbootd
[
.B \-dv
] 
.SH DESCRIPTION
.IX "ndbootd daemon" "" "\fLndbootd\fP daemon"
.LP
.B ndbootd
sends boot blocks to diskless Sun-2 system clients that
request them using the (now obsolete)
.SM ND
protocol.  This server
uses the boot block contained in the file
.BR /tftpboot/sun2.bb .
A client must appear in the
.BR ethers (5)
and
.BR hosts (5)
databases, in order for the request to be served.
In determining whether to serve the client,
.B ndbootd
checks the
.B /tftpboot
directory for a file whose
name is the client's
.SM IP
address in hexadecimal notation.
For example, if the file
.B /tftpboot/C00901\s-1AD\s0
exists, the machine at
.SM IP
address 192.9.1.173 can be served.  This file
normally contains the boot program that is sent to the client by
.BR tftpd (8C).
.LP
Only root can invoke
.BR ndbootd .
.SH OPTIONS
.TP
.B \-d
Debug.  Display information about ignored packets, retransmissions,
and address translation.
.TP
.B \-v
Verbose.  Show a detailed listing of packets sent and received, etc.
.LP
If either option is used, all output is sent to the invoking
terminal.  Otherwise, error output (if any) appears on the console.
.SH FILES
.PD 0
.TP 20
.B /tftpboot
bootfiles directory
.TP
.B /tftpboot/sun2.bb
boot blocks
.TP
.B /tftpboot/????????
boot programs for clients
.PD
.SH "SEE ALSO"
.BR ethers (5),
.BR hosts (5),
.BR boot (8S),
.BR tftpd (8C)
.8c     
\  *  sa.8 .8c  
p  +./share/man/man8/netconfig.8c                                                                          755       0      12         5367  4424741622  11140                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)netconfig.8c	1.11 89/03/27 SMI;
.TH NETCONFIG 8C "22 March 1989"
.SH NAME
netconfig \- PNP boot service
.SH SYNOPSIS 
.B /single/netconfig 
[
.B \-e 
]
[
.B \-n
]
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "netconfig" "" "\fLnetconfig\fP \(em pnp diskful boot service"
.LP
.B netconfig
is used both for automatic installation of new diskful systems, 
and during routine booting of all
systems.  The sequence of actions taken by 
.B netconfig
depends on which of these situations is in effect, but
it always sets the hostname, domainname, time, timezone, and interface
IP address. If the system is newly installed on the network, it does more,
perhaps interrogating the user about system configuration.
.LP
.B netconfig
is invoked with the
.B \-e
option from the 
.B /etc/rc.boot
script.
.LP
Invoked without options, 
.B netconfig
may perform 
.SM PNP 
set up, including set up of files, passwords, and secure
.SM RPC\s0s.
Unless 
.B \-n 
is specified, it writes 
.BR /etc/net.conf ,
which is read later by
.BR rc.boot . 
This includes the 
.SB VERBOSE 
flag, derived from 
.SB NVRAM
data, which controls the verbosity of the commands in
.BR rc.boot . 
.SS "Routine Booting"
.LP
Boot servers use information stored locally in
.SM YP
maps rather than 
acquiring it over the network, except that they get the time from the
.I timehost
system if it is up. The following describes the steps taken by boot clients:
diskful clients, diskless clients, and network clients.
.LP
Boot clients first invoke
.B rarp
to acquire an
.SM IP 
address.  This is followed by a
.SB ICMP
.B Netmask
request to obtain the
.SM IP
subnetwork mask, and then a
.SB PNP_WHOAMI
.SM RPC
to determine the system's name,
.SM YP
domain, and time zone.  
Then the systems clock is set using the
.SM RFC
868 time service.
If
.SB PNP_WHOAMI
fails, a 
.SB PNP_SETUP
sequence is followed by set up of 
.B /etc/passwd
and other files.
.SH OPTIONS
.TP
.B \-e
Check shell environment variables. This option is specified during routine
boot.  
.SB HOSTNAME
and 
.SB DOMAINNAME
are used to determine if the system
is a 
.SM YP
server using local 
.SM YP
maps. Otherwise, if 
.SB NETWORKED 
is
.BR \s-1YES\s0 , 
.B netconfig
probes the network for network configuration. 
.SB MUST_SETUP
requires writing
.B /etc/passwd
and other files for setup in restricted network environments.
.TP
.B \-n
Used in conjunction with 
.RB ` \-e ',
this does not probe the
network for anything but just sets the hostname and domainname
of the system from the environment variables
.SB HOSTNAME
and
.SB DOMAINNAME
respectively.  Does not write the 
.B /etc/net.conf 
file.
.SH FILES
.PD 0
.TP
.B /var/yp/\fIdomainname\fP/netmasks
.TP
.B /var/yp/\fIdomainname\fP/hosts
.PD
.SH SEE ALSO
.BR pnpboot (8C),
.BR pnpd (8C),
.BR rarpd (8C)
.BR pnp (3R)
rce_record_data >
.br
.RE
where
.I domain
is
.RB ` . '
for the root,
.RB ` @ '
for the current origin, or a standard domain name.  If
.I domain
is a standard domain name that does not end with
.RB ` . ',
the current origin
is appended to the domain.  Domain names e./share/man/man8/netstat.8c                                                                            755       0      12        15637  4424741622  10667                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)netstat.8c 1.20 89/03/27 SMI; from UCB 6.5 5/8/86
.\"
.TH NETSTAT 8C "22 March 1989"
.SH NAME
netstat \- show network status
.SH SYNOPSIS
.B netstat
[
.B \-aAn
] [
.B \-f
.I address_family
] [
.B system
] [
.B core
]
.LP
.B netstat
[
.B \-n
] [
.B \-s
] [
.BR \-m " |"
.BR \-i " |"
.B  \-r
] [
.B \-f
.I address_family
] [
.B system
] [
.B core
]
.LP
.B netstat
[
.B \-n
] [
.B \-I
.I interface
]
.I interval
[
.B system
] [
.B core
]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "netstat command"  ""  "\fLnetstat\fP \(em display network status"
.IX  "network status, display \(em \fLnetstat\fP"
.IX  "status of network, display"  ""  "status of network, display \(em \fLnetstat\fR"
.LP
.B netstat
displays the contents of various network-related data structures
in various formats, depending on the options you select.
.LP
The first form of the command displays a list of active sockets for
each protocol.  The second form selects one from among various
other network data structures.  The third form displays running
statistics of packet traffic on configured network interfaces;
the
.I interval
argument indicates the number of seconds in which to gather
statistics between displays.
.LP
The default value for the
.B system
argument is
.BR /vmunix ;
for
.IR core ,
the default is
.BR /dev/kmem .
.SH OPTIONS
.TP 15
.B \-a
Show the state of all sockets; normally
sockets used by server processes are not shown.
.TP
.B \-A
Show the address of any protocol control
blocks associated with sockets; used for debugging.
.TP
.BI \-f " address_family"
Limit statistics or address control block reports to those of the
specified
.IR address_family ,
which can be one of:
.RS
.RS
.TP 8
.B inet
.PD 0
For the
.SM
AF_INET
address family, or
.\".TP
.\".IR ns ,
.\".BR AF_NS ,
.TP
.B unix
For the
.SM AF_UNIX
family.
.PD
.RE
.RE
.TP
.B \-i
Show the state of interfaces that have been auto-configured.
Interfaces that are statically configured into a system, but
not located at boot time, are not shown.
.TP
.BI \-I " interface"
Highlight information about the indicated
.IR interface
in a separate column; the default (for the third form of the
command) is the interface with the most traffic since the
system was last rebooted.
.I interface
can be any valid interface listed in the system configuration file,
such as
.B ie0
or
.BR le0 .
.TP
.B \-m
Show the statistics recorded by management routines for the
network's private buffer pool.
.TP
.B \-n
Show network addresses as numbers.
.B netstat
normally displays addresses as
symbols.  This option may be used with any of the display formats.
.TP
.B \-r
Show the routing tables.  (When
.B \-s
is also present, show routing statistics instead.)
.TP
.B \-s
Show per-protocol statistics.  When used with the
.B \-r
option, show routing statistics.
.TP
.B \-t
Replace queue length information with timer information.
.SH DISPLAYS
.SS "Active Sockets (First Form)"
.LP
The display for each active socket shows the local and remote address,
the send and receive queue sizes (in bytes),
the protocol, and the internal state of the protocol.
.LP
The symbolic format normally used to
display socket addresses is either:
.IP
.IB hostname .\c
.IR \|port
.LP
when the name of the host is specified, or:
.IP
.IB network .\c
.IR \|port
.LP
if a socket address specifies a network but no specific host.
Each
.I hostname
and
.I network
is shown according to its entry in the
.B /etc/hosts
or the
.B /etc/networks
file, as appropriate.
.LP
If the network or hostname for an address is not known (or if the
.B \-n
option is specified), the numerical network address is shown.
Unspecified, or ``wildcard'', addresses and ports appear as ``*''.
(For more information regarding the Internet naming conventions,
refer to
.BR inet (3N)\|).
.SS "\fI\s-1TCP\s0 Sockets"
.LP
The possible state values for
.SM TCP
sockets are as follows:
.RS
.TP 20
.SB CLOSED
Closed: the socket is not being used.
.PD 0
.TP
.SB LISTEN
Listening for incoming connections.
.TP
.SB SYN_SENT
Actively trying to establish connection.
.TP
.SB SYN_RECEIVED
Initial synchronization of the connection under way.
.TP
.SB ESTABLISHED
Connection has been established.
.TP
.SB CLOSE_WAIT
Remote shut down: waiting for the socket to close.
.TP
.SB FIN_WAIT_1
Socket closed, shutting down connection.
.TP
.SB CLOSING
Closed, then remote shutdown: awaiting acknowledgement.
.TP
.SB LAST_ACK
Remote shut down, then closed: awaiting acknowledgement.
.TP
.SB FIN_WAIT_2
Socket closed, waiting for shutdown from remote.
.TP
.SB TIME_WAIT
Wait after close for remote shutdown retransmission.
.PD
.RE
.SS "Network Data Structures (Second Form)"
.LP
The form of the display depends upon which of the
.BR \-m ,
.BR \-i ,
.BR \-h
or
.BR \-r ,
options you select.  (If you specify more than one of these options,
.B netstat
selects one in the order listed here.)
.SS "\fIRouting Table Display"
.LP
The routing table display lists the available routes and the status
of each.  Each route consists of a destination host or network,
and a gateway to use in forwarding packets.  The
.I flags
column shows the status of the route
.RB ( U
if ``up''),
whether the route is to a gateway
.RB ( G ),
and whether the route was created dynamically by a redirect
.RB ( D ).
.LP
Direct routes are created for each
interface attached to the local host;
the gateway field for such entries shows the address of the outgoing
interface.
.LP
The
.B refcnt
column gives the current number of active uses per route.
(Connection-oriented protocols normally hold on to a single route
for the duration of a connection,
whereas connectionless protocols obtain a route while sending
to the same destination.)
.LP
The
.B use
column displays the number of packets sent per route.
.LP
The
.I interface
entry indicates the network interface utilized for the route.
.SS "Cumulative Traffic Statistics (Third Form)"
.LP
When the
.I interval
argument is given,
.B netstat
displays a table of
cumulative statistics regarding packets transferred, errors and
collisions, the network addresses for the interface, and the maximum
transmission unit (``mtu'').
The first line of data displayed, and every 24th line thereafter,
contains cumulative statistics from the time the system was last
rebooted.  Each subsequent line shows incremental statistics for the
.I interval
(specified on the command line) since the previous display.
.SH "SEE ALSO"
.BR iostat (8),
.BR trpt (8C),
.BR vmstat (8),
.BR hosts (5),
.BR networks (5),
.BR protocols (5),
.BR services (5)
.SH BUGS
The notion of errors is ill-defined.
Collisions mean something else for the
.SM IMP\s0.
.LP
The kernel's tables can change while
.B netstat
is examining them, creating incorrect or partial displays.

1034,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
November 1987.
.LP
./share/man/man8/newaliases.8                                                                          755       0      12         1476  4424741623  11152                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)newaliases.8 1.12 89/03/27 SMI; from UCB 4.1
.TH NEWALIASES 8 "9 September 1987"
.SH NAME
newaliases \- rebuild the data base for the mail aliases file
.SH SYNOPSIS
.B newaliases
.SH DESCRIPTION
.IX  "newaliases command"  ""  "\fLnewaliases\fP \(em make mail aliases database"
.IX  "create" "mail aliases database \(em \fLnewaliases\fP"
.IX  "mail utilities" "create aliases database \(em \fLnewaliases\fP" "\fLmail\fR utilities"
.B newaliases
rebuilds the random access data base for the mail aliases file
.BR /etc/aliases .
It is run automatically by
.BR sendmail (8)
(in the default configuration) whenever a message is sent.
.\" It must be run each time \fI/etc/aliases\fP is changed in order
.\" for the change to take effect.
.SH FILES
.PD 0
.TP 20
.B /etc/aliases
.PD
.SH SEE ALSO
.BR aliases (5),
.BR sendmail (8)
8c c 8  \    rmt.8c c  p    route.8c c i      	routed.8c t.      
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        ./share/man/man8/newfs.8                                                                               755       0      12         6677  4424741623  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)newfs.8 1.24 89/03/27 SMI; from UCB 4.3 BSD
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH NEWFS 8 "22 March 1989"
.SH NAME
newfs \- construct a new file system
.SH SYNOPSIS
.B /usr/etc/newfs
[
.B \-Nv
] [
.I mkfs-options
]
.I block-special-file
.SH DESCRIPTION
.IX  "newfs command"  ""  "\fLnewfs\fP \(em make new file system"
.IX  make "new file system \(em \fLnewfs\fP"
.IX  "create" "new file system \(em \fLnewfs\fP"
.IX  "file system"  "create new"  ""  "create new \(em \fLnewfs\fP"
.B newfs
is a \(lqfriendly\(rq front-end to the
.BR mkfs (8)
program.
On Sun systems, the disk type is
determined by reading the disk label for the specified
.IR block-special-file .
.LP
.I block-special-file
is the name of a
block special device residing in
.BR /dev .
If you want to make a file system on
.BR sd0 ,
you can specify
.B sd0
.B rsd0
or
.BR /dev/rsd0 ;
if you only specify
.BR sd0 ,
.B newfs
will find the proper device.
.LP
.B newfs
then calculates the appropriate parameters to use in calling
.BR mkfs ,
builds the file system by forking
.B mkfs.
.SH OPTIONS
.LP
.TP
.B \-N
Print out the file system parameters
without actually creating the file system.
.TP
.B \-v
Verbose.
.B newfs
prints out its actions, including the parameters passed to
.BR mkfs .
.TP
.I mkfs-options
Options that override the default parameters passed to
.BR mkfs (8)
are:
.RS
.TP
.BI \-b \ block-size
The block size of the file system in bytes.
.TP
.BI \-c \ #cylinders/group
The number of cylinders per cylinder group in a file system.
The default value used is 16.
.TP
.BI \-d \ rotdelay
This specifies the expected time (in milliseconds)
to service a transfer completion
interrupt and initiate a new transfer on the same disk.
It is used to decide how much rotational spacing to place between
successive blocks in a file.
.TP
.BI \-f \ frag-size
The fragment size of the file system in bytes.
.TP
.BI \-i \ bytes/inode
This specifies the density of inodes in the file system.
The default is to create an inode for each 2048 bytes of data space.
If fewer inodes are desired, a larger number should be used;
to create more inodes a smaller number should be given.
.TP
.BI \-m \ free-space%
The percentage of space reserved from normal users; the minimum
free space threshold.  The default value used is 10%.
.TP
.BI \-o \ optimization
.RB ( space
or
.BR time ).
The file system can either be instructed to try to minimize the time spent
allocating blocks, or to try to minimize the space fragmentation on the disk.
If the minimum free space threshold (as specified by the
.B \-m
option) is less than 10%,
the default is to optimize for space;
if the minimum free space threshold is greater than or equal to 10%,
the default is to optimize for time.
.TP
.BI \-r \ revolutions/minute
The speed of the disk in revolutions per minute (normally 3600).
.TP
.BI \-s \ size
The size of the file system in sectors.
.br
.ne 8
.TP
.BI \-t \ #tracks/cylinder
The number of tracks per cylinders on the disk.
.RE
.SH FILES
.\"/etc/disktab	for disk geometry and file partition information (VAX only)
.\".br
.PD 0
.TP 20
.B /usr/etc/mkfs
to actually build the file system
.PD
.SH "SEE ALSO"
.BR fs (5),
.BR installboot(8S),
.BR fsck (8),
.BR mkfs (8),
.BR tunefs (8)
.LP
.TX ADMIN
.SH NOTES
To install the bootstrap programs for a root partition, one has to run
.BR installboot(8S)
after newfs.

 per route.
.LP
The
.I interface
entry indicates the network inte./share/man/man8/newkey.8                                                                              755       0      12         2205  4424741623  10310                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)newkey.8 1.7 89/03/27 SMI;
.TH NEWKEY 8 "12 October 1987"
.SH NAME
newkey \- create a new key in the publickey database
.SH SYNOPSIS
.B newkey 
.RB [ " \-h "
.IR hostname " ] "
.RB [ " \-u "
.IR username " ] "
.SH DESCRIPTION
.IX "newkey command" "" "\fLnewkey\fP command"
.B newkey 
is normally run by the network administrator on the YP master
machine in order to establish public keys for users and super-users on 
the network. These keys are needed for using secure RPC or secure NFS.
.LP
.B newkey
will prompt for the login password of the given username and then
create a new public/secret key pair in 
.B /etc/publickey
encrypted with the login password of the given user.
.LP
Use of this program is
not required: users may create their own keys using 
.B chkey (1).
.SH OPTIONS
.TP
.B \-u
.I username
Create a new public key for the given username. Prompts for the Yellow
Pages password of the given username.
.TP
.B \-h
.I hostname
Create a new public key for the super-user at the given hostname. Prompts
for the root password of the given hostname.
.SH "SEE ALSO"
.BR keylogin(1),
.BR chkey(1),
.BR publickey(5),
.BR keyserv(8)










.8c       !   rpc.ypupdated.8c       "  
rpcinfo.8c     #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c 
  
$  '  
rusersd.8c $  
8  (  	rwalld.8c 
8  
L  )  rwhod.8c  
L  
\  *  sa.8 d.8  
p  +  
savecore.8 p  
  ,  
sendmail.8   
  -  setup_client.8 -  
  .  setup_exec.8  .  
  /  showmount.8   
./share/man/man8/nfsd.8                                                                                755       0      12         2700  4424741623   7740                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nfsd.8 1.17 89/03/27 SMI;
.TH NFSD 8 "9 September 1987"
.SH NAME
nfsd, biod \- NFS daemons
.SH SYNOPSIS
.B /usr/etc/nfsd
.RI [ nservers ]
.LP
.B /usr/etc/biod
.RI [ nservers ]
.SH DESCRIPTION
.IX  "network file system"  "nfsd daemon"  ""  "\fLnfsd\fP daemon"
.IX  "network file system"  "biod daemon"  ""  "\fLbiod\fP daemon"
.IX  "nfsd daemon"  ""  "\fLnfsd\fP daemon"
.IX  "biod daemon"  ""  "\fLbiod\fP daemon"
.IX  "daemons"  "nfsd daemon"  ""  "\fLnfsd\fP daemon"
.IX  "daemons"  "biod daemon"  ""  "\fLbiod\fP daemon"
.B nfsd
starts the daemons that handle client filesystem requests.
.I nservers
is the number of file system request daemons to start.
This number should be based on the load
expected on this server.  Four seems to be a good number.
.LP
.B biod
starts
.I nservers
asynchronous block
.SM I/O
daemons.  This command is used on a
.SM NFS
client to buffer cache handle read-ahead
and write-behind.  The magic number for
.I nservers
in here is also four.
.LP
When a file that is opened by a client is unlinked (by the
server), a file with a name of the form
.BI  .nfs \s-1XXX\s0
(where
.I \s-1XXX\s0
is a number) is created by the client.
When the open file is closed, the
.BI .nfs \s-1XXX\s0
file is removed.  If the client crashes before the file can be closed,
the
.BI .nfs \s-1XXX\s0
file is not removed.
.SH FILES
.TP 20
.BI .nfs \s-1XXX\s0
client machine pointer to an open-but-unlinked file
.SH "SEE ALSO"
.BR exports (5),
.BR mountd (8C)
p_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
./share/man/man8/nfsstat.8c                                                                            755       0      12         6000  4424741623  10630                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nfsstat.8c 1.22 89/03/27 SMI;
.TH NFSSTAT 8C "25 March 1989"
.SH NAME
nfsstat \- Network File System statistics
.SH SYNOPSIS
.B nfsstat
[
.B \-csnrz
]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "nfsstat command"  ""  "\fLnfsstat\fP \(em display network statistics"
.IX  "NFS statistics, display \(em \fLnfsstat\fP"
.IX  "statistics of NFS, display \(em \fLnfsstat\fP"
.B nfsstat
displays statistical information about the
.SM NFS
(Network File System) and
.SM RPC
(Remote Procedure Call), interfaces to the kernel.
It can also be used to reinitialize this information.
If no options are given the default is
.IP
.B nfsstat \-cnrs
.LP
That is, display everything, but reinitialize nothing.
.SH OPTIONS
.TP
.B \-c
Display client information.
Only the client side
.SM NFS
and
.SM RPC
information will be printed.
Can be combined with the
.B \-n
and
.B \-r
options to print client
.SM NFS
or client
.SM RPC
information only.
.TP
.B \-s
Display server information.
.TP
.B \-n
Display
.SM NFS
information.
.SM NFS
information for both the client and server side will be printed.
Can be combined with the
.B \-c
and
.B \-s
options to print client or server
.SM NFS
information only.
.TP
.B \-r
Display
.SM RPC
information.
.TP
.B \-z
Zero (reinitialize) statistics.
This option is for use by the super-user only, and
can be combined with any of the above options to
zero particular sets of statistics after printing them.
.SH DISPLAYS
.LP
The server
.SM RPC
display includes the fields:
.RS
.TP 10
.B calls
.PD 0
total number of
.SM RPC
calls received
.PD
.TP
.B badcalls
total number of calls rejected
.TP
.B nullrecv
number of times no
.SM RPC
packet was available when trying to receive
.TP
.B badlen
number of packets that were too short
.TP
.B xdrcall
number of packets that had a malformed header
.RE
.LP
The server
.SM NFS
display shows the number of 
.SM NFS
calls received 
.RB ( calls )
and rejected
.RB ( badcalls ),
and the counts and percentages for the various calls that were
made.
.LP
The client 
.SM RPC
display includes the following fields:
.RS
.TP 10
.B calls
.PD 0
total number of 
.SM RPC
calls sent
.TP
.B badcalls
total of calls rejected by a server
.TP
.B retrans
number of times a call had to be retransmitted
.TP
.B badxid
number of times a reply did not match the call
.TP
.B timeout
number of times a call timed out
.TP
.B wait
number of times a call had to wait on a busy
.SB CLIENT
handle
.TP
.B newcred
number of times authentication information had to be refreshed
.PD
.RE
.LP
The client
.SM NFS
display shows the number of calls sent and rejected, as well
as the number of times a
.SB CLIENT
handle was received
.RB ( nclget ),
the number of times a call had to sleep while awaiting a
handle
.RB ( nclsleep ),
as well as a count of the various calls and their respective
percentages.
.SH FILES
.PD 0
.TP 20
.B /vmunix
system namelist
.TP
.B /dev/kmem
kernel memory
.PD
./share/man/man8/nslookup.8c                                                                           755       0      12        21064  4424741624  11050                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)nslookup.8c 1.12 89/03/27 SMI; from UCB
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH NSLOOKUP 8C "22 March 1989"
.SH NAME
nslookup \- query name servers interactively
.SH SYNOPSIS
.B nslookup
[
.B \-l
] [
.I address
]
.SH DESCRIPTION
.IX "nslookup command" "" "\fLnslookup\fP command"
.B nslookup
is an interactive program to query
.SM ARPA
Internet domain name servers. The user can contact servers to
request information about a specific host or print
a list of hosts in the domain.
.SH OPTIONS
.TP 9
.B \-l
Use the local host's name server instead of the servers in
.BR /etc/resolve.conf .
(If
.B /etc/resolve.conf
does not exist or does not contain server information, the
.B \-l
option does not have any effect).
.TP 9
.I address
Use the name server on the host machine
with the given Internet address.
.SH USAGE
.SS Overview
The Internet domain name-space is tree-structured, with four
top-level domains at present:
.RS
.TP
.SB COM
commercial establishments
.PD 0
.TP
.SB EDU
educational institutions
.TP
.SB GOV
government agencies
.TP
.SB MIL
.SB MILNET
hosts
.PD
.RE
.LP
If you are looking for a specific host,
you need to know something about the host's organization
in order to determine the top-level domain it belongs to.
For instance, if you want to find the Internet address of a machine at
.SM UCLA\s0,
do the following:
.TP
\(bu
Connect with the root server using the
.B root
command.
The root server of the name space has knowledge of the top-level
domains.
.TP
\(bu
Since
.SM UCLA
is a university, its domain name is
.BR ucla.edu .
Connect with a server for the
.B ucla.edu
domain with the command
.BR server ucla.edu .
The response will print
the names of hosts that act as servers for that domain.
Note: the root server does not have information about
.BR ucla.edu ,
but knows the names and addresses of hosts that do.
Once located by the root server,
all future queries will be sent to the
.SM UCLA
name server.
.TP
\(bu
To request information about a particular host in the domain
(for instance,
.BR locus ),
just type the host name.
To request a listing of hosts in the
.SM UCLA
domain, use the
.B ls
command.
The
.B ls
command requires a domain name (in this case,
.BR ucla.edu )
as an argument.
.LP
Note: if you are connected with a name server that handles
more than one domain, all lookups for
host names must be fully specified with its domain.
For instance, the domain
.B harvard.edu
is served by
.BR seismo.css.gov ,
which also services the
.B css.gov
and
.B cornell.edu
domains. A lookup request for the host
.B aiken
in the
.B harvard.edu
domain must be specified as
.BR aiken.harvard.edu .
However, the
.IP
.BI set " domain" =\|name
.LP
and
.IP
.B set defname
.LP
commands can be used to automatically
append a domain name to each request.
.LP
After a successful lookup of a host, use the
.B finger
command to
see who is on the system, or to finger a specific person.
To get other information about the host, use the
.IP
.BI set " querytype" =\|value
.LP
command to change the type of information desired and request another
lookup.
.RB ( finger
requires the type to be A.)
.SS Commands
Commands may be interrupted at any time by typing
\s-1CTRL-C\s0.
To exit, type
.SM CTRL-D
(EOF).
The command line length must be less than 80 characters.
Note: an unrecognized command will be interpreted as a host name.
.TP
\fIhost\fP [\fIserver\fP]
Look up information for
.I host
using the current default server or using
.I server
if it is specified.
.
.ne 5
.TP
.BI server " domain"
.ns
.TP
.BI lserver " domain"
Change the default server to
.IR domain .
.B lserver
uses the initial server to look up
information about
.I domain
while
.B server
uses the current default server.
If an authoritative answer can't be found, the names of servers
that might have the answer are returned.
.
.TP
.B root
Changes the default server to the server
for the root of the domain name space.
Currently, the host
.B sri-nic.arpa
is used; this command is a synonym for
.RB ` "lserver sri-nic.arpa" '.)
The name of the root server can be changed with the
.B set root
command.
.
.TP
.BI "finger [ " name ]
Connect with the finger server on the current host, which
is defined by a previous successful lookup for a host's
address information (see the
.BI set " querytype" =\|A
command).
As with the shell, output can be redirected to a named file
using
.B >
and
.BR >> .
.
.TP \fIdomain\fR
"\fBls \fR[\fB\-ah\fR]
List the information available for
.IR domain .
The default output contains host names
and their Internet addresses.  The
.B \-a
option lists aliases of hosts in the domain.  The
.B \-h
option lists
.SM CPU
and operating system information for the domain.
As with the shell, output can be redirected to a named file
using
.B >
and
.BR >> .
When output is directed to a file, hash marks are printed for every
50 records received from the server.
.TP
.BI view\fP  filename
Sort and list the output of the
.B ls
command with
.BR more (1).
.TP
.B help
.ns
.TP
.B ?
Print a brief summary of commands.
.HP
.BI set keyword
[
.BI = " value"
]
This command is used to change state
information that affects the lookups.
Valid keywords are:
.RS
.TP
.B all
Prints the current values of the various options to
.BR set .
Information about the  current default
server and host is also printed.
.HP
.RB [ no ] deb\c
.RB [ ug ]
.br
Turn debugging mode on. A lot more information is printed about the
packet sent to the server and the resulting answer.
The default is
.BR nodebug .
.HP
.RB [ no ] def\c
.RB [ name ]
.br
Append the default domain name to every lookup.
The default is
.BR nodefname.
.HP
.BR do [ main ] =\c
.I filename
.br
Change the default domain name to
.IR filename .
The default domain name is appended to all lookup requests if
.B defname
option has been set.
The default is the value in
.BR /etc/resolve.conf .
.HP
.BR q [ querytype ] =\c
.I value
.br
Change the type of information returned from a query to one of:
.RS
.TP 7
A
.PD 0
The host's Internet address (the default).
.TP
.SM \fBCNAME\fR
The canonical name for an alias.
.TP
.SM \fBHINFO\fR
The host
.SM CPU
and operating system type.
.TP
.SM \fBMD\fR
The mail destination.
.TP
.SM \fBMX\fR
The mail exchanger.
.TP
.SM \fBMB\fR
The mailbox domain name.
.TP
.SM \fBMG\fR
The mail group member.
.TP
.SM \fBMINFO\fR
The mailbox or mail list information.
.PD
.RE
.IP
(Other types specified in the
.SM RFC\s0883
document are valid, but are not
very useful.)
.HP
.RB [ no ] rec\c
.RB urse
.br
Tell the name server to query other servers if it does not have the
information.
The default is
.BR recurse .
.HP
.BR ret [ ry ] =\c
.I count
.br
Set the number of times to retry a request before giving up to
.IR count .
When a reply to a request is not received within a certain
amount of time (changed with
\fBset timeout\fP),
the request is resent.  The default is
.I count
is
.BR 2 .
.HP
.BR ro [ ot ] =\c
.I host
.br
Change the name of the root server to
.IR host .
This
affects the
.B root
command.  The default root server is
.BR sri-nic.arpa .
.HP
.BR t [ timeout ] =\c
.I interval
.br
Change the time-out for a reply to
.I interval
seconds.
The default
.I interval is
.B 10
seconds.
.HP
.RB [ no ] v\c
.RB [ c ]
.br
Always use a virtual circuit when sending requests to the server.
The default is
.BR novc .
.RE
.SH DIAGNOSTICS
If the lookup request was not successful, an error message is printed.
Possible errors are:
.TP
.B Time-out
The server did not respond to a request after a certain amount of
time (changed with
.BI set " timeout" =\|value\fR)
and a certain number of retries (changed with
.BI set " retry" =\|value\fR).
.TP
.B No information
Depending on the query type set with the
.B set querytype
command,
no information about the host was available, though the host name is
valid.
.TP
.B Non-existent domain
The host or domain name does not exist.
.TP
.B Connection refused
.ns
.TP
.B Network is unreachable
The connection to the name or finger server could not be made
at the current time.
This error commonly occurs with
.B finger
requests.
.TP
.B Server failure
The name server found an internal inconsistency in its database
and could not return a valid answer.
.TP
.B Refused
The name server refused to service the request.
.sp 1
.LP
The following error should not occur and
it indicates a bug in the program.
.TP
.B Format error
The name server found that the request
packet was not in the proper format.
.SH FILES
.PD 0
.TP 20
.B /etc/resolve.conf
initial domain name and name server addresses.
.PD
.SH SEE ALSO
.BR resolver (3),
.BR resolve.conf (5),
.BR named (8C),
.SM RFC\s0 882,
.SM RFC\s0 883
tly mounted (as listed in
.BR /etc/mtab ).
.TP
.B \-v
Verbose.
Display a message indicating each filesystem being unmounted.
.SH NFS FILESYSTEMS
.SS Background vs. Foreground
.LP
Filesystems mounted with the
.B bg
option indicate that
.B mount
is to retry in the background if the server's mount daemon
.RB ( mountd (8C))
does not respond.
.B mount
retries the request up to the count specified in the
.BI retry= n
option.  Once the filesystem is mounted, each./share/man/man8/old-analyze.8                                                                         755       0      12         6045  4424741624  11234                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-analyze.8 1.16 89/03/27 SMI; from UCB 4.2
.TH OLD-ANALYZE 8 "23 September 1987"
.SH NAME
old-analyze, analyze \- postmortem system crash analyzer
.SH SYNOPSIS
.B /usr/old/analyze
[
.B \-dfmvD
] [
.B \-s
.I swapfile
]
.I corefile
[
.B system
]
.SH DESCRIPTION
.IX  "analyze command"  ""  "\fLanalyze\fP \(em crash analyzer"
.IX  "crash analyzer"  ""  "crash analyzer \(em \fLanalyze\fP"
.IX  "postmortem crash analyzer"  ""  "postmortem crash analyzer \(em \fLanalyze\fP"
.IX  "system administration"  analyze  ""  "\fLanalyze\fP \(em crash analyzer"
.B analyze
is the post-mortem analyzer for the state of the paging system.
In order to use
.B analyze
you must arrange to get a image of the memory (and possibly the
paging area) of the system after it crashes (see
.BR crash (8S)).
.LP
The
.B analyze
program reads the relevant system data structures from the core
image file and indexing information from
.B /vmunix
(or the specified file)
to determine the state of the paging subsystem at the point of crash.
It looks at each process in the system, and the resources each is
using in an attempt to determine inconsistencies in the paging system
state.  Normally, the output consists of a sequence of lines showing
each active process, its state (whether swapped in or not), its
.IR p0br ,
and the number and location of its page table pages.
Any pages which are locked while raw
.SM I/O
is in progress, or which
are locked because they are
.I intransit
are also printed.  (Intransit text pages often diagnose as duplicated;
you will have to weed these out by hand.)
.LP
The program checks that any pages in core which are marked as not
modified are, in fact, identical to the swap space copies.
It also checks for non-overlap of the swap space, and that the core
map entries correspond to the page tables.
The state of the free list is also checked.
.LP
Options to
.BR analyze :
.TP
.B \-d
Print the (sorted) paging area usage.
.TP
.B \-f
Dump the free list.
.TP
.B \-m
Dump the entire coremap state.
.TP
.B \-v
(Long unused.) Use a hugely verbose output format.
.TP
.B \-D
Print the diskmap for each process.
.LP
In general, the output from this program can be confused by processes
which were forking, swapping, or exiting or
happened to be in unusual states when the
crash occurred.  You should examine the flags fields of relevant processes in the output of a
.BR pstat (8)
to weed out such processes.
.LP
It is possible to look at the core dump with
.BR adb (1)
if you do
.IP
.B adb \-k /vmunix /vmcore
.SH FILES
.PD 0
.TP 20
.B /vmunix
default system namelist
.PD
.SH SEE ALSO
.BR adb (1),
.BR ps (1),
.BR crash (8S),
.BR pstat (8)
.\".SH AUTHORS
.\"Ozalp Babaoglu and William Joy
.SH DIAGNOSTICS
Various diagnostics about overlaps in
swap mappings, missing swap mappings,
page table entries inconsistent with the core map, incore pages which
are marked clean but differ from disk-image copies, pages which are
locked or intransit, and inconsistencies in the free list.
.LP
It would be nice if this program analyzed the system in general, rather
than just the paging system in particular.
sh analyzer"
.B analyze
is the post-mortem analyzer for the state of the paging system.
In order to use
.B analyze
you must arrange to get a image of the memory (and possibly the
paging area) of the system after it crashes (see
.BR crash (8S)).
.LP
The
.B analyze
program reads the relevant system data structures from the core
image file and indexing information from
.B /vmunix
(or the specified file)
to determine the state of the paging subsystem at the point of crash.
I./share/man/man8/old-sysdiag.8                                                                         755       0      12         4410  4424741624  11226                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)old-sysdiag.8 1.17 89/03/27 SMI;
.TH OLD-SYSDIAG 1 "21 December 1987"
.SH NAME
old-sysdiag, sysdiag \- system diagnostics
.SH SYNOPSIS
.B /usr/old/sysdiag/sysdiag
.SH AVAILABILITY
This program is available with the
.I User Diagnostics
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "sysdiag command"  ""  "\fLsysdiag\fP \(em system diagnostics"
.IX  "diagnostics sysdiag"   ""   "diagnostics \(em \fLsysdiag\fP"
.IX  "memory diagnostics sysdiag"   ""   "memory diagnostics \(em \fLsysdiag\fP"
.IX  "peripheral diagnostics sysdiag"   ""   "peripheral diagnostics \(em \fLsysdiag\fP"
.IX  disk "diagnostics \(em \fLsysdiag\fP"
.LP
.B sysdiag
is a general-purpose system diagnostic facility that
tests
the system and reports its findings.  It concentrates on three
areas of system functionality; memory, peripherals and disk.
.LP
To use
.BR sysdiag ,
log on as
.BR sysdiag ,
then enter the command
.BR sysdiag .
.LP
.B sysdiag
creates a
.BR sunview (1)
environment with one window each for memory,
peripherals, and disk error messages, plus a window for the console.
It also creates date/time and performance monitor graphs.
It places abbreviated error messages from the memory, disk, and
peripherals in the appropriate windows,
and sends console messages to the
console window.
.LP
When called from a terminal
.B sysdiag
interleaves
all its messages on the screen.
.LP
With or without the windows, it places
long error messages in files named
.BI log. xx.nn
where:
.RS
.TP
.I xx
is the name of diagnostic
.TP
.I nn
is the pass number (increments each pass)
.RE
.LP
After it completes its test,
.B sysdiag
displays the error log files
by executing the command
.RB ` "more\ log*" '.
These files remain after
.B sysdiag
exits.
.LP
.B sysdiag
consists of a user account with a home directory, a
collection of scripts, and executable files containing the actual
test code.
.LP
To configure or change
.BR sysdiag ,
either change the shell commands in
.BR /usr/diag/sysdiag/sysdiag ,
or change the
.B sysdiag
user configuration files
.BR .login ,
.BR .sunview ,
and
.BR .cshrc .
.SH FILES
.PD 0
.TP 20
.B .login
.TP
.B .sunview
.TP
.B .cshrc
.PD
.SH SEE ALSO
.BR sunview (1)
See the appropriate diagnostic manual for your Sun system.
    U  ypxfr_2perday.8     V  zdump.8      W  zic.8  R pstat (8)
to weed out such processes.
.LP
It is possible to look at the core dump with
.BR adb (1)
if you do
.IP
.B adb \-k /vmunix /vmcore
.SH FILES
.PD 0
.TP 20
.B /vmunix
defa./share/man/man8/pac.8                                                                                 755       0      12         3446  4424741624   7562                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pac.8 1.13 89/03/27 SMI; from UCB 4.2
.TH PAC 8 "22 March 1989"
.SH NAME
pac \- printer/plotter accounting information
.SH SYNOPSIS
.B /usr/etc/pac
[
.B \-cmrs
] [
.BI \-P printer
] [
.BI \-p price
] [
.IR username .\|.\|.
]
.SH DESCRIPTION
.IX  "pac command"  ""  "\fLpac\fP \(em printer/plotter accounting"
.IX  "printer/plotter accounting"
.B pac
reads the printer/plotter accounting files, accumulating the number
of pages (the usual case) or feet (for raster devices)
of paper consumed by each user, and printing out
how much each user consumed in pages or feet and dollars.
The accounting file is taken from the 
.B af
field of the 
.B printcap 
entry for the printer. If any
.IR username s
are specified, then statistics are only printed for those users;
usually, statistics are printed for every user who has used any paper.
.SH OPTIONS
.TP 10
.B \-c
Sort the output by cost; usually the output is sorted alphabetically by name.
.TP
.B \-m
Disregard machine names.  Normally, print jobs submitted by a
user from different machines would be counted separately for
each machine.
.TP
.B \-r
Reverse the sorting order.
.TP
.B \-s
Summarize the accounting information on
the summary accounting file.
The name of the summary file is the name of the accounting file with
.RB \(lq _sum \(rq
appended to it.
.TP
.BI \-P printer
Do accounting for the named
.IR printer .
If this option is not used, the printer specified by the 
.SM PRINTER
environment variable will be used if it is present; 
otherwise accounting is done for the default printer.
.TP
.BI \-p price
Use the value
.I price
for the cost in dollars per page/foot instead of 
the default value of 0.02.
.SH FILES
.PD 0
.TP 20
.B /etc/printcap
.PD
.SH SEE ALSO
.BR printcap (5)
.SH BUGS
The relationship between the computed price and reality is
as yet unknown.
ount.8 up.  \  C  
unconfigure.8 p.  p  D  unlink.8 re.    E  
uuclean.8c 8    F  vipw.8 l    G  vmstat.8 ipw    H  ypbind.8 t.8    I  ypinit.8 d.8    J  ypmake.8 t.8     K  yppa./share/man/man8/ping.8c                                                                               755       0      12         5165  4424741624  10117                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)ping.8c 1.20 89/03/27 SMI; from UCB 4.3 BSD
.\"
.TH PING 8C "25 March 1989"
.UC 6
.SH NAME
ping \- send ICMP ECHO_REQUEST packets to network hosts
.SH SYNOPSIS
.B /usr/etc/ping
.I host
[
.I timeout
]
.LP
.B /usr/etc/ping
[
.B \-s
] [
.B \-rv
]
.I host
[
.I packetsize
] [
.I count
]
.SH AVAILABILITY
.LP
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ping command"  ""  "\fLping\fP \(em debug network"
.IX  "network debugging"  ""  "network debugging \(em \fLping\fP"
.IX  "debug network"  ""  "debug network \(em \fLping\fP"
.LP
.B ping
utilizes the
.SM ICMP
protocol's mandatory
.SM ECHO_REQUEST
datagram to elicit an
.SM ICMP ECHO_RESPONSE
from the specified
.I host ,
or network gateway.
.SM ECHO_REQUEST
datagrams, or ``pings,'' have an
.SM IP
and
.SM ICMP
header, followed by a
.IR struct timeval ,
and then an arbitrary
number of bytes to pad out the packet.
If
.I host
responds,
.B ping
will print
.IB host " is alive"
on the standard output and exit.  Otherwise after
.I timeout
seconds, it will write
.BI "no answer from " host\fR.
The default value of
.I timeout
is 20 seconds.
.LP
When the
.B \-s
flag is specified,
.B ping
sends one datagram per second, and
prints one line of output for every
.SM ECHO_RESPONSE
that it receives.  No output is produced if there is no response.
In this second form,
.B ping
computes round trip times and packet loss statistics;
it displays a summary of this information upon termination or timeout.
The default datagram packet size is 64 bytes, or you can specify
a size with the
.I packetsize
command-line argument.  If an optional
.I count
is given,
.B ping
sends only that number of requests.
.LP
When using
.B ping
for fault isolation, first
.RB ` ping '
the local host to verify that the local network interface is running.
.LP
.SH OPTIONS
.TP
.B \-r
Bypass the normal routing tables and send directly to a host on an
attached network.  If the host is not on a directly-attached network,
an error is returned.
This option can be used to
.B ping
a local host through an interface that has been dropped by the
router daemon, see
.BR routed (8C).
.TP
.B \-v
Verbose output.  List any
.SM ICMP
packets, other than
.SM ECHO_RESPONSE\s0,
that are received.
.\".SH AUTHOR
.\"Mike Muuss
.SH SEE ALSO
.BR icmp (4P),
.BR ifconfig (8C),
.BR netstat (8C),
.BR rpcinfo (8C),
.BR spray (8C)
s of hosts in the domain.  The
.B \-h
option lists
.SM CPU
and operating system information for the domain.
As with the shell, output can be redirected to a named file
using
.B >
and
.BR >> .
When output is directed to a file, hash marks are printed for every
50 records received from the server.
.TP
.BI view\fP  filename
Sort and list the output of the
.B ls
command with
.BR more (1).
.TP
.B ./share/man/man8/pnp.s386.8c                                                                           755       0      12           72  4424741625  10412                                                                                                                                                                                                                                                                                                                                                                      .so man8/pnpboot.8c
.\" @(#)pnp.s386.8c 1.3 89/03/27 SMI;
 pnpd.8c   	    
portmap.8c   	    	praudit.8 	  	     pstat.8   	    pwck.8    	    pwdauthd.8c   
     quot.8    
    quotacheck.8    
,    
quotaoff.8 ,  
@    	quotaon.8 
@  
T    rarpd.8c  
T  
d    rc.8  
T  
x    	rc.boot.8 
x  
    
rc.local.8   
  	  rdate.8c  
  
  
  rdump.8   
    reboot.8  
  
    renice.8  
  
  
  
repquota.8        	restore.8    ./share/man/man8/pnpboot.8c                                                                            755       0      12         3637  4424741625  10646                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pnpboot.8c 1.12 89/03/27 SMI; from UCB 4.2
.TH PNPBOOT 8C "22 March 1989"
.SH NAME
pnpboot, pnp.s386 \- pnp diskless boot service
.SH SYNOPSIS
.B /tftpboot/pnp.s386
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "pnp.sun3" "" "\fLpnpboot\fP \(em pnp diskless boot service"
.IX "pnp.s386" "" "\fLpnpboot\fP \(em pnp diskless boot service"
.IX "pnpboot" "" "\fLpnpboot\fP \(em pnp diskless boot service"
.LP
.B pnp.s386
is a level 2 boot program that requests actions necessary to set up a
diskless workstation on the network.
.LP
The 
.SM PNP 
diskless boot service is used by diskless workstations at installation
time to locate a server that will configure the diskless client.
.LP
The last steps of the level 1 boot (from the PROM)
are to load the level 2 program
through
.BR rarpd (8C)
and 
.BR tftpd (8C).
The first step in the boot sequence is
.SM RARP
to acquire an IP address.  This is followed by
.SM TFTP
service calls to acquire the
.B pnp.sun*
program file needed for the client's architecture.  A
.SB PNP_ACQUIRE
.SM RPC
is then broadcast to locate a server willing to configure the diskless
client.  
.LP
A
.SB PNP_SETUP
is issued to the server which returns one of three statuses: success,
failure, or in_progress.  As long as the server responds with a status of
in_progress the client will periodically issue a
.SB PNP_POLL
until the status changes to either success or failure.
.LP
The last step is to reboot the client.  This goes through a
.SM RARP,
.SM TFTP,
.SM BOOT
sequence, with the boot using the normal
.B boot.sun*
file and
.BR bootparamd (8)
service.
.LP
The system will have been set up using the IP address returned in the first
step and a system name will have been assigned.
.SH FILES
.PD 0
.TP 20
.B /tftpboot/pnp.sun*
.PD
.SH SEE ALSO
.BR boot (8S),
.BR bootparamd (8), 
.BR ipallocd (8C),
.BR netconfig (8C),
.BR pnpd (8C),
.BR rarpd (8C),
.BR tftpd (8C),
.BR bootparam (3R), 
.BR bootparams (5)
J  ypmake.8       K  yppasswdd.8c       L  yppoll.8  K  (  M  yppush.8    <./share/man/man8/pnpd.8c                                                                               755       0      12         2115  4424741625  10114                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pnpd.8c 1.12 89/03/27 SMI;
.TH PNPD 8C "22 March 1989"
.SH NAME
pnpd \- PNP daemon
.SH SYNOPSIS 
.B /usr/etc/rpc.pnpd
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "pnpd command" "" "\fLpnpd\fP \(em PNP daemon"
.IX servers pnpd "" "\fLpnpd\fP \(em PNP daemon"
.LP
.B pnpd
is used during routine booting of systems to determine their network
configuration, and by new systems to configure themselves on a network. 
.B pnpd
adds and removes diskless clients of the boot server on which it is
running.
The
.B pnpd
daemon is normally invoked in
.BR rc.local .
The
.SM RPCs
are used by
.BR netconfig (8C),
.BR pnp.s386
(see
.BR pnpboot (8C)),
and
.BR client (8).
.LP
The
.B bootservers
YP map specifies limits on server capacity and default
swap size.
.SH FILES
.PD 0
.TP
.BI /export/exec/ arch
symbolic link to
.BI /export/exec/ arch.release 
.TP
.BI /export/exec/ arch.release 
symbolic link to
.B /usr
for the architecture
.TP
.BI /export/exec/ arch.release /boot 
root binaries
.PD
.SH SEE ALSO
.BR pnp (3R),
.BR client (8),
.BR ipallocd (8C),
.BR netconfig (8C),
.BR pnpboot (8C)
 
8  (  	rwalld.8c    
L  )  rwhod.8c   $  
\  *  sa.8 .8c  
p  +  
savecore.8 c  
  ,  
sendmail.8 L  
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8       =  tic.8v c    2  	sprayd.8c  c  (  3  statd.8c     <  4  sticky.8    P  5  	sundiag.8 (  h  6  suninstall.8  h    7  sunupgrade.8      8  swapon.8./share/man/man8/portmap.8c                                                                            755       0      12         2043  4424741625  10635                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)portmap.8c 1.11 89/03/27 SMI;
.TH PORTMAP 8C "9 September 1987"
.SH NAME
portmap \- DARPA port to RPC program number mapper
.SH SYNOPSIS
.B /usr/etc/rpc.portmap
.SH DESCRIPTION
.IX  "portmap command"  ""  "\fLportmap\fP \(em DARPA to RPC mapper"
.IX  DARPA "to RPC mapper \(em \fLportmap\fP"
.B portmap
is a server that converts
.SM RPC
program numbers into
.SM DARPA
protocol port numbers.
It must be running in order to make
.SM RPC
calls.
.LP
When an
.SM RPC
server is started, it will tell
.B portmap
what port number it is listening to, and what
.SM RPC
program numbers it is prepared to serve.
When a client wishes to make an
.SM RPC
call to a given program number,
it will first contact
.B portmap
on the server machine to determine
the port number where
.SM RPC
packets should be sent.
.LP
Normally, standard
.SM RPC
servers are started by
.BR inetd (8C),
so
.B portmap
must be started before
.B inetd
is invoked.
.SH "SEE ALSO"
.BR inetd.conf (5),
.BR rpcinfo (8),
.BR inetd (8)
.SH BUGS
If
.B portmap
crashes, all servers must be restarted.
$  '  
rusersd.8c $  
8  (  	rwalld.8c 
8  
L  )  rwhod.8c  
L  
\  *  sa.8   $  
p  +  
savecore.8 p  
  ,  
sendmail.8   
  -  setup_client.8 -  
  .  setup_exec.8  .  
  /  showmount.8   
  0  
shutdown.8   
  1  spray.8c  
     =  tic.8v      2  	sprayd.8c   (  3  statd.8c  (  <  4  sticky.8  <  P  5  	sundiag.8 P  h  6  suninstall.8  6    7  sunupgrade.8  7    8  swapon.8      9  	sysl./share/man/man8/praudit.8                                                                             755       0      12         4230  4424741625  10460                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)praudit.8 1.12 89/03/27 SMI;
.TH PRAUDIT 8 "22 March 1989"
.SH NAME
praudit \- print contents of an audit trail file
.SH SYNOPSIS
.B praudit
[
.B \-lrs
] [
.BI \-d del
] [
.I filename
\&.\|.\|.
]
.IX  praudit  ""  "\fLpraudit\fP \(em display audit trail"
.SH AVAILABILITY
.LP
This program is available with the
.I Security
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B praudit
reads the listed
.IR filename s
(or standard input, if no
.I filename
is specified)
and interprets the data as audit trail records as defined in
.BR audit_control (5).
By default, times, security labels, user and group
.SM ID\s0s
(\s-1UID\s0s
and
\s-1GID\s0s,
respectively)
are converted to their
.SM ASCII
representation.
Record type and event fields are converted to long
.SM ASCII
representation.
A maximum of 100 audit files can be specified on the command line.
.SH OPTIONS
.TP
.B \-l
Print records one line per record.
The record type and event fields are always converted
to their short
.SM ASCII
representation.
.TP
.B \-r
Print records in their raw form.
Times, security labels,
\s-1UID\s0s,
\s-1GID\s0s,
record types, and events are displayed as integers. 
Currently, in Sun\s-1OS\s0 4.0, labels are not
used and are displayed as zero in this mode.  
This option and the 
.B \-s
option are exclusive.
If both are used, a format usage error message is output.
.TP
.B \-s
Print records in their short form.
All numeric fields are converted to
.SM ASCII
and displayed.
The short
.SM ASCII
representations for the record type and event fields are used.
Security labels are displayed in their short representation.
Again, labels are not currently used.
This option and the 
.B \-r
option are exclusive.
If both are used, a format usage error message is output.
.TP
.BI \-d del
Use
.I del 
as the field delimiter instead of the default delimiter, which is the comma.  
If
.I del 
has special meaning for the shell, it must be quoted.
The maximum size of a delimiter is four characters.
.LP
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.PD
.SH "SEE ALSO"
.BR audit (2),
.BR setuseraudit (2),
.BR getauditflags (3),
.BR audit_control (5)
B \-lrs
] [
.BI \-d del
] [
.I filename
\&.\|.\|.
]
.IX  praudit  ""  "\fLpraudit\fP \(em display audit trail"
.SH AVAILABILITY
.LP
This program is available with the
.I Security
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B praudit
reads the listed
.IR filename s
(or standard ./share/man/man8/pstat.8                                                                               755       0      12        21764  4424741625  10176                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pstat.8 1.32 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH PSTAT 8 "22 March 1989"
.SH NAME
pstat \- print system facts
.SH SYNOPSIS
.B /usr/etc/pstat
[
.B \-afipSsT
] [
.B \-u
.I pid
] [
.I system
[
.I corefile
] ]
.SH DESCRIPTION
.IX  "pstat command"  ""  "\fLpstat\fP \(em display system statistics"
.LP
.B pstat
interprets the contents of certain system tables.  If
.I corefile
is given, the tables are sought there, otherwise in
.BR /dev/kmem .
The required namelist is taken from
.B /vmunix
unless 
.I system
is specified.
.SH OPTIONS
.LP
.TP
.B \-a
Under
.BR \-p ,
describe all process slots rather than just active ones.
.TP
.B \-f
Print the open file table with these headings:
.RS
.RS
.TP 12
.PD 0
.SM LOC
The memory address of this table entry.
.TP
.SM TYPE
The type of object the file table entry points to.
.TP
.SM FLG
Miscellaneous state variables encoded thus:
.RS
.RS
.TP 4
R
open for reading
.TP
W
open for writing
.TP
A
open for appending
.TP
S
shared lock present
.TP
X
exclusive lock present
.TP
I
signal pgrp when data ready
.RE
.RE
.TP
.SM CNT
Number of processes that know this open file.
.TP
.SM MSG
Number of references from message queue.
.TP
.SM DATA
The location of the vnode table entry or socket for this file.
.TP
.SM OFFSET
The file offset (see
.BR lseek (2)).
.PD
.RE
.RE
.TP
.B \-i
Print the inode table including the associated vnode entries
with these headings:
.RS
.RS
.TP 12
.PD 0
.SM ILOC
The memory address of this table entry.
.TP
.SM IFLAG
Miscellaneous inode state variables encoded thus:
.RS
.RS
.TP 4
A
inode access time must be corrected
.TP
C
inode change time must be corrected
.TP
L
inode is locked
.TP
R
inode is being referenced
.TP
U
update time
.RB ( fs (5))
must be corrected
.TP
W
wanted by another process (L flag is on)
.RE
.RE
.TP
.SM IDEVICE
Major and minor device number of file system in which
this inode resides.
.TP
.SM INO
I-number within the device.
.TP
.SM MODE
Mode bits in octal, see
.BR chmod (2).
.TP
.SM NLK
Number of links to this inode.
.TP
.SM UID
User
.SM ID
of owner.
.TP
.SM SIZE/DEV
Number of bytes in an ordinary file,
or major and minor device of special file.
.TP
.SM VFLAG
Miscellaneous vnode state variables encoded thus:
.RS
.RS
.TP 4
R
root of its file system
.TP
S
shared lock applied
.TP
E
exclusive lock applied
.TP
Z
process is waiting for a shared or exclusive lock
.RE
.RE
.TP
.SM CNT
Number of open file table entries for this vnode.
.TP
.SM SHC
Reference count of shared locks on the vnode.
.TP
.SM EXC
Reference count of exclusive locks on the vnode (this may be
.RB ` "> 1" '
if, for example, a file descriptor is inherited across a fork).
.TP
.SM TYPE
Vnode file type, either
.SM VNON
(no type),
.SM VREG
(regular),
.SM VDIR
(directory),
.SM VBLK
(block device),
.SM VCHR
(character device),
.SM VLNK
(symbolic link),
.SM VSOCK
(socket),
.SM VFIFO
(named pipe), or
.SM VBAD
(bad).
.PD
.RE
.RE
.TP
.B \-p
Print process table for active processes with these headings:
.RS
.RS
.TP 12
.PD 0
.SM LOC
The memory address of this table entry.
.TP
S
Run state encoded thus:
.RS
.RS
.TP 4
0
no process
.TP
1
awaiting an event
.TP
2
(abandoned state)
.TP
3
runnable
.TP
4
being created
.TP
5
being terminated
.TP
6
stopped (by signal or under trace)
.RE
.RE
.TP
F
Miscellaneous state variables,
.SM OR\s0ed
together (hexadecimal):
.RS
.RS
.TP 12
0000001
loaded
.TP
0000002
a system process (scheduler or page-out daemon)
.TP
0000004
locked for swap out
.TP
0000008
swapped out during process creation
.TP
0000010
process is being traced
.TP
0000020
tracing parent has been told that process is stopped
.TP
0000040
user settable lock in memory
.TP
0000080
in page-wait
.TP
0000100
prevented from swapping during
.BR fork (2)
.TP
0000200
will restore old mask after taking signal
.TP
0000400
exiting
.TP
0000800
doing physical I/O
.TP
0001000
process resulted from a
.BR vfork (2)
which is not yet complete
.TP
0002000
another flag for
.BR vfork (2)
.TP
0004000
process has no virtual memory, as it is a parent in the context of
.BR vfork (2)
.TP
0008000
process is demand paging pages from its executable image vnode
.TP
0010000
process has advised of sequential
.SM VM
behavior with
.BR vadvise (2)
.TP
0020000
process has advised of random
.SM VM
behavior with
.BR vadvise (2)
.TP
0080000
process is a session process group leader
.TP
0100000
process is tracing another process
.TP
0200000
process needs a profiling tick
.TP
0400000
process is scanning descriptors during select
.TP
4000000
process has done record locks
.TP
8000000
process is having its system calls traced
.RE
.RE
.TP
.SM PRI
Scheduling priority, see
.BR getpriority (2).
.TP
.SM SIG
Signals received (signals 1-32 coded in bits 0-31).
.TP
.SM UID
Real user
.SM ID\s0.
.TP
.SM SLP
Amount of time process has been blocked.
.TP
.SM TIM
Time resident in seconds; times over 127 coded as 127.
.TP
.SM CPU
Weighted integral of
.SM CPU
time, for scheduler.
.TP
.SM NI
Nice level, see
.BR getpriority (2).
.TP
.SM PGRP
Process number of root of process group.
.TP
.SM PID
The process
.SM ID number.
.TP
.SM PPID
The process
.SM ID
of parent process.
.TP
.SM RSS
Resident set size \(em the number of physical page frames allocated
to this process.
.TP
.SM SRSS
.SM RSS
at last swap (0 if never swapped).
.TP
.SM SIZE
The size of the process image.  That is, the sum of the data and
stack segment sizes, not including the sizes of any shared libraries.
.TP
.SM WCHAN
Wait channel number of a waiting process.
.TP
.SM LINK
Link pointer in list of runnable processes.
.PD
.RE
.RE
.IP \fB\-S\fP
Print the streams table with these headings:
.RS
.RS
.TP 12
.PD 0
.SM LOC
The memory address of this table entry.
.TP
.SM WRQ
The address of this stream's write queue.
.TP
.SM VNODE
The address of this stream's vnode.
.TP
.SM DEVICE
Major and minor device number of device to which this stream refers.
.TP
.SM PGRP
This stream's process group number.
.TP
.SM FLG
Miscellaneous stream state variables encoded thus:
.RS
.RS
.TP 4
I
waiting for
.BR ioctl (\|)
to finish
.TP
R
read/recvmsg is blocked
.TP
W
write/putmsg is blocked
.TP
P
priority message is at stream head
.TP
H
device has been ``hung up'' (\fB\s-1M_HANGUP\s0\fR)
.TP
O
waiting for open to finish
.TP
M
stream is linked under multiplexor
.TP
D
stream is in message-discard mode
.TP
N
stream is in message-nondiscard mode
.TP
E
fatal error has occurred (\fB\s-1M_ERROR\s0\fR)
.TP
T
waiting for queue to drain when closing
.TP
2
waiting for previous
.BR ioctl (\|)
to finish before starting new one
.TP
3
waiting for acknowledgment for
.BR ioctl (\|)
.TP
B
stream is in non-blocking mode
.TP
A
stream is in asynchronous mode
.TP
o
stream uses old-style no-delay mode
.TP
S
stream has had
.SB TOSTOP
set
.TP
C
VTIME clock running
.TP
V
VTIME timer expired
.TP
r
collision on
.BR select (\|)
for reading
.TP
w
collision on
.BR select (\|)
for writing
.TP
e
collision on
.BR select (\|)
for exceptional condition
.PD
.RE
.RE
.RE
.RE
.IP
The queues on the write and read sides of the stream are listed for each
stream.  Each queue is printed with  these headings:
.RS
.RS
.TP 12
.PD 0
.SM NAME
The name of the module or driver for this queue.
.TP
.SM COUNT
The approximate number of bytes on this queue.
.TP
.SM FLG
Miscellaneous state variables encoded thus:
.RS
.RS
.TP 4
E
queue is enabled to run
.TP
R
someone wants to get from this queue when it becomes non-empty
.TP
W
someone wants to put on this queue when it drains
.TP
F
queue is full
.TP
N
queue should not be enabled automatically by a putq
.RE
.RE
.TP
.SM MINPS
The minimum packet size for this queue.
.TP
.SM MAXPS
The maximum packet size for this queue, or
.SB INF
if there is no maximum.
.TP
.SM HIWAT
The high-water mark for this queue.
.TP
.SM LOWAT
The low-water mark for this queue.
.PD
.RE
.RE
.br
.ne 10
.TP
.B \-s
Print information about swap space usage:
.RS
.RS
.TP 12
allocated:
The amount of swap space (in bytes) allocated to private pages.
.TP
reserved:
The number of swap space bytes not currently allocated, but
claimed by memory mappings that have not yet created private
pages.
.TP
used:
The total amount of swap space, in bytes, that is either allocated
or reserved.
.TP
available: 
The total swap space, in bytes, that is currently available for
future reservation and allocation.
.RE
.RE
.TP
.B \-T
Print the number of used and free slots in the several system tables.
This is useful for checking to see how full system tables have become if the
system is under heavy load.  Shows both used and cached inodes.
.TP
.BI \-u " pid"
Print information about the process with
.SM ID
.IR pid .
.SH FILES
.PD 0
.TP 20
.B /vmunix
namelist
.TP
.B /dev/kmem
default source of tables
.PD
.SH SEE ALSO
.BR iostat (8),
.BR vmstat (8),
.BR ps (1),
.BR chmod (2),
.BR fork (2),
.BR getpriority (2),
.BR lseek (2),
.BR stat (2),
.BR vadvise (2),
.BR vfork (2),
.BR fs (5)
.SH BUGS
.LP
It would be very useful if the system recorded \(lqmaximum occupancy\(rq
on the tables reported by
.BR \-T ;
even more useful if these tables were dynamically allocated.

.TP 35
To m./share/man/man8/pwck.8                                                                                755       0      12         3765  4424741626   7771                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pwck.8 1.8 89/03/27 SMI; from S5R3
.TH PWCK 8 "17 November 1987"
.SH NAME
pwck \- check password database entries
.SH SYNOPSIS
.B /usr/etc/pwck
.RI [ " file " ]
.SH DESCRIPTION
.IX pwck "" "\fLpwck\fR \(em check password database entries"
.IX "System V commands" "\fLpwck\fR"
.IP Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
.B pwck
checks that a file in
.BR passwd (5)
does not contain any errors; it checks the
.B /etc/passwd
file by default.
.SH FILES
.B /etc/passwd
.SH DIAGNOSTICS
.TP
.B "Too many/few fields"
An entry in the password file does not have the proper number of
fields.
.TP
.B "No login name"
The login name field of an entry is empty.
.TP
.B "Bad character(s) in login name"
The login name in an entry contains characters other than lower-case letters
and digits.
.TP
.B "First char in login name not lower case alpha"
The login name in an entry does not begin with a lower-case letter.
.TP
.B "Login name too long"
The login name in an entry has more than 8 characters.
.TP
.B "Invalid UID"
The user \s-1ID\s+1 field in an entry is not numeric or is greater than
65535.
.TP
.B "Invalid GID"
The group \s-1ID\s+1 field in an entry is not numeric or is greater than
65535.
.TP
.B "No login directory"
The login directory field in an entry is empty.
.TP
.B "Login directory not found"
The login directory field in an entry refers to a directory that does not
exist.
.TP
.B "Optional shell file not found."
The login shell field in an entry refers to a program or shell script that
does not exist.
.TP
.B "No netgroup name"
The entry is a Yellow Pages entry referring to a netgroup, but no
netgroup is present.
.TP
.B "Bad character(s) in netgroup name"
The netgroup name in a Yellow Pages entry contains characters other than
lower-case letters and digits.
.TP
.B "First char in netgroup name not lower case alpha"
The netgroup name in a Yellow pages entry does not begin with a lower-case
letter.
.SH SEE ALSO
.BR group (5),
.BR passwd (5)
 ypxfr.8 ./share/man/man8/pwdauthd.8c                                                                           755       0      12         4524  4424741626  11002                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)pwdauthd.8c 1.11 89/03/27 SMI
.TH PWDAUTHD 8C "22 March 1989"
.SH NAME
pwdauthd \- server for authenticating passwords
.SH SYNOPSIS
.B /usr/etc/rpc.pwdauthd
.SH AVAILABILITY
This program is available with the
.I Security
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "pwdauthd daemon" "" "\fLpwdauthd\fP daemon"
.B pwdauthd
is a server that determines authentication for users and groups.
It handles authentication requests from
.BR pwdauth (3)
and
.BR grpauth .
Communication to and from
.B pwdauthd
is by means of
.SM RPC
calls.  The server is passed a
.I filename
and a
.IR password .
It returns an integer value that specifies whether the
.I password
is valid.  The possible return values are
.SB PWA_VALID
if the name is valid,
.SB PWA_INVALID
if the name is invalid, and
.SB PWA_UNKNOWN
if validity cannot be determined
because no adjunct files are present.
.LP
If
.B pwdauthd
is serving
.IR pwdauth ,
it determines whether the
.B passwd.adjunct
file exists.  If not, it returns
\fB\s-1PWA_UNKNOWN\s0\fR.
In this case,
.I pwdauth
knows to check the
.B /etc/passwd
file.  Otherwise, the server calls
.B getpwanam
(see
.BR getpwaent (3))
to get the entry for
.I filename
in either the local or the Yellow Pages file for
.BR passwd.adjunct .
If the encrypted password guess matches
the encrypted password from the file,
.B pwdauthd
returns
\fB\s-1PWA_VALID\s0\fR.
If the passwords do not match, it returns
\fB\s-1PWA_INVALID\s0\fR.
.LP
If
.B pwdauthd
is serving
.BR grpauth ,
it determines whether the
.B group.adjunct
file exists.  If not, it returns
.SB PWA_UNKNOWN\s0\fR.
In this case,
.B grpauth
knows to check the
.B /etc/group
file.
Otherwise, the server calls
.B getgranam
(see
.BR getgraent (3))
to get the entry for
.I filename
in either the local or the Yellow Pages file for
.BR group.adjunct .
If the encrypted password guess matches
the encrypted password from the file,
.B pwdauthd
returns
.SB PWA_VALID\s0\fR.
If the passwords do not match, it returns
.SB PWA_INVALID\s0\fR.
.\" .SH FILES
.\" .PD 0
.\" .TP 20
.\" .B /etc/security/passwd.adjunct
.\" .TP
.\" .BI /var/yp/ domainname /passwd.adjunct.byname
.\" .TP
.\" .B /etc/security/group.adjunct
.\" .TP
.\" .BI /var/yp/ domainname /group.adjunct.byname
.\" .PD
.SH "SEE ALSO"
.BR getgraent (3),
.BR getpwaent (3),
.BR pwdauth (3)
s:
.RS
.RS
.TP 4
R
root of its file system
.TP
S
shared lock applied
.TP
E
exclusive lock applied
.TP
Z
process is waiting for a shared or exclusive lock
.RE
.RE
.TP
.SM CN./share/man/man8/quot.8                                                                                755       0      12         2370  4424741626  10004                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quot.8 1.16 89/03/27 SMI; from UCB 4.2
.TH QUOT 8  "9 September 1987"
.SH NAME
quot \- summarize file system ownership
.SH SYNOPSIS
.B /usr/etc/quot
[
.B \-acfhnv
] [
.I filesystem
]
.SH DESCRIPTION
.IX  "quot command"  ""  "\fLquot\fP \(em summarize file system ownership"
.IX  "file system"  "summarize ownership"  ""  "summarize ownership \(em \fLquot\fP"
.B quot
displays the number of blocks (1024 bytes) in the named
.I filesystem
currently owned by each user.
.SH OPTIONS
.TP
.B \-a
Generate are report for all mounted file systems.
.TP
.B \-c
Display three columns giving file size in blocks, number of
files of that size, and cumulative total of blocks
in that size or smaller file.
.TP
.B \-f
Display count of number of files as well as space owned by each user.
.TP
\fB\-h
Estimate the number of blocks in the file \(em this doesn't account for
files with holes in them.
.TP
.B \-n
Run the pipeline
.B "ncheck filesystem | sort +0n | quot \-n filesystem"
to produce a list of all files and their owners.
.TP
\fB\-v
Display three columns containing the number of blocks not accessed in
the last 30, 60, and 90 days.
.SH FILES
.PD 0
.TP 20
.B /etc/mtab
mounted file systems
.TP
.B /etc/passwd
to get user names
.PD
.SH "SEE ALSO"
.BR du (1V),
.BR ls (1V)
d.8c    <  4  sticky.8  (  P  5  	sundiag.8 <  h  6  suninstall.8  h    7  sunupgrade.8      8  swapon.8  7    9  	syslogd.8     :  talkd.8c      ;  
telnetd.8c     <  tftpd.8c c     >  	tnamed.8c     ?./share/man/man8/quotacheck.8                                                                          755       0      12         4406  4424741626  11145                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quotacheck.8 1.12 89/03/27 SMI; from UCB 4.2
.TH QUOTACHECK 8  "9 September 1987"
.UC 4
.SH NAME
quotacheck \- file system quota consistency checker
.SH SYNOPSIS
.B /usr/etc/quotacheck
[
.B \-v
] [
.B \-p
]
.IR filesystem .\|.\|.
.LP
.B /usr/etc/quotacheck
[
.B \-apv
]
.SH DESCRIPTION
.IX  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "user quotas"  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "disk quotas"  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "quotas"  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "file system"  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "check quota consistency quotacheck"  ""  "check quota consistency \(em \fLquotacheck\fP"
.LP
.B quotacheck
examines each file system, builds a table of current disk usage, and
compares this table against that stored in the disk quota file for the
file system.
If any inconsistencies are detected, both the quota file
and the current system copy of the incorrect quotas are updated (the
latter only occurs if an active file system is checked).
.LP
.B quotacheck
expects each file system to be checked to have a quota file named
.I quotas
in the root directory.  If none is present,
.B quotacheck
will ignore the file system.
.LP
.B quotacheck
is normally run at boot time from the
.B /etc/rc.local
file, see
.BR rc (8),
before enabling disk quotas with
.BR quotaon (8).
.LP
.B quotacheck
accesses the raw device in calculating the actual disk usage for each
user.  Thus, the file systems checked should be quiescent while
.B quotacheck
is running.
.SH OPTIONS
.TP
.B \-v
Indicate the calculated disk quotas
for each user on a particular file system.
.B quotacheck
Normally reports only those quotas modified.
.TP
.B \-a
Check all the file systems indicated in
.B /etc/fstab
to be read-write with disk quotas.
.TP
.B \-p
Run parallel passes on the required file systems,
using the pass numbers in
.B /etc/fstab
in an identical fashion to
.BR fsck (8).
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system root
.TP
.B /etc/mtab
mounted file systems
.TP
.B /etc/fstab
default file systems
.PD
.SH "SEE ALSO"
.BR quotactl (2),
.BR quotaon (8),
.BR rc (8)
ck
[
.B \-apv
]
.SH DESCRIPTION
.IX  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "user quotas"  "quotacheck command"  ""  "\fLquotacheck\fP \(em check quota consistency"
.IX  "disk quotas"  "quotacheck command"  "" ./share/man/man8/quotaoff.8                                                                            755       0      12           71  4424741626  10574                                                                                                                                                                                                                                                                                                                                                                      .so man8/quotaon.8
.\" @(#)quotaoff.8 1.6 89/03/27 SMI; 
 rarpd.8c on.  
d    rc.8 arp  
x    	rc.boot.8 .8  
    
rc.local.8 .  
  	  rdate.8c cal  
  
  rdump.8   
    reboot.8 dum  
    renice.8 t.8  
  
  
repquota.8 8       	restore.8 ta      rexd.8c   $    	rexecd.8c xd  8    
rlogind.8c 8  L    rmail.8c nd.  \    rmt.8c i  p    route.8c mt.      	routed.8c 8c      
rpc.etherd.8c       rpc.lockd.8c        
rpc../share/man/man8/quotaon.8                                                                             755       0      12         4603  4424741627  10504                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)quotaon.8 1.11 89/03/27 SMI; from UCB 4.2
.TH QUOTAON 8  "22 March 1989"
.UC 4
.SH NAME
quotaon, quotaoff \- turn file system quotas on and off
.SH SYNOPSIS
.B /usr/etc/quotaon
[
.B \-v
]
.IR filesystem .\|.\|.
.br
.B /usr/etc/quotaon
[
.B \-av
]
.LP
.B /usr/etc/quotaoff
[
.B \-v
]
.IR filesystem .\|.\|.
.br
.B /usr/etc/quotaoff
[
.B \-av
]
.SH DESCRIPTION
.SS quotaon
.IX  "quotaon command"  ""  "\fLquotaon\fP \(em turn file system quotas on"
.IX  "user quotas"  "quotaon command"  ""  "\fLquotaon\fP \(em turn file system quotas on"
.IX  "disk quotas"  "quotaon command"  ""  "\fLquotaon\fP \(em turn file system quotas on"
.IX  "quotas"  "quotaon command"  ""  "\fLquotaon\fP \(em turn file system quotas on"
.IX  "file system"  "quotaon command"  ""  "\fLquotaon\fP \(em turn file system quotas on"
.LP
.B quotaon
announces to the system that disk quotas should be enabled on one or
more file systems.  The file systems specified must be mounted at the
time.  The file system quota files must be present in the root
directory of the specified file system and be named
.IR quotas .
.SS quotaoff
.IX  "quotaoff command"  ""  "\fLquotaoff\fP \(em turn file system quotas off"
.IX  "user quotas"  "quotaoff command"  ""  "\fLquotaoff\fP \(em turn file system quotas off"
.IX  "disk quotas"  "quotaoff command"  ""  "\fLquotaoff\fP \(em turn file system quotas off"
.IX  "quotas"  "quotaoff command"  ""  "\fLquotaoff\fP \(em turn file system quotas off"
.IX  "file system"  "quotaoff command"  ""  "\fLquotaoff\fP \(em turn file system quotas off"
.LP
.B quotaoff
announces to the system that file systems specified should
have any disk quotas turned off.
.SH OPTIONS
.SS quotaon
.TP
.B \-a
All file systems in
.B /etc/fstab
marked read-write with quotas
will have their quotas turned on.  This is normally used at
boot time to enable quotas.
.TP
.B \-v
Display a message for each file system where quotas are turned on.
.SS quotaoff
.TP
.B \-a
Force all file systems in
.B /etc/fstab
to have their quotas disabled.
.TP
.B \-v
Display a message for each file system affected.
.LP
These commands
update the status field of devices located in
.B /etc/mtab
to indicate when quotas are on or off for each file system.
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system root
.TP
.B /etc/mtab
mounted file systems
.TP
.B /etc/fstab
default file systems
.PD
.SH "SEE ALSO"
.BR quotactl (2),
.BR fstab (5),
.BR mtab (5)
S
shared lock applied
.TP
E
exclusive lock applied
.TP
Z
process is waiting for a shared or exclusive lock
.RE
.RE
.TP
.SM CN./share/man/man8/rarpd.8c                                                                              755       0      12         4534  4424741627  10274                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rarpd.8c 1.19 89/03/27 SMI;
.TH RARPD 8C "25 March 1989"
.SH NAME
rarpd \- DARPA Reverse Address Resolution Protocol service
.SH SYNOPSIS
.B /usr/etc/rarpd
.I if hostname
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "rarpd daemon" "" "\fLrarpd\fR \(em reverse Address Resolution Protocol daemon"
.B rarpd
starts a daemon that responds to Reverse Address Resolution Protocol
(Reverse \s-1ARP\s0) requests.
The daemon forks a copy of itself,
and requires root privileges.
.LP
The Reverse \s-1ARP\s0 protocol is used by machines at boot time to discover
their (32 bit)
.SM IP
address given their (48 bit) Ethernet address.
In order for the request to be answered,
a machine's name-to-\s-1IP\s0-address entry must exist in the
.B /etc/hosts
file and its name-to-Ethernet-address entry must exist in the
.B /etc/ethers
file.  Furthermore, the server that runs the
.B rarpd
daemon must have entries in both files.
Note that if the server machine is using the Yellow Pages service,
the server's files are ignored,
and the appropriate Yellow Pages maps queried.
.LP
The first argument,
.IR if ,
is one of the interface parameter strings (listed in 
.BR boot (8S)),
in the form of ``name unit'', for example
.BR ie0 .
The second argument,
.BR hostname ,
is the interface's corresponding host name.  The
.IR if ,
.I hostname
pair should be the same as the arguments passed to the
.B ifconfig (8)
command.
As with
.B ifconfig,
.B rarpd
must be invoked for each interface that the server wishes to support.
Therefore a gateway machine may invoke the
.B rarpd
multiple times, for example:
.LP
.RS
.B /usr/etc/rarpd ie0 host
.br
.B /usr/etc/rarpd ie1 host-backbone
.RE
.SH "FILES"
.PD 0
.TP 20
.B /etc/ethers
.\" .TP 
.\" .BI /var/yp/ domainname /ethers.byaddr.*
.\" .TP
.\" .BI /var/yp/ domainname /ethers.byname.*
.TP
.B /etc/hosts
.\" .TP
.\" .BI /var/yp/ domainname /hosts.byname.*
.PD
.SH "SEE ALSO"
.BR boot (8S),
.BR ifconfig (8C),
.BR ipallocd (8C),
.BR netconfig (8C),
.BR ethers (5),
.BR hosts (5),
.BR policies (5)
.LP
Finlayson, Ross, Timothy Mann, Jeffrey Mogul, and Marvin Theimer,
.IR "A Reverse Address Resolution Protocol" ,
.SM RFC
903,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
June 1984.
tactl (2),
.BR fstab (5),
.BR mtab (5)
S
shared lock applied
.TP
E
exclusive lock applied
.TP
Z
process is waiting for a shared or exclusive lock
.RE
.RE
.TP
.SM CN./share/man/man8/rc.8                                                                                  755       0      12         7172  4424741627   7426                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rc.8 1.18 89/03/27 SMI; from UCB 4.2
.TH RC 8 "22 March 1989"
.SH NAME
rc, rc.boot, rc.local \- command scripts for auto-reboot and daemons
.SH SYNOPSIS
.B /etc/rc
.LP
.B /etc/rc.boot
.LP
.B /etc/rc.local
.SH DESCRIPTION
.IX  "rc command"  ""  "\fLrc\fP \(em startup commands"
.B rc
and
.B rc.boot
are command scripts that are invoked by
.BR init (8)
to perform file system housekeeping and to start system daemons.
.B rc.local
is a script for commands that are pertinent only
to a specific site or client machine.
.LP
.B rc.boot
sets the machine name, and then, if coming up multi-user, runs
.BR fsck (8)
with the
.B \-p
option.  This \(lqpreens\(rq the disks of minor inconsistencies resulting
from the last system shutdown and checks for serious inconsistencies
caused by hardware or software failure.  If
.BR fsck (8)
detects a serious disk problem, it returns an error and
.BR init (8)
brings the system up in single-user mode.
When coming up single-user, when
.BR init (8)
is invoked by
.BR fastboot (8),
or when it is passed the
.B \-b
flag from
.BR boot (8S),
functions performed in the
.B rc.local
file, including this disk check, are skipped.
.LP
Next,
.B rc
runs.  If the system came up single-user,
.B rc
runs when the single-user shell terminates (see
.BR init (8)).
It mounts 4.2 filesystems and spawns a shell for
.BR /etc/rc.local ,
which mounts
.SM NFS
filesystems, and starts local daemons.  After
.B rc.local
returns,
.B rc
starts standard daemons, preserves editor files, clears
.BR /tmp ,
starts system accounting (if applicable), starts the network
(where applicable), and if enabled, runs
.BR savecore (8)
to preserve the core image after a crash.
.SH Sun386i 
These files
operate as described above with the following variations:
.LP
.BR fsck (8)
is invoked with the 
.B \-y
option to prevent users being put in single-user mode by happenstance.
.LP
.B rc.boot
invokes 
.BR netconfig (8C)
to configure the system for the network before
booting. 
.B netconfig 
is invoked before the
.B /usr
filesystem is mounted, because
.B /usr
might be mounted from a server.
.B netconfig
writes
.B /etc/net.conf
unless the
.B \-n
option is specified, controlling system booting. 
.LP
.B rc.boot
dynamically loads device drivers.
.LP
.B rc
invokes any programs found in
.B /var/recover
to clean up any operations partially completed when the system 
crashed or was shut down.  
.LP
.B rc.local
starts the automounter.
.LP
The file
.B /etc/net.conf 
stores these environment variables:
The
.SB VERBOSE
environment variable controls the verbosity of the messages from the
.B rc
script; its value is taken from
\fB\s-1NVRAM\s0\fP. 
The
.SB NETWORKED
environment variable controls whether services useful 
only on a networked system are started in
.BR /etc/rc.local . 
The 
.SB PNP
environment variable, set up during initial system installation,
controls whether local network configuration information is used
or whether that information comes from the network. 
(Using automatic system installation causes all systems
except boot servers to get this information
from the network, facilitating network reconfiguration.)
The 
.SB HOSTNAME
and 
.SB DOMAINNAME
environment variables, used together, help determine if this system is
a boot server or, with
.SB PNP
set to 
.BR no ,
control the host name and domain name. 
.SH FILES
.PD 0
.TP 20
.B /etc/rc
.TP
.B /etc/rc.boot
.TP
.B /etc/rc.local
.TP
.B /etc/net.conf
.TP
.B /var/recover/*
.TP 
.B /var/yp/*
.TP
.B /tmp
.PD
.SH SEE ALSO
.BR automount (8),
.BR boot (8S),
.BR fastboot (8),
.BR init (8),
.BR reboot (8),
.BR savecore (8),
.BR netconfig (8C)
.SH BUGS
The system message file
.B /var/adm/messages
is no longer created automatically.
image after a crash.
.SH Sun386i 
These files
operate as described above with the following variations:
.LP
.BR fsck (8)
is invoked with the 
.B \-y
option to prevent users being put in single-user mode by happenstance.
.LP
.B rc.boot
invokes 
.BR netconfig (8C)
to configure the system for the network before
booting. 
.B netconfig 
is invoked before the
.B /usr
filesystem is mounted, bec./share/man/man8/rc.boot.8                                                                             755       0      12           62  4424741627  10317                                                                                                                                                                                                                                                                                                                                                                      .so man8/rc.8
.\" @(#)rc.boot.8 1.4 89/03/27 SMI;

  	  rdate.8c  
  
  
  rdump.8   
    reboot.8  
  
    renice.8  
  
  
  
repquota.8        	restore.8        rexd.8c   $    	rexecd.8c $  8    
rlogind.8c 8  L    rmail.8c  L  \    rmt.8c    p    route.8c  p      	routed.8c       
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c       
rpc.rstatd.8c ./share/man/man8/rc.local.8                                                                            755       0      12           63  4424741627  10447                                                                                                                                                                                                                                                                                                                                                                      .so man8/rc.8
.\" @(#)rc.local.8 1.4 89/03/27 SMI;
  
  rdump.8   
    reboot.8 .8   
    renice.8  
  
  
  
repquota.8        	restore.8        rexd.8c   $    	rexecd.8c c   8    
rlogind.8c $  L    rmail.8c c 8  \    rmt.8c c  p    route.8c c        	routed.8c p      
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c   0    rpc.rusersd../share/man/man8/rdate.8c                                                                              755       0      12         1555  4424741630  10255                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rdate.8c 1.17 89/03/27 SMI; from UCB 4.2
.TH RDATE 8C "25 March 1989"
.SH NAME
rdate \- set system date from a remote host
.SH SYNOPSIS
.B /usr/ucb/rdate
.B hostname
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rdate command"  ""  "\fLrdate\fP \(em remote date"
.LP
.B rdate
sets the local date and
time from the
.B hostname
given as argument.
You must be super-user on the local system.
Typically
.B rdate
can be inserted as part of your
.B /etc/rc.local
startup script.
.SH FILES
.PD 0
.TP 20
.B /etc/rc.local
.PD
.SH BUGS
.LP
Could be modified to accept a list of hostnames and
try each until a valid date returned.  Better yet
would be to write a real date server that accepted broadcast requests.
 ,  
sendmail.8 d  
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8  ./share/man/man8/rdump.8                                                                               755       0      12           62  4424741630  10072                                                                                                                                                                                                                                                                                                                                                                      .so man8/dump.8
.\" @(#)rdump.8 1.4 89/03/27 SMI;
  renice.8 .8   
  
  
repquota.8         	restore.8        rexd.8c   $    	rexecd.8c c   8    
rlogind.8c    L    rmail.8c c    \    rmt.8c c  p    route.8c c c      	routed.8c  c      
rpc.etherd.8c       rpc.lockd.8c        
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c   0    rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc../share/man/man8/reboot.8                                                                              755       0      12         4776  4424741630  10315                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)reboot.8 1.25 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH REBOOT 8 "23 September 1987"
.SH NAME
reboot \- restart the operating system
.SH SYNOPSIS
.B /usr/etc/reboot
[
.B \-dnq
]
[
.I "boot arguments"
]
.SH DESCRIPTION
.IX  "reboot command"  ""  "\fLreboot\fP \(em system startup procedures"
.IX  "bootstrap procedures"  ""  "bootstrap procedures \(em \fLreboot\fP"
.IX  "autoboot procedures"  ""  "autoboot procedures \(em \fLreboot\fP"
.IX  "startup procedures"  ""  "startup procedures \(em \fLreboot\fP"
.LP
.B reboot
executes the
.BR reboot (2)
system call to restart the
kernel.  The kernel is loaded into memory by the
.SM PROM
monitor, which transfers control to it.
See
.BR boot (8S)
for details.
.LP
Although
.B reboot
can be run by the super-user at any time,
.BR shutdown (8)
is normally used first to warn all users logged in of the
impending loss of service.   See
.BR shutdown (8)
for details.
.LP
.B reboot
performs a
.BR sync (1)
operation on the disks, and then a multiuser reboot is initiated.
See
.BR init (8)
for details.
.LP
.B reboot
normally logs the reboot to the system log daemon,
.BR syslogd (8),
and places a shutdown record in the login accounting file
.BR /var/adm/wtmp .
These actions are inhibited if the
.B \-n
or
.B \-q
options are present.
.SS "Power Fail and Crash Recovery"
Normally, the system will reboot itself at power-up or after crashes.
.SH OPTIONS
.TP
.B \-d
Dump system core before rebooting.
.TP
.B \-n
Avoid the
.BR sync (1).
It can be used if a disk or the processor is on fire.
.TP
.B \-q
Quick.  Reboots quickly and ungracefully, without first shutting down
running processes.
.SS "Boot Arguments"
If a boot argument string is given, it is passed to
the boot command in the 
.SM PROM 
monitor.
The string must be quoted if it contains spaces or other characters
that could be interpreted by the shell.
If the first character of the boot argument string is a minus sign 
`\-' the string must be preceded by an option terminator string 
`\-\|\-' For example: `reboot \-\|\- \-s' to reboot and come up single user,
.RB ` "reboot vmunix.test" '
to reboot to a new kernel.
See
.BR boot (8S)
for details.
.SH FILES
.PD 0
.TP 20
.B /var/adm/wtmp
login accounting file
.PD
.SH "SEE ALSO"
.BR sync (1),
.BR reboot (2),
.BR fsck (8),
.BR halt (8),
.BR init (8),
.BR shutdown (8),
.BR syslogd (8),
.BR boot (8S),
.BR crash (8S)
CN./share/man/man8/renice.8                                                                              755       0      12         4322  4424741630  10253                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)renice.8 1.16 89/03/27 SMI; from UCB 4.2
.TH RENICE 8 "26 March 1989"
.SH NAME
renice \- alter priority of running processes
.SH SYNOPSIS
.B /usr/etc/renice
.I priority
.IR pid .\|.\|.
.LP
.B /usr/etc/renice
.I priority
[
.B \-p
.IR pid .\|.\|.
] [
.B \-g
.IR pgrp .\|.\|.
] [
.B \-u
.IR username .\|.\|.
]
.SH DESCRIPTION
.IX  "renice command"  ""  "\fLrenice\fP \(em change process priority"
.IX  "change" "process priority \(em \fLrenice\fP"
.IX  "alter process priority"  ""  "alter process priority \(em \fLrenice\fP"
.IX  process  "change priority"  ""  "change priority \(em \fLrenice\fP"
.B renice
alters the scheduling priority of one or more running processes.
.SH OPTIONS
By default, the processes to be affected are specified by
their process
.SM ID\s0s.
.I priority
is the new priority value.
.TP
.BI \-p " pid .\|.\|."
Specify a list of process
.SM ID\s0s.
.TP
.BI \-g " pgrp .\|.\|."
Specify a list of process group
.SM ID\s0s.
The processes in the specified process groups have their
scheduling priority altered.
.TP
.BI \-u " user .\|.\|."
Specify a list of user
.SM ID\s0s
or usernames.
All processes owned by each
.I user
have their scheduling altered.
.LP
Users other than the super-user may only alter the priority of
processes they own,
and can only monotonically increase their ``nice value''
within the range 0 to 20.
(This prevents overriding administrative fiats.)
The super-user may alter the priority of any process
and set the priority to any value in the range  \-20 \(em 20.
Useful priorities are:
19 (the affected processes will run only when nothing else
in the system wants to),
0 (the ``base'' scheduling priority) and
any negative value (to make things go very fast).
.LP
If only the priority is specified,
the current process (alternatively,
process group or user) is used.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
to map user names to user
.SM ID\s0's
.PD
.SH SEE ALSO
.BR pstat (8)
.SH BUGS
If you make the priority very negative,
then the process cannot be interrupted.
.LP
To regain control you must make the priority greater than zero.
.LP
Users other than the super-user cannot increase scheduling priorities
of their own processes, even if they were the ones that decreased the
priorities in the first place.
 "reboot vmunix.test" '
to reboot to a new kernel.
See
.BR boot (8S)
for details.
.SH FILES
.PD 0
.TP 20
.B /var/adm/wtmp
login accounting file
.PD
.SH "SEE ALSO"
.BR sync (1),
.BR reboot (2),
.BR fsck (8),
.BR halt (8),
.BR init (8),
.BR shutdown (8),
.BR syslogd (8),
.BR boot (8S),
.BR crash (8S)
CN./share/man/man8/repquota.8                                                                            755       0      12         3064  4424741630  10650                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)repquota.8 1.12 89/03/27 SMI; from UCB 4.2
.TH REPQUOTA 8 "9 September 1987"
.UC 4
.SH NAME
repquota \- summarize quotas for a file system
.SH SYNOPSIS
.B /usr/etc/repquota
[
.B \-v
]
.IR filesystem .\|.\|.
.LP
.B /usr/etc/repquota
[
.B \-av
]
.SH DESCRIPTION
.IX  "repquota command"  ""  "\fLrepquota\fP \(em summarize quotas"
.IX  "user quotas"  "repquota command"  ""  "\fLrepquota\fP \(em summarize quotas"
.IX  "disk quotas"  "repquota command"  ""  "\fLrepquota\fP \(em summarize quotas"
.IX  "quotas"  "repquota command"  ""  "\fLrepquota\fP \(em summarize quotas"
.IX  "file system"  "repquota command"  ""  "\fLrepquota\fP \(em summarize quotas"
.IX  "summarize file system quotas repquota"  ""  "summarize file system quotas \(em \fLrepquota\fP"
.IX  "report file system quotas repquota"  ""  "report file system quotas \(em \fLrepquota\fP"
.IX  display "file system quotas \(em \fLrepquota\fP"
.LP
.B repquota
prints a summary of the disc usage and quotas for the specified file
systems.  For each user the current number of files and amount of space
(in kilobytes) is printed, along with any quotas created with
.BR edquota (8).
.SH OPTIONS
.TP
.B \-a
Report on all file systems indicated in
.B /etc/fstab
to be read-write with quotas.
.TP
.B \-v
Report all quotas, even if there is no usage.
.LP
Only the super-user may view quotas which are not their own.
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system
root
.TP
.B /etc/fstab
default file systems
.PD
.SH SEE ALSO
.BR edquota (8),
.BR quota (1),
.BR quotacheck (8),
.BR quotactl (2),
.BR quotaon (8)
  M  yppush.8  K  <  N  ypserv.8    L  O  ypset.8   d  P  ypupdated.8c  d  x  Q  	ypwhich.8 d    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 umsswd
to map user names to user
.SM ID\s0's
.PD
.SH SEE ALSO
.BR pstat (8)
.SH BUGS
If you make the priority very negative,
then the process cannot be interrupted.
.LP
To regain control you must ma./share/man/man8/restore.8                                                                             755       0      12        24605  4424741631  10520                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)restore.8 1.26 89/03/27 SMI; from UCB 4.2
.TH RESTORE 8 "25 March 1989"
.SH NAME
restore, rrestore \- incremental file system restore
.SH SYNOPSIS
.B /usr/etc/restore
.B -irRtx
[
.IR filename
\&.\|.\|.
]
.SH DESCRIPTION
.IX  "restore command"  ""  "\fLrestore\fP \(em restore file system"
.IX  "restore file system"  ""  "restore file system \(em \fLrestore\fP"
.IX  "file system restore"  ""  "file system restore \(em \fLrestore\fP"
.IX  "incremental file system restore"  ""  "incremental file system restore \(em \fLrestore\fP"
.LP
.B restore
restores files from backup tapes created with the
.BR dump (8)
command.
.I options
is a string of at least one of the options listed below, along with
any modifiers and arguments you supply.  Remaining arguments to
.B restore
are the names of files (or directories whose files) are to be
restored to disk.  Unless the
.B h
modifier is in effect, a directory name refers
to the files it contains, and (recursively) its subdirectories and
the files they contain.
.SH OPTIONS
.LP
.TP 5n
.B  i
Interactive.
After reading in the directory information from the tape,
.B restore
invokes an interactive interface that allows you to browse
through the dump tape's directory hierarchy, and select
individual files to be extracted.  See
.BR "Interactive Commands" ,
below, for a description of available commands.
.TP 5n
.B r
Restore the entire tape.
Load the tape's full contents into the current directory.  This
option should only be used to restore a complete dump tape onto a clear
filesystem, or to restore an incremental dump tape after a full
\(lqlevel 
.BR 0  \(rq
restore.  For example:
.RS
.RS
.ft B
.nf
example# /usr/etc/newfs /dev/rxy0g
example# /usr/etc/mount /dev/xy0g /mnt
example# cd /mnt
example# restore r
.fi
.ft R
.RE
.RE
.IP
is a typical sequence to restore a \(lqlevel 
.BR 0 \(rq 
dump.  Another
.B restore
can be done to get an incremental dump in on top of this.
.TP
.B  R
Resume restoring.
.B restore
requests a particular tape of a multivolume set from which to
resume a full restore (see the
.B r
option above).  This allows
.B restore
to start from a checkpoint when it is interrupted in the middle of
a full restore.
.TP 5n
.B  t
Table of contents.  List each
.I filename
that appears on the tape.
If no
.I filename
argument is given, the root directory is listed.
This results in a list of all files on the tape, unless the
.B h
modifier is in effect. (The
.B t
option replaces the function of the old
.B dumpdir
program).
.TP 5n
.B  x
Extract the named files from the tape.  If a named file matches a
directory whose contents were written onto the tape, and the
.B h
modifier is not in effect, the directory is recursively extracted.
The owner, modification time, and mode are restored (if possible).
If no
.I filename
argument is given, the root directory is extracted.
This results in the entire tape being extracted unless the
.B h
modifier is in effect.
.SS "Modifiers"
.LP
Some of the following modifiers take arguments that are given as
separate words on the command line.  When more than one such modifier
appears within
.I options,
the arguments must appear in the same order as the modifiers that they
apply to.
.TP
.B c
Convert the contents of the dump tape to the new filesystem format.
.TP 5n
.B  d
Debug.  Turn on debugging output.
.TP 5n
.B h
Extract the actual directory, rather than the files that it references.
This prevents hierarchical restoration
of complete subtrees from the tape.
.TP 5n
.B m
Extract by inode numbers rather than by filename to avoid regenerating
complete pathnames.  This is useful if
only a few files are being extracted.
.TP 5n
.B  v
Verbose.
.B restore
displays the name of each file it restores, preceded by its file type.
.TP 5n
.B y
Do not ask whether to abort the restore in the event of tape errors.
.B restore
tries to skip over the bad tape block(s) and continue as best it can.
.TP 5n
.BI  b " factor"
Blocking factor.  Specify the blocking factor for tape reads.
By default,
.B restore
will attempt to figure out the block size of the tape.
Note: a tape block is 512 bytes.
.TP 5n
.BI f " dump-file"
Use
.I dump-file
instead of
.B /dev/rmt?
as the file to restore from.
If
.I dump-file
is specified as
.RB ` \- ',
.B restore
reads from the standard input.
.ne 5
This allows,
.BR dump (8)
and
.B restore
to be used in a pipeline to dump and restore a file system:
.RS
.IP
.B example# dump  0f \- /dev/rxy0g  |  (cd /mnt; restore xf \-)
.RE
.IP
If the name of the file is of the form
.IB machine : device
the restore is done from the specified machine over the network using
.BR rmt (8C).
Since
.B restore
is normally run by root,
the name of the local machine must appear in the
.B .rhosts
file of the remote machine.
If the file is specified as
.IB user @ machine : device\fR,
.B restore
will attempt to execute as the specified user on the remote machine.
The specified user must have a
.B .rhosts
file on the remote machine that allows root from the local machine.
.\"If
.\".B restore
.\"is called as
.\".B rrestore,
.\"the tape defaults to
.\".BR dumphost:/dev/rmt8\fR .
.\"To direct the input from a desired remote machine,
.\"set up an alias for
.\".B dumphost
.\"in the file
.\".BR /etc/hosts .
.TP 5n
.BI s " n"
Skip to the
.IR n 'th
file when there are multiple dump files on the same tape.
For example, the command:
.RS
.IP
.B example# restore xfs /dev/nrar0 5
.RE
.IP
would position you at the fifth file on the tape.
.SH USAGE
.SS Interactive Commands
.B restore
enters interactive mode when invoked with the
.B i
option.  Interactive commands are reminiscent of the shell.
For those commands that accept an argument, the default is the current
directory.
.HP
.B ls
[
.I directory
]
.br
List files in
.I directory
or the current directory, represented by a 
.RB ` . ' 
(period).
Directories are appended with a
.RB ` / '
(slash).
Entries marked for extraction are prefixed with a
.RB ` * '
(asterisk).
If the verbose option is in effect, inode numbers are also listed.
.TP
.BI cd  " directory"
Change to directory
.I directory
(within the dump-tape).
.TP
.B pwd
Print the full pathname of the current working directory.
.HP
.B add
[
.I filename
]
.br
Add the current directory, or the named file or directory
.B directory
to the list of files to extract.  If a directory is specified, add that
directory and its files (recursively) to
the extraction list (unless the
.B h
modifier is in effect).
.HP
.B delete
[
.I filename
]
.br
Delete the current directory, or the
named file or directory from the list of
files to extract.  If a directory is specified, delete that
directory and all its descendents from the extraction list (unless the
.B h
modifier is in effect).  The most expedient way to extract
a majority of files from a directory is to add that directory to the
extraction list, and then delete specific files to omit.
.TP
.B extract
Extract all files on the extraction list from the dump tape.
.B restore
asks which volume the user wishes to mount.
The fastest way to extract a
small number of files is to start with the
last tape volume and work toward
the first.
.TP
.B verbose
Toggle the status of the
.B v
modifier.  While
.B v
is in effect, the
.B ls
command lists the inode numbers of all entries, and
.B restore
displays information about each file as it is extracted.
.TP
.B help
Display a summary of the available commands.
.TP
.B quit
.B restore
exits immediately, even if the extraction list is not empty.
.SH FILES
.PD 0
.TP 20
.B /dev/rmt8
the default tape drive
.TP
.B dumphost:/dev/rmt8
the default tape drive if called as
.B rrestore
.TP
.B /tmp/rstdir*
file containing directories on the tape
.TP
.B /tmp/rstmode*
owner, mode, and timestamps for directories
.TP
.B \&./restoresymtable
information passed between incremental restores
.PD
.SH SEE ALSO
.BR dump (8),
.BR mkfs (8),
.BR mount (8),
.BR newfs (8),
.BR rmt (8C)
.SH DIAGNOSTICS
.B restore
complains about bad option characters.
.LP
Read errors result in complaints.  If
.B y
has been specified, or the user responds
.BR y ,
.B restore
will attempt to continue.
.LP
If the dump extends over more than one tape,
.B restore
asks the user to change tapes.  If the
.B x
or
.B i
option has been specified,
.B restore
also asks which volume the user wishes to mount.
.LP
There are numerous consistency checks that can be listed by
.BR restore .
Most checks are self-explanatory or can \(lqnever happen\(rq.
Common errors are given below.
.TP
.B Converting to new file system format.
A dump tape created from the old file system has been loaded.
It is automatically converted to the new file system format.
.TP
.IB filename ": not found on tape"
The specified file name was listed in the tape directory,
but was not found on the tape.
This is caused by tape read errors while looking for the file,
and from using a dump tape created on an active file system.
.TP
.BI "expected next file " inumber ", got " inumber
A file that was not listed in the directory showed up.
This can occur when using a dump tape created on an active file system.
.TP
.B Incremental tape too low
When doing an incremental restore,
a tape that was written before the previous incremental tape,
or that has too low an incremental level has been loaded.
.TP
.B
Incremental tape too high 
When doing incremental restore,
a tape that does not begin its coverage where the previous incremental
tape left off,
or one that has too high an incremental level has been loaded.
.br
.ne 8
.TP
.BI "Tape read error while restoring " filename
.PD 0
.TP
.B "Tape read error while skipping over inode " inumber
.TP
.B "Tape read error while trying to resynchronize"
.TP
.B "A tape read error has occurred."
If a file name is specified,
then its contents are probably partially wrong.
If an inode is being skipped or the tape is trying to resynchronize,
then no extracted files have been corrupted,
though files may not be found on the tape.
.ne 4
.TP
.BI "resync restore, skipped " num " blocks
After a tape read error,
.B restore
may have to resynchronize itself.
This message lists the number of blocks that were skipped over.
.PD
.SH BUGS
.B restore
can get confused when doing incremental restores from
dump tapes that were made on active file systems.
.LP
A \(lqlevel 
.BR 0 \(rq 
dump must be done after a full restore.
Because 
.B restore 
runs in user mode,
it has no control over inode allocation;
this means that
.B restore
repositions the files, although it
does not change their contents. 
Thus, a full dump must be done to get a
new set of directories reflecting the new file positions, so that later
incremental dumps will be correct.
ers.
.TP
.SM PGRP
This stream's process group number.
.TP
.SM FLG
Miscellaneous stream state variables encoded thus:
.RS
.R./share/man/man8/rexd.8c                                                                               755       0      12         3155  4424741631  10117                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rexd.8c 1.18 89/03/27 SMI;
.TH REXD 8C "25 March 1989"
.SH NAME
rexd, rpc.rexd \- RPC-based remote execution server
.SH SYNOPSIS
.B /usr/etc/rpc.rexd
.RB [ \-s ]
.SH DESCRIPTION
.IX rexd "" "\fLrexd\fR \(em remote execution daemon"
.LP
.B rexd
is the Sun
.SM RPC
server for remote program execution.
This daemon is started by
.BR inetd (8)
whenever a remote execution request is made,
.LP
For noninteractive programs, the standard file
descriptors are connected directly to
.SM TCP
connections.
Interactive programs involve pseudo-terminals, in a fashion that
is similar to the login sessions provided by
.BR rlogin (1).
This daemon may use the
.SM NFS
to mount file systems specified
in the remote execution request.
.SH FILES
.PD 0
.TP 20
.B /dev/ttyp\fIn\fR
pseudo-terminals used for interactive mode
.TP
.B /etc/passwd
authorized users
.TP
.B /tmp_rex/rexd??????
temporary mount points for remote file systems.
.PD
.SH  OPTIONS
.TP
.B \ -s
Secure.  When specified, requests must have valid
des credentials.  If the request does not have
a des credential it is rejected.  The default
publickey credential is rejected.  Only newer
.B on
commands send des credentials.

If access is denied with an Authentication error, you may have to set your publickey
with the
.BR chkey (1)
command.

.SH "SEE ALSO"
.LP
.BR inetd (8),
.BR on (1),
.BR rlogin (1),
.BR chkey (1),
.BR rex (3),
.BR exports (5),
.BR publickey (5)
.BR inetd.conf (5)
.SH DIAGNOSTICS
.LP
Diagnostic messages are normally printed on the console, and
returned to the requestor.
.SH RESTRICTIONS
Root cannot execute commands using
.B rexd
client programs such as
.BR on (1).
pwhich.8 d    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 um
modifier is in effect).
.HP
.B delete
[
.I filename
]
.br
Delete the current directory, or the
named file or directory from the list of
files to extract.  If a directory is specified, delete that
directory and all its descendents from the extr./share/man/man8/rexecd.8c                                                                             755       0      12         6507  4424741631  10433                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rexecd.8c 1.15 89/03/27 SMI; from UCB 4.2
.TH REXECD 8C "22 March 1989"
.SH NAME
rexecd, in.rexecd \- remote execution server
.SH SYNOPSIS
.B /usr/etc/in.rexecd
.IB host . port
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rexecd command"  ""  "\fLrexecd\fP \(em remote execution server"
.IX  "remote execution server"  ""  "remote execution server \(em \fLrexecd\fP"
.IX  servers  rexecd  ""  "\fLrexecd\fP \(em remote execution server"
.B rexecd
is the server for the
.BR rexec (3N)
routine.  The server provides remote execution facilities
with authentication based on user names and encrypted passwords.
It is invoked automatically as needed by
.BR inetd (8C),
and then executes the following protocol:
.TP
\(bu
The server reads characters from the socket up
to a null
.RB ( \e0 )
byte.  The resultant string is interpreted as an
.SM ASCII
number, base 10.
.TP
\(bu
If the number received in step 1 is non-zero,
it is interpreted as the port number of a secondary
stream to be used for the
.BR stderr .
A second connection is then created to the specified
port on the client's machine.
.TP
\(bu
A null terminated user name of at most 16 characters
is retrieved on the initial socket.
.TP
\(bu
A null terminated, encrypted, password of at most
16 characters is retrieved on the initial socket.
.TP
\(bu
A null terminated command to be passed to a
shell is retrieved on the initial socket.  The length of
the command is limited by the upper bound on the size of
the system's argument list.
.TP
\(bu
.B rexecd
then validates the user as is done at login time
and, if the authentication was successful, changes
to the user's home directory, and establishes the user
and group protections of the user.
If any of these steps fail the connection is
aborted with a diagnostic message returned.
.TP
\(bu
A null byte is returned on the connection associated
with the
.B stderr
and the command line is passed to the normal login
shell of the user.  The
shell inherits the network connections established by
.BR rexecd .
.SH "SEE ALSO"
.BR inetd (8C),
.BR rexec (3N)
.SH DIAGNOSTICS
All diagnostic messages are returned on the connection
associated with the
.BR stderr ,
after which any network connections are closed.
An error is indicated by a leading byte with a value of
1 (0 is returned in step 7 above upon successful completion
of all the steps prior to the command execution).
.TP
.B username too long
The name is longer than 16 characters.
.TP
.B password too long
The password is longer than 16 characters.
.TP
.B command too long
The command line passed exceeds the size of the argument
list (as configured into the system).
.TP
.B Login incorrect.
No password file entry for the user name existed.
.TP
.B Password incorrect.
The wrong password was supplied.
.TP
.B No remote directory.
The
.B chdir
command to the home directory failed.
.TP
.B Try again.
A
.B fork
by the server failed.
.TP
.BR /usr/bin/sh: " .\|.\|."
The user's login shell could not be started.
.SH BUGS
Indicating
.RB ` "Login incorrect" '
as opposed to
.RB ` "Password incorrect" '
is a security breach which allows people to probe a system for users
with null passwords.
.LP
A facility to allow all data exchanges
to be encrypted should be present.
 wishes to mount.
The fastest way to extract a
small number of files is to start with the
last tape volume and work toward
the first.
.TP
.B verbose
Toggle the status of the
.B v
modifi./share/man/man8/rlogind.8c                                                                            755       0      12         5670  4424741631  10617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rlogind.8c 1.15 89/03/27 SMI; from UCB 4.2
.TH RLOGIND 8C "22 March 1989"
.SH NAME
rlogind, in.rlogind \- remote login server
.SH SYNOPSIS
.B /usr/etc/in.rlogind
.IB host . port
.SH DESCRIPTION
.IX  "rlogind command"  ""  "\fLrlogind\fP \(em remote login server"
.IX  "remote login" "server \(em \fLrlogind\fP"
.IX  servers  rlogind  ""  "\fLrlogind\fP \(em remote login server"
.B rlogind
is the server for the
.BR rlogin (1C)
program.  The server provides a remote login facility
with authentication based on privileged port numbers.
.LP
.B rlogind
is invoked by
.BR inetd (8C)
when a remote login connection is established,
and executes the following protocol:
.TP
\(bu
The server checks the client's source port.
If the port is not in the range 0-1023, the server
aborts the connection.  The client's address and port number
are passed as arguments to
.B rlogind
by
.B inetd
in the form
.IB host . port
with host in hex and port in decimal.
.TP
\(bu
The server checks the client's source address.
If the address is associated with a host for which no
corresponding entry exists in the host name data base (see
.BR hosts (5)),
the server aborts the connection.
.LP
Once the source port and address have been checked,
.B rlogind
allocates a pseudo-terminal (see
.BR pty (4)),
and manipulates file descriptors so that the slave
half of the pseudo-terminal becomes the
.BR stdin ,
.BR stdout ,
and
.B stderr
for a login process.
The login process is an instance of the
.BR login (1)
program, invoked with the
.B \-r
option.  The login process then proceeds with the authentication
process as described in
.BR rshd (8C),
but if automatic authentication fails, it reprompts the user
to login as one finds on a standard terminal line.
.LP
The parent of the login process manipulates the master side of
the pseudo-terminal, operating as an intermediary
between the login process and the client instance of the
.B rlogin
program.  In normal operation, the packet protocol described
in
.BR pty (4)
is invoked to provide
.BR ^S / ^Q
type facilities and propagate
interrupt signals to the remote programs.  The login process
propagates the client terminal's baud rate and terminal type,
as found in the environment variable,
.SB TERM\s0\fR;
see
.BR environ (5V).
.SH "SEE ALSO
.BR inetd (8C)
.SH DIAGNOSTICS
All diagnostic messages are returned on the connection
associated with the
.BR stderr ,
after which any network connections are closed.
An error is indicated by a leading byte with a value of 1.
.TP
.B Hostname for your address unknown.
No entry in the host name database existed for
the client's machine.
.TP
.B Try again.
A
.I fork
by the server failed.
.TP
.BR /usr/bin/sh: " .\|.\|."
The user's login shell could not be started.
.SH BUGS
The authentication procedure used here assumes the integrity
of each client machine and the connecting medium.  This is
insecure, but is useful in an ``open'' environment.
.LP
A facility to allow all data exchanges to be encrypted should be
present.
 /tmp/rstdir*
file containing directories on the tape
.TP
.B /tmp/rstmod./share/man/man8/rmail.8c                                                                              755       0      12         1222  4424741631  10252                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rmail.8c 1.11 89/03/27 SMI; from UCB 4.2
.TH RMAIL 8C "9 September 1987"
.SH NAME
rmail \- handle remote mail received via uucp
.SH SYNOPSIS
.B rmail
.IR recipient .\|.\|.
.SH DESCRIPTION
.IX  "rmail command"  ""  "\fLrmail\fP \(em process remote mail"
.B rmail
interprets incoming mail received through
.BR uucp (1C),
collapsing ``From'' lines in the form generated by
.BR binmail (1)
into a single line of the form
.IB return-path ! sender\fR,
and passing the processed mail on to
.BR sendmail (8).
.LP
.B rmail
is explicitly designed for use with
.BR uucp (1C)
and
.BR sendmail (8).
.SH "SEE ALSO"
.BR binmail (1),
.BR uucp (1C),
.BR sendmail (8)
re.8 c  
  ,  
sendmail.8    
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8       =  tic.8v c    2  	sprayd.8c  c  (  3  statd.8c      <  4  sticky.8    P  5  	sundiag.8 (  h  6  suninstall.8  h    7  sunupgrade.8      8  swapon.8      9  	./share/man/man8/rmt.8c                                                                                755       0      12         6625  4424741633   7766                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)rmt.8c 1.20 89/03/27 SMI; from UCB 4.3
.\"
.TH RMT 8C "22 March 1989"
.SH NAME
rmt \- remote magtape protocol module
.SH SYNOPSIS
.B /usr/etc/rmt
.SH DESCRIPTION
.IX  "rmt command"  ""  "\fLrmt\fP \(em remote magtape protocol server"
.IX  "remote magtape protocol server"  ""  "remote magtape protocol server \(em \fLrmt\fP"
.B rmt
is a program used by the remote dump and restore programs
in manipulating a magnetic tape drive through an interprocess
communication connection.
.B rmt
is normally started up with an
.BR rexec (3N)
or
.BR rcmd (3N)
call.
.LP
The
.B rmt
program accepts requests specific to the manipulation of
magnetic tapes, performs the commands, then responds with
a status indication.  All responses are in
.SM ASCII
and in one of two forms.
Successful commands have responses of
.IP
.BI A number\en
.LP
where
.I number
is an
.SM ASCII
representation of a decimal number.
Unsuccessful commands are responded to with
.IP
.BI E error-number \en error-message \en
.LP
where
.I error-number
is one of the possible error
numbers described in
.BR intro (2)
and
.I error-message
is the corresponding error string as printed
from a call to
.BR perror (3).
The protocol is comprised of the
following commands:
.RS
.TP 15
.B S
Return the status of the open device, as
obtained with a
.SB MTIOCGET
.B ioctl
call.  If the operation was successful,
an \(lqack\(rq is sent with the size of the
status buffer, then the status buffer is
sent (in binary).
.TP
.BI C device
Close the currently open device.  The
.I device
specified is ignored.
.TP
.BI I operation \en count \en
Perform a
.SB MTIOCOP
.BR ioctl (2)
command using the specified parameters.
The parameters are interpreted as the
.SM ASCII
representations of the decimal values to place in the
.I mt_op
and
.I mt_count
fields of the structure used in the
.B ioctl
call.  The return value is the
.I count
parameter when the operation is successful.
.TP
.BI L whence \en offset \en
Perform an
.BR lseek (2)
operation using the specified parameters.
The response value is that returned from the
.B lseek
call.
.TP
.BI O device \en mode \en
Open the specified
.I device
using the indicated
.IR mode .
.I device
is a full pathname and
.I mode
is an
.SM ASCII
representation of a decimal
number suitable for passing to
.BR open (2V).
If a device had already been opened, it is
closed before a new open is performed.
.TP
.BI R count
Read
.I count
bytes of data from the open device.
.B rmt
performs the requested
.BR read (2V)
and responds with
.BI A count-read\en
if the read was
successful; otherwise an error in the
standard format is returned.  If the read
was successful, the data read is then sent.
.TP
.BI W count
Write data onto the open device.
.B rmt
reads
.I count
bytes from the connection, aborting if
a premature
.SM EOF
is encountered.  The response value is that returned from the
.BR write (2V)
call.
.RE
.LP
Any other command causes
.B rmt
to exit.
.SH DIAGNOSTICS
All responses are of the form described above.
.SH "SEE ALSO"
.BR intro (2),
.BR ioctl (2),
.BR lseek (2),
.BR open (2V),
.BR read (2V),
.BR write (2V),
.BR perror (3),
.BR rcmd (3N),
.BR rexec (3N),
.BR mtio (4),
.BR dump (8),
.BR restore (8)
.SH BUGS
.LP
People tempted to use this for a remote file access protocol
are discouraged.

 15
.B S
Return the status of the open device, as
obtained with a
.SB MTIOCGET
.B ioctl
call.  If the opera./share/man/man8/route.8c                                                                              755       0      12         7704  4424741633  10321                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)route.8c 1.19 89/03/27 SMI; from UCB 4.3
.\"
.TH ROUTE 8C "22 March 1989"
.SH NAME
route \- manually manipulate the routing tables
.SH SYNOPSIS
.B /usr/etc/route
[
.B \-fn
]
.BR add \||\| delete
[
.BR host \||\| net
]
.I destination
[
.I gateway
[
.I metric
] ]
.SH AVAILABILITY
.LP
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "route command"  ""  "\fLroute\fP \(em manipulate routing tables"
.LP
.B route
manually manipulates the network routing tables normally maintained by
the system routing daemon,
.BR routed (8C),
or through default routes and redirect messages from routers.
.B route
allows the super-user to operate directly on the routing table
for the specific host or network indicated by
.IR destination .
The
.I gateway
argument, if present, indicates the network gateway to which packets
should be addressed.  The
.I metric
argument indicates the number of ``hops'' to the
.IR destination .
The
.I metric
is required for
.I add
commands; it must be zero if the destination is on a directly-attached network,
and nonzero if the route utilizes one or more gateways.
.LP
The
.B add
command instructs
.B route
to add a route to
.IR destination .
.B delete
deletes a route.
.LP
Routes to a particular host must be distinguished from those to
a network.
The optional keywords
.B net
and
.B host
force the destination to be interpreted as a network or a host, respectively.
Otherwise, if the destination has a ``local address part'' of
\fB\s-1INADDR_ANY\s0\fP,
then the route is
assumed to be to a network; otherwise, it is presumed to be a
route to a host.  
If the route is to a destination connected
by a gateway, the
.I metric
parameter should be greater than 0.  
If adding a route with metric 0,
the gateway given is the address of this host on the common network,
indicating the interface to be used directly for transmission.
All symbolic names specified for a
.I destination
or
.I gateway
are looked up in the hosts database using
.BR gethostbyname (3N).
If this lookup fails, then the name is looked up
in the networks database using
.BR getnetbyname (3N).
``default'' is also a valid destination,
which is used for all routes if there is
no specific host or network route.
.SH OPTIONS
.TP
.B \-f
Flush the routing tables of all gateway entries.
If this is used in conjunction with one of the commands
described above,
.B route
flushes the gateways before preforming the command.
.TP
.B \-n
Prevents attempts to print host and network names symbolically
when reporting actions.
This is useful, for example, when all name servers are down on your
local net, so you need a route before you can contact the name server.
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
.TP
.B /etc/networks
.PD
.SH "SEE ALSO"
.BR ioctl (2),
.BR gethostbyname (3N),
.BR getnetbyname (3N),
.BR routing (4N),
.BR routed (8C)
.SH DIAGNOSTICS
.HP
.BR add " ["
.BR host \||\| net ]
.IR destination : gateway
.br
The specified route is being added to the tables.  The
values printed are from the routing table entry supplied
in the
.BR ioctl (2)
call.
.HP
.BR delete " ["
.BR host \||\| net ]
.IR destination : gateway
.br
The specified route is being deleted.
.TP
.IB "destination" done
When the
.B \-f
flag is specified, each routing table entry deleted
is indicated with a message of this form.
.TP
.B "Network is unreachable"
An attempt to add a route failed because the gateway listed was
not on a directly-connected network.  Give the next-hop gateway
instead.
.br
.ne 8
.TP
.B "not in table"
A delete operation was attempted for an entry that
is  not in the table.
.TP
.B "routing table overflow"
An add operation was attempted, but the system was
unable to allocate memory to create the new entry.
": not found on tape"
The specified file name was listed in ./share/man/man8/routed.8c                                                                             755       0      12        15037  4424741633  10503                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)routed.8c 1.17 89/03/27 SMI; from UCB 4.2
.TH ROUTED 8C "22 March 1989"
.SH NAME
routed, in.routed \- network routing daemon
.SH SYNOPSIS
.B /usr/etc/in.routed
[
.B \-qstv
] [
.I logfile
]
.SH DESCRIPTION
.IX  "routed command"  ""  "\fLrouted\fP \(em network routing daemon"
.IX  "network routing daemon"  ""  "network routing daemon \(em \fLrouted\fP"
.B routed
is invoked at boot time to manage the network routing tables.
The routing daemon uses a variant of the Xerox NS Routing
Information Protocol in maintaining up to date kernel routing
table entries.
.LP
In normal operation
.B routed
listens on
.BR udp (4P)
socket 520 (decimal)
for routing information packets.  If the host is an
internetwork router, it periodically supplies copies
of its routing tables to any directly connected hosts
and networks.
.LP
When
.B routed
is started, it uses the
.SB SIOCGIFCONF
.B ioctl
(see
.BR ioctl (2))
to find those
directly connected interfaces configured into the
system and marked \(lqup\(rq (the software loopback interface
is ignored).  If multiple interfaces
are present, it is assumed the host will forward packets
between networks.
.B routed
then transmits a
.I request
packet on each interface (using a broadcast packet if
the interface supports it) and enters a loop, listening
for
.I request
and
.I response
packets from other hosts.
.LP
When a
.I request
packet is received,
.B routed
formulates a reply based on the information maintained in its
internal tables.  The
.I response
packet generated contains a list of known routes, each marked
with a \(lqhop count\(rq metric (a count of 16, or greater, is
considered \(lqinfinite\(rq).  The metric associated with each
route returned provides a metric
.IR "relative to the sender" .
.LP
.I request
packets received by
.B routed
are used to update the routing tables if one of the following
conditions is satisfied:
.TP
\(bu
No routing table entry exists for the destination network
or host, and the metric indicates the destination is
\(lqreachable\(rq
(that is, the hop count is not infinite).
.TP
\(bu
The source host of the packet is the same as the router in the
existing routing table entry.  That is, updated information is
being received from the very internetwork router through which
packets for the destination are being routed.
.TP
\(bu
The existing entry in the routing table has not been updated for
some time (defined to be 90 seconds) and the route is at least
as cost effective as the current route.
.TP
\(bu
The new route describes a shorter route to the destination than
the one currently stored in the routing tables; the metric of
the new route is compared against the one stored in the table
to decide this.
.LP
When an update is applied,
.B routed
records the change in its internal tables and generates a
.I response
packet to all directly connected hosts and networks.
.B routed
waits a short period
of time (no more than 30 seconds) before modifying the kernel's
routing tables to allow possible unstable situations to settle.
.LP
In addition to processing incoming packets,
.B routed
also periodically checks the routing table entries.
If an entry has not been updated for 3 minutes, the entry's metric
is set to infinity and marked for deletion.  Deletions are delayed
an additional 60 seconds to insure the invalidation is propagated
throughout the internet.
.LP
Hosts acting as internetwork routers gratuitously supply their
routing tables every 30 seconds to all directly connected hosts
and networks.
.LP
Supplying the
.B \-s
option forces
.B routed
to supply routing information whether it is acting as an internetwork
router or not.
The
.B \-q
option is the opposite of the
.B \-s
option.  If the
.B \-t
option is specified, all packets sent or received are
printed on the standard output.  In addition,
.B routed
will not divorce itself from the controlling terminal
so that interrupts from the keyboard will kill the process.
Any other argument supplied is interpreted as the name
of file in which
.BR routed 's
actions should be logged.  This log contains information
about any changes to the routing tables and a history of
recent messages sent and received which are related to
the changed route.
The
.B \-v
option allows a logfile to be created showing the
changes made to the routing tables with a timestamp.
.LP
In addition to the facilities described above,
.B routed
supports the notion of \(lqdistant\(rq
.I passive
and
.I active
gateways.  When
.B routed
is started up, it reads the file
.B /etc/gateways
to find gateways which may not be identified using
the
.SB SIOGIFCONF
.BR ioctl .
Gateways specified in this manner should be marked passive
if they are not expected to exchange routing information,
while gateways marked active
should be willing to exchange routing information (that is,
they should have a
.B routed
process running on the machine).
Passive gateways are maintained in the
routing tables forever and information
regarding their existence is included in
any routing information transmitted.
Active gateways are treated equally to network
interfaces.  Routing information is distributed
to the gateway and if no routing information is
received for a period of the time, the associated
route is deleted.
.LP
The
.B /etc/gateways
is comprised of a series of lines, each in
the following format:
.IP
.BI "< net | host > " filename1 " gateway " filename2 " metric " value
.B < passive | active >
.LP
The
.B net
or
.B host
keyword indicates if the route is to a network or specific host.
.LP
.I filename1
is the name of the destination network or host.  This may be a
symbolic name located in
.B /etc/networks
or
.BR /etc/hosts ,
or an Internet address specified in \(lqdot\(rq notation; see
.BR inet (3N).
.LP
.I filename2
is the name or address of the gateway to which messages should
be forwarded.
.LP
.I value
is a metric indicating the hop count to the destination host
or network.
.LP
The keyword
.B passive
or
.B active
indicates if the gateway should be treated as
passive or active
(as described above).
.SH FILES
.PD 0
.TP 20
.B /etc/gateways
for distant gateways
.TP
.B /etc/networks
.TP
.B /etc/hosts
.PD
.SH "SEE ALSO"
.BR ioctl (2),
.BR inet (3N),
.BR udp (4P)
.\".LP
.\"Internet Transport Protocols, XSIS 028112, Xerox System Integration
.\"Standard.  (Sun 800-1066-01)
.SH BUGS
The kernel's routing tables may not correspond to those of
.B routed
for short periods of time while processes utilizing existing
routes exit; the only remedy for this is to place the routing
process in the kernel.
.LP
.B routed
should listen to intelligent interfaces, such as an
.SM IMP\s0,
and
to error protocols, such as
.SM ICMP\s0,
to gather more information.
the routing table entries.
If an entry has not been updated for 3 minutes, the entry's metric
is set to infinity and marked for deletion.  Deletions are delayed
an additional 60 seconds to insure the invalidation is propagated
throughout the internet.
.LP
Hosts acting as internetwork routers gratuitously supply their
routing tables every 30 seconds to all directly connected hosts
and networks.
.LP
Supplying the
.B \-s
option forces
.B routed
to supply routing information wheth./share/man/man8/rpc.etherd.8c                                                                         755       0      12           73  4424741634  11152                                                                                                                                                                                                                                                                                                                                                                      .so man8/etherd.8c
.\" @(#)rpc.etherd.8c 1.3 89/03/27 SMI;
    
rpc.mountd.8c       rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c   0    rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c !    #  
rquotad.8c     $  
rrestore.8     %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c    
L  )./share/man/man8/rpc.lockd.8c                                                                          755       0      12           71  4424741634  10771                                                                                                                                                                                                                                                                                                                                                                      .so man8/lockd.8c
.\" @(#)rpc.lockd.8c 1.3 89/03/27 SMI;
     rpc.rexd.8c        rpc.rquotad.8c        
rpc.rstatd.8c     0    rpc.rusersd.8c   H    
rpc.rwalld.8c  0  `    
rpc.sprayd.8c H  x    rpc.statd.8c  `        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  ./share/man/man8/rpc.mountd.8c                                                                         755       0      12           73  4424741634  11205                                                                                                                                                                                                                                                                                                                                                                      .so man8/mountd.8c
.\" @(#)rpc.mountd.8c 1.3 89/03/27 SMI;
  rpc.rquotad.8c        
rpc.rstatd.8c     0    rpc.rusersd.8c    H    
rpc.rwalld.8c    `    
rpc.sprayd.8c  0  x    rpc.statd.8c  H        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore./share/man/man8/rpc.rexd.8c                                                                           755       0      12           67  4424741634  10644                                                                                                                                                                                                                                                                                                                                                                      .so man8/rexd.8c
.\" @(#)rpc.rexd.8c 1.3 89/03/27 SMI;
    
rpc.rstatd.8c     0    rpc.rusersd.8c    H    
rpc.rwalld.8c     `    
rpc.sprayd.8c    x    rpc.statd.8c   0        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e./share/man/man8/rpc.rquotad.8c                                                                        755       0      12           75  4424741634  11360                                                                                                                                                                                                                                                                                                                                                                      .so man8/rquotad.8c
.\" @(#)rpc.rquotad.8c 1.3 89/03/27 SMI;
   rpc.rusersd.8c 0  H    
rpc.rwalld.8c H  `    
rpc.sprayd.8c `  x    rpc.statd.8c  x        rpc.yppasswdd.8c       !   rpc.ypupdated.8c  !    "  
rpcinfo.8c     #  
rquotad.8c c    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c c   
$  '  
rusersd.8c d  
8  (  	rwalld.8c  8  
L  )  rwhod.8c  d.  
\  *  sa.8 .8c  
p  +  
savecore.8 o  
  ,  
sendmail.8 8  
  -  setup_client./share/man/man8/rpc.rstatd.8c                                                                         755       0      12           73  4424741634  11200                                                                                                                                                                                                                                                                                                                                                                      .so man8/rstatd.8c
.\" @(#)rpc.rstatd.8c 1.3 89/03/27 SMI;
H    
rpc.rwalld.8c  0  `    
rpc.sprayd.8c H  x    rpc.statd.8c  `        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 8  
  .  setup_exec.8./share/man/man8/rpc.rusersd.8c                                                                        755       0      12           75  4424741635  11371                                                                                                                                                                                                                                                                                                                                                                      .so man8/rusersd.8c
.\" @(#)rpc.rusersd.8c 1.3 89/03/27 SMI;
   
rpc.sprayd.8c  0  x    rpc.statd.8c  H        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 e  
  .  setup_exec.8 8 8  
  /  showmount.8 ./share/man/man8/rpc.rwalld.8c                                                                         755       0      12           73  4424741635  11165                                                                                                                                                                                                                                                                                                                                                                      .so man8/rwalld.8c
.\" @(#)rpc.rwalld.8c 1.3 89/03/27 SMI;
x    rpc.statd.8c   0        rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 e  
  .  setup_exec.8 8 e  
  /  showmount.8   
  0  
shutdown.8 n  
./share/man/man8/rpc.sprayd.8c                                                                         755       0      12           73  4424741635  11202                                                                                                                                                                                                                                                                                                                                                                      .so man8/sprayd.8c
.\" @(#)rpc.sprayd.8c 1.3 89/03/27 SMI;
      rpc.yppasswdd.8c      !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 e  
  .  setup_exec.8 8 e  
  /  showmount.8   
  0  
shutdown.8 n  
  1  spray.8c own     =./share/man/man8/rpc.statd.8c                                                                          755       0      12           71  4424741635  11015                                                                                                                                                                                                                                                                                                                                                                      .so man8/statd.8c
.\" @(#)rpc.statd.8c 1.3 89/03/27 SMI;
     !   rpc.ypupdated.8c      "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 e  
  .  setup_exec.8 8 e  
  /  showmount.8   
  0  
shutdown.8 n  
  1  spray.8c own     =  tic.8v a    2  	spra./share/man/man8/rpc.yppasswdd.8c                                                                      755       0      12          101  4424741635  11726                                                                                                                                                                                                                                                                                                                                                                      .so man8/yppasswdd.8c
.\" @(#)rpc.yppasswdd.8c 1.3 89/03/27 SMI;
   "  
rpcinfo.8c c    #  
rquotad.8c .    $  
rrestore.8 .    %  rshd.8c   
  &  	rstatd.8c hd  
$  '  
rusersd.8c 8  
8  (  	rwalld.8c d.  
L  )  rwhod.8c d.8  
\  *  sa.8 who  
p  +  
savecore.8 8  
  ,  
sendmail.8 e  
  -  setup_client.8 e  
  .  setup_exec.8 8 e  
  /  showmount.8   
  0  
shutdown.8 n  
  1  spray.8c own     =  tic.8v a    2  	sprayd.8c c.  (  3  statd.8c./share/man/man8/rpc.ypupdated.8c                                                                      755       0      12          101  4424741635  11707                                                                                                                                                                                                                                                                                                                                                                      .so man8/ypupdated.8c
.\" @(#)rpc.ypupdated.8c 1.3 89/03/27 SMI;
 
rquotad.8c i    $  
rrestore.8 o    %  rshd.8c   
  &  	rstatd.8c    
$  '  
rusersd.8c a  
8  (  	rwalld.8c se  
L  )  rwhod.8c wal  
\  *  sa.8    
p  +  
savecore.8   
  ,  
sendmail.8 e  
  -  setup_client.8 l  
  .  setup_exec.8 ent  
  /  showmount.8   
  0  
shutdown.8 w  
  1  spray.8c hut     =  tic.8v     2  	sprayd.8c    (  3  statd.8c pra  <  4  sticky.8 tat  P./share/man/man8/rpcinfo.8c                                                                            755       0      12         6221  4424741636  10617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rpcinfo.8c 1.26 89/03/27 SMI;
.TH RPCINFO 8C "22 March 1989"
.SH NAME
rpcinfo \- report RPC information
.SH SYNOPSIS
.B "rpcinfo \-p"
[
.I host
]
.LP
.B "rpcinfo"
[
.B \-n
.I portnum
]
.B \-u
.I host
.I program
[
.I version
]
.LP
.B "rpcinfo"
[
.B \-n
.I portnum
]
.B \-t
.I host
.I program
[
.I version
]
.LP
.B "rpcinfo \-b"
.I program
.I version
.LP
.B "rpcinfo \-d"
.I program
.I version
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rpcinfo command"  ""  "\fLrpcinfo\fP \(em report RPC information"
.IX RPC "report RPC information \(em \fLrpcinfo\fR"
.B rpcinfo
makes an
.SM RPC
call to an
.SM RPC
server and reports what it finds.
.SH OPTIONS
.TP
.B \-p
Probe the portmapper on
.IR host ,
and print a list of all registered
.SM RPC
programs.  If
.I host
is not specified, it defaults to the value returned by
.BR hostname (1).
.TP
.B \-u
Make an
.SM RPC
call to procedure 0 of
.I program
on the specified
.I host
using
.SM UDP\s0,
and report whether a response was received.
.TP
.B \-t
Make an
.SM RPC
call to procedure 0 of
.I program
on the specified
.I host
using
.SM TCP\s0,
and report whether a response was received.
.TP
.B \-n
Use
.I portnum
as the port number for the
.I \-t
and
.I \-u
options instead of the port number given by the portmapper.
.TP
.B \-b
Make an
.SM RPC
broadcast to procedure 0 of the specified
.I program
and
.I version
using
.SM UDP
and report all hosts that respond.
.TP
.B \-d
Delete registration for the 
.SM RPC
service of the specified
.I program
and
.IR version .
This option can be exercised only by the super-user.
.LP
The
.I program
argument can be either a name or a number.
.LP
If a
.I version
is specified,
.B rpcinfo
attempts to call that version of the specified
.IR program .
Otherwise,
.B rpcinfo
attempts to find all the registered version
numbers for the specified
.I program
by calling version 0 (which is presumed not
to exist; if it does exist,
.B rpcinfo
attempts to obtain this information by calling
an extremely high version
number instead) and attempts to call each registered version.
Note: the version number is required for 
.B \-b
and
.B \-d
options.
.SH EXAMPLES
To show all of the
.SM RPC
services registered on the local machine use:
.IP
.B example% rpcinfo \-p
.LP
To show all of the
.SM RPC
services registered on the machine named
.B klaxon
use:
.IP
.B example% rpcinfo \-p klaxon
.LP
To show all machines on the local net that are running the Yellow Pages
service use:
.IP
.B "example% rpcinfo \-b ypserv 'version' | uniq"
.LP
where 'version' is the current Yellow Pages version obtained from the
results of the
.B \-p
switch above.
.LP
To delete the registration for version 1 of the
.B walld
service use:
.IP
.B example% rpcinfo \-d walld 1
.SH "SEE ALSO"
.BR rpc (5),
.BR portmap (8C)
.LP
.I "\s-1RPC\s0 Programming Guide"
in
.TX NETP
.SH BUGS
In releases prior to Sun\s-1OS\s0
3.0, the Network File System (\s-1NFS\s0) did not
register itself with the
portmapper;
.B rpcinfo
cannot be used to make
.SM RPC
calls to the
.SM NFS
server on hosts running such releases.
nd marked for deletion.  Deletions are delayed
an additional 60 seconds to insure the invalidation is propagated
throughout the internet.
.LP
Hosts acting as internetwork routers gratuitously supply their
routing tables every 30 seconds to all directly connected hosts
and networks.
.LP
Supplying the
.B \-s
option forces
.B routed
to supply routing information wheth./share/man/man8/rquotad.8c                                                                            755       0      12         2561  4424741636  10641                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rquotad.8c 1.12 89/03/27 SMI;
.TH RQUOTAD 8C "22 March 1989"
.SH NAME
rquotad, rpc.rquotad \- remote quota server
.SH SYNOPSIS
.B /usr/etc/rpc.rquotad
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.IX  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  daemons  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  "user quotas"  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  "disk quotas"  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  "quotas"  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  "file system"  "rquotad daemon"  ""  "\fLrquotad\fP \(em remote quota server"
.IX  "remote procedure call services"  "rquotad"  ""  "\fLrquotad\fP \(em remote quota server"
.B rquotad
is an
.BR rpc (4)
server which returns quotas for a user of a local file system
which is mounted by a remote machine over the
.SM NFS\s0.
The results are used by
.BR quota (1)
to display user quotas for remote file systems.
The
.B rquotad
daemon is normally invoked by
.BR inetd (8C).
.SH FILES
.PD 0
.TP 20
.B quotas
quota file at the file system root
.PD
.SH "SEE ALSO"
.BR inetd (8C),
.BR quota (1),
.BR nfs (4),
.BR rpc (4),
.BR services (5)
the port number given by the portmapper.
.TP
.B \-b
Make an
.SM RPC
broadcast to procedure 0 of the specified
.I program
and
.I version
using
../share/man/man8/rrestore.8                                                                            755       0      12           70  4424741636  10615                                                                                                                                                                                                                                                                                                                                                                      .so man8/restore.8
.\" @(#)rrestore.8 1.5 89/03/27 SMI;
rstatd.8c c   
$  '  
rusersd.8c    
8  (  	rwalld.8c    
L  )  rwhod.8c   a  
\  *  sa.8 .8c  
p  +  
savecore.8 c  
  ,  
sendmail.8   
  -  setup_client.8   
  .  setup_exec.8  
  
  /  showmount.8   
  0  
shutdown.8    
  1  spray.8c 8       =  tic.8v c    2  	sprayd.8c  c  (  3  statd.8c     <  4  sticky.8     P  5  	sundiag.8 ra  h  6  suninstall.8  h    7  sunupgrade.8    ./share/man/man8/rshd.8c                                                                               755       0      12        11637  4424741636  10146                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rshd.8c 1.17 89/03/27 SMI; from UCB 4.2
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.TH RSHD 8C "22 March 1989"
.SH NAME
rshd, in.rshd \- remote shell server
.SH SYNOPSIS
.B /usr/etc/in.rshd
.IB host . port
.SH DESCRIPTION
.IX  "rshd command"  ""  "\fLrshd\fP \(em remote shell server"
.IX  "remote shell server"  ""  "remote shell server \(em \fLrshd\fP"
.IX  servers  rshd  ""  "\fLrshd\fP \(em remote shell server"
.B rshd
is the server for the
.BR rcmd (3N)
routine and, consequently, for the
.BR rsh (1C)
program.  The server provides remote execution facilities
with authentication based on privileged port numbers.
.LP
.B rshd
is invoked by
.BR inetd (8C)
each time a shell service is requested, and executes the
following protocol:
.TP
\(bu
The server checks the client's source port.
If the port is not in the range 512-1023, the server
aborts the connection.  The clients host address (in hex)
and port number (in decimal) are the argument passed to
.B rshd.
.TP
\(bu
The server reads characters from the socket up
to a null
.RB ( \e0 )
byte.  The resultant string is
interpreted as an
.SM ASCII
number, base 10.
.TP
\(bu
If the number received in step 1 is non-zero,
it is interpreted as the port number of a secondary
stream to be used for the
.BR stderr .
A second connection is then created to the specified
port on the client's machine.  The source port of this
second connection is also in the range 512-1023.
.TP
\(bu
The server checks the client's source address.
If the address is associated with a host for which no
corresponding entry exists in the host name data base (see
.BR hosts (5)),
the server aborts the connection.
.TP
\(bu
A null terminated user name of at most 16 characters
is retrieved on the initial socket.  This user name
is interpreted as a user identity to use on the
.BR server 's
machine.
.TP
\(bu
A null terminated user name of at most 16 characters
is retrieved on the initial socket.  This user name
is interpreted as the user identity on the
.BR client 's
machine.
.TP
\(bu
A null terminated command to be passed to a
shell is retrieved on the initial socket.  The length of
the command is limited by the upper bound on the size of
the system's argument list.
.TP
\(bu
.B rshd
then validates the user according to the following steps.
The remote user name is looked up in the password file and a
.B chdir
is performed to the user's home directory.  If the lookup or
fails, the connection is terminated.  If the
.B chdir
fails, it does a
.B chdir
to
.B /
.BR  (root).
If the user is not the super-user, (user
.SM ID
0), the file
.B /etc/hosts.equiv
is consulted for a list of hosts considered \(lqequivalent\(rq.
If the client's host name is present in this file, the
authentication is considered successful.  If the lookup
fails, or the user is the super-user, then the file
.B .rhosts
in the home directory of the remote user is checked for
the machine name and identity of the user on the client's
machine.  If this lookup fails, the connection is terminated.
.TP
\(bu
A null byte is returned on the connection associated
with the
.B stderr
and the command line is passed to the normal login
shell of the user.  The
shell inherits the network connections established by
.BR rshd .
.SH FILES
.PD 0
.TP 20
.B /etc/hosts.equiv
.PD
.SH SEE ALSO
.BR rsh (1C),
.BR rcmd (3N),
.BR syslogd (8)
.SH BUGS
.LP
The authentication procedure used here assumes the integrity
of each client machine and the connecting medium.  This is
insecure, but is useful in an \(lqopen\(rq environment.
.LP
A facility to allow all data exchanges
to be encrypted should be present.
.br
.ne 8
.SH DIAGNOSTICS
.LP
The following diagnostic messages are returned on the connection
associated with the
.BR stderr ,
after which any network connections are closed.
An error is indicated by a leading byte with a value of
1 (0 is returned in step 9 above upon successful completion
of all the steps prior to the command execution).
.TP
.B locuser too long
The name of the user on the client's machine is
longer than 16 characters.
.TP
.B remuser too long
The name of the user on the remote machine is
longer than 16 characters.
.TP
.B command too long
The command line passed exceeds the size of the argument
list (as configured into the system).
.TP
.B Hostname for your address unknown.
No entry in the host name database existed for
the client's machine.
.TP
.B Login incorrect.
No password file entry for the user name existed.
.TP
.B Permission denied.
The authentication procedure described above failed.
.TP
.B Can't make pipe.
The pipe needed for the
.BR stderr ,
was not created.
.TP
.B Try again.
A
.I fork
by the server failed.
.TP
.BR /usr/bin/sh: " .\|.\|."
The user's login shell could not be started.
.LP
In addition, daemon's status messages and internal diagnostics are
logged to the appropriate system log using the
.BR syslogd (8)
facility.
resynchronize"
.TP
.B "A tape read error has occurred."
If a file name is specified,
then its con./share/man/man8/rstatd.8c                                                                             755       0      12         1462  4424741636  10462                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rstatd.8c 1.16 89/03/27 SMI; from UCB 4.2
.TH RSTATD 8C "22 March 1989"
.SH NAME
rstatd, rpc.rstatd \- kernel statistics server
.SH SYNOPSIS
.B /usr/etc/rpc.rstatd
.SH DESCRIPTION
.IX  "rstatd command"  ""  "\fLrstatd\fP \(em kernel statistics server"
.IX  statistics  rstatd  ""  "\fLrstatd\fP \(em kernel statistics server"
.IX  servers  rstatd  ""  "\fLrstatd\fP \(em kernel statistics server"
.LP
.B rstatd
is a server which returns performance statistics
obtained from the kernel.
These statistics are graphically displayed by
.BR perfmeter (1).
The
.B rstatd
daemon is normally invoked by
.BR inetd (8C).
.LP
Systems with disk drivers to be monitored by this daemon must be
configured so as to report disk
.RB (\^ _dk_xfer )
statistics.
.SH "SEE ALSO"
.BR perfmeter (1),
.BR services (5),
.BR inetd (8C)
    H  ypbind.8      I  ypinit.8      J  ypmake.8       K  yppasswdd.8c  K    L  yppoll.8    (  M  yppush.8  (  <  N  ypserv.8  <  L  O  ypset.8   d  P  ./share/man/man8/rusersd.8c                                                                            755       0      12         1460  4424741636  10646                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rusersd.8c 1.10 89/03/27 SMI;
.TH RUSERSD 8C "22 March 1989"
.SH NAME
rusersd, rpc.rusersd \- network username server
.SH SYNOPSIS
.B /usr/etc/rpc.rusersd
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rstatd command"  ""  "\fLrstatd\fP \(em network username server"
.IX  statistics  rstatd  ""  "\fLrstatd\fP \(em network username server"
.IX  servers  rstatd  ""  "\fLrstatd\fP \(em network username server"
.LP
.B rusersd
is a server that returns a list of users on the network.
The
.B rusersd
daemon is normally invoked by
.BR inetd (8C).
.SH "SEE ALSO"
.BR inetd (8C)
.BR perfmeter (1),
.BR rusers (1C),
.BR services (5),
.LP
.TX INSTALL
      I  ypinit.8      J  ypmake.8       K  yppasswdd.8c       L  yppoll.8  K  (  M  yppush.8    <  N  ypserv.8  (  L  O  ypset.8   d  P  ypupdated.8c  d  x  Q./share/man/man8/rwalld.8c                                                                             755       0      12         1576  4424741637  10455                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rwalld.8c 1.12 89/03/27 SMI;
.TH RWALLD 8C "22 March 1989"
.SH NAME
rwalld, rpc.rwalld \- network rwall server
.SH SYNOPSIS
.B /usr/etc/rpc.rwalld
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rwalld command"  ""  "\fLrwalld\fP \(em network rwall server"
.IX  "network rwall server"  ""  "network rwall server \(em \fLrwalld\fP"
.IX  servers  rwalld  ""  "\fLrwalld\fP \(em network rwall server"
.LP
.B rwalld
is a server that handles
.BR rwall (1C)
and
.BR shutdown (2)
requests.
It is implemented by calling
.BR wall (1)
to all the appropriate network machines.
The
.B rwalld
daemon is normally invoked by
.BR inetd (8C).
.SH "SEE ALSO"
.BR rwall (1C),
.BR wall (1),
.BR shutdown (2)
.BR services (5),
.BR inetd (8C),
   (  M  yppush.8  K  <  N  ypserv.8    L  O  ypset.8   d  P  ypupdated.8c  d  x  Q  	ypwhich.8 d    R./share/man/man8/rwhod.8c                                                                              755       0      12        10152  4424741637  10321                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)rwhod.8c 1.20 89/03/27 SMI; from UCB 4.2
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH RWHOD 8C "22 March 1989"
.SH NAME
rwhod, in.rwhod \- system status server
.SH SYNOPSIS
.B /usr/etc/in.rwhod
.SH AVAILABILITY
Due to its potential impact on network performance, this service is
commented out of the
.B /etc/rc.local
system initialization script.  It is provided only for 4.3 BSD
compatibility.
.LP
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "rwhod command"  ""  "\fLrwhod\fP \(em system status server"
.IX  "system status server"  ""  "system status server \(em \fLrwhod\fP"
.IX  servers  rwhod  ""  "\fLrwhod\fP \(em system status server"
.B rwhod
is the server which maintains the database used by the
.BR rwho (1C)
and
.BR ruptime (1C)
programs.  Its operation is predicated on the ability to
.I broadcast
messages on a network.
.LP
.B rwhod
operates as both a producer and consumer of status information.
As a producer of information it periodically
queries the state of the system and constructs
status messages which are broadcast on a network.
As a consumer of information, it listens for other
.B rwhod
servers' status messages, validating them, then recording
them in a collection of files located in the directory
.BR /var/spool/rwho .
.LP
The
.B rwho
server transmits and receives messages at the port indicated
in the ``rwho'' service specification, see
.BR services (5).
The messages sent and received, are of the form:
.RS
.nf
.ft B
struct	outmp {
.RS
.ft B
char	out_line[8];	/* tty name */
char	out_name[8];	/* user id */
long	out_time;	/* time on */
.RE
.ft B
};
.sp
.ft B
struct	whod {
.RS
.ft B
char	wd_vers;
char	wd_type;
char	wd_fill[2];
int	wd_sendtime;
int	wd_recvtime;
char	wd_hostname[32];
int	wd_loadav[3];
int	wd_boottime;
.RS
.ft B
struct	whoent {
struct	outmp we_utmp;
int	we_idle;
.RE
.ft B
} wd_we[1024 / sizeof (struct whoent)];
.RE
.ft B
};
.fi
.ft R
.RE
.LP
All fields are converted to network byte order prior to
transmission.  The load averages are as calculated by the
.BR w (1)
program, and represent load averages over the 5, 10, and 15 minute
intervals prior to a server's transmission.  The host name
included is that returned by the
.BR gethostname (2)
system call.
The array at the end of the message contains information about
the users logged in to the sending machine.  This information
includes the contents of the
.BR utmp (5)
entry for each non-idle terminal line and a value indicating the
time since a character was last received on the terminal line.
.LP
Messages received by the
.B rwho
server are discarded unless they originated at a
.B rwho
server's port.  In addition, if the host's name, as specified
in the message, contains any unprintable
.SM ASCII
characters, the
message is discarded.  Valid messages received by
.B rwhod
are placed in files named
.BI whod. hostname
in the directory
.BR /var/spool/rwho .
These files contain only the most recent message, in the
format described above.
.LP
Status messages are generated approximately once every
60 seconds.
.B rwhod
performs an
.BR nlist (3)
on
.B /vmunix
every 10 minutes to guard against
the possibility that this file is not the system
image currently operating.
.SH FILES
.PD 0
.TP 20
.B /var/spool/rwho
.PD
.SH DIAGNOSTICS
.LP
Status and diagnostic messages are logged to the appropriate system
log using the
.BR syslogd (8)
facility.
.SH "SEE ALSO"
.BR rwho (1C),
.BR ruptime (1C),
.BR w (1),
.BR gethostname (2),
.BR nlist (3),
.BR utmp (5),
.BR syslogd (8)
.SH BUGS
This service takes up progressively more network bandwidth as
the number of hosts on the local net increases.  For large
networks, the cost becomes prohibitive.  RPC-based services
such as 
.BR rup (1C)
and
.BR rusers (1C)
provide a similar function with greater efficiency.
.LP
.B rwhod
should relay status information between networks.
People often interpret the server dying
as a machine going down.
emuser too long
The name of the user on the remote machine is
longer than 16 characters.
.TP
.B command too long
The command line passed exceeds the size of the argument
list (as configured into the system).
.TP
.B Hostname for your address unknown.
No entry in the host name database existed for
the client's machine.
.TP
.B Login incorrect.
No password file entry for the user name existed.
.TP
.B Permis./share/man/man8/sa.8                                                                                  755       0      12        10571  4424741637   7443                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sa.8 1.28 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SA 8 "8 January 1988"
.SH NAME
sa, accton \- system accounting
.SH SYNOPSIS
.B /usr/etc/sa
[
.B \-abcdDfijkKlmnrstu
] [
\fB\-v\fR[\fIn\fR]
] [
.B \-S
.I savacctfile
] [
.B \-U
.I usracctfile
] [
.I filename
]
.LP
.B /usr/etc/accton
[
.I filename
]
.SH DESCRIPTION
.IX  "sa command"  ""  "\fLsa\fP \(em process accounting summary"
.IX  "accton command"  ""  "\fLaccton\fP \(em processing accounting on or off"
.IX  "accounting" "process accounting, on or off \(em \fLaccton\fR"
.IX  "accounting" "process accounting, display record \(em \fLsa\fR"
With an argument naming an existing
.IR filename ,
.B accton
causes system accounting information for
every process executed to be placed at the end of the file.
If no argument is given, accounting is turned off.
.LP
.B sa
reports on, cleans up, and generally maintains accounting files.
.LP
.B sa
is able to condense the information in
.B /var/adm/acct
into a summary file
.B /var/adm/savacct
which contains a count of the
number of times each command was called and the time resources consumed.
This condensation is desirable because on a large system
.B /var/adm/acct
can grow by 500K bytes per day.
The summary file is normally read before the accounting file,
so the reports include all available information.
.LP
If a file name is given as the last argument, that file will be treated
as the accounting file;
.B /var/adm/acct
is the default.
.LP
Output fields are labeled:
.B cpu
for the sum of user+system time
(in minutes),
.B re
for real time (also in minutes),
.B k
for
.SM CPU\s0-time
averaged core usage (in 1k units),
.B avio
for average number of
.SM I/O
operations per execution.
With options fields labeled
.B tio
for total
.SM I/O
operations,
.B k*sec
for
.SM CPU
storage integral (kilo-core seconds),
.B u
and
.B s
for user and system
.SM CPU
time alone (both in minutes) will sometimes appear.
.LP
.B sa
also breaks out accounting statistics by user.  This
information is kept in the file
.BR /var/adm/usracct .
.SH OPTIONS
.TP
.B \-a
Print all command names, even those containing unprintable characters
and those used only once.  By default, those are placed under the
name `***other.'
.TP
.B \-b
Sort output by sum of user and system time divided by number of calls.
Default sort is by sum of user and system times.
.TP
.B \-c
Besides total user, system, and real time
for each command print percentage
of total time over all commands.
.TP
.B \-d
Sort by average number of disk
.SM I/O
operations.
.TP
.B \-D
Print and sort by total number of disk
.SM I/O
operations.
.TP
.B \-f
Force no interactive threshold compression with
.B \-v
flag.
.TP
.B \-i
Do not read in summary file.
.TP
.B \-j
Instead of total minutes time for each category, give seconds per call.
.TP
.B \-k
Sort by
.SM CPU\s0-time
average memory usage.
.TP
.B \-K
Print and sort by
.SM CPU\s0-storage
integral.
.TP
.B \-l
Separate system and user time; normally they are combined.
.TP
.B \-m
Print number of processes and number of
.SM CPU
minutes for each user.
.TP
.B \-n
Sort by number of calls.
.TP
.B \-r
Reverse order of sort.
.TP
.B \-s
Merge accounting file into summary file
.B /var/adm/savacct
when done.
.TP
.B \-t
For each command report ratio of real time
to the sum of user and system times.
.TP
.B \-u
Superseding all other flags, print for each record
in the accounting file the user
.SM ID
and command name.
.br
.ne 5
.TP
.B \-v
Followed by a number
.IR n ,
types the name of each command used
.I n
times or fewer.  If
.I n
is not specified, it defaults to 1.
Await a reply from the terminal; if it begins with
.BR y ,
add the command to
the category `**junk**.' This is used to strip out garbage.
.TP
.B \-S
The following filename is used as the command summary file instead of
.BR /var/adm/savacct .
.TP
.B \-U
The following filename is used instead of
.B /var/adm/usracct
to accumulate the per-user statistics printed by the
.B \-m
option.
.dt
.SH FILES
.PD 0
.TP 20
.B /var/adm/acct
raw accounting
.TP
.B /var/adm/savacct
summary by command
.TP
.B /var/adm/usracct
summary by user
.SM ID
.PD
.SH "SEE ALSO"
.BR acct (2),
.BR acct (5),
.BR ac (8)
.SH BUGS
.BR sa 's
execution time increases linearly with the magnitude of the
largest positive user
.SM ID
in
.BR /etc/passwd .
ransmission.  The host name
included is that returned by the
.BR gethostname (2)
system call.
The array at the end of the message conta./share/man/man8/savecore.8                                                                            755       0      12         4676  4424741637  10640                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)savecore.8 1.23 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SAVECORE 8 "22 March 1989"
.SH NAME
savecore \- save a core dump of the operating system
.SH SYNOPSIS
.B /usr/etc/savecore
[
.B \-v
]
.I directory
[
.I system-name
]
.SH DESCRIPTION
.IX  "savecore command"  ""  "\fLsavecore\fP \(em save OS core dump"
.B savecore
saves a core dump of the kernel (assuming that one was made) and
writes a reboot message in the shutdown log.  It is meant to be called
near the end of the
.B /etc/rc.local
file after the system boots.  However, it is not normally run by
default.  You must edit that file to enable it.
.LP
.B savecore
checks the core dump to be certain it corresponds with the
version of the operating system currently running.  If it does,
.B savecore
saves the core image in the file
.IB directory /vmcore. n
and the kernel's namelist, in
.IB directory /vmunix. n
The trailing
.BI . n
in the pathnames is replaced by a number which grows every time
.B savecore
is run in that directory.
.LP
Before
.B savecore
writes out a core image,
it reads a number from the file
.IR directory\fB/minfree .
This is the minimum number of kilobytes that must remain free
on the filesystem containing
.IR directory .
If there is less free space on the filesystem containing
.I directory
than the number of kilobytes specified in
.BR minfree ,
the core dump is not saved.
If the
.B minfree
file does not exist,
.B savecore
always writes out the core file (assuming that a core dump was taken).
.LP
.B savecore
also logs a reboot message using facility
.SB LOG_AUTH
(see
.BR syslog (3)).
If the system crashed as a result of a panic,
.B savecore
logs the panic string too.
.LP
If the core dump was from a system other than
.BR /vmunix ,
the name of that system must be supplied as
.IR system-name .
.SH OPTIONS
.TP 15
.B \-v
Verbose.
Enable verbose error messages from
.BR savecore .
.SH FILES
.PD 0
.TP 20
.IB directory /vmcore. n
.TP
.IB directory /vmunix. n
.TP
.IB directory /minfree
.TP
.B /vmunix
the kernel
.TP
.B /etc/rc.local
.PD
.SH SEE ALSO
.BR sa (8),
.BR crash (8S),
.BR syslog (3)
.SH BUGS
Can be fooled into thinking a core dump is the wrong size.
.LP
You must run
.B savecore
very soon after booting \(em before the swap space containing the
crash dump is overwritten by programs currently running.
ostname (2)
system call.
The array at the end of the message conta./share/man/man8/sendmail.8                                                                            755       0      12        23510  4424741637  10631                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sendmail.8 1.32 89/03/27 SMI; from UCB 4.2
.TH SENDMAIL 8 "22 March 1989"
.SH NAME
sendmail \- send mail over the internet
.SH SYNOPSIS
.B /usr/etc/sendmail
[
.B \-ba
] [
.B \-bd
] [
.B \-bi
] [
.B \-bm
] [
.B \-bp
] [
.B \-bs
]
.if n .ti +0.5i
[
.B \-bt
] [
.B \-bv
] [
.B \-bz
]
.if t .ti +0.5i
[
.BI \-C file
] [
.BI \-d X
]
.if n .ti +0.5i
[
.BI \-F fullname
] [
.BI \-f name
] [
.BI \-h N
] [
.B \-n
] [
.BI \-o "x value"
]
.if n .ti +0.5i
[
\fB\-q\fR[
.I time
] ]
.if t .ti +0.5i
[
.BI \-r name
] [
.BI \-R string
] [
.B \-t
] [
.B \-v
] [
.IR address " .\|.\|. ]"
.SH DESCRIPTION
.IX  "sendmail command"  ""  "\fLsendmail\fP \(em mail delivery system"
.IX  "mail delivery server" "" "mail delivery server \(em \fLsendmail\fP"
.B sendmail
sends a message to one or more
people,
routing the message over whatever networks are necessary.
.B sendmail
does internetwork forwarding as
necessary
to deliver the message to the correct place.
.LP
.B sendmail
is not intended as a user interface
routine;
other programs provide user-friendly front ends;
.B sendmail
is used only to deliver pre-formatted
messages.
.LP
With no flags,
.B sendmail
reads its standard input up to an
.SM EOF\s0,
or a line with a single dot
and sends a copy of the letter found there
to all of the addresses listed.
It determines the network to use
based on the syntax and contents of the addresses.
.LP
Local addresses are looked up in the local
.BR aliases (5)
file, or by using the Yellow Pages
(\s-1YP\s0)
name service,
and aliased appropriately.
In addition, if there is a
.B .forward
file in a recipient's  home directory,
.B sendmail
forwards a copy of each message to the list of recipients that
file contains.  Aliasing can be prevented by preceding the address
with a backslash.
Normally the sender is not included in alias expansions, for example,
if `john' sends to `group', and `group'
includes `john' in the expansion,
then the letter will not be delivered to `john'.
.LP
.B sendmail
will also route mail directly to other known hosts in a local
network.  The list of hosts to which mail is directly sent is
maintained in the file
.BR /usr/lib/mailhosts .
.SH OPTIONS
.TP 15
.B \-ba
Go into
\s-1ARPANET\s0
mode.  All input lines must end with a
.SM LINEFEED\s0,
and all messages will be generated with a
.SM CR-LF
at the end.  Also, the ``From:'' and ``Sender:''
fields are examined for the name of the sender.
.TP
.B \-bd
Run as a daemon, waiting for incoming
.SM SMTP
connections.
.TP
.B \-bi
Initialize the alias database.
.TP
.B \-bm
Deliver mail in the usual way (default).
.TP
.B \-bp
Print a summary of the mail queue.
.TP
.B \-bs
Use the
\s-2SMTP\s0
protocol as described in
.SM RFC
821.  This flag implies all the operations of the
.B \-ba
flag that are compatible with
\s-2SMTP\s0.
.TP
.B \-bt
Run in address test mode.
This mode reads addresses and shows the steps in parsing;
it is used for debugging configuration tables.
.TP
.B \-bv
Verify names only \(em do not try to collect or deliver a message.
Verify mode is normally used for validating users or mailing lists.
.TP
.B \-bz
Create the configuration freeze file.
.TP
.BI \-C file
Use alternate configuration file.
.TP
.BI \-d X
Set debugging value to
.IR X .
.TP
.BI \-F fullname
Set the full name of the sender.
.TP
.BI \-f name
Sets the name of the ``from'' person (that is, the sender of the mail).
.B \-f
can only be used by ``trusted'' users (who are
listed in the config file).
.TP
.BI \-h N
Set the hop count to
.IR N .
The hop count is incremented every time the mail is processed.
When it reaches a limit, the mail is returned with an error message,
the victim of an aliasing loop.
.TP
.BI \-M id
Attempt to deliver the queued message with message-id
.BR id .
.TP
.B \-n
Do notdo aliasing.
.TP
.BI \-o x\|value
Set option
.I x
to the specified
.IR value .
Options are described below.
.TP
.BI \-q\fR[ time]
Processed saved messages in the queue at given intervals.
If
.I time
is omitted, process the queue once.
.I time
is given as a tagged number, with
.B s
being seconds,
.B m
being minutes,
.B h
being hours,
.B d
being days, and
.B w
being weeks.
For example,
.B \-q1h30m
or
.B \-q90m
would both set the timeout to one hour thirty minutes.
.TP
.BI \-r name
An alternate and obsolete form of the
.B \-f
flag.
.TP
.BI \-R string
Go through the queue of pending mail and attempt to deliver any
message with a recipient containing the specified string.  This is
useful for clearing out mail directed to a machine which has been
down for awhile.
.TP
.B \-t
Read message for recipients.
``To:'', ``Cc:'', and ``Bcc:''
lines will be scanned for people to send to.
The ``Bcc:'' line will be deleted before transmission.
Any addresses in the argument list will be suppressed.
.TP
.B \-v
Go into verbose mode.
Alias expansions will be announced, etc.
.SH "PROCESSING OPTIONS"
.LP
There are also a number of processing options that may be set.
Normally these will only be used by a system administrator.
Options may be set either on the command line using the
.B \-o
flag or in the configuration file.
These are described in detail in the
\fIInstallation and Operation Guide\fP\|.
The options are:
.TP
.BI A file
Use alternate alias file.
.TP
.B c
On mailers that are considered ``expensive'' to connect to,
do not initiate immediate connection.  This requires queueing.
.TP
.BI d x
Set the delivery mode to
.BR x .
Delivery modes are
.B i
for interactive (synchronous) delivery,
.B b
for background (asynchronous) delivery, and
.B q
for queue only \(em that is, actual delivery is done
the next time the queue is run.
.TP
.B D
Run
.BR newaliases (8)
to automatically rebuild the alias database, if necessary.
.TP
.BI e x
Set error processing to mode
.BR x .
Valid modes are
.B m
to mail back the error message,
.B w
to ``write'' back the error message
(or mail it back if the sender is not logged in),
.B p
to print the errors on the terminal (default),
`q' to throw away error messages (only exit status is returned),
and `e' to do special processing for the BerkNet.
If the text of the message is not mailed back by modes
.B m
or
.B w
and if the sender is local to this machine,
a copy of the message is appended to the file
.B dead.letter
in the sender's home directory.
.TP
.BI F mode
The mode to use when creating temporary files.
.TP
.B f
Save
.SM UNIX\s0-system-style
``From'' lines at the front of messages.
.TP
.BI g N
The default group
.SM ID
to use when calling mailers.
.TP
.BI H file
The
.SB SMTP
help file.
.TP
.B i
Do not take dots on a line by themselves as a message terminator.
.TP
.BI L n
The log level.
.TP
.B m
Send to ``me'' (the sender) also if I am in an alias expansion.
.TP
.B o
If set, this message may have old style headers.
If not set, this message is guaranteed to have new style headers
(that is, commas instead of spaces between addresses).
If set, an adaptive algorithm is used that will correctly
determine the header format in most cases.
.TP
.BI Q queuedir
Select the directory in which to queue messages.
.TP
.BI r timeout
The timeout on reads; if none is set,
.B sendmail
will wait forever for a mailer.
.TP
.BI S file
Save statistics in the named file.
.TP
.B s
Always instantiate the queue file,
even under circumstances where it is not strictly necessary.
.TP
.BI T time
Set the timeout on messages in the queue to the specified time.
After sitting in the queue for this amount of time,
they will be returned to the sender.
The default is three days.
.TP
.BI t stz,dtz
Set the name of the time zone.
.TP
.BI u N
Set the default user id for mailers.
.LP
If the first character of the user name is a vertical bar,
the rest of the user name is used as the name of a program
to pipe the mail to.
It may be necessary to quote the name of the user to keep
.B sendmail
from suppressing the blanks from between arguments.
.LP
.B sendmail
returns an exit status describing what it
did.
The codes are defined in
.B sysexits.h
.ta 3n +\w'EX_UNAVAILABLE'u+3n
.de XX
.ti \n(.iu
..
.in +\w'EX_UNAVAILABLE'u+6n
.XX
	\s-1EX_OK\s0	Successful completion on all addresses.
.XX
	\s-1EX_NOUSER\s0	User name not recognized.
.XX
	\s-1EX_UNAVAILABLE\s0	Catchall meaning necessary resources
were not available.
.XX
	\s-1EX_SYNTAX\s0	Syntax error in address.
.XX
	\s-1EX_SOFTWARE\s0	Internal software error,
including bad arguments.
.XX
	\s-1EX_OSERR\s0	Temporary operating system error,
such as \*(lqcannot fork\*(rq.
.XX
	\s-1EX_NOHOST\s0	Host name not recognized.
.XX
	\s-1EX_TEMPFAIL\s0	Message could not be sent immediately,
but was queued.
.LP
If invoked as
.BR newaliases ,
.B sendmail
rebuilds the alias database.  If invoked as
.BR mailq ,
.B sendmail
prints the contents of the mail queue.
.SH FILES
Except for
.BR /etc/sendmail.cf ,
these pathnames are all specified in
.BR /etc/sendmail.cf .
Thus, these values are only approximations.
.PD 0
.TP 20
.B /etc/aliases
raw data for alias names
.TP
.B /etc/aliases.pag
data base of alias names
.TP
.B /etc/aliases.dir
.TP
.B /usr/lib/mailhosts
list of hosts to which mail can be sent directly
.TP
.B /etc/sendmail.cf
configuration file
.TP
.B /etc/sendmail.fc
frozen configuration
.TP
.B /etc/sendmail.hf
help file
.TP
.B /etc/sendmail.st
collected statistics
.TP
.B /usr/bin/uux
to deliver uucp mail
.TP
.B /usr/bin/mail
to deliver local mail
.TP
.B /var/spool/mqueue/*
temp files and queued mail
.TP
.B ~/.forward
list of recipients for forwarding messages
.PD
.SH SEE ALSO
.BR newaliases (8),
.BR biff (1),
.BR binmail (1),
.BR mail (1),
.BR aliases (5)
.LP
.TX ADMIN
.LP
Su, Zaw-Sing, and Jon Postel,
.IR "The Domain Naming Convention for Internet User Applications" ,
.SM RFC
819,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1982.
.LP
Postel, Jon,
.IR "Simple Mail Transfer Protocol" ,
.SM RFC
821,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1982.
.LP
Crocker, Dave,
.I Standard for the Format of
.I
.SM ARPA\s0-Internet
.IR "Text Messages" ,
.SM RFC
822,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1982.
 positions, so that later
incremental dumps will be correct.
ers.
.TP
.SM PGRP
This stream's process group number.
.TP
.SM FLG
Miscellaneous stream state variables encoded thus:
.RS
.R./share/man/man8/setup_client.8                                                                        755       0      12        13666  4424741637  11546                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setup_client.8 1.23 89/04/21 SMI;
.TH SETUP_CLIENT 8 "20 April 1989"
.SH NAME
setup_client \- create or remove an NFS client
.SH SYNOPSIS
.B /usr/etc/install/script/setup_client
.if n .br
.I op
.I clientname
.I yp_type
.I swapsize
.if n .ti +0.5i
.I rootpath
.I swappath
.if t .ti +.5i
.I homepath
.I execpath
.I kvmpath
.I arch
.SH DESCRIPTION
.IX "setup_client command" "" "\fLsetup_client\fP command"
.B setup_client
adds an
.SM NFS
client to a server, or removes one.
It can only be run by the super-user.  It is also used by
.BR suninstall (8).
.LP
The
.I op
argument indicates which operation to perform,
either
.B add
or
.BR remove ,
to indicate whether to add or remove a client.
.I clientname
is the hostname of the client.
.I yp_type
indicates the type of 
Yellow Pages server or service to provide to the
client, if any; it can be one of
.BR master ,
.BR slave ,
.BR client
or
.BR none .
.I swapsize
is the number of bytes reserved for client's swap
file.
.I rootpath
is the pathname of the parent directory in which various client root
directories reside; 
.IB rootpath / clientname
is the pathname of the client's root directory.
.I swappath
is the pathname of parent directory in which various client swap files
reside;  
.IB swappath / clientname
is the pathname of the client's swap file.
.I homepath
is the pathname of the (parent) directory in which the various home 
directories are to reside; it is the pathname of the directory
that the client is to mount as
.BR /home .
.I execpath
is the full pathname of the directory in which the
executables for the application architecture specified by the
.I arch
argument.
This is the directory that the client mounts as
.BR /usr .
.I kvmpath
is the full pathname of the directory in which the
.I kernel-specific
executables for the architecture specified by the
.I arch
argument reside.
This is the directory that the client mounts as
.BR /usr/kvm .
.I arch
specifies the client's
application architecture (for instance,
.BR Sun4 ,
.BR Sun3x .\|.\|.).
See
.BR arch (1)
for further explanation of \(lqapplication architecture\(rq
and examples of valid application architectures.
.B setup_client
with no arguments displays a usage message that includes the proper 
.I arch
argument for each supported application architecture.
.SH USAGE
.LP
Before you add or remove a client, you must first make sure
that the Internet and Ethernet addresses for
.I clientname
are listed in the 
.SM YP
hosts database (if the server is running the 
\s-1YP\s0), or
in the server's
.B /etc/hosts
and
.B /etc/ethers
databases, respectively (if otherwise).
Then, run
.B setup_client
with the
.B add
or
.B remove
operation.
When adding a client, you must then bootstrap that client machine.
.LP
A server must support a client's specific application 
architecture before it can mount that client.
The executable directory for that client's application architecture
must be present on the server.  If this directory is absent, an error
results.
.LP
.B setup_client
updates the
.B /etc/bootparams
file.  If the server is a 
.SM YP 
master, it updates local 
.SM YP
database.  It
.I does not
propagate the local update to other 
.SM YP 
servers.  To propagate the
updates, use the following commands:
.RS
.nf
.ft B
example# cd /var/yp
example# make
.ft R
.fi
.RE
.LP
If the server is running 
.SM YP 
but is not a 
.SM YP 
master,
.BR setup_client
issues a warning to indicate that the database is out of date.
.LP
When
.I arch
is given as
.BR Sun2 ,
.B suninstall
issues a reminder to run the
.B /usr/etc/ndbootd
daemon for booting Sun-2 systems.
.LP
.B setup_client
creates
.IB swappath / clientname
with the
.IR size ,
(number of bytes) you specify.  You can append one of
.B K
or
.B k
to indicate kilobytes,
.B M
or
.B m
to indicate megabytes, or
.B B
or
.B b
to indicate 512-byte blocks,
to
.IR size .
Otherwise,
.I size
is taken to indicate an exact byte count.
.LP
.B suninstall
updates the
.B /etc/exports
file to allow root access to each client's root file system.
It exports the client's swap and dump partitions only to the client.
.LP
Note: The system administrator should verify that the
.B /etc/exports
file contains correct information, and that file systems
are exported to the correct users and groups.
Refer to
.BR exportfs (8)
for details on exporting file systems.
.br
.ne 10
.SH EXAMPLES
This example shows how to add a Sun-4 system
.SM NFS
client to a server.
.RS
.nf
.sp .5v
.B
example# setup_client\  add\  frodo\  client\  16M\  /export/root\  /export/swap\  /home \ \e
.B /export/exec/sun4\ /export/exec/kvm/sun4 sun4
.fi
.RE
.LP
To remove this client, you would merely substitute
.B remove
for
.B add
in the above example.
.SH FILES
.PD 0
.TP 20
.B /etc/hosts
hosts database
.TP
.B /etc/ethers
database of hostnames and Ethernet addresses
.TP
.B /usr/etc/ndbootd
.SM ND 
boot block server
.TP
.B /etc/bootparams
boot parameter database
.TP
.B /etc/exports
database of exported file systems
.PD
.SH "SEE ALSO"
.BR exportfs (8),
.BR setup_exec (8)
.BR suninstall (8)
.LP
.TX INSTALL
.SH DIAGNOSTICS
.TP
.B "incorrect number of arguments"
Check number and order of the arguments.
.TP
.B "must be run as root (super-user)."
.BR setup_client
can only be used by root (super-user).
.TP
.B "invalid operation type \(lq\fIxx\fP\(rq."
Valid operations are
.B add
and
.BR remove .
.TP
.B "\s-1ATTENTION\s0: \fIxxxxxxxx\fP \-> boot.sun\fI?\fP not created."
(Sun-3 systems only.)  A symbolic link can not be created
because the boot file does not exist.
.\" under
.\" .BR /tftpboot .
.TP
.B "\s-1ATTENTION\s0: \fIxxxxxxxx\fP.SUN\fI?\fP \-> boot.sun\fI?\fP not created."
(Other than Sun-3 systems.)  A symbolic link can not be created
because the boot file does not exist.
.ie n \{
.PD 0
.LP
.B
\s-1ATTENTION\s0: /usr/etc/ndbootd needs to be running on server before bringing up ``\fIclient\fP''.
.IP
\}
.el \{
.TP
.B "\s-1ATTENTION\s0: /usr/etc/ndbootd needs to be running on server before bringing up ``\fIclient\fP''."
\}
The Sun-2 system boot daemon must be running in order to bootstrap a
Sun-2 system.
.PD
s running the 
\s-1YP\s0), or
in the server's
.B /etc/hosts
and
.B /etc/et./share/man/man8/setup_exec.8                                                                          755       0      12         7303  4424741640  11155                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)setup_exec.8 1.16 89/04/21 SMI;
.TH SETUP_EXEC 8 "20 April 1989"
.SH NAME
setup_exec \- install architecture-dependent executables on a heterogeneous file server
.SH SYNOPSIS
.B /usr/etc/install/setup_exec
.if n .br
.I arch
.I execpath
.I kvmpath
.RB [ \-o ]
.SH DESCRIPTION
.IX "setup_exec command" "" "\fLsetup_exec\fP command"
.LP
.B setup_exec
installs architecture-dependent executables from
either a local tape drive or a remote host.  It is used to
convert a standalone system or homogeneous file server to a
heterogeneous file server.
.B setup_exec
is a forms-based utility that can be invoked directly, but it is
also used by
.BR suninstall (8).
It can only be invoked by the super-user.
.LP
The
.I arch
argument specifies the application architecture to install
(for instance,
.BR Sun4 ,
.BR Sun3x .\|.\|.\|).
See
.BR arch (1)
for further explanation of \(lqapplication architecture\(rq
and examples of valid application architectures.
When run with no arguments,
.B setup_exec
displays a usage line that includes the proper format of the 
.I arch
argument for each supported application architecture.
.I execpath
is the full pathname of the directory in which to install the
executables.  When
.B setup_exec
is done, the
.I execpath
directory is ready to mount as
.B /usr
by the heterogeneous server's
.SM NFS
clients of the indicated
.IR arch .
.I kvmpath
is the full pathname of the directory in which to install the
.I kernel-specific
executables
.RB ( libkvm ,
.BR pstat (8),
.BR ps (1),
etc.).
When
.B setup_exec
is done, the
.I kvmpath
directory is ready to mount as
.B /usr/kvm
by the heterogeneous server's
.SM NFS
clients of the indicated
.IR arch .
.LP
.B setup_exec
also updates the
.B /etc/exports
file (see
.BR exportfs (8))
to export the executable directories it has installed.
A system administrator should verify this file to make sure
that the directory has been exported to the correct groups.
.SH OPTIONS
.TP
.B \-o
Override the software duplication prevention mechanism.
Allows the user to reload a software category that is already
installed.
.SH EXAMPLE
.LP
This example shows how to install a directory of
executables for Sun-4 system clients.
.IP
.B "example# setup_exec\  sun4\  /export/exec/sun4\  /export/exec/kvm/sun4"
.LP
.SH FILES
.PD 0
.TP 32
.B /etc/hosts
hosts database
.TP
.B /etc/ethers
database of hostnames and Ethernet addresses
.TP
.B /etc/exports
database of exported file systems
.TP
.B /usr/etc/install/files 
records of software installed/extracted after initial installation
.TP
.BI /usr/etc/install/files/extractlist. arch
record of extracted categories for application architecture
.I arch 
.TP
.B /usr/etc/install/files/suninstall.log
history of systems installed/extracted after initial installation
.TP
.B /usr/etc/install/save
records of the initial software installation
.TP 
.B /usr/etc/intall/save/suninstall.log 
record of the systems initially installed

.PD
.SH "SEE ALSO"
.BR exportfs (8),
.BR setup_client (8),
.BR suninstall (8)
.LP
.TX INSTALL
.SH DIAGNOSTICS
.TP
.B "incorrect number of arguments"
Check the number and the order of arguments.
.TP
.B "invalid architecture type \(lq\fIarch\fP\(rq."
An unsupported value for
.I arch
was supplied.
.TP
.B "invalid tape drive type \(lq\fIdrive\fP\(rq."
Valid tape drive types are
.B local
and
.BR remote .
.TP
.B "invalid tape type \(lq\fItape\fP\(rq."
Valid tape types are
.BR ar ,
.BR st ,
.BR mt ,
and
.BR xt .
.TP
.B "can't reach tapehost \(lq\fItapehost\fP\(rq."
The
.SM IP
address of
.I tapehost
is not in the hosts database, that is,
the hosts
.SM YP
database if the Yellow Pages are running, or the
.B /etc/hosts
file otherwise.
.TP
.B "Load release tape \fIn\fP"
Mount the release tape specified on the screen and type
.SM RETURN
to continue.
what it
did.
The codes are defined in
.B sysexits.h
.ta 3n +\w'EX_UNAVAILABLE'u+3n
.de XX
.ti \n(.iu
..
.in +\w'EX_UNAVAILABLE'u+6n
.XX
	\s-1EX_OK\s0	Successful completion on all addresses.
.XX
	\s-1EX_NOUSER\s0	User name not recognized.
.XX
	\s-1EX_UNAVAILABLE\s0	Catchall meaning necessary resources
were not availa./share/man/man8/showmount.8                                                                           755       0      12         2471  4424741640  11055                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)showmount.8 1.18 89/03/27 SMI;
.TH SHOWMOUNT 8 "17 December 1987"
.SH NAME
showmount \- show all remote mounts
.SH SYNOPSIS
.B /usr/etc/showmount
[
.B \-ade
] [ host ]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "showmount command"  ""  "\fLshowmount\fP \(em display remote mounts"
.B showmount
lists all the clients
that have remotely mounted a filesystem from
.IR host .
This information is maintained by the
.BR mountd (8C)
server on
.IR host ,
and is saved across crashes in the file
.BR /etc/rmtab .
The default value for
.I host
is the value returned by
.BR hostname (1).
.SH OPTIONS
.TP
.B \-a
Print all remote mounts in the format
.IP
.IB hostname : directory
.LP
where
.B hostname
is the name of the client, and
.B directory
is the root of the file system that has been mounted.
.TP
.B \-d
List directories that have been remotely mounted by clients.
.TP
.B \-e
Print the list of exported file systems.
.SH FILES
.PD 0
.TP 20
.B /etc/rmtab
.PD
.SH "SEE ALSO"
.BR hostname (1),
.BR exports (5),
.BR exports (5),
.BR mountd (8C)
.SH BUGS
If a client crashes, its entry will not be removed from the list
until it reboots and executes
.RB ` "umount \-a" '.
of the indicated
.IR arch .
.I kvmpath
is the full pathname of the directory in which to install the
.I kernel-specific
executables
.RB ( libkvm ,
.BR pstat (8),
.BR ps (1),
etc.).
When
.B setup_exec./share/man/man8/shutdown.8                                                                            755       0      12         5302  4424741640  10661                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)shutdown.8 1.21 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SHUTDOWN 8 "9 September 1987"
.SH NAME
shutdown \- close down the system at a given time
.SH SYNOPSIS
.B /usr/etc/shutdown
[
.B \-fhknr
] [
.I time
[
.I warning-message
\&.\|.\|.
]
.SH DESCRIPTION
.IX  "shutdown command"  ""  "\fLshutdown\fP \(em shut down multiuser operation"
.B shutdown
provides an automated procedure to notify users when the
system is to be shut down.
.I time
specifies when
.B shutdown
will bring the system down; it may be the word
.B now
(indicating an immediate shutdown),
or it may specify a future time in one of two formats:
.BI + number
and
.IB hour : min.
The first form brings the system down in
.I number
minutes, and the second brings the system down
at the time of day indicated in 24-hour notation.
.LP
At intervals that get closer as the apocalypse approaches,
warning messages are displayed at terminals of all logged-in users,
and of users who have remote mounts on that machine.
Five minutes before shutdown,
or immediately if shutdown is in less than 5 minutes,
logins are disabled by creating
.B /etc/nologin
and writing a message there.
If this file exists when a user attempts to log in,
.BR login (1)
prints its contents and exits.  The file is removed just before
.B shutdown
exits.
.LP
At shutdown time a message is written to the system log daemon,
.BR syslogd (8),
containing the time of shutdown,
the instigator of the shutdown, and the reason.
Then a terminate signal is sent to
.BR init ,
which brings the system down to single-user mode.
.LP
The time of the shutdown and the warning message are placed in
.BR /etc/nologin ,
which should be used to inform the users as to when the system
will be back up, and why it is going down (or anything else).
.SH OPTIONS
.LP
As an alternative to the above procedure, these options can be
specified:
.TP
.B \-f
Arrange, in the manner of
.BR fastboot (8),
that when the system is rebooted, the file systems will not
be checked.
.TP
.B \-h
Execute
.BR halt (8).
.TP
.B \-k
Simulate shutdown of the system. Do not actually shut down the system.
.TP
.B \-n
Prevent the normal
.BR sync (2)
before stopping.
.TP
.B \-r
Execute
.BR reboot (8).
.SH FILES
.PD 0
.TP 20
.B /etc/nologin
tells login not to let anyone log in
.TP
.B /etc/xtab
list of remote hosts that have mounted this host
.PD
.SH "SEE ALSO"
.BR login (1),
.BR sync (2),
.BR fastboot (8),
.BR halt (8),
.BR reboot (8),
.BR syslogd (8)
.SH BUGS
Only allows you to bring the system down between
\(lqnow\(rq and 23:59 if
you use the absolute time for shutdown.
  /export/exec/kvm/sun4"
.LP
.SH FILES
.PD 0
.TP 32
.B /etc/hosts
hosts database
.TP
.B /etc/ethers
database of hostnames and Ethernet addresses
.TP
.B /etc/exports
database of exported file systems
.TP
.B /usr/etc/install/files 
records of software installed/extracted after initial installation
.TP
.BI /usr/etc/inst./share/man/man8/spray.8c                                                                              755       0      12         3407  4424741640  10313                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)spray.8c 1.11 89/03/27 SMI;
.TH SPRAY 8C "22 March 1989"
.SH NAME
spray \- spray packets
.SH SYNOPSIS
.B /usr/etc/spray
[
.B \-c
.I count
] [
.B \-d
.I delay
] [
.B \-i
.I delay
] [
.B \-l
.I length
]
.I host
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "spray command"  ""  "\fLspray\fP \(em spray packets"
.B spray
sends a one-way stream of packets to
.I host
using
.SM RPC\s0,
and reports how many were received, as
well as the the transfer rate.  The
.I host
argument can be either a name or an internet address.
.SH OPTIONS
.TP 15
.BI \-c " count"
Specify how many packets to send.
The default value of
.I count
is the number of packets required
to make the total stream size 100000 bytes.
.TP
.BI \-d " delay"
Specify how many microseconds to pause between
sending each packet.  The default is 0.
.TP
.BI \-i " delay"
Use
.SM ICMP
echo packets rather than
.SM RPC\s0.
Since
.SM ICMP
automatically
echos, this creates a two way stream.
.TP
.BI \-l " length"
The
.I length
parameter is the numbers of bytes in the
Ethernet packet that holds the
.SM RPC
call message.  Since the data
is encoded using
.SM XDR\s0,
and
.SM XDR
only deals with 32 bit quantities,
not all values of
.I length
are possible, and
.B spray
rounds up to the nearest possible value.  When
.I length
is greater than 1514, then the
.SM RPC
call can no longer be
encapsulated in one Ethernet packet, so the
.I length
field
no longer has a simple correspondence to Ethernet packet size.
The default value of
.I length
is 86 bytes (the size of the
.SM RPC
and
.SM UDP
headers)
.SH "SEE ALSO"
.BR icmp (4P),
.BR ping (8C),
.BR sprayd (8C)
.LP
.TX INSTALL

.BR sync (2)
before stopping.
.TP
.B \-r
Execute
.BR reboot (8).
.SH FILES
.PD 0
.TP 20
.B /etc/nologin
tells login not to let anyone log in
.TP
.B /etc/xtab
list of remote hosts that have mounted this host
.PD
.SH "SEE ALSO"
.BR login (1),
.BR syn./share/man/man8/tic.8v                                                                                755       0      12        13376  4424741642  10007                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tic.8v 1.15 89/03/27 SMI; from S5R3
.TH TIC 8V "22 March 1989"
.SH NAME
tic \- terminfo compiler
.SH SYNOPSIS
.BR tic
.RB "[ " \-v\c
.RI [ n "] ]"
.RB [ \-c ]
.I filename
.SH DESCRIPTION
.IX "tic command" "" "\fLtic\fP command"
.LP
Note:
Optional Software (System V Option).
Refer to
.TX INSTALL
for information on how to install this command.
.LP
.B tic
compiles a
.BR terminfo (5V)
source file into the compiled format.
The results are placed in the directory
.BR /usr/share/lib/terminfo .
The compiled format is used by the
.BR curses (3V)
library.
.LP
Each entry in the file describes the
capabilities of a particular terminal.  When a
.BI use= entry
field is given in a terminal entry,
.B tic
reads in the binary (compiled)
description of the indicated
.I entry
from
.BR /usr/share/lib/terminfo
to duplicate the contents of that entry within the one being
compiled.  However, if an
.I entry
by that name is specified in
.IR filename ,
the entry in that source file is used first.
Also, if a capability is defined in both entries, the definition
in the current entry's source file is used.
.LP
If the environment variable
.SB TERMINFO
is set, that directory is searched and written to instead of
.BR /usr/share/lib/terminfo .
.SH OPTIONS
.HP
.BR \-v [\c
.IR n ]
.br
Verbose.
Display trace information on the standard error.
The optional integer argument is a number from 1 to 10,
inclusive, indicating the desired level of detail.  If
\fIn\f1
is omitted, the default is 1.
.TP
.B \-c
Only check
.I filename
for errors.  Errors in
.B use=
links are not detected.
.SH FILES
.TP 25
.B /usr/share/lib/terminfo/?/\(**
compiled terminal description data base
.SH "SEE ALSO"
.BR fork (2),
.BR curses (3V),
.BR curses (3X),
.BR malloc (3),
.BR term (5),
.BR terminfo (5V)
.LP
.SH BUGS
Total compiled entries cannot exceed 4096 bytes.
The name field cannot exceed 1024 bytes.
.LP
When the
.B \-c
option is used,
duplicate terminal names will not be diagnosed; however, when
.B \-c
is not used, they will be.
.LP
For backward compatibility, cancelled capabilities will not be marked
as such within the terminfo binary unless the entry name has a
.RB ` + '
within it.  Such terminal names are only used for inclusion with a
.B use=
field, and typically aren't used for actual terminal names.
.SH DIAGNOSTICS
Most diagnostic messages produced by
.B tic
are preceded with the approximate line number and the name of
the entry being processed.
.TP
.BI mkdir " name " "returned bad status"
The named directory could not be created.
.TP
.B "File does not start with terminal names in column one"
The first thing seen in the file, after comments, must be
the list of terminal names.
.TP
.B Token after a seek(2) not \s-1NAMES\s0
Somehow the file being compiled changed during the compilation.
.TP
.B Not enough memory for use_list element
.PD 0
.TP
.B Out of memory
Not enough free memory was available
.RI ( malloc (3)
failed).
.PD
.TP
.BI "Can't open " filename
The named file could not be opened or created.
.TP
.BI "Error in writing " filename
The named file could not be written to.
.TP
.BI Can't link " filename " to " filename"
A link failed.
.TP
.BI "Error in re-reading compiled " filename
The compiled file could not be read back in.
.TP
.B Premature \s-1EOF\s0
The current entry ended prematurely.
.TP
.B Backspaced off beginning of line
This error indicates something wrong happened within
.BR tic .
.TP
.BI "Unknown Capability \- " filename
The named invalid capability was found within the file.
.TP
.B Wrong type used for capability .\|.\|.
For example, a string capability was given a numeric value.
.TP
.B Unknown token type
Tokens must be followed by
.RB ` @ '
to cancel,
.RB ` , '
for booleans,
.RB ` # '
for numbers, or
.RB ` = '
for strings.
.PD 0
.TP
.IB name ": bad term name"
.TP
.BI Line " n" ": Illegal terminal name \- " name
.TP
.B "Terminal names must start with a letter or digit"
The given name was invalid. Names must
not contain white space or slashes,
and must begin with a letter or digit.
.PD
.TP
.IB name ": terminal name too long."
An extremely long terminal name was found.
.TP
.IB name ": terminal name too short."
A one-letter name was found.
.TP
.IB name " defined in more than one entry. Entry being used is " name" .
An entry was found more than once.
.TP
.BI "Terminal name " name " synonym for itself"
A name was listed twice in the list of synonyms.
.TP
.B At least one synonym should begin with a letter.
At least one of the names of the terminal should begin with a letter.
.TP
.IB "Illegal character \- " c
The given invalid character was found in the input file.
.TP
.B Newline in middle of terminal name
The trailing comma was probably left off of the list of names.
.TP
.B Missing comma
A comma was missing.
.TP
.B Missing numeric value
The number was missing after a numeric capability.
.TP
.B \s-1NULL\s0 string value
The proper way to say that a string capability does not exist is
to cancel it.
.TP
.B Very long string found.  Missing comma?
Self-explanatory.
.br
.ne 8
.TP
.B Unknown option. Usage is:
An invalid option was entered.
.TP
.B Too many file names.  Usage is:
Self-explanatory.
.TP
.IB name " non-existent or permission denied"
The given directory could not be written into.
.TP
.IB name " is not a directory"
Self-explanatory.
.TP
.IB name ": Permission denied"
Access denied.
.TP
.IB name ": Not a directory"
.B tic
wanted to use the given name as a directory, but it already
exists as a file
.TP
.B \s-1SYSTEM ERROR\s0!! Fork failed!!!
A
.BR fork (2)
failed.
.TP
.B Error in following up use-links.
Either there is
a loop in the links or they reference non-existent
terminals.  The following is a list of the entries
involved:\fR
.br
.RS
A
.BR terminfo (5V)
entry with a
.BI use= name
capability either referenced a
non-existent terminal called
.I filename
or
.I filename
somehow referred back to the given entry.
.RE
Verbose.
Display trace information on the standard error.
The optional integer argument is a number from 1 to 10,
inclusive, indicating the desired level of detail.  If
\fIn\f1
is omitted, the default is 1.
.TP
.B \-c
Only check
.I filename
for errors.  Erro./share/man/man8/sprayd.8c                                                                             755       0      12         1377  4424741640  10463                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sprayd.8c 1.14 89/03/27 SMI;
.TH SPRAYD 8C "22 March 1989"
.SH NAME
sprayd, rpc.sprayd \- spray server
.SH SYNOPSIS
.B /usr/etc/rpc.sprayd
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "sprayd daemon"  ""  "\fLsprayd\fP \(em spray server"
.IX  "daemons"  "sprayd"  ""  "\fLsprayd\fP \(em spray server"
.IX  "remote procedure call services"  "sprayd"  ""  "\fLsprayd\fP \(em spray server"
.LP
.B rpc.sprayd
is a server which records the packets sent by
.BR spray (8C).
The
.B rpc.sprayd
daemon is normally invoked by
.BR inetd (8C).
.SH "SEE ALSO"
.BR inetd (8C),
.BR spray (8C)
.LP
.TX INSTALL
fr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8       U  ypxfr_2perday.8     V  zdump.8      W  zic.8 8 R fork (2)
failed.
.TP
.B Error in following up use-links.
Either there is
a loop in the links or they reference non-existen./share/man/man8/statd.8c                                                                              755       0      12         1266  4424741641  10276                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)statd.8c 1.20 89/03/27 SMI; from UCB 4.3 BSD
.TH STATD 8C "22 March 1989"
.SH NAME
statd, rpc.statd \- network status monitor
.SH SYNOPSIS
.B /usr/etc/rpc.statd
.SH DESCRIPTION
.IX  "statd command"  ""  "\fLstatd\fP \(em network status monitor"
.IX  servers statd  ""  "\fLstatd\fP \(em network status monitor"
.LP
.B statd
is an intermediate version of the status monitor.
It interacts with
.BR lockd (8C)
to provide the crash and recovery
functions for the locking services on
.SM NFS\s0.
.SH FILES
.PD 0
.TP 20
.B /etc/sm
.TP
.B /etc/sm.bak
.TP
.B /etc/state
.PD
.SH "SEE ALSO"
.LP
.BR statmon (5),
.BR lockd (8C)
.SH BUGS
.LP
The crash of a site is only detected upon its recovery.
ted.8c  d  x  Q  	ypwhich.8 P    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 ump.8      W  zic.8 8 R fork (2)
failed.
.TP
.B Error in following up use-links.
Either there is
a loop in the links or they reference non-existen./share/man/man8/sticky.8                                                                              755       0      12         5007  4424741641  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sticky.8 1.18 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH STICKY 8 "22 March 1989"
.SH NAME
sticky \- persistent text and append-only directories
.SH DESCRIPTION
.IX "sticky directory"
The
.I "sticky bit"
(file mode bit 01000, see
.BR chmod (2))
is used to indicate special treatment
for certain executable files and directories.
.SS "Sticky Text Executable Files"
While the sticky bit
is set on a sharable executable file,
the text of that file will not be removed from the system swap area.
Thus the file does not have to be fetched from the file system
upon each execution.
As long as a copy remains in the swap area, the
original text cannot be overwritten in the file system,
nor can the file be deleted.
Directory entries can be removed so long as one link remains.
.LP
Sharable executable files are made by the
.B \-n
and
.B \-z
options of
.BR ld (1).
.LP
To replace a sticky file that has been used:
.TP
\(bu
Clear the sticky bit with
.BR chmod (1V).
.TP
\(bu
Execute the old program to flush the swapped copy.
This can be done safely even if others are using it.
.TP
\(bu
Overwrite the sticky file.
If the file is being executed by any process,
writing will be prevented; it suffices to simply remove the file
and then rewrite it, being careful to reset the owner and mode with
.B chmod
and
.BR chown (2).
.TP
\(bu
Set the sticky bit once again, if still needed.
.LP
Only the super-user can set the sticky bit
on a sharable executable file.
.SS "Sticky Directories"
A directory for which the sticky bit is set restricts deletion of
files it contains.  A file in a sticky directory may only be removed or
renamed by a user who has write permission on the directory,
and either owns the file, owns the directory, or is the super-user.
This is useful for directories such as
.BR /tmp ,
which must be publicly writable, but should deny users permission to
arbitrarily delete or rename the files of others.
.LP
Any user may create a sticky directory.
See
.BR chmod
for details about modifying file modes.
.SH BUGS
Since the text areas of sticky text
executables are stashed in the swap area,
abuse of the feature can cause a system to run out of swap.
.LP
Neither
.BR open (2V)
nor
.BR mkdir (2)
will create a file with the sticky bit set.
.SH FILES
.PD 0
.TP 20
.B /tmp
.PD
.SH SEE ALSO
.BR chmod (1V),
.BR ld (1),
.BR chmod (2),
.BR chown (2),
.BR mkdir (2),
.BR open (2V)
nal names in column one"
The first thing seen in the file, after comments, must be
the list of terminal names.
.TP
.B Token after a seek(2) not \s-1NAMES\s0
Somehow the file being compiled changed during the compilation.
.TP
.B Not enough memory for use_list element
.PD 0
.TP
.B Out of memory
Not enough free memory was available
.RI ( malloc (3)
failed).
.PD
.TP
.BI "Can't open " filename
The named file could not be opened or created.
.TP
.BI "Error in writing " filename
The named file could not be w./share/man/man8/sundiag.8                                                                             755       0      12         6264  4424741641  10451                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sundiag.8 1.3 89/03/27 SMI;
.TH SUNDIAG 8 "6 September 1988"
.SH NAME
sundiag \- system diagnostics
.SH SYNOPSIS
.B /usr/diag/sundiag/sundiag
[
.B \-Cmptv
]
.\"[
.\".B \-a
.\".I hostname
.\"]
[
.BI \-h " remotehost"
]
[
.BI \-o " saved_options_file"
]
[
.I generic_tool_arguments
]
.SH AVAILABILITY
.LP
This program is available with the 
.I "User Diagnostics" 
software installation option.
Refer to  
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
.B sundiag
is a diagnostic facility that
tests the functionality of the operating
system and reports its findings.
It can also be used to report the hardware configuration as
detected by the system.
.LP
You must be 
root 
to use
.BR sundiag . 
.LP
When run on the console monitor,
.B sundiag
takes full advantage of the
.I "SunView \1" 
windowing environment.
There are four subwindows:
a control panel for displaying the discovered hardware
configuration and manipulating of the numerous test parameters and
options, a test status panel which shows the test results, a console
window which is used to display messages,
and a performance monitor.
There are also some popup frames, 
including a text frame for viewing 
.B sundiag
and system log files.
.LP
When executed from a terminal, 
.B sundiag 
uses 
.BR curses (3X) 
to simulate each subwindow on the screen. 
.LP
.B sundiag 
consists of 
.BR sundiag , 
along with several binary modules and executable files 
containing the actual test code,
all of which reside in 
.BR /usr/diag/sundiag .
.SH OPTIONS
.TP
.B \-C
Redirect the console output from any existing 
console window to the 
.B sundiag
console sub-window. This option does not work when
running on a terminal or tty emulator.
.TP
.B \-m 
Create a device file for all devices found during the kernel probe.
.B sundiag
uses the same major/minor device numbers and permissions
declared in
.BR /dev/\s-1MAKEDEV\s+1 .
.TP
.B \-p
Ignore the kernel probe for devices, especially when
running user-defined tests found in the 
.B \&.usertest
file.
.TP
.B \-t
Run
.B sundiag
on a terminal.
Incompatible with
.BR \-C .
.TP
.B \-v
Suppress the
.B sundiag
start-up messages so that they do
not interfere with the display when SunView windows come up.
This argument may be used in the 
.B \&.sunview
file.
.\".TP
.\".BI \-a " hostname"
.\"Run 
.\".B sundiag
.\"in automated test mode. This option requires special
.\"Sun automated test equipment and is intended for use
.\"by Sun manufacturing.
.TP
.BI \-h " remotehost"
Use this option to invoke
.B sundiag
when using the SunView-based Remote Interface. 
Refer to the
.TX SUNDIAG
for information on this interface.
.TP
.BI \-o " saved_options_file"
Use the 
.I saved_options_file
to restore options.
The default option file is 
.BR \&.sundiag .
.B \&.sundiag 
is used if the
.B \-o 
option is not used and
if the default file exists.
.TP
.I generic_tool_arguments
Refer to 
.BR sunview (1)
for examples of generic tool arguments that may
be used with
.BR sundiag .
.SH FILES
.PD 0
.TP 40
.B "/var/adm/sundiaglog/options/.sundiag"
start-up option file
.TP
.B "/usr/diag/sundiag/.usertest"
user-defined test description file
.PD
.SH SEE ALSO
.BR sunview (1),
.BR curses (3X)
.LP
.TX INSTALL
.br
.TX SUNDIAG
 deletion of
files it contains.  A file in a sticky directory may only be removed or
renamed by a user who has write permission on the directory,
and either owns the file, owns the directory, or is the super-user.
This is useful for directories such as
.BR /tmp ,
which must be publicly writable, but should deny users permission to./share/man/man8/suninstall.8                                                                          755       0      12         4665  4424741641  11216                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)suninstall.8 1.13 89/04/21 SMI; from UCB 4.3 BSD
.TH SUNINSTALL 8 "21 April 1989"
.SH NAME
suninstall \- install and upgrade the Sun Operating System
.SH SYNOPSIS
.B /usr/etc/install/suninstall
.SH DESCRIPTION
.IX "suninstall command" "" "\fLsuninstall\fP command"
.B suninstall
is a forms-based subsystem for installing and upgrading the Sun
Operating System (Sun \s-1OS\s+1) on Sun-2, Sun-3 and Sun-4 systems.
Unlike previous installation subsystems,
.B suninstall
does not require recapitulation of an interrupted
procedure; you can pick up where you left off.
A new invocation of
.B suninstall
displays the saved information and offers the user an opportunity
to make any needed alterations before it proceeds.
.LP
Note: 
.B suninstall
should only be invoked from
the miniroot (see
.I "Installing the Sun\s-1OS\s+1 4.0.3).
.LP
.B suninstall
allows installation of the operating system onto any system
configuration, be it standalone, dataless, a homogeneous file server,
or a heterogeneous server.  It installs
the various versions of the
operating system needed by clients on a heterogeneous file
server, from any distribution tape format.
The number of different system versions 
that can be installed is only limited to the
disk
space available.
.LP
Using
.BR setup_client (8)
and
.BR setup_exec (8),
a 4.0 standalone system can be converted into a 4.0
server without taking down or rebuilding the system.
.BR setup_client (8)
adds or removes a diskless client while the server is running
in multiuser mode;
.BR setup_exec (8)
converts a 4.0 standalone system or server into a
heterogeneous file server while it is running multiuser.
.LP
To abort the installation procedure, use the interrupt
character (typically
.SM CTRL-C\s0).
.SH USAGE
Refer to 
.I "Installing the Sun\s-1OS\s+1 4.0.3 
for more information on the various menus and selections.
.SH FILES
.PD 0
.TP 25
.B /usr/etc/install
directory containing installation programs, scripts and files
.TP
.B /usr/etc/install/files
directory containing default data files for clients and hosts
.TP
.B /usr/etc/install/get_*_info
terminal data-entry forms 
.TP
.B /usr/etc/install/installation
subsystem utility program
.TP
.B /usr/etc/install/makedir
subsystem utility program
.TP
.B /usr/etc/install/script
subsystem utility scripts
.TP
.B /usr/etc/install/xdrtoc
subsystem utility program
.PD
.SH SEE ALSO
.BR extract_unbundled (8),
.BR setup_client (8),
.BR setup_exec (8)
.LP
.I Installing the Sun\s-1OS\s+1 4.0.3.
hmod (1V),
.BR ld (1),
.BR chmod (2),
.BR chown (2),
.BR mkdir (2),
.BR ope./share/man/man8/sunupgrade.8                                                                          755       0      12        10155  4424741641  11206                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)sunupgrade.8 1.7 89/04/21 SMI; new for Billie
.TH SUNUPGRADE 8 "21 April 1989"
.SH NAME
sunupgrade \- upgrade the Sun Operating System
.SH SYNOPSIS
.LP
.B /usr/etc/sunupgrade
[
.B \-l
]
[
.B \-d
]
[
.B \-n
]
.SH AVAILABILITY
.LP
This command is available on Sun2, Sun3 and Sun4
application architectures
running Sun\s-1OS\s+1 version 4.0 or later only.
Refer to
.I "Installing the Sun\s-1OS\s+1 4.0.3"
for more information.
.SH DESCRIPTION
.LP
.B sunupgrade
is an interactive utility used to upgrade the 
Sun Operating System (Sun\s-1OS\s+1) to a higher revision level on
Sun2, Sun3, and Sun4 application architectures.
The current Sun\s-1OS\s+1 level must be at least Sun\s-1OS\s+1 4.0.
.LP
Note:
.B sunupgrade
should only be invoked from
the miniroot (see
.I "Installing the Sun\s-1OS\s+1 4.0.3).
.LP
.B sunupgrade
lets you upgrade any system configuration.
The following are the valid configuration types:
.RS
.TP 3
.PD 0
\(bu
Standalone
.TP
\(bu
Homogeneous server
.TP
\(bu
Heterogeneous server
.TP
\(bu
Dataless clients
.TP
\(bu
Diskless clients
.PD
.RE
Both local and remote installation modes are supported. 
.PD
.LP
.B sunupgrade
overlays new executable administrative files on top of existing ones;
the user must resolve the differences between the
conflicting files after
.B sunupgrade
is completed.
If new and old versions of these 
.SM ASCII
files are not identical,
the newer file is installed with a trailing suffix reflecting
the release name.
The older versions of
\fLvmunix\fP
are saved with a trailing suffix indicating the pre-release
version.
Except for
.BR /usr/share/sys/sun/conf.c ,
these conflicts will only arise
in the
.B /etc
and
.B /var
directories.
.LP
All of these conflicting files are logged in
.B /usr/etc/upgrade/save/special_files 
for servers and standalone systems,
.BI /usr/etc/upgrade/save/ clientname .special_files
for diskless clients, and
.br
.B /home/upgrade/special_files
for dataless clients.
.LP
Errors returned by
.B sunupgrade
during the upgrade procedure
are saved in
.BR /usr/etc/upgrade/save/errlog .
.LP
After
.B sunupgrade
completes execution:
single-user mode must be invoked; all special files 
inspected;
the older administrative files replaced with
the newer ones and renamed
without the suffixes; and 
.B errlog
checked for errors.
.SH OPTIONS
.TP
.B \-l
Create log of all files extracted and overlaid.
Performance will deteriorate slightly.
Log files are saved in the directory
.BR /usr/etc/upgrade/save .
A log called
.B upgrade_files
is created in that directory containing the filenames of all
the new files installed.
Client log files are installed as 
.IB clientname .upgrade_files.
.TP
.B \-d
Work in debugging mode.
Not recommended for normal operation.
.TP
.B \-n
Switch off \(lqno-rewind\(rq operation.  The no-rewind operation
available only on systems running Sun\s-1OS\s+1 4.0.2-\s-1CG\s+18 or
4.0.3.
.SH FILES
.PD 0
.TP 20
.B /usr/etc/upgrade/EXCLUDELIST
.TP
.B /usr/etc/upgrade/README
.TP
.B /usr/etc/upgrade/checksums
.TP
.B /usr/etc/upgrade/chk_ok
.TP
.B /usr/etc/upgrade/chk_release
.TP
.B /usr/etc/upgrade/chkextract
.TP
.B /usr/etc/upgrade/config_host
.TP
.B /usr/etc/upgrade/extract
.TP
.B /usr/etc/upgrade/extract_client
.TP
.B /usr/etc/upgrade/extract_clntroot
.TP
.B /usr/etc/upgrade/extract_stand
.TP
.B /usr/etc/upgrade/include
.TP
.B /usr/etc/upgrade/includefile
.TP
.B /usr/etc/upgrade/get_arch
.TP
.B /usr/etc/upgrade/get_clientinfo
.TP
.B /usr/etc/upgrade/get_machtype
.TP
.B /usr/etc/upgrade/get_tapeinfo
.TP
.B /usr/etc/upgrade/get_toc
.TP
.B /usr/etc/upgrade/get_upgradeinfo
.TP
.B /usr/etc/upgrade/mop_up
.TP
.B /usr/etc/upgrade/mount_ufs
.TP
.B /usr/etc/upgrade/mount_usr
.TP
.B /usr/etc/upgrade/start_log
.TP
.B /usr/etc/upgrade/save/errlog
.TP
.B /usr/etc/upgrade/save/special_files
.TP
.B /usr/etc/upgrade/save/upgrade_files
.TP
.B /usr/etc/upgrade/setup_kvm
.TP
.B /usr/etc/upgrade/small_kernel_files
.TP
.B /usr/etc/upgrade/sun2_cp_share
.TP
.B /usr/etc/upgrade/sun2_ln_exec
.TP
.B /usr/etc/upgrade/sunupgrade
.TP
.B /usr/etc/upgrade/tar_clntroot
.TP
.B /usr/etc/upgrade/verify_clntpart
.TP
.B /usr/etc/upgrade/xdrtoc
.PD
.SH SEE ALSO
.BR suninstall (8)
.LP
.I "Installing the Sun\s-1OS\s+1 4.0.3"
more than one entry. Entry being used is " name" .
An entry was found more than once.
.TP
.BI "Terminal name " name " synonym for itself"
A name was listed twice in the list of synonyms.
.TP
.B At least one synonym should begin with a letter.
At least one of the names of the terminal should begin with a letter.
.TP
.IB "Illegal character \- " c
The given invalid character was found in the input file../share/man/man8/swapon.8                                                                              755       0      12         3716  4424741641  10325                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)swapon.8 1.11 89/03/27 SMI; from UCB 4.2
.TH SWAPON 8 "22 March 1989"
.SH NAME
swapon \- specify additional device for paging and swapping
.SH SYNOPSIS
.B "/usr/etc/swapon"
.B \-a
.LP
.B "/usr/etc/swapon"
.IR name .\|.\|.
.SH DESCRIPTION
.IX  "swapon command"  ""  "\fLswapon\fP \(em specify paging device"
.IX  "swapping devices, specify swapon"  ""  "swapping devices, specify \(em \fLswapon\fP"
.IX  "paging devices, specify swapon"  ""  "paging devices, specify \(em \fLswapon\fP"
.IX  "devices"  "swapping, specify swapon"  ""  "swapping, specify \(em \fLswapon\fP"
.IX  "devices"  "paging, specify swapon"  ""  "paging, specify \(em \fLswapon\fP"
.IX  "additional paging/swapping devices, specify"  ""  "additional paging/swapping devices, specify \(em \fLswapon\fP"
.B swapon
specifies additional devices or files on which
paging and swapping are to take place.
The system begins by swapping and paging on only a single device
so that only one disk is required at bootstrap time.  Calls to
.B swapon
normally occur in the system multi-user initialization file
.B /etc/rc
making all swap devices available, so that the paging and swapping
activity is interleaved across several devices.
.LP
The second form gives individual block devices or files as given
in the system swap configuration table.
The call makes only this space
available to the system for swap allocation.
.LP
Note: \(lqswap files\(rq made with
.BR mkfile (8)
can be used as
swap areas over
.SM NFS\s0.
.SH OPTIONS
.TP
.B \-a
Make available all devices of type
.B swap
in
.BR /etc/fstab .
Using
.B swapon
with the
.B \-a
option is the normal usage.
.SH FILES
.PD 0
.TP 20
.B /dev/sd?b
.TP
.B /dev/xy?b
.TP
.B /dev/xd?b
normal paging devices
.TP
.B /etc/fstab
.TP
.B /etc/rc
.PD
.SH SEE ALSO
.BR swapon (2),
.BR fstab (5),
.BR init (8),
.BR mkfile (8)
.SH BUGS
There is no way to stop paging and swapping on a device.
It is therefore not possible to make use of devices which may be
dismounted during system operation.
rade procedure
are saved in
.BR /usr/etc/upgrade/s./share/man/man8/syslogd.8                                                                             755       0      12         5177  4424741642  10506                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)syslogd.8 1.28 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983,1986 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH SYSLOGD 8 "22 March 1989"
.SH NAME
syslogd \- log system messages
.SH SYNOPSIS
.B /usr/etc/syslogd
[
.B \-d
] [
.BI \-f configfile
] [
.BI \-m " interval"
]
.SH DESCRIPTION
.IX  "syslogd"  ""  "\fLsyslogd\fP \(em system log message daemon"
.IX  "system log daemon \(em \fLsyslog\fR"
.IX  "log files and system log daemon \(em \fLsyslogd\fR"
.B syslogd
reads and forwards system messages to the appropriate log files
and/or users, depending upon the priority of a message and the
system facility from which it originates.  The configuration file
.BR /etc/syslog.conf
(see
.BR syslog.conf (5))
controls where messages are forwarded.
.B syslogd
logs a mark 
.nh
(timestamp)
.hy
message every
.I interval
minutes (default 20) at priority
.SB LOG_INFO
to the facility whose name is given as
.B mark
in the
.B syslog.conf
file.
.LP
A system message consists of a single line of text, which may be
prefixed with a priority code number enclosed in angle-brackets
.RB ( <\|> );
priorities are defined in
.BR sys/syslog.h .
.LP
.B syslogd
reads from the
.SB AF_UNIX
address family socket
.BR /dev/log ,
from an Internet address family socket specified in
.BR /etc/services ,
and from the special device
.B /dev/klog
(for kernel messages).
.LP
.B syslogd
reads the configuration file when it starts up, and again
whenever it receives a
.SM HUP
signal, at which time it also closes all files it has open,
re-reads its configuration file, and then opens only the log
files that are listed in that file.
.B syslogd
exits when it receives a
.SB TERM
signal.
.LP
As it starts up,
.B syslogd
creates the file
.BR /etc/syslog.pid ,
if possible, containing its process
.SM ID
(\s-1PID\s0).
.SH Sun386i DESCRIPTION
.B syslogd
translates messages using
the databases specified on an optional line in the 
.B syslog.conf
as indicated with a
.B translate 
entry.
.LP
The format of these databases is described in
.BR translate (5).
.SH OPTIONS
.TP 17
.B \-d
Turn on debugging.
.TP
.BI \-f configfile
Specify an alternate configuration file.
.TP
.BI \-m " interval"
Specify an interval, in minutes, between mark messages.
.SH FILES
.PD 0
.TP 20
.B /etc/syslog.conf
configuration file
.TP
.B /etc/syslog.pid
process
.SM ID
.TP
.B /dev/log
\s-1AF_UNIX\s0
address family  datagram log socket
.TP
.B /dev/klog
kernel log device
.TP
.B /etc/services
network services database
.PD
.SH SEE ALSO
.BR logger (1),
.BR syslog (3),
.BR syslog.conf (5),
.BR translate (5)
de.
Not recommended for normal operation.
.TP
.B \-n
Switch off \(lqno-rewind\(rq operation.  The no-rewind operation
available only on systems running Sun\s-1OS\s+1 4.0.2-\s-1CG\s+18 or
4.0.3.
.SH FILES
.PD 0
.TP 20
.B /usr/etc/upgrade/EXCLUDELIST
.TP
.B /usr/etc/upgrade/README
.TP
.B /usr/etc/upgrade/checksums
.TP
.B /usr/etc/upgrade/chk_ok
.TP
.B /usr/etc/upgrade/chk_release
.TP
./share/man/man8/talkd.8c                                                                              755       0      12         1404  4424741642  10251                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)talkd.8c 1.9 89/03/27 SMI; from UCB 4.1
.TH TALKD 8C "22 March 1989"
.SH NAME
talkd, in.talkd \- server for talk program
.SH SYNOPSIS
.B /usr/etc/in.talkd
.SH DESCRIPTION
.IX  "talkd command"  ""  "\fLtalkd\fP \(em talk server"
.IX  servers  talkd  ""  "\fLtalkd\fP \(em talk program server"
.LP
.B talkd
is a server used by the
.BR talk (1)
program.  It listens at
the udp port indicated in the ``talk'' service description;
see
.BR services (5).
The actual conversation takes place on a tcp connection that
is established by negotiation between the two machines
involved.
.SH "SEE ALSO"
.BR talk (1),
.BR services (5),
.BR inetd (8C)
.SH BUGS
.LP
The protocol is architecture dependent, and can not be relied upon
to work between Sun systems and other machines.
  The configuration file
.BR /etc/syslog.conf
(see
.BR syslog.conf (5))
controls where messages are forwarded.
.B syslogd
logs a mark 
.nh
(timestamp)
.hy
message every
.I interval
minutes (default 20) at priority
.SB LOG_INFO
to the facility whose nam./share/man/man8/telnetd.8c                                                                            755       0      12         6077  4424741642  10624                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)telnetd.8c 1.22 89/03/27 SMI; from UCB 4.3
.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.TH TELNETD 8C "22 March 1989"
.SH NAME
telnetd, in.telnetd \- DARPA TELNET protocol server
.SH SYNOPSIS
.B /usr/etc/in.telnetd
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "telnetd daemon" "" "\fLtelnetd\fP daemon"
.B telnetd
is a server which supports the
.SM DARPA
standard
.SM TELNET
virtual terminal protocol.
.B telnetd
is invoked by the internet server (see
.BR inetd (8C)),
normally for requests to connect to the
.SM TELNET
port as indicated by the
.B /etc/services
file (see
.BR services (5)).
.PP
.B telnetd
operates by allocating a pseudo-terminal device (see
.BR pty (4))
for a client, then creating a login process which has
the slave side of the pseudo-terminal as its standard input, output,
and error.
.B telnetd
manipulates the master side of the pseudo-terminal,
implementing the
.SM TELNET
protocol and passing characters
between the remote client and the login process.
.PP
When a
.SM TELNET
session is started up, 
.B telnetd
sends
.SM TELNET
options to the client side indicating
a willingness to do
.I remote echo
of characters, to
.I suppress go
.IR ahead ,
and to receive
.I terminal type information
from the remote client.
If the remote client is willing, the remote terminal type is
propagated in the environment of the created login process.
The pseudo-terminal allocated to the client is configured
to operate in \*(lqcooked\*(rq mode, and with
.SM
.BR XTABS\s0 ,
.SM
.BR ICRNL\s0 ,
and
.SB ONLCR
enabled (see
.BR termio (4)).
.PP
.B telnetd
is willing to
.IR do :
.IR echo ,
.IR binary ,
.I suppress go
.IR ahead ,
and
.I timing
.IR mark .
.B telnetd
is willing to have the remote client
.IR do :
.IR binary ,
.I terminal
.IR type ,
and
.I suppress go
.IR ahead .
.SH "SEE ALSO"
.BR telnet (1C)
.LP
Postel, Jon, and Joyce Reynolds, ``Telnet Protocol Specification,'' RFC 854, 
Network Information Center, SRI International, Menlo Park, Calif., 
May 1983.
.SH BUGS
Some
.SM TELNET
commands are only partially implemented.
.PP
The
.SM TELNET
protocol allows for
the exchange of the number of lines and columns on the user's terminal,
but
.B telnetd
doesn't make use of them.
.PP
Because of bugs in the original 4.2 BSD
.BR telnet (1C),
.B telnetd
performs some dubious protocol exchanges to try to discover if the remote
client is, in fact, a 4.2 BSD
.BR telnet (1C).
.PP
Binary mode
has no common interpretation except between similar operating systems
.PP
The terminal type name received from the remote client is converted to
lower case.
.PP
The
.I packet
interface to the pseudo-terminal
(see
.BR pty (4))
should be used for more
intelligent flushing of input and output queues.
.LP
.B telnetd
never sends
.SM TELNET
.I go ahead
commands.
.LP
.B telnetd
can only support 64 pseudo-terminals.
s its standard input, output,
and error.
.B telnetd
manipulates the master side of the pseudo-terminal,
implementing the
.SM TELNET
protocol and passing characters
between the remote client and the login process.
.PP
When a
.SM TELNET
session is started up, 
.B telnetd
sends
.SM TELNET
options to the client side indicating
a willingness to do
.I remote echo
of characters, to
.I suppress go
.IR ahead ,
and to receive
.I terminal type information
./share/man/man8/tftpd.8c                                                                              755       0      12         7417  4424741642  10305                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\" @(#)tftpd.8c 1.24 89/03/27 SMI; from UCB 4.3
.\"
.TH TFTPD 8C "22 March 1989"
.UC 5
.SH NAME
tftpd, in.tftpd \- DARPA Trivial File Transfer Protocol server
.SH SYNOPSIS
.B /usr/etc/in.tftpd
.RB [ \-s ]
.RI [ " homedir " ]
.SH Sun386i SYNOPSIS
.B /usr/etc/in.tftpd
.RB [ \-s ]
.RB [ \-p ]
.RI [ " homedir " ]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX "tftpd daemon" "" "\fLtftpd\fP daemon"
.B tftpd
is a server that supports the
.SM DARPA
Trivial File Transfer Protocol (\s-1TFTP\s0).
This server is normally started by
.BR inetd (8C)
and operates at the port indicated in the
.B tftp
Internet service description in the
.BR /etc/inetd.conf 
file; see
.BR inetd.conf (5)
for details.
.PP 
Before responding to a request, the server attempts to change its
current directory to
.IR homedir ;
the default value is
.BR /tftpboot .
.SH Sun386i DESCRIPTION
The
.B tftpd
daemon
acts as described above, except that it will perform certain filename
mapping operations unless instructed otherwise by the 
.B \-p
command line argument
or when operating in a secure environment.
This mapping affects only
.SM TFTP
boot requests and will not affect requests 
for existing files.
.LP
The semantics of the changes are as follows. Only filenames of the format
.I ip-address
or
.IB ip-address .  arch,
where 
.I ip-address
is the IP address in hex, and 
.I arch
is the hosts's architecture (as returned by the
.BR arch (1)
command),
that do not correspond to files in
.BR /tftpboot ,
are mapped. 
If the address is known through a
.SM YP
lookup, any file of the form
.BI /tftpboot/ip-address *
(with or without a suffix) is returned. If there are multiple such files,
any one may be returned. If the
.I ip-address
is unknown (that is if the 
.B ipalloc  (8C)
service says the name service does not know the address), the filename
is mapped as follows: Names without the 
.I arch 
suffix are mapped into the name
.BR pnp.\s-1SUN3\s0 , 
and names with the suffix are mapped into 
\fBpnp. \fIarch\fR. 
That file is returned if it exists.
.SH OPTIONS
.TP
.B \-s
Secure.  When specified, the directory change must succeed; and
the daemon also changes its root directory to
.IR homedir .
.IP
The use of
.B tftp  
does not require an account or password on the remote system.
Due to the lack of authentication information,
.B tftpd
will allow only publicly readable files to be accessed.  Files may be
written only if they already exist and are publicly writable.  Note:
this extends the concept of \(lqpublic\(rq to include all users on all
hosts that can be reached through the network; this may not be
appropriate on all systems, and its implications should be considered
before enabling this service.
.PP 
.B tftpd
runs with the user
.SM ID
(\s-1UID\s0)
and group
.SM ID
(\s-1GID\s0)
set to
.BR \-2 ,
under the assumption that no files exist with that owner or group. 
However, nothing checks this assumption or enforces this restriction. 
.SH Sun386i OPTIONS
.TP
.B \-p
Disable pnp entirely. Do not map filenames.
.SH Sun386i FILES
.TP 20
.B /tftpboot/*
filenames are IP addresses
.SH "SEE ALSO"
.BR ipallocd (8C),
.BR netconfig (8C),
.BR inetd (8C),
.BR tftp (1C)
.LP
Sollins, K.R., 
.IR "The \s-1TFTP\s0 Protocol (Revision 2)" ,
.SM RFC\s0 783,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
June 1981.
.SH "Sun386i WARNINGS"
A request for an
.I ip-address
from a Sun-4 can be satisfied by a file named
.IB ip-address .386
for compatibility with some early Sun-4
.SM PROM 
monitors.
etup_kvm
.TP
.B /usr/etc/upgrade/small_kernel_files
.TP
.B /usr/etc/upgrade/sun2_cp_share
.TP
.B /usr/etc/upgrade/sun2_ln_exec
.TP
.B /usr/etc/upgrade/sunupgrade
.TP
.B /usr/etc/upgrade/tar_clntroot
.TP
.B /usr/etc/upgrade/verify_clntpart
.T./share/man/man8/tnamed.8c                                                                             755       0      12         2201  4424741642  10416                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tnamed.8c 1.13 89/03/27 SMI;
.TH TNAMED 8C "22 March 1989"
.SH NAME
tnamed, in.tnamed \- DARPA Trivial name server
.SH SYNOPSIS
.B /usr/etc/in.tnamed
[
.B \-v
]
.SH DESCRIPTION
.IX  "tnamed command"  ""  "\fLtnamed\fP \(em name server"
.IX  "DARPA Trivial name server"  ""  "DARPA Trivial name server \(em \fLtnamed\fP"
.IX  servers  tnamed  ""  "\fLtnamed\fP \(em DARPA Trivial name server"
.LP
.B tnamed
is a server that supports the
.SM DARPA
Name Server Protocol.  The name server operates
at the port indicated in the \(lqname\(rq service description (see
.BR services (5)),
and is invoked by
.BR inetd (8C)
when a request is made to the name server.
.LP
Two known clients of this service are the
.SM "MIT PC/IP"
software the Bridge boxes.
.SH OPTIONS
.TP
.B \-v
Invoke the daemon in verbose mode.
.SH "SEE ALSO"
.BR uucp (1C),
.BR services (5),
.BR inetd (8C)
.LP
Postel, Jon,
.IR "Internet Name Server" ,
.SM IEN
116,
.SM SRI
International, Menlo Park, California,
August 1979.
.SH BUGS
.LP
The protocol implemented by this program is obsolete.
Its use should be phased out in favor of
the Internet Domain protocol.
See
.BR named (8C).



the default value is
.BR /tftpboot .
.SH Sun386i DESCRIPTION
The
.B tftpd
daemon
acts as described above, except that it will perform certain filename
mapping operations unless instructed otherwise by the 
.B \-p
command line argument
or when operating in a secure environment.
This mapping affects only
.SM TFTP
boot requests and will not affect requests 
for existing files.
.LP
T./share/man/man8/trpt.8c                                                                               755       0      12         5573  4424741643  10157                                                                                                                                                                                                                                                                                                                                                                      .\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"
.\" @(#)trpt.8c 1.17 89/03/27 SMI; from 6.2 (Berkeley) 5/26/86
.TH TRPT 8C "22 March 1989"
.UC 5
.SH NAME
trpt \- transliterate protocol trace
.SH SYNOPSIS
.B /usr/etc/trpt
[
.B \-afjst
] [
.B \-p\c
.IR hex-address ]
[
.I system
[
.I core
] ]
.SH DESCRIPTION
.IX  "trpt command"  ""  "\fLtrpt\fP \(em transliterate protocol trace"
.IX  "transliterate protocol trace"  ""  "transliterate protocol trace \(em \fLtrpt\fP"
.B trpt
interrogates the buffer of
.SM TCP
trace records created
when a socket is marked for \*(lqdebugging\*(rq (see
.BR getsockopt (2)),
and prints a readable description of these records.
When no options are supplied,
.B trpt
prints all the trace records found in the system
grouped according to
.SM TCP
connection protocol control
block (\s-1PCB\s0).  The following options may be used to
alter this behavior.
.SH OPTIONS
.TP
.B \-a
In addition to the normal output,
print the values of the source and destination
addresses for each packet recorded.
.TP
.B \-f
Follow the trace as it occurs, waiting a
short time for additional records
each time the end of the log is reached.
.TP
.B \-j
Just give a list of the protocol control block
addresses for which there are trace records.
.TP
.B \-s
In addition to the normal output,
print a detailed description of the packet
sequencing information.
.TP
.B \-t
In addition to the normal output,
print the values for all timers at each
point in the trace.
.TP
.BI "\-p " hex-address
Show only trace records associated with the protocol
control block, the address of which follows.
.LP
The recommended use of
.B trpt
is as follows.
Isolate the problem and enable debugging on the
.BR socket (s)
involved in the connection.
Find the address of the protocol control blocks
associated with the sockets using the
.B \-A
option to
.BR netstat (8C).
Then run
.B trpt
with the
.B \-p
option, supplying the associated
protocol control block addresses.
The
.B \-f
option can be used to follow the trace log once the trace is located.
If there are
many sockets using the debugging option, the
.B \-j
option may be useful in checking to see if
any trace records are present for the socket in
question.
.LP
If debugging is being performed on a system or
core file other than the default, the last two
arguments may be used to supplant the defaults.
.SH FILES
.PD 0
.TP 20
.B /vmunix
.TP
.B /dev/kmem
.PD
.SH "SEE ALSO"
.BR netstat (8C),
.BR getsockopt (2)
.SH DIAGNOSTICS
.TP 15
.B no namelist
When the system image does not
contain the proper symbols to find the trace buffer;
others which should be self explanatory.
.SH BUGS
Should also print the data for each input or output,
but this is not saved in the trace record.
.LP
The output format is inscrutable and should be described
here.

.B \-s
In addition to the normal output,
print a detailed description of the packet
sequencing information.
.TP
.B \-t
In addition t./share/man/man8/tunefs.8                                                                              755       0      12         5403  4424741643  10317                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tunefs.8 1.16 89/03/27 SMI; from UCB 4.2
.TH TUNEFS 8 "25 September 1987"
.SH NAME
tunefs \- tune up an existing file system
.SH SYNOPSIS
.B /usr/etc/tunefs
[
.B \-a
.I maxcontig
] [
.B \-d
.I rotdelay
] [
.B \-e
.I maxbpg
] [
.B \-m
.I minfree
]
.IR special\  |\  filesystem
.SH DESCRIPTION
.IX  "tunefs command"  ""  "\fLtunefs\fP \(em tune file system"
.IX  "file system"  "tune"  "file system"  "tune \(em \fLtunefs\fP"
.B tunefs
is designed to change the dynamic parameters of a file system
which affect the layout policies.
The parameters which are to be changed are indicated by the
.SM OPTIONS
given below:
.SH OPTIONS
.TP
.BI \-a " maxcontig"
This specifies the maximum number of contiguous blocks that will
be laid out before forcing a rotational delay (see
.B \-d
below).
The default value is one, since most device drivers require
an interrupt per disk transfer.
Device drivers that can chain several buffers together in a single
transfer should set this to the maximum chain length.
.TP
.BI \-d " rotdelay"
This specifies the expected time (in milliseconds)
to service a transfer completion
interrupt and initiate a new transfer on the same disk.
It is used to decide how much rotational spacing to place between
successive blocks in a file.
.TP
.BI \-e " maxbpg"
This indicates the maximum number of blocks any single file can
allocate out of a cylinder group before it is forced to begin
allocating blocks from another cylinder group.
Typically this value is set to about one quarter of the total blocks
in a cylinder group.
The intent is to prevent any single file from using up all the
blocks in a single cylinder group,
thus degrading access times for all files subsequently allocated
in that cylinder group.
The effect of this limit is to cause big files to do long seeks
more frequently than if they were allowed to allocate all the blocks
in a cylinder group before seeking elsewhere.
For file systems with exclusively large files,
this parameter should be set higher.
.TP
.BI \-m " minfree"
This value specifies the percentage of space held back
from normal users; the minimum free space threshold.
The default value used is 10%.
This value can be set to zero, however up to a factor of three
in throughput will be lost over the performance obtained at a 10%
threshold.
Note: if the value is raised above the current usage level,
users will be unable to allocate files until enough files have
been deleted to get under the higher threshold.
.SH "SEE ALSO"
.BR fs (5),
.BR dumpfs (8),
.BR mkfs (8),
.BR newfs (8)
.LP
.TX ADMIN
.SH BUGS
This program should work on mounted and active file systems.
Because the super-block is not kept in the buffer cache,
the program will only take effect if it
is run on dismounted file systems;
if run on the root file system, the system must be rebooted.
tends the concept of \(lqpublic\(rq to include all users on all
hosts that can be reached through the network; this may not be
appropriate on all systems, and its implications should be considered
before enabling this service.
.PP 
.B tftpd
runs with th./share/man/man8/tzsetup.8                                                                             755       0      12         4616  4424741643  10536                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)tzsetup.8 1.9 89/03/27 SMI;
.hw gettimeofday
.TH TZSETUP 8 "17 November 1987"
.SH NAME
tzsetup \- set up old-style time zone information in the kernel
.SH SYNOPSIS
.B /usr/etc/tzsetup
.SH DESCRIPTION
.IX "tzsetup command" "" "\fLtzsetup\fP command"
.LP
.B tzsetup
attempts to find the offset from GMT and old-style Daylight Savings Time
correction type (see
.BR gettimeofday (2))
that most closely matches the default time zone for the machine, and
to pass this information to the kernel with a
.B settimeofday (\|)
call (see
.BR gettimeofday (2)).
This is necessary if programs built under releases
of Sun\s-1OS\s0 prior to 4.0 are to be run;
those programs get time zone information from
the kernel using
.BR gettimeofday . 
.LP
If it cannot find the offset from
.SM GMT\s0,
the offset is set to 0; if it
cannot find the Daylight Savings Time correction type, it is set to
.SM
.BR DST_NONE\s0 ,
indicating that no Daylight Savings Time correction is to be
performed.
.SH DIAGNOSTICS
.TP
.BI "tzsetup: Can't open /usr/share/lib/zoneinfo/localtime: " reason
The time zone file for the current time zone could not be opened.
.TP
.BI "tzsetup: Error reading /usr/lib/zoneinfo/localtime: " reason
The time zone file for the current time zone could not be read.
.TP
.B "tzsetup: Two or more time zone types are equally valid \(em no \s-1DST\s0 selected"
There were two or more Daylight Savings Time correction types that
generated results that were equally close to the correct results.
None of them was selected.  Programs built under versions of Sun\s-1OS\s0
prior to 4.0 may not convert dates correctly.
.TP
.B "tzsetup: No old-style time zone type is valid \(em no \s-1DST\s0 selected"
None of the Daylight Savings Time correction types generated results
that were in any way correct; none of them was selected.
Programs built under versions of Sun\s-1OS\s0
prior to 4.0 may not convert dates correctly.
.TP
.B "tzsetup: Warning: No old-style time zone type is completely valid"
None of the Daylight Savings Time correction types generated results
that were completely correct; the best of them was selected.  Programs built
under versions of Sun\s-1OS\s0 prior to 4.0 may not convert dates correctly.
.TP
.B "tzsetup: Can't set time zone"
.B tzsetup
was run by a user other than the super-user; only the super-user may
change the kernel's notion of the current time zone.
.SH "SEE ALSO"
.BR gettimeofday (2),
.BR tzfile (5),
.BR zic (8)
er the higher threshold.
.SH "SEE ALSO"
.BR fs (5),
.BR dumpfs (8),
.BR mkfs (8),
.BR newfs (8)
.LP
.TX ADMIN
.SH ./share/man/man8/umount.8                                                                              755       0      12           65  4424741643  10301                                                                                                                                                                                                                                                                                                                                                                      .so man8/mount.8
.\" @(#)umount.8 1.6 89/03/27 SMI; 
 p  D  unlink.8  \    E  
uuclean.8c C    F  vipw.8 .    G  vmstat.8 8 .    H  ypbind.8 8 \    I  ypinit.8      J  ypmake.8       K  yppasswdd.8c       L  yppoll.8     (  M  yppush.8  K  <  N  ypserv.8    L  O  ypset.8   d  P  ypupdated.8c  d  x  Q  	ypwhich.8 d    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdum./share/man/man8/unconfigure.8                                                                         755       0      12        13253  4424741643  11361                                                                                                                                                                                                                                                                                                                                                                      '\" t
.\" @(#)unconfigure.8 1.14 89/03/27 SMI;
.TH UNCONFIGURE 8 "22 March 1989"
.SH NAME
unconfigure \- reset the network configuration for a Sun386i system
.SH SYNOPSIS 
.B /usr/etc/unconfigure
.RB "[\|" \-y "\|]"
.SH AVAILABILITY
Sun386i systems only.
.SH DESCRIPTION
.IX "unconfigure command" "" "\fLunconfigure\fP command"
.B unconfigure
restores most of the system configuration and status
files to the state they were in when delivered by
Sun Microsystems, Inc.
It also deletes all user accounts (including home directories),
Yellow Pages information, and any
diskless client configurations that were set up.
.LP
After running
.B unconfigure,
a system halts.
Rebooting it to multi-user mode at this point will
start automatic system installation.
.LP
.B unconfigure
is intended for use in the following situations:
.TP 3
\(bu
As one of the final steps in Software Manufacturing.
.TP
\(bu
In systems being set up with temporary configurations,
holding no user accounts or diskless clients.
These will occur during demonstrations and
evaluation trials.
.TP
\(bu
To allow systems that had been used as standalones
to be upgraded to join a network in a role other than
as a master server.  (See instructions later.)
.LP
.B unconfigure
is potentially a dangerous utility; it does not work
unless invoked by the super-user.
As a warning, unless the
.B \-y
option is passed, it will require confirmation that all
user files and system software configuration information
is to be deleted.
.LP
This utility is
.I not
recommended for routine use of any sort.
.SS "Resetting Temporary Configurations"
If users need to set up and tear down configurations,
.B unconfigure
can be used to restore the system to an essentially
as-manufactured state.
The main concern here is that user accounts will be deleted,
so this should not be done casually.
.LP
To reset a temporary configuration, just become the super-user
and invoke
.B unconfigure.
.SS "Upgrading Standalones to Network Clients"
Systems that are going to be networked should be networked from
the very first, if at all possible.
This eliminates whole classes of compatibility problems, such as
pathnames and (in particular) user account clashes.
.LP
Automatic system installation directly supports upgrading a single
standalone system to a YP master, and joining any number of
unused systems (or systems upon which
.B unconfigure
has been run) into a network.
.LP
However, in the situation where standalone systems that have
been used extensively are
to be joined to a network,
.B unconfigure
can be used in conjunction with automatic system installation
by a knowledgeable super-user to change a system's
configuration from standalone to network client.
This procedure is not recommended for use by inexperienced
administrators.
.LP
The following procedure is not needed unless user accounts or other data
need to be preserved; it is intended to ensure that every
.SM UID
and
.SM GID
is changed so as not to clash with those in use on the network.
It must be applied to each system that is being upgraded from a
standalone to a network client.
.LP
The procedure is as follows:
.TP 4
\(bu
Identify all accounts and files that you'll want
to save.  If there are none, just run
.B unconfigure
and install the system on the network.
Do not follow the remaining steps.
.TP
\(bu
Copy
.B /etc/passwd
to
.BR /etc/passwd.bak .
.TP
\(bu
Rename all the files (including home directories) so that
they aren't deleted.  (See 
.SB FILES
below.)
These will probably be only in
.BR /export/home .
.TP
\(bu
Run
.B unconfigure
and install the system on the network.
.TP
\(bu
For each account listed in
.B /etc/passwd.bak
that you want to save, follow this procedure:
.RS
.TP 4
\(bu
Create a new account on the network; if the
.SM UID
and
.SM GID
are the same as in
.B /etc/passwd.bak
on the standalone, then skip the next step.
However, be sure that you do not make two different accounts
with the same
.SM UID.
.TP
\(bu
Use the 
.RB ` "chown \-R" '
command to change the ownership of the home directories.
.TP
\(bu
You may need to rename the files you just chowned above, for example
to ensure that they are the user's home directory.
This may involve updating the
.BR auto.home (5)
and
.BR auto.home (5)
.SM YP
maps, as well.
.RE
.TP
\(bu
Delete
.BR /etc/passwd.bak .
.RE
.SH FILES
.LP
.B unconfigure
deletes the following files, if they are present,
replacing some of them with the distribution version if
one is supposed to exist:
.sp .5
.RS
.TS
lfB lfB lfB lfB .
/etc/.rootkey	/etc/ethers	/etc/localtime	/etc/publickey
/etc/auto.home	/etc/exports	/etc/net.conf	/etc/sendmail.cf
/etc/auto.vol	/etc/fstab	/etc/netmasks	/etc/syslog.conf
/etc/bootparams	/etc/group	/etc/networks	/etc/systems
/etc/bootservers	/etc/hosts	/etc/passwd	/single/ifconfig
/var/sysex/*	
.TE
.RE
.LP
and all files in
.B /var/yp
except those distributed with the operating system.
.LP
.B unconfigure
truncates all files in 
.BR /var/adm .
All user home directories in
.B /export/home
are deleted, except those for the default user account
.BR users ,
which is shipped with the operating system.
All diskless client configuration information stored
in
.BR /export/roots ,
.BR /export/swaps ,
and
.B /export/dumps
is deleted.
.SH "SEE ALSO"
.BR adduser (8),
.BR chown (8),
.BR chgrp (1),
.BR find (1),
.BR group (5),
.BR passwd (5)
.SH BUGS
.LP
More of the system configuration files should be reset.
.LP
This does not yet support taking a workstation off the network
temporarily, for example, to take it home over the weekend for use as
a standalone, or to move it to another network while travelling.
This should be the default behavior.
.LP
The procedure for upgrading standalones to network clients
should be automated; currently, only upgrading a standalone
to a master server is automated.
ding messages
.PD
.SH SEE ALSO
.BR newaliases (8),
.BR biff (1),
.BR binmail (1),
.BR mail (1),
.BR aliases (5)
.LP
.TX ADMIN
.LP
Su, Zaw-Sing, and Jon Postel,
.IR "The Domain Naming Convention for Internet User Applications" ,
.SM RFC
819,
Network Information Center,
.SM SRI
International, Menlo Park, Calif.,
August 1982.
.LP
Postel, Jon,./share/man/man8/unlink.8                                                                              755       0      12           64  4424741643  10251                                                                                                                                                                                                                                                                                                                                                                      .so man8/link.8
.\" @(#)unlink.8 1.6 89/03/27 SMI; 
  F  vipw.8 l    G  vmstat.8 ipw    H  ypbind.8 t.8    I  ypinit.8 d.8    J  ypmake.8 t.8     K  yppasswdd.8c      L  yppoll.8 .8c  (  M  yppush.8 l.8  <  N  ypserv.8 h.8  L  O  ypset.8   d  P  ypupdated.8c .8   x  Q  	ypwhich.8 8c    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8      U  ypxfr_2perday.8     V  zdump.8      W  zic.8  These will occur during demo./share/man/man8/uuclean.8c                                                                            755       0      12         2473  4424741644  10617                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)uuclean.8c 1.12 89/03/27 SMI; from UCB 4.2
.TH UUCLEAN 8C "22 March 1989"
.SH NAME
uuclean \- uucp spool directory clean-up
.SH SYNOPSIS
.B /usr/lib/uucp/uuclean
[
.B \-m
] [
.BI \-d directory
] [
.BI \-n time
] [
.BI \-p pre
]
.SH DESCRIPTION
.IX  "uuclean command"  ""  "\fLuuclean\fP \(em clean UUCP spool area"
.IX  "clean UUCP spool area"  ""  "clean UUCP spool area \(em \fLuuclean\fP"
.IX  communications  uuclean  ""  "\fLuuclean\fP \(em clean UUCP spool area"
.B uuclean
scans the spool directory for files with
the specified prefix and deletes
all those which are older than the specified number of hours.
.SH OPTIONS
.TP
.BI \-d directory
Clean the indicated spool directory.
.TP
.B \-m
Send mail to the owner of the file when it is deleted.
.TP
.BI \-n time
Files whose age is more than
.I time
hours are deleted if the prefix test is
satisfied (default time is 72 hours).
.TP
.BI \-p pre
Scan for files with
.I pre
as the file prefix.  Up to 10
.B \-p
arguments may be specified.
A
.B \-p
without any
.I pre
following deletes all files older than the specified time.
.LP
.B uuclean
will typically be started by
.BR cron (8).
.SH FILES
.PD 0
.TP 20
.B /usr/lib/uucp
directory with commands used by uuclean internally
.TP
.B /usr/lib/uucp/spool
spool directory
.PD
.SH SEE ALSO
.BR uucp (1C),
.BR uux (1C),
.BR cron (8)
 a temporary configuration, just become the super-user
and invoke
.B unconfigure.
.SS "Upgrading Standalones to Network Clients"
Systems that are going to be networked should be networked from
the ./share/man/man8/vipw.8                                                                                755       0      12         2350  4424741644   7777                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vipw.8 1.15 89/03/27 SMI; from UCB 4.2
.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.TH VIPW 8 "9 September 1987"
.SH NAME
vipw \- edit the password file
.SH SYNOPSIS
.B /usr/etc/vipw
.SH DESCRIPTION
.IX  "vipw command"  ""  "\fLvipw\fP \(em edit password file"
.IX  edit "password file \(em \fLvipw\fP"
.IX  "password file"  "edit"  "password file"  "edit \(em \fLvipw\fP"
.B vipw
edits the password file while setting the appropriate locks,
and does any necessary processing after the password file is unlocked.
If the password file is already being edited, then you will be told
to try again later.  The
.BR vi (1)
editor will be used unless the environment variable
.SB VISUAL
or
.SB EDITOR
indicates an alternate editor.
.LP
.B vipw
performs a number of consistency checks on the password entry for
root,
and will not allow a password file with a \(lqmangled\(rq root entry
to be installed.  It also checks the
.B /etc/shells
file to verify the login shell for root.
.SH FILES
.PD 0
.TP 20
.B /etc/ptmp
.TP
.B /etc/shells
.PD
.SH SEE ALSO
.BR passwd (1),
.BR vi (1),
.BR passwd (5),
.BR adduser (8)
on.
.TH VIPW 8 "9 September 1987"
.SH NAME
vipw \- edit the password file
.SH SYNOPSIS
.B /usr/etc/vipw
.SH DESCRIPTION
.IX  "vipw command"  ""  "\fLvipw\fP \(em edit password file"
.IX  edit "password file \(em \fLvipw\fP"
.IX  "password file"  "edit"  "password file"  "edit \(e./share/man/man8/vmstat.8                                                                              755       0      12        11165  4424741644  10354                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)vmstat.8 1.15 89/03/27 SMI; from UCB 6.3 3/15/86
.TH VMSTAT 8 "25 March 1989"
.SH NAME
vmstat \- report virtual memory statistics
.SH SYNOPSIS
.B vmstat
[
.B \-fisS
] [
.I interval
[
.I count
] ]
.SH DESCRIPTION
.IX  "vmstat command"  ""  "\fLvmstat\fP \(em display virtual memory statistics"
.B vmstat
delves into the system and normally reports
certain statistics kept about
process, virtual memory, disk, trap and
.SM CPU
activity.
.LP
Without options,
.B vmstat
displays a one-line summary of the virtual memory activity
since the system has been booted.  If
.I interval
is specified,
.B vmstat
summarizes activity over the last
.I interval
seconds.  If a
.I count
is given, the statistics are repeated
.I count
times.
.LP
For example, the following command displays a summary of what the
system is doing every five seconds.
This is a good choice of printing interval since this is how often
some of the statistics are sampled in the system.
.\"others vary every
.\"second, running the output for a while will make it apparent which
.\"are recomputed every second.
.RS
.nf
.ft B
example% vmstat 5
.sp .5v
procs     memory                       page      faults
r b w   avm  fre  re at  pi  po  fr  de  sr x0 x1 x2 x3  in   sy  cs  us  sy  id
2 0 0   918  286   0  0   0   0   0   0    0  1  0   0   0    4  12    5   3   5  91
1 0 0   846  254   0  0   0   0   0   0    0  6  0   1   0   42 153  31  7  40  54
1 0 0   840  268   0  0   0   0   0   0    0  5  0   0   0   27 103  25  8  26  66
1 0 0   620  312   0  0   0   0   0   0    0  6  0   0   0   26  76\^  25  6  27  \^67
.sp .5v
^C
example%
.fi
.ft R
.RE
.LP
The fields of
.BR vmstat 's
display are:
.TP 8
.B procs
Report the number of processes in each of the three following states:
.RS
.PD 0
.TP 8
.B r
in run queue
.TP
.B b
blocked for resources (i/o, paging, etc.)
.TP
.B w
runnable or short sleeper (< 20 secs) but swapped
.RE
.PD
.TP 8
.B memory
Report on usage of virtual and real memory.
Virtual memory is considered active if it belongs to processes which
are running or have run in the last 20 seconds.
.\"A ``page'' here is 2048 bytes.
.RS
.PD 0
.TP 8
.B avm
number of active virtual Kbytes
.TP
.B fre
size of the free list in Kbytes
.RE
.PD
.TP 8
.B page
Report information about page faults and paging activity.
The information on each of the following
activities is averaged each five
seconds, and given in units per second.
.RS
.PD 0
.TP 8
.B re
page reclaims \(em but see the
.B \-S
option for how this field is modified.
.TP
.B at
number of attaches \(em but see the
.B \-S
option for how this field is modified.
.TP
.B pi
kilobytes per second paged in 
.TP
.B po
kilobytes per second paged out 
.TP
.B fr
kilobytes freed per second
.TP
.B de
anticipated short term memory shortfall in Kbytes
.TP
.B sr
pages scanned by clock algorithm, per-second
.RE
.PD
.TP 8
.B disk
Report number of disk operations per
second (this field is system dependent).
For Sun systems, four slots are available for up to four drives: ``x0''
(or ``s0'' for SCSI disks), ``x1'', ``x2'', and ``x3''.
.\"Typically paging will be split across
.\"several of the available drives.
.\"The number under each of these is the unit number.
.TP 8
.B faults
Report trap/interrupt rate averages per second over last 5 seconds.
.RS
.PD 0
.TP 8
.B in
(non clock) device interrupts per second
.TP
.B sy
system calls per second
.TP
.B cs
.SM CPU
context switch rate (switches/sec)
.RE
.PD
.ne 6
.TP 8
.B cpu
Give a breakdown of percentage usage of
.SM CPU
time.
.RS
.PD 0
.TP 8
.B us
user time for normal and low priority processes
.TP
.B sy
system time
.TP
.B id
.SM CPU
idle
.RE
.PD
.SH OPTIONS
.TP
.B \-f
Report on the number of
.B forks
and
.B vforks
since system startup and the number of
pages of virtual memory involved in each
kind of fork.
.TP
.B \-i
Report the number of interrupts per device.
Autovectored interrupts (including the clock) are listed first.
.TP
.B \-s
Display the contents of the
.B sum
structure, giving the total number of several kinds of paging-related
events which have occurred since boot.
.TP
.B \-S
Report on swapping rather than paging activity.
This option will change two fields in
.BR vmstat 's
``paging'' display:  rather than
the ``re'' and ``at'' fields,
.B vmstat
will report ``si'' (swap-ins),
and ``so'' (swap-outs).
.SH FILES
.PD 0
.TP 20
.B /dev/kmem
.TP
.B /vmunix
.PD
.SH BUGS
If more than one autovectored device has the same name, interrupts
are counted for all like-named devices regardless of unit number.
Such devices are listed with a unit number of
.RB ` ? '.
.\"There should be a screen oriented program which combines
.\".B vmstat
.\"and
.\".IR ps (1)
.\"in real time
.\"as well as reporting on other system activity.
"SEE ALSO"
.BR adduser (8),
.BR chown (8),
.BR chgrp (1),
.BR find (1),
.BR group (5),
.BR passwd (5)
.SH BUGS
.LP
More of the system configuration files should be reset.
.LP
This does not yet support taking a workstation off the network
temporarily, for example, to take it home over the weekend for use as
a standalone, or to move it to another network while travelling.
This should be the def./share/man/man8/ypbind.8                                                                              755       0      12           65  4424741644  10240                                                                                                                                                                                                                                                                                                                                                                      .so man8/ypserv.8
.\" @(#)ypbind.8 1.4 89/03/27 SMI;
 J  ypmake.8       K  yppasswdd.8c       L  yppoll.8  K  (  M  yppush.8    <  N  ypserv.8  (  L  O  ypset.8   d  P  ypupdated.8c  d  x  Q  	ypwhich.8 P    R  ypxfr.8     S  ypxfr_1perday.8     T   ypxfr_1perhour.8  T    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 um, virtual memory, disk, trap and
.SM CPU
activity.
.LP
Without options,
.B vmstat
displays a one-line summary of the vir./share/man/man8/ypinit.8                                                                              755       0      12         4503  4424741644  10330                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypinit.8 1.16 89/03/27 SMI
.TH YPINIT 8 "22 March 1989"
.SH NAME
ypinit - build and install Yellow Pages database
.SH SYNOPSIS
.B /usr/etc/yp/ypinit
.B \-m
.LP
.B /usr/etc/yp/ypinit
.B \-s
.I master_name
.SH DESCRIPTION
.IX  "ypinit command"  ""  "\fLypinit\fP \(em make Yellow Pages database"
.IX  "create" "Yellow Pages database \(em \fLypinit\fP"
.IX  "build" "Yellow Pages database \(em \fLypinit\fP"
.IX  "install Yellow Pages database"  ""  "install Yellow Pages database \(em \fLypinit\fP"
.IX  "Yellow Pages"  "make database"  ""  "make database \(em \fLypinit\fP"
.B ypinit
sets up a Yellow Pages database on a
.SM YP
server.
It can be used to set up a master or a slave server.
You must be the super-user to run it.
It asks a few, self-explanatory  questions,
and reports success or failure to the terminal.
.LP
It sets up a master server
using the simple model in which that server
is master to all maps in the data base.
This is the way to bootstrap the
.SM YP
system;
later if you want you can change the association of maps to masters.
.IP Note:
If there are both 3.x and 4.x
.SM YP
servers running in the network, the 4.x server should be
configured as the master.
.LP
All databases are built from scratch,
either from information available to the program at runtime,
or from the
.SM ASCII
data base files in
.BR /etc .
These files are listed below under
.SM FILES\s0.
All such files should be in their ``traditional'' form,
rather than the abbreviated form used on client machines.
.LP
A
.SM YP
database on a slave server is set up by copying
an existing database from a running server.  The
.I master_name
argument should be the hostname of
.SM YP
server (either the master server for all the maps,
or a server on which the data base is up-to-date and stable).
.LP
Read
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.B \-m
Indicate that the local host is to be the
.SM YP
master.
.TP
.B \-s
Set up a slave database.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.B /etc/group
.TP
.B /etc/hosts
.TP
.B /etc/networks
.TP
.B /etc/services
.TP
.B /etc/protocols
.\" .TP
.\" .B /etc/netgroup
.TP
.B /etc/ethers
.\" .TP
.\" .B /etc/security/passwd.adjunct
.\" .TP
.\" .B /etc/security/group.adjunct
.PD
.SH "SEE ALSO"
.BR makedbm (8),
.BR ypfiles (5),
.BR ypmake (8),
.BR yppush (8),
.BR ypserv (8),
.BR ypxfr (8)
seconds, and given in units per second.
.RS
.PD 0
.TP 8
.B re
page reclaims \(em but see the
.B \-S
option for how this field is modified.
.TP
.B at
number of attaches \(em but see the
.B \./share/man/man8/ypmake.8                                                                              755       0      12         3204  4424741645  10300                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypmake.8 1.13 89/03/27 SMI
.TH YPMAKE 8 "14 December 1987"
.SH NAME
ypmake \- rebuild Yellow Pages database
.SH SYNOPSIS
.B "cd /var/yp ; make"
[
.I map
]
.SH DESCRIPTION
.IX  "ypmake command"  ""  "\fLypmake\fP \(em rebuild Yellow Pages database"
.IX  "rebuild Yellow Pages database"  ""  "rebuild Yellow Pages database \(em \fLypmake\fP"
.IX  "Yellow Pages"  "rebuild database"  ""  "rebuild database \(em \fLypmake\fP"
The file called
.B Makefile
in
.BR /var/yp
is used by
.B make
to build the Yellow Pages database.
With no arguments,
.B make
creates
.B dbm
databases for any
.SM YP
maps that are out-of-date,
and then executes
.BR yppush (8)
to notify slave databases that there has been a change.
.LP
If you supply a
.I map
on the command line,
.B make
will update that map only.
Typing
.B "make passwd"
will create and
.B yppush
the password database (assuming it is out of date).
Likewise,
.B "make hosts"
and
.B "make networks"
will create and
.B yppush
the host and network files,
.B /etc/hosts
and
.BR /etc/networks .
.LP
There are three special variables used by
.BR make :
.SM DIR\s0,
which gives the directory of the source files;
.SM NOPUSH\s0,
which when non-null inhibits doing a
.B yppush
of the new database files;
and
.SM DOM\s0,
used to construct a domain
other than the master's default domain.
The default for
.SM DIR
is
.BR /etc ,
and the default for
.SM NOPUSH
is the null string.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the 
.SM YP\s0.
.SH FILES
.PD 0
.TP 20
.B /var/yp
.TP
.B /etc/hosts
.TP
.B /etc/networks
.PD
.SH "SEE ALSO"
.BR make (1),
.BR ypfiles (5),
.BR makedbm (8),
.BR yppush (8),
.BR ypserv (8)
M YP
server (either the master server for all the maps,
or a server on which the data base is up-to-date and stable).
.LP
Read
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.B \-m
Indicate that the local host is to be the
.SM YP
master.
.TP
.B \-s
Set up a slave database.
.SH FILES
.PD 0
.TP 20
.B /etc/passwd
.TP
.B /etc/group
.TP
.B /e./share/man/man8/yppasswdd.8c                                                                          755       0      12         4723  4424741645  11202                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yppasswdd.8c 1.18 89/03/27 SMI
.TH YPPASSWDD 8C "22 March 1989"
.SH NAME
yppasswdd, rpc.yppasswdd \- server for modifying Yellow Pages password file
.SH SYNOPSIS
.B /usr/etc/rpc.yppasswdd
.I filename
[
.I adjunct_file
] [
.B \-m
.I argument1
.I argument2
\&.\|.\|.
]
.IX  "yypasswdd command"  ""  "\fLyppasswdd\fP \(em Yellow Pages password server"
.IX  servers  yppasswdd  ""  "\fLyppasswdd\fP \(em Yellow Pages password server"
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.B yppasswdd
is a server that handles password change requests from
.BR yppasswd (1).
Unless an
.I adjunct_file
is specified,
it changes a password entry in
.IR filename ,
which is assumed to be in the format of
.BR passwd (5).
.I Filename
is the password file that provides the basis for the
.I passwd.byname
and
.I passwd.byuid
maps. 
This should not be confused with the servers 
.I /etc/passwd
file which controls access to the server.
In particular this file should not contain an entry for the super user.
.LP
If an
.I adjunct_file
is specified or
.B /etc/security/passwd.adjunct
exists, this file will be changed instead of the
.IR filename .
An entry in
.I filename
or
.I adjunct_file
will only be changed if the password presented by
.BR yppasswd (1)
matches the encrypted password of that entry.
.LP
If the
.B \-m
option is given, then after
.I filename
or
.I adjunct_file
is modified, a
.BR make (1)
will be performed in
.IR /var/yp .
Any arguments following the flag will be passed to
.IR make .
.LP
This server is not run by default, nor can it be started up from
.BR inetd (8C).
If it is desired to enable remote password updating for the Yellow
Pages, then an entry for
.B yppasswdd
should be put in the
.B /etc/rc
file of the host serving as the master for the Yellow Pages
.B passwd
file.
.SH EXAMPLE
.LP
If the Yellow Pages password file is stored as
.BR /var/yp/passwd ,
then to have password changes propagated immediately,
the server should be invoked as
.RS
.IP
.B /usr/etc/rpc.yppasswdd
.B /var/yp/passwd \-m passwd
.SB DIR\s0=/var/yp
.RE
.SH FILES
.PD 0
.TP 20
.B /var/yp/Makefile
.TP
.B /etc/security/passwd.adjunct
.TP
.B /etc/rc
.PD
.SH SEE ALSO
.BR make (1),
.BR yppasswd (1),
.BR passwd (5),
.BR passwd.adjunct (5),
.BR ypfiles (5),
.BR inetd (8C),
.BR ypmake (8)
.SH NOTES
The password file specified to 
.I rpc.yppasswdd
may not be a link.
B at
number of attaches \(em but see the
.B \./share/man/man8/yppoll.8                                                                              755       0      12         1721  4424741645  10333                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yppoll.8 1.12 89/03/27 SMI
.TH YPPOLL 8 "14 December 1987"
.SH NAME
yppoll - what version of a YP map is at a YP server host
.SH SYNOPSIS
.B /usr/etc/yp/yppoll
[
.B \-h
.I host
] [
.B \-d
.I domain
]
.I mapname
.SH DESCRIPTION
.IX yppoll "" "\fLyppoll\fR \(em Yellow Pages version inquiry"
.B yppoll
asks a
.BR ypserv (8)
process what the order number is, and which host
is the master
.SM YP
server for the named map.
If the server is a
v.1
.SM YP
protocol server,
.B yppoll
uses the older protocol to communicate with
it.  In this case, it also uses the older diagnostic messages in
case of failure.
.SH OPTIONS
.TP
.BI \-h " host"
Ask the
.B ypserv
process at
.I host
about the map parameters.  If
.I host
is not specified, the
.SM YP
server for the local host is used.
That is, the default host is the one returned by
.BR ypwhich (8).
.TP
.BI \-d " domain"
Use
.I domain
instead of the default domain.
.SH "SEE ALSO"
.BR ypfiles (5),
.BR ypserv (8),
.BR ypwhich (8)
s. 
This should not be confused with the server./share/man/man8/yppush.8                                                                              755       0      12         4551  4424741645  10350                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)yppush.8 1.16 89/03/27 SMI
.TH YPPUSH 8 "22 March 1989"
.SH NAME
yppush - force propagation of a changed YP map
.SH SYNOPSIS
.B /usr/etc/yp/yppush
[
.B \-v
] [
.B \-d
.I domain
]
.I mapname
.SH DESCRIPTION
.IX yppush "" "\fLyppush\fR \(em force propagation of changed Yellow Pages map"
.LP
.B yppush
copies a new version of a Yellow Pages (\s-1YP\s0)
map from the master
.SM YP
server to the slave
.SM YP
servers.  It is normally run only on the master
.SM YP
server by the
.B Makefile
in
.B /var/yp
after the master databases are changed.
It first constructs a list of
.SM YP
server hosts by reading the
.SM YP
map
.B ypservers
within the
.IR domain .
Keys within the map
.B ypservers
are the
.SM ASCII
names of the machines on which the
.SM YP
servers run.
.LP
A ``transfer map'' request is sent to the
.SM YP
server at each host,
along with the information needed by the transfer agent (the program
which actually moves the map) to call back the
.B yppush .
When the attempt has completed (successfully
or not), and the transfer agent has sent
.B yppush
a status message, the results may be printed to stdout.  Messages
are also printed when a transfer is not possible; for
instance when the request message is
undeliverable, or when the timeout period
on responses has expired.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.BI "\-d " domain
Specify a
.IR domain .
.TP
.B \-v
Verbose.
This causes messages to be printed when
each server is called, and for each response.
If this flag is omitted, only error messages are printed.
.SH FILES
.PD 0
.HP 20
.BI /var/yp/ domain /ypservers.\c
.BI { dir , pag }
.br
.TP
.B /var/yp
.PD
.SH "SEE ALSO"
.BR ypserv (8),
.BR ypxfr (8),
.BR ypfiles (5)
.LP
.SM YP
protocol specification
.SH BUGS
.LP
In the current implementation (version 2
.SM YP
protocol), the transfer agent is
.BR ypxfr (8),
which is started by the
.B ypserv
program.  If
.B yppush
detects that it is speaking to a version 1
.SM YP
protocol
server, it uses the older protocol, sending a version 1
.SM YPPROC_GET
request and issues a message to that effect.
Unfortunately, there is no way of knowing
if or when the map transfer is performed for version 1 servers.
.B yppush
prints a message saying that an "old-style" message has been sent.
The system administrator should later check to see that the
transfer has actually taken place.
 inetd (8C),
.BR ypmake (8)
.SH NOTES
The password file specified to 
.I rpc.yppasswdd
may not be a link.
B at
number of attaches \(em but see the
.B \./share/man/man8/ypserv.8                                                                              755       0      12        14614  4424741645  10371                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypserv.8 1.29 89/03/27 SMI
.TH YPSERV 8 "22 March 1989"
.SH NAME
ypserv, ypbind \- Yellow Pages server and binder processes
.SH SYNOPSIS
.B /usr/etc/ypserv
.LP
.B /usr/etc/ypbind
.IX  "ypserv command"  ""  "\fLypserv\fP \(em Yellow Pages server process"
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.LP
The Yellow Pages (\s-1YP\s0) provides a simple network lookup service
consisting of databases and processes.  The databases are
.BR dbm (3X)
files in a directory tree rooted at
.BR /var/yp .
These files are described in
.BR ypfiles (5).
The processes are
.BR /usr/etc/ypserv ,
the YP database lookup server, and
.BR /usr/etc/ypbind ,
the
.SM YP
binder.  The programmatic interface to
.SM YP
is described in
.BR ypclnt (3N).
Administrative tools are described in
.BR yppush (8),
.BR ypxfr (8),
.BR yppoll (8),
.BR ypwhich (8),
and
.BR ypset (8).
Tools to see the contents of
.SM YP
maps are described in
.BR ypcat (1),
and
.BR ypmatch (1).
Database generation and maintenance tools are described in
.BR ypinit (8),
.BR ypmake (8),
and
.BR makedbm (8).
.LP
Both
.B ypserv
and
.B ypbind
are daemon processes typically activated at system startup time from
.BR /etc/rc.local .
.B ypserv
runs only on
.SM YP
server machines with a complete
.SM YP
database.
.B ypbind
runs on all machines using
.SM YP
services, both
.SM YP
servers and clients.
.LP
The
.B ypserv
daemon's primary function is to look up information in its local
database of
.SM YP
maps.  The operations performed by
.B ypserv
are defined for the implementor by the
.IR "\s-1YP\s0 Protocol Specification" ,
and for the programmer by the header file
.BR rpcsvc/yp_prot.h .
Communication to and from
.B ypserv
is by means of
.SM RPC
calls.  Lookup functions are described in
.BR ypclnt (3N),
and are supplied as C-callable functions in the C library.
There are four lookup functions, all of
which are performed on a specified
map within some
.SM YP
domain:
.BR match ,
.BR get_first ,
.BR get_next ,
and
.BR get_all .
The
.B match
operation takes a key, and returns the associated value.
The
.B get_first
operation returns the first key-value pair from the map, and
.B get_next
can be used to enumerate the remainder.
.B get_all
ships the entire map to the requester as the response to a single
.SM RPC
request.
.LP
Two other functions supply
information about the map, rather than map entries:
.BR get_order_number ,
and
.BR get_master_name .
In fact, both order number and master name
exist in the map as key-value
pairs, but the server will not return either through the normal lookup
functions.  (If you examine the map with
.BR makedbm (8),
however, they will be visible.)  Other functions are used within the
.SM YP
subsystem itself, and are not of general interest to
.SM YP
clients.  They include
.BR do_you_serve_this_domain? ,
.BR transfer_map ,
and
.BR reinitialize_internal_state .
.LP
The function of
.B ypbind
is to remember information that lets client processes on a single node
communicate with some
.B ypserv
process.
.B ypbind
must run on every machine which has
.SM YP
client processes;
.B ypserv
may or may not be running on the same node,
but must be running somewhere
on the network.
.LP
The information
.B ypbind
remembers is called a
.I binding
\(em the association of a domain name with
the internet address of the
.SM YP
server, and the port on that host at
which the
.B ypserv
process is listening for service requests. This information
is cached in the directory
.B /var/yp/binding
using a filename of 
.BR domainname.version .
.LP
The process of binding is driven
by client requests.  As a request for an unbound domain comes in, the
.B ypbind
process broadcasts on the net trying to find a
.B ypserv
process that serves maps within that domain.  Since the binding is
established by broadcasting, there must be at least one
.B ypserv
process on every net.
If the client is running in C2 secure mode, then 
.B ypbind
will only accept bindings to servers where the
.B ypserv
process is running as root.
Once a domain is bound by a particular
.BR ypbind ,
that same binding is given to every client process on the node.
The
.B ypbind
process on the local node or a remote node may be queried for the
binding of a particular domain by using the
.BR ypwhich (1)
command.
.LP
Bindings and rebindings are handled transparently by the C library
routines. If
.B ypbind
is unable to speak to the
.B ypserv
process it's bound to, it marks the domain as unbound, tells the client
process that the domain is unbound, and tries to bind the domain
once again.  Requests received for an unbound domain will
wait until the domain requested is bound.
In general, a bound domain is marked as unbound when the node
running
.B ypserv
crashes or gets overloaded.  In such a case,
.B ypbind
will to bind any
.SM YP
server (typically
one that is less-heavily loaded) available on the net.
.LP
.B ypbind
also accepts requests to set its binding for a particular domain.  The
request is usually generated by the
.SM YP
subsystem itself.
.BR ypset (8)
is a command to access the
.B "set_domain"
facility.  It is for unsnarling messes. Note:
the
.B set_domain
procedure only accepts requests from processes running as root.
.SH "FILES"
If the file
.B /var/yp/ypserv.log
exists when
.B ypserv
starts up, log information will be written to this file when error
conditions arise.
.LP
The file(s)
.B /var/yp/binding/domainname.version
will be created to speed up the binding process. These files cache the last
successful binding created for the given domain, when a binding is requested
these files are checked for validity and then used. 
.PD 0
.TP 20
.B /var/yp
.TP
.B /usr/etc/ypbind
.PD
.SH "SEE ALSO"
.BR makedbm (8),
.BR ypmake (8),
.BR ypinit (8),
.BR yppoll (8),
.BR yppush (8),
.BR ypset (8),
.BR ypwhich (8),
.BR ypxfr (8),
.BR domainname (1),
.BR ypcat (1),
.BR ypmatch (1),
.BR dbm (3X),
.BR ypclnt (3N),
.BR ypfiles (5)
.LP
.TX NETP
.SH NOTES
Both 
.B ypbind
and
.B ypserv
support multiple domains. The 
.B ypserv
process determines the domains it serves by looking for directories of the 
same name in the directory
.BR /var/yp .
It will reply to all broadcasts
requesting yp service for that domain. Additionally, the 
.B ypbind
process can maintain bindings to several domains and their servers, the 
default domain is however the one specified by the
.BR domainname (1)
command at startup time.
fB\s-1M_ERROR\s0\fR)
.TP
T
waiting for queue to drain when closing
.TP
2
waiting for previous
.BR ioctl (\|)
to fini./share/man/man8/ypset.8                                                                               755       0      12         5205  4424741646  10162                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypset.8 1.10 89/03/27 SMI
.TH YPSET 8 "14 December 1987"
.SH NAME
ypset - point ypbind at a particular server
.SH SYNOPSIS
.B /usr/etc/yp/ypset
[
.BR \-V1\| | \|\-V2
] [
.B \-d
.I domain
] [
.B \-h
.I host
]
.I server
.SH DESCRIPTION
.IX ypset "" "\fLypset\fR \(em direct \fLypbind\fR to a server"
.B ypset
tells
.B ypbind
to get
.SM YP
services for the specified
.I domain
from the
.B ypserv
process running on
.IR server .
If
.I server
is down, or isn't running
.BR ypserv ,
this is not discovered until a
.SM YP
client process tries to
get a binding for the domain.  At this point, the binding set by
.B ypset
will be tested by
.BR ypbind .
If
the binding is invalid,
.B ypbind
will attempt to rebind for the same domain.
.LP
.B ypset
is useful for binding a client node which is not on a broadcast net,
or is on a broadcast net which isn't running a
.SM YP
server host.
It also is useful for debugging
.SM YP
client applications, for instance
where a
.SM YP
map only exists at a single
.SM YP
server host.
.LP
In cases where several hosts on the local net are supplying
.SM YP
services, it is possible for
.B ypbind
to rebind to another host even while you attempt to
find out if the
.B ypset
operation succeeded.  For example, you can type:
.RS
.nf
.ft B
example% ypset host1
example% ypwhich
host2
.fi
.ft R
.RE
.LP
which can be confusing.  This is a function of the
.SM YP
subsystem's attempt to
load-balance among the available
.SM YP
servers, and occurs when
.I host1
does not respond to
.B ypbind
because it is not running
.B ypserv
(or is overloaded), and
.IR host2 ,
running
.BR ypserv ,
gets the binding.
.LP
.I server
indicates the
.SM YP
server to bind to, and
can be specified
as a name or an
.SM IP
address.  If specified as a name,
.B ypset
will attempt to use
.SM YP
services to resolve the name to an
.SM IP
address.  This will work only if
the node has a current valid binding for the domain in question.
In most cases,
.I server
should be specified as an
.SM IP
address.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow
Pages.
.SH OPTIONS
.TP
.B \-V1
Bind
.I server
for the (old) v.1
.SM YP
protocol.
.TP
.B \-V2
Bind
.I server
for the (current) v.2
.SM YP
protocol.
.IP
If no version is supplied,
.BR ypset ,
first attempts to set the domain for the (current) v.2 protocol.
If this attempt fails,
.BR ypset ,
then attempts to set the domain for the (old) v.1 protocol.
.TP
.BI \-h  host
Set ypbind's binding on
.IR host ,
instead of locally.
.I host
can be specified as a name or as an
.SM IP
address.
.TP
.BI \-d  domain
Use
.I domain ,
instead of the default domain.
.SH "SEE ALSO"
.BR ypwhich (1),
.BR ypfiles (5),
.BR ypserv (8)
 /usr/etc/yp/ypset
[
.BR \-V1\| | \|\-V2
] [
.B \-d
.I domain
] [
.B \-h
.I host
]
.I server
.SH DESCRIPTION
.IX ypset "" "\fLypset\fR \(em direct \fLypbind\fR to a server"
.B ypset
tells
.B ypbind
to get
.SM YP
services for the specified
.I domain
from the
.B ypserv
process running on
.IR server .
If
.I server
is down, or isn't running
.BR ypserv ,
this is not discovered unti./share/man/man8/ypupdated.8c                                                                          755       0      12         2220  4424741646  11152                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypupdated.8c 1.11 89/03/27 SMI;
.TH YPUPDATED 8C "22 March 1989"
.SH NAME
ypupdated, rpc.ypupdated \- server for changing YP information
.SH SYNOPSIS
.B rpc.ypupdated
[
.B \-is
]
.SH DESCRIPTION
.IX "ypupdated daemon" "" "\fLypupdated\fP daemon"
.B ypupdated
is a daemon that updates information
in the Yellow Pages
(\s-1YP\s0),
normally started up by
.BR inetd (8C).
.B ypupdated
consults the file
.BR updaters (5)
in the directory
.B /var/yp
to determine which
.SM YP
maps should be updated and how to change them.
.LP
By default, the daemon requires the most secure method of
authentication available to it, either
.SM DES
(secure) or
.SM UNIX
(insecure).
.SH OPTIONS
.TP
.B \-i
Accept
.SM RPC
calls with the insecure 
.SM AUTH_UNIX
credentials.
This allows programmatic updating of
.SM YP
maps in all networks.
.TP
.B \-s
Accept only calls authenticated using the secure 
.SM RPC
mechanism
(\s-1AUTH_DES\s0
authentication).
This disables programmatic updating of
.SM YP
maps unless the network
supports these calls.
.SH FILES
.PD 0
.TP 20
.B /var/yp/updaters
.PD
.SH "SEE ALSO"
.BR inetd (8C),
.BR keyserv (8C),
.BR updaters (5)
.LP
.TX ADMIN
.LP
.TX NETP
 attempt to
find out if the
.B ypset
operation succeeded.  For example, you can type:
.RS
.nf
.ft B
example% ypset host1
example% ypwhich
host2
.fi
.ft R
.RE
.LP
which can be confusing.  This is a function of the
.SM YP
subsystem's attempt to
load-balance among the available
.SM YP
servers, and occurs when
.I host1
does not respond to
.B ypbind
because it is not run./share/man/man8/ypwhich.8                                                                             755       0      12         3237  4424741646  10474                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypwhich.8 1.18 89/03/27 SMI
.TH YPWHICH 8 "17 December 1987"
.SH NAME
ypwhich \- what machine is the YP server?
.SH SYNOPSIS
.B ypwhich
.RB [ " \-d "
.IR domainname " ] "
.RI [ " hostname " ]
.LP
.B ypwhich
.RB [ " \-d "
.IR domainname " ] "
.RB [ " \-t " ]
.B \-m
.RI [ " mname " ]
.SH AVAILABILITY
This program is available with the
.I Networking Tools and Programs
software installation option.  Refer to
.TX INSTALL
for information on how to install optional software.
.SH DESCRIPTION
.IX  "ypwhich command"  ""  "\fLypwhich\fP \(em who is Yellow Pages server"
.B ypwhich
tells which
.SM YP
server supplies Yellow Pages to a
.SM YP
client, and which
.SM YP
server is the master for a map.
If invoked without arguments, it gives the
.SM YP
server for the local machine.  If
.I hostname
is specified, that machine is queried
to find out which
.SM YP
master it is using.
.LP
If the
.B \-m
switch is used without
.IR mname ,
a list of every map
in the domain and the master of each will be printed.  If
.I mname
is specified, only the master
.SM YP
server for that map is printed.
.I mname
may be a mapname, or a nickname for a mapname.
Mapnames and nicknames are described in
.BR ypcat (1).
.SH OPTIONS
.TP
.B \-d
.I Domainname
specifies the name of a
.SM YP
domain.
The default is the default domain for the local machine.
.TP
.B \-m
Find the master
.SM YP
server for a map,
or for all maps in a domain.  No
.I hostname
may be specified with
.BR \-m .
.TP
.B \-t
Inhibit nickname translation;
useful if there is a mapname identical to a nickname.
This is not true of any Sun-supplied map.
.SH "SEE ALSO"
.BR ypcat (1),
.BR ypfiles (5),
.BR rpcinfo (8C),
.BR yppush (8),
.BR ypserv (8)
ified
as a name or an
.SM IP
address.  If specified as a name,
.B ypset
will attempt to use
.SM YP
services to resolve the name to an
.SM IP
address.  This will work only if
the node has a current valid binding for the domain in question.
In most cases,
.I server
should be specified as an
.SM IP
address.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)./share/man/man8/ypxfr.8                                                                               755       0      12        10222  4424741646  10201                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)ypxfr.8 1.24 89/03/27 SMI;
.TH YPXFR 8 "21 December 1987"
.SH NAME
ypxfr \- transfer YP map from a YP server to here
.SH SYNOPSIS
.B /usr/etc/yp/ypxfr
[
.B \-f
] [
.B \-c
] [
.B \-d
.I domain
] [
.B \-h
.I host
] [
.B \-s
.I domain
] [
.B \-C
.I tid prog ipadd port
]
.I mapname
.IX ypxfr "" "\fLypxfr\fR \(em move remote Yellow Pages map to local host"
.SH DESCRIPTION
.B ypxfr
moves a
.SM YP
map in the default domain for the local host
to the local host by making use of normal
.SM YP
services.
It creates a temporary map in the directory
.BI /var/yp/ domain
(this directory must already exist;
.I domain
is the default domain for the local host),
fills it by enumerating the map's entries,
fetches the map parameters (master and order number),
and loads them.
It then deletes any old versions of the map and moves the
temporary map to the real
.IR mapname .
.LP
If run interactively,
.B ypxfr
it writes its output to the terminal.
However, if it is invoked without a controlling terminal,
and if the log file
.B /var/yp/ypxfr.log
exists, it will append all its output to that file.  Since
.B ypxfr
is most often run from the super-user's
.B crontab
file, or by
.BR ypserv ,
you can use the log file to retain a record of what was attempted,
and what the results were.
.LP
If
.BR issecure (3)
is
.SM TRUE\s0,
.B ypxfr
requires that
.B ypserv
on the
.I host
be running as root.
If the map being transferred is a secure map,
.B ypxfr
sets the permissions on the map to 0600.
.LP
For consistency between servers,
.B ypxfr
should be run periodically for every map in the
.SM YP
data base.  Different maps change
at different rates: the
.IB services . byname
map may not change for months at a time, for instance, and may
therefore be checked only once a day (in the wee hours).
You may know that
.IB mail . aliases
or
.IB hosts . byname
changes several times per day.
In such a case, you may want to check hourly for updates.
A
.BR crontab (5)
entry can be used to perform periodic updates automatically.
Rather than having a separate
.B crontab
entry for each map,
you can group comands to update several maps in a shell script.
Examples (mnemonically named) are in
.BR /usr/etc/yp :
.BR ypxfr_1perday ,
.BR ypxfr_2perday ,
and
.BR ypxfr_1perhour .
They can serve as reasonable first cuts.
.LP
Refer to
.BR ypfiles (5)
and
.BR ypserv (8)
for an overview of the Yellow Pages.
.SH OPTIONS
.TP
.B \-f
Force the transfer to occur even if the version at the master is not
more recent than the local version.
.TP
.B \-c
Do not send a ``Clear current map'' request to the local
.B ypserv
process.  Use this flag if
.B ypserv
is not running locally at the time you are running
.BR ypxfr .
Otherwise,
.B ypxfr
will complain that it can't talk to the local
.BR ypserv ,
and the transfer will fail.
.TP
.BI \-d  domain
Specify a domain other than the default domain.
.TP
.BI \-h  host
Get the map from
.IR host ,
regardless of what the map says the master is.  If
.I host
is not specified,
.B ypxfr
will ask the
.SM YP
service for the name of the master, and try to get the
map from there.
.I host
may be a name or an internet address in the form
.IR "a.b.c.d" .
.TP
.BI \-s  domain
Specify a source domain from which to
transfer a map that should be the same
across domains (such as the
.IB  services . byname
map).
.TP
.BI \-C  "tid prog ipadd port"
This option is
.B only
for use by
.BR ypserv .
When
.B ypserv
invokes
.BR ypxfr ,
it specifies that
.B ypxfr
should call back a
.B yppush
process at the host with
.SM IP
address
.IR ipaddr ,
registered as program number
.IR prog ,
listening on port
.IR port ,
and waiting for a response to transaction
.IR tid .
.SH FILES
.PD 0
.TP 20
.B /var/yp/ypxfr.log
log file
.TP
.B /usr/etc/yp/ypxfr_1perday
script to run one transfer per day, for use with
.BR cron (8)
.br
.ne 5
.TP
.B /usr/etc/yp/ypxfr_2perday
script to run two transfers per day
.TP
.B /usr/etc/yp/ypxfr_1perhour
script for hourly transfers of volatile maps
.TP
.BI /var/yp/ domain
YP domain
.TP
.B /var/spool/cron/crontabs/root
Super-user's 
.B crontab
file
.PD
.SH "SEE ALSO"
.BR issecure (3),
.BR crontab (5),
.BR ypfiles (5),
.BR cron (8),
.BR ypserv (8),
.BR yppush (8),
.LP
.IR "\s-1YP\s0 Protocol Specification" ,
in
.TX NETP
every client process on the node.
The
.B ypbind
process on the local node or a remote node may be queried for the
binding of a particular domain by using the
.BR ypwhich (1)
command.
.LP
Bindings and rebindings are handled transparently by the C library
routines. If
.B ypbind
is unable to speak to the
.B ypserv
process it's bound to, it marks the domain as unbound./share/man/man8/ypxfr_1perday.8                                                                       755       0      12           73  4424741646  11551                                                                                                                                                                                                                                                                                                                                                                      .so man8/ypxfr.8
.\" @(#)ypxfr_1perday.8 1.5 89/03/27 SMI;
    U  ypxfr_2perday.8     V  zdump.8      W  zic.8 8  SYNOPSIS
.B /usr/etc/yp/ypxfr
[
.B \-f
] [
.B \-c
] [
.B \-d
.I domain
] [
.B \-h
.I host
] [
.B \-s
.I domain
] [
.B \-C
.I tid prog ipadd port
]
.I mapname
.IX ypxfr "" "\fLypxfr\fR \(em move remote Yellow Pages map to local host"
.SH DESCRIPTION
.B ypxfr
moves a
.SM YP
map in the default domain for the local host
to the local host by making use of normal
.SM YP
services.
It cre./share/man/man8/ypxfr_1perhour.8                                                                      755       0      12           74  4424741646  11752                                                                                                                                                                                                                                                                                                                                                                      .so man8/ypxfr.8
.\" @(#)ypxfr_1perhour.8 1.5 89/03/27 SMI;
    V  zdump.8      W  zic.8  zdump.8      W  zic.8 8  SYNOPSIS
.B /usr/etc/yp/ypxfr
[
.B \-f
] [
.B \-c
] [
.B \-d
.I domain
] [
.B \-h
.I host
] [
.B \-s
.I domain
] [
.B \-C
.I tid prog ipadd port
]
.I mapname
.IX ypxfr "" "\fLypxfr\fR \(em move remote Yellow Pages map to local host"
.SH DESCRIPTION
.B ypxfr
moves a
.SM YP
map in the default domain for the local host
to the local host by making use of normal
.SM YP
services.
It cre./share/man/man8/ypxfr_2perday.8                                                                       755       0      12           73  4424741647  11553                                                                                                                                                                                                                                                                                                                                                                      .so man8/ypxfr.8
.\" @(#)ypxfr_2perday.8 1.5 89/03/27 SMI;
zic.8 V  zdump.8      W  zic.8  zdump.8      W  zic.8 8  SYNOPSIS
.B /usr/etc/yp/ypxfr
[
.B \-f
] [
.B \-c
] [
.B \-d
.I domain
] [
.B \-h
.I host
] [
.B \-s
.I domain
] [
.B \-C
.I tid prog ipadd port
]
.I mapname
.IX ypxfr "" "\fLypxfr\fR \(em move remote Yellow Pages map to local host"
.SH DESCRIPTION
.B ypxfr
moves a
.SM YP
map in the default domain for the local host
to the local host by making use of normal
.SM YP
services.
It cre./share/man/man8/zdump.8                                                                               755       0      12         2104  4424741647  10151                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)zdump.8 1.7 89/03/27 SMI; from Arthur Olson
.TH ZDUMP 8 "9 September 1987"
.SH NAME
zdump \- time zone dumper
.SH SYNOPSIS
.B zdump
[
.B \-v
] [
.B \-c
.I cutoffyear
] [
.I zonename
\&... ]
.SH DESCRIPTION
.IX "zdump command" "" "\fLzdump\fP command"
.B zdump
prints the current time in each
.I zonename
named on the command line.
.SH OPTIONS
.TP
.B \-v
For each
.I zonename
on the command line, print the current time,
the time at the lowest possible time value,
the time one day after the lowest possible time value,
the times both one second before and exactly at
each time at which the rules for computing local time change,
the time at the highest possible time value,
and the time at one day less than the highest possible time value.
Each line ends with
.B isdst=1
if the given time is Daylight Saving Time or
.B isdst=0
otherwise.
.TP
.BI "\-c " cutoffyear
Cut off the verbose output near the start of the year
.IR cutoffyear .
.SH FILES
.PD 0
.TP 20
.B /usr/share/lib/zoneinfo
standard zone information directory
.PD
.SH "SEE ALSO"
.BR ctime (3),
.BR tzfile (5),
.BR zic (8)
.  Since
.B ypxfr
is most often run from the super-user's
.B crontab
file, or by
.BR ypserv ,
you can use the log file to retain a record of what was attempted,
and what the results were.
.LP
If
.BR issecure (3)
is
.SM TRUE\s0,
.B ypxfr
requires that
.B ypserv
on the
.I host
be running as root.
If the map being transferred is a secure map,
.B ypxfr
sets the permissions on the map to 0600.
.LP
For consistency between servers,
.B ypxfr
should./share/man/man8/zic.8                                                                                 755       0      12        16453  4424741647   7633                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)zic.8 1.12 89/03/27 SMI; from Arthur Olson
.TH ZIC 8 "22 March 1989"
.SH NAME
zic \- time zone compiler
.SH SYNOPSIS
.B zic
[
.B \-v
] [
.B \-d
.I directory
] [
.B \-l
.I localtime
] [
.I filename
\&.\|.\|. ]
.SH DESCRIPTION
.IX "zic command" "" "\fLzic\fP command"
.B zic
reads text from the file(s) named on the command line
and creates the time conversion information
files specified in this input.  If a
.I filename
is
.RB ` \- ',
the standard input is read.
.LP
Input lines are made up of fields.
Fields are separated from one another by
any number of white space characters.
Leading and trailing white space on input lines is ignored.
An
.RB ` # '
(unquoted sharp character) in the input introduces
a comment which extends
to the end of the line the sharp character appears on.
White space characters and sharp characters
may be enclosed in ` \fB"\fR'
(double quotes) if they're to be used as part of a field.
Any line that is blank (after comment stripping) is ignored.
Non-blank lines are expected to be of one of three types:
rule lines, zone lines, and link lines.
.LP
A rule line has the form
.nf
.ti +.5i
.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
.sp
.B
Rule	\s-1NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S\s0
.sp
For example:
.ti +.5i
.sp
.B
Rule	\s-1USA\s0	1969	1973	\-	Apr	lastSun	2:00	1:00	D
.sp
.fi
The fields that make up a rule line are:
.TP "\w'LETTER/S'u"
.SB NAME
Gives the (arbitrary) name of the set of rules this rule is part of.
.TP
.SB FROM
Gives the first year in which the rule applies.
The word
.B minimum
(or an abbreviation) means the minimum
year with a representable time value.
The word
.B maximum
(or an abbreviation) means the maximum
year with a representable time value.
.TP
.SB TO
Gives the final year in which the rule applies.
In addition to
.B minimum
and
.B maximum
(as above),
the word
.B only
(or an abbreviation)
may be used to repeat the value of the
.SB FROM
field.
.TP
.SB TYPE
Gives the type of year in which the rule applies.
If
.SB TYPE
is
.RB ` \- '
then the rule applies in all years between
.SB FROM
and
.SB TO
inclusive;
if
.SB TYPE
is
.BR uspres ,
the rule applies in U.S. Presidential election years;
if
.SB TYPE
is
.BR nonpres ,
the rule applies in years other than U.S. Presidential election years.
If
.SB TYPE
is something else, then
.B zic
executes the command
.RS
.IP
.B yearistype
.I year
.I type
.RE
.IP
to check the type of a year:
an exit status of zero is taken to mean
that the year is of the given type;
an exit status of one is taken to mean that
the year is not of the given type.
.TP
.SB IN
Names the month in which the rule takes effect.
Month names may be abbreviated.
.TP
.SB ON
Gives the day on which the rule takes effect.
Recognized forms include:
.RS
.IP
.nf
.TP 10
.B 5
the fifth of the month
.TP
.B lastSun
the last Sunday in the month
.TP
.B lastMon
the last Monday in the month
.TP
.B Sun>=8
first Sunday on or after the eighth
.TP
.B Sun<=25
last Sunday on or before the 25th
.fi
.RE
.br
.ne 5
.IP
Names of days of the week may be abbreviated or spelled out in full.
Note: there must be no spaces within the
.SB ON
field.
.TP
.SB AT
Gives the time of day at which the rule takes effect.
Recognized forms include:
.RS
.TP 15
.B 2
time in hours
.TP
.B 2:00
time in hours and minutes
.TP
.B 15:00
24-hour format time (for times after noon)
.TP
.B 1:28:14
time in hours, minutes, and seconds
.RE
.LP
Any of these forms may be followed by the letter
.B w
if the given time is local ``wall clock'' time or
.B s
if the given time is local ``standard'' time; in the absence of
.B w
or
.BR s ,
wall clock time is assumed.
.TP
.SB SAVE
Gives the amount of time to be added to local standard time when the rule is in
effect.
This field has the same format as the
.SB AT
field
(although, of course, the
.B w
and
.B s
suffixes are not used).
.TP
.SB LETTER/S
Gives the ``variable part'' (for example, the ``S''
or ``D'' in ``\s-1EST\s0''
or ``\s-1EDT\s0'') of time zone abbreviations
to be used when this rule is in effect.
If this field is
.RB  ` \- ',
the variable part is null.
.LP
A zone line has the form
.sp
.nf
.ti +.5i
.ta \w'Zone\0\0'u +\w'Australia/South\-west\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
.B
Zone	\s-1NAME	GMTOFF	RULES/SAVE	FORMAT	[UNTIL]\s0
.sp
For example:
.sp
.ti +.5i
.B
Zone	Australia/South\-west	9:30	Aus	\s-1CST\s0	1987 Mar 15 2:00
.sp
.fi
The fields that make up a zone line are:
.TP "\w'GMTOFF'u"
.SB NAME
The name of the time zone.
This is the name used in creating the time conversion information file for the
zone.
.TP
.SB GMTOFF
The amount of time to add to GMT to get standard time in this zone.
This field has the same format as the
.SB AT
and
.SB SAVE
fields of rule lines;
begin the field with a minus sign if time must be subtracted from
.SM GMT\s0.
.TP
.SB RULES/SAVE
The name of the rule(s) that apply in the time zone or,
alternately, an amount of time to add to local standard time.
If this field is
.RB  ` \- '
then standard time always applies in the time zone.
.TP
.SB FORMAT
The format for time zone abbreviations in this time zone.
The pair of characters
.B %s
is used to show where the ``variable part'' of the time zone abbreviation goes.
.SB UNTIL
The time at which the
.SM GMT
offset or the rule(s) change for a location.
It is specified as a year, a month, a day, and a time of day.
If this is specified,
the time zone information is generated from the given
.SM GMT
offset and rule change until the time specified.
.IP
The next line must be a
``continuation'' line; this has the same
form as a zone line except that the
string ``Zone'' and the name are omitted, as the continuation line will
place information starting at the time specified as the
.SB UNTIL
field in the previous line in the file used by the previous line.
Continuation lines may contain an
.SB UNTIL
field, just as zone lines do, indicating
that the next line is a further
continuation.
.LP
A link line has the form
.sp
.nf
.ti +.5i
.if t .ta \w'Link\0\0'u +\w'LINK-FROM\0\0'u
.if n .ta \w'Link\0\0'u +\w'US/Eastern\0\0'u
.B Link	\s-1LINK-FROM	LINK-TO\s0
.sp
For example:
.sp
.ti +.5i
.B Link	\s-1US\s0/Eastern	\s-1EST5EDT\s0
.sp
.fi
The
.SB LINK-FROM
field should appear as the
.SB NAME
field in some zone line;
the
.SB LINK-TO
field is used as an alternate name for that zone.
.LP
Except for continuation lines,
lines may appear in any order in the input.
.SH OPTIONS
.TP 15
.B \-v
Complain if a year that appears in a data
file is outside the range
of years representable by system time values
(0:00:00 AM
.SM GMT\s0,
January 1, 1970, to 3:14:07 AM
.SM GMT\s0,
January 19, 2038).
.TP
.BI "\-d " directory
Create time conversion information files in the directory
.B directory
rather than in the standard directory
.BR /usr/share/lib/zoneinfo .
.TP
.BI "\-l " timezone
Use the time zone
.I timezone
as local time.
.B zic
will act as if the file contained a link line of the form
.sp
.ti +.5i
\fBLink\fP	\fItimezone\fP
		\fBlocaltime\fP
.SH FILES
.TP 20
.B /usr/share/lib/zoneinfo
standard directory used for created files
.SH "SEE ALSO"
.BR time (1V),
.BR ctime (3),
.BR tzfile (5),
.BR zdump (8)
.SH NOTE
.LP
For areas with more than two types of local time,
you may need to use local standard time in the
.SB AT
field of the earliest transition time's rule to ensure that
the earliest transition time recorded in the compiled file is correct.
fifth of the month
.TP
.B lastSun
the last Sunday in the month
.TP
.B lastMon
the last Monday in the month
.TP
.B Sun>=8
first Sunday on or after the eighth
.TP
.B Sun<=25
last Sunday on or before the 25th
.fi
.RE./share/man/mann/                                                                                      755       3      12            0  4425705411   6713                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ctory
.PD
.SH "SEE ALSO"
.BR ctime (3),
.BR tzfile (5),
.BR zic (8)
.  Since
.B ypxfr
is most often run from the super-user's
.B crontab
file, or by
.BR ypserv ,
you can use the log file to retain a record of what was attempted,
and what the results were.
.LP
If
.BR issecure (3)
is
.SM TRUE\s0,
.B ypxfr
requires that
.B ypserv
on the
.I host
be running as root.
If the map being transferred is a secure map,
.B ypxfr
sets the permissions on the map to 0600.
.LP
For consistency between servers,
.B ypxfr
should./share/man/man8/zic.8                                                                                 755       0      12        16453  4424741647   7633                                                                                                                                                                                                                                                                                                                                                                      .\" @(#)zic.8 1.12 89/03/27 SMI; from Arthur Olson
.TH ZIC 8 "22 March 1989"
.SH NAME
zic \- time zone compiler
.SH SYNOPSIS
.B zic
[
.B \-v
] [
.B \-d
.I directory
] [
.B \-l
.I localtime
] [
.I filename
\&.\|.\|. ]
.SH DESCRIPTION
.IX "zic command" "" "\fLzic\fP command"
.B zic
reads text from the file(s) named on the command line
and creates the time conversion information
files specified in this input.  If a
.I filename
is
.RB ` \- ',
the standard input is read.
.LP
Input lines are made up of fields.
Fields are separated from one another by
any number of white space characters.
Leading and trailing white space on input lines is ignored.
An
.RB ` # '
(unquoted sharp character) in the input introduces
a comment which extends
to the end of the line the sharp character appears on.
White space characters and sharp characters
may be enclosed in ` \fB"\fR'
(double quotes) if they're to be used as part of a field.
Any line that is blank (after comment stripping) is ignored.
Non-blank lines are expected to be of one of three types:
rule lines, zone lines, and link lines.
.LP
A rule line has the form
.nf
.ti +.5i
.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
.sp
.B
Rule	\s-1NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S\s0
.sp
For example:
.ti +.5i
.sp
.B
Rule	\s-1USA\s0	1969	1973	\-	Apr	lastSun	2:00	1:00	D
.sp
.fi
The fields that make up a rule line are:
.TP "\w'LETTER/S'u"
.SB NAME
Gives the (arbitrary) name of the set of rules this rule is part of.
.TP
.SB FROM
Gives the first year in which the rule applies.
The word
.B minimum
(or an abbreviation) means the minimum
year with a representable time value.
The word
.B maximum
(or an abbreviation) means the maximum
year with a representable time value.
.TP
.SB TO
Gives the final year in which the rule applies.
In addition to
.B minimum
and
.B maximum
(as above),
the word
.B only
(or an abbreviation)
may be used to repeat the value of the
.SB FROM
field.
.TP
.SB TYPE
Gives the type of year in which the rule applies.
If
.SB TYPE
is
.RB ` \- '
then the rule applies in all years between
.SB FROM
and
.SB TO
inclusive;
if
.SB TYPE
is
.BR uspres ,
the rule applies in U.S. Presidential election years;
if
.SB TYPE
is
.BR nonpres ,
the rule applies in years other than U.S. Presidential election years.
If
.SB TYPE
is something else, then
.B zic
executes the command
.RS
.IP
.B yearistype
.I year
.I type
.RE
.IP
to check the type of a year:
an exit status of zero is taken to mean
that the year is of the given type;
an exit status of one is taken to mean that
the year is not of the given type.
.TP
.SB IN
Names the month in which the rule takes effect.
Month names may be abbreviated.
.TP
.SB ON
Gives the day on which the rule takes effect.
Recognized forms include:
.RS
.IP
.nf
.TP 10
.B 5
the fifth of the month
.TP
.B lastSun
the last Sunday in the month
.TP
.B lastMon
the last Monday in the month
.TP
.B Sun>=8
first Sunday on or after the eighth
.TP
.B Sun<=25
last Sunday on or before the 25th
.fi
.RE
.br
.ne 5
.IP
Names of days of the week may be abbreviated or spelled out in full.
Note: there must be no spaces within the
.SB ON
field.
.TP
.SB AT
Gives the time of day at which the rule takes effect.
Recognized forms include:
.RS
.TP 15
.B 2
time in hours
.TP
.B 2:00
time in hours and minutes
.TP
.B 15:00
24-hour format time (for times after noon)
.TP
.B 1:28:14
time in hours, minutes, and seconds
.RE
.LP
Any of these forms may be followed by the letter
.B w
if the given time is local ``wall clock'' time or
.B s
if the given time is local ``standard'' time; in the absence of
.B w
or
.BR s ,
wall clock time is assumed.
.TP
.SB SAVE
Gives the amount of time to be added to local standard time when the rule is in
effect.
This field has the same format as the
.SB AT
field
(although, of course, the
.B w
and
.B s
suffixes are not used).
.TP
.SB LETTER/S
Gives the ``variable part'' (for example, the ``S''
or ``D'' in ``\s-1EST\s0''
or ``\s-1EDT\s0'') of time zone abbreviations
to be used when this rule is in effect.
If this field is
.RB  ` \- ',
the variable part is null.
.LP
A zone line has the form
.sp
.nf
.ti +.5i
.ta \w'Zone\0\0'u +\w'Australia/South\-west\0\0'u +\w'GMTOFF\0\0'u +\w'RULES/SAVE\0\0'u +\w'FORMAT\0\0'u
.B
Zone	\s-1NAME	GMTOFF	RULES/SAVE	FORMAT	[UNTIL]\s0
.sp
For example:
.sp
.ti +.5i
.B
Zone	Australia/South\-west	9:30	Aus	\s-1CST\s0	1987 Mar 15 2:00
.sp
.fi
The fields that make up a zone line are:
.TP "\w'GMTOFF'u"
.SB NAME
The name of the time zone.
This is the name used in creating the time conv